| author | |
| committer | |
| log | 5a3ea9beced660c9cc463b921a1581cc07855dd6 |
| tree | 7e622bd133adcdbcc0c8d854deaac97f345c4c8c |
| parent | 1fada3746606b3a83d4c56213de93a1017753c96 |
| parent | cc186dac65d84ecbf29b5f8704beb2dfd00d76bb |
Happy LLVM 12 Release Day.
Please note that the llvm 12 tag does not include the latest commit in
the release/12.x branch, which is in fact a bug fix for a regression
that is causing a failure in Zig's test suite.
Zig master branch is tracking release/12.x, and will be enabling the
test that is fixed by that commit.268 files changed, 25564 insertions(+), 16178 deletions(-)
cmake/Findclang.cmake+17-17| ... | ... | @@ -9,27 +9,27 @@ |
| 9 | 9 | |
| 10 | 10 | find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h |
| 11 | 11 | PATHS |
| 12 | /usr/lib/llvm/11/include | |
| 13 | /usr/lib/llvm-11/include | |
| 14 | /usr/lib/llvm-11.0/include | |
| 15 | /usr/local/llvm110/include | |
| 16 | /usr/local/llvm11/include | |
| 12 | /usr/lib/llvm/12/include | |
| 13 | /usr/lib/llvm-12/include | |
| 14 | /usr/lib/llvm-12.0/include | |
| 15 | /usr/local/llvm120/include | |
| 16 | /usr/local/llvm12/include | |
| 17 | 17 | /mingw64/include |
| 18 | 18 | ) |
| 19 | 19 | |
| 20 | 20 | if(ZIG_PREFER_CLANG_CPP_DYLIB) |
| 21 | 21 | find_library(CLANG_LIBRARIES |
| 22 | 22 | NAMES |
| 23 | clang-cpp-11.0 | |
| 24 | clang-cpp110 | |
| 23 | clang-cpp-12.0 | |
| 24 | clang-cpp120 | |
| 25 | 25 | clang-cpp |
| 26 | 26 | PATHS |
| 27 | 27 | ${CLANG_LIBDIRS} |
| 28 | /usr/lib/llvm/11/lib | |
| 29 | /usr/lib/llvm/11/lib64 | |
| 30 | /usr/lib/llvm-11/lib | |
| 31 | /usr/local/llvm110/lib | |
| 32 | /usr/local/llvm11/lib | |
| 28 | /usr/lib/llvm/12/lib | |
| 29 | /usr/lib/llvm/12/lib64 | |
| 30 | /usr/lib/llvm-12/lib | |
| 31 | /usr/local/llvm120/lib | |
| 32 | /usr/local/llvm12/lib | |
| 33 | 33 | ) |
| 34 | 34 | endif() |
| 35 | 35 | |
| ... | ... | @@ -39,11 +39,11 @@ if(NOT CLANG_LIBRARIES) |
| 39 | 39 | find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_} |
| 40 | 40 | PATHS |
| 41 | 41 | ${CLANG_LIBDIRS} |
| 42 | /usr/lib/llvm/11/lib | |
| 43 | /usr/lib/llvm-11/lib | |
| 44 | /usr/lib/llvm-11.0/lib | |
| 45 | /usr/local/llvm110/lib | |
| 46 | /usr/local/llvm11/lib | |
| 42 | /usr/lib/llvm/12/lib | |
| 43 | /usr/lib/llvm-12/lib | |
| 44 | /usr/lib/llvm-12.0/lib | |
| 45 | /usr/local/llvm120/lib | |
| 46 | /usr/local/llvm12/lib | |
| 47 | 47 | /mingw64/lib |
| 48 | 48 | /c/msys64/mingw64/lib |
| 49 | 49 | c:\\msys64\\mingw64\\lib |
cmake/Findlld.cmake+10-10| ... | ... | @@ -8,16 +8,16 @@ |
| 8 | 8 | |
| 9 | 9 | find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h |
| 10 | 10 | PATHS |
| 11 | /usr/lib/llvm-11/include | |
| 12 | /usr/local/llvm110/include | |
| 13 | /usr/local/llvm11/include | |
| 11 | /usr/lib/llvm-12/include | |
| 12 | /usr/local/llvm120/include | |
| 13 | /usr/local/llvm12/include | |
| 14 | 14 | /mingw64/include) |
| 15 | 15 | |
| 16 | find_library(LLD_LIBRARY NAMES lld-11.0 lld110 lld | |
| 16 | find_library(LLD_LIBRARY NAMES lld-12.0 lld120 lld | |
| 17 | 17 | PATHS |
| 18 | /usr/lib/llvm-11/lib | |
| 19 | /usr/local/llvm110/lib | |
| 20 | /usr/local/llvm11/lib | |
| 18 | /usr/lib/llvm-12/lib | |
| 19 | /usr/local/llvm120/lib | |
| 20 | /usr/local/llvm12/lib | |
| 21 | 21 | ) |
| 22 | 22 | if(EXISTS ${LLD_LIBRARY}) |
| 23 | 23 | set(LLD_LIBRARIES ${LLD_LIBRARY}) |
| ... | ... | @@ -27,9 +27,9 @@ else() |
| 27 | 27 | find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_} |
| 28 | 28 | PATHS |
| 29 | 29 | ${LLD_LIBDIRS} |
| 30 | /usr/lib/llvm-11/lib | |
| 31 | /usr/local/llvm110/lib | |
| 32 | /usr/local/llvm11/lib | |
| 30 | /usr/lib/llvm-12/lib | |
| 31 | /usr/local/llvm120/lib | |
| 32 | /usr/local/llvm12/lib | |
| 33 | 33 | /mingw64/lib |
| 34 | 34 | /c/msys64/mingw64/lib |
| 35 | 35 | c:/msys64/mingw64/lib) |
cmake/Findllvm.cmake+92-88| ... | ... | @@ -9,37 +9,37 @@ |
| 9 | 9 | |
| 10 | 10 | find_path(LLVM_INCLUDE_DIRS NAMES llvm/IR/IRBuilder.h |
| 11 | 11 | PATHS |
| 12 | /usr/lib/llvm/11/include | |
| 13 | /usr/lib/llvm-11/include | |
| 14 | /usr/lib/llvm-11.0/include | |
| 15 | /usr/local/llvm11/include | |
| 16 | /usr/local/llvm110/include | |
| 12 | /usr/lib/llvm/12/include | |
| 13 | /usr/lib/llvm-12/include | |
| 14 | /usr/lib/llvm-12.0/include | |
| 15 | /usr/local/llvm12/include | |
| 16 | /usr/local/llvm120/include | |
| 17 | 17 | /mingw64/include |
| 18 | 18 | ) |
| 19 | 19 | |
| 20 | 20 | if(ZIG_PREFER_CLANG_CPP_DYLIB) |
| 21 | 21 | find_library(LLVM_LIBRARIES |
| 22 | 22 | NAMES |
| 23 | LLVM-11.0 | |
| 24 | LLVM-11 | |
| 25 | LLVM-110 | |
| 23 | LLVM-12.0 | |
| 24 | LLVM-12 | |
| 25 | LLVM-120 | |
| 26 | 26 | LLVM |
| 27 | 27 | PATHS |
| 28 | 28 | ${LLVM_LIBDIRS} |
| 29 | /usr/lib/llvm/11/lib | |
| 30 | /usr/lib/llvm/11/lib64 | |
| 31 | /usr/lib/llvm-11/lib | |
| 32 | /usr/local/llvm11/lib | |
| 33 | /usr/local/llvm110/lib | |
| 29 | /usr/lib/llvm/12/lib | |
| 30 | /usr/lib/llvm/12/lib64 | |
| 31 | /usr/lib/llvm-12/lib | |
| 32 | /usr/local/llvm12/lib | |
| 33 | /usr/local/llvm120/lib | |
| 34 | 34 | ) |
| 35 | 35 | |
| 36 | 36 | find_program(LLVM_CONFIG_EXE |
| 37 | NAMES llvm-config-11 llvm-config-11.0 llvm-config110 llvm-config11 llvm-config | |
| 37 | NAMES llvm-config-12 llvm-config-12.0 llvm-config120 llvm-config12 llvm-config | |
| 38 | 38 | PATHS |
| 39 | 39 | "/mingw64/bin" |
| 40 | 40 | "/c/msys64/mingw64/bin" |
| 41 | 41 | "c:/msys64/mingw64/bin" |
| 42 | "C:/Libraries/llvm-11.0.0/bin") | |
| 42 | "C:/Libraries/llvm-12.0.0/bin") | |
| 43 | 43 | |
| 44 | 44 | if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND") |
| 45 | 45 | message(FATAL_ERROR "unable to find llvm-config") |
| ... | ... | @@ -54,23 +54,23 @@ if(ZIG_PREFER_CLANG_CPP_DYLIB) |
| 54 | 54 | OUTPUT_VARIABLE LLVM_CONFIG_VERSION |
| 55 | 55 | OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 56 | 56 | |
| 57 | if("${LLVM_CONFIG_VERSION}" VERSION_LESS 11) | |
| 58 | message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 57 | if("${LLVM_CONFIG_VERSION}" VERSION_LESS 12) | |
| 58 | message(FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 59 | 59 | endif() |
| 60 | if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 12) | |
| 61 | message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 60 | if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 13) | |
| 61 | message(FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 62 | 62 | endif() |
| 63 | if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 12) | |
| 64 | message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 63 | if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 13) | |
| 64 | message(FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 65 | 65 | endif() |
| 66 | 66 | elseif(ZIG_USE_LLVM_CONFIG) |
| 67 | 67 | find_program(LLVM_CONFIG_EXE |
| 68 | NAMES llvm-config-11 llvm-config-11.0 llvm-config110 llvm-config11 llvm-config | |
| 68 | NAMES llvm-config-12 llvm-config-12.0 llvm-config120 llvm-config12 llvm-config | |
| 69 | 69 | PATHS |
| 70 | 70 | "/mingw64/bin" |
| 71 | 71 | "/c/msys64/mingw64/bin" |
| 72 | 72 | "c:/msys64/mingw64/bin" |
| 73 | "C:/Libraries/llvm-11.0.0/bin") | |
| 73 | "C:/Libraries/llvm-12.0.0/bin") | |
| 74 | 74 | |
| 75 | 75 | if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND") |
| 76 | 76 | message(FATAL_ERROR "unable to find llvm-config") |
| ... | ... | @@ -85,14 +85,14 @@ elseif(ZIG_USE_LLVM_CONFIG) |
| 85 | 85 | OUTPUT_VARIABLE LLVM_CONFIG_VERSION |
| 86 | 86 | OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 87 | 87 | |
| 88 | if("${LLVM_CONFIG_VERSION}" VERSION_LESS 11) | |
| 89 | message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 88 | if("${LLVM_CONFIG_VERSION}" VERSION_LESS 12) | |
| 89 | message(FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 90 | 90 | endif() |
| 91 | if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 12) | |
| 92 | message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 91 | if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 13) | |
| 92 | message(FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 93 | 93 | endif() |
| 94 | if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 12) | |
| 95 | message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 94 | if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 13) | |
| 95 | message(FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") | |
| 96 | 96 | endif() |
| 97 | 97 | |
| 98 | 98 | execute_process( |
| ... | ... | @@ -166,7 +166,7 @@ elseif(ZIG_USE_LLVM_CONFIG) |
| 166 | 166 | set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS}) |
| 167 | 167 | |
| 168 | 168 | if(NOT LLVM_LIBRARIES) |
| 169 | find_library(LLVM_LIBRARIES NAMES LLVM LLVM-11 LLVM-11.0) | |
| 169 | find_library(LLVM_LIBRARIES NAMES LLVM LLVM-12 LLVM-12.0) | |
| 170 | 170 | endif() |
| 171 | 171 | |
| 172 | 172 | link_directories("${CMAKE_PREFIX_PATH}/lib") |
| ... | ... | @@ -180,11 +180,11 @@ else() |
| 180 | 180 | find_library(LLVM_${_prettylibname_}_LIB NAMES ${_libname_} |
| 181 | 181 | PATHS |
| 182 | 182 | ${LLVM_LIBDIRS} |
| 183 | /usr/lib/llvm/11/lib | |
| 184 | /usr/lib/llvm-11/lib | |
| 185 | /usr/lib/llvm-11.0/lib | |
| 186 | /usr/local/llvm110/lib | |
| 187 | /usr/local/llvm11/lib | |
| 183 | /usr/lib/llvm/12/lib | |
| 184 | /usr/lib/llvm-12/lib | |
| 185 | /usr/lib/llvm-12.0/lib | |
| 186 | /usr/local/llvm120/lib | |
| 187 | /usr/local/llvm12/lib | |
| 188 | 188 | /mingw64/lib |
| 189 | 189 | /c/msys64/mingw64/lib |
| 190 | 190 | c:\\msys64\\mingw64\\lib) |
| ... | ... | @@ -194,78 +194,57 @@ else() |
| 194 | 194 | # This list can be re-generated with `llvm-config --libfiles` and then |
| 195 | 195 | # reformatting using your favorite text editor. Note we do not execute |
| 196 | 196 | # `llvm-config` here because we are cross compiling. |
| 197 | FIND_AND_ADD_LLVM_LIB(LLVMXRay) | |
| 198 | 197 | FIND_AND_ADD_LLVM_LIB(LLVMWindowsManifest) |
| 199 | FIND_AND_ADD_LLVM_LIB(LLVMSymbolize) | |
| 200 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoPDB) | |
| 201 | FIND_AND_ADD_LLVM_LIB(LLVMOrcJIT) | |
| 202 | FIND_AND_ADD_LLVM_LIB(LLVMOrcError) | |
| 203 | FIND_AND_ADD_LLVM_LIB(LLVMJITLink) | |
| 204 | FIND_AND_ADD_LLVM_LIB(LLVMObjectYAML) | |
| 205 | FIND_AND_ADD_LLVM_LIB(LLVMMCA) | |
| 206 | FIND_AND_ADD_LLVM_LIB(LLVMLTO) | |
| 207 | FIND_AND_ADD_LLVM_LIB(LLVMPasses) | |
| 208 | FIND_AND_ADD_LLVM_LIB(LLVMCoroutines) | |
| 209 | FIND_AND_ADD_LLVM_LIB(LLVMObjCARCOpts) | |
| 210 | FIND_AND_ADD_LLVM_LIB(LLVMExtensions) | |
| 211 | FIND_AND_ADD_LLVM_LIB(LLVMLineEditor) | |
| 198 | FIND_AND_ADD_LLVM_LIB(LLVMXRay) | |
| 212 | 199 | FIND_AND_ADD_LLVM_LIB(LLVMLibDriver) |
| 213 | FIND_AND_ADD_LLVM_LIB(LLVMInterpreter) | |
| 214 | FIND_AND_ADD_LLVM_LIB(LLVMFuzzMutate) | |
| 215 | FIND_AND_ADD_LLVM_LIB(LLVMMCJIT) | |
| 216 | FIND_AND_ADD_LLVM_LIB(LLVMExecutionEngine) | |
| 217 | FIND_AND_ADD_LLVM_LIB(LLVMRuntimeDyld) | |
| 218 | FIND_AND_ADD_LLVM_LIB(LLVMDWARFLinker) | |
| 219 | 200 | FIND_AND_ADD_LLVM_LIB(LLVMDlltoolDriver) |
| 220 | FIND_AND_ADD_LLVM_LIB(LLVMOption) | |
| 221 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoGSYM) | |
| 222 | 201 | FIND_AND_ADD_LLVM_LIB(LLVMCoverage) |
| 202 | FIND_AND_ADD_LLVM_LIB(LLVMLineEditor) | |
| 223 | 203 | FIND_AND_ADD_LLVM_LIB(LLVMXCoreDisassembler) |
| 224 | 204 | FIND_AND_ADD_LLVM_LIB(LLVMXCoreCodeGen) |
| 225 | 205 | FIND_AND_ADD_LLVM_LIB(LLVMXCoreDesc) |
| 226 | 206 | FIND_AND_ADD_LLVM_LIB(LLVMXCoreInfo) |
| 227 | 207 | FIND_AND_ADD_LLVM_LIB(LLVMX86Disassembler) |
| 228 | FIND_AND_ADD_LLVM_LIB(LLVMX86CodeGen) | |
| 229 | 208 | FIND_AND_ADD_LLVM_LIB(LLVMX86AsmParser) |
| 209 | FIND_AND_ADD_LLVM_LIB(LLVMX86CodeGen) | |
| 230 | 210 | FIND_AND_ADD_LLVM_LIB(LLVMX86Desc) |
| 231 | 211 | FIND_AND_ADD_LLVM_LIB(LLVMX86Info) |
| 232 | 212 | FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyDisassembler) |
| 213 | FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyAsmParser) | |
| 233 | 214 | FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyCodeGen) |
| 234 | 215 | FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyDesc) |
| 235 | FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyAsmParser) | |
| 236 | 216 | FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyInfo) |
| 237 | 217 | FIND_AND_ADD_LLVM_LIB(LLVMSystemZDisassembler) |
| 238 | FIND_AND_ADD_LLVM_LIB(LLVMSystemZCodeGen) | |
| 239 | 218 | FIND_AND_ADD_LLVM_LIB(LLVMSystemZAsmParser) |
| 219 | FIND_AND_ADD_LLVM_LIB(LLVMSystemZCodeGen) | |
| 240 | 220 | FIND_AND_ADD_LLVM_LIB(LLVMSystemZDesc) |
| 241 | 221 | FIND_AND_ADD_LLVM_LIB(LLVMSystemZInfo) |
| 242 | 222 | FIND_AND_ADD_LLVM_LIB(LLVMSparcDisassembler) |
| 243 | FIND_AND_ADD_LLVM_LIB(LLVMSparcCodeGen) | |
| 244 | 223 | FIND_AND_ADD_LLVM_LIB(LLVMSparcAsmParser) |
| 224 | FIND_AND_ADD_LLVM_LIB(LLVMSparcCodeGen) | |
| 245 | 225 | FIND_AND_ADD_LLVM_LIB(LLVMSparcDesc) |
| 246 | 226 | FIND_AND_ADD_LLVM_LIB(LLVMSparcInfo) |
| 247 | 227 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVDisassembler) |
| 248 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVCodeGen) | |
| 249 | 228 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVAsmParser) |
| 229 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVCodeGen) | |
| 250 | 230 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVDesc) |
| 251 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVUtils) | |
| 252 | 231 | FIND_AND_ADD_LLVM_LIB(LLVMRISCVInfo) |
| 253 | 232 | FIND_AND_ADD_LLVM_LIB(LLVMPowerPCDisassembler) |
| 254 | FIND_AND_ADD_LLVM_LIB(LLVMPowerPCCodeGen) | |
| 255 | 233 | FIND_AND_ADD_LLVM_LIB(LLVMPowerPCAsmParser) |
| 234 | FIND_AND_ADD_LLVM_LIB(LLVMPowerPCCodeGen) | |
| 256 | 235 | FIND_AND_ADD_LLVM_LIB(LLVMPowerPCDesc) |
| 257 | 236 | FIND_AND_ADD_LLVM_LIB(LLVMPowerPCInfo) |
| 258 | 237 | FIND_AND_ADD_LLVM_LIB(LLVMNVPTXCodeGen) |
| 259 | 238 | FIND_AND_ADD_LLVM_LIB(LLVMNVPTXDesc) |
| 260 | 239 | FIND_AND_ADD_LLVM_LIB(LLVMNVPTXInfo) |
| 261 | 240 | FIND_AND_ADD_LLVM_LIB(LLVMMSP430Disassembler) |
| 262 | FIND_AND_ADD_LLVM_LIB(LLVMMSP430CodeGen) | |
| 263 | 241 | FIND_AND_ADD_LLVM_LIB(LLVMMSP430AsmParser) |
| 242 | FIND_AND_ADD_LLVM_LIB(LLVMMSP430CodeGen) | |
| 264 | 243 | FIND_AND_ADD_LLVM_LIB(LLVMMSP430Desc) |
| 265 | 244 | FIND_AND_ADD_LLVM_LIB(LLVMMSP430Info) |
| 266 | 245 | FIND_AND_ADD_LLVM_LIB(LLVMMipsDisassembler) |
| 267 | FIND_AND_ADD_LLVM_LIB(LLVMMipsCodeGen) | |
| 268 | 246 | FIND_AND_ADD_LLVM_LIB(LLVMMipsAsmParser) |
| 247 | FIND_AND_ADD_LLVM_LIB(LLVMMipsCodeGen) | |
| 269 | 248 | FIND_AND_ADD_LLVM_LIB(LLVMMipsDesc) |
| 270 | 249 | FIND_AND_ADD_LLVM_LIB(LLVMMipsInfo) |
| 271 | 250 | FIND_AND_ADD_LLVM_LIB(LLVMLanaiDisassembler) |
| ... | ... | @@ -279,44 +258,73 @@ else() |
| 279 | 258 | FIND_AND_ADD_LLVM_LIB(LLVMHexagonDesc) |
| 280 | 259 | FIND_AND_ADD_LLVM_LIB(LLVMHexagonInfo) |
| 281 | 260 | FIND_AND_ADD_LLVM_LIB(LLVMBPFDisassembler) |
| 282 | FIND_AND_ADD_LLVM_LIB(LLVMBPFCodeGen) | |
| 283 | 261 | FIND_AND_ADD_LLVM_LIB(LLVMBPFAsmParser) |
| 262 | FIND_AND_ADD_LLVM_LIB(LLVMBPFCodeGen) | |
| 284 | 263 | FIND_AND_ADD_LLVM_LIB(LLVMBPFDesc) |
| 285 | 264 | FIND_AND_ADD_LLVM_LIB(LLVMBPFInfo) |
| 286 | 265 | FIND_AND_ADD_LLVM_LIB(LLVMAVRDisassembler) |
| 287 | FIND_AND_ADD_LLVM_LIB(LLVMAVRCodeGen) | |
| 288 | 266 | FIND_AND_ADD_LLVM_LIB(LLVMAVRAsmParser) |
| 267 | FIND_AND_ADD_LLVM_LIB(LLVMAVRCodeGen) | |
| 289 | 268 | FIND_AND_ADD_LLVM_LIB(LLVMAVRDesc) |
| 290 | 269 | FIND_AND_ADD_LLVM_LIB(LLVMAVRInfo) |
| 291 | 270 | FIND_AND_ADD_LLVM_LIB(LLVMARMDisassembler) |
| 292 | FIND_AND_ADD_LLVM_LIB(LLVMARMCodeGen) | |
| 293 | 271 | FIND_AND_ADD_LLVM_LIB(LLVMARMAsmParser) |
| 272 | FIND_AND_ADD_LLVM_LIB(LLVMARMCodeGen) | |
| 294 | 273 | FIND_AND_ADD_LLVM_LIB(LLVMARMDesc) |
| 295 | 274 | FIND_AND_ADD_LLVM_LIB(LLVMARMUtils) |
| 296 | 275 | FIND_AND_ADD_LLVM_LIB(LLVMARMInfo) |
| 297 | 276 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUDisassembler) |
| 298 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUCodeGen) | |
| 299 | FIND_AND_ADD_LLVM_LIB(LLVMMIRParser) | |
| 300 | FIND_AND_ADD_LLVM_LIB(LLVMipo) | |
| 301 | FIND_AND_ADD_LLVM_LIB(LLVMInstrumentation) | |
| 302 | FIND_AND_ADD_LLVM_LIB(LLVMVectorize) | |
| 303 | FIND_AND_ADD_LLVM_LIB(LLVMLinker) | |
| 304 | FIND_AND_ADD_LLVM_LIB(LLVMIRReader) | |
| 305 | FIND_AND_ADD_LLVM_LIB(LLVMAsmParser) | |
| 306 | FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenMP) | |
| 307 | 277 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUAsmParser) |
| 278 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUCodeGen) | |
| 308 | 279 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUDesc) |
| 309 | 280 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUUtils) |
| 310 | 281 | FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUInfo) |
| 311 | 282 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Disassembler) |
| 312 | FIND_AND_ADD_LLVM_LIB(LLVMMCDisassembler) | |
| 283 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64AsmParser) | |
| 313 | 284 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64CodeGen) |
| 285 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Desc) | |
| 286 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Utils) | |
| 287 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Info) | |
| 288 | FIND_AND_ADD_LLVM_LIB(LLVMOrcJIT) | |
| 289 | FIND_AND_ADD_LLVM_LIB(LLVMMCJIT) | |
| 290 | FIND_AND_ADD_LLVM_LIB(LLVMJITLink) | |
| 291 | FIND_AND_ADD_LLVM_LIB(LLVMOrcTargetProcess) | |
| 292 | FIND_AND_ADD_LLVM_LIB(LLVMOrcShared) | |
| 293 | FIND_AND_ADD_LLVM_LIB(LLVMInterpreter) | |
| 294 | FIND_AND_ADD_LLVM_LIB(LLVMExecutionEngine) | |
| 295 | FIND_AND_ADD_LLVM_LIB(LLVMRuntimeDyld) | |
| 296 | FIND_AND_ADD_LLVM_LIB(LLVMSymbolize) | |
| 297 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoPDB) | |
| 298 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoGSYM) | |
| 299 | FIND_AND_ADD_LLVM_LIB(LLVMOption) | |
| 300 | FIND_AND_ADD_LLVM_LIB(LLVMObjectYAML) | |
| 301 | FIND_AND_ADD_LLVM_LIB(LLVMMCA) | |
| 302 | FIND_AND_ADD_LLVM_LIB(LLVMMCDisassembler) | |
| 303 | FIND_AND_ADD_LLVM_LIB(LLVMLTO) | |
| 304 | FIND_AND_ADD_LLVM_LIB(LLVMPasses) | |
| 314 | 305 | FIND_AND_ADD_LLVM_LIB(LLVMCFGuard) |
| 306 | FIND_AND_ADD_LLVM_LIB(LLVMCoroutines) | |
| 307 | FIND_AND_ADD_LLVM_LIB(LLVMObjCARCOpts) | |
| 308 | FIND_AND_ADD_LLVM_LIB(LLVMHelloNew) | |
| 309 | FIND_AND_ADD_LLVM_LIB(LLVMipo) | |
| 310 | FIND_AND_ADD_LLVM_LIB(LLVMVectorize) | |
| 311 | FIND_AND_ADD_LLVM_LIB(LLVMLinker) | |
| 312 | FIND_AND_ADD_LLVM_LIB(LLVMInstrumentation) | |
| 313 | FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenMP) | |
| 314 | FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenACC) | |
| 315 | FIND_AND_ADD_LLVM_LIB(LLVMExtensions) | |
| 316 | FIND_AND_ADD_LLVM_LIB(LLVMDWARFLinker) | |
| 315 | 317 | FIND_AND_ADD_LLVM_LIB(LLVMGlobalISel) |
| 316 | FIND_AND_ADD_LLVM_LIB(LLVMSelectionDAG) | |
| 318 | FIND_AND_ADD_LLVM_LIB(LLVMMIRParser) | |
| 317 | 319 | FIND_AND_ADD_LLVM_LIB(LLVMAsmPrinter) |
| 318 | 320 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoDWARF) |
| 321 | FIND_AND_ADD_LLVM_LIB(LLVMSelectionDAG) | |
| 319 | 322 | FIND_AND_ADD_LLVM_LIB(LLVMCodeGen) |
| 323 | FIND_AND_ADD_LLVM_LIB(LLVMIRReader) | |
| 324 | FIND_AND_ADD_LLVM_LIB(LLVMAsmParser) | |
| 325 | FIND_AND_ADD_LLVM_LIB(LLVMInterfaceStub) | |
| 326 | FIND_AND_ADD_LLVM_LIB(LLVMFileCheck) | |
| 327 | FIND_AND_ADD_LLVM_LIB(LLVMFuzzMutate) | |
| 320 | 328 | FIND_AND_ADD_LLVM_LIB(LLVMTarget) |
| 321 | 329 | FIND_AND_ADD_LLVM_LIB(LLVMScalarOpts) |
| 322 | 330 | FIND_AND_ADD_LLVM_LIB(LLVMInstCombine) |
| ... | ... | @@ -327,19 +335,15 @@ else() |
| 327 | 335 | FIND_AND_ADD_LLVM_LIB(LLVMProfileData) |
| 328 | 336 | FIND_AND_ADD_LLVM_LIB(LLVMObject) |
| 329 | 337 | FIND_AND_ADD_LLVM_LIB(LLVMTextAPI) |
| 330 | FIND_AND_ADD_LLVM_LIB(LLVMBitReader) | |
| 331 | FIND_AND_ADD_LLVM_LIB(LLVMCore) | |
| 332 | FIND_AND_ADD_LLVM_LIB(LLVMRemarks) | |
| 333 | FIND_AND_ADD_LLVM_LIB(LLVMBitstreamReader) | |
| 334 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64AsmParser) | |
| 335 | 338 | FIND_AND_ADD_LLVM_LIB(LLVMMCParser) |
| 336 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Desc) | |
| 337 | 339 | FIND_AND_ADD_LLVM_LIB(LLVMMC) |
| 338 | 340 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoCodeView) |
| 339 | 341 | FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoMSF) |
| 342 | FIND_AND_ADD_LLVM_LIB(LLVMBitReader) | |
| 343 | FIND_AND_ADD_LLVM_LIB(LLVMCore) | |
| 344 | FIND_AND_ADD_LLVM_LIB(LLVMRemarks) | |
| 345 | FIND_AND_ADD_LLVM_LIB(LLVMBitstreamReader) | |
| 340 | 346 | FIND_AND_ADD_LLVM_LIB(LLVMBinaryFormat) |
| 341 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Utils) | |
| 342 | FIND_AND_ADD_LLVM_LIB(LLVMAArch64Info) | |
| 343 | 347 | FIND_AND_ADD_LLVM_LIB(LLVMSupport) |
| 344 | 348 | FIND_AND_ADD_LLVM_LIB(LLVMDemangle) |
| 345 | 349 | endif() |
lib/include/__clang_cuda_builtin_vars.h+9| ... | ... | @@ -55,7 +55,9 @@ struct __cuda_builtin_threadIdx_t { |
| 55 | 55 | __CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_tid_z()); |
| 56 | 56 | // threadIdx should be convertible to uint3 (in fact in nvcc, it *is* a |
| 57 | 57 | // uint3). This function is defined after we pull in vector_types.h. |
| 58 | __attribute__((device)) operator dim3() const; | |
| 58 | 59 | __attribute__((device)) operator uint3() const; |
| 60 | ||
| 59 | 61 | private: |
| 60 | 62 | __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_threadIdx_t); |
| 61 | 63 | }; |
| ... | ... | @@ -66,7 +68,9 @@ struct __cuda_builtin_blockIdx_t { |
| 66 | 68 | __CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_ctaid_z()); |
| 67 | 69 | // blockIdx should be convertible to uint3 (in fact in nvcc, it *is* a |
| 68 | 70 | // uint3). This function is defined after we pull in vector_types.h. |
| 71 | __attribute__((device)) operator dim3() const; | |
| 69 | 72 | __attribute__((device)) operator uint3() const; |
| 73 | ||
| 70 | 74 | private: |
| 71 | 75 | __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_blockIdx_t); |
| 72 | 76 | }; |
| ... | ... | @@ -78,6 +82,8 @@ struct __cuda_builtin_blockDim_t { |
| 78 | 82 | // blockDim should be convertible to dim3 (in fact in nvcc, it *is* a |
| 79 | 83 | // dim3). This function is defined after we pull in vector_types.h. |
| 80 | 84 | __attribute__((device)) operator dim3() const; |
| 85 | __attribute__((device)) operator uint3() const; | |
| 86 | ||
| 81 | 87 | private: |
| 82 | 88 | __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_blockDim_t); |
| 83 | 89 | }; |
| ... | ... | @@ -89,6 +95,8 @@ struct __cuda_builtin_gridDim_t { |
| 89 | 95 | // gridDim should be convertible to dim3 (in fact in nvcc, it *is* a |
| 90 | 96 | // dim3). This function is defined after we pull in vector_types.h. |
| 91 | 97 | __attribute__((device)) operator dim3() const; |
| 98 | __attribute__((device)) operator uint3() const; | |
| 99 | ||
| 92 | 100 | private: |
| 93 | 101 | __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_gridDim_t); |
| 94 | 102 | }; |
| ... | ... | @@ -108,5 +116,6 @@ __attribute__((device)) const int warpSize = 32; |
| 108 | 116 | #undef __CUDA_DEVICE_BUILTIN |
| 109 | 117 | #undef __CUDA_BUILTIN_VAR |
| 110 | 118 | #undef __CUDA_DISALLOW_BUILTINVAR_ACCESS |
| 119 | #undef __DELETE | |
| 111 | 120 | |
| 112 | 121 | #endif /* __CUDA_BUILTIN_VARS_H */ |
lib/include/__clang_cuda_cmath.h+46-4| ... | ... | @@ -66,10 +66,38 @@ __DEVICE__ float frexp(float __arg, int *__exp) { |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // For inscrutable reasons, the CUDA headers define these functions for us on |
| 69 | // Windows. For OpenMP we omit these as some old system headers have | |
| 70 | // non-conforming `isinf(float)` and `isnan(float)` implementations that return | |
| 71 | // an `int`. The system versions of these functions should be fine anyway. | |
| 72 | #if !defined(_MSC_VER) && !defined(__OPENMP_NVPTX__) | |
| 69 | // Windows. | |
| 70 | #if !defined(_MSC_VER) || defined(__OPENMP_NVPTX__) | |
| 71 | ||
| 72 | // For OpenMP we work around some old system headers that have non-conforming | |
| 73 | // `isinf(float)` and `isnan(float)` implementations that return an `int`. We do | |
| 74 | // this by providing two versions of these functions, differing only in the | |
| 75 | // return type. To avoid conflicting definitions we disable implicit base | |
| 76 | // function generation. That means we will end up with two specializations, one | |
| 77 | // per type, but only one has a base function defined by the system header. | |
| 78 | #if defined(__OPENMP_NVPTX__) | |
| 79 | #pragma omp begin declare variant match( \ | |
| 80 | implementation = {extension(disable_implicit_base)}) | |
| 81 | ||
| 82 | // FIXME: We lack an extension to customize the mangling of the variants, e.g., | |
| 83 | // add a suffix. This means we would clash with the names of the variants | |
| 84 | // (note that we do not create implicit base functions here). To avoid | |
| 85 | // this clash we add a new trait to some of them that is always true | |
| 86 | // (this is LLVM after all ;)). It will only influence the mangled name | |
| 87 | // of the variants inside the inner region and avoid the clash. | |
| 88 | #pragma omp begin declare variant match(implementation = {vendor(llvm)}) | |
| 89 | ||
| 90 | __DEVICE__ int isinf(float __x) { return ::__isinff(__x); } | |
| 91 | __DEVICE__ int isinf(double __x) { return ::__isinf(__x); } | |
| 92 | __DEVICE__ int isfinite(float __x) { return ::__finitef(__x); } | |
| 93 | __DEVICE__ int isfinite(double __x) { return ::__isfinited(__x); } | |
| 94 | __DEVICE__ int isnan(float __x) { return ::__isnanf(__x); } | |
| 95 | __DEVICE__ int isnan(double __x) { return ::__isnan(__x); } | |
| 96 | ||
| 97 | #pragma omp end declare variant | |
| 98 | ||
| 99 | #endif | |
| 100 | ||
| 73 | 101 | __DEVICE__ bool isinf(float __x) { return ::__isinff(__x); } |
| 74 | 102 | __DEVICE__ bool isinf(double __x) { return ::__isinf(__x); } |
| 75 | 103 | __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } |
| ... | ... | @@ -79,6 +107,11 @@ __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } |
| 79 | 107 | __DEVICE__ bool isfinite(double __x) { return ::__isfinited(__x); } |
| 80 | 108 | __DEVICE__ bool isnan(float __x) { return ::__isnanf(__x); } |
| 81 | 109 | __DEVICE__ bool isnan(double __x) { return ::__isnan(__x); } |
| 110 | ||
| 111 | #if defined(__OPENMP_NVPTX__) | |
| 112 | #pragma omp end declare variant | |
| 113 | #endif | |
| 114 | ||
| 82 | 115 | #endif |
| 83 | 116 | |
| 84 | 117 | __DEVICE__ bool isgreater(float __x, float __y) { |
| ... | ... | @@ -142,6 +175,15 @@ __DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); } |
| 142 | 175 | __DEVICE__ float tan(float __x) { return ::tanf(__x); } |
| 143 | 176 | __DEVICE__ float tanh(float __x) { return ::tanhf(__x); } |
| 144 | 177 | |
| 178 | // There was a redefinition error for this this overload in CUDA mode. | |
| 179 | // We restrict it to OpenMP mode for now, that is where it is actually needed | |
| 180 | // anyway. | |
| 181 | #ifdef __OPENMP_NVPTX__ | |
| 182 | __DEVICE__ float remquo(float __n, float __d, int *__q) { | |
| 183 | return ::remquof(__n, __d, __q); | |
| 184 | } | |
| 185 | #endif | |
| 186 | ||
| 145 | 187 | // Notably missing above is nexttoward. We omit it because |
| 146 | 188 | // libdevice doesn't provide an implementation, and we don't want to be in the |
| 147 | 189 | // business of implementing tricky libm functions in this header. |
lib/include/__clang_cuda_complex_builtins.h+28-2| ... | ... | @@ -41,6 +41,27 @@ |
| 41 | 41 | #define _ABSf std::abs |
| 42 | 42 | #define _LOGBd std::logb |
| 43 | 43 | #define _LOGBf std::logb |
| 44 | // Rather than pulling in std::max from algorithm everytime, use available ::max. | |
| 45 | #define _fmaxd max | |
| 46 | #define _fmaxf max | |
| 47 | #else | |
| 48 | #ifdef __AMDGCN__ | |
| 49 | #define _ISNANd __ocml_isnan_f64 | |
| 50 | #define _ISNANf __ocml_isnan_f32 | |
| 51 | #define _ISINFd __ocml_isinf_f64 | |
| 52 | #define _ISINFf __ocml_isinf_f32 | |
| 53 | #define _ISFINITEd __ocml_isfinite_f64 | |
| 54 | #define _ISFINITEf __ocml_isfinite_f32 | |
| 55 | #define _COPYSIGNd __ocml_copysign_f64 | |
| 56 | #define _COPYSIGNf __ocml_copysign_f32 | |
| 57 | #define _SCALBNd __ocml_scalbn_f64 | |
| 58 | #define _SCALBNf __ocml_scalbn_f32 | |
| 59 | #define _ABSd __ocml_fabs_f64 | |
| 60 | #define _ABSf __ocml_fabs_f32 | |
| 61 | #define _LOGBd __ocml_logb_f64 | |
| 62 | #define _LOGBf __ocml_logb_f32 | |
| 63 | #define _fmaxd __ocml_fmax_f64 | |
| 64 | #define _fmaxf __ocml_fmax_f32 | |
| 44 | 65 | #else |
| 45 | 66 | #define _ISNANd __nv_isnand |
| 46 | 67 | #define _ISNANf __nv_isnanf |
| ... | ... | @@ -56,6 +77,9 @@ |
| 56 | 77 | #define _ABSf __nv_fabsf |
| 57 | 78 | #define _LOGBd __nv_logb |
| 58 | 79 | #define _LOGBf __nv_logbf |
| 80 | #define _fmaxd __nv_fmax | |
| 81 | #define _fmaxf __nv_fmaxf | |
| 82 | #endif | |
| 59 | 83 | #endif |
| 60 | 84 | |
| 61 | 85 | #if defined(__cplusplus) |
| ... | ... | @@ -167,7 +191,7 @@ __DEVICE__ double _Complex __divdc3(double __a, double __b, double __c, |
| 167 | 191 | // Can't use std::max, because that's defined in <algorithm>, and we don't |
| 168 | 192 | // want to pull that in for every compile. The CUDA headers define |
| 169 | 193 | // ::max(float, float) and ::max(double, double), which is sufficient for us. |
| 170 | double __logbw = _LOGBd(max(_ABSd(__c), _ABSd(__d))); | |
| 194 | double __logbw = _LOGBd(_fmaxd(_ABSd(__c), _ABSd(__d))); | |
| 171 | 195 | if (_ISFINITEd(__logbw)) { |
| 172 | 196 | __ilogbw = (int)__logbw; |
| 173 | 197 | __c = _SCALBNd(__c, -__ilogbw); |
| ... | ... | @@ -200,7 +224,7 @@ __DEVICE__ double _Complex __divdc3(double __a, double __b, double __c, |
| 200 | 224 | |
| 201 | 225 | __DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) { |
| 202 | 226 | int __ilogbw = 0; |
| 203 | float __logbw = _LOGBf(max(_ABSf(__c), _ABSf(__d))); | |
| 227 | float __logbw = _LOGBf(_fmaxf(_ABSf(__c), _ABSf(__d))); | |
| 204 | 228 | if (_ISFINITEf(__logbw)) { |
| 205 | 229 | __ilogbw = (int)__logbw; |
| 206 | 230 | __c = _SCALBNf(__c, -__ilogbw); |
| ... | ... | @@ -249,6 +273,8 @@ __DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) { |
| 249 | 273 | #undef _ABSf |
| 250 | 274 | #undef _LOGBd |
| 251 | 275 | #undef _LOGBf |
| 276 | #undef _fmaxd | |
| 277 | #undef _fmaxf | |
| 252 | 278 | |
| 253 | 279 | #ifdef __OPENMP_NVPTX__ |
| 254 | 280 | #pragma omp end declare target |
lib/include/__clang_cuda_math.h+5-4| ... | ... | @@ -195,8 +195,8 @@ __DEVICE__ int max(int __a, int __b) { return __nv_max(__a, __b); } |
| 195 | 195 | __DEVICE__ int min(int __a, int __b) { return __nv_min(__a, __b); } |
| 196 | 196 | __DEVICE__ double modf(double __a, double *__b) { return __nv_modf(__a, __b); } |
| 197 | 197 | __DEVICE__ float modff(float __a, float *__b) { return __nv_modff(__a, __b); } |
| 198 | __DEVICE__ double nearbyint(double __a) { return __nv_nearbyint(__a); } | |
| 199 | __DEVICE__ float nearbyintf(float __a) { return __nv_nearbyintf(__a); } | |
| 198 | __DEVICE__ double nearbyint(double __a) { return __builtin_nearbyint(__a); } | |
| 199 | __DEVICE__ float nearbyintf(float __a) { return __builtin_nearbyintf(__a); } | |
| 200 | 200 | __DEVICE__ double nextafter(double __a, double __b) { |
| 201 | 201 | return __nv_nextafter(__a, __b); |
| 202 | 202 | } |
| ... | ... | @@ -249,8 +249,9 @@ __DEVICE__ double rhypot(double __a, double __b) { |
| 249 | 249 | __DEVICE__ float rhypotf(float __a, float __b) { |
| 250 | 250 | return __nv_rhypotf(__a, __b); |
| 251 | 251 | } |
| 252 | __DEVICE__ double rint(double __a) { return __nv_rint(__a); } | |
| 253 | __DEVICE__ float rintf(float __a) { return __nv_rintf(__a); } | |
| 252 | // __nv_rint* in libdevice is buggy and produces incorrect results. | |
| 253 | __DEVICE__ double rint(double __a) { return __builtin_rint(__a); } | |
| 254 | __DEVICE__ float rintf(float __a) { return __builtin_rintf(__a); } | |
| 254 | 255 | __DEVICE__ double rnorm(int __a, const double *__b) { |
| 255 | 256 | return __nv_rnorm(__a, __b); |
| 256 | 257 | } |
lib/include/__clang_cuda_math_forward_declares.h+3| ... | ... | @@ -160,6 +160,9 @@ __DEVICE__ double scalbln(double, long); |
| 160 | 160 | __DEVICE__ float scalbln(float, long); |
| 161 | 161 | __DEVICE__ double scalbn(double, int); |
| 162 | 162 | __DEVICE__ float scalbn(float, int); |
| 163 | #ifdef _MSC_VER | |
| 164 | __DEVICE__ bool signbit(long double); | |
| 165 | #endif | |
| 163 | 166 | __DEVICE__ bool signbit(double); |
| 164 | 167 | __DEVICE__ bool signbit(float); |
| 165 | 168 | __DEVICE__ double sin(double); |
lib/include/__clang_cuda_runtime_wrapper.h+18-10| ... | ... | @@ -377,30 +377,38 @@ __device__ static inline void *malloc(size_t __size) { |
| 377 | 377 | // Out-of-line implementations from __clang_cuda_builtin_vars.h. These need to |
| 378 | 378 | // come after we've pulled in the definition of uint3 and dim3. |
| 379 | 379 | |
| 380 | __device__ inline __cuda_builtin_threadIdx_t::operator dim3() const { | |
| 381 | return dim3(x, y, z); | |
| 382 | } | |
| 383 | ||
| 380 | 384 | __device__ inline __cuda_builtin_threadIdx_t::operator uint3() const { |
| 381 | uint3 ret; | |
| 382 | ret.x = x; | |
| 383 | ret.y = y; | |
| 384 | ret.z = z; | |
| 385 | return ret; | |
| 385 | return {x, y, z}; | |
| 386 | } | |
| 387 | ||
| 388 | __device__ inline __cuda_builtin_blockIdx_t::operator dim3() const { | |
| 389 | return dim3(x, y, z); | |
| 386 | 390 | } |
| 387 | 391 | |
| 388 | 392 | __device__ inline __cuda_builtin_blockIdx_t::operator uint3() const { |
| 389 | uint3 ret; | |
| 390 | ret.x = x; | |
| 391 | ret.y = y; | |
| 392 | ret.z = z; | |
| 393 | return ret; | |
| 393 | return {x, y, z}; | |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | __device__ inline __cuda_builtin_blockDim_t::operator dim3() const { |
| 397 | 397 | return dim3(x, y, z); |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | __device__ inline __cuda_builtin_blockDim_t::operator uint3() const { | |
| 401 | return {x, y, z}; | |
| 402 | } | |
| 403 | ||
| 400 | 404 | __device__ inline __cuda_builtin_gridDim_t::operator dim3() const { |
| 401 | 405 | return dim3(x, y, z); |
| 402 | 406 | } |
| 403 | 407 | |
| 408 | __device__ inline __cuda_builtin_gridDim_t::operator uint3() const { | |
| 409 | return {x, y, z}; | |
| 410 | } | |
| 411 | ||
| 404 | 412 | #include <__clang_cuda_cmath.h> |
| 405 | 413 | #include <__clang_cuda_intrinsics.h> |
| 406 | 414 | #include <__clang_cuda_complex_builtins.h> |
lib/include/__clang_hip_cmath.h created+664| ... | ... | @@ -0,0 +1,664 @@ |
| 1 | /*===---- __clang_hip_cmath.h - HIP cmath decls -----------------------------=== | |
| 2 | * | |
| 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | * See https://llvm.org/LICENSE.txt for license information. | |
| 5 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | * | |
| 7 | *===-----------------------------------------------------------------------=== | |
| 8 | */ | |
| 9 | ||
| 10 | #ifndef __CLANG_HIP_CMATH_H__ | |
| 11 | #define __CLANG_HIP_CMATH_H__ | |
| 12 | ||
| 13 | #if !defined(__HIP__) | |
| 14 | #error "This file is for HIP and OpenMP AMDGCN device compilation only." | |
| 15 | #endif | |
| 16 | ||
| 17 | #if defined(__cplusplus) | |
| 18 | #include <limits> | |
| 19 | #include <type_traits> | |
| 20 | #include <utility> | |
| 21 | #endif | |
| 22 | #include <limits.h> | |
| 23 | #include <stdint.h> | |
| 24 | ||
| 25 | #pragma push_macro("__DEVICE__") | |
| 26 | #define __DEVICE__ static __device__ inline __attribute__((always_inline)) | |
| 27 | ||
| 28 | // Start with functions that cannot be defined by DEF macros below. | |
| 29 | #if defined(__cplusplus) | |
| 30 | __DEVICE__ double abs(double __x) { return ::fabs(__x); } | |
| 31 | __DEVICE__ float abs(float __x) { return ::fabsf(__x); } | |
| 32 | __DEVICE__ long long abs(long long __n) { return ::llabs(__n); } | |
| 33 | __DEVICE__ long abs(long __n) { return ::labs(__n); } | |
| 34 | __DEVICE__ float fma(float __x, float __y, float __z) { | |
| 35 | return ::fmaf(__x, __y, __z); | |
| 36 | } | |
| 37 | __DEVICE__ int fpclassify(float __x) { | |
| 38 | return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, | |
| 39 | FP_ZERO, __x); | |
| 40 | } | |
| 41 | __DEVICE__ int fpclassify(double __x) { | |
| 42 | return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, | |
| 43 | FP_ZERO, __x); | |
| 44 | } | |
| 45 | __DEVICE__ float frexp(float __arg, int *__exp) { | |
| 46 | return ::frexpf(__arg, __exp); | |
| 47 | } | |
| 48 | __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } | |
| 49 | __DEVICE__ bool isfinite(double __x) { return ::__finite(__x); } | |
| 50 | __DEVICE__ bool isgreater(float __x, float __y) { | |
| 51 | return __builtin_isgreater(__x, __y); | |
| 52 | } | |
| 53 | __DEVICE__ bool isgreater(double __x, double __y) { | |
| 54 | return __builtin_isgreater(__x, __y); | |
| 55 | } | |
| 56 | __DEVICE__ bool isgreaterequal(float __x, float __y) { | |
| 57 | return __builtin_isgreaterequal(__x, __y); | |
| 58 | } | |
| 59 | __DEVICE__ bool isgreaterequal(double __x, double __y) { | |
| 60 | return __builtin_isgreaterequal(__x, __y); | |
| 61 | } | |
| 62 | __DEVICE__ bool isinf(float __x) { return ::__isinff(__x); } | |
| 63 | __DEVICE__ bool isinf(double __x) { return ::__isinf(__x); } | |
| 64 | __DEVICE__ bool isless(float __x, float __y) { | |
| 65 | return __builtin_isless(__x, __y); | |
| 66 | } | |
| 67 | __DEVICE__ bool isless(double __x, double __y) { | |
| 68 | return __builtin_isless(__x, __y); | |
| 69 | } | |
| 70 | __DEVICE__ bool islessequal(float __x, float __y) { | |
| 71 | return __builtin_islessequal(__x, __y); | |
| 72 | } | |
| 73 | __DEVICE__ bool islessequal(double __x, double __y) { | |
| 74 | return __builtin_islessequal(__x, __y); | |
| 75 | } | |
| 76 | __DEVICE__ bool islessgreater(float __x, float __y) { | |
| 77 | return __builtin_islessgreater(__x, __y); | |
| 78 | } | |
| 79 | __DEVICE__ bool islessgreater(double __x, double __y) { | |
| 80 | return __builtin_islessgreater(__x, __y); | |
| 81 | } | |
| 82 | __DEVICE__ bool isnan(float __x) { return ::__isnanf(__x); } | |
| 83 | __DEVICE__ bool isnan(double __x) { return ::__isnan(__x); } | |
| 84 | __DEVICE__ bool isnormal(float __x) { return __builtin_isnormal(__x); } | |
| 85 | __DEVICE__ bool isnormal(double __x) { return __builtin_isnormal(__x); } | |
| 86 | __DEVICE__ bool isunordered(float __x, float __y) { | |
| 87 | return __builtin_isunordered(__x, __y); | |
| 88 | } | |
| 89 | __DEVICE__ bool isunordered(double __x, double __y) { | |
| 90 | return __builtin_isunordered(__x, __y); | |
| 91 | } | |
| 92 | __DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); } | |
| 93 | __DEVICE__ float pow(float __base, int __iexp) { | |
| 94 | return ::powif(__base, __iexp); | |
| 95 | } | |
| 96 | __DEVICE__ double pow(double __base, int __iexp) { | |
| 97 | return ::powi(__base, __iexp); | |
| 98 | } | |
| 99 | __DEVICE__ float remquo(float __x, float __y, int *__quo) { | |
| 100 | return ::remquof(__x, __y, __quo); | |
| 101 | } | |
| 102 | __DEVICE__ float scalbln(float __x, long int __n) { | |
| 103 | return ::scalblnf(__x, __n); | |
| 104 | } | |
| 105 | __DEVICE__ bool signbit(float __x) { return ::__signbitf(__x); } | |
| 106 | __DEVICE__ bool signbit(double __x) { return ::__signbit(__x); } | |
| 107 | ||
| 108 | // Notably missing above is nexttoward. We omit it because | |
| 109 | // ocml doesn't provide an implementation, and we don't want to be in the | |
| 110 | // business of implementing tricky libm functions in this header. | |
| 111 | ||
| 112 | // Other functions. | |
| 113 | __DEVICE__ _Float16 fma(_Float16 __x, _Float16 __y, _Float16 __z) { | |
| 114 | return __ocml_fma_f16(__x, __y, __z); | |
| 115 | } | |
| 116 | __DEVICE__ _Float16 pow(_Float16 __base, int __iexp) { | |
| 117 | return __ocml_pown_f16(__base, __iexp); | |
| 118 | } | |
| 119 | ||
| 120 | // BEGIN DEF_FUN and HIP_OVERLOAD | |
| 121 | ||
| 122 | // BEGIN DEF_FUN | |
| 123 | ||
| 124 | #pragma push_macro("__DEF_FUN1") | |
| 125 | #pragma push_macro("__DEF_FUN2") | |
| 126 | #pragma push_macro("__DEF_FUN2_FI") | |
| 127 | ||
| 128 | // Define cmath functions with float argument and returns __retty. | |
| 129 | #define __DEF_FUN1(__retty, __func) \ | |
| 130 | __DEVICE__ \ | |
| 131 | __retty __func(float __x) { return __func##f(__x); } | |
| 132 | ||
| 133 | // Define cmath functions with two float arguments and returns __retty. | |
| 134 | #define __DEF_FUN2(__retty, __func) \ | |
| 135 | __DEVICE__ \ | |
| 136 | __retty __func(float __x, float __y) { return __func##f(__x, __y); } | |
| 137 | ||
| 138 | // Define cmath functions with a float and an int argument and returns __retty. | |
| 139 | #define __DEF_FUN2_FI(__retty, __func) \ | |
| 140 | __DEVICE__ \ | |
| 141 | __retty __func(float __x, int __y) { return __func##f(__x, __y); } | |
| 142 | ||
| 143 | __DEF_FUN1(float, acos) | |
| 144 | __DEF_FUN1(float, acosh) | |
| 145 | __DEF_FUN1(float, asin) | |
| 146 | __DEF_FUN1(float, asinh) | |
| 147 | __DEF_FUN1(float, atan) | |
| 148 | __DEF_FUN2(float, atan2) | |
| 149 | __DEF_FUN1(float, atanh) | |
| 150 | __DEF_FUN1(float, cbrt) | |
| 151 | __DEF_FUN1(float, ceil) | |
| 152 | __DEF_FUN2(float, copysign) | |
| 153 | __DEF_FUN1(float, cos) | |
| 154 | __DEF_FUN1(float, cosh) | |
| 155 | __DEF_FUN1(float, erf) | |
| 156 | __DEF_FUN1(float, erfc) | |
| 157 | __DEF_FUN1(float, exp) | |
| 158 | __DEF_FUN1(float, exp2) | |
| 159 | __DEF_FUN1(float, expm1) | |
| 160 | __DEF_FUN1(float, fabs) | |
| 161 | __DEF_FUN2(float, fdim) | |
| 162 | __DEF_FUN1(float, floor) | |
| 163 | __DEF_FUN2(float, fmax) | |
| 164 | __DEF_FUN2(float, fmin) | |
| 165 | __DEF_FUN2(float, fmod) | |
| 166 | __DEF_FUN2(float, hypot) | |
| 167 | __DEF_FUN1(int, ilogb) | |
| 168 | __DEF_FUN2_FI(float, ldexp) | |
| 169 | __DEF_FUN1(float, lgamma) | |
| 170 | __DEF_FUN1(float, log) | |
| 171 | __DEF_FUN1(float, log10) | |
| 172 | __DEF_FUN1(float, log1p) | |
| 173 | __DEF_FUN1(float, log2) | |
| 174 | __DEF_FUN1(float, logb) | |
| 175 | __DEF_FUN1(long long, llrint) | |
| 176 | __DEF_FUN1(long long, llround) | |
| 177 | __DEF_FUN1(long, lrint) | |
| 178 | __DEF_FUN1(long, lround) | |
| 179 | __DEF_FUN1(float, nearbyint) | |
| 180 | __DEF_FUN2(float, nextafter) | |
| 181 | __DEF_FUN2(float, pow) | |
| 182 | __DEF_FUN2(float, remainder) | |
| 183 | __DEF_FUN1(float, rint) | |
| 184 | __DEF_FUN1(float, round) | |
| 185 | __DEF_FUN2_FI(float, scalbn) | |
| 186 | __DEF_FUN1(float, sin) | |
| 187 | __DEF_FUN1(float, sinh) | |
| 188 | __DEF_FUN1(float, sqrt) | |
| 189 | __DEF_FUN1(float, tan) | |
| 190 | __DEF_FUN1(float, tanh) | |
| 191 | __DEF_FUN1(float, tgamma) | |
| 192 | __DEF_FUN1(float, trunc) | |
| 193 | ||
| 194 | #pragma pop_macro("__DEF_FUN1") | |
| 195 | #pragma pop_macro("__DEF_FUN2") | |
| 196 | #pragma pop_macro("__DEF_FUN2_FI") | |
| 197 | ||
| 198 | // END DEF_FUN | |
| 199 | ||
| 200 | // BEGIN HIP_OVERLOAD | |
| 201 | ||
| 202 | #pragma push_macro("__HIP_OVERLOAD1") | |
| 203 | #pragma push_macro("__HIP_OVERLOAD2") | |
| 204 | ||
| 205 | // __hip_enable_if::type is a type function which returns __T if __B is true. | |
| 206 | template <bool __B, class __T = void> struct __hip_enable_if {}; | |
| 207 | ||
| 208 | template <class __T> struct __hip_enable_if<true, __T> { typedef __T type; }; | |
| 209 | ||
| 210 | // decltype is only available in C++11 and above. | |
| 211 | #if __cplusplus >= 201103L | |
| 212 | // __hip_promote | |
| 213 | namespace __hip { | |
| 214 | ||
| 215 | template <class _Tp> struct __numeric_type { | |
| 216 | static void __test(...); | |
| 217 | static _Float16 __test(_Float16); | |
| 218 | static float __test(float); | |
| 219 | static double __test(char); | |
| 220 | static double __test(int); | |
| 221 | static double __test(unsigned); | |
| 222 | static double __test(long); | |
| 223 | static double __test(unsigned long); | |
| 224 | static double __test(long long); | |
| 225 | static double __test(unsigned long long); | |
| 226 | static double __test(double); | |
| 227 | // No support for long double, use double instead. | |
| 228 | static double __test(long double); | |
| 229 | ||
| 230 | typedef decltype(__test(std::declval<_Tp>())) type; | |
| 231 | static const bool value = !std::is_same<type, void>::value; | |
| 232 | }; | |
| 233 | ||
| 234 | template <> struct __numeric_type<void> { static const bool value = true; }; | |
| 235 | ||
| 236 | template <class _A1, class _A2 = void, class _A3 = void, | |
| 237 | bool = __numeric_type<_A1>::value &&__numeric_type<_A2>::value | |
| 238 | &&__numeric_type<_A3>::value> | |
| 239 | class __promote_imp { | |
| 240 | public: | |
| 241 | static const bool value = false; | |
| 242 | }; | |
| 243 | ||
| 244 | template <class _A1, class _A2, class _A3> | |
| 245 | class __promote_imp<_A1, _A2, _A3, true> { | |
| 246 | private: | |
| 247 | typedef typename __promote_imp<_A1>::type __type1; | |
| 248 | typedef typename __promote_imp<_A2>::type __type2; | |
| 249 | typedef typename __promote_imp<_A3>::type __type3; | |
| 250 | ||
| 251 | public: | |
| 252 | typedef decltype(__type1() + __type2() + __type3()) type; | |
| 253 | static const bool value = true; | |
| 254 | }; | |
| 255 | ||
| 256 | template <class _A1, class _A2> class __promote_imp<_A1, _A2, void, true> { | |
| 257 | private: | |
| 258 | typedef typename __promote_imp<_A1>::type __type1; | |
| 259 | typedef typename __promote_imp<_A2>::type __type2; | |
| 260 | ||
| 261 | public: | |
| 262 | typedef decltype(__type1() + __type2()) type; | |
| 263 | static const bool value = true; | |
| 264 | }; | |
| 265 | ||
| 266 | template <class _A1> class __promote_imp<_A1, void, void, true> { | |
| 267 | public: | |
| 268 | typedef typename __numeric_type<_A1>::type type; | |
| 269 | static const bool value = true; | |
| 270 | }; | |
| 271 | ||
| 272 | template <class _A1, class _A2 = void, class _A3 = void> | |
| 273 | class __promote : public __promote_imp<_A1, _A2, _A3> {}; | |
| 274 | ||
| 275 | } // namespace __hip | |
| 276 | #endif //__cplusplus >= 201103L | |
| 277 | ||
| 278 | // __HIP_OVERLOAD1 is used to resolve function calls with integer argument to | |
| 279 | // avoid compilation error due to ambibuity. e.g. floor(5) is resolved with | |
| 280 | // floor(double). | |
| 281 | #define __HIP_OVERLOAD1(__retty, __fn) \ | |
| 282 | template <typename __T> \ | |
| 283 | __DEVICE__ typename __hip_enable_if<std::numeric_limits<__T>::is_integer, \ | |
| 284 | __retty>::type \ | |
| 285 | __fn(__T __x) { \ | |
| 286 | return ::__fn((double)__x); \ | |
| 287 | } | |
| 288 | ||
| 289 | // __HIP_OVERLOAD2 is used to resolve function calls with mixed float/double | |
| 290 | // or integer argument to avoid compilation error due to ambibuity. e.g. | |
| 291 | // max(5.0f, 6.0) is resolved with max(double, double). | |
| 292 | #if __cplusplus >= 201103L | |
| 293 | #define __HIP_OVERLOAD2(__retty, __fn) \ | |
| 294 | template <typename __T1, typename __T2> \ | |
| 295 | __DEVICE__ typename __hip_enable_if< \ | |
| 296 | std::numeric_limits<__T1>::is_specialized && \ | |
| 297 | std::numeric_limits<__T2>::is_specialized, \ | |
| 298 | typename __hip::__promote<__T1, __T2>::type>::type \ | |
| 299 | __fn(__T1 __x, __T2 __y) { \ | |
| 300 | typedef typename __hip::__promote<__T1, __T2>::type __result_type; \ | |
| 301 | return __fn((__result_type)__x, (__result_type)__y); \ | |
| 302 | } | |
| 303 | #else | |
| 304 | #define __HIP_OVERLOAD2(__retty, __fn) \ | |
| 305 | template <typename __T1, typename __T2> \ | |
| 306 | __DEVICE__ \ | |
| 307 | typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && \ | |
| 308 | std::numeric_limits<__T2>::is_specialized, \ | |
| 309 | __retty>::type \ | |
| 310 | __fn(__T1 __x, __T2 __y) { \ | |
| 311 | return __fn((double)__x, (double)__y); \ | |
| 312 | } | |
| 313 | #endif | |
| 314 | ||
| 315 | __HIP_OVERLOAD1(double, abs) | |
| 316 | __HIP_OVERLOAD1(double, acos) | |
| 317 | __HIP_OVERLOAD1(double, acosh) | |
| 318 | __HIP_OVERLOAD1(double, asin) | |
| 319 | __HIP_OVERLOAD1(double, asinh) | |
| 320 | __HIP_OVERLOAD1(double, atan) | |
| 321 | __HIP_OVERLOAD2(double, atan2) | |
| 322 | __HIP_OVERLOAD1(double, atanh) | |
| 323 | __HIP_OVERLOAD1(double, cbrt) | |
| 324 | __HIP_OVERLOAD1(double, ceil) | |
| 325 | __HIP_OVERLOAD2(double, copysign) | |
| 326 | __HIP_OVERLOAD1(double, cos) | |
| 327 | __HIP_OVERLOAD1(double, cosh) | |
| 328 | __HIP_OVERLOAD1(double, erf) | |
| 329 | __HIP_OVERLOAD1(double, erfc) | |
| 330 | __HIP_OVERLOAD1(double, exp) | |
| 331 | __HIP_OVERLOAD1(double, exp2) | |
| 332 | __HIP_OVERLOAD1(double, expm1) | |
| 333 | __HIP_OVERLOAD1(double, fabs) | |
| 334 | __HIP_OVERLOAD2(double, fdim) | |
| 335 | __HIP_OVERLOAD1(double, floor) | |
| 336 | __HIP_OVERLOAD2(double, fmax) | |
| 337 | __HIP_OVERLOAD2(double, fmin) | |
| 338 | __HIP_OVERLOAD2(double, fmod) | |
| 339 | __HIP_OVERLOAD1(int, fpclassify) | |
| 340 | __HIP_OVERLOAD2(double, hypot) | |
| 341 | __HIP_OVERLOAD1(int, ilogb) | |
| 342 | __HIP_OVERLOAD1(bool, isfinite) | |
| 343 | __HIP_OVERLOAD2(bool, isgreater) | |
| 344 | __HIP_OVERLOAD2(bool, isgreaterequal) | |
| 345 | __HIP_OVERLOAD1(bool, isinf) | |
| 346 | __HIP_OVERLOAD2(bool, isless) | |
| 347 | __HIP_OVERLOAD2(bool, islessequal) | |
| 348 | __HIP_OVERLOAD2(bool, islessgreater) | |
| 349 | __HIP_OVERLOAD1(bool, isnan) | |
| 350 | __HIP_OVERLOAD1(bool, isnormal) | |
| 351 | __HIP_OVERLOAD2(bool, isunordered) | |
| 352 | __HIP_OVERLOAD1(double, lgamma) | |
| 353 | __HIP_OVERLOAD1(double, log) | |
| 354 | __HIP_OVERLOAD1(double, log10) | |
| 355 | __HIP_OVERLOAD1(double, log1p) | |
| 356 | __HIP_OVERLOAD1(double, log2) | |
| 357 | __HIP_OVERLOAD1(double, logb) | |
| 358 | __HIP_OVERLOAD1(long long, llrint) | |
| 359 | __HIP_OVERLOAD1(long long, llround) | |
| 360 | __HIP_OVERLOAD1(long, lrint) | |
| 361 | __HIP_OVERLOAD1(long, lround) | |
| 362 | __HIP_OVERLOAD1(double, nearbyint) | |
| 363 | __HIP_OVERLOAD2(double, nextafter) | |
| 364 | __HIP_OVERLOAD2(double, pow) | |
| 365 | __HIP_OVERLOAD2(double, remainder) | |
| 366 | __HIP_OVERLOAD1(double, rint) | |
| 367 | __HIP_OVERLOAD1(double, round) | |
| 368 | __HIP_OVERLOAD1(bool, signbit) | |
| 369 | __HIP_OVERLOAD1(double, sin) | |
| 370 | __HIP_OVERLOAD1(double, sinh) | |
| 371 | __HIP_OVERLOAD1(double, sqrt) | |
| 372 | __HIP_OVERLOAD1(double, tan) | |
| 373 | __HIP_OVERLOAD1(double, tanh) | |
| 374 | __HIP_OVERLOAD1(double, tgamma) | |
| 375 | __HIP_OVERLOAD1(double, trunc) | |
| 376 | ||
| 377 | // Overload these but don't add them to std, they are not part of cmath. | |
| 378 | __HIP_OVERLOAD2(double, max) | |
| 379 | __HIP_OVERLOAD2(double, min) | |
| 380 | ||
| 381 | // Additional Overloads that don't quite match HIP_OVERLOAD. | |
| 382 | #if __cplusplus >= 201103L | |
| 383 | template <typename __T1, typename __T2, typename __T3> | |
| 384 | __DEVICE__ typename __hip_enable_if< | |
| 385 | std::numeric_limits<__T1>::is_specialized && | |
| 386 | std::numeric_limits<__T2>::is_specialized && | |
| 387 | std::numeric_limits<__T3>::is_specialized, | |
| 388 | typename __hip::__promote<__T1, __T2, __T3>::type>::type | |
| 389 | fma(__T1 __x, __T2 __y, __T3 __z) { | |
| 390 | typedef typename __hip::__promote<__T1, __T2, __T3>::type __result_type; | |
| 391 | return ::fma((__result_type)__x, (__result_type)__y, (__result_type)__z); | |
| 392 | } | |
| 393 | #else | |
| 394 | template <typename __T1, typename __T2, typename __T3> | |
| 395 | __DEVICE__ | |
| 396 | typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && | |
| 397 | std::numeric_limits<__T2>::is_specialized && | |
| 398 | std::numeric_limits<__T3>::is_specialized, | |
| 399 | double>::type | |
| 400 | fma(__T1 __x, __T2 __y, __T3 __z) { | |
| 401 | return ::fma((double)__x, (double)__y, (double)__z); | |
| 402 | } | |
| 403 | #endif | |
| 404 | ||
| 405 | template <typename __T> | |
| 406 | __DEVICE__ | |
| 407 | typename __hip_enable_if<std::numeric_limits<__T>::is_integer, double>::type | |
| 408 | frexp(__T __x, int *__exp) { | |
| 409 | return ::frexp((double)__x, __exp); | |
| 410 | } | |
| 411 | ||
| 412 | template <typename __T> | |
| 413 | __DEVICE__ | |
| 414 | typename __hip_enable_if<std::numeric_limits<__T>::is_integer, double>::type | |
| 415 | ldexp(__T __x, int __exp) { | |
| 416 | return ::ldexp((double)__x, __exp); | |
| 417 | } | |
| 418 | ||
| 419 | template <typename __T> | |
| 420 | __DEVICE__ | |
| 421 | typename __hip_enable_if<std::numeric_limits<__T>::is_integer, double>::type | |
| 422 | modf(__T __x, double *__exp) { | |
| 423 | return ::modf((double)__x, __exp); | |
| 424 | } | |
| 425 | ||
| 426 | #if __cplusplus >= 201103L | |
| 427 | template <typename __T1, typename __T2> | |
| 428 | __DEVICE__ | |
| 429 | typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && | |
| 430 | std::numeric_limits<__T2>::is_specialized, | |
| 431 | typename __hip::__promote<__T1, __T2>::type>::type | |
| 432 | remquo(__T1 __x, __T2 __y, int *__quo) { | |
| 433 | typedef typename __hip::__promote<__T1, __T2>::type __result_type; | |
| 434 | return ::remquo((__result_type)__x, (__result_type)__y, __quo); | |
| 435 | } | |
| 436 | #else | |
| 437 | template <typename __T1, typename __T2> | |
| 438 | __DEVICE__ | |
| 439 | typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && | |
| 440 | std::numeric_limits<__T2>::is_specialized, | |
| 441 | double>::type | |
| 442 | remquo(__T1 __x, __T2 __y, int *__quo) { | |
| 443 | return ::remquo((double)__x, (double)__y, __quo); | |
| 444 | } | |
| 445 | #endif | |
| 446 | ||
| 447 | template <typename __T> | |
| 448 | __DEVICE__ | |
| 449 | typename __hip_enable_if<std::numeric_limits<__T>::is_integer, double>::type | |
| 450 | scalbln(__T __x, long int __exp) { | |
| 451 | return ::scalbln((double)__x, __exp); | |
| 452 | } | |
| 453 | ||
| 454 | template <typename __T> | |
| 455 | __DEVICE__ | |
| 456 | typename __hip_enable_if<std::numeric_limits<__T>::is_integer, double>::type | |
| 457 | scalbn(__T __x, int __exp) { | |
| 458 | return ::scalbn((double)__x, __exp); | |
| 459 | } | |
| 460 | ||
| 461 | #pragma pop_macro("__HIP_OVERLOAD1") | |
| 462 | #pragma pop_macro("__HIP_OVERLOAD2") | |
| 463 | ||
| 464 | // END HIP_OVERLOAD | |
| 465 | ||
| 466 | // END DEF_FUN and HIP_OVERLOAD | |
| 467 | ||
| 468 | #endif // defined(__cplusplus) | |
| 469 | ||
| 470 | // Define these overloads inside the namespace our standard library uses. | |
| 471 | #ifdef _LIBCPP_BEGIN_NAMESPACE_STD | |
| 472 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 473 | #else | |
| 474 | namespace std { | |
| 475 | #ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
| 476 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
| 477 | #endif | |
| 478 | #endif | |
| 479 | ||
| 480 | // Pull the new overloads we defined above into namespace std. | |
| 481 | // using ::abs; - This may be considered for C++. | |
| 482 | using ::acos; | |
| 483 | using ::acosh; | |
| 484 | using ::asin; | |
| 485 | using ::asinh; | |
| 486 | using ::atan; | |
| 487 | using ::atan2; | |
| 488 | using ::atanh; | |
| 489 | using ::cbrt; | |
| 490 | using ::ceil; | |
| 491 | using ::copysign; | |
| 492 | using ::cos; | |
| 493 | using ::cosh; | |
| 494 | using ::erf; | |
| 495 | using ::erfc; | |
| 496 | using ::exp; | |
| 497 | using ::exp2; | |
| 498 | using ::expm1; | |
| 499 | using ::fabs; | |
| 500 | using ::fdim; | |
| 501 | using ::floor; | |
| 502 | using ::fma; | |
| 503 | using ::fmax; | |
| 504 | using ::fmin; | |
| 505 | using ::fmod; | |
| 506 | using ::fpclassify; | |
| 507 | using ::frexp; | |
| 508 | using ::hypot; | |
| 509 | using ::ilogb; | |
| 510 | using ::isfinite; | |
| 511 | using ::isgreater; | |
| 512 | using ::isgreaterequal; | |
| 513 | using ::isless; | |
| 514 | using ::islessequal; | |
| 515 | using ::islessgreater; | |
| 516 | using ::isnormal; | |
| 517 | using ::isunordered; | |
| 518 | using ::ldexp; | |
| 519 | using ::lgamma; | |
| 520 | using ::llrint; | |
| 521 | using ::llround; | |
| 522 | using ::log; | |
| 523 | using ::log10; | |
| 524 | using ::log1p; | |
| 525 | using ::log2; | |
| 526 | using ::logb; | |
| 527 | using ::lrint; | |
| 528 | using ::lround; | |
| 529 | using ::modf; | |
| 530 | // using ::nan; - This may be considered for C++. | |
| 531 | // using ::nanf; - This may be considered for C++. | |
| 532 | // using ::nanl; - This is not yet defined. | |
| 533 | using ::nearbyint; | |
| 534 | using ::nextafter; | |
| 535 | // using ::nexttoward; - Omit this since we do not have a definition. | |
| 536 | using ::pow; | |
| 537 | using ::remainder; | |
| 538 | using ::remquo; | |
| 539 | using ::rint; | |
| 540 | using ::round; | |
| 541 | using ::scalbln; | |
| 542 | using ::scalbn; | |
| 543 | using ::signbit; | |
| 544 | using ::sin; | |
| 545 | using ::sinh; | |
| 546 | using ::sqrt; | |
| 547 | using ::tan; | |
| 548 | using ::tanh; | |
| 549 | using ::tgamma; | |
| 550 | using ::trunc; | |
| 551 | ||
| 552 | // Well this is fun: We need to pull these symbols in for libc++, but we can't | |
| 553 | // pull them in with libstdc++, because its ::isinf and ::isnan are different | |
| 554 | // than its std::isinf and std::isnan. | |
| 555 | #ifndef __GLIBCXX__ | |
| 556 | using ::isinf; | |
| 557 | using ::isnan; | |
| 558 | #endif | |
| 559 | ||
| 560 | // Finally, pull the "foobarf" functions that HIP defines into std. | |
| 561 | using ::acosf; | |
| 562 | using ::acoshf; | |
| 563 | using ::asinf; | |
| 564 | using ::asinhf; | |
| 565 | using ::atan2f; | |
| 566 | using ::atanf; | |
| 567 | using ::atanhf; | |
| 568 | using ::cbrtf; | |
| 569 | using ::ceilf; | |
| 570 | using ::copysignf; | |
| 571 | using ::cosf; | |
| 572 | using ::coshf; | |
| 573 | using ::erfcf; | |
| 574 | using ::erff; | |
| 575 | using ::exp2f; | |
| 576 | using ::expf; | |
| 577 | using ::expm1f; | |
| 578 | using ::fabsf; | |
| 579 | using ::fdimf; | |
| 580 | using ::floorf; | |
| 581 | using ::fmaf; | |
| 582 | using ::fmaxf; | |
| 583 | using ::fminf; | |
| 584 | using ::fmodf; | |
| 585 | using ::frexpf; | |
| 586 | using ::hypotf; | |
| 587 | using ::ilogbf; | |
| 588 | using ::ldexpf; | |
| 589 | using ::lgammaf; | |
| 590 | using ::llrintf; | |
| 591 | using ::llroundf; | |
| 592 | using ::log10f; | |
| 593 | using ::log1pf; | |
| 594 | using ::log2f; | |
| 595 | using ::logbf; | |
| 596 | using ::logf; | |
| 597 | using ::lrintf; | |
| 598 | using ::lroundf; | |
| 599 | using ::modff; | |
| 600 | using ::nearbyintf; | |
| 601 | using ::nextafterf; | |
| 602 | // using ::nexttowardf; - Omit this since we do not have a definition. | |
| 603 | using ::powf; | |
| 604 | using ::remainderf; | |
| 605 | using ::remquof; | |
| 606 | using ::rintf; | |
| 607 | using ::roundf; | |
| 608 | using ::scalblnf; | |
| 609 | using ::scalbnf; | |
| 610 | using ::sinf; | |
| 611 | using ::sinhf; | |
| 612 | using ::sqrtf; | |
| 613 | using ::tanf; | |
| 614 | using ::tanhf; | |
| 615 | using ::tgammaf; | |
| 616 | using ::truncf; | |
| 617 | ||
| 618 | #ifdef _LIBCPP_END_NAMESPACE_STD | |
| 619 | _LIBCPP_END_NAMESPACE_STD | |
| 620 | #else | |
| 621 | #ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
| 622 | _GLIBCXX_END_NAMESPACE_VERSION | |
| 623 | #endif | |
| 624 | } // namespace std | |
| 625 | #endif | |
| 626 | ||
| 627 | // Define device-side math functions from <ymath.h> on MSVC. | |
| 628 | #if defined(_MSC_VER) | |
| 629 | ||
| 630 | // Before VS2019, `<ymath.h>` is also included in `<limits>` and other headers. | |
| 631 | // But, from VS2019, it's only included in `<complex>`. Need to include | |
| 632 | // `<ymath.h>` here to ensure C functions declared there won't be markded as | |
| 633 | // `__host__` and `__device__` through `<complex>` wrapper. | |
| 634 | #include <ymath.h> | |
| 635 | ||
| 636 | #if defined(__cplusplus) | |
| 637 | extern "C" { | |
| 638 | #endif // defined(__cplusplus) | |
| 639 | __DEVICE__ __attribute__((overloadable)) double _Cosh(double x, double y) { | |
| 640 | return cosh(x) * y; | |
| 641 | } | |
| 642 | __DEVICE__ __attribute__((overloadable)) float _FCosh(float x, float y) { | |
| 643 | return coshf(x) * y; | |
| 644 | } | |
| 645 | __DEVICE__ __attribute__((overloadable)) short _Dtest(double *p) { | |
| 646 | return fpclassify(*p); | |
| 647 | } | |
| 648 | __DEVICE__ __attribute__((overloadable)) short _FDtest(float *p) { | |
| 649 | return fpclassify(*p); | |
| 650 | } | |
| 651 | __DEVICE__ __attribute__((overloadable)) double _Sinh(double x, double y) { | |
| 652 | return sinh(x) * y; | |
| 653 | } | |
| 654 | __DEVICE__ __attribute__((overloadable)) float _FSinh(float x, float y) { | |
| 655 | return sinhf(x) * y; | |
| 656 | } | |
| 657 | #if defined(__cplusplus) | |
| 658 | } | |
| 659 | #endif // defined(__cplusplus) | |
| 660 | #endif // defined(_MSC_VER) | |
| 661 | ||
| 662 | #pragma pop_macro("__DEVICE__") | |
| 663 | ||
| 664 | #endif // __CLANG_HIP_CMATH_H__ |
lib/include/__clang_hip_libdevice_declares.h+17-9| ... | ... | @@ -10,7 +10,9 @@ |
| 10 | 10 | #ifndef __CLANG_HIP_LIBDEVICE_DECLARES_H__ |
| 11 | 11 | #define __CLANG_HIP_LIBDEVICE_DECLARES_H__ |
| 12 | 12 | |
| 13 | #ifdef __cplusplus | |
| 13 | 14 | extern "C" { |
| 15 | #endif | |
| 14 | 16 | |
| 15 | 17 | // BEGIN FLOAT |
| 16 | 18 | __device__ __attribute__((const)) float __ocml_acos_f32(float); |
| ... | ... | @@ -78,6 +80,7 @@ __device__ __attribute__((const)) float __ocml_len4_f32(float, float, float, |
| 78 | 80 | __device__ __attribute__((pure)) float __ocml_ncdf_f32(float); |
| 79 | 81 | __device__ __attribute__((pure)) float __ocml_ncdfinv_f32(float); |
| 80 | 82 | __device__ __attribute__((pure)) float __ocml_pow_f32(float, float); |
| 83 | __device__ __attribute__((pure)) float __ocml_pown_f32(float, int); | |
| 81 | 84 | __device__ __attribute__((pure)) float __ocml_rcbrt_f32(float); |
| 82 | 85 | __device__ __attribute__((const)) float __ocml_remainder_f32(float, float); |
| 83 | 86 | __device__ float __ocml_remquo_f32(float, float, |
| ... | ... | @@ -126,10 +129,10 @@ __device__ __attribute__((const)) float __ocml_div_rte_f32(float, float); |
| 126 | 129 | __device__ __attribute__((const)) float __ocml_div_rtn_f32(float, float); |
| 127 | 130 | __device__ __attribute__((const)) float __ocml_div_rtp_f32(float, float); |
| 128 | 131 | __device__ __attribute__((const)) float __ocml_div_rtz_f32(float, float); |
| 129 | __device__ __attribute__((const)) float __ocml_sqrt_rte_f32(float, float); | |
| 130 | __device__ __attribute__((const)) float __ocml_sqrt_rtn_f32(float, float); | |
| 131 | __device__ __attribute__((const)) float __ocml_sqrt_rtp_f32(float, float); | |
| 132 | __device__ __attribute__((const)) float __ocml_sqrt_rtz_f32(float, float); | |
| 132 | __device__ __attribute__((const)) float __ocml_sqrt_rte_f32(float); | |
| 133 | __device__ __attribute__((const)) float __ocml_sqrt_rtn_f32(float); | |
| 134 | __device__ __attribute__((const)) float __ocml_sqrt_rtp_f32(float); | |
| 135 | __device__ __attribute__((const)) float __ocml_sqrt_rtz_f32(float); | |
| 133 | 136 | __device__ __attribute__((const)) float __ocml_fma_rte_f32(float, float, float); |
| 134 | 137 | __device__ __attribute__((const)) float __ocml_fma_rtn_f32(float, float, float); |
| 135 | 138 | __device__ __attribute__((const)) float __ocml_fma_rtp_f32(float, float, float); |
| ... | ... | @@ -205,6 +208,7 @@ __device__ __attribute__((const)) double __ocml_len4_f64(double, double, double, |
| 205 | 208 | __device__ __attribute__((pure)) double __ocml_ncdf_f64(double); |
| 206 | 209 | __device__ __attribute__((pure)) double __ocml_ncdfinv_f64(double); |
| 207 | 210 | __device__ __attribute__((pure)) double __ocml_pow_f64(double, double); |
| 211 | __device__ __attribute__((pure)) double __ocml_pown_f64(double, int); | |
| 208 | 212 | __device__ __attribute__((pure)) double __ocml_rcbrt_f64(double); |
| 209 | 213 | __device__ __attribute__((const)) double __ocml_remainder_f64(double, double); |
| 210 | 214 | __device__ double __ocml_remquo_f64(double, double, |
| ... | ... | @@ -252,10 +256,10 @@ __device__ __attribute__((const)) double __ocml_div_rte_f64(double, double); |
| 252 | 256 | __device__ __attribute__((const)) double __ocml_div_rtn_f64(double, double); |
| 253 | 257 | __device__ __attribute__((const)) double __ocml_div_rtp_f64(double, double); |
| 254 | 258 | __device__ __attribute__((const)) double __ocml_div_rtz_f64(double, double); |
| 255 | __device__ __attribute__((const)) double __ocml_sqrt_rte_f64(double, double); | |
| 256 | __device__ __attribute__((const)) double __ocml_sqrt_rtn_f64(double, double); | |
| 257 | __device__ __attribute__((const)) double __ocml_sqrt_rtp_f64(double, double); | |
| 258 | __device__ __attribute__((const)) double __ocml_sqrt_rtz_f64(double, double); | |
| 259 | __device__ __attribute__((const)) double __ocml_sqrt_rte_f64(double); | |
| 260 | __device__ __attribute__((const)) double __ocml_sqrt_rtn_f64(double); | |
| 261 | __device__ __attribute__((const)) double __ocml_sqrt_rtp_f64(double); | |
| 262 | __device__ __attribute__((const)) double __ocml_sqrt_rtz_f64(double); | |
| 259 | 263 | __device__ __attribute__((const)) double __ocml_fma_rte_f64(double, double, |
| 260 | 264 | double); |
| 261 | 265 | __device__ __attribute__((const)) double __ocml_fma_rtn_f64(double, double, |
| ... | ... | @@ -290,6 +294,7 @@ __device__ __attribute__((const)) _Float16 __ocml_rsqrt_f16(_Float16); |
| 290 | 294 | __device__ _Float16 __ocml_sin_f16(_Float16); |
| 291 | 295 | __device__ __attribute__((const)) _Float16 __ocml_sqrt_f16(_Float16); |
| 292 | 296 | __device__ __attribute__((const)) _Float16 __ocml_trunc_f16(_Float16); |
| 297 | __device__ __attribute__((pure)) _Float16 __ocml_pown_f16(_Float16, int); | |
| 293 | 298 | |
| 294 | 299 | typedef _Float16 __2f16 __attribute__((ext_vector_type(2))); |
| 295 | 300 | typedef short __2i16 __attribute__((ext_vector_type(2))); |
| ... | ... | @@ -313,14 +318,17 @@ __device__ __attribute__((pure)) __2f16 __ocml_log2_2f16(__2f16); |
| 313 | 318 | __device__ inline __2f16 |
| 314 | 319 | __llvm_amdgcn_rcp_2f16(__2f16 __x) // Not currently exposed by ROCDL. |
| 315 | 320 | { |
| 316 | return __2f16{__llvm_amdgcn_rcp_f16(__x.x), __llvm_amdgcn_rcp_f16(__x.y)}; | |
| 321 | return (__2f16)(__llvm_amdgcn_rcp_f16(__x.x), __llvm_amdgcn_rcp_f16(__x.y)); | |
| 317 | 322 | } |
| 318 | 323 | __device__ __attribute__((const)) __2f16 __ocml_rint_2f16(__2f16); |
| 319 | 324 | __device__ __attribute__((const)) __2f16 __ocml_rsqrt_2f16(__2f16); |
| 320 | 325 | __device__ __2f16 __ocml_sin_2f16(__2f16); |
| 321 | 326 | __device__ __attribute__((const)) __2f16 __ocml_sqrt_2f16(__2f16); |
| 322 | 327 | __device__ __attribute__((const)) __2f16 __ocml_trunc_2f16(__2f16); |
| 328 | __device__ __attribute__((const)) __2f16 __ocml_pown_2f16(__2f16, __2i16); | |
| 323 | 329 | |
| 330 | #ifdef __cplusplus | |
| 324 | 331 | } // extern "C" |
| 332 | #endif | |
| 325 | 333 | |
| 326 | 334 | #endif // __CLANG_HIP_LIBDEVICE_DECLARES_H__ |
lib/include/__clang_hip_math.h+619-529| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*===---- __clang_hip_math.h - HIP math decls -------------------------------=== | |
| 1 | /*===---- __clang_hip_math.h - Device-side HIP math support ----------------=== | |
| 2 | 2 | * |
| 3 | 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | 4 | * See https://llvm.org/LICENSE.txt for license information. |
| ... | ... | @@ -6,24 +6,57 @@ |
| 6 | 6 | * |
| 7 | 7 | *===-----------------------------------------------------------------------=== |
| 8 | 8 | */ |
| 9 | ||
| 10 | 9 | #ifndef __CLANG_HIP_MATH_H__ |
| 11 | 10 | #define __CLANG_HIP_MATH_H__ |
| 12 | 11 | |
| 12 | #if !defined(__HIP__) | |
| 13 | #error "This file is for HIP and OpenMP AMDGCN device compilation only." | |
| 14 | #endif | |
| 15 | ||
| 16 | #if defined(__cplusplus) | |
| 13 | 17 | #include <algorithm> |
| 18 | #endif | |
| 14 | 19 | #include <limits.h> |
| 15 | #include <limits> | |
| 16 | 20 | #include <stdint.h> |
| 17 | 21 | |
| 18 | 22 | #pragma push_macro("__DEVICE__") |
| 19 | #pragma push_macro("__RETURN_TYPE") | |
| 23 | #define __DEVICE__ static __device__ inline __attribute__((always_inline)) | |
| 20 | 24 | |
| 21 | // to be consistent with __clang_cuda_math_forward_declares | |
| 22 | #define __DEVICE__ static __device__ | |
| 25 | // A few functions return bool type starting only in C++11. | |
| 26 | #pragma push_macro("__RETURN_TYPE") | |
| 27 | #if defined(__cplusplus) | |
| 23 | 28 | #define __RETURN_TYPE bool |
| 29 | #else | |
| 30 | #define __RETURN_TYPE int | |
| 31 | #endif | |
| 32 | ||
| 33 | #if defined (__cplusplus) && __cplusplus < 201103L | |
| 34 | // emulate static_assert on type sizes | |
| 35 | template<bool> | |
| 36 | struct __compare_result{}; | |
| 37 | template<> | |
| 38 | struct __compare_result<true> { | |
| 39 | static const bool valid; | |
| 40 | }; | |
| 41 | ||
| 42 | __DEVICE__ | |
| 43 | void __suppress_unused_warning(bool b){}; | |
| 44 | template <unsigned int S, unsigned int T> | |
| 45 | __DEVICE__ void __static_assert_equal_size() { | |
| 46 | __suppress_unused_warning(__compare_result<S == T>::valid); | |
| 47 | } | |
| 48 | ||
| 49 | #define __static_assert_type_size_equal(A, B) \ | |
| 50 | __static_assert_equal_size<A,B>() | |
| 51 | ||
| 52 | #else | |
| 53 | #define __static_assert_type_size_equal(A,B) \ | |
| 54 | static_assert((A) == (B), "") | |
| 55 | ||
| 56 | #endif | |
| 24 | 57 | |
| 25 | 58 | __DEVICE__ |
| 26 | inline uint64_t __make_mantissa_base8(const char *__tagp) { | |
| 59 | uint64_t __make_mantissa_base8(const char *__tagp) { | |
| 27 | 60 | uint64_t __r = 0; |
| 28 | 61 | while (__tagp) { |
| 29 | 62 | char __tmp = *__tagp; |
| ... | ... | @@ -40,7 +73,7 @@ inline uint64_t __make_mantissa_base8(const char *__tagp) { |
| 40 | 73 | } |
| 41 | 74 | |
| 42 | 75 | __DEVICE__ |
| 43 | inline uint64_t __make_mantissa_base10(const char *__tagp) { | |
| 76 | uint64_t __make_mantissa_base10(const char *__tagp) { | |
| 44 | 77 | uint64_t __r = 0; |
| 45 | 78 | while (__tagp) { |
| 46 | 79 | char __tmp = *__tagp; |
| ... | ... | @@ -57,7 +90,7 @@ inline uint64_t __make_mantissa_base10(const char *__tagp) { |
| 57 | 90 | } |
| 58 | 91 | |
| 59 | 92 | __DEVICE__ |
| 60 | inline uint64_t __make_mantissa_base16(const char *__tagp) { | |
| 93 | uint64_t __make_mantissa_base16(const char *__tagp) { | |
| 61 | 94 | uint64_t __r = 0; |
| 62 | 95 | while (__tagp) { |
| 63 | 96 | char __tmp = *__tagp; |
| ... | ... | @@ -78,7 +111,7 @@ inline uint64_t __make_mantissa_base16(const char *__tagp) { |
| 78 | 111 | } |
| 79 | 112 | |
| 80 | 113 | __DEVICE__ |
| 81 | inline uint64_t __make_mantissa(const char *__tagp) { | |
| 114 | uint64_t __make_mantissa(const char *__tagp) { | |
| 82 | 115 | if (!__tagp) |
| 83 | 116 | return 0u; |
| 84 | 117 | |
| ... | ... | @@ -95,78 +128,124 @@ inline uint64_t __make_mantissa(const char *__tagp) { |
| 95 | 128 | } |
| 96 | 129 | |
| 97 | 130 | // BEGIN FLOAT |
| 131 | #if defined(__cplusplus) | |
| 98 | 132 | __DEVICE__ |
| 99 | inline float abs(float __x) { return __ocml_fabs_f32(__x); } | |
| 133 | int abs(int __x) { | |
| 134 | int __sgn = __x >> (sizeof(int) * CHAR_BIT - 1); | |
| 135 | return (__x ^ __sgn) - __sgn; | |
| 136 | } | |
| 100 | 137 | __DEVICE__ |
| 101 | inline float acosf(float __x) { return __ocml_acos_f32(__x); } | |
| 138 | long labs(long __x) { | |
| 139 | long __sgn = __x >> (sizeof(long) * CHAR_BIT - 1); | |
| 140 | return (__x ^ __sgn) - __sgn; | |
| 141 | } | |
| 102 | 142 | __DEVICE__ |
| 103 | inline float acoshf(float __x) { return __ocml_acosh_f32(__x); } | |
| 143 | long long llabs(long long __x) { | |
| 144 | long long __sgn = __x >> (sizeof(long long) * CHAR_BIT - 1); | |
| 145 | return (__x ^ __sgn) - __sgn; | |
| 146 | } | |
| 147 | #endif | |
| 148 | ||
| 104 | 149 | __DEVICE__ |
| 105 | inline float asinf(float __x) { return __ocml_asin_f32(__x); } | |
| 150 | float acosf(float __x) { return __ocml_acos_f32(__x); } | |
| 151 | ||
| 106 | 152 | __DEVICE__ |
| 107 | inline float asinhf(float __x) { return __ocml_asinh_f32(__x); } | |
| 153 | float acoshf(float __x) { return __ocml_acosh_f32(__x); } | |
| 154 | ||
| 108 | 155 | __DEVICE__ |
| 109 | inline float atan2f(float __x, float __y) { return __ocml_atan2_f32(__x, __y); } | |
| 156 | float asinf(float __x) { return __ocml_asin_f32(__x); } | |
| 157 | ||
| 110 | 158 | __DEVICE__ |
| 111 | inline float atanf(float __x) { return __ocml_atan_f32(__x); } | |
| 159 | float asinhf(float __x) { return __ocml_asinh_f32(__x); } | |
| 160 | ||
| 112 | 161 | __DEVICE__ |
| 113 | inline float atanhf(float __x) { return __ocml_atanh_f32(__x); } | |
| 162 | float atan2f(float __x, float __y) { return __ocml_atan2_f32(__x, __y); } | |
| 163 | ||
| 114 | 164 | __DEVICE__ |
| 115 | inline float cbrtf(float __x) { return __ocml_cbrt_f32(__x); } | |
| 165 | float atanf(float __x) { return __ocml_atan_f32(__x); } | |
| 166 | ||
| 116 | 167 | __DEVICE__ |
| 117 | inline float ceilf(float __x) { return __ocml_ceil_f32(__x); } | |
| 168 | float atanhf(float __x) { return __ocml_atanh_f32(__x); } | |
| 169 | ||
| 118 | 170 | __DEVICE__ |
| 119 | inline float copysignf(float __x, float __y) { | |
| 120 | return __ocml_copysign_f32(__x, __y); | |
| 121 | } | |
| 171 | float cbrtf(float __x) { return __ocml_cbrt_f32(__x); } | |
| 172 | ||
| 122 | 173 | __DEVICE__ |
| 123 | inline float cosf(float __x) { return __ocml_cos_f32(__x); } | |
| 174 | float ceilf(float __x) { return __ocml_ceil_f32(__x); } | |
| 175 | ||
| 124 | 176 | __DEVICE__ |
| 125 | inline float coshf(float __x) { return __ocml_cosh_f32(__x); } | |
| 177 | float copysignf(float __x, float __y) { return __ocml_copysign_f32(__x, __y); } | |
| 178 | ||
| 126 | 179 | __DEVICE__ |
| 127 | inline float cospif(float __x) { return __ocml_cospi_f32(__x); } | |
| 180 | float cosf(float __x) { return __ocml_cos_f32(__x); } | |
| 181 | ||
| 128 | 182 | __DEVICE__ |
| 129 | inline float cyl_bessel_i0f(float __x) { return __ocml_i0_f32(__x); } | |
| 183 | float coshf(float __x) { return __ocml_cosh_f32(__x); } | |
| 184 | ||
| 130 | 185 | __DEVICE__ |
| 131 | inline float cyl_bessel_i1f(float __x) { return __ocml_i1_f32(__x); } | |
| 186 | float cospif(float __x) { return __ocml_cospi_f32(__x); } | |
| 187 | ||
| 132 | 188 | __DEVICE__ |
| 133 | inline float erfcf(float __x) { return __ocml_erfc_f32(__x); } | |
| 189 | float cyl_bessel_i0f(float __x) { return __ocml_i0_f32(__x); } | |
| 190 | ||
| 134 | 191 | __DEVICE__ |
| 135 | inline float erfcinvf(float __x) { return __ocml_erfcinv_f32(__x); } | |
| 192 | float cyl_bessel_i1f(float __x) { return __ocml_i1_f32(__x); } | |
| 193 | ||
| 136 | 194 | __DEVICE__ |
| 137 | inline float erfcxf(float __x) { return __ocml_erfcx_f32(__x); } | |
| 195 | float erfcf(float __x) { return __ocml_erfc_f32(__x); } | |
| 196 | ||
| 138 | 197 | __DEVICE__ |
| 139 | inline float erff(float __x) { return __ocml_erf_f32(__x); } | |
| 198 | float erfcinvf(float __x) { return __ocml_erfcinv_f32(__x); } | |
| 199 | ||
| 140 | 200 | __DEVICE__ |
| 141 | inline float erfinvf(float __x) { return __ocml_erfinv_f32(__x); } | |
| 201 | float erfcxf(float __x) { return __ocml_erfcx_f32(__x); } | |
| 202 | ||
| 142 | 203 | __DEVICE__ |
| 143 | inline float exp10f(float __x) { return __ocml_exp10_f32(__x); } | |
| 204 | float erff(float __x) { return __ocml_erf_f32(__x); } | |
| 205 | ||
| 144 | 206 | __DEVICE__ |
| 145 | inline float exp2f(float __x) { return __ocml_exp2_f32(__x); } | |
| 207 | float erfinvf(float __x) { return __ocml_erfinv_f32(__x); } | |
| 208 | ||
| 146 | 209 | __DEVICE__ |
| 147 | inline float expf(float __x) { return __ocml_exp_f32(__x); } | |
| 210 | float exp10f(float __x) { return __ocml_exp10_f32(__x); } | |
| 211 | ||
| 148 | 212 | __DEVICE__ |
| 149 | inline float expm1f(float __x) { return __ocml_expm1_f32(__x); } | |
| 213 | float exp2f(float __x) { return __ocml_exp2_f32(__x); } | |
| 214 | ||
| 150 | 215 | __DEVICE__ |
| 151 | inline float fabsf(float __x) { return __ocml_fabs_f32(__x); } | |
| 216 | float expf(float __x) { return __ocml_exp_f32(__x); } | |
| 217 | ||
| 152 | 218 | __DEVICE__ |
| 153 | inline float fdimf(float __x, float __y) { return __ocml_fdim_f32(__x, __y); } | |
| 219 | float expm1f(float __x) { return __ocml_expm1_f32(__x); } | |
| 220 | ||
| 154 | 221 | __DEVICE__ |
| 155 | inline float fdividef(float __x, float __y) { return __x / __y; } | |
| 222 | float fabsf(float __x) { return __ocml_fabs_f32(__x); } | |
| 223 | ||
| 156 | 224 | __DEVICE__ |
| 157 | inline float floorf(float __x) { return __ocml_floor_f32(__x); } | |
| 225 | float fdimf(float __x, float __y) { return __ocml_fdim_f32(__x, __y); } | |
| 226 | ||
| 158 | 227 | __DEVICE__ |
| 159 | inline float fmaf(float __x, float __y, float __z) { | |
| 228 | float fdividef(float __x, float __y) { return __x / __y; } | |
| 229 | ||
| 230 | __DEVICE__ | |
| 231 | float floorf(float __x) { return __ocml_floor_f32(__x); } | |
| 232 | ||
| 233 | __DEVICE__ | |
| 234 | float fmaf(float __x, float __y, float __z) { | |
| 160 | 235 | return __ocml_fma_f32(__x, __y, __z); |
| 161 | 236 | } |
| 237 | ||
| 162 | 238 | __DEVICE__ |
| 163 | inline float fmaxf(float __x, float __y) { return __ocml_fmax_f32(__x, __y); } | |
| 239 | float fmaxf(float __x, float __y) { return __ocml_fmax_f32(__x, __y); } | |
| 240 | ||
| 164 | 241 | __DEVICE__ |
| 165 | inline float fminf(float __x, float __y) { return __ocml_fmin_f32(__x, __y); } | |
| 242 | float fminf(float __x, float __y) { return __ocml_fmin_f32(__x, __y); } | |
| 243 | ||
| 166 | 244 | __DEVICE__ |
| 167 | inline float fmodf(float __x, float __y) { return __ocml_fmod_f32(__x, __y); } | |
| 245 | float fmodf(float __x, float __y) { return __ocml_fmod_f32(__x, __y); } | |
| 246 | ||
| 168 | 247 | __DEVICE__ |
| 169 | inline float frexpf(float __x, int *__nptr) { | |
| 248 | float frexpf(float __x, int *__nptr) { | |
| 170 | 249 | int __tmp; |
| 171 | 250 | float __r = |
| 172 | 251 | __ocml_frexp_f32(__x, (__attribute__((address_space(5))) int *)&__tmp); |
| ... | ... | @@ -174,24 +253,31 @@ inline float frexpf(float __x, int *__nptr) { |
| 174 | 253 | |
| 175 | 254 | return __r; |
| 176 | 255 | } |
| 256 | ||
| 177 | 257 | __DEVICE__ |
| 178 | inline float hypotf(float __x, float __y) { return __ocml_hypot_f32(__x, __y); } | |
| 258 | float hypotf(float __x, float __y) { return __ocml_hypot_f32(__x, __y); } | |
| 259 | ||
| 179 | 260 | __DEVICE__ |
| 180 | inline int ilogbf(float __x) { return __ocml_ilogb_f32(__x); } | |
| 261 | int ilogbf(float __x) { return __ocml_ilogb_f32(__x); } | |
| 262 | ||
| 181 | 263 | __DEVICE__ |
| 182 | inline __RETURN_TYPE isfinite(float __x) { return __ocml_isfinite_f32(__x); } | |
| 264 | __RETURN_TYPE __finitef(float __x) { return __ocml_isfinite_f32(__x); } | |
| 265 | ||
| 183 | 266 | __DEVICE__ |
| 184 | inline __RETURN_TYPE isinf(float __x) { return __ocml_isinf_f32(__x); } | |
| 267 | __RETURN_TYPE __isinff(float __x) { return __ocml_isinf_f32(__x); } | |
| 268 | ||
| 185 | 269 | __DEVICE__ |
| 186 | inline __RETURN_TYPE isnan(float __x) { return __ocml_isnan_f32(__x); } | |
| 270 | __RETURN_TYPE __isnanf(float __x) { return __ocml_isnan_f32(__x); } | |
| 271 | ||
| 187 | 272 | __DEVICE__ |
| 188 | inline float j0f(float __x) { return __ocml_j0_f32(__x); } | |
| 273 | float j0f(float __x) { return __ocml_j0_f32(__x); } | |
| 274 | ||
| 189 | 275 | __DEVICE__ |
| 190 | inline float j1f(float __x) { return __ocml_j1_f32(__x); } | |
| 276 | float j1f(float __x) { return __ocml_j1_f32(__x); } | |
| 277 | ||
| 191 | 278 | __DEVICE__ |
| 192 | inline float jnf(int __n, | |
| 193 | float __x) { // TODO: we could use Ahmes multiplication | |
| 194 | // and the Miller & Brown algorithm | |
| 279 | float jnf(int __n, float __x) { // TODO: we could use Ahmes multiplication | |
| 280 | // and the Miller & Brown algorithm | |
| 195 | 281 | // for linear recurrences to get O(log n) steps, but it's unclear if |
| 196 | 282 | // it'd be beneficial in this case. |
| 197 | 283 | if (__n == 0) |
| ... | ... | @@ -209,50 +295,61 @@ inline float jnf(int __n, |
| 209 | 295 | |
| 210 | 296 | return __x1; |
| 211 | 297 | } |
| 298 | ||
| 212 | 299 | __DEVICE__ |
| 213 | inline float ldexpf(float __x, int __e) { return __ocml_ldexp_f32(__x, __e); } | |
| 300 | float ldexpf(float __x, int __e) { return __ocml_ldexp_f32(__x, __e); } | |
| 301 | ||
| 214 | 302 | __DEVICE__ |
| 215 | inline float lgammaf(float __x) { return __ocml_lgamma_f32(__x); } | |
| 303 | float lgammaf(float __x) { return __ocml_lgamma_f32(__x); } | |
| 304 | ||
| 216 | 305 | __DEVICE__ |
| 217 | inline long long int llrintf(float __x) { return __ocml_rint_f32(__x); } | |
| 306 | long long int llrintf(float __x) { return __ocml_rint_f32(__x); } | |
| 307 | ||
| 218 | 308 | __DEVICE__ |
| 219 | inline long long int llroundf(float __x) { return __ocml_round_f32(__x); } | |
| 309 | long long int llroundf(float __x) { return __ocml_round_f32(__x); } | |
| 310 | ||
| 220 | 311 | __DEVICE__ |
| 221 | inline float log10f(float __x) { return __ocml_log10_f32(__x); } | |
| 312 | float log10f(float __x) { return __ocml_log10_f32(__x); } | |
| 313 | ||
| 222 | 314 | __DEVICE__ |
| 223 | inline float log1pf(float __x) { return __ocml_log1p_f32(__x); } | |
| 315 | float log1pf(float __x) { return __ocml_log1p_f32(__x); } | |
| 316 | ||
| 224 | 317 | __DEVICE__ |
| 225 | inline float log2f(float __x) { return __ocml_log2_f32(__x); } | |
| 318 | float log2f(float __x) { return __ocml_log2_f32(__x); } | |
| 319 | ||
| 226 | 320 | __DEVICE__ |
| 227 | inline float logbf(float __x) { return __ocml_logb_f32(__x); } | |
| 321 | float logbf(float __x) { return __ocml_logb_f32(__x); } | |
| 322 | ||
| 228 | 323 | __DEVICE__ |
| 229 | inline float logf(float __x) { return __ocml_log_f32(__x); } | |
| 324 | float logf(float __x) { return __ocml_log_f32(__x); } | |
| 325 | ||
| 230 | 326 | __DEVICE__ |
| 231 | inline long int lrintf(float __x) { return __ocml_rint_f32(__x); } | |
| 327 | long int lrintf(float __x) { return __ocml_rint_f32(__x); } | |
| 328 | ||
| 232 | 329 | __DEVICE__ |
| 233 | inline long int lroundf(float __x) { return __ocml_round_f32(__x); } | |
| 330 | long int lroundf(float __x) { return __ocml_round_f32(__x); } | |
| 331 | ||
| 234 | 332 | __DEVICE__ |
| 235 | inline float modff(float __x, float *__iptr) { | |
| 333 | float modff(float __x, float *__iptr) { | |
| 236 | 334 | float __tmp; |
| 237 | 335 | float __r = |
| 238 | 336 | __ocml_modf_f32(__x, (__attribute__((address_space(5))) float *)&__tmp); |
| 239 | 337 | *__iptr = __tmp; |
| 240 | ||
| 241 | 338 | return __r; |
| 242 | 339 | } |
| 340 | ||
| 243 | 341 | __DEVICE__ |
| 244 | inline float nanf(const char *__tagp) { | |
| 342 | float nanf(const char *__tagp) { | |
| 245 | 343 | union { |
| 246 | 344 | float val; |
| 247 | 345 | struct ieee_float { |
| 248 | uint32_t mantissa : 22; | |
| 249 | uint32_t quiet : 1; | |
| 250 | uint32_t exponent : 8; | |
| 251 | uint32_t sign : 1; | |
| 346 | unsigned int mantissa : 22; | |
| 347 | unsigned int quiet : 1; | |
| 348 | unsigned int exponent : 8; | |
| 349 | unsigned int sign : 1; | |
| 252 | 350 | } bits; |
| 253 | ||
| 254 | static_assert(sizeof(float) == sizeof(ieee_float), ""); | |
| 255 | 351 | } __tmp; |
| 352 | __static_assert_type_size_equal(sizeof(__tmp.val), sizeof(__tmp.bits)); | |
| 256 | 353 | |
| 257 | 354 | __tmp.bits.sign = 0u; |
| 258 | 355 | __tmp.bits.exponent = ~0u; |
| ... | ... | @@ -261,28 +358,34 @@ inline float nanf(const char *__tagp) { |
| 261 | 358 | |
| 262 | 359 | return __tmp.val; |
| 263 | 360 | } |
| 361 | ||
| 264 | 362 | __DEVICE__ |
| 265 | inline float nearbyintf(float __x) { return __ocml_nearbyint_f32(__x); } | |
| 363 | float nearbyintf(float __x) { return __ocml_nearbyint_f32(__x); } | |
| 364 | ||
| 266 | 365 | __DEVICE__ |
| 267 | inline float nextafterf(float __x, float __y) { | |
| 366 | float nextafterf(float __x, float __y) { | |
| 268 | 367 | return __ocml_nextafter_f32(__x, __y); |
| 269 | 368 | } |
| 369 | ||
| 270 | 370 | __DEVICE__ |
| 271 | inline float norm3df(float __x, float __y, float __z) { | |
| 371 | float norm3df(float __x, float __y, float __z) { | |
| 272 | 372 | return __ocml_len3_f32(__x, __y, __z); |
| 273 | 373 | } |
| 374 | ||
| 274 | 375 | __DEVICE__ |
| 275 | inline float norm4df(float __x, float __y, float __z, float __w) { | |
| 376 | float norm4df(float __x, float __y, float __z, float __w) { | |
| 276 | 377 | return __ocml_len4_f32(__x, __y, __z, __w); |
| 277 | 378 | } |
| 379 | ||
| 278 | 380 | __DEVICE__ |
| 279 | inline float normcdff(float __x) { return __ocml_ncdf_f32(__x); } | |
| 381 | float normcdff(float __x) { return __ocml_ncdf_f32(__x); } | |
| 382 | ||
| 280 | 383 | __DEVICE__ |
| 281 | inline float normcdfinvf(float __x) { return __ocml_ncdfinv_f32(__x); } | |
| 384 | float normcdfinvf(float __x) { return __ocml_ncdfinv_f32(__x); } | |
| 385 | ||
| 282 | 386 | __DEVICE__ |
| 283 | inline float | |
| 284 | normf(int __dim, | |
| 285 | const float *__a) { // TODO: placeholder until OCML adds support. | |
| 387 | float normf(int __dim, | |
| 388 | const float *__a) { // TODO: placeholder until OCML adds support. | |
| 286 | 389 | float __r = 0; |
| 287 | 390 | while (__dim--) { |
| 288 | 391 | __r += __a[0] * __a[0]; |
| ... | ... | @@ -291,16 +394,23 @@ normf(int __dim, |
| 291 | 394 | |
| 292 | 395 | return __ocml_sqrt_f32(__r); |
| 293 | 396 | } |
| 397 | ||
| 294 | 398 | __DEVICE__ |
| 295 | inline float powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); } | |
| 399 | float powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); } | |
| 400 | ||
| 401 | __DEVICE__ | |
| 402 | float powif(float __x, int __y) { return __ocml_pown_f32(__x, __y); } | |
| 403 | ||
| 296 | 404 | __DEVICE__ |
| 297 | inline float rcbrtf(float __x) { return __ocml_rcbrt_f32(__x); } | |
| 405 | float rcbrtf(float __x) { return __ocml_rcbrt_f32(__x); } | |
| 406 | ||
| 298 | 407 | __DEVICE__ |
| 299 | inline float remainderf(float __x, float __y) { | |
| 408 | float remainderf(float __x, float __y) { | |
| 300 | 409 | return __ocml_remainder_f32(__x, __y); |
| 301 | 410 | } |
| 411 | ||
| 302 | 412 | __DEVICE__ |
| 303 | inline float remquof(float __x, float __y, int *__quo) { | |
| 413 | float remquof(float __x, float __y, int *__quo) { | |
| 304 | 414 | int __tmp; |
| 305 | 415 | float __r = __ocml_remquo_f32( |
| 306 | 416 | __x, __y, (__attribute__((address_space(5))) int *)&__tmp); |
| ... | ... | @@ -308,25 +418,26 @@ inline float remquof(float __x, float __y, int *__quo) { |
| 308 | 418 | |
| 309 | 419 | return __r; |
| 310 | 420 | } |
| 421 | ||
| 311 | 422 | __DEVICE__ |
| 312 | inline float rhypotf(float __x, float __y) { | |
| 313 | return __ocml_rhypot_f32(__x, __y); | |
| 314 | } | |
| 423 | float rhypotf(float __x, float __y) { return __ocml_rhypot_f32(__x, __y); } | |
| 424 | ||
| 315 | 425 | __DEVICE__ |
| 316 | inline float rintf(float __x) { return __ocml_rint_f32(__x); } | |
| 426 | float rintf(float __x) { return __ocml_rint_f32(__x); } | |
| 427 | ||
| 317 | 428 | __DEVICE__ |
| 318 | inline float rnorm3df(float __x, float __y, float __z) { | |
| 429 | float rnorm3df(float __x, float __y, float __z) { | |
| 319 | 430 | return __ocml_rlen3_f32(__x, __y, __z); |
| 320 | 431 | } |
| 321 | 432 | |
| 322 | 433 | __DEVICE__ |
| 323 | inline float rnorm4df(float __x, float __y, float __z, float __w) { | |
| 434 | float rnorm4df(float __x, float __y, float __z, float __w) { | |
| 324 | 435 | return __ocml_rlen4_f32(__x, __y, __z, __w); |
| 325 | 436 | } |
| 437 | ||
| 326 | 438 | __DEVICE__ |
| 327 | inline float | |
| 328 | rnormf(int __dim, | |
| 329 | const float *__a) { // TODO: placeholder until OCML adds support. | |
| 439 | float rnormf(int __dim, | |
| 440 | const float *__a) { // TODO: placeholder until OCML adds support. | |
| 330 | 441 | float __r = 0; |
| 331 | 442 | while (__dim--) { |
| 332 | 443 | __r += __a[0] * __a[0]; |
| ... | ... | @@ -335,59 +446,74 @@ rnormf(int __dim, |
| 335 | 446 | |
| 336 | 447 | return __ocml_rsqrt_f32(__r); |
| 337 | 448 | } |
| 449 | ||
| 338 | 450 | __DEVICE__ |
| 339 | inline float roundf(float __x) { return __ocml_round_f32(__x); } | |
| 451 | float roundf(float __x) { return __ocml_round_f32(__x); } | |
| 452 | ||
| 340 | 453 | __DEVICE__ |
| 341 | inline float rsqrtf(float __x) { return __ocml_rsqrt_f32(__x); } | |
| 454 | float rsqrtf(float __x) { return __ocml_rsqrt_f32(__x); } | |
| 455 | ||
| 342 | 456 | __DEVICE__ |
| 343 | inline float scalblnf(float __x, long int __n) { | |
| 457 | float scalblnf(float __x, long int __n) { | |
| 344 | 458 | return (__n < INT_MAX) ? __ocml_scalbn_f32(__x, __n) |
| 345 | 459 | : __ocml_scalb_f32(__x, __n); |
| 346 | 460 | } |
| 461 | ||
| 347 | 462 | __DEVICE__ |
| 348 | inline float scalbnf(float __x, int __n) { return __ocml_scalbn_f32(__x, __n); } | |
| 463 | float scalbnf(float __x, int __n) { return __ocml_scalbn_f32(__x, __n); } | |
| 464 | ||
| 349 | 465 | __DEVICE__ |
| 350 | inline __RETURN_TYPE signbit(float __x) { return __ocml_signbit_f32(__x); } | |
| 466 | __RETURN_TYPE __signbitf(float __x) { return __ocml_signbit_f32(__x); } | |
| 467 | ||
| 351 | 468 | __DEVICE__ |
| 352 | inline void sincosf(float __x, float *__sinptr, float *__cosptr) { | |
| 469 | void sincosf(float __x, float *__sinptr, float *__cosptr) { | |
| 353 | 470 | float __tmp; |
| 354 | ||
| 355 | 471 | *__sinptr = |
| 356 | 472 | __ocml_sincos_f32(__x, (__attribute__((address_space(5))) float *)&__tmp); |
| 357 | 473 | *__cosptr = __tmp; |
| 358 | 474 | } |
| 475 | ||
| 359 | 476 | __DEVICE__ |
| 360 | inline void sincospif(float __x, float *__sinptr, float *__cosptr) { | |
| 477 | void sincospif(float __x, float *__sinptr, float *__cosptr) { | |
| 361 | 478 | float __tmp; |
| 362 | ||
| 363 | 479 | *__sinptr = __ocml_sincospi_f32( |
| 364 | 480 | __x, (__attribute__((address_space(5))) float *)&__tmp); |
| 365 | 481 | *__cosptr = __tmp; |
| 366 | 482 | } |
| 483 | ||
| 367 | 484 | __DEVICE__ |
| 368 | inline float sinf(float __x) { return __ocml_sin_f32(__x); } | |
| 485 | float sinf(float __x) { return __ocml_sin_f32(__x); } | |
| 486 | ||
| 369 | 487 | __DEVICE__ |
| 370 | inline float sinhf(float __x) { return __ocml_sinh_f32(__x); } | |
| 488 | float sinhf(float __x) { return __ocml_sinh_f32(__x); } | |
| 489 | ||
| 371 | 490 | __DEVICE__ |
| 372 | inline float sinpif(float __x) { return __ocml_sinpi_f32(__x); } | |
| 491 | float sinpif(float __x) { return __ocml_sinpi_f32(__x); } | |
| 492 | ||
| 373 | 493 | __DEVICE__ |
| 374 | inline float sqrtf(float __x) { return __ocml_sqrt_f32(__x); } | |
| 494 | float sqrtf(float __x) { return __ocml_sqrt_f32(__x); } | |
| 495 | ||
| 375 | 496 | __DEVICE__ |
| 376 | inline float tanf(float __x) { return __ocml_tan_f32(__x); } | |
| 497 | float tanf(float __x) { return __ocml_tan_f32(__x); } | |
| 498 | ||
| 377 | 499 | __DEVICE__ |
| 378 | inline float tanhf(float __x) { return __ocml_tanh_f32(__x); } | |
| 500 | float tanhf(float __x) { return __ocml_tanh_f32(__x); } | |
| 501 | ||
| 379 | 502 | __DEVICE__ |
| 380 | inline float tgammaf(float __x) { return __ocml_tgamma_f32(__x); } | |
| 503 | float tgammaf(float __x) { return __ocml_tgamma_f32(__x); } | |
| 504 | ||
| 381 | 505 | __DEVICE__ |
| 382 | inline float truncf(float __x) { return __ocml_trunc_f32(__x); } | |
| 506 | float truncf(float __x) { return __ocml_trunc_f32(__x); } | |
| 507 | ||
| 383 | 508 | __DEVICE__ |
| 384 | inline float y0f(float __x) { return __ocml_y0_f32(__x); } | |
| 509 | float y0f(float __x) { return __ocml_y0_f32(__x); } | |
| 510 | ||
| 385 | 511 | __DEVICE__ |
| 386 | inline float y1f(float __x) { return __ocml_y1_f32(__x); } | |
| 512 | float y1f(float __x) { return __ocml_y1_f32(__x); } | |
| 513 | ||
| 387 | 514 | __DEVICE__ |
| 388 | inline float ynf(int __n, | |
| 389 | float __x) { // TODO: we could use Ahmes multiplication | |
| 390 | // and the Miller & Brown algorithm | |
| 515 | float ynf(int __n, float __x) { // TODO: we could use Ahmes multiplication | |
| 516 | // and the Miller & Brown algorithm | |
| 391 | 517 | // for linear recurrences to get O(log n) steps, but it's unclear if |
| 392 | 518 | // it'd be beneficial in this case. Placeholder until OCML adds |
| 393 | 519 | // support. |
| ... | ... | @@ -408,290 +534,343 @@ inline float ynf(int __n, |
| 408 | 534 | } |
| 409 | 535 | |
| 410 | 536 | // BEGIN INTRINSICS |
| 537 | ||
| 411 | 538 | __DEVICE__ |
| 412 | inline float __cosf(float __x) { return __ocml_native_cos_f32(__x); } | |
| 539 | float __cosf(float __x) { return __ocml_native_cos_f32(__x); } | |
| 540 | ||
| 413 | 541 | __DEVICE__ |
| 414 | inline float __exp10f(float __x) { return __ocml_native_exp10_f32(__x); } | |
| 542 | float __exp10f(float __x) { return __ocml_native_exp10_f32(__x); } | |
| 543 | ||
| 415 | 544 | __DEVICE__ |
| 416 | inline float __expf(float __x) { return __ocml_native_exp_f32(__x); } | |
| 545 | float __expf(float __x) { return __ocml_native_exp_f32(__x); } | |
| 546 | ||
| 417 | 547 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 418 | 548 | __DEVICE__ |
| 419 | inline float __fadd_rd(float __x, float __y) { | |
| 420 | return __ocml_add_rtn_f32(__x, __y); | |
| 421 | } | |
| 422 | #endif | |
| 549 | float __fadd_rd(float __x, float __y) { return __ocml_add_rtn_f32(__x, __y); } | |
| 423 | 550 | __DEVICE__ |
| 424 | inline float __fadd_rn(float __x, float __y) { return __x + __y; } | |
| 425 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 551 | float __fadd_rn(float __x, float __y) { return __ocml_add_rte_f32(__x, __y); } | |
| 426 | 552 | __DEVICE__ |
| 427 | inline float __fadd_ru(float __x, float __y) { | |
| 428 | return __ocml_add_rtp_f32(__x, __y); | |
| 429 | } | |
| 553 | float __fadd_ru(float __x, float __y) { return __ocml_add_rtp_f32(__x, __y); } | |
| 430 | 554 | __DEVICE__ |
| 431 | inline float __fadd_rz(float __x, float __y) { | |
| 432 | return __ocml_add_rtz_f32(__x, __y); | |
| 433 | } | |
| 555 | float __fadd_rz(float __x, float __y) { return __ocml_add_rtz_f32(__x, __y); } | |
| 556 | #else | |
| 434 | 557 | __DEVICE__ |
| 435 | inline float __fdiv_rd(float __x, float __y) { | |
| 436 | return __ocml_div_rtn_f32(__x, __y); | |
| 437 | } | |
| 558 | float __fadd_rn(float __x, float __y) { return __x + __y; } | |
| 438 | 559 | #endif |
| 439 | __DEVICE__ | |
| 440 | inline float __fdiv_rn(float __x, float __y) { return __x / __y; } | |
| 560 | ||
| 441 | 561 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 442 | 562 | __DEVICE__ |
| 443 | inline float __fdiv_ru(float __x, float __y) { | |
| 444 | return __ocml_div_rtp_f32(__x, __y); | |
| 445 | } | |
| 563 | float __fdiv_rd(float __x, float __y) { return __ocml_div_rtn_f32(__x, __y); } | |
| 446 | 564 | __DEVICE__ |
| 447 | inline float __fdiv_rz(float __x, float __y) { | |
| 448 | return __ocml_div_rtz_f32(__x, __y); | |
| 449 | } | |
| 565 | float __fdiv_rn(float __x, float __y) { return __ocml_div_rte_f32(__x, __y); } | |
| 566 | __DEVICE__ | |
| 567 | float __fdiv_ru(float __x, float __y) { return __ocml_div_rtp_f32(__x, __y); } | |
| 568 | __DEVICE__ | |
| 569 | float __fdiv_rz(float __x, float __y) { return __ocml_div_rtz_f32(__x, __y); } | |
| 570 | #else | |
| 571 | __DEVICE__ | |
| 572 | float __fdiv_rn(float __x, float __y) { return __x / __y; } | |
| 450 | 573 | #endif |
| 574 | ||
| 451 | 575 | __DEVICE__ |
| 452 | inline float __fdividef(float __x, float __y) { return __x / __y; } | |
| 576 | float __fdividef(float __x, float __y) { return __x / __y; } | |
| 577 | ||
| 453 | 578 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 454 | 579 | __DEVICE__ |
| 455 | inline float __fmaf_rd(float __x, float __y, float __z) { | |
| 580 | float __fmaf_rd(float __x, float __y, float __z) { | |
| 456 | 581 | return __ocml_fma_rtn_f32(__x, __y, __z); |
| 457 | 582 | } |
| 458 | #endif | |
| 459 | 583 | __DEVICE__ |
| 460 | inline float __fmaf_rn(float __x, float __y, float __z) { | |
| 461 | return __ocml_fma_f32(__x, __y, __z); | |
| 584 | float __fmaf_rn(float __x, float __y, float __z) { | |
| 585 | return __ocml_fma_rte_f32(__x, __y, __z); | |
| 462 | 586 | } |
| 463 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 464 | 587 | __DEVICE__ |
| 465 | inline float __fmaf_ru(float __x, float __y, float __z) { | |
| 588 | float __fmaf_ru(float __x, float __y, float __z) { | |
| 466 | 589 | return __ocml_fma_rtp_f32(__x, __y, __z); |
| 467 | 590 | } |
| 468 | 591 | __DEVICE__ |
| 469 | inline float __fmaf_rz(float __x, float __y, float __z) { | |
| 592 | float __fmaf_rz(float __x, float __y, float __z) { | |
| 470 | 593 | return __ocml_fma_rtz_f32(__x, __y, __z); |
| 471 | 594 | } |
| 595 | #else | |
| 472 | 596 | __DEVICE__ |
| 473 | inline float __fmul_rd(float __x, float __y) { | |
| 474 | return __ocml_mul_rtn_f32(__x, __y); | |
| 597 | float __fmaf_rn(float __x, float __y, float __z) { | |
| 598 | return __ocml_fma_f32(__x, __y, __z); | |
| 475 | 599 | } |
| 476 | 600 | #endif |
| 477 | __DEVICE__ | |
| 478 | inline float __fmul_rn(float __x, float __y) { return __x * __y; } | |
| 601 | ||
| 479 | 602 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 480 | 603 | __DEVICE__ |
| 481 | inline float __fmul_ru(float __x, float __y) { | |
| 482 | return __ocml_mul_rtp_f32(__x, __y); | |
| 483 | } | |
| 604 | float __fmul_rd(float __x, float __y) { return __ocml_mul_rtn_f32(__x, __y); } | |
| 484 | 605 | __DEVICE__ |
| 485 | inline float __fmul_rz(float __x, float __y) { | |
| 486 | return __ocml_mul_rtz_f32(__x, __y); | |
| 487 | } | |
| 606 | float __fmul_rn(float __x, float __y) { return __ocml_mul_rte_f32(__x, __y); } | |
| 488 | 607 | __DEVICE__ |
| 489 | inline float __frcp_rd(float __x) { return __llvm_amdgcn_rcp_f32(__x); } | |
| 490 | #endif | |
| 608 | float __fmul_ru(float __x, float __y) { return __ocml_mul_rtp_f32(__x, __y); } | |
| 609 | __DEVICE__ | |
| 610 | float __fmul_rz(float __x, float __y) { return __ocml_mul_rtz_f32(__x, __y); } | |
| 611 | #else | |
| 491 | 612 | __DEVICE__ |
| 492 | inline float __frcp_rn(float __x) { return __llvm_amdgcn_rcp_f32(__x); } | |
| 613 | float __fmul_rn(float __x, float __y) { return __x * __y; } | |
| 614 | #endif | |
| 615 | ||
| 493 | 616 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 494 | 617 | __DEVICE__ |
| 495 | inline float __frcp_ru(float __x) { return __llvm_amdgcn_rcp_f32(__x); } | |
| 618 | float __frcp_rd(float __x) { return __ocml_div_rtn_f32(1.0f, __x); } | |
| 496 | 619 | __DEVICE__ |
| 497 | inline float __frcp_rz(float __x) { return __llvm_amdgcn_rcp_f32(__x); } | |
| 498 | #endif | |
| 620 | float __frcp_rn(float __x) { return __ocml_div_rte_f32(1.0f, __x); } | |
| 499 | 621 | __DEVICE__ |
| 500 | inline float __frsqrt_rn(float __x) { return __llvm_amdgcn_rsq_f32(__x); } | |
| 501 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 622 | float __frcp_ru(float __x) { return __ocml_div_rtp_f32(1.0f, __x); } | |
| 623 | __DEVICE__ | |
| 624 | float __frcp_rz(float __x) { return __ocml_div_rtz_f32(1.0f, __x); } | |
| 625 | #else | |
| 502 | 626 | __DEVICE__ |
| 503 | inline float __fsqrt_rd(float __x) { return __ocml_sqrt_rtn_f32(__x); } | |
| 627 | float __frcp_rn(float __x) { return 1.0f / __x; } | |
| 504 | 628 | #endif |
| 629 | ||
| 505 | 630 | __DEVICE__ |
| 506 | inline float __fsqrt_rn(float __x) { return __ocml_native_sqrt_f32(__x); } | |
| 631 | float __frsqrt_rn(float __x) { return __llvm_amdgcn_rsq_f32(__x); } | |
| 632 | ||
| 507 | 633 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 508 | 634 | __DEVICE__ |
| 509 | inline float __fsqrt_ru(float __x) { return __ocml_sqrt_rtp_f32(__x); } | |
| 635 | float __fsqrt_rd(float __x) { return __ocml_sqrt_rtn_f32(__x); } | |
| 510 | 636 | __DEVICE__ |
| 511 | inline float __fsqrt_rz(float __x) { return __ocml_sqrt_rtz_f32(__x); } | |
| 637 | float __fsqrt_rn(float __x) { return __ocml_sqrt_rte_f32(__x); } | |
| 512 | 638 | __DEVICE__ |
| 513 | inline float __fsub_rd(float __x, float __y) { | |
| 514 | return __ocml_sub_rtn_f32(__x, __y); | |
| 515 | } | |
| 516 | #endif | |
| 639 | float __fsqrt_ru(float __x) { return __ocml_sqrt_rtp_f32(__x); } | |
| 640 | __DEVICE__ | |
| 641 | float __fsqrt_rz(float __x) { return __ocml_sqrt_rtz_f32(__x); } | |
| 642 | #else | |
| 517 | 643 | __DEVICE__ |
| 518 | inline float __fsub_rn(float __x, float __y) { return __x - __y; } | |
| 644 | float __fsqrt_rn(float __x) { return __ocml_native_sqrt_f32(__x); } | |
| 645 | #endif | |
| 646 | ||
| 519 | 647 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 520 | 648 | __DEVICE__ |
| 521 | inline float __fsub_ru(float __x, float __y) { | |
| 522 | return __ocml_sub_rtp_f32(__x, __y); | |
| 523 | } | |
| 649 | float __fsub_rd(float __x, float __y) { return __ocml_sub_rtn_f32(__x, __y); } | |
| 524 | 650 | __DEVICE__ |
| 525 | inline float __fsub_rz(float __x, float __y) { | |
| 526 | return __ocml_sub_rtz_f32(__x, __y); | |
| 527 | } | |
| 651 | float __fsub_rn(float __x, float __y) { return __ocml_sub_rte_f32(__x, __y); } | |
| 652 | __DEVICE__ | |
| 653 | float __fsub_ru(float __x, float __y) { return __ocml_sub_rtp_f32(__x, __y); } | |
| 654 | __DEVICE__ | |
| 655 | float __fsub_rz(float __x, float __y) { return __ocml_sub_rtz_f32(__x, __y); } | |
| 656 | #else | |
| 657 | __DEVICE__ | |
| 658 | float __fsub_rn(float __x, float __y) { return __x - __y; } | |
| 528 | 659 | #endif |
| 660 | ||
| 529 | 661 | __DEVICE__ |
| 530 | inline float __log10f(float __x) { return __ocml_native_log10_f32(__x); } | |
| 662 | float __log10f(float __x) { return __ocml_native_log10_f32(__x); } | |
| 663 | ||
| 531 | 664 | __DEVICE__ |
| 532 | inline float __log2f(float __x) { return __ocml_native_log2_f32(__x); } | |
| 665 | float __log2f(float __x) { return __ocml_native_log2_f32(__x); } | |
| 666 | ||
| 533 | 667 | __DEVICE__ |
| 534 | inline float __logf(float __x) { return __ocml_native_log_f32(__x); } | |
| 668 | float __logf(float __x) { return __ocml_native_log_f32(__x); } | |
| 669 | ||
| 535 | 670 | __DEVICE__ |
| 536 | inline float __powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); } | |
| 671 | float __powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); } | |
| 672 | ||
| 537 | 673 | __DEVICE__ |
| 538 | inline float __saturatef(float __x) { | |
| 539 | return (__x < 0) ? 0 : ((__x > 1) ? 1 : __x); | |
| 540 | } | |
| 674 | float __saturatef(float __x) { return (__x < 0) ? 0 : ((__x > 1) ? 1 : __x); } | |
| 675 | ||
| 541 | 676 | __DEVICE__ |
| 542 | inline void __sincosf(float __x, float *__sinptr, float *__cosptr) { | |
| 677 | void __sincosf(float __x, float *__sinptr, float *__cosptr) { | |
| 543 | 678 | *__sinptr = __ocml_native_sin_f32(__x); |
| 544 | 679 | *__cosptr = __ocml_native_cos_f32(__x); |
| 545 | 680 | } |
| 681 | ||
| 546 | 682 | __DEVICE__ |
| 547 | inline float __sinf(float __x) { return __ocml_native_sin_f32(__x); } | |
| 683 | float __sinf(float __x) { return __ocml_native_sin_f32(__x); } | |
| 684 | ||
| 548 | 685 | __DEVICE__ |
| 549 | inline float __tanf(float __x) { return __ocml_tan_f32(__x); } | |
| 686 | float __tanf(float __x) { return __ocml_tan_f32(__x); } | |
| 550 | 687 | // END INTRINSICS |
| 551 | 688 | // END FLOAT |
| 552 | 689 | |
| 553 | 690 | // BEGIN DOUBLE |
| 554 | 691 | __DEVICE__ |
| 555 | inline double abs(double __x) { return __ocml_fabs_f64(__x); } | |
| 556 | __DEVICE__ | |
| 557 | inline double acos(double __x) { return __ocml_acos_f64(__x); } | |
| 692 | double acos(double __x) { return __ocml_acos_f64(__x); } | |
| 693 | ||
| 558 | 694 | __DEVICE__ |
| 559 | inline double acosh(double __x) { return __ocml_acosh_f64(__x); } | |
| 695 | double acosh(double __x) { return __ocml_acosh_f64(__x); } | |
| 696 | ||
| 560 | 697 | __DEVICE__ |
| 561 | inline double asin(double __x) { return __ocml_asin_f64(__x); } | |
| 698 | double asin(double __x) { return __ocml_asin_f64(__x); } | |
| 699 | ||
| 562 | 700 | __DEVICE__ |
| 563 | inline double asinh(double __x) { return __ocml_asinh_f64(__x); } | |
| 701 | double asinh(double __x) { return __ocml_asinh_f64(__x); } | |
| 702 | ||
| 564 | 703 | __DEVICE__ |
| 565 | inline double atan(double __x) { return __ocml_atan_f64(__x); } | |
| 704 | double atan(double __x) { return __ocml_atan_f64(__x); } | |
| 705 | ||
| 566 | 706 | __DEVICE__ |
| 567 | inline double atan2(double __x, double __y) { | |
| 568 | return __ocml_atan2_f64(__x, __y); | |
| 569 | } | |
| 707 | double atan2(double __x, double __y) { return __ocml_atan2_f64(__x, __y); } | |
| 708 | ||
| 570 | 709 | __DEVICE__ |
| 571 | inline double atanh(double __x) { return __ocml_atanh_f64(__x); } | |
| 710 | double atanh(double __x) { return __ocml_atanh_f64(__x); } | |
| 711 | ||
| 572 | 712 | __DEVICE__ |
| 573 | inline double cbrt(double __x) { return __ocml_cbrt_f64(__x); } | |
| 713 | double cbrt(double __x) { return __ocml_cbrt_f64(__x); } | |
| 714 | ||
| 574 | 715 | __DEVICE__ |
| 575 | inline double ceil(double __x) { return __ocml_ceil_f64(__x); } | |
| 716 | double ceil(double __x) { return __ocml_ceil_f64(__x); } | |
| 717 | ||
| 576 | 718 | __DEVICE__ |
| 577 | inline double copysign(double __x, double __y) { | |
| 719 | double copysign(double __x, double __y) { | |
| 578 | 720 | return __ocml_copysign_f64(__x, __y); |
| 579 | 721 | } |
| 722 | ||
| 580 | 723 | __DEVICE__ |
| 581 | inline double cos(double __x) { return __ocml_cos_f64(__x); } | |
| 724 | double cos(double __x) { return __ocml_cos_f64(__x); } | |
| 725 | ||
| 582 | 726 | __DEVICE__ |
| 583 | inline double cosh(double __x) { return __ocml_cosh_f64(__x); } | |
| 727 | double cosh(double __x) { return __ocml_cosh_f64(__x); } | |
| 728 | ||
| 584 | 729 | __DEVICE__ |
| 585 | inline double cospi(double __x) { return __ocml_cospi_f64(__x); } | |
| 730 | double cospi(double __x) { return __ocml_cospi_f64(__x); } | |
| 731 | ||
| 586 | 732 | __DEVICE__ |
| 587 | inline double cyl_bessel_i0(double __x) { return __ocml_i0_f64(__x); } | |
| 733 | double cyl_bessel_i0(double __x) { return __ocml_i0_f64(__x); } | |
| 734 | ||
| 588 | 735 | __DEVICE__ |
| 589 | inline double cyl_bessel_i1(double __x) { return __ocml_i1_f64(__x); } | |
| 736 | double cyl_bessel_i1(double __x) { return __ocml_i1_f64(__x); } | |
| 737 | ||
| 590 | 738 | __DEVICE__ |
| 591 | inline double erf(double __x) { return __ocml_erf_f64(__x); } | |
| 739 | double erf(double __x) { return __ocml_erf_f64(__x); } | |
| 740 | ||
| 592 | 741 | __DEVICE__ |
| 593 | inline double erfc(double __x) { return __ocml_erfc_f64(__x); } | |
| 742 | double erfc(double __x) { return __ocml_erfc_f64(__x); } | |
| 743 | ||
| 594 | 744 | __DEVICE__ |
| 595 | inline double erfcinv(double __x) { return __ocml_erfcinv_f64(__x); } | |
| 745 | double erfcinv(double __x) { return __ocml_erfcinv_f64(__x); } | |
| 746 | ||
| 596 | 747 | __DEVICE__ |
| 597 | inline double erfcx(double __x) { return __ocml_erfcx_f64(__x); } | |
| 748 | double erfcx(double __x) { return __ocml_erfcx_f64(__x); } | |
| 749 | ||
| 598 | 750 | __DEVICE__ |
| 599 | inline double erfinv(double __x) { return __ocml_erfinv_f64(__x); } | |
| 751 | double erfinv(double __x) { return __ocml_erfinv_f64(__x); } | |
| 752 | ||
| 600 | 753 | __DEVICE__ |
| 601 | inline double exp(double __x) { return __ocml_exp_f64(__x); } | |
| 754 | double exp(double __x) { return __ocml_exp_f64(__x); } | |
| 755 | ||
| 602 | 756 | __DEVICE__ |
| 603 | inline double exp10(double __x) { return __ocml_exp10_f64(__x); } | |
| 757 | double exp10(double __x) { return __ocml_exp10_f64(__x); } | |
| 758 | ||
| 604 | 759 | __DEVICE__ |
| 605 | inline double exp2(double __x) { return __ocml_exp2_f64(__x); } | |
| 760 | double exp2(double __x) { return __ocml_exp2_f64(__x); } | |
| 761 | ||
| 606 | 762 | __DEVICE__ |
| 607 | inline double expm1(double __x) { return __ocml_expm1_f64(__x); } | |
| 763 | double expm1(double __x) { return __ocml_expm1_f64(__x); } | |
| 764 | ||
| 608 | 765 | __DEVICE__ |
| 609 | inline double fabs(double __x) { return __ocml_fabs_f64(__x); } | |
| 766 | double fabs(double __x) { return __ocml_fabs_f64(__x); } | |
| 767 | ||
| 610 | 768 | __DEVICE__ |
| 611 | inline double fdim(double __x, double __y) { return __ocml_fdim_f64(__x, __y); } | |
| 769 | double fdim(double __x, double __y) { return __ocml_fdim_f64(__x, __y); } | |
| 770 | ||
| 612 | 771 | __DEVICE__ |
| 613 | inline double floor(double __x) { return __ocml_floor_f64(__x); } | |
| 772 | double floor(double __x) { return __ocml_floor_f64(__x); } | |
| 773 | ||
| 614 | 774 | __DEVICE__ |
| 615 | inline double fma(double __x, double __y, double __z) { | |
| 775 | double fma(double __x, double __y, double __z) { | |
| 616 | 776 | return __ocml_fma_f64(__x, __y, __z); |
| 617 | 777 | } |
| 778 | ||
| 618 | 779 | __DEVICE__ |
| 619 | inline double fmax(double __x, double __y) { return __ocml_fmax_f64(__x, __y); } | |
| 780 | double fmax(double __x, double __y) { return __ocml_fmax_f64(__x, __y); } | |
| 781 | ||
| 620 | 782 | __DEVICE__ |
| 621 | inline double fmin(double __x, double __y) { return __ocml_fmin_f64(__x, __y); } | |
| 783 | double fmin(double __x, double __y) { return __ocml_fmin_f64(__x, __y); } | |
| 784 | ||
| 622 | 785 | __DEVICE__ |
| 623 | inline double fmod(double __x, double __y) { return __ocml_fmod_f64(__x, __y); } | |
| 786 | double fmod(double __x, double __y) { return __ocml_fmod_f64(__x, __y); } | |
| 787 | ||
| 624 | 788 | __DEVICE__ |
| 625 | inline double frexp(double __x, int *__nptr) { | |
| 789 | double frexp(double __x, int *__nptr) { | |
| 626 | 790 | int __tmp; |
| 627 | 791 | double __r = |
| 628 | 792 | __ocml_frexp_f64(__x, (__attribute__((address_space(5))) int *)&__tmp); |
| 629 | 793 | *__nptr = __tmp; |
| 630 | ||
| 631 | 794 | return __r; |
| 632 | 795 | } |
| 796 | ||
| 633 | 797 | __DEVICE__ |
| 634 | inline double hypot(double __x, double __y) { | |
| 635 | return __ocml_hypot_f64(__x, __y); | |
| 636 | } | |
| 798 | double hypot(double __x, double __y) { return __ocml_hypot_f64(__x, __y); } | |
| 799 | ||
| 637 | 800 | __DEVICE__ |
| 638 | inline int ilogb(double __x) { return __ocml_ilogb_f64(__x); } | |
| 801 | int ilogb(double __x) { return __ocml_ilogb_f64(__x); } | |
| 802 | ||
| 639 | 803 | __DEVICE__ |
| 640 | inline __RETURN_TYPE isfinite(double __x) { return __ocml_isfinite_f64(__x); } | |
| 804 | __RETURN_TYPE __finite(double __x) { return __ocml_isfinite_f64(__x); } | |
| 805 | ||
| 641 | 806 | __DEVICE__ |
| 642 | inline __RETURN_TYPE isinf(double __x) { return __ocml_isinf_f64(__x); } | |
| 807 | __RETURN_TYPE __isinf(double __x) { return __ocml_isinf_f64(__x); } | |
| 808 | ||
| 643 | 809 | __DEVICE__ |
| 644 | inline __RETURN_TYPE isnan(double __x) { return __ocml_isnan_f64(__x); } | |
| 810 | __RETURN_TYPE __isnan(double __x) { return __ocml_isnan_f64(__x); } | |
| 811 | ||
| 645 | 812 | __DEVICE__ |
| 646 | inline double j0(double __x) { return __ocml_j0_f64(__x); } | |
| 813 | double j0(double __x) { return __ocml_j0_f64(__x); } | |
| 814 | ||
| 647 | 815 | __DEVICE__ |
| 648 | inline double j1(double __x) { return __ocml_j1_f64(__x); } | |
| 816 | double j1(double __x) { return __ocml_j1_f64(__x); } | |
| 817 | ||
| 649 | 818 | __DEVICE__ |
| 650 | inline double jn(int __n, | |
| 651 | double __x) { // TODO: we could use Ahmes multiplication | |
| 652 | // and the Miller & Brown algorithm | |
| 819 | double jn(int __n, double __x) { // TODO: we could use Ahmes multiplication | |
| 820 | // and the Miller & Brown algorithm | |
| 653 | 821 | // for linear recurrences to get O(log n) steps, but it's unclear if |
| 654 | 822 | // it'd be beneficial in this case. Placeholder until OCML adds |
| 655 | 823 | // support. |
| 656 | 824 | if (__n == 0) |
| 657 | return j0f(__x); | |
| 825 | return j0(__x); | |
| 658 | 826 | if (__n == 1) |
| 659 | return j1f(__x); | |
| 827 | return j1(__x); | |
| 660 | 828 | |
| 661 | double __x0 = j0f(__x); | |
| 662 | double __x1 = j1f(__x); | |
| 829 | double __x0 = j0(__x); | |
| 830 | double __x1 = j1(__x); | |
| 663 | 831 | for (int __i = 1; __i < __n; ++__i) { |
| 664 | 832 | double __x2 = (2 * __i) / __x * __x1 - __x0; |
| 665 | 833 | __x0 = __x1; |
| 666 | 834 | __x1 = __x2; |
| 667 | 835 | } |
| 668 | ||
| 669 | 836 | return __x1; |
| 670 | 837 | } |
| 838 | ||
| 671 | 839 | __DEVICE__ |
| 672 | inline double ldexp(double __x, int __e) { return __ocml_ldexp_f64(__x, __e); } | |
| 840 | double ldexp(double __x, int __e) { return __ocml_ldexp_f64(__x, __e); } | |
| 841 | ||
| 673 | 842 | __DEVICE__ |
| 674 | inline double lgamma(double __x) { return __ocml_lgamma_f64(__x); } | |
| 843 | double lgamma(double __x) { return __ocml_lgamma_f64(__x); } | |
| 844 | ||
| 675 | 845 | __DEVICE__ |
| 676 | inline long long int llrint(double __x) { return __ocml_rint_f64(__x); } | |
| 846 | long long int llrint(double __x) { return __ocml_rint_f64(__x); } | |
| 847 | ||
| 677 | 848 | __DEVICE__ |
| 678 | inline long long int llround(double __x) { return __ocml_round_f64(__x); } | |
| 849 | long long int llround(double __x) { return __ocml_round_f64(__x); } | |
| 850 | ||
| 679 | 851 | __DEVICE__ |
| 680 | inline double log(double __x) { return __ocml_log_f64(__x); } | |
| 852 | double log(double __x) { return __ocml_log_f64(__x); } | |
| 853 | ||
| 681 | 854 | __DEVICE__ |
| 682 | inline double log10(double __x) { return __ocml_log10_f64(__x); } | |
| 855 | double log10(double __x) { return __ocml_log10_f64(__x); } | |
| 856 | ||
| 683 | 857 | __DEVICE__ |
| 684 | inline double log1p(double __x) { return __ocml_log1p_f64(__x); } | |
| 858 | double log1p(double __x) { return __ocml_log1p_f64(__x); } | |
| 859 | ||
| 685 | 860 | __DEVICE__ |
| 686 | inline double log2(double __x) { return __ocml_log2_f64(__x); } | |
| 861 | double log2(double __x) { return __ocml_log2_f64(__x); } | |
| 862 | ||
| 687 | 863 | __DEVICE__ |
| 688 | inline double logb(double __x) { return __ocml_logb_f64(__x); } | |
| 864 | double logb(double __x) { return __ocml_logb_f64(__x); } | |
| 865 | ||
| 689 | 866 | __DEVICE__ |
| 690 | inline long int lrint(double __x) { return __ocml_rint_f64(__x); } | |
| 867 | long int lrint(double __x) { return __ocml_rint_f64(__x); } | |
| 868 | ||
| 691 | 869 | __DEVICE__ |
| 692 | inline long int lround(double __x) { return __ocml_round_f64(__x); } | |
| 870 | long int lround(double __x) { return __ocml_round_f64(__x); } | |
| 871 | ||
| 693 | 872 | __DEVICE__ |
| 694 | inline double modf(double __x, double *__iptr) { | |
| 873 | double modf(double __x, double *__iptr) { | |
| 695 | 874 | double __tmp; |
| 696 | 875 | double __r = |
| 697 | 876 | __ocml_modf_f64(__x, (__attribute__((address_space(5))) double *)&__tmp); |
| ... | ... | @@ -699,8 +878,9 @@ inline double modf(double __x, double *__iptr) { |
| 699 | 878 | |
| 700 | 879 | return __r; |
| 701 | 880 | } |
| 881 | ||
| 702 | 882 | __DEVICE__ |
| 703 | inline double nan(const char *__tagp) { | |
| 883 | double nan(const char *__tagp) { | |
| 704 | 884 | #if !_WIN32 |
| 705 | 885 | union { |
| 706 | 886 | double val; |
| ... | ... | @@ -710,8 +890,8 @@ inline double nan(const char *__tagp) { |
| 710 | 890 | uint32_t exponent : 11; |
| 711 | 891 | uint32_t sign : 1; |
| 712 | 892 | } bits; |
| 713 | static_assert(sizeof(double) == sizeof(ieee_double), ""); | |
| 714 | 893 | } __tmp; |
| 894 | __static_assert_type_size_equal(sizeof(__tmp.val), sizeof(__tmp.bits)); | |
| 715 | 895 | |
| 716 | 896 | __tmp.bits.sign = 0u; |
| 717 | 897 | __tmp.bits.exponent = ~0u; |
| ... | ... | @@ -720,22 +900,24 @@ inline double nan(const char *__tagp) { |
| 720 | 900 | |
| 721 | 901 | return __tmp.val; |
| 722 | 902 | #else |
| 723 | static_assert(sizeof(uint64_t) == sizeof(double)); | |
| 724 | uint64_t val = __make_mantissa(__tagp); | |
| 725 | val |= 0xFFF << 51; | |
| 726 | return *reinterpret_cast<double *>(&val); | |
| 903 | __static_assert_type_size_equal(sizeof(uint64_t), sizeof(double)); | |
| 904 | uint64_t __val = __make_mantissa(__tagp); | |
| 905 | __val |= 0xFFF << 51; | |
| 906 | return *reinterpret_cast<double *>(&__val); | |
| 727 | 907 | #endif |
| 728 | 908 | } |
| 909 | ||
| 729 | 910 | __DEVICE__ |
| 730 | inline double nearbyint(double __x) { return __ocml_nearbyint_f64(__x); } | |
| 911 | double nearbyint(double __x) { return __ocml_nearbyint_f64(__x); } | |
| 912 | ||
| 731 | 913 | __DEVICE__ |
| 732 | inline double nextafter(double __x, double __y) { | |
| 914 | double nextafter(double __x, double __y) { | |
| 733 | 915 | return __ocml_nextafter_f64(__x, __y); |
| 734 | 916 | } |
| 917 | ||
| 735 | 918 | __DEVICE__ |
| 736 | inline double | |
| 737 | norm(int __dim, | |
| 738 | const double *__a) { // TODO: placeholder until OCML adds support. | |
| 919 | double norm(int __dim, | |
| 920 | const double *__a) { // TODO: placeholder until OCML adds support. | |
| 739 | 921 | double __r = 0; |
| 740 | 922 | while (__dim--) { |
| 741 | 923 | __r += __a[0] * __a[0]; |
| ... | ... | @@ -744,28 +926,39 @@ norm(int __dim, |
| 744 | 926 | |
| 745 | 927 | return __ocml_sqrt_f64(__r); |
| 746 | 928 | } |
| 929 | ||
| 747 | 930 | __DEVICE__ |
| 748 | inline double norm3d(double __x, double __y, double __z) { | |
| 931 | double norm3d(double __x, double __y, double __z) { | |
| 749 | 932 | return __ocml_len3_f64(__x, __y, __z); |
| 750 | 933 | } |
| 934 | ||
| 751 | 935 | __DEVICE__ |
| 752 | inline double norm4d(double __x, double __y, double __z, double __w) { | |
| 936 | double norm4d(double __x, double __y, double __z, double __w) { | |
| 753 | 937 | return __ocml_len4_f64(__x, __y, __z, __w); |
| 754 | 938 | } |
| 939 | ||
| 940 | __DEVICE__ | |
| 941 | double normcdf(double __x) { return __ocml_ncdf_f64(__x); } | |
| 942 | ||
| 755 | 943 | __DEVICE__ |
| 756 | inline double normcdf(double __x) { return __ocml_ncdf_f64(__x); } | |
| 944 | double normcdfinv(double __x) { return __ocml_ncdfinv_f64(__x); } | |
| 945 | ||
| 757 | 946 | __DEVICE__ |
| 758 | inline double normcdfinv(double __x) { return __ocml_ncdfinv_f64(__x); } | |
| 947 | double pow(double __x, double __y) { return __ocml_pow_f64(__x, __y); } | |
| 948 | ||
| 759 | 949 | __DEVICE__ |
| 760 | inline double pow(double __x, double __y) { return __ocml_pow_f64(__x, __y); } | |
| 950 | double powi(double __x, int __y) { return __ocml_pown_f64(__x, __y); } | |
| 951 | ||
| 761 | 952 | __DEVICE__ |
| 762 | inline double rcbrt(double __x) { return __ocml_rcbrt_f64(__x); } | |
| 953 | double rcbrt(double __x) { return __ocml_rcbrt_f64(__x); } | |
| 954 | ||
| 763 | 955 | __DEVICE__ |
| 764 | inline double remainder(double __x, double __y) { | |
| 956 | double remainder(double __x, double __y) { | |
| 765 | 957 | return __ocml_remainder_f64(__x, __y); |
| 766 | 958 | } |
| 959 | ||
| 767 | 960 | __DEVICE__ |
| 768 | inline double remquo(double __x, double __y, int *__quo) { | |
| 961 | double remquo(double __x, double __y, int *__quo) { | |
| 769 | 962 | int __tmp; |
| 770 | 963 | double __r = __ocml_remquo_f64( |
| 771 | 964 | __x, __y, (__attribute__((address_space(5))) int *)&__tmp); |
| ... | ... | @@ -773,16 +966,16 @@ inline double remquo(double __x, double __y, int *__quo) { |
| 773 | 966 | |
| 774 | 967 | return __r; |
| 775 | 968 | } |
| 969 | ||
| 776 | 970 | __DEVICE__ |
| 777 | inline double rhypot(double __x, double __y) { | |
| 778 | return __ocml_rhypot_f64(__x, __y); | |
| 779 | } | |
| 971 | double rhypot(double __x, double __y) { return __ocml_rhypot_f64(__x, __y); } | |
| 972 | ||
| 780 | 973 | __DEVICE__ |
| 781 | inline double rint(double __x) { return __ocml_rint_f64(__x); } | |
| 974 | double rint(double __x) { return __ocml_rint_f64(__x); } | |
| 975 | ||
| 782 | 976 | __DEVICE__ |
| 783 | inline double | |
| 784 | rnorm(int __dim, | |
| 785 | const double *__a) { // TODO: placeholder until OCML adds support. | |
| 977 | double rnorm(int __dim, | |
| 978 | const double *__a) { // TODO: placeholder until OCML adds support. | |
| 786 | 979 | double __r = 0; |
| 787 | 980 | while (__dim--) { |
| 788 | 981 | __r += __a[0] * __a[0]; |
| ... | ... | @@ -791,77 +984,93 @@ rnorm(int __dim, |
| 791 | 984 | |
| 792 | 985 | return __ocml_rsqrt_f64(__r); |
| 793 | 986 | } |
| 987 | ||
| 794 | 988 | __DEVICE__ |
| 795 | inline double rnorm3d(double __x, double __y, double __z) { | |
| 989 | double rnorm3d(double __x, double __y, double __z) { | |
| 796 | 990 | return __ocml_rlen3_f64(__x, __y, __z); |
| 797 | 991 | } |
| 992 | ||
| 798 | 993 | __DEVICE__ |
| 799 | inline double rnorm4d(double __x, double __y, double __z, double __w) { | |
| 994 | double rnorm4d(double __x, double __y, double __z, double __w) { | |
| 800 | 995 | return __ocml_rlen4_f64(__x, __y, __z, __w); |
| 801 | 996 | } |
| 997 | ||
| 802 | 998 | __DEVICE__ |
| 803 | inline double round(double __x) { return __ocml_round_f64(__x); } | |
| 999 | double round(double __x) { return __ocml_round_f64(__x); } | |
| 1000 | ||
| 804 | 1001 | __DEVICE__ |
| 805 | inline double rsqrt(double __x) { return __ocml_rsqrt_f64(__x); } | |
| 1002 | double rsqrt(double __x) { return __ocml_rsqrt_f64(__x); } | |
| 1003 | ||
| 806 | 1004 | __DEVICE__ |
| 807 | inline double scalbln(double __x, long int __n) { | |
| 1005 | double scalbln(double __x, long int __n) { | |
| 808 | 1006 | return (__n < INT_MAX) ? __ocml_scalbn_f64(__x, __n) |
| 809 | 1007 | : __ocml_scalb_f64(__x, __n); |
| 810 | 1008 | } |
| 811 | 1009 | __DEVICE__ |
| 812 | inline double scalbn(double __x, int __n) { | |
| 813 | return __ocml_scalbn_f64(__x, __n); | |
| 814 | } | |
| 1010 | double scalbn(double __x, int __n) { return __ocml_scalbn_f64(__x, __n); } | |
| 1011 | ||
| 815 | 1012 | __DEVICE__ |
| 816 | inline __RETURN_TYPE signbit(double __x) { return __ocml_signbit_f64(__x); } | |
| 1013 | __RETURN_TYPE __signbit(double __x) { return __ocml_signbit_f64(__x); } | |
| 1014 | ||
| 817 | 1015 | __DEVICE__ |
| 818 | inline double sin(double __x) { return __ocml_sin_f64(__x); } | |
| 1016 | double sin(double __x) { return __ocml_sin_f64(__x); } | |
| 1017 | ||
| 819 | 1018 | __DEVICE__ |
| 820 | inline void sincos(double __x, double *__sinptr, double *__cosptr) { | |
| 1019 | void sincos(double __x, double *__sinptr, double *__cosptr) { | |
| 821 | 1020 | double __tmp; |
| 822 | 1021 | *__sinptr = __ocml_sincos_f64( |
| 823 | 1022 | __x, (__attribute__((address_space(5))) double *)&__tmp); |
| 824 | 1023 | *__cosptr = __tmp; |
| 825 | 1024 | } |
| 1025 | ||
| 826 | 1026 | __DEVICE__ |
| 827 | inline void sincospi(double __x, double *__sinptr, double *__cosptr) { | |
| 1027 | void sincospi(double __x, double *__sinptr, double *__cosptr) { | |
| 828 | 1028 | double __tmp; |
| 829 | 1029 | *__sinptr = __ocml_sincospi_f64( |
| 830 | 1030 | __x, (__attribute__((address_space(5))) double *)&__tmp); |
| 831 | 1031 | *__cosptr = __tmp; |
| 832 | 1032 | } |
| 1033 | ||
| 833 | 1034 | __DEVICE__ |
| 834 | inline double sinh(double __x) { return __ocml_sinh_f64(__x); } | |
| 1035 | double sinh(double __x) { return __ocml_sinh_f64(__x); } | |
| 1036 | ||
| 835 | 1037 | __DEVICE__ |
| 836 | inline double sinpi(double __x) { return __ocml_sinpi_f64(__x); } | |
| 1038 | double sinpi(double __x) { return __ocml_sinpi_f64(__x); } | |
| 1039 | ||
| 837 | 1040 | __DEVICE__ |
| 838 | inline double sqrt(double __x) { return __ocml_sqrt_f64(__x); } | |
| 1041 | double sqrt(double __x) { return __ocml_sqrt_f64(__x); } | |
| 1042 | ||
| 839 | 1043 | __DEVICE__ |
| 840 | inline double tan(double __x) { return __ocml_tan_f64(__x); } | |
| 1044 | double tan(double __x) { return __ocml_tan_f64(__x); } | |
| 1045 | ||
| 841 | 1046 | __DEVICE__ |
| 842 | inline double tanh(double __x) { return __ocml_tanh_f64(__x); } | |
| 1047 | double tanh(double __x) { return __ocml_tanh_f64(__x); } | |
| 1048 | ||
| 843 | 1049 | __DEVICE__ |
| 844 | inline double tgamma(double __x) { return __ocml_tgamma_f64(__x); } | |
| 1050 | double tgamma(double __x) { return __ocml_tgamma_f64(__x); } | |
| 1051 | ||
| 845 | 1052 | __DEVICE__ |
| 846 | inline double trunc(double __x) { return __ocml_trunc_f64(__x); } | |
| 1053 | double trunc(double __x) { return __ocml_trunc_f64(__x); } | |
| 1054 | ||
| 847 | 1055 | __DEVICE__ |
| 848 | inline double y0(double __x) { return __ocml_y0_f64(__x); } | |
| 1056 | double y0(double __x) { return __ocml_y0_f64(__x); } | |
| 1057 | ||
| 849 | 1058 | __DEVICE__ |
| 850 | inline double y1(double __x) { return __ocml_y1_f64(__x); } | |
| 1059 | double y1(double __x) { return __ocml_y1_f64(__x); } | |
| 1060 | ||
| 851 | 1061 | __DEVICE__ |
| 852 | inline double yn(int __n, | |
| 853 | double __x) { // TODO: we could use Ahmes multiplication | |
| 854 | // and the Miller & Brown algorithm | |
| 1062 | double yn(int __n, double __x) { // TODO: we could use Ahmes multiplication | |
| 1063 | // and the Miller & Brown algorithm | |
| 855 | 1064 | // for linear recurrences to get O(log n) steps, but it's unclear if |
| 856 | 1065 | // it'd be beneficial in this case. Placeholder until OCML adds |
| 857 | 1066 | // support. |
| 858 | 1067 | if (__n == 0) |
| 859 | return j0f(__x); | |
| 1068 | return y0(__x); | |
| 860 | 1069 | if (__n == 1) |
| 861 | return j1f(__x); | |
| 1070 | return y1(__x); | |
| 862 | 1071 | |
| 863 | double __x0 = j0f(__x); | |
| 864 | double __x1 = j1f(__x); | |
| 1072 | double __x0 = y0(__x); | |
| 1073 | double __x1 = y1(__x); | |
| 865 | 1074 | for (int __i = 1; __i < __n; ++__i) { |
| 866 | 1075 | double __x2 = (2 * __i) / __x * __x1 - __x0; |
| 867 | 1076 | __x0 = __x1; |
| ... | ... | @@ -874,296 +1083,182 @@ inline double yn(int __n, |
| 874 | 1083 | // BEGIN INTRINSICS |
| 875 | 1084 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 876 | 1085 | __DEVICE__ |
| 877 | inline double __dadd_rd(double __x, double __y) { | |
| 1086 | double __dadd_rd(double __x, double __y) { | |
| 878 | 1087 | return __ocml_add_rtn_f64(__x, __y); |
| 879 | 1088 | } |
| 880 | #endif | |
| 881 | 1089 | __DEVICE__ |
| 882 | inline double __dadd_rn(double __x, double __y) { return __x + __y; } | |
| 883 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 1090 | double __dadd_rn(double __x, double __y) { | |
| 1091 | return __ocml_add_rte_f64(__x, __y); | |
| 1092 | } | |
| 884 | 1093 | __DEVICE__ |
| 885 | inline double __dadd_ru(double __x, double __y) { | |
| 1094 | double __dadd_ru(double __x, double __y) { | |
| 886 | 1095 | return __ocml_add_rtp_f64(__x, __y); |
| 887 | 1096 | } |
| 888 | 1097 | __DEVICE__ |
| 889 | inline double __dadd_rz(double __x, double __y) { | |
| 1098 | double __dadd_rz(double __x, double __y) { | |
| 890 | 1099 | return __ocml_add_rtz_f64(__x, __y); |
| 891 | 1100 | } |
| 1101 | #else | |
| 892 | 1102 | __DEVICE__ |
| 893 | inline double __ddiv_rd(double __x, double __y) { | |
| 1103 | double __dadd_rn(double __x, double __y) { return __x + __y; } | |
| 1104 | #endif | |
| 1105 | ||
| 1106 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 1107 | __DEVICE__ | |
| 1108 | double __ddiv_rd(double __x, double __y) { | |
| 894 | 1109 | return __ocml_div_rtn_f64(__x, __y); |
| 895 | 1110 | } |
| 896 | #endif | |
| 897 | 1111 | __DEVICE__ |
| 898 | inline double __ddiv_rn(double __x, double __y) { return __x / __y; } | |
| 899 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 1112 | double __ddiv_rn(double __x, double __y) { | |
| 1113 | return __ocml_div_rte_f64(__x, __y); | |
| 1114 | } | |
| 900 | 1115 | __DEVICE__ |
| 901 | inline double __ddiv_ru(double __x, double __y) { | |
| 1116 | double __ddiv_ru(double __x, double __y) { | |
| 902 | 1117 | return __ocml_div_rtp_f64(__x, __y); |
| 903 | 1118 | } |
| 904 | 1119 | __DEVICE__ |
| 905 | inline double __ddiv_rz(double __x, double __y) { | |
| 1120 | double __ddiv_rz(double __x, double __y) { | |
| 906 | 1121 | return __ocml_div_rtz_f64(__x, __y); |
| 907 | 1122 | } |
| 1123 | #else | |
| 1124 | __DEVICE__ | |
| 1125 | double __ddiv_rn(double __x, double __y) { return __x / __y; } | |
| 1126 | #endif | |
| 1127 | ||
| 1128 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 908 | 1129 | __DEVICE__ |
| 909 | inline double __dmul_rd(double __x, double __y) { | |
| 1130 | double __dmul_rd(double __x, double __y) { | |
| 910 | 1131 | return __ocml_mul_rtn_f64(__x, __y); |
| 911 | 1132 | } |
| 912 | #endif | |
| 913 | 1133 | __DEVICE__ |
| 914 | inline double __dmul_rn(double __x, double __y) { return __x * __y; } | |
| 915 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 1134 | double __dmul_rn(double __x, double __y) { | |
| 1135 | return __ocml_mul_rte_f64(__x, __y); | |
| 1136 | } | |
| 916 | 1137 | __DEVICE__ |
| 917 | inline double __dmul_ru(double __x, double __y) { | |
| 1138 | double __dmul_ru(double __x, double __y) { | |
| 918 | 1139 | return __ocml_mul_rtp_f64(__x, __y); |
| 919 | 1140 | } |
| 920 | 1141 | __DEVICE__ |
| 921 | inline double __dmul_rz(double __x, double __y) { | |
| 1142 | double __dmul_rz(double __x, double __y) { | |
| 922 | 1143 | return __ocml_mul_rtz_f64(__x, __y); |
| 923 | 1144 | } |
| 1145 | #else | |
| 924 | 1146 | __DEVICE__ |
| 925 | inline double __drcp_rd(double __x) { return __llvm_amdgcn_rcp_f64(__x); } | |
| 1147 | double __dmul_rn(double __x, double __y) { return __x * __y; } | |
| 926 | 1148 | #endif |
| 927 | __DEVICE__ | |
| 928 | inline double __drcp_rn(double __x) { return __llvm_amdgcn_rcp_f64(__x); } | |
| 1149 | ||
| 929 | 1150 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 930 | 1151 | __DEVICE__ |
| 931 | inline double __drcp_ru(double __x) { return __llvm_amdgcn_rcp_f64(__x); } | |
| 1152 | double __drcp_rd(double __x) { return __ocml_div_rtn_f64(1.0, __x); } | |
| 932 | 1153 | __DEVICE__ |
| 933 | inline double __drcp_rz(double __x) { return __llvm_amdgcn_rcp_f64(__x); } | |
| 1154 | double __drcp_rn(double __x) { return __ocml_div_rte_f64(1.0, __x); } | |
| 934 | 1155 | __DEVICE__ |
| 935 | inline double __dsqrt_rd(double __x) { return __ocml_sqrt_rtn_f64(__x); } | |
| 936 | #endif | |
| 1156 | double __drcp_ru(double __x) { return __ocml_div_rtp_f64(1.0, __x); } | |
| 937 | 1157 | __DEVICE__ |
| 938 | inline double __dsqrt_rn(double __x) { return __ocml_sqrt_f64(__x); } | |
| 1158 | double __drcp_rz(double __x) { return __ocml_div_rtz_f64(1.0, __x); } | |
| 1159 | #else | |
| 1160 | __DEVICE__ | |
| 1161 | double __drcp_rn(double __x) { return 1.0 / __x; } | |
| 1162 | #endif | |
| 1163 | ||
| 939 | 1164 | #if defined OCML_BASIC_ROUNDED_OPERATIONS |
| 940 | 1165 | __DEVICE__ |
| 941 | inline double __dsqrt_ru(double __x) { return __ocml_sqrt_rtp_f64(__x); } | |
| 1166 | double __dsqrt_rd(double __x) { return __ocml_sqrt_rtn_f64(__x); } | |
| 1167 | __DEVICE__ | |
| 1168 | double __dsqrt_rn(double __x) { return __ocml_sqrt_rte_f64(__x); } | |
| 1169 | __DEVICE__ | |
| 1170 | double __dsqrt_ru(double __x) { return __ocml_sqrt_rtp_f64(__x); } | |
| 942 | 1171 | __DEVICE__ |
| 943 | inline double __dsqrt_rz(double __x) { return __ocml_sqrt_rtz_f64(__x); } | |
| 1172 | double __dsqrt_rz(double __x) { return __ocml_sqrt_rtz_f64(__x); } | |
| 1173 | #else | |
| 1174 | __DEVICE__ | |
| 1175 | double __dsqrt_rn(double __x) { return __ocml_sqrt_f64(__x); } | |
| 1176 | #endif | |
| 1177 | ||
| 1178 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 944 | 1179 | __DEVICE__ |
| 945 | inline double __dsub_rd(double __x, double __y) { | |
| 1180 | double __dsub_rd(double __x, double __y) { | |
| 946 | 1181 | return __ocml_sub_rtn_f64(__x, __y); |
| 947 | 1182 | } |
| 948 | #endif | |
| 949 | 1183 | __DEVICE__ |
| 950 | inline double __dsub_rn(double __x, double __y) { return __x - __y; } | |
| 951 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 1184 | double __dsub_rn(double __x, double __y) { | |
| 1185 | return __ocml_sub_rte_f64(__x, __y); | |
| 1186 | } | |
| 952 | 1187 | __DEVICE__ |
| 953 | inline double __dsub_ru(double __x, double __y) { | |
| 1188 | double __dsub_ru(double __x, double __y) { | |
| 954 | 1189 | return __ocml_sub_rtp_f64(__x, __y); |
| 955 | 1190 | } |
| 956 | 1191 | __DEVICE__ |
| 957 | inline double __dsub_rz(double __x, double __y) { | |
| 1192 | double __dsub_rz(double __x, double __y) { | |
| 958 | 1193 | return __ocml_sub_rtz_f64(__x, __y); |
| 959 | 1194 | } |
| 1195 | #else | |
| 1196 | __DEVICE__ | |
| 1197 | double __dsub_rn(double __x, double __y) { return __x - __y; } | |
| 1198 | #endif | |
| 1199 | ||
| 1200 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 960 | 1201 | __DEVICE__ |
| 961 | inline double __fma_rd(double __x, double __y, double __z) { | |
| 1202 | double __fma_rd(double __x, double __y, double __z) { | |
| 962 | 1203 | return __ocml_fma_rtn_f64(__x, __y, __z); |
| 963 | 1204 | } |
| 964 | #endif | |
| 965 | 1205 | __DEVICE__ |
| 966 | inline double __fma_rn(double __x, double __y, double __z) { | |
| 967 | return __ocml_fma_f64(__x, __y, __z); | |
| 1206 | double __fma_rn(double __x, double __y, double __z) { | |
| 1207 | return __ocml_fma_rte_f64(__x, __y, __z); | |
| 968 | 1208 | } |
| 969 | #if defined OCML_BASIC_ROUNDED_OPERATIONS | |
| 970 | 1209 | __DEVICE__ |
| 971 | inline double __fma_ru(double __x, double __y, double __z) { | |
| 1210 | double __fma_ru(double __x, double __y, double __z) { | |
| 972 | 1211 | return __ocml_fma_rtp_f64(__x, __y, __z); |
| 973 | 1212 | } |
| 974 | 1213 | __DEVICE__ |
| 975 | inline double __fma_rz(double __x, double __y, double __z) { | |
| 1214 | double __fma_rz(double __x, double __y, double __z) { | |
| 976 | 1215 | return __ocml_fma_rtz_f64(__x, __y, __z); |
| 977 | 1216 | } |
| 1217 | #else | |
| 1218 | __DEVICE__ | |
| 1219 | double __fma_rn(double __x, double __y, double __z) { | |
| 1220 | return __ocml_fma_f64(__x, __y, __z); | |
| 1221 | } | |
| 978 | 1222 | #endif |
| 979 | 1223 | // END INTRINSICS |
| 980 | 1224 | // END DOUBLE |
| 981 | 1225 | |
| 982 | // BEGIN INTEGER | |
| 983 | __DEVICE__ | |
| 984 | inline int abs(int __x) { | |
| 985 | int __sgn = __x >> (sizeof(int) * CHAR_BIT - 1); | |
| 986 | return (__x ^ __sgn) - __sgn; | |
| 987 | } | |
| 988 | __DEVICE__ | |
| 989 | inline long labs(long __x) { | |
| 990 | long __sgn = __x >> (sizeof(long) * CHAR_BIT - 1); | |
| 991 | return (__x ^ __sgn) - __sgn; | |
| 992 | } | |
| 993 | __DEVICE__ | |
| 994 | inline long long llabs(long long __x) { | |
| 995 | long long __sgn = __x >> (sizeof(long long) * CHAR_BIT - 1); | |
| 996 | return (__x ^ __sgn) - __sgn; | |
| 997 | } | |
| 1226 | // C only macros | |
| 1227 | #if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L | |
| 1228 | #define isfinite(__x) _Generic((__x), float : __finitef, double : __finite)(__x) | |
| 1229 | #define isinf(__x) _Generic((__x), float : __isinff, double : __isinf)(__x) | |
| 1230 | #define isnan(__x) _Generic((__x), float : __isnanf, double : __isnan)(__x) | |
| 1231 | #define signbit(__x) \ | |
| 1232 | _Generic((__x), float : __signbitf, double : __signbit)(__x) | |
| 1233 | #endif // !defined(__cplusplus) && __STDC_VERSION__ >= 201112L | |
| 998 | 1234 | |
| 999 | 1235 | #if defined(__cplusplus) |
| 1000 | __DEVICE__ | |
| 1001 | inline long abs(long __x) { return labs(__x); } | |
| 1002 | __DEVICE__ | |
| 1003 | inline long long abs(long long __x) { return llabs(__x); } | |
| 1004 | #endif | |
| 1005 | // END INTEGER | |
| 1006 | ||
| 1007 | __DEVICE__ | |
| 1008 | inline _Float16 fma(_Float16 __x, _Float16 __y, _Float16 __z) { | |
| 1009 | return __ocml_fma_f16(__x, __y, __z); | |
| 1010 | } | |
| 1011 | ||
| 1012 | __DEVICE__ | |
| 1013 | inline float fma(float __x, float __y, float __z) { | |
| 1014 | return fmaf(__x, __y, __z); | |
| 1015 | } | |
| 1016 | ||
| 1017 | #pragma push_macro("__DEF_FUN1") | |
| 1018 | #pragma push_macro("__DEF_FUN2") | |
| 1019 | #pragma push_macro("__DEF_FUNI") | |
| 1020 | #pragma push_macro("__DEF_FLOAT_FUN2I") | |
| 1021 | #pragma push_macro("__HIP_OVERLOAD1") | |
| 1022 | #pragma push_macro("__HIP_OVERLOAD2") | |
| 1023 | ||
| 1024 | // __hip_enable_if::type is a type function which returns __T if __B is true. | |
| 1025 | template <bool __B, class __T = void> struct __hip_enable_if {}; | |
| 1026 | ||
| 1027 | template <class __T> struct __hip_enable_if<true, __T> { typedef __T type; }; | |
| 1028 | ||
| 1029 | // __HIP_OVERLOAD1 is used to resolve function calls with integer argument to | |
| 1030 | // avoid compilation error due to ambibuity. e.g. floor(5) is resolved with | |
| 1031 | // floor(double). | |
| 1032 | #define __HIP_OVERLOAD1(__retty, __fn) \ | |
| 1033 | template <typename __T> \ | |
| 1034 | __DEVICE__ typename __hip_enable_if<std::numeric_limits<__T>::is_integer, \ | |
| 1035 | __retty>::type \ | |
| 1036 | __fn(__T __x) { \ | |
| 1037 | return ::__fn((double)__x); \ | |
| 1038 | } | |
| 1039 | ||
| 1040 | // __HIP_OVERLOAD2 is used to resolve function calls with mixed float/double | |
| 1041 | // or integer argument to avoid compilation error due to ambibuity. e.g. | |
| 1042 | // max(5.0f, 6.0) is resolved with max(double, double). | |
| 1043 | #define __HIP_OVERLOAD2(__retty, __fn) \ | |
| 1044 | template <typename __T1, typename __T2> \ | |
| 1045 | __DEVICE__ \ | |
| 1046 | typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && \ | |
| 1047 | std::numeric_limits<__T2>::is_specialized, \ | |
| 1048 | __retty>::type \ | |
| 1049 | __fn(__T1 __x, __T2 __y) { \ | |
| 1050 | return __fn((double)__x, (double)__y); \ | |
| 1051 | } | |
| 1052 | ||
| 1053 | // Define cmath functions with float argument and returns float. | |
| 1054 | #define __DEF_FUN1(__retty, __func) \ | |
| 1055 | __DEVICE__ \ | |
| 1056 | inline float __func(float __x) { return __func##f(__x); } \ | |
| 1057 | __HIP_OVERLOAD1(__retty, __func) | |
| 1058 | ||
| 1059 | // Define cmath functions with float argument and returns __retty. | |
| 1060 | #define __DEF_FUNI(__retty, __func) \ | |
| 1061 | __DEVICE__ \ | |
| 1062 | inline __retty __func(float __x) { return __func##f(__x); } \ | |
| 1063 | __HIP_OVERLOAD1(__retty, __func) | |
| 1064 | ||
| 1065 | // define cmath functions with two float arguments. | |
| 1066 | #define __DEF_FUN2(__retty, __func) \ | |
| 1067 | __DEVICE__ \ | |
| 1068 | inline float __func(float __x, float __y) { return __func##f(__x, __y); } \ | |
| 1069 | __HIP_OVERLOAD2(__retty, __func) | |
| 1070 | ||
| 1071 | __DEF_FUN1(double, acos) | |
| 1072 | __DEF_FUN1(double, acosh) | |
| 1073 | __DEF_FUN1(double, asin) | |
| 1074 | __DEF_FUN1(double, asinh) | |
| 1075 | __DEF_FUN1(double, atan) | |
| 1076 | __DEF_FUN2(double, atan2); | |
| 1077 | __DEF_FUN1(double, atanh) | |
| 1078 | __DEF_FUN1(double, cbrt) | |
| 1079 | __DEF_FUN1(double, ceil) | |
| 1080 | __DEF_FUN2(double, copysign); | |
| 1081 | __DEF_FUN1(double, cos) | |
| 1082 | __DEF_FUN1(double, cosh) | |
| 1083 | __DEF_FUN1(double, erf) | |
| 1084 | __DEF_FUN1(double, erfc) | |
| 1085 | __DEF_FUN1(double, exp) | |
| 1086 | __DEF_FUN1(double, exp2) | |
| 1087 | __DEF_FUN1(double, expm1) | |
| 1088 | __DEF_FUN1(double, fabs) | |
| 1089 | __DEF_FUN2(double, fdim); | |
| 1090 | __DEF_FUN1(double, floor) | |
| 1091 | __DEF_FUN2(double, fmax); | |
| 1092 | __DEF_FUN2(double, fmin); | |
| 1093 | __DEF_FUN2(double, fmod); | |
| 1094 | //__HIP_OVERLOAD1(int, fpclassify) | |
| 1095 | __DEF_FUN2(double, hypot); | |
| 1096 | __DEF_FUNI(int, ilogb) | |
| 1097 | __HIP_OVERLOAD1(bool, isfinite) | |
| 1098 | __HIP_OVERLOAD2(bool, isgreater); | |
| 1099 | __HIP_OVERLOAD2(bool, isgreaterequal); | |
| 1100 | __HIP_OVERLOAD1(bool, isinf); | |
| 1101 | __HIP_OVERLOAD2(bool, isless); | |
| 1102 | __HIP_OVERLOAD2(bool, islessequal); | |
| 1103 | __HIP_OVERLOAD2(bool, islessgreater); | |
| 1104 | __HIP_OVERLOAD1(bool, isnan); | |
| 1105 | //__HIP_OVERLOAD1(bool, isnormal) | |
| 1106 | __HIP_OVERLOAD2(bool, isunordered); | |
| 1107 | __DEF_FUN1(double, lgamma) | |
| 1108 | __DEF_FUN1(double, log) | |
| 1109 | __DEF_FUN1(double, log10) | |
| 1110 | __DEF_FUN1(double, log1p) | |
| 1111 | __DEF_FUN1(double, log2) | |
| 1112 | __DEF_FUN1(double, logb) | |
| 1113 | __DEF_FUNI(long long, llrint) | |
| 1114 | __DEF_FUNI(long long, llround) | |
| 1115 | __DEF_FUNI(long, lrint) | |
| 1116 | __DEF_FUNI(long, lround) | |
| 1117 | __DEF_FUN1(double, nearbyint); | |
| 1118 | __DEF_FUN2(double, nextafter); | |
| 1119 | __DEF_FUN2(double, pow); | |
| 1120 | __DEF_FUN2(double, remainder); | |
| 1121 | __DEF_FUN1(double, rint); | |
| 1122 | __DEF_FUN1(double, round); | |
| 1123 | __HIP_OVERLOAD1(bool, signbit) | |
| 1124 | __DEF_FUN1(double, sin) | |
| 1125 | __DEF_FUN1(double, sinh) | |
| 1126 | __DEF_FUN1(double, sqrt) | |
| 1127 | __DEF_FUN1(double, tan) | |
| 1128 | __DEF_FUN1(double, tanh) | |
| 1129 | __DEF_FUN1(double, tgamma) | |
| 1130 | __DEF_FUN1(double, trunc); | |
| 1131 | ||
| 1132 | // define cmath functions with a float and an integer argument. | |
| 1133 | #define __DEF_FLOAT_FUN2I(__func) \ | |
| 1134 | __DEVICE__ \ | |
| 1135 | inline float __func(float __x, int __y) { return __func##f(__x, __y); } | |
| 1136 | __DEF_FLOAT_FUN2I(scalbn) | |
| 1137 | ||
| 1138 | template <class T> __DEVICE__ inline T min(T __arg1, T __arg2) { | |
| 1236 | template <class T> __DEVICE__ T min(T __arg1, T __arg2) { | |
| 1139 | 1237 | return (__arg1 < __arg2) ? __arg1 : __arg2; |
| 1140 | 1238 | } |
| 1141 | 1239 | |
| 1142 | template <class T> __DEVICE__ inline T max(T __arg1, T __arg2) { | |
| 1240 | template <class T> __DEVICE__ T max(T __arg1, T __arg2) { | |
| 1143 | 1241 | return (__arg1 > __arg2) ? __arg1 : __arg2; |
| 1144 | 1242 | } |
| 1145 | 1243 | |
| 1146 | __DEVICE__ inline int min(int __arg1, int __arg2) { | |
| 1244 | __DEVICE__ int min(int __arg1, int __arg2) { | |
| 1147 | 1245 | return (__arg1 < __arg2) ? __arg1 : __arg2; |
| 1148 | 1246 | } |
| 1149 | __DEVICE__ inline int max(int __arg1, int __arg2) { | |
| 1247 | __DEVICE__ int max(int __arg1, int __arg2) { | |
| 1150 | 1248 | return (__arg1 > __arg2) ? __arg1 : __arg2; |
| 1151 | 1249 | } |
| 1152 | 1250 | |
| 1153 | 1251 | __DEVICE__ |
| 1154 | inline float max(float __x, float __y) { return fmaxf(__x, __y); } | |
| 1252 | float max(float __x, float __y) { return fmaxf(__x, __y); } | |
| 1155 | 1253 | |
| 1156 | 1254 | __DEVICE__ |
| 1157 | inline double max(double __x, double __y) { return fmax(__x, __y); } | |
| 1255 | double max(double __x, double __y) { return fmax(__x, __y); } | |
| 1158 | 1256 | |
| 1159 | 1257 | __DEVICE__ |
| 1160 | inline float min(float __x, float __y) { return fminf(__x, __y); } | |
| 1258 | float min(float __x, float __y) { return fminf(__x, __y); } | |
| 1161 | 1259 | |
| 1162 | 1260 | __DEVICE__ |
| 1163 | inline double min(double __x, double __y) { return fmin(__x, __y); } | |
| 1164 | ||
| 1165 | __HIP_OVERLOAD2(double, max) | |
| 1166 | __HIP_OVERLOAD2(double, min) | |
| 1261 | double min(double __x, double __y) { return fmin(__x, __y); } | |
| 1167 | 1262 | |
| 1168 | 1263 | __host__ inline static int min(int __arg1, int __arg2) { |
| 1169 | 1264 | return std::min(__arg1, __arg2); |
| ... | ... | @@ -1172,13 +1267,8 @@ __host__ inline static int min(int __arg1, int __arg2) { |
| 1172 | 1267 | __host__ inline static int max(int __arg1, int __arg2) { |
| 1173 | 1268 | return std::max(__arg1, __arg2); |
| 1174 | 1269 | } |
| 1270 | #endif | |
| 1175 | 1271 | |
| 1176 | #pragma pop_macro("__DEF_FUN1") | |
| 1177 | #pragma pop_macro("__DEF_FUN2") | |
| 1178 | #pragma pop_macro("__DEF_FUNI") | |
| 1179 | #pragma pop_macro("__DEF_FLOAT_FUN2I") | |
| 1180 | #pragma pop_macro("__HIP_OVERLOAD1") | |
| 1181 | #pragma pop_macro("__HIP_OVERLOAD2") | |
| 1182 | 1272 | #pragma pop_macro("__DEVICE__") |
| 1183 | 1273 | #pragma pop_macro("__RETURN_TYPE") |
| 1184 | 1274 |
lib/include/__clang_hip_runtime_wrapper.h+5| ... | ... | @@ -28,6 +28,10 @@ |
| 28 | 28 | #define __shared__ __attribute__((shared)) |
| 29 | 29 | #define __constant__ __attribute__((constant)) |
| 30 | 30 | |
| 31 | #if !defined(__cplusplus) || __cplusplus < 201103L | |
| 32 | #define nullptr NULL; | |
| 33 | #endif | |
| 34 | ||
| 31 | 35 | #if __HIP_ENABLE_DEVICE_MALLOC__ |
| 32 | 36 | extern "C" __device__ void *__hip_malloc(size_t __size); |
| 33 | 37 | extern "C" __device__ void *__hip_free(void *__ptr); |
| ... | ... | @@ -51,6 +55,7 @@ static inline __device__ void *free(void *__ptr) { |
| 51 | 55 | |
| 52 | 56 | #if !_OPENMP || __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ |
| 53 | 57 | #include <__clang_cuda_math_forward_declares.h> |
| 58 | #include <__clang_hip_cmath.h> | |
| 54 | 59 | #include <__clang_cuda_complex_builtins.h> |
| 55 | 60 | |
| 56 | 61 | #include <algorithm> |
lib/include/altivec.h+1143-72| ... | ... | @@ -1709,6 +1709,20 @@ vec_cmpeq(vector double __a, vector double __b) { |
| 1709 | 1709 | } |
| 1710 | 1710 | #endif |
| 1711 | 1711 | |
| 1712 | #ifdef __POWER10_VECTOR__ | |
| 1713 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 1714 | vec_cmpeq(vector signed __int128 __a, vector signed __int128 __b) { | |
| 1715 | return (vector bool __int128)__builtin_altivec_vcmpequq( | |
| 1716 | (vector bool __int128)__a, (vector bool __int128)__b); | |
| 1717 | } | |
| 1718 | ||
| 1719 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 1720 | vec_cmpeq(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 1721 | return (vector bool __int128)__builtin_altivec_vcmpequq( | |
| 1722 | (vector bool __int128)__a, (vector bool __int128)__b); | |
| 1723 | } | |
| 1724 | #endif | |
| 1725 | ||
| 1712 | 1726 | #ifdef __POWER9_VECTOR__ |
| 1713 | 1727 | /* vec_cmpne */ |
| 1714 | 1728 | |
| ... | ... | @@ -1766,35 +1780,25 @@ vec_cmpne(vector unsigned int __a, vector unsigned int __b) { |
| 1766 | 1780 | (vector int)__b); |
| 1767 | 1781 | } |
| 1768 | 1782 | |
| 1769 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1770 | vec_cmpne(vector bool long long __a, vector bool long long __b) { | |
| 1771 | return (vector bool long long) | |
| 1772 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1773 | } | |
| 1774 | ||
| 1775 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1776 | vec_cmpne(vector signed long long __a, vector signed long long __b) { | |
| 1777 | return (vector bool long long) | |
| 1778 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1779 | } | |
| 1780 | ||
| 1781 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1782 | vec_cmpne(vector unsigned long long __a, vector unsigned long long __b) { | |
| 1783 | return (vector bool long long) | |
| 1784 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1785 | } | |
| 1786 | ||
| 1787 | 1783 | static __inline__ vector bool int __ATTRS_o_ai |
| 1788 | 1784 | vec_cmpne(vector float __a, vector float __b) { |
| 1789 | 1785 | return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a, |
| 1790 | 1786 | (vector int)__b); |
| 1791 | 1787 | } |
| 1792 | 1788 | |
| 1793 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1794 | vec_cmpne(vector double __a, vector double __b) { | |
| 1795 | return (vector bool long long) | |
| 1796 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1789 | #ifdef __POWER10_VECTOR__ | |
| 1790 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 1791 | vec_cmpne(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 1792 | return (vector bool __int128) ~(__builtin_altivec_vcmpequq( | |
| 1793 | (vector bool __int128)__a, (vector bool __int128)__b)); | |
| 1794 | } | |
| 1795 | ||
| 1796 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 1797 | vec_cmpne(vector signed __int128 __a, vector signed __int128 __b) { | |
| 1798 | return (vector bool __int128) ~(__builtin_altivec_vcmpequq( | |
| 1799 | (vector bool __int128)__a, (vector bool __int128)__b)); | |
| 1797 | 1800 | } |
| 1801 | #endif | |
| 1798 | 1802 | |
| 1799 | 1803 | /* vec_cmpnez */ |
| 1800 | 1804 | |
| ... | ... | @@ -1900,6 +1904,86 @@ vec_parity_lsbb(vector signed long long __a) { |
| 1900 | 1904 | return __builtin_altivec_vprtybd(__a); |
| 1901 | 1905 | } |
| 1902 | 1906 | |
| 1907 | #else | |
| 1908 | /* vec_cmpne */ | |
| 1909 | ||
| 1910 | static __inline__ vector bool char __ATTRS_o_ai | |
| 1911 | vec_cmpne(vector bool char __a, vector bool char __b) { | |
| 1912 | return ~(vec_cmpeq(__a, __b)); | |
| 1913 | } | |
| 1914 | ||
| 1915 | static __inline__ vector bool char __ATTRS_o_ai | |
| 1916 | vec_cmpne(vector signed char __a, vector signed char __b) { | |
| 1917 | return ~(vec_cmpeq(__a, __b)); | |
| 1918 | } | |
| 1919 | ||
| 1920 | static __inline__ vector bool char __ATTRS_o_ai | |
| 1921 | vec_cmpne(vector unsigned char __a, vector unsigned char __b) { | |
| 1922 | return ~(vec_cmpeq(__a, __b)); | |
| 1923 | } | |
| 1924 | ||
| 1925 | static __inline__ vector bool short __ATTRS_o_ai | |
| 1926 | vec_cmpne(vector bool short __a, vector bool short __b) { | |
| 1927 | return ~(vec_cmpeq(__a, __b)); | |
| 1928 | } | |
| 1929 | ||
| 1930 | static __inline__ vector bool short __ATTRS_o_ai | |
| 1931 | vec_cmpne(vector signed short __a, vector signed short __b) { | |
| 1932 | return ~(vec_cmpeq(__a, __b)); | |
| 1933 | } | |
| 1934 | ||
| 1935 | static __inline__ vector bool short __ATTRS_o_ai | |
| 1936 | vec_cmpne(vector unsigned short __a, vector unsigned short __b) { | |
| 1937 | return ~(vec_cmpeq(__a, __b)); | |
| 1938 | } | |
| 1939 | ||
| 1940 | static __inline__ vector bool int __ATTRS_o_ai | |
| 1941 | vec_cmpne(vector bool int __a, vector bool int __b) { | |
| 1942 | return ~(vec_cmpeq(__a, __b)); | |
| 1943 | } | |
| 1944 | ||
| 1945 | static __inline__ vector bool int __ATTRS_o_ai | |
| 1946 | vec_cmpne(vector signed int __a, vector signed int __b) { | |
| 1947 | return ~(vec_cmpeq(__a, __b)); | |
| 1948 | } | |
| 1949 | ||
| 1950 | static __inline__ vector bool int __ATTRS_o_ai | |
| 1951 | vec_cmpne(vector unsigned int __a, vector unsigned int __b) { | |
| 1952 | return ~(vec_cmpeq(__a, __b)); | |
| 1953 | } | |
| 1954 | ||
| 1955 | static __inline__ vector bool int __ATTRS_o_ai | |
| 1956 | vec_cmpne(vector float __a, vector float __b) { | |
| 1957 | return ~(vec_cmpeq(__a, __b)); | |
| 1958 | } | |
| 1959 | #endif | |
| 1960 | ||
| 1961 | #ifdef __POWER8_VECTOR__ | |
| 1962 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1963 | vec_cmpne(vector bool long long __a, vector bool long long __b) { | |
| 1964 | return (vector bool long long) | |
| 1965 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1966 | } | |
| 1967 | ||
| 1968 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1969 | vec_cmpne(vector signed long long __a, vector signed long long __b) { | |
| 1970 | return (vector bool long long) | |
| 1971 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1972 | } | |
| 1973 | ||
| 1974 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1975 | vec_cmpne(vector unsigned long long __a, vector unsigned long long __b) { | |
| 1976 | return (vector bool long long) | |
| 1977 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1978 | } | |
| 1979 | #endif | |
| 1980 | ||
| 1981 | #ifdef __VSX__ | |
| 1982 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 1983 | vec_cmpne(vector double __a, vector double __b) { | |
| 1984 | return (vector bool long long) | |
| 1985 | ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); | |
| 1986 | } | |
| 1903 | 1987 | #endif |
| 1904 | 1988 | |
| 1905 | 1989 | /* vec_cmpgt */ |
| ... | ... | @@ -1962,6 +2046,20 @@ vec_cmpgt(vector double __a, vector double __b) { |
| 1962 | 2046 | } |
| 1963 | 2047 | #endif |
| 1964 | 2048 | |
| 2049 | #ifdef __POWER10_VECTOR__ | |
| 2050 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2051 | vec_cmpgt(vector signed __int128 __a, vector signed __int128 __b) { | |
| 2052 | return (vector bool __int128)__builtin_altivec_vcmpgtsq( | |
| 2053 | (vector bool __int128)__a, (vector bool __int128)__b); | |
| 2054 | } | |
| 2055 | ||
| 2056 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2057 | vec_cmpgt(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 2058 | return (vector bool __int128)__builtin_altivec_vcmpgtuq( | |
| 2059 | (vector bool __int128)__a, (vector bool __int128)__b); | |
| 2060 | } | |
| 2061 | #endif | |
| 2062 | ||
| 1965 | 2063 | /* vec_cmpge */ |
| 1966 | 2064 | |
| 1967 | 2065 | static __inline__ vector bool char __ATTRS_o_ai |
| ... | ... | @@ -2022,6 +2120,18 @@ vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) { |
| 2022 | 2120 | } |
| 2023 | 2121 | #endif |
| 2024 | 2122 | |
| 2123 | #ifdef __POWER10_VECTOR__ | |
| 2124 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2125 | vec_cmpge(vector signed __int128 __a, vector signed __int128 __b) { | |
| 2126 | return ~(vec_cmpgt(__b, __a)); | |
| 2127 | } | |
| 2128 | ||
| 2129 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2130 | vec_cmpge(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 2131 | return ~(vec_cmpgt(__b, __a)); | |
| 2132 | } | |
| 2133 | #endif | |
| 2134 | ||
| 2025 | 2135 | /* vec_vcmpgefp */ |
| 2026 | 2136 | |
| 2027 | 2137 | static __inline__ vector bool int __attribute__((__always_inline__)) |
| ... | ... | @@ -2134,6 +2244,18 @@ vec_cmple(vector unsigned long long __a, vector unsigned long long __b) { |
| 2134 | 2244 | } |
| 2135 | 2245 | #endif |
| 2136 | 2246 | |
| 2247 | #ifdef __POWER10_VECTOR__ | |
| 2248 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2249 | vec_cmple(vector signed __int128 __a, vector signed __int128 __b) { | |
| 2250 | return vec_cmpge(__b, __a); | |
| 2251 | } | |
| 2252 | ||
| 2253 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2254 | vec_cmple(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 2255 | return vec_cmpge(__b, __a); | |
| 2256 | } | |
| 2257 | #endif | |
| 2258 | ||
| 2137 | 2259 | /* vec_cmplt */ |
| 2138 | 2260 | |
| 2139 | 2261 | static __inline__ vector bool char __ATTRS_o_ai |
| ... | ... | @@ -2178,6 +2300,18 @@ vec_cmplt(vector double __a, vector double __b) { |
| 2178 | 2300 | } |
| 2179 | 2301 | #endif |
| 2180 | 2302 | |
| 2303 | #ifdef __POWER10_VECTOR__ | |
| 2304 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2305 | vec_cmplt(vector signed __int128 __a, vector signed __int128 __b) { | |
| 2306 | return vec_cmpgt(__b, __a); | |
| 2307 | } | |
| 2308 | ||
| 2309 | static __inline__ vector bool __int128 __ATTRS_o_ai | |
| 2310 | vec_cmplt(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 2311 | return vec_cmpgt(__b, __a); | |
| 2312 | } | |
| 2313 | #endif | |
| 2314 | ||
| 2181 | 2315 | #ifdef __POWER8_VECTOR__ |
| 2182 | 2316 | static __inline__ vector bool long long __ATTRS_o_ai |
| 2183 | 2317 | vec_cmplt(vector signed long long __a, vector signed long long __b) { |
| ... | ... | @@ -2702,67 +2836,67 @@ vec_insert_exp(vector unsigned int __a, vector unsigned int __b) { |
| 2702 | 2836 | } |
| 2703 | 2837 | |
| 2704 | 2838 | #if defined(__powerpc64__) |
| 2705 | static __inline__ vector signed char __ATTRS_o_ai vec_xl_len(signed char *__a, | |
| 2839 | static __inline__ vector signed char __ATTRS_o_ai vec_xl_len(const signed char *__a, | |
| 2706 | 2840 | size_t __b) { |
| 2707 | 2841 | return (vector signed char)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2708 | 2842 | } |
| 2709 | 2843 | |
| 2710 | 2844 | static __inline__ vector unsigned char __ATTRS_o_ai |
| 2711 | vec_xl_len(unsigned char *__a, size_t __b) { | |
| 2845 | vec_xl_len(const unsigned char *__a, size_t __b) { | |
| 2712 | 2846 | return (vector unsigned char)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2713 | 2847 | } |
| 2714 | 2848 | |
| 2715 | static __inline__ vector signed short __ATTRS_o_ai vec_xl_len(signed short *__a, | |
| 2849 | static __inline__ vector signed short __ATTRS_o_ai vec_xl_len(const signed short *__a, | |
| 2716 | 2850 | size_t __b) { |
| 2717 | 2851 | return (vector signed short)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2718 | 2852 | } |
| 2719 | 2853 | |
| 2720 | 2854 | static __inline__ vector unsigned short __ATTRS_o_ai |
| 2721 | vec_xl_len(unsigned short *__a, size_t __b) { | |
| 2855 | vec_xl_len(const unsigned short *__a, size_t __b) { | |
| 2722 | 2856 | return (vector unsigned short)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2723 | 2857 | } |
| 2724 | 2858 | |
| 2725 | static __inline__ vector signed int __ATTRS_o_ai vec_xl_len(signed int *__a, | |
| 2859 | static __inline__ vector signed int __ATTRS_o_ai vec_xl_len(const signed int *__a, | |
| 2726 | 2860 | size_t __b) { |
| 2727 | 2861 | return (vector signed int)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2728 | 2862 | } |
| 2729 | 2863 | |
| 2730 | static __inline__ vector unsigned int __ATTRS_o_ai vec_xl_len(unsigned int *__a, | |
| 2864 | static __inline__ vector unsigned int __ATTRS_o_ai vec_xl_len(const unsigned int *__a, | |
| 2731 | 2865 | size_t __b) { |
| 2732 | 2866 | return (vector unsigned int)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2733 | 2867 | } |
| 2734 | 2868 | |
| 2735 | static __inline__ vector float __ATTRS_o_ai vec_xl_len(float *__a, size_t __b) { | |
| 2869 | static __inline__ vector float __ATTRS_o_ai vec_xl_len(const float *__a, size_t __b) { | |
| 2736 | 2870 | return (vector float)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2737 | 2871 | } |
| 2738 | 2872 | |
| 2739 | 2873 | static __inline__ vector signed __int128 __ATTRS_o_ai |
| 2740 | vec_xl_len(signed __int128 *__a, size_t __b) { | |
| 2874 | vec_xl_len(const signed __int128 *__a, size_t __b) { | |
| 2741 | 2875 | return (vector signed __int128)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2742 | 2876 | } |
| 2743 | 2877 | |
| 2744 | 2878 | static __inline__ vector unsigned __int128 __ATTRS_o_ai |
| 2745 | vec_xl_len(unsigned __int128 *__a, size_t __b) { | |
| 2879 | vec_xl_len(const unsigned __int128 *__a, size_t __b) { | |
| 2746 | 2880 | return (vector unsigned __int128)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2747 | 2881 | } |
| 2748 | 2882 | |
| 2749 | 2883 | static __inline__ vector signed long long __ATTRS_o_ai |
| 2750 | vec_xl_len(signed long long *__a, size_t __b) { | |
| 2884 | vec_xl_len(const signed long long *__a, size_t __b) { | |
| 2751 | 2885 | return (vector signed long long)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2752 | 2886 | } |
| 2753 | 2887 | |
| 2754 | 2888 | static __inline__ vector unsigned long long __ATTRS_o_ai |
| 2755 | vec_xl_len(unsigned long long *__a, size_t __b) { | |
| 2889 | vec_xl_len(const unsigned long long *__a, size_t __b) { | |
| 2756 | 2890 | return (vector unsigned long long)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2757 | 2891 | } |
| 2758 | 2892 | |
| 2759 | static __inline__ vector double __ATTRS_o_ai vec_xl_len(double *__a, | |
| 2893 | static __inline__ vector double __ATTRS_o_ai vec_xl_len(const double *__a, | |
| 2760 | 2894 | size_t __b) { |
| 2761 | 2895 | return (vector double)__builtin_vsx_lxvl(__a, (__b << 56)); |
| 2762 | 2896 | } |
| 2763 | 2897 | |
| 2764 | 2898 | static __inline__ vector unsigned char __ATTRS_o_ai |
| 2765 | vec_xl_len_r(unsigned char *__a, size_t __b) { | |
| 2899 | vec_xl_len_r(const unsigned char *__a, size_t __b) { | |
| 2766 | 2900 | vector unsigned char __res = |
| 2767 | 2901 | (vector unsigned char)__builtin_vsx_lxvll(__a, (__b << 56)); |
| 2768 | 2902 | #ifdef __LITTLE_ENDIAN__ |
| ... | ... | @@ -2862,12 +2996,12 @@ static __inline__ void __ATTRS_o_ai vec_xst_len_r(vector unsigned char __a, |
| 2862 | 2996 | #ifdef __VSX__ |
| 2863 | 2997 | static __inline__ vector float __ATTRS_o_ai vec_cpsgn(vector float __a, |
| 2864 | 2998 | vector float __b) { |
| 2865 | return __builtin_vsx_xvcpsgnsp(__a, __b); | |
| 2999 | return __builtin_vsx_xvcpsgnsp(__b, __a); | |
| 2866 | 3000 | } |
| 2867 | 3001 | |
| 2868 | 3002 | static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a, |
| 2869 | 3003 | vector double __b) { |
| 2870 | return __builtin_vsx_xvcpsgndp(__a, __b); | |
| 3004 | return __builtin_vsx_xvcpsgndp(__b, __a); | |
| 2871 | 3005 | } |
| 2872 | 3006 | #endif |
| 2873 | 3007 | |
| ... | ... | @@ -2951,6 +3085,42 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a, |
| 2951 | 3085 | |
| 2952 | 3086 | #define vec_vctuxs __builtin_altivec_vctuxs |
| 2953 | 3087 | |
| 3088 | /* vec_signext */ | |
| 3089 | ||
| 3090 | #ifdef __POWER9_VECTOR__ | |
| 3091 | static __inline__ vector signed int __ATTRS_o_ai | |
| 3092 | vec_signexti(vector signed char __a) { | |
| 3093 | return __builtin_altivec_vextsb2w(__a); | |
| 3094 | } | |
| 3095 | ||
| 3096 | static __inline__ vector signed int __ATTRS_o_ai | |
| 3097 | vec_signexti(vector signed short __a) { | |
| 3098 | return __builtin_altivec_vextsh2w(__a); | |
| 3099 | } | |
| 3100 | ||
| 3101 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 3102 | vec_signextll(vector signed char __a) { | |
| 3103 | return __builtin_altivec_vextsb2d(__a); | |
| 3104 | } | |
| 3105 | ||
| 3106 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 3107 | vec_signextll(vector signed short __a) { | |
| 3108 | return __builtin_altivec_vextsh2d(__a); | |
| 3109 | } | |
| 3110 | ||
| 3111 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 3112 | vec_signextll(vector signed int __a) { | |
| 3113 | return __builtin_altivec_vextsw2d(__a); | |
| 3114 | } | |
| 3115 | #endif | |
| 3116 | ||
| 3117 | #ifdef __POWER10_VECTOR__ | |
| 3118 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 3119 | vec_signextq(vector signed long long __a) { | |
| 3120 | return __builtin_altivec_vextsd2q(__a); | |
| 3121 | } | |
| 3122 | #endif | |
| 3123 | ||
| 2954 | 3124 | /* vec_signed */ |
| 2955 | 3125 | |
| 2956 | 3126 | static __inline__ vector signed int __ATTRS_o_ai |
| ... | ... | @@ -3288,6 +3458,66 @@ static __inline__ vector double __ATTRS_o_ai vec_div(vector double __a, |
| 3288 | 3458 | } |
| 3289 | 3459 | #endif |
| 3290 | 3460 | |
| 3461 | /* vec_dive */ | |
| 3462 | ||
| 3463 | #ifdef __POWER10_VECTOR__ | |
| 3464 | static __inline__ vector signed int __ATTRS_o_ai | |
| 3465 | vec_dive(vector signed int __a, vector signed int __b) { | |
| 3466 | return __builtin_altivec_vdivesw(__a, __b); | |
| 3467 | } | |
| 3468 | ||
| 3469 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 3470 | vec_dive(vector unsigned int __a, vector unsigned int __b) { | |
| 3471 | return __builtin_altivec_vdiveuw(__a, __b); | |
| 3472 | } | |
| 3473 | ||
| 3474 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 3475 | vec_dive(vector signed long long __a, vector signed long long __b) { | |
| 3476 | return __builtin_altivec_vdivesd(__a, __b); | |
| 3477 | } | |
| 3478 | ||
| 3479 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 3480 | vec_dive(vector unsigned long long __a, vector unsigned long long __b) { | |
| 3481 | return __builtin_altivec_vdiveud(__a, __b); | |
| 3482 | } | |
| 3483 | ||
| 3484 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 3485 | vec_dive(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 3486 | return __builtin_altivec_vdiveuq(__a, __b); | |
| 3487 | } | |
| 3488 | ||
| 3489 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 3490 | vec_dive(vector signed __int128 __a, vector signed __int128 __b) { | |
| 3491 | return __builtin_altivec_vdivesq(__a, __b); | |
| 3492 | } | |
| 3493 | #endif | |
| 3494 | ||
| 3495 | #ifdef __POWER10_VECTOR__ | |
| 3496 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 3497 | vec_div(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 3498 | return __a / __b; | |
| 3499 | } | |
| 3500 | ||
| 3501 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 3502 | vec_div(vector signed __int128 __a, vector signed __int128 __b) { | |
| 3503 | return __a / __b; | |
| 3504 | } | |
| 3505 | #endif /* __POWER10_VECTOR__ */ | |
| 3506 | ||
| 3507 | /* vec_xvtdiv */ | |
| 3508 | ||
| 3509 | #ifdef __VSX__ | |
| 3510 | static __inline__ int __ATTRS_o_ai vec_test_swdiv(vector double __a, | |
| 3511 | vector double __b) { | |
| 3512 | return __builtin_vsx_xvtdivdp(__a, __b); | |
| 3513 | } | |
| 3514 | ||
| 3515 | static __inline__ int __ATTRS_o_ai vec_test_swdivs(vector float __a, | |
| 3516 | vector float __b) { | |
| 3517 | return __builtin_vsx_xvtdivsp(__a, __b); | |
| 3518 | } | |
| 3519 | #endif | |
| 3520 | ||
| 3291 | 3521 | /* vec_dss */ |
| 3292 | 3522 | |
| 3293 | 3523 | #define vec_dss __builtin_altivec_dss |
| ... | ... | @@ -3300,23 +3530,19 @@ static __inline__ void __attribute__((__always_inline__)) vec_dssall(void) { |
| 3300 | 3530 | |
| 3301 | 3531 | /* vec_dst */ |
| 3302 | 3532 | #define vec_dst(__PTR, __CW, __STR) \ |
| 3303 | __extension__( \ | |
| 3304 | { __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); }) | |
| 3533 | __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)) | |
| 3305 | 3534 | |
| 3306 | 3535 | /* vec_dstst */ |
| 3307 | 3536 | #define vec_dstst(__PTR, __CW, __STR) \ |
| 3308 | __extension__( \ | |
| 3309 | { __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); }) | |
| 3537 | __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)) | |
| 3310 | 3538 | |
| 3311 | 3539 | /* vec_dststt */ |
| 3312 | 3540 | #define vec_dststt(__PTR, __CW, __STR) \ |
| 3313 | __extension__( \ | |
| 3314 | { __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); }) | |
| 3541 | __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)) | |
| 3315 | 3542 | |
| 3316 | 3543 | /* vec_dstt */ |
| 3317 | 3544 | #define vec_dstt(__PTR, __CW, __STR) \ |
| 3318 | __extension__( \ | |
| 3319 | { __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); }) | |
| 3545 | __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)) | |
| 3320 | 3546 | |
| 3321 | 3547 | /* vec_eqv */ |
| 3322 | 3548 | |
| ... | ... | @@ -5467,6 +5693,16 @@ vec_msum(vector unsigned short __a, vector unsigned short __b, |
| 5467 | 5693 | return __builtin_altivec_vmsumuhm(__a, __b, __c); |
| 5468 | 5694 | } |
| 5469 | 5695 | |
| 5696 | /* vec_msumc */ | |
| 5697 | ||
| 5698 | #ifdef __POWER10_VECTOR__ | |
| 5699 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 5700 | vec_msumc(vector unsigned long long __a, vector unsigned long long __b, | |
| 5701 | vector unsigned __int128 __c) { | |
| 5702 | return __builtin_altivec_vmsumcud(__a, __b, __c); | |
| 5703 | } | |
| 5704 | #endif | |
| 5705 | ||
| 5470 | 5706 | /* vec_vmsummbm */ |
| 5471 | 5707 | |
| 5472 | 5708 | static __inline__ vector int __attribute__((__always_inline__)) |
| ... | ... | @@ -5693,6 +5929,26 @@ vec_mule(vector unsigned int __a, vector unsigned int __b) { |
| 5693 | 5929 | } |
| 5694 | 5930 | #endif |
| 5695 | 5931 | |
| 5932 | #ifdef __POWER10_VECTOR__ | |
| 5933 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 5934 | vec_mule(vector signed long long __a, vector signed long long __b) { | |
| 5935 | #ifdef __LITTLE_ENDIAN__ | |
| 5936 | return __builtin_altivec_vmulosd(__a, __b); | |
| 5937 | #else | |
| 5938 | return __builtin_altivec_vmulesd(__a, __b); | |
| 5939 | #endif | |
| 5940 | } | |
| 5941 | ||
| 5942 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 5943 | vec_mule(vector unsigned long long __a, vector unsigned long long __b) { | |
| 5944 | #ifdef __LITTLE_ENDIAN__ | |
| 5945 | return __builtin_altivec_vmuloud(__a, __b); | |
| 5946 | #else | |
| 5947 | return __builtin_altivec_vmuleud(__a, __b); | |
| 5948 | #endif | |
| 5949 | } | |
| 5950 | #endif | |
| 5951 | ||
| 5696 | 5952 | /* vec_vmulesb */ |
| 5697 | 5953 | |
| 5698 | 5954 | static __inline__ vector short __attribute__((__always_inline__)) |
| ... | ... | @@ -5737,6 +5993,30 @@ vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) { |
| 5737 | 5993 | #endif |
| 5738 | 5994 | } |
| 5739 | 5995 | |
| 5996 | /* vec_mulh */ | |
| 5997 | ||
| 5998 | #ifdef __POWER10_VECTOR__ | |
| 5999 | static __inline__ vector signed int __ATTRS_o_ai | |
| 6000 | vec_mulh(vector signed int __a, vector signed int __b) { | |
| 6001 | return __builtin_altivec_vmulhsw(__a, __b); | |
| 6002 | } | |
| 6003 | ||
| 6004 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 6005 | vec_mulh(vector unsigned int __a, vector unsigned int __b) { | |
| 6006 | return __builtin_altivec_vmulhuw(__a, __b); | |
| 6007 | } | |
| 6008 | ||
| 6009 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 6010 | vec_mulh(vector signed long long __a, vector signed long long __b) { | |
| 6011 | return __builtin_altivec_vmulhsd(__a, __b); | |
| 6012 | } | |
| 6013 | ||
| 6014 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 6015 | vec_mulh(vector unsigned long long __a, vector unsigned long long __b) { | |
| 6016 | return __builtin_altivec_vmulhud(__a, __b); | |
| 6017 | } | |
| 6018 | #endif | |
| 6019 | ||
| 5740 | 6020 | /* vec_mulo */ |
| 5741 | 6021 | |
| 5742 | 6022 | static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, |
| ... | ... | @@ -5795,6 +6075,26 @@ vec_mulo(vector unsigned int __a, vector unsigned int __b) { |
| 5795 | 6075 | } |
| 5796 | 6076 | #endif |
| 5797 | 6077 | |
| 6078 | #ifdef __POWER10_VECTOR__ | |
| 6079 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 6080 | vec_mulo(vector signed long long __a, vector signed long long __b) { | |
| 6081 | #ifdef __LITTLE_ENDIAN__ | |
| 6082 | return __builtin_altivec_vmulesd(__a, __b); | |
| 6083 | #else | |
| 6084 | return __builtin_altivec_vmulosd(__a, __b); | |
| 6085 | #endif | |
| 6086 | } | |
| 6087 | ||
| 6088 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 6089 | vec_mulo(vector unsigned long long __a, vector unsigned long long __b) { | |
| 6090 | #ifdef __LITTLE_ENDIAN__ | |
| 6091 | return __builtin_altivec_vmuleud(__a, __b); | |
| 6092 | #else | |
| 6093 | return __builtin_altivec_vmuloud(__a, __b); | |
| 6094 | #endif | |
| 6095 | } | |
| 6096 | #endif | |
| 6097 | ||
| 5798 | 6098 | /* vec_vmulosb */ |
| 5799 | 6099 | |
| 5800 | 6100 | static __inline__ vector short __attribute__((__always_inline__)) |
| ... | ... | @@ -7627,6 +7927,18 @@ vec_rl(vector unsigned long long __a, vector unsigned long long __b) { |
| 7627 | 7927 | } |
| 7628 | 7928 | #endif |
| 7629 | 7929 | |
| 7930 | #ifdef __POWER10_VECTOR__ | |
| 7931 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 7932 | vec_rl(vector signed __int128 __a, vector unsigned __int128 __b) { | |
| 7933 | return (__b << __a)|(__b >> ((__CHAR_BIT__ * sizeof(vector signed __int128)) - __a)); | |
| 7934 | } | |
| 7935 | ||
| 7936 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 7937 | vec_rl(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 7938 | return (__b << __a)|(__b >> ((__CHAR_BIT__ * sizeof(vector unsigned __int128)) - __a)); | |
| 7939 | } | |
| 7940 | #endif | |
| 7941 | ||
| 7630 | 7942 | /* vec_rlmi */ |
| 7631 | 7943 | #ifdef __POWER9_VECTOR__ |
| 7632 | 7944 | static __inline__ vector unsigned int __ATTRS_o_ai |
| ... | ... | @@ -7640,10 +7952,26 @@ vec_rlmi(vector unsigned long long __a, vector unsigned long long __b, |
| 7640 | 7952 | vector unsigned long long __c) { |
| 7641 | 7953 | return __builtin_altivec_vrldmi(__a, __c, __b); |
| 7642 | 7954 | } |
| 7955 | #endif | |
| 7643 | 7956 | |
| 7644 | /* vec_rlnm */ | |
| 7645 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 7646 | vec_rlnm(vector unsigned int __a, vector unsigned int __b, | |
| 7957 | #ifdef __POWER10_VECTOR__ | |
| 7958 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 7959 | vec_rlmi(vector unsigned __int128 __a, vector unsigned __int128 __b, | |
| 7960 | vector unsigned __int128 __c) { | |
| 7961 | return __builtin_altivec_vrlqmi(__a, __c, __b); | |
| 7962 | } | |
| 7963 | ||
| 7964 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 7965 | vec_rlmi(vector signed __int128 __a, vector signed __int128 __b, | |
| 7966 | vector signed __int128 __c) { | |
| 7967 | return __builtin_altivec_vrlqmi(__a, __c, __b); | |
| 7968 | } | |
| 7969 | #endif | |
| 7970 | ||
| 7971 | /* vec_rlnm */ | |
| 7972 | #ifdef __POWER9_VECTOR__ | |
| 7973 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 7974 | vec_rlnm(vector unsigned int __a, vector unsigned int __b, | |
| 7647 | 7975 | vector unsigned int __c) { |
| 7648 | 7976 | vector unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 }; |
| 7649 | 7977 | return __builtin_altivec_vrlwnm(__a, ((__c << OneByte) | __b)); |
| ... | ... | @@ -7657,6 +7985,42 @@ vec_rlnm(vector unsigned long long __a, vector unsigned long long __b, |
| 7657 | 7985 | } |
| 7658 | 7986 | #endif |
| 7659 | 7987 | |
| 7988 | #ifdef __POWER10_VECTOR__ | |
| 7989 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 7990 | vec_rlnm(vector unsigned __int128 __a, vector unsigned __int128 __b, | |
| 7991 | vector unsigned __int128 __c) { | |
| 7992 | // Merge __b and __c using an appropriate shuffle. | |
| 7993 | vector unsigned char TmpB = (vector unsigned char)__b; | |
| 7994 | vector unsigned char TmpC = (vector unsigned char)__c; | |
| 7995 | vector unsigned char MaskAndShift = | |
| 7996 | #ifdef __LITTLE_ENDIAN__ | |
| 7997 | __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0, | |
| 7998 | 1, -1, -1, -1, -1, -1); | |
| 7999 | #else | |
| 8000 | __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1, | |
| 8001 | -1, -1, -1, -1, -1, -1, -1); | |
| 8002 | #endif | |
| 8003 | return __builtin_altivec_vrlqnm(__a, (vector unsigned __int128) MaskAndShift); | |
| 8004 | } | |
| 8005 | ||
| 8006 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 8007 | vec_rlnm(vector signed __int128 __a, vector signed __int128 __b, | |
| 8008 | vector signed __int128 __c) { | |
| 8009 | // Merge __b and __c using an appropriate shuffle. | |
| 8010 | vector unsigned char TmpB = (vector unsigned char)__b; | |
| 8011 | vector unsigned char TmpC = (vector unsigned char)__c; | |
| 8012 | vector unsigned char MaskAndShift = | |
| 8013 | #ifdef __LITTLE_ENDIAN__ | |
| 8014 | __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0, | |
| 8015 | 1, -1, -1, -1, -1, -1); | |
| 8016 | #else | |
| 8017 | __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1, | |
| 8018 | -1, -1, -1, -1, -1, -1, -1); | |
| 8019 | #endif | |
| 8020 | return __builtin_altivec_vrlqnm(__a, (vector unsigned __int128) MaskAndShift); | |
| 8021 | } | |
| 8022 | #endif | |
| 8023 | ||
| 7660 | 8024 | /* vec_vrlb */ |
| 7661 | 8025 | |
| 7662 | 8026 | static __inline__ vector signed char __ATTRS_o_ai |
| ... | ... | @@ -7771,6 +8135,18 @@ vec_vrsqrtefp(vector float __a) { |
| 7771 | 8135 | return __builtin_altivec_vrsqrtefp(__a); |
| 7772 | 8136 | } |
| 7773 | 8137 | |
| 8138 | /* vec_xvtsqrt */ | |
| 8139 | ||
| 8140 | #ifdef __VSX__ | |
| 8141 | static __inline__ int __ATTRS_o_ai vec_test_swsqrt(vector double __a) { | |
| 8142 | return __builtin_vsx_xvtsqrtdp(__a); | |
| 8143 | } | |
| 8144 | ||
| 8145 | static __inline__ int __ATTRS_o_ai vec_test_swsqrts(vector float __a) { | |
| 8146 | return __builtin_vsx_xvtsqrtsp(__a); | |
| 8147 | } | |
| 8148 | #endif | |
| 8149 | ||
| 7774 | 8150 | /* vec_sel */ |
| 7775 | 8151 | |
| 7776 | 8152 | #define __builtin_altivec_vsel_4si vec_sel |
| ... | ... | @@ -7905,6 +8281,46 @@ vec_sel(vector double __a, vector double __b, vector unsigned long long __c) { |
| 7905 | 8281 | ((vector long long)__b & (vector long long)__c); |
| 7906 | 8282 | return (vector double)__res; |
| 7907 | 8283 | } |
| 8284 | ||
| 8285 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 8286 | vec_sel(vector bool long long __a, vector bool long long __b, | |
| 8287 | vector bool long long __c) { | |
| 8288 | return (__a & ~__c) | (__b & __c); | |
| 8289 | } | |
| 8290 | ||
| 8291 | static __inline__ vector bool long long __ATTRS_o_ai | |
| 8292 | vec_sel(vector bool long long __a, vector bool long long __b, | |
| 8293 | vector unsigned long long __c) { | |
| 8294 | return (__a & ~(vector bool long long)__c) | | |
| 8295 | (__b & (vector bool long long)__c); | |
| 8296 | } | |
| 8297 | ||
| 8298 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 8299 | vec_sel(vector signed long long __a, vector signed long long __b, | |
| 8300 | vector bool long long __c) { | |
| 8301 | return (__a & ~(vector signed long long)__c) | | |
| 8302 | (__b & (vector signed long long)__c); | |
| 8303 | } | |
| 8304 | ||
| 8305 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 8306 | vec_sel(vector signed long long __a, vector signed long long __b, | |
| 8307 | vector unsigned long long __c) { | |
| 8308 | return (__a & ~(vector signed long long)__c) | | |
| 8309 | (__b & (vector signed long long)__c); | |
| 8310 | } | |
| 8311 | ||
| 8312 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 8313 | vec_sel(vector unsigned long long __a, vector unsigned long long __b, | |
| 8314 | vector bool long long __c) { | |
| 8315 | return (__a & ~(vector unsigned long long)__c) | | |
| 8316 | (__b & (vector unsigned long long)__c); | |
| 8317 | } | |
| 8318 | ||
| 8319 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 8320 | vec_sel(vector unsigned long long __a, vector unsigned long long __b, | |
| 8321 | vector unsigned long long __c) { | |
| 8322 | return (__a & ~__c) | (__b & __c); | |
| 8323 | } | |
| 7908 | 8324 | #endif |
| 7909 | 8325 | |
| 7910 | 8326 | /* vec_vsel */ |
| ... | ... | @@ -13900,6 +14316,18 @@ static __inline__ int __ATTRS_o_ai vec_all_eq(vector double __a, |
| 13900 | 14316 | } |
| 13901 | 14317 | #endif |
| 13902 | 14318 | |
| 14319 | #ifdef __POWER10_VECTOR__ | |
| 14320 | static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed __int128 __a, | |
| 14321 | vector signed __int128 __b) { | |
| 14322 | return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b); | |
| 14323 | } | |
| 14324 | ||
| 14325 | static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned __int128 __a, | |
| 14326 | vector unsigned __int128 __b) { | |
| 14327 | return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b); | |
| 14328 | } | |
| 14329 | #endif | |
| 14330 | ||
| 13903 | 14331 | /* vec_all_ge */ |
| 13904 | 14332 | |
| 13905 | 14333 | static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, |
| ... | ... | @@ -14071,6 +14499,18 @@ static __inline__ int __ATTRS_o_ai vec_all_ge(vector double __a, |
| 14071 | 14499 | } |
| 14072 | 14500 | #endif |
| 14073 | 14501 | |
| 14502 | #ifdef __POWER10_VECTOR__ | |
| 14503 | static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed __int128 __a, | |
| 14504 | vector signed __int128 __b) { | |
| 14505 | return __builtin_altivec_vcmpgtsq_p(__CR6_EQ, __b, __a); | |
| 14506 | } | |
| 14507 | ||
| 14508 | static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned __int128 __a, | |
| 14509 | vector unsigned __int128 __b) { | |
| 14510 | return __builtin_altivec_vcmpgtuq_p(__CR6_EQ, __b, __a); | |
| 14511 | } | |
| 14512 | #endif | |
| 14513 | ||
| 14074 | 14514 | /* vec_all_gt */ |
| 14075 | 14515 | |
| 14076 | 14516 | static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, |
| ... | ... | @@ -14242,6 +14682,18 @@ static __inline__ int __ATTRS_o_ai vec_all_gt(vector double __a, |
| 14242 | 14682 | } |
| 14243 | 14683 | #endif |
| 14244 | 14684 | |
| 14685 | #ifdef __POWER10_VECTOR__ | |
| 14686 | static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed __int128 __a, | |
| 14687 | vector signed __int128 __b) { | |
| 14688 | return __builtin_altivec_vcmpgtsq_p(__CR6_LT, __a, __b); | |
| 14689 | } | |
| 14690 | ||
| 14691 | static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned __int128 __a, | |
| 14692 | vector unsigned __int128 __b) { | |
| 14693 | return __builtin_altivec_vcmpgtuq_p(__CR6_LT, __a, __b); | |
| 14694 | } | |
| 14695 | #endif | |
| 14696 | ||
| 14245 | 14697 | /* vec_all_in */ |
| 14246 | 14698 | |
| 14247 | 14699 | static __inline__ int __attribute__((__always_inline__)) |
| ... | ... | @@ -14421,6 +14873,18 @@ static __inline__ int __ATTRS_o_ai vec_all_le(vector double __a, |
| 14421 | 14873 | } |
| 14422 | 14874 | #endif |
| 14423 | 14875 | |
| 14876 | #ifdef __POWER10_VECTOR__ | |
| 14877 | static __inline__ int __ATTRS_o_ai vec_all_le(vector signed __int128 __a, | |
| 14878 | vector signed __int128 __b) { | |
| 14879 | return __builtin_altivec_vcmpgtsq_p(__CR6_EQ, __a, __b); | |
| 14880 | } | |
| 14881 | ||
| 14882 | static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned __int128 __a, | |
| 14883 | vector unsigned __int128 __b) { | |
| 14884 | return __builtin_altivec_vcmpgtuq_p(__CR6_EQ, __a, __b); | |
| 14885 | } | |
| 14886 | #endif | |
| 14887 | ||
| 14424 | 14888 | /* vec_all_lt */ |
| 14425 | 14889 | |
| 14426 | 14890 | static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, |
| ... | ... | @@ -14593,6 +15057,18 @@ static __inline__ int __ATTRS_o_ai vec_all_lt(vector double __a, |
| 14593 | 15057 | } |
| 14594 | 15058 | #endif |
| 14595 | 15059 | |
| 15060 | #ifdef __POWER10_VECTOR__ | |
| 15061 | static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed __int128 __a, | |
| 15062 | vector signed __int128 __b) { | |
| 15063 | return __builtin_altivec_vcmpgtsq_p(__CR6_LT, __b, __a); | |
| 15064 | } | |
| 15065 | ||
| 15066 | static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned __int128 __a, | |
| 15067 | vector unsigned __int128 __b) { | |
| 15068 | return __builtin_altivec_vcmpgtuq_p(__CR6_LT, __b, __a); | |
| 15069 | } | |
| 15070 | #endif | |
| 15071 | ||
| 14596 | 15072 | /* vec_all_nan */ |
| 14597 | 15073 | |
| 14598 | 15074 | static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a) { |
| ... | ... | @@ -14797,6 +15273,18 @@ static __inline__ int __ATTRS_o_ai vec_all_ne(vector double __a, |
| 14797 | 15273 | } |
| 14798 | 15274 | #endif |
| 14799 | 15275 | |
| 15276 | #ifdef __POWER10_VECTOR__ | |
| 15277 | static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed __int128 __a, | |
| 15278 | vector signed __int128 __b) { | |
| 15279 | return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b); | |
| 15280 | } | |
| 15281 | ||
| 15282 | static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned __int128 __a, | |
| 15283 | vector unsigned __int128 __b) { | |
| 15284 | return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b); | |
| 15285 | } | |
| 15286 | #endif | |
| 15287 | ||
| 14800 | 15288 | /* vec_all_nge */ |
| 14801 | 15289 | |
| 14802 | 15290 | static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, |
| ... | ... | @@ -15042,6 +15530,18 @@ static __inline__ int __ATTRS_o_ai vec_any_eq(vector double __a, |
| 15042 | 15530 | } |
| 15043 | 15531 | #endif |
| 15044 | 15532 | |
| 15533 | #ifdef __POWER10_VECTOR__ | |
| 15534 | static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed __int128 __a, | |
| 15535 | vector signed __int128 __b) { | |
| 15536 | return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b); | |
| 15537 | } | |
| 15538 | ||
| 15539 | static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned __int128 __a, | |
| 15540 | vector unsigned __int128 __b) { | |
| 15541 | return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b); | |
| 15542 | } | |
| 15543 | #endif | |
| 15544 | ||
| 15045 | 15545 | /* vec_any_ge */ |
| 15046 | 15546 | |
| 15047 | 15547 | static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, |
| ... | ... | @@ -15221,6 +15721,18 @@ static __inline__ int __ATTRS_o_ai vec_any_ge(vector double __a, |
| 15221 | 15721 | } |
| 15222 | 15722 | #endif |
| 15223 | 15723 | |
| 15724 | #ifdef __POWER10_VECTOR__ | |
| 15725 | static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed __int128 __a, | |
| 15726 | vector signed __int128 __b) { | |
| 15727 | return __builtin_altivec_vcmpgtsq_p(__CR6_LT_REV, __b, __a); | |
| 15728 | } | |
| 15729 | ||
| 15730 | static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned __int128 __a, | |
| 15731 | vector unsigned __int128 __b) { | |
| 15732 | return __builtin_altivec_vcmpgtuq_p(__CR6_LT_REV, __b, __a); | |
| 15733 | } | |
| 15734 | #endif | |
| 15735 | ||
| 15224 | 15736 | /* vec_any_gt */ |
| 15225 | 15737 | |
| 15226 | 15738 | static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, |
| ... | ... | @@ -15400,6 +15912,18 @@ static __inline__ int __ATTRS_o_ai vec_any_gt(vector double __a, |
| 15400 | 15912 | } |
| 15401 | 15913 | #endif |
| 15402 | 15914 | |
| 15915 | #ifdef __POWER10_VECTOR__ | |
| 15916 | static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed __int128 __a, | |
| 15917 | vector signed __int128 __b) { | |
| 15918 | return __builtin_altivec_vcmpgtsq_p(__CR6_EQ_REV, __a, __b); | |
| 15919 | } | |
| 15920 | ||
| 15921 | static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned __int128 __a, | |
| 15922 | vector unsigned __int128 __b) { | |
| 15923 | return __builtin_altivec_vcmpgtuq_p(__CR6_EQ_REV, __a, __b); | |
| 15924 | } | |
| 15925 | #endif | |
| 15926 | ||
| 15403 | 15927 | /* vec_any_le */ |
| 15404 | 15928 | |
| 15405 | 15929 | static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, |
| ... | ... | @@ -15579,6 +16103,18 @@ static __inline__ int __ATTRS_o_ai vec_any_le(vector double __a, |
| 15579 | 16103 | } |
| 15580 | 16104 | #endif |
| 15581 | 16105 | |
| 16106 | #ifdef __POWER10_VECTOR__ | |
| 16107 | static __inline__ int __ATTRS_o_ai vec_any_le(vector signed __int128 __a, | |
| 16108 | vector signed __int128 __b) { | |
| 16109 | return __builtin_altivec_vcmpgtsq_p(__CR6_LT_REV, __a, __b); | |
| 16110 | } | |
| 16111 | ||
| 16112 | static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned __int128 __a, | |
| 16113 | vector unsigned __int128 __b) { | |
| 16114 | return __builtin_altivec_vcmpgtuq_p(__CR6_LT_REV, __a, __b); | |
| 16115 | } | |
| 16116 | #endif | |
| 16117 | ||
| 15582 | 16118 | /* vec_any_lt */ |
| 15583 | 16119 | |
| 15584 | 16120 | static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, |
| ... | ... | @@ -15758,6 +16294,18 @@ static __inline__ int __ATTRS_o_ai vec_any_lt(vector double __a, |
| 15758 | 16294 | } |
| 15759 | 16295 | #endif |
| 15760 | 16296 | |
| 16297 | #ifdef __POWER10_VECTOR__ | |
| 16298 | static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed __int128 __a, | |
| 16299 | vector signed __int128 __b) { | |
| 16300 | return __builtin_altivec_vcmpgtsq_p(__CR6_EQ_REV, __b, __a); | |
| 16301 | } | |
| 16302 | ||
| 16303 | static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned __int128 __a, | |
| 16304 | vector unsigned __int128 __b) { | |
| 16305 | return __builtin_altivec_vcmpgtuq_p(__CR6_EQ_REV, __b, __a); | |
| 16306 | } | |
| 16307 | #endif | |
| 16308 | ||
| 15761 | 16309 | /* vec_any_nan */ |
| 15762 | 16310 | |
| 15763 | 16311 | static __inline__ int __attribute__((__always_inline__)) |
| ... | ... | @@ -15953,6 +16501,18 @@ static __inline__ int __ATTRS_o_ai vec_any_ne(vector double __a, |
| 15953 | 16501 | } |
| 15954 | 16502 | #endif |
| 15955 | 16503 | |
| 16504 | #ifdef __POWER10_VECTOR__ | |
| 16505 | static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed __int128 __a, | |
| 16506 | vector signed __int128 __b) { | |
| 16507 | return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b); | |
| 16508 | } | |
| 16509 | ||
| 16510 | static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned __int128 __a, | |
| 16511 | vector unsigned __int128 __b) { | |
| 16512 | return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b); | |
| 16513 | } | |
| 16514 | #endif | |
| 16515 | ||
| 15956 | 16516 | /* vec_any_nge */ |
| 15957 | 16517 | |
| 15958 | 16518 | static __inline__ int __attribute__((__always_inline__)) |
| ... | ... | @@ -16353,41 +16913,41 @@ typedef vector unsigned int unaligned_vec_uint __attribute__((aligned(1))); |
| 16353 | 16913 | typedef vector float unaligned_vec_float __attribute__((aligned(1))); |
| 16354 | 16914 | |
| 16355 | 16915 | static inline __ATTRS_o_ai vector signed char vec_xl(signed long long __offset, |
| 16356 | signed char *__ptr) { | |
| 16916 | const signed char *__ptr) { | |
| 16357 | 16917 | return *(unaligned_vec_schar *)(__ptr + __offset); |
| 16358 | 16918 | } |
| 16359 | 16919 | |
| 16360 | 16920 | static inline __ATTRS_o_ai vector unsigned char |
| 16361 | vec_xl(signed long long __offset, unsigned char *__ptr) { | |
| 16921 | vec_xl(signed long long __offset, const unsigned char *__ptr) { | |
| 16362 | 16922 | return *(unaligned_vec_uchar*)(__ptr + __offset); |
| 16363 | 16923 | } |
| 16364 | 16924 | |
| 16365 | 16925 | static inline __ATTRS_o_ai vector signed short vec_xl(signed long long __offset, |
| 16366 | signed short *__ptr) { | |
| 16926 | const signed short *__ptr) { | |
| 16367 | 16927 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16368 | 16928 | return *(unaligned_vec_sshort *)__addr; |
| 16369 | 16929 | } |
| 16370 | 16930 | |
| 16371 | 16931 | static inline __ATTRS_o_ai vector unsigned short |
| 16372 | vec_xl(signed long long __offset, unsigned short *__ptr) { | |
| 16932 | vec_xl(signed long long __offset, const unsigned short *__ptr) { | |
| 16373 | 16933 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16374 | 16934 | return *(unaligned_vec_ushort *)__addr; |
| 16375 | 16935 | } |
| 16376 | 16936 | |
| 16377 | 16937 | static inline __ATTRS_o_ai vector signed int vec_xl(signed long long __offset, |
| 16378 | signed int *__ptr) { | |
| 16938 | const signed int *__ptr) { | |
| 16379 | 16939 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16380 | 16940 | return *(unaligned_vec_sint *)__addr; |
| 16381 | 16941 | } |
| 16382 | 16942 | |
| 16383 | 16943 | static inline __ATTRS_o_ai vector unsigned int vec_xl(signed long long __offset, |
| 16384 | unsigned int *__ptr) { | |
| 16944 | const unsigned int *__ptr) { | |
| 16385 | 16945 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16386 | 16946 | return *(unaligned_vec_uint *)__addr; |
| 16387 | 16947 | } |
| 16388 | 16948 | |
| 16389 | 16949 | static inline __ATTRS_o_ai vector float vec_xl(signed long long __offset, |
| 16390 | float *__ptr) { | |
| 16950 | const float *__ptr) { | |
| 16391 | 16951 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16392 | 16952 | return *(unaligned_vec_float *)__addr; |
| 16393 | 16953 | } |
| ... | ... | @@ -16398,19 +16958,19 @@ typedef vector unsigned long long unaligned_vec_ull __attribute__((aligned(1))); |
| 16398 | 16958 | typedef vector double unaligned_vec_double __attribute__((aligned(1))); |
| 16399 | 16959 | |
| 16400 | 16960 | static inline __ATTRS_o_ai vector signed long long |
| 16401 | vec_xl(signed long long __offset, signed long long *__ptr) { | |
| 16961 | vec_xl(signed long long __offset, const signed long long *__ptr) { | |
| 16402 | 16962 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16403 | 16963 | return *(unaligned_vec_sll *)__addr; |
| 16404 | 16964 | } |
| 16405 | 16965 | |
| 16406 | 16966 | static inline __ATTRS_o_ai vector unsigned long long |
| 16407 | vec_xl(signed long long __offset, unsigned long long *__ptr) { | |
| 16967 | vec_xl(signed long long __offset, const unsigned long long *__ptr) { | |
| 16408 | 16968 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16409 | 16969 | return *(unaligned_vec_ull *)__addr; |
| 16410 | 16970 | } |
| 16411 | 16971 | |
| 16412 | 16972 | static inline __ATTRS_o_ai vector double vec_xl(signed long long __offset, |
| 16413 | double *__ptr) { | |
| 16973 | const double *__ptr) { | |
| 16414 | 16974 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16415 | 16975 | return *(unaligned_vec_double *)__addr; |
| 16416 | 16976 | } |
| ... | ... | @@ -16421,13 +16981,13 @@ typedef vector signed __int128 unaligned_vec_si128 __attribute__((aligned(1))); |
| 16421 | 16981 | typedef vector unsigned __int128 unaligned_vec_ui128 |
| 16422 | 16982 | __attribute__((aligned(1))); |
| 16423 | 16983 | static inline __ATTRS_o_ai vector signed __int128 |
| 16424 | vec_xl(signed long long __offset, signed __int128 *__ptr) { | |
| 16984 | vec_xl(signed long long __offset, const signed __int128 *__ptr) { | |
| 16425 | 16985 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16426 | 16986 | return *(unaligned_vec_si128 *)__addr; |
| 16427 | 16987 | } |
| 16428 | 16988 | |
| 16429 | 16989 | static inline __ATTRS_o_ai vector unsigned __int128 |
| 16430 | vec_xl(signed long long __offset, unsigned __int128 *__ptr) { | |
| 16990 | vec_xl(signed long long __offset, const unsigned __int128 *__ptr) { | |
| 16431 | 16991 | signed char *__addr = (signed char *)__ptr + __offset; |
| 16432 | 16992 | return *(unaligned_vec_ui128 *)__addr; |
| 16433 | 16993 | } |
| ... | ... | @@ -16437,71 +16997,71 @@ vec_xl(signed long long __offset, unsigned __int128 *__ptr) { |
| 16437 | 16997 | |
| 16438 | 16998 | #ifdef __LITTLE_ENDIAN__ |
| 16439 | 16999 | static __inline__ vector signed char __ATTRS_o_ai |
| 16440 | vec_xl_be(signed long long __offset, signed char *__ptr) { | |
| 17000 | vec_xl_be(signed long long __offset, const signed char *__ptr) { | |
| 16441 | 17001 | vector signed char __vec = (vector signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16442 | 17002 | return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, |
| 16443 | 17003 | 13, 12, 11, 10, 9, 8); |
| 16444 | 17004 | } |
| 16445 | 17005 | |
| 16446 | 17006 | static __inline__ vector unsigned char __ATTRS_o_ai |
| 16447 | vec_xl_be(signed long long __offset, unsigned char *__ptr) { | |
| 17007 | vec_xl_be(signed long long __offset, const unsigned char *__ptr) { | |
| 16448 | 17008 | vector unsigned char __vec = (vector unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16449 | 17009 | return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, |
| 16450 | 17010 | 13, 12, 11, 10, 9, 8); |
| 16451 | 17011 | } |
| 16452 | 17012 | |
| 16453 | 17013 | static __inline__ vector signed short __ATTRS_o_ai |
| 16454 | vec_xl_be(signed long long __offset, signed short *__ptr) { | |
| 17014 | vec_xl_be(signed long long __offset, const signed short *__ptr) { | |
| 16455 | 17015 | vector signed short __vec = (vector signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16456 | 17016 | return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4); |
| 16457 | 17017 | } |
| 16458 | 17018 | |
| 16459 | 17019 | static __inline__ vector unsigned short __ATTRS_o_ai |
| 16460 | vec_xl_be(signed long long __offset, unsigned short *__ptr) { | |
| 17020 | vec_xl_be(signed long long __offset, const unsigned short *__ptr) { | |
| 16461 | 17021 | vector unsigned short __vec = (vector unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16462 | 17022 | return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4); |
| 16463 | 17023 | } |
| 16464 | 17024 | |
| 16465 | 17025 | static __inline__ vector signed int __ATTRS_o_ai |
| 16466 | vec_xl_be(signed long long __offset, signed int *__ptr) { | |
| 17026 | vec_xl_be(signed long long __offset, const signed int *__ptr) { | |
| 16467 | 17027 | return (vector signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr); |
| 16468 | 17028 | } |
| 16469 | 17029 | |
| 16470 | 17030 | static __inline__ vector unsigned int __ATTRS_o_ai |
| 16471 | vec_xl_be(signed long long __offset, unsigned int *__ptr) { | |
| 17031 | vec_xl_be(signed long long __offset, const unsigned int *__ptr) { | |
| 16472 | 17032 | return (vector unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr); |
| 16473 | 17033 | } |
| 16474 | 17034 | |
| 16475 | 17035 | static __inline__ vector float __ATTRS_o_ai |
| 16476 | vec_xl_be(signed long long __offset, float *__ptr) { | |
| 17036 | vec_xl_be(signed long long __offset, const float *__ptr) { | |
| 16477 | 17037 | return (vector float)__builtin_vsx_lxvw4x_be(__offset, __ptr); |
| 16478 | 17038 | } |
| 16479 | 17039 | |
| 16480 | 17040 | #ifdef __VSX__ |
| 16481 | 17041 | static __inline__ vector signed long long __ATTRS_o_ai |
| 16482 | vec_xl_be(signed long long __offset, signed long long *__ptr) { | |
| 17042 | vec_xl_be(signed long long __offset, const signed long long *__ptr) { | |
| 16483 | 17043 | return (vector signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16484 | 17044 | } |
| 16485 | 17045 | |
| 16486 | 17046 | static __inline__ vector unsigned long long __ATTRS_o_ai |
| 16487 | vec_xl_be(signed long long __offset, unsigned long long *__ptr) { | |
| 17047 | vec_xl_be(signed long long __offset, const unsigned long long *__ptr) { | |
| 16488 | 17048 | return (vector unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16489 | 17049 | } |
| 16490 | 17050 | |
| 16491 | 17051 | static __inline__ vector double __ATTRS_o_ai |
| 16492 | vec_xl_be(signed long long __offset, double *__ptr) { | |
| 17052 | vec_xl_be(signed long long __offset, const double *__ptr) { | |
| 16493 | 17053 | return (vector double)__builtin_vsx_lxvd2x_be(__offset, __ptr); |
| 16494 | 17054 | } |
| 16495 | 17055 | #endif |
| 16496 | 17056 | |
| 16497 | 17057 | #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) |
| 16498 | 17058 | static __inline__ vector signed __int128 __ATTRS_o_ai |
| 16499 | vec_xl_be(signed long long __offset, signed __int128 *__ptr) { | |
| 17059 | vec_xl_be(signed long long __offset, const signed __int128 *__ptr) { | |
| 16500 | 17060 | return vec_xl(__offset, __ptr); |
| 16501 | 17061 | } |
| 16502 | 17062 | |
| 16503 | 17063 | static __inline__ vector unsigned __int128 __ATTRS_o_ai |
| 16504 | vec_xl_be(signed long long __offset, unsigned __int128 *__ptr) { | |
| 17064 | vec_xl_be(signed long long __offset, const unsigned __int128 *__ptr) { | |
| 16505 | 17065 | return vec_xl(__offset, __ptr); |
| 16506 | 17066 | } |
| 16507 | 17067 | #endif |
| ... | ... | @@ -16509,6 +17069,54 @@ vec_xl_be(signed long long __offset, unsigned __int128 *__ptr) { |
| 16509 | 17069 | #define vec_xl_be vec_xl |
| 16510 | 17070 | #endif |
| 16511 | 17071 | |
| 17072 | #if defined(__POWER10_VECTOR__) && defined(__VSX__) | |
| 17073 | ||
| 17074 | /* vect_xl_sext */ | |
| 17075 | ||
| 17076 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17077 | vec_xl_sext(signed long long __offset, const signed char *__pointer) { | |
| 17078 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17079 | } | |
| 17080 | ||
| 17081 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17082 | vec_xl_sext(signed long long __offset, const signed short *__pointer) { | |
| 17083 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17084 | } | |
| 17085 | ||
| 17086 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17087 | vec_xl_sext(signed long long __offset, const signed int *__pointer) { | |
| 17088 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17089 | } | |
| 17090 | ||
| 17091 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17092 | vec_xl_sext(signed long long __offset, const signed long long *__pointer) { | |
| 17093 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17094 | } | |
| 17095 | ||
| 17096 | /* vec_xl_zext */ | |
| 17097 | ||
| 17098 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17099 | vec_xl_zext(signed long long __offset, const unsigned char *__pointer) { | |
| 17100 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17101 | } | |
| 17102 | ||
| 17103 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17104 | vec_xl_zext(signed long long __offset, const unsigned short *__pointer) { | |
| 17105 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17106 | } | |
| 17107 | ||
| 17108 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17109 | vec_xl_zext(signed long long __offset, const unsigned int *__pointer) { | |
| 17110 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17111 | } | |
| 17112 | ||
| 17113 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17114 | vec_xl_zext(signed long long __offset, const unsigned long long *__pointer) { | |
| 17115 | return (vector unsigned __int128)*(__pointer + __offset); | |
| 17116 | } | |
| 17117 | ||
| 17118 | #endif | |
| 17119 | ||
| 16512 | 17120 | /* vec_xst */ |
| 16513 | 17121 | |
| 16514 | 17122 | static inline __ATTRS_o_ai void vec_xst(vector signed char __vec, |
| ... | ... | @@ -16597,6 +17205,58 @@ static inline __ATTRS_o_ai void vec_xst(vector unsigned __int128 __vec, |
| 16597 | 17205 | } |
| 16598 | 17206 | #endif |
| 16599 | 17207 | |
| 17208 | /* vec_xst_trunc */ | |
| 17209 | ||
| 17210 | #if defined(__POWER10_VECTOR__) && defined(__VSX__) | |
| 17211 | static inline __ATTRS_o_ai void vec_xst_trunc(vector signed __int128 __vec, | |
| 17212 | signed long long __offset, | |
| 17213 | signed char *__ptr) { | |
| 17214 | *(__ptr + __offset) = (signed char)__vec[0]; | |
| 17215 | } | |
| 17216 | ||
| 17217 | static inline __ATTRS_o_ai void vec_xst_trunc(vector unsigned __int128 __vec, | |
| 17218 | signed long long __offset, | |
| 17219 | unsigned char *__ptr) { | |
| 17220 | *(__ptr + __offset) = (unsigned char)__vec[0]; | |
| 17221 | } | |
| 17222 | ||
| 17223 | static inline __ATTRS_o_ai void vec_xst_trunc(vector signed __int128 __vec, | |
| 17224 | signed long long __offset, | |
| 17225 | signed short *__ptr) { | |
| 17226 | *(__ptr + __offset) = (signed short)__vec[0]; | |
| 17227 | } | |
| 17228 | ||
| 17229 | static inline __ATTRS_o_ai void vec_xst_trunc(vector unsigned __int128 __vec, | |
| 17230 | signed long long __offset, | |
| 17231 | unsigned short *__ptr) { | |
| 17232 | *(__ptr + __offset) = (unsigned short)__vec[0]; | |
| 17233 | } | |
| 17234 | ||
| 17235 | static inline __ATTRS_o_ai void vec_xst_trunc(vector signed __int128 __vec, | |
| 17236 | signed long long __offset, | |
| 17237 | signed int *__ptr) { | |
| 17238 | *(__ptr + __offset) = (signed int)__vec[0]; | |
| 17239 | } | |
| 17240 | ||
| 17241 | static inline __ATTRS_o_ai void vec_xst_trunc(vector unsigned __int128 __vec, | |
| 17242 | signed long long __offset, | |
| 17243 | unsigned int *__ptr) { | |
| 17244 | *(__ptr + __offset) = (unsigned int)__vec[0]; | |
| 17245 | } | |
| 17246 | ||
| 17247 | static inline __ATTRS_o_ai void vec_xst_trunc(vector signed __int128 __vec, | |
| 17248 | signed long long __offset, | |
| 17249 | signed long long *__ptr) { | |
| 17250 | *(__ptr + __offset) = (signed long long)__vec[0]; | |
| 17251 | } | |
| 17252 | ||
| 17253 | static inline __ATTRS_o_ai void vec_xst_trunc(vector unsigned __int128 __vec, | |
| 17254 | signed long long __offset, | |
| 17255 | unsigned long long *__ptr) { | |
| 17256 | *(__ptr + __offset) = (unsigned long long)__vec[0]; | |
| 17257 | } | |
| 17258 | #endif | |
| 17259 | ||
| 16600 | 17260 | /* vec_xst_be */ |
| 16601 | 17261 | |
| 16602 | 17262 | #ifdef __LITTLE_ENDIAN__ |
| ... | ... | @@ -16763,6 +17423,100 @@ static vector signed char __ATTRS_o_ai vec_nabs(vector signed char __a) { |
| 16763 | 17423 | } |
| 16764 | 17424 | |
| 16765 | 17425 | #ifdef __POWER10_VECTOR__ |
| 17426 | ||
| 17427 | /* vec_extractm */ | |
| 17428 | ||
| 17429 | static __inline__ unsigned int __ATTRS_o_ai | |
| 17430 | vec_extractm(vector unsigned char __a) { | |
| 17431 | return __builtin_altivec_vextractbm(__a); | |
| 17432 | } | |
| 17433 | ||
| 17434 | static __inline__ unsigned int __ATTRS_o_ai | |
| 17435 | vec_extractm(vector unsigned short __a) { | |
| 17436 | return __builtin_altivec_vextracthm(__a); | |
| 17437 | } | |
| 17438 | ||
| 17439 | static __inline__ unsigned int __ATTRS_o_ai | |
| 17440 | vec_extractm(vector unsigned int __a) { | |
| 17441 | return __builtin_altivec_vextractwm(__a); | |
| 17442 | } | |
| 17443 | ||
| 17444 | static __inline__ unsigned int __ATTRS_o_ai | |
| 17445 | vec_extractm(vector unsigned long long __a) { | |
| 17446 | return __builtin_altivec_vextractdm(__a); | |
| 17447 | } | |
| 17448 | ||
| 17449 | static __inline__ unsigned int __ATTRS_o_ai | |
| 17450 | vec_extractm(vector unsigned __int128 __a) { | |
| 17451 | return __builtin_altivec_vextractqm(__a); | |
| 17452 | } | |
| 17453 | ||
| 17454 | /* vec_expandm */ | |
| 17455 | ||
| 17456 | static __inline__ vector unsigned char __ATTRS_o_ai | |
| 17457 | vec_expandm(vector unsigned char __a) { | |
| 17458 | return __builtin_altivec_vexpandbm(__a); | |
| 17459 | } | |
| 17460 | ||
| 17461 | static __inline__ vector unsigned short __ATTRS_o_ai | |
| 17462 | vec_expandm(vector unsigned short __a) { | |
| 17463 | return __builtin_altivec_vexpandhm(__a); | |
| 17464 | } | |
| 17465 | ||
| 17466 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 17467 | vec_expandm(vector unsigned int __a) { | |
| 17468 | return __builtin_altivec_vexpandwm(__a); | |
| 17469 | } | |
| 17470 | ||
| 17471 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 17472 | vec_expandm(vector unsigned long long __a) { | |
| 17473 | return __builtin_altivec_vexpanddm(__a); | |
| 17474 | } | |
| 17475 | ||
| 17476 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17477 | vec_expandm(vector unsigned __int128 __a) { | |
| 17478 | return __builtin_altivec_vexpandqm(__a); | |
| 17479 | } | |
| 17480 | ||
| 17481 | /* vec_cntm */ | |
| 17482 | ||
| 17483 | #define vec_cntm(__a, __mp) \ | |
| 17484 | _Generic((__a), vector unsigned char \ | |
| 17485 | : __builtin_altivec_vcntmbb((__a), (unsigned int)(__mp)), \ | |
| 17486 | vector unsigned short \ | |
| 17487 | : __builtin_altivec_vcntmbh((__a), (unsigned int)(__mp)), \ | |
| 17488 | vector unsigned int \ | |
| 17489 | : __builtin_altivec_vcntmbw((__a), (unsigned int)(__mp)), \ | |
| 17490 | vector unsigned long long \ | |
| 17491 | : __builtin_altivec_vcntmbd((__a), (unsigned int)(__mp))) | |
| 17492 | ||
| 17493 | /* vec_gen[b|h|w|d|q]m */ | |
| 17494 | ||
| 17495 | static __inline__ vector unsigned char __ATTRS_o_ai | |
| 17496 | vec_genbm(unsigned long long __bm) { | |
| 17497 | return __builtin_altivec_mtvsrbm(__bm); | |
| 17498 | } | |
| 17499 | ||
| 17500 | static __inline__ vector unsigned short __ATTRS_o_ai | |
| 17501 | vec_genhm(unsigned long long __bm) { | |
| 17502 | return __builtin_altivec_mtvsrhm(__bm); | |
| 17503 | } | |
| 17504 | ||
| 17505 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 17506 | vec_genwm(unsigned long long __bm) { | |
| 17507 | return __builtin_altivec_mtvsrwm(__bm); | |
| 17508 | } | |
| 17509 | ||
| 17510 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 17511 | vec_gendm(unsigned long long __bm) { | |
| 17512 | return __builtin_altivec_mtvsrdm(__bm); | |
| 17513 | } | |
| 17514 | ||
| 17515 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17516 | vec_genqm(unsigned long long __bm) { | |
| 17517 | return __builtin_altivec_mtvsrqm(__bm); | |
| 17518 | } | |
| 17519 | ||
| 16766 | 17520 | /* vec_pdep */ |
| 16767 | 17521 | |
| 16768 | 17522 | static __inline__ vector unsigned long long __ATTRS_o_ai |
| ... | ... | @@ -16881,6 +17635,38 @@ vec_cnttzm(vector unsigned long long __a, vector unsigned long long __b) { |
| 16881 | 17635 | return __builtin_altivec_vctzdm(__a, __b); |
| 16882 | 17636 | } |
| 16883 | 17637 | |
| 17638 | /* vec_mod */ | |
| 17639 | ||
| 17640 | static __inline__ vector signed int __ATTRS_o_ai | |
| 17641 | vec_mod(vector signed int __a, vector signed int __b) { | |
| 17642 | return __a % __b; | |
| 17643 | } | |
| 17644 | ||
| 17645 | static __inline__ vector unsigned int __ATTRS_o_ai | |
| 17646 | vec_mod(vector unsigned int __a, vector unsigned int __b) { | |
| 17647 | return __a % __b; | |
| 17648 | } | |
| 17649 | ||
| 17650 | static __inline__ vector signed long long __ATTRS_o_ai | |
| 17651 | vec_mod(vector signed long long __a, vector signed long long __b) { | |
| 17652 | return __a % __b; | |
| 17653 | } | |
| 17654 | ||
| 17655 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 17656 | vec_mod(vector unsigned long long __a, vector unsigned long long __b) { | |
| 17657 | return __a % __b; | |
| 17658 | } | |
| 17659 | ||
| 17660 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 17661 | vec_mod(vector signed __int128 __a, vector signed __int128 __b) { | |
| 17662 | return __a % __b; | |
| 17663 | } | |
| 17664 | ||
| 17665 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 17666 | vec_mod(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 17667 | return __a % __b; | |
| 17668 | } | |
| 17669 | ||
| 16884 | 17670 | /* vec_sldbi */ |
| 16885 | 17671 | |
| 16886 | 17672 | #define vec_sldb(__a, __b, __c) __builtin_altivec_vsldbi(__a, __b, (__c & 0x7)) |
| ... | ... | @@ -17027,6 +17813,92 @@ vec_inserth(vector unsigned int __a, vector unsigned int __b, |
| 17027 | 17813 | #endif |
| 17028 | 17814 | } |
| 17029 | 17815 | |
| 17816 | /* vec_extractl */ | |
| 17817 | ||
| 17818 | static __inline__ vector unsigned long long __ATTRS_o_ai vec_extractl( | |
| 17819 | vector unsigned char __a, vector unsigned char __b, unsigned int __c) { | |
| 17820 | #ifdef __LITTLE_ENDIAN__ | |
| 17821 | return __builtin_altivec_vextdubvrx(__a, __b, __c); | |
| 17822 | #else | |
| 17823 | vector unsigned long long __ret = __builtin_altivec_vextdubvlx(__a, __b, __c); | |
| 17824 | return vec_sld(__ret, __ret, 8); | |
| 17825 | #endif | |
| 17826 | } | |
| 17827 | ||
| 17828 | static __inline__ vector unsigned long long __ATTRS_o_ai vec_extractl( | |
| 17829 | vector unsigned short __a, vector unsigned short __b, unsigned int __c) { | |
| 17830 | #ifdef __LITTLE_ENDIAN__ | |
| 17831 | return __builtin_altivec_vextduhvrx(__a, __b, __c); | |
| 17832 | #else | |
| 17833 | vector unsigned long long __ret = __builtin_altivec_vextduhvlx(__a, __b, __c); | |
| 17834 | return vec_sld(__ret, __ret, 8); | |
| 17835 | #endif | |
| 17836 | } | |
| 17837 | ||
| 17838 | static __inline__ vector unsigned long long __ATTRS_o_ai vec_extractl( | |
| 17839 | vector unsigned int __a, vector unsigned int __b, unsigned int __c) { | |
| 17840 | #ifdef __LITTLE_ENDIAN__ | |
| 17841 | return __builtin_altivec_vextduwvrx(__a, __b, __c); | |
| 17842 | #else | |
| 17843 | vector unsigned long long __ret = __builtin_altivec_vextduwvlx(__a, __b, __c); | |
| 17844 | return vec_sld(__ret, __ret, 8); | |
| 17845 | #endif | |
| 17846 | } | |
| 17847 | ||
| 17848 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 17849 | vec_extractl(vector unsigned long long __a, vector unsigned long long __b, | |
| 17850 | unsigned int __c) { | |
| 17851 | #ifdef __LITTLE_ENDIAN__ | |
| 17852 | return __builtin_altivec_vextddvrx(__a, __b, __c); | |
| 17853 | #else | |
| 17854 | vector unsigned long long __ret = __builtin_altivec_vextddvlx(__a, __b, __c); | |
| 17855 | return vec_sld(__ret, __ret, 8); | |
| 17856 | #endif | |
| 17857 | } | |
| 17858 | ||
| 17859 | /* vec_extracth */ | |
| 17860 | ||
| 17861 | static __inline__ vector unsigned long long __ATTRS_o_ai vec_extracth( | |
| 17862 | vector unsigned char __a, vector unsigned char __b, unsigned int __c) { | |
| 17863 | #ifdef __LITTLE_ENDIAN__ | |
| 17864 | return __builtin_altivec_vextdubvlx(__a, __b, __c); | |
| 17865 | #else | |
| 17866 | vector unsigned long long __ret = __builtin_altivec_vextdubvrx(__a, __b, __c); | |
| 17867 | return vec_sld(__ret, __ret, 8); | |
| 17868 | #endif | |
| 17869 | } | |
| 17870 | ||
| 17871 | static __inline__ vector unsigned long long __ATTRS_o_ai vec_extracth( | |
| 17872 | vector unsigned short __a, vector unsigned short __b, unsigned int __c) { | |
| 17873 | #ifdef __LITTLE_ENDIAN__ | |
| 17874 | return __builtin_altivec_vextduhvlx(__a, __b, __c); | |
| 17875 | #else | |
| 17876 | vector unsigned long long __ret = __builtin_altivec_vextduhvrx(__a, __b, __c); | |
| 17877 | return vec_sld(__ret, __ret, 8); | |
| 17878 | #endif | |
| 17879 | } | |
| 17880 | ||
| 17881 | static __inline__ vector unsigned long long __ATTRS_o_ai vec_extracth( | |
| 17882 | vector unsigned int __a, vector unsigned int __b, unsigned int __c) { | |
| 17883 | #ifdef __LITTLE_ENDIAN__ | |
| 17884 | return __builtin_altivec_vextduwvlx(__a, __b, __c); | |
| 17885 | #else | |
| 17886 | vector unsigned long long __ret = __builtin_altivec_vextduwvrx(__a, __b, __c); | |
| 17887 | return vec_sld(__ret, __ret, 8); | |
| 17888 | #endif | |
| 17889 | } | |
| 17890 | ||
| 17891 | static __inline__ vector unsigned long long __ATTRS_o_ai | |
| 17892 | vec_extracth(vector unsigned long long __a, vector unsigned long long __b, | |
| 17893 | unsigned int __c) { | |
| 17894 | #ifdef __LITTLE_ENDIAN__ | |
| 17895 | return __builtin_altivec_vextddvlx(__a, __b, __c); | |
| 17896 | #else | |
| 17897 | vector unsigned long long __ret = __builtin_altivec_vextddvrx(__a, __b, __c); | |
| 17898 | return vec_sld(__ret, __ret, 8); | |
| 17899 | #endif | |
| 17900 | } | |
| 17901 | ||
| 17030 | 17902 | #ifdef __VSX__ |
| 17031 | 17903 | |
| 17032 | 17904 | /* vec_permx */ |
| ... | ... | @@ -17095,6 +17967,14 @@ vec_blendv(vector double __a, vector double __b, |
| 17095 | 17967 | return __builtin_vsx_xxblendvd(__a, __b, __c); |
| 17096 | 17968 | } |
| 17097 | 17969 | |
| 17970 | /* vec_replace_elt */ | |
| 17971 | ||
| 17972 | #define vec_replace_elt __builtin_altivec_vec_replace_elt | |
| 17973 | ||
| 17974 | /* vec_replace_unaligned */ | |
| 17975 | ||
| 17976 | #define vec_replace_unaligned __builtin_altivec_vec_replace_unaligned | |
| 17977 | ||
| 17098 | 17978 | /* vec_splati */ |
| 17099 | 17979 | |
| 17100 | 17980 | #define vec_splati(__a) \ |
| ... | ... | @@ -17161,6 +18041,197 @@ vec_test_lsbb_all_zeros(vector unsigned char __a) { |
| 17161 | 18041 | return __builtin_vsx_xvtlsbb(__a, 0); |
| 17162 | 18042 | } |
| 17163 | 18043 | #endif /* __VSX__ */ |
| 18044 | ||
| 18045 | /* vec_stril */ | |
| 18046 | ||
| 18047 | static __inline__ vector unsigned char __ATTRS_o_ai | |
| 18048 | vec_stril(vector unsigned char __a) { | |
| 18049 | #ifdef __LITTLE_ENDIAN__ | |
| 18050 | return __builtin_altivec_vstribr((vector signed char)__a); | |
| 18051 | #else | |
| 18052 | return __builtin_altivec_vstribl((vector signed char)__a); | |
| 18053 | #endif | |
| 18054 | } | |
| 18055 | ||
| 18056 | static __inline__ vector signed char __ATTRS_o_ai | |
| 18057 | vec_stril(vector signed char __a) { | |
| 18058 | #ifdef __LITTLE_ENDIAN__ | |
| 18059 | return __builtin_altivec_vstribr(__a); | |
| 18060 | #else | |
| 18061 | return __builtin_altivec_vstribl(__a); | |
| 18062 | #endif | |
| 18063 | } | |
| 18064 | ||
| 18065 | static __inline__ vector unsigned short __ATTRS_o_ai | |
| 18066 | vec_stril(vector unsigned short __a) { | |
| 18067 | #ifdef __LITTLE_ENDIAN__ | |
| 18068 | return __builtin_altivec_vstrihr((vector signed short)__a); | |
| 18069 | #else | |
| 18070 | return __builtin_altivec_vstrihl((vector signed short)__a); | |
| 18071 | #endif | |
| 18072 | } | |
| 18073 | ||
| 18074 | static __inline__ vector signed short __ATTRS_o_ai | |
| 18075 | vec_stril(vector signed short __a) { | |
| 18076 | #ifdef __LITTLE_ENDIAN__ | |
| 18077 | return __builtin_altivec_vstrihr(__a); | |
| 18078 | #else | |
| 18079 | return __builtin_altivec_vstrihl(__a); | |
| 18080 | #endif | |
| 18081 | } | |
| 18082 | ||
| 18083 | /* vec_stril_p */ | |
| 18084 | ||
| 18085 | static __inline__ int __ATTRS_o_ai vec_stril_p(vector unsigned char __a) { | |
| 18086 | #ifdef __LITTLE_ENDIAN__ | |
| 18087 | return __builtin_altivec_vstribr_p(__CR6_EQ, (vector signed char)__a); | |
| 18088 | #else | |
| 18089 | return __builtin_altivec_vstribl_p(__CR6_EQ, (vector signed char)__a); | |
| 18090 | #endif | |
| 18091 | } | |
| 18092 | ||
| 18093 | static __inline__ int __ATTRS_o_ai vec_stril_p(vector signed char __a) { | |
| 18094 | #ifdef __LITTLE_ENDIAN__ | |
| 18095 | return __builtin_altivec_vstribr_p(__CR6_EQ, __a); | |
| 18096 | #else | |
| 18097 | return __builtin_altivec_vstribl_p(__CR6_EQ, __a); | |
| 18098 | #endif | |
| 18099 | } | |
| 18100 | ||
| 18101 | static __inline__ int __ATTRS_o_ai vec_stril_p(vector unsigned short __a) { | |
| 18102 | #ifdef __LITTLE_ENDIAN__ | |
| 18103 | return __builtin_altivec_vstrihr_p(__CR6_EQ, (vector signed short)__a); | |
| 18104 | #else | |
| 18105 | return __builtin_altivec_vstrihl_p(__CR6_EQ, (vector signed short)__a); | |
| 18106 | #endif | |
| 18107 | } | |
| 18108 | ||
| 18109 | static __inline__ int __ATTRS_o_ai vec_stril_p(vector signed short __a) { | |
| 18110 | #ifdef __LITTLE_ENDIAN__ | |
| 18111 | return __builtin_altivec_vstrihr_p(__CR6_EQ, __a); | |
| 18112 | #else | |
| 18113 | return __builtin_altivec_vstrihl_p(__CR6_EQ, __a); | |
| 18114 | #endif | |
| 18115 | } | |
| 18116 | ||
| 18117 | /* vec_strir */ | |
| 18118 | ||
| 18119 | static __inline__ vector unsigned char __ATTRS_o_ai | |
| 18120 | vec_strir(vector unsigned char __a) { | |
| 18121 | #ifdef __LITTLE_ENDIAN__ | |
| 18122 | return __builtin_altivec_vstribl((vector signed char)__a); | |
| 18123 | #else | |
| 18124 | return __builtin_altivec_vstribr((vector signed char)__a); | |
| 18125 | #endif | |
| 18126 | } | |
| 18127 | ||
| 18128 | static __inline__ vector signed char __ATTRS_o_ai | |
| 18129 | vec_strir(vector signed char __a) { | |
| 18130 | #ifdef __LITTLE_ENDIAN__ | |
| 18131 | return __builtin_altivec_vstribl(__a); | |
| 18132 | #else | |
| 18133 | return __builtin_altivec_vstribr(__a); | |
| 18134 | #endif | |
| 18135 | } | |
| 18136 | ||
| 18137 | static __inline__ vector unsigned short __ATTRS_o_ai | |
| 18138 | vec_strir(vector unsigned short __a) { | |
| 18139 | #ifdef __LITTLE_ENDIAN__ | |
| 18140 | return __builtin_altivec_vstrihl((vector signed short)__a); | |
| 18141 | #else | |
| 18142 | return __builtin_altivec_vstrihr((vector signed short)__a); | |
| 18143 | #endif | |
| 18144 | } | |
| 18145 | ||
| 18146 | static __inline__ vector signed short __ATTRS_o_ai | |
| 18147 | vec_strir(vector signed short __a) { | |
| 18148 | #ifdef __LITTLE_ENDIAN__ | |
| 18149 | return __builtin_altivec_vstrihl(__a); | |
| 18150 | #else | |
| 18151 | return __builtin_altivec_vstrihr(__a); | |
| 18152 | #endif | |
| 18153 | } | |
| 18154 | ||
| 18155 | /* vec_strir_p */ | |
| 18156 | ||
| 18157 | static __inline__ int __ATTRS_o_ai vec_strir_p(vector unsigned char __a) { | |
| 18158 | #ifdef __LITTLE_ENDIAN__ | |
| 18159 | return __builtin_altivec_vstribl_p(__CR6_EQ, (vector signed char)__a); | |
| 18160 | #else | |
| 18161 | return __builtin_altivec_vstribr_p(__CR6_EQ, (vector signed char)__a); | |
| 18162 | #endif | |
| 18163 | } | |
| 18164 | ||
| 18165 | static __inline__ int __ATTRS_o_ai vec_strir_p(vector signed char __a) { | |
| 18166 | #ifdef __LITTLE_ENDIAN__ | |
| 18167 | return __builtin_altivec_vstribl_p(__CR6_EQ, __a); | |
| 18168 | #else | |
| 18169 | return __builtin_altivec_vstribr_p(__CR6_EQ, __a); | |
| 18170 | #endif | |
| 18171 | } | |
| 18172 | ||
| 18173 | static __inline__ int __ATTRS_o_ai vec_strir_p(vector unsigned short __a) { | |
| 18174 | #ifdef __LITTLE_ENDIAN__ | |
| 18175 | return __builtin_altivec_vstrihl_p(__CR6_EQ, (vector signed short)__a); | |
| 18176 | #else | |
| 18177 | return __builtin_altivec_vstrihr_p(__CR6_EQ, (vector signed short)__a); | |
| 18178 | #endif | |
| 18179 | } | |
| 18180 | ||
| 18181 | static __inline__ int __ATTRS_o_ai vec_strir_p(vector signed short __a) { | |
| 18182 | #ifdef __LITTLE_ENDIAN__ | |
| 18183 | return __builtin_altivec_vstrihl_p(__CR6_EQ, __a); | |
| 18184 | #else | |
| 18185 | return __builtin_altivec_vstrihr_p(__CR6_EQ, __a); | |
| 18186 | #endif | |
| 18187 | } | |
| 18188 | ||
| 18189 | /* vs[l | r | ra] */ | |
| 18190 | ||
| 18191 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 18192 | vec_sl(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 18193 | return __a << (__b % (vector unsigned __int128)(sizeof(unsigned __int128) * | |
| 18194 | __CHAR_BIT__)); | |
| 18195 | } | |
| 18196 | ||
| 18197 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 18198 | vec_sl(vector signed __int128 __a, vector unsigned __int128 __b) { | |
| 18199 | return __a << (__b % (vector unsigned __int128)(sizeof(unsigned __int128) * | |
| 18200 | __CHAR_BIT__)); | |
| 18201 | } | |
| 18202 | ||
| 18203 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 18204 | vec_sr(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 18205 | return __a >> (__b % (vector unsigned __int128)(sizeof(unsigned __int128) * | |
| 18206 | __CHAR_BIT__)); | |
| 18207 | } | |
| 18208 | ||
| 18209 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 18210 | vec_sr(vector signed __int128 __a, vector unsigned __int128 __b) { | |
| 18211 | return ( | |
| 18212 | vector signed __int128)(((vector unsigned __int128)__a) >> | |
| 18213 | (__b % | |
| 18214 | (vector unsigned __int128)(sizeof( | |
| 18215 | unsigned __int128) * | |
| 18216 | __CHAR_BIT__))); | |
| 18217 | } | |
| 18218 | ||
| 18219 | static __inline__ vector unsigned __int128 __ATTRS_o_ai | |
| 18220 | vec_sra(vector unsigned __int128 __a, vector unsigned __int128 __b) { | |
| 18221 | return ( | |
| 18222 | vector unsigned __int128)(((vector signed __int128)__a) >> | |
| 18223 | (__b % | |
| 18224 | (vector unsigned __int128)(sizeof( | |
| 18225 | unsigned __int128) * | |
| 18226 | __CHAR_BIT__))); | |
| 18227 | } | |
| 18228 | ||
| 18229 | static __inline__ vector signed __int128 __ATTRS_o_ai | |
| 18230 | vec_sra(vector signed __int128 __a, vector unsigned __int128 __b) { | |
| 18231 | return __a >> (__b % (vector unsigned __int128)(sizeof(unsigned __int128) * | |
| 18232 | __CHAR_BIT__)); | |
| 18233 | } | |
| 18234 | ||
| 17164 | 18235 | #endif /* __POWER10_VECTOR__ */ |
| 17165 | 18236 | |
| 17166 | 18237 | #undef __ATTRS_o_ai |
lib/include/amxintrin.h+75-22| ... | ... | @@ -15,8 +15,8 @@ |
| 15 | 15 | #define __AMXINTRIN_H |
| 16 | 16 | #ifdef __x86_64__ |
| 17 | 17 | |
| 18 | #define __DEFAULT_FN_ATTRS \ | |
| 19 | __attribute__((__always_inline__, __nodebug__, __target__("amx-tile"))) | |
| 18 | #define __DEFAULT_FN_ATTRS_TILE \ | |
| 19 | __attribute__((__always_inline__, __nodebug__, __target__("amx-tile"))) | |
| 20 | 20 | |
| 21 | 21 | /// Load tile configuration from a 64-byte memory location specified by |
| 22 | 22 | /// "mem_addr". The tile configuration includes the tile type palette, the |
| ... | ... | @@ -31,9 +31,8 @@ |
| 31 | 31 | /// |
| 32 | 32 | /// \param __config |
| 33 | 33 | /// A pointer to 512-bits configuration |
| 34 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 35 | _tile_loadconfig(const void *__config) | |
| 36 | { | |
| 34 | static __inline__ void __DEFAULT_FN_ATTRS_TILE | |
| 35 | _tile_loadconfig(const void *__config) { | |
| 37 | 36 | __builtin_ia32_tile_loadconfig(__config); |
| 38 | 37 | } |
| 39 | 38 | |
| ... | ... | @@ -48,9 +47,8 @@ _tile_loadconfig(const void *__config) |
| 48 | 47 | /// |
| 49 | 48 | /// \param __config |
| 50 | 49 | /// A pointer to 512-bits configuration |
| 51 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 52 | _tile_storeconfig(void *__config) | |
| 53 | { | |
| 50 | static __inline__ void __DEFAULT_FN_ATTRS_TILE | |
| 51 | _tile_storeconfig(void *__config) { | |
| 54 | 52 | __builtin_ia32_tile_storeconfig(__config); |
| 55 | 53 | } |
| 56 | 54 | |
| ... | ... | @@ -60,9 +58,7 @@ _tile_storeconfig(void *__config) |
| 60 | 58 | /// \headerfile <x86intrin.h> |
| 61 | 59 | /// |
| 62 | 60 | /// This intrinsic corresponds to the <c> TILERELEASE </c> instruction. |
| 63 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 64 | _tile_release(void) | |
| 65 | { | |
| 61 | static __inline__ void __DEFAULT_FN_ATTRS_TILE _tile_release(void) { | |
| 66 | 62 | __builtin_ia32_tilerelease(); |
| 67 | 63 | } |
| 68 | 64 | |
| ... | ... | @@ -80,8 +76,9 @@ _tile_release(void) |
| 80 | 76 | /// A pointer to base address. |
| 81 | 77 | /// \param stride |
| 82 | 78 | /// The stride between the rows' data to be loaded in memory. |
| 83 | #define _tile_loadd(dst, base, stride) \ | |
| 84 | __builtin_ia32_tileloadd64((dst), ((const void *)(base)), (__SIZE_TYPE__)(stride)) | |
| 79 | #define _tile_loadd(dst, base, stride) \ | |
| 80 | __builtin_ia32_tileloadd64((dst), ((const void *)(base)), \ | |
| 81 | (__SIZE_TYPE__)(stride)) | |
| 85 | 82 | |
| 86 | 83 | /// Load tile rows from memory specifieid by "base" address and "stride" into |
| 87 | 84 | /// destination tile "dst" using the tile configuration previously configured |
| ... | ... | @@ -99,8 +96,9 @@ _tile_release(void) |
| 99 | 96 | /// A pointer to base address. |
| 100 | 97 | /// \param stride |
| 101 | 98 | /// The stride between the rows' data to be loaded in memory. |
| 102 | #define _tile_stream_loadd(dst, base, stride) \ | |
| 103 | __builtin_ia32_tileloaddt164((dst), ((const void *)(base)), (__SIZE_TYPE__)(stride)) | |
| 99 | #define _tile_stream_loadd(dst, base, stride) \ | |
| 100 | __builtin_ia32_tileloaddt164((dst), ((const void *)(base)), \ | |
| 101 | (__SIZE_TYPE__)(stride)) | |
| 104 | 102 | |
| 105 | 103 | /// Store the tile specified by "src" to memory specifieid by "base" address and |
| 106 | 104 | /// "stride" using the tile configuration previously configured via |
| ... | ... | @@ -116,7 +114,7 @@ _tile_release(void) |
| 116 | 114 | /// A pointer to base address. |
| 117 | 115 | /// \param stride |
| 118 | 116 | /// The stride between the rows' data to be stored in memory. |
| 119 | #define _tile_stored(dst, base, stride) \ | |
| 117 | #define _tile_stored(dst, base, stride) \ | |
| 120 | 118 | __builtin_ia32_tilestored64((dst), ((void *)(base)), (__SIZE_TYPE__)(stride)) |
| 121 | 119 | |
| 122 | 120 | /// Zero the tile specified by "tdest". |
| ... | ... | @@ -145,7 +143,8 @@ _tile_release(void) |
| 145 | 143 | /// The 1st source tile. Max size is 1024 Bytes. |
| 146 | 144 | /// \param src1 |
| 147 | 145 | /// The 2nd source tile. Max size is 1024 Bytes. |
| 148 | #define _tile_dpbssd(dst, src0, src1) __builtin_ia32_tdpbssd((dst), (src0), (src1)) | |
| 146 | #define _tile_dpbssd(dst, src0, src1) \ | |
| 147 | __builtin_ia32_tdpbssd((dst), (src0), (src1)) | |
| 149 | 148 | |
| 150 | 149 | /// Compute dot-product of bytes in tiles with a source/destination accumulator. |
| 151 | 150 | /// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with |
| ... | ... | @@ -163,7 +162,8 @@ _tile_release(void) |
| 163 | 162 | /// The 1st source tile. Max size is 1024 Bytes. |
| 164 | 163 | /// \param src1 |
| 165 | 164 | /// The 2nd source tile. Max size is 1024 Bytes. |
| 166 | #define _tile_dpbsud(dst, src0, src1) __builtin_ia32_tdpbsud((dst), (src0), (src1)) | |
| 165 | #define _tile_dpbsud(dst, src0, src1) \ | |
| 166 | __builtin_ia32_tdpbsud((dst), (src0), (src1)) | |
| 167 | 167 | |
| 168 | 168 | /// Compute dot-product of bytes in tiles with a source/destination accumulator. |
| 169 | 169 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with |
| ... | ... | @@ -181,7 +181,8 @@ _tile_release(void) |
| 181 | 181 | /// The 1st source tile. Max size is 1024 Bytes. |
| 182 | 182 | /// \param src1 |
| 183 | 183 | /// The 2nd source tile. Max size is 1024 Bytes. |
| 184 | #define _tile_dpbusd(dst, src0, src1) __builtin_ia32_tdpbusd((dst), (src0), (src1)) | |
| 184 | #define _tile_dpbusd(dst, src0, src1) \ | |
| 185 | __builtin_ia32_tdpbusd((dst), (src0), (src1)) | |
| 185 | 186 | |
| 186 | 187 | /// Compute dot-product of bytes in tiles with a source/destination accumulator. |
| 187 | 188 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with |
| ... | ... | @@ -199,7 +200,8 @@ _tile_release(void) |
| 199 | 200 | /// The 1st source tile. Max size is 1024 Bytes. |
| 200 | 201 | /// \param src1 |
| 201 | 202 | /// The 2nd source tile. Max size is 1024 Bytes. |
| 202 | #define _tile_dpbuud(dst, src0, src1) __builtin_ia32_tdpbuud((dst), (src0), (src1)) | |
| 203 | #define _tile_dpbuud(dst, src0, src1) \ | |
| 204 | __builtin_ia32_tdpbuud((dst), (src0), (src1)) | |
| 203 | 205 | |
| 204 | 206 | /// Compute dot-product of BF16 (16-bit) floating-point pairs in tiles src0 and |
| 205 | 207 | /// src1, accumulating the intermediate single-precision (32-bit) floating-point |
| ... | ... | @@ -216,10 +218,61 @@ _tile_release(void) |
| 216 | 218 | /// The 1st source tile. Max size is 1024 Bytes. |
| 217 | 219 | /// \param src1 |
| 218 | 220 | /// The 2nd source tile. Max size is 1024 Bytes. |
| 219 | #define _tile_dpbf16ps(dst, src0, src1) \ | |
| 221 | #define _tile_dpbf16ps(dst, src0, src1) \ | |
| 220 | 222 | __builtin_ia32_tdpbf16ps((dst), (src0), (src1)) |
| 221 | 223 | |
| 222 | #undef __DEFAULT_FN_ATTRS | |
| 224 | #define __DEFAULT_FN_ATTRS_INT8 \ | |
| 225 | __attribute__((__always_inline__, __nodebug__, __target__("amx-int8"))) | |
| 226 | ||
| 227 | typedef int _tile1024i __attribute__((__vector_size__(1024), __aligned__(64))); | |
| 228 | static __inline__ _tile1024i __DEFAULT_FN_ATTRS_INT8 | |
| 229 | _tile_loadd_internal(unsigned short m, unsigned short n, const void *base, | |
| 230 | __SIZE_TYPE__ stride) { | |
| 231 | return __builtin_ia32_tileloadd64_internal(m, n, base, | |
| 232 | (__SIZE_TYPE__)(stride)); | |
| 233 | } | |
| 234 | ||
| 235 | static __inline__ _tile1024i __DEFAULT_FN_ATTRS_INT8 | |
| 236 | _tile_dpbssd_internal(unsigned short m, unsigned short n, unsigned short k, | |
| 237 | _tile1024i dst, _tile1024i src1, _tile1024i src2) { | |
| 238 | return __builtin_ia32_tdpbssd_internal(m, n, k, dst, src1, src2); | |
| 239 | } | |
| 240 | ||
| 241 | static __inline__ void __DEFAULT_FN_ATTRS_INT8 | |
| 242 | _tile_stored_internal(unsigned short m, unsigned short n, void *base, | |
| 243 | __SIZE_TYPE__ stride, _tile1024i tile) { | |
| 244 | return __builtin_ia32_tilestored64_internal(m, n, base, | |
| 245 | (__SIZE_TYPE__)(stride), tile); | |
| 246 | } | |
| 247 | ||
| 248 | typedef struct __tile1024i_str { | |
| 249 | const unsigned short row; | |
| 250 | const unsigned short col; | |
| 251 | _tile1024i tile; | |
| 252 | } __tile1024i; | |
| 253 | ||
| 254 | __DEFAULT_FN_ATTRS_TILE | |
| 255 | static void __tile_loadd(__tile1024i *dst, const void *base, | |
| 256 | __SIZE_TYPE__ stride) { | |
| 257 | dst->tile = _tile_loadd_internal(dst->row, dst->col, base, stride); | |
| 258 | } | |
| 259 | ||
| 260 | __DEFAULT_FN_ATTRS_INT8 | |
| 261 | static void __tile_dpbssd(__tile1024i *dst, __tile1024i src1, | |
| 262 | __tile1024i src2) { | |
| 263 | dst->tile = _tile_dpbssd_internal(src1.row, src2.col, src1.col, dst->tile, | |
| 264 | src1.tile, src2.tile); | |
| 265 | } | |
| 266 | ||
| 267 | __DEFAULT_FN_ATTRS_TILE | |
| 268 | static void __tile_stored(void *base, __SIZE_TYPE__ stride, __tile1024i src) { | |
| 269 | _tile_stored_internal(src.row, src.col, base, stride, src.tile); | |
| 270 | } | |
| 271 | ||
| 272 | __DEFAULT_FN_ATTRS_TILE | |
| 273 | static void __tile_zero(__tile1024i *dst) { | |
| 274 | dst->tile = __builtin_ia32_tilezero_internal(dst->row, dst->col); | |
| 275 | } | |
| 223 | 276 | |
| 224 | 277 | #endif /* __x86_64__ */ |
| 225 | 278 | #endif /* __AMXINTRIN_H */ |
lib/include/arm_acle.h+26| ... | ... | @@ -639,6 +639,32 @@ __jcvt(double __a) { |
| 639 | 639 | } |
| 640 | 640 | #endif |
| 641 | 641 | |
| 642 | /* Armv8.7-A load/store 64-byte intrinsics */ | |
| 643 | #if __ARM_64BIT_STATE && defined(__ARM_FEATURE_LS64) | |
| 644 | typedef struct { | |
| 645 | uint64_t val[8]; | |
| 646 | } data512_t; | |
| 647 | ||
| 648 | static __inline__ data512_t __attribute__((__always_inline__, __nodebug__)) | |
| 649 | __arm_ld64b(const void *__addr) { | |
| 650 | data512_t __value; | |
| 651 | __builtin_arm_ld64b(__addr, __value.val); | |
| 652 | return __value; | |
| 653 | } | |
| 654 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) | |
| 655 | __arm_st64b(void *__addr, data512_t __value) { | |
| 656 | __builtin_arm_st64b(__addr, __value.val); | |
| 657 | } | |
| 658 | static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__)) | |
| 659 | __arm_st64bv(void *__addr, data512_t __value) { | |
| 660 | return __builtin_arm_st64bv(__addr, __value.val); | |
| 661 | } | |
| 662 | static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__)) | |
| 663 | __arm_st64bv0(void *__addr, data512_t __value) { | |
| 664 | return __builtin_arm_st64bv0(__addr, __value.val); | |
| 665 | } | |
| 666 | #endif | |
| 667 | ||
| 642 | 668 | /* 10.1 Special register intrinsics */ |
| 643 | 669 | #define __arm_rsr(sysreg) __builtin_arm_rsr(sysreg) |
| 644 | 670 | #define __arm_rsr64(sysreg) __builtin_arm_rsr64(sysreg) |
lib/include/arm_neon.h+7183-5513| ... | ... | @@ -40429,110 +40429,1846 @@ __ai float32x4_t vcaddq_rot90_f32(float32x4_t __p0, float32x4_t __p1) { |
| 40429 | 40429 | } |
| 40430 | 40430 | #endif |
| 40431 | 40431 | |
| 40432 | #ifdef __LITTLE_ENDIAN__ | |
| 40433 | __ai float32x4_t vcmlaq_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40434 | float32x4_t __ret; | |
| 40435 | __ret = (float32x4_t) __builtin_neon_vcmlaq_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40436 | return __ret; | |
| 40437 | } | |
| 40438 | #else | |
| 40439 | __ai float32x4_t vcmlaq_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40440 | float32x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 40441 | float32x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 40442 | float32x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 40443 | float32x4_t __ret; | |
| 40444 | __ret = (float32x4_t) __builtin_neon_vcmlaq_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 41); | |
| 40445 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 40446 | return __ret; | |
| 40447 | } | |
| 40448 | __ai float32x4_t __noswap_vcmlaq_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40449 | float32x4_t __ret; | |
| 40450 | __ret = (float32x4_t) __builtin_neon_vcmlaq_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40451 | return __ret; | |
| 40452 | } | |
| 40453 | #endif | |
| 40454 | ||
| 40455 | #ifdef __LITTLE_ENDIAN__ | |
| 40456 | __ai float32x2_t vcmla_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40457 | float32x2_t __ret; | |
| 40458 | __ret = (float32x2_t) __builtin_neon_vcmla_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40459 | return __ret; | |
| 40460 | } | |
| 40461 | #else | |
| 40462 | __ai float32x2_t vcmla_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40463 | float32x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 40464 | float32x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 40465 | float32x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 40466 | float32x2_t __ret; | |
| 40467 | __ret = (float32x2_t) __builtin_neon_vcmla_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 9); | |
| 40468 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40469 | return __ret; | |
| 40470 | } | |
| 40471 | __ai float32x2_t __noswap_vcmla_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40472 | float32x2_t __ret; | |
| 40473 | __ret = (float32x2_t) __builtin_neon_vcmla_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40474 | return __ret; | |
| 40475 | } | |
| 40476 | #endif | |
| 40477 | ||
| 40478 | #ifdef __LITTLE_ENDIAN__ | |
| 40479 | #define vcmla_lane_f32(__p0_169, __p1_169, __p2_169, __p3_169) __extension__ ({ \ | |
| 40480 | float32x2_t __s0_169 = __p0_169; \ | |
| 40481 | float32x2_t __s1_169 = __p1_169; \ | |
| 40482 | float32x2_t __s2_169 = __p2_169; \ | |
| 40483 | float32x2_t __ret_169; \ | |
| 40484 | float32x2_t __reint_169 = __s2_169; \ | |
| 40485 | uint64x1_t __reint1_169 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_169, __p3_169)}; \ | |
| 40486 | __ret_169 = vcmla_f32(__s0_169, __s1_169, *(float32x2_t *) &__reint1_169); \ | |
| 40487 | __ret_169; \ | |
| 40488 | }) | |
| 40489 | #else | |
| 40490 | #define vcmla_lane_f32(__p0_170, __p1_170, __p2_170, __p3_170) __extension__ ({ \ | |
| 40491 | float32x2_t __s0_170 = __p0_170; \ | |
| 40492 | float32x2_t __s1_170 = __p1_170; \ | |
| 40493 | float32x2_t __s2_170 = __p2_170; \ | |
| 40494 | float32x2_t __rev0_170; __rev0_170 = __builtin_shufflevector(__s0_170, __s0_170, 1, 0); \ | |
| 40495 | float32x2_t __rev1_170; __rev1_170 = __builtin_shufflevector(__s1_170, __s1_170, 1, 0); \ | |
| 40496 | float32x2_t __rev2_170; __rev2_170 = __builtin_shufflevector(__s2_170, __s2_170, 1, 0); \ | |
| 40497 | float32x2_t __ret_170; \ | |
| 40498 | float32x2_t __reint_170 = __rev2_170; \ | |
| 40499 | uint64x1_t __reint1_170 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_170, __p3_170)}; \ | |
| 40500 | __ret_170 = __noswap_vcmla_f32(__rev0_170, __rev1_170, *(float32x2_t *) &__reint1_170); \ | |
| 40501 | __ret_170 = __builtin_shufflevector(__ret_170, __ret_170, 1, 0); \ | |
| 40502 | __ret_170; \ | |
| 40503 | }) | |
| 40504 | #endif | |
| 40505 | ||
| 40506 | #ifdef __LITTLE_ENDIAN__ | |
| 40507 | #define vcmlaq_lane_f32(__p0_171, __p1_171, __p2_171, __p3_171) __extension__ ({ \ | |
| 40508 | float32x4_t __s0_171 = __p0_171; \ | |
| 40509 | float32x4_t __s1_171 = __p1_171; \ | |
| 40510 | float32x2_t __s2_171 = __p2_171; \ | |
| 40511 | float32x4_t __ret_171; \ | |
| 40512 | float32x2_t __reint_171 = __s2_171; \ | |
| 40513 | uint64x2_t __reint1_171 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_171, __p3_171), vget_lane_u64(*(uint64x1_t *) &__reint_171, __p3_171)}; \ | |
| 40514 | __ret_171 = vcmlaq_f32(__s0_171, __s1_171, *(float32x4_t *) &__reint1_171); \ | |
| 40515 | __ret_171; \ | |
| 40516 | }) | |
| 40517 | #else | |
| 40518 | #define vcmlaq_lane_f32(__p0_172, __p1_172, __p2_172, __p3_172) __extension__ ({ \ | |
| 40519 | float32x4_t __s0_172 = __p0_172; \ | |
| 40520 | float32x4_t __s1_172 = __p1_172; \ | |
| 40521 | float32x2_t __s2_172 = __p2_172; \ | |
| 40522 | float32x4_t __rev0_172; __rev0_172 = __builtin_shufflevector(__s0_172, __s0_172, 3, 2, 1, 0); \ | |
| 40523 | float32x4_t __rev1_172; __rev1_172 = __builtin_shufflevector(__s1_172, __s1_172, 3, 2, 1, 0); \ | |
| 40524 | float32x2_t __rev2_172; __rev2_172 = __builtin_shufflevector(__s2_172, __s2_172, 1, 0); \ | |
| 40525 | float32x4_t __ret_172; \ | |
| 40526 | float32x2_t __reint_172 = __rev2_172; \ | |
| 40527 | uint64x2_t __reint1_172 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_172, __p3_172), vget_lane_u64(*(uint64x1_t *) &__reint_172, __p3_172)}; \ | |
| 40528 | __ret_172 = __noswap_vcmlaq_f32(__rev0_172, __rev1_172, *(float32x4_t *) &__reint1_172); \ | |
| 40529 | __ret_172 = __builtin_shufflevector(__ret_172, __ret_172, 3, 2, 1, 0); \ | |
| 40530 | __ret_172; \ | |
| 40531 | }) | |
| 40532 | #endif | |
| 40533 | ||
| 40534 | #ifdef __LITTLE_ENDIAN__ | |
| 40535 | #define vcmla_laneq_f32(__p0_173, __p1_173, __p2_173, __p3_173) __extension__ ({ \ | |
| 40536 | float32x2_t __s0_173 = __p0_173; \ | |
| 40537 | float32x2_t __s1_173 = __p1_173; \ | |
| 40538 | float32x4_t __s2_173 = __p2_173; \ | |
| 40539 | float32x2_t __ret_173; \ | |
| 40540 | float32x4_t __reint_173 = __s2_173; \ | |
| 40541 | uint64x1_t __reint1_173 = (uint64x1_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_173, __p3_173)}; \ | |
| 40542 | __ret_173 = vcmla_f32(__s0_173, __s1_173, *(float32x2_t *) &__reint1_173); \ | |
| 40543 | __ret_173; \ | |
| 40544 | }) | |
| 40545 | #else | |
| 40546 | #define vcmla_laneq_f32(__p0_174, __p1_174, __p2_174, __p3_174) __extension__ ({ \ | |
| 40547 | float32x2_t __s0_174 = __p0_174; \ | |
| 40548 | float32x2_t __s1_174 = __p1_174; \ | |
| 40549 | float32x4_t __s2_174 = __p2_174; \ | |
| 40550 | float32x2_t __rev0_174; __rev0_174 = __builtin_shufflevector(__s0_174, __s0_174, 1, 0); \ | |
| 40551 | float32x2_t __rev1_174; __rev1_174 = __builtin_shufflevector(__s1_174, __s1_174, 1, 0); \ | |
| 40552 | float32x4_t __rev2_174; __rev2_174 = __builtin_shufflevector(__s2_174, __s2_174, 3, 2, 1, 0); \ | |
| 40553 | float32x2_t __ret_174; \ | |
| 40554 | float32x4_t __reint_174 = __rev2_174; \ | |
| 40555 | uint64x1_t __reint1_174 = (uint64x1_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_174, __p3_174)}; \ | |
| 40556 | __ret_174 = __noswap_vcmla_f32(__rev0_174, __rev1_174, *(float32x2_t *) &__reint1_174); \ | |
| 40557 | __ret_174 = __builtin_shufflevector(__ret_174, __ret_174, 1, 0); \ | |
| 40558 | __ret_174; \ | |
| 40559 | }) | |
| 40560 | #endif | |
| 40561 | ||
| 40562 | #ifdef __LITTLE_ENDIAN__ | |
| 40563 | #define vcmlaq_laneq_f32(__p0_175, __p1_175, __p2_175, __p3_175) __extension__ ({ \ | |
| 40564 | float32x4_t __s0_175 = __p0_175; \ | |
| 40565 | float32x4_t __s1_175 = __p1_175; \ | |
| 40566 | float32x4_t __s2_175 = __p2_175; \ | |
| 40567 | float32x4_t __ret_175; \ | |
| 40568 | float32x4_t __reint_175 = __s2_175; \ | |
| 40569 | uint64x2_t __reint1_175 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_175, __p3_175), vgetq_lane_u64(*(uint64x2_t *) &__reint_175, __p3_175)}; \ | |
| 40570 | __ret_175 = vcmlaq_f32(__s0_175, __s1_175, *(float32x4_t *) &__reint1_175); \ | |
| 40571 | __ret_175; \ | |
| 40572 | }) | |
| 40573 | #else | |
| 40574 | #define vcmlaq_laneq_f32(__p0_176, __p1_176, __p2_176, __p3_176) __extension__ ({ \ | |
| 40575 | float32x4_t __s0_176 = __p0_176; \ | |
| 40576 | float32x4_t __s1_176 = __p1_176; \ | |
| 40577 | float32x4_t __s2_176 = __p2_176; \ | |
| 40578 | float32x4_t __rev0_176; __rev0_176 = __builtin_shufflevector(__s0_176, __s0_176, 3, 2, 1, 0); \ | |
| 40579 | float32x4_t __rev1_176; __rev1_176 = __builtin_shufflevector(__s1_176, __s1_176, 3, 2, 1, 0); \ | |
| 40580 | float32x4_t __rev2_176; __rev2_176 = __builtin_shufflevector(__s2_176, __s2_176, 3, 2, 1, 0); \ | |
| 40581 | float32x4_t __ret_176; \ | |
| 40582 | float32x4_t __reint_176 = __rev2_176; \ | |
| 40583 | uint64x2_t __reint1_176 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_176, __p3_176), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_176, __p3_176)}; \ | |
| 40584 | __ret_176 = __noswap_vcmlaq_f32(__rev0_176, __rev1_176, *(float32x4_t *) &__reint1_176); \ | |
| 40585 | __ret_176 = __builtin_shufflevector(__ret_176, __ret_176, 3, 2, 1, 0); \ | |
| 40586 | __ret_176; \ | |
| 40587 | }) | |
| 40588 | #endif | |
| 40589 | ||
| 40590 | #ifdef __LITTLE_ENDIAN__ | |
| 40591 | __ai float32x4_t vcmlaq_rot180_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40592 | float32x4_t __ret; | |
| 40593 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40594 | return __ret; | |
| 40595 | } | |
| 40596 | #else | |
| 40597 | __ai float32x4_t vcmlaq_rot180_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40598 | float32x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 40599 | float32x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 40600 | float32x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 40601 | float32x4_t __ret; | |
| 40602 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 41); | |
| 40603 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 40604 | return __ret; | |
| 40605 | } | |
| 40606 | __ai float32x4_t __noswap_vcmlaq_rot180_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40607 | float32x4_t __ret; | |
| 40608 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40609 | return __ret; | |
| 40610 | } | |
| 40611 | #endif | |
| 40612 | ||
| 40613 | #ifdef __LITTLE_ENDIAN__ | |
| 40614 | __ai float32x2_t vcmla_rot180_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40615 | float32x2_t __ret; | |
| 40616 | __ret = (float32x2_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40617 | return __ret; | |
| 40618 | } | |
| 40619 | #else | |
| 40620 | __ai float32x2_t vcmla_rot180_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40621 | float32x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 40622 | float32x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 40623 | float32x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 40624 | float32x2_t __ret; | |
| 40625 | __ret = (float32x2_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 9); | |
| 40626 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40627 | return __ret; | |
| 40628 | } | |
| 40629 | __ai float32x2_t __noswap_vcmla_rot180_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40630 | float32x2_t __ret; | |
| 40631 | __ret = (float32x2_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40632 | return __ret; | |
| 40633 | } | |
| 40634 | #endif | |
| 40635 | ||
| 40636 | #ifdef __LITTLE_ENDIAN__ | |
| 40637 | #define vcmla_rot180_lane_f32(__p0_177, __p1_177, __p2_177, __p3_177) __extension__ ({ \ | |
| 40638 | float32x2_t __s0_177 = __p0_177; \ | |
| 40639 | float32x2_t __s1_177 = __p1_177; \ | |
| 40640 | float32x2_t __s2_177 = __p2_177; \ | |
| 40641 | float32x2_t __ret_177; \ | |
| 40642 | float32x2_t __reint_177 = __s2_177; \ | |
| 40643 | uint64x1_t __reint1_177 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_177, __p3_177)}; \ | |
| 40644 | __ret_177 = vcmla_rot180_f32(__s0_177, __s1_177, *(float32x2_t *) &__reint1_177); \ | |
| 40645 | __ret_177; \ | |
| 40646 | }) | |
| 40647 | #else | |
| 40648 | #define vcmla_rot180_lane_f32(__p0_178, __p1_178, __p2_178, __p3_178) __extension__ ({ \ | |
| 40649 | float32x2_t __s0_178 = __p0_178; \ | |
| 40650 | float32x2_t __s1_178 = __p1_178; \ | |
| 40651 | float32x2_t __s2_178 = __p2_178; \ | |
| 40652 | float32x2_t __rev0_178; __rev0_178 = __builtin_shufflevector(__s0_178, __s0_178, 1, 0); \ | |
| 40653 | float32x2_t __rev1_178; __rev1_178 = __builtin_shufflevector(__s1_178, __s1_178, 1, 0); \ | |
| 40654 | float32x2_t __rev2_178; __rev2_178 = __builtin_shufflevector(__s2_178, __s2_178, 1, 0); \ | |
| 40655 | float32x2_t __ret_178; \ | |
| 40656 | float32x2_t __reint_178 = __rev2_178; \ | |
| 40657 | uint64x1_t __reint1_178 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_178, __p3_178)}; \ | |
| 40658 | __ret_178 = __noswap_vcmla_rot180_f32(__rev0_178, __rev1_178, *(float32x2_t *) &__reint1_178); \ | |
| 40659 | __ret_178 = __builtin_shufflevector(__ret_178, __ret_178, 1, 0); \ | |
| 40660 | __ret_178; \ | |
| 40661 | }) | |
| 40662 | #endif | |
| 40663 | ||
| 40664 | #ifdef __LITTLE_ENDIAN__ | |
| 40665 | #define vcmlaq_rot180_lane_f32(__p0_179, __p1_179, __p2_179, __p3_179) __extension__ ({ \ | |
| 40666 | float32x4_t __s0_179 = __p0_179; \ | |
| 40667 | float32x4_t __s1_179 = __p1_179; \ | |
| 40668 | float32x2_t __s2_179 = __p2_179; \ | |
| 40669 | float32x4_t __ret_179; \ | |
| 40670 | float32x2_t __reint_179 = __s2_179; \ | |
| 40671 | uint64x2_t __reint1_179 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_179, __p3_179), vget_lane_u64(*(uint64x1_t *) &__reint_179, __p3_179)}; \ | |
| 40672 | __ret_179 = vcmlaq_rot180_f32(__s0_179, __s1_179, *(float32x4_t *) &__reint1_179); \ | |
| 40673 | __ret_179; \ | |
| 40674 | }) | |
| 40675 | #else | |
| 40676 | #define vcmlaq_rot180_lane_f32(__p0_180, __p1_180, __p2_180, __p3_180) __extension__ ({ \ | |
| 40677 | float32x4_t __s0_180 = __p0_180; \ | |
| 40678 | float32x4_t __s1_180 = __p1_180; \ | |
| 40679 | float32x2_t __s2_180 = __p2_180; \ | |
| 40680 | float32x4_t __rev0_180; __rev0_180 = __builtin_shufflevector(__s0_180, __s0_180, 3, 2, 1, 0); \ | |
| 40681 | float32x4_t __rev1_180; __rev1_180 = __builtin_shufflevector(__s1_180, __s1_180, 3, 2, 1, 0); \ | |
| 40682 | float32x2_t __rev2_180; __rev2_180 = __builtin_shufflevector(__s2_180, __s2_180, 1, 0); \ | |
| 40683 | float32x4_t __ret_180; \ | |
| 40684 | float32x2_t __reint_180 = __rev2_180; \ | |
| 40685 | uint64x2_t __reint1_180 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_180, __p3_180), vget_lane_u64(*(uint64x1_t *) &__reint_180, __p3_180)}; \ | |
| 40686 | __ret_180 = __noswap_vcmlaq_rot180_f32(__rev0_180, __rev1_180, *(float32x4_t *) &__reint1_180); \ | |
| 40687 | __ret_180 = __builtin_shufflevector(__ret_180, __ret_180, 3, 2, 1, 0); \ | |
| 40688 | __ret_180; \ | |
| 40689 | }) | |
| 40690 | #endif | |
| 40691 | ||
| 40692 | #ifdef __LITTLE_ENDIAN__ | |
| 40693 | #define vcmla_rot180_laneq_f32(__p0_181, __p1_181, __p2_181, __p3_181) __extension__ ({ \ | |
| 40694 | float32x2_t __s0_181 = __p0_181; \ | |
| 40695 | float32x2_t __s1_181 = __p1_181; \ | |
| 40696 | float32x4_t __s2_181 = __p2_181; \ | |
| 40697 | float32x2_t __ret_181; \ | |
| 40698 | float32x4_t __reint_181 = __s2_181; \ | |
| 40699 | uint64x1_t __reint1_181 = (uint64x1_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_181, __p3_181)}; \ | |
| 40700 | __ret_181 = vcmla_rot180_f32(__s0_181, __s1_181, *(float32x2_t *) &__reint1_181); \ | |
| 40701 | __ret_181; \ | |
| 40702 | }) | |
| 40703 | #else | |
| 40704 | #define vcmla_rot180_laneq_f32(__p0_182, __p1_182, __p2_182, __p3_182) __extension__ ({ \ | |
| 40705 | float32x2_t __s0_182 = __p0_182; \ | |
| 40706 | float32x2_t __s1_182 = __p1_182; \ | |
| 40707 | float32x4_t __s2_182 = __p2_182; \ | |
| 40708 | float32x2_t __rev0_182; __rev0_182 = __builtin_shufflevector(__s0_182, __s0_182, 1, 0); \ | |
| 40709 | float32x2_t __rev1_182; __rev1_182 = __builtin_shufflevector(__s1_182, __s1_182, 1, 0); \ | |
| 40710 | float32x4_t __rev2_182; __rev2_182 = __builtin_shufflevector(__s2_182, __s2_182, 3, 2, 1, 0); \ | |
| 40711 | float32x2_t __ret_182; \ | |
| 40712 | float32x4_t __reint_182 = __rev2_182; \ | |
| 40713 | uint64x1_t __reint1_182 = (uint64x1_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_182, __p3_182)}; \ | |
| 40714 | __ret_182 = __noswap_vcmla_rot180_f32(__rev0_182, __rev1_182, *(float32x2_t *) &__reint1_182); \ | |
| 40715 | __ret_182 = __builtin_shufflevector(__ret_182, __ret_182, 1, 0); \ | |
| 40716 | __ret_182; \ | |
| 40717 | }) | |
| 40718 | #endif | |
| 40719 | ||
| 40720 | #ifdef __LITTLE_ENDIAN__ | |
| 40721 | #define vcmlaq_rot180_laneq_f32(__p0_183, __p1_183, __p2_183, __p3_183) __extension__ ({ \ | |
| 40722 | float32x4_t __s0_183 = __p0_183; \ | |
| 40723 | float32x4_t __s1_183 = __p1_183; \ | |
| 40724 | float32x4_t __s2_183 = __p2_183; \ | |
| 40725 | float32x4_t __ret_183; \ | |
| 40726 | float32x4_t __reint_183 = __s2_183; \ | |
| 40727 | uint64x2_t __reint1_183 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_183, __p3_183), vgetq_lane_u64(*(uint64x2_t *) &__reint_183, __p3_183)}; \ | |
| 40728 | __ret_183 = vcmlaq_rot180_f32(__s0_183, __s1_183, *(float32x4_t *) &__reint1_183); \ | |
| 40729 | __ret_183; \ | |
| 40730 | }) | |
| 40731 | #else | |
| 40732 | #define vcmlaq_rot180_laneq_f32(__p0_184, __p1_184, __p2_184, __p3_184) __extension__ ({ \ | |
| 40733 | float32x4_t __s0_184 = __p0_184; \ | |
| 40734 | float32x4_t __s1_184 = __p1_184; \ | |
| 40735 | float32x4_t __s2_184 = __p2_184; \ | |
| 40736 | float32x4_t __rev0_184; __rev0_184 = __builtin_shufflevector(__s0_184, __s0_184, 3, 2, 1, 0); \ | |
| 40737 | float32x4_t __rev1_184; __rev1_184 = __builtin_shufflevector(__s1_184, __s1_184, 3, 2, 1, 0); \ | |
| 40738 | float32x4_t __rev2_184; __rev2_184 = __builtin_shufflevector(__s2_184, __s2_184, 3, 2, 1, 0); \ | |
| 40739 | float32x4_t __ret_184; \ | |
| 40740 | float32x4_t __reint_184 = __rev2_184; \ | |
| 40741 | uint64x2_t __reint1_184 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_184, __p3_184), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_184, __p3_184)}; \ | |
| 40742 | __ret_184 = __noswap_vcmlaq_rot180_f32(__rev0_184, __rev1_184, *(float32x4_t *) &__reint1_184); \ | |
| 40743 | __ret_184 = __builtin_shufflevector(__ret_184, __ret_184, 3, 2, 1, 0); \ | |
| 40744 | __ret_184; \ | |
| 40745 | }) | |
| 40746 | #endif | |
| 40747 | ||
| 40748 | #ifdef __LITTLE_ENDIAN__ | |
| 40749 | __ai float32x4_t vcmlaq_rot270_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40750 | float32x4_t __ret; | |
| 40751 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40752 | return __ret; | |
| 40753 | } | |
| 40754 | #else | |
| 40755 | __ai float32x4_t vcmlaq_rot270_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40756 | float32x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 40757 | float32x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 40758 | float32x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 40759 | float32x4_t __ret; | |
| 40760 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 41); | |
| 40761 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 40762 | return __ret; | |
| 40763 | } | |
| 40764 | __ai float32x4_t __noswap_vcmlaq_rot270_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40765 | float32x4_t __ret; | |
| 40766 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40767 | return __ret; | |
| 40768 | } | |
| 40769 | #endif | |
| 40770 | ||
| 40771 | #ifdef __LITTLE_ENDIAN__ | |
| 40772 | __ai float32x2_t vcmla_rot270_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40773 | float32x2_t __ret; | |
| 40774 | __ret = (float32x2_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40775 | return __ret; | |
| 40776 | } | |
| 40777 | #else | |
| 40778 | __ai float32x2_t vcmla_rot270_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40779 | float32x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 40780 | float32x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 40781 | float32x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 40782 | float32x2_t __ret; | |
| 40783 | __ret = (float32x2_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 9); | |
| 40784 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40785 | return __ret; | |
| 40786 | } | |
| 40787 | __ai float32x2_t __noswap_vcmla_rot270_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40788 | float32x2_t __ret; | |
| 40789 | __ret = (float32x2_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40790 | return __ret; | |
| 40791 | } | |
| 40792 | #endif | |
| 40793 | ||
| 40794 | #ifdef __LITTLE_ENDIAN__ | |
| 40795 | #define vcmla_rot270_lane_f32(__p0_185, __p1_185, __p2_185, __p3_185) __extension__ ({ \ | |
| 40796 | float32x2_t __s0_185 = __p0_185; \ | |
| 40797 | float32x2_t __s1_185 = __p1_185; \ | |
| 40798 | float32x2_t __s2_185 = __p2_185; \ | |
| 40799 | float32x2_t __ret_185; \ | |
| 40800 | float32x2_t __reint_185 = __s2_185; \ | |
| 40801 | uint64x1_t __reint1_185 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_185, __p3_185)}; \ | |
| 40802 | __ret_185 = vcmla_rot270_f32(__s0_185, __s1_185, *(float32x2_t *) &__reint1_185); \ | |
| 40803 | __ret_185; \ | |
| 40804 | }) | |
| 40805 | #else | |
| 40806 | #define vcmla_rot270_lane_f32(__p0_186, __p1_186, __p2_186, __p3_186) __extension__ ({ \ | |
| 40807 | float32x2_t __s0_186 = __p0_186; \ | |
| 40808 | float32x2_t __s1_186 = __p1_186; \ | |
| 40809 | float32x2_t __s2_186 = __p2_186; \ | |
| 40810 | float32x2_t __rev0_186; __rev0_186 = __builtin_shufflevector(__s0_186, __s0_186, 1, 0); \ | |
| 40811 | float32x2_t __rev1_186; __rev1_186 = __builtin_shufflevector(__s1_186, __s1_186, 1, 0); \ | |
| 40812 | float32x2_t __rev2_186; __rev2_186 = __builtin_shufflevector(__s2_186, __s2_186, 1, 0); \ | |
| 40813 | float32x2_t __ret_186; \ | |
| 40814 | float32x2_t __reint_186 = __rev2_186; \ | |
| 40815 | uint64x1_t __reint1_186 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_186, __p3_186)}; \ | |
| 40816 | __ret_186 = __noswap_vcmla_rot270_f32(__rev0_186, __rev1_186, *(float32x2_t *) &__reint1_186); \ | |
| 40817 | __ret_186 = __builtin_shufflevector(__ret_186, __ret_186, 1, 0); \ | |
| 40818 | __ret_186; \ | |
| 40819 | }) | |
| 40820 | #endif | |
| 40821 | ||
| 40822 | #ifdef __LITTLE_ENDIAN__ | |
| 40823 | #define vcmlaq_rot270_lane_f32(__p0_187, __p1_187, __p2_187, __p3_187) __extension__ ({ \ | |
| 40824 | float32x4_t __s0_187 = __p0_187; \ | |
| 40825 | float32x4_t __s1_187 = __p1_187; \ | |
| 40826 | float32x2_t __s2_187 = __p2_187; \ | |
| 40827 | float32x4_t __ret_187; \ | |
| 40828 | float32x2_t __reint_187 = __s2_187; \ | |
| 40829 | uint64x2_t __reint1_187 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_187, __p3_187), vget_lane_u64(*(uint64x1_t *) &__reint_187, __p3_187)}; \ | |
| 40830 | __ret_187 = vcmlaq_rot270_f32(__s0_187, __s1_187, *(float32x4_t *) &__reint1_187); \ | |
| 40831 | __ret_187; \ | |
| 40832 | }) | |
| 40833 | #else | |
| 40834 | #define vcmlaq_rot270_lane_f32(__p0_188, __p1_188, __p2_188, __p3_188) __extension__ ({ \ | |
| 40835 | float32x4_t __s0_188 = __p0_188; \ | |
| 40836 | float32x4_t __s1_188 = __p1_188; \ | |
| 40837 | float32x2_t __s2_188 = __p2_188; \ | |
| 40838 | float32x4_t __rev0_188; __rev0_188 = __builtin_shufflevector(__s0_188, __s0_188, 3, 2, 1, 0); \ | |
| 40839 | float32x4_t __rev1_188; __rev1_188 = __builtin_shufflevector(__s1_188, __s1_188, 3, 2, 1, 0); \ | |
| 40840 | float32x2_t __rev2_188; __rev2_188 = __builtin_shufflevector(__s2_188, __s2_188, 1, 0); \ | |
| 40841 | float32x4_t __ret_188; \ | |
| 40842 | float32x2_t __reint_188 = __rev2_188; \ | |
| 40843 | uint64x2_t __reint1_188 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_188, __p3_188), vget_lane_u64(*(uint64x1_t *) &__reint_188, __p3_188)}; \ | |
| 40844 | __ret_188 = __noswap_vcmlaq_rot270_f32(__rev0_188, __rev1_188, *(float32x4_t *) &__reint1_188); \ | |
| 40845 | __ret_188 = __builtin_shufflevector(__ret_188, __ret_188, 3, 2, 1, 0); \ | |
| 40846 | __ret_188; \ | |
| 40847 | }) | |
| 40848 | #endif | |
| 40849 | ||
| 40850 | #ifdef __LITTLE_ENDIAN__ | |
| 40851 | #define vcmla_rot270_laneq_f32(__p0_189, __p1_189, __p2_189, __p3_189) __extension__ ({ \ | |
| 40852 | float32x2_t __s0_189 = __p0_189; \ | |
| 40853 | float32x2_t __s1_189 = __p1_189; \ | |
| 40854 | float32x4_t __s2_189 = __p2_189; \ | |
| 40855 | float32x2_t __ret_189; \ | |
| 40856 | float32x4_t __reint_189 = __s2_189; \ | |
| 40857 | uint64x1_t __reint1_189 = (uint64x1_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_189, __p3_189)}; \ | |
| 40858 | __ret_189 = vcmla_rot270_f32(__s0_189, __s1_189, *(float32x2_t *) &__reint1_189); \ | |
| 40859 | __ret_189; \ | |
| 40860 | }) | |
| 40861 | #else | |
| 40862 | #define vcmla_rot270_laneq_f32(__p0_190, __p1_190, __p2_190, __p3_190) __extension__ ({ \ | |
| 40863 | float32x2_t __s0_190 = __p0_190; \ | |
| 40864 | float32x2_t __s1_190 = __p1_190; \ | |
| 40865 | float32x4_t __s2_190 = __p2_190; \ | |
| 40866 | float32x2_t __rev0_190; __rev0_190 = __builtin_shufflevector(__s0_190, __s0_190, 1, 0); \ | |
| 40867 | float32x2_t __rev1_190; __rev1_190 = __builtin_shufflevector(__s1_190, __s1_190, 1, 0); \ | |
| 40868 | float32x4_t __rev2_190; __rev2_190 = __builtin_shufflevector(__s2_190, __s2_190, 3, 2, 1, 0); \ | |
| 40869 | float32x2_t __ret_190; \ | |
| 40870 | float32x4_t __reint_190 = __rev2_190; \ | |
| 40871 | uint64x1_t __reint1_190 = (uint64x1_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_190, __p3_190)}; \ | |
| 40872 | __ret_190 = __noswap_vcmla_rot270_f32(__rev0_190, __rev1_190, *(float32x2_t *) &__reint1_190); \ | |
| 40873 | __ret_190 = __builtin_shufflevector(__ret_190, __ret_190, 1, 0); \ | |
| 40874 | __ret_190; \ | |
| 40875 | }) | |
| 40876 | #endif | |
| 40877 | ||
| 40878 | #ifdef __LITTLE_ENDIAN__ | |
| 40879 | #define vcmlaq_rot270_laneq_f32(__p0_191, __p1_191, __p2_191, __p3_191) __extension__ ({ \ | |
| 40880 | float32x4_t __s0_191 = __p0_191; \ | |
| 40881 | float32x4_t __s1_191 = __p1_191; \ | |
| 40882 | float32x4_t __s2_191 = __p2_191; \ | |
| 40883 | float32x4_t __ret_191; \ | |
| 40884 | float32x4_t __reint_191 = __s2_191; \ | |
| 40885 | uint64x2_t __reint1_191 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_191, __p3_191), vgetq_lane_u64(*(uint64x2_t *) &__reint_191, __p3_191)}; \ | |
| 40886 | __ret_191 = vcmlaq_rot270_f32(__s0_191, __s1_191, *(float32x4_t *) &__reint1_191); \ | |
| 40887 | __ret_191; \ | |
| 40888 | }) | |
| 40889 | #else | |
| 40890 | #define vcmlaq_rot270_laneq_f32(__p0_192, __p1_192, __p2_192, __p3_192) __extension__ ({ \ | |
| 40891 | float32x4_t __s0_192 = __p0_192; \ | |
| 40892 | float32x4_t __s1_192 = __p1_192; \ | |
| 40893 | float32x4_t __s2_192 = __p2_192; \ | |
| 40894 | float32x4_t __rev0_192; __rev0_192 = __builtin_shufflevector(__s0_192, __s0_192, 3, 2, 1, 0); \ | |
| 40895 | float32x4_t __rev1_192; __rev1_192 = __builtin_shufflevector(__s1_192, __s1_192, 3, 2, 1, 0); \ | |
| 40896 | float32x4_t __rev2_192; __rev2_192 = __builtin_shufflevector(__s2_192, __s2_192, 3, 2, 1, 0); \ | |
| 40897 | float32x4_t __ret_192; \ | |
| 40898 | float32x4_t __reint_192 = __rev2_192; \ | |
| 40899 | uint64x2_t __reint1_192 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_192, __p3_192), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_192, __p3_192)}; \ | |
| 40900 | __ret_192 = __noswap_vcmlaq_rot270_f32(__rev0_192, __rev1_192, *(float32x4_t *) &__reint1_192); \ | |
| 40901 | __ret_192 = __builtin_shufflevector(__ret_192, __ret_192, 3, 2, 1, 0); \ | |
| 40902 | __ret_192; \ | |
| 40903 | }) | |
| 40904 | #endif | |
| 40905 | ||
| 40906 | #ifdef __LITTLE_ENDIAN__ | |
| 40907 | __ai float32x4_t vcmlaq_rot90_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40908 | float32x4_t __ret; | |
| 40909 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40910 | return __ret; | |
| 40911 | } | |
| 40912 | #else | |
| 40913 | __ai float32x4_t vcmlaq_rot90_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40914 | float32x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 40915 | float32x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 40916 | float32x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 40917 | float32x4_t __ret; | |
| 40918 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 41); | |
| 40919 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 40920 | return __ret; | |
| 40921 | } | |
| 40922 | __ai float32x4_t __noswap_vcmlaq_rot90_f32(float32x4_t __p0, float32x4_t __p1, float32x4_t __p2) { | |
| 40923 | float32x4_t __ret; | |
| 40924 | __ret = (float32x4_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 41); | |
| 40925 | return __ret; | |
| 40926 | } | |
| 40927 | #endif | |
| 40928 | ||
| 40929 | #ifdef __LITTLE_ENDIAN__ | |
| 40930 | __ai float32x2_t vcmla_rot90_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40931 | float32x2_t __ret; | |
| 40932 | __ret = (float32x2_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40933 | return __ret; | |
| 40934 | } | |
| 40935 | #else | |
| 40936 | __ai float32x2_t vcmla_rot90_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40937 | float32x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 40938 | float32x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 40939 | float32x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 40940 | float32x2_t __ret; | |
| 40941 | __ret = (float32x2_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 9); | |
| 40942 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40943 | return __ret; | |
| 40944 | } | |
| 40945 | __ai float32x2_t __noswap_vcmla_rot90_f32(float32x2_t __p0, float32x2_t __p1, float32x2_t __p2) { | |
| 40946 | float32x2_t __ret; | |
| 40947 | __ret = (float32x2_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 9); | |
| 40948 | return __ret; | |
| 40949 | } | |
| 40950 | #endif | |
| 40951 | ||
| 40952 | #ifdef __LITTLE_ENDIAN__ | |
| 40953 | #define vcmla_rot90_lane_f32(__p0_193, __p1_193, __p2_193, __p3_193) __extension__ ({ \ | |
| 40954 | float32x2_t __s0_193 = __p0_193; \ | |
| 40955 | float32x2_t __s1_193 = __p1_193; \ | |
| 40956 | float32x2_t __s2_193 = __p2_193; \ | |
| 40957 | float32x2_t __ret_193; \ | |
| 40958 | float32x2_t __reint_193 = __s2_193; \ | |
| 40959 | uint64x1_t __reint1_193 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_193, __p3_193)}; \ | |
| 40960 | __ret_193 = vcmla_rot90_f32(__s0_193, __s1_193, *(float32x2_t *) &__reint1_193); \ | |
| 40961 | __ret_193; \ | |
| 40962 | }) | |
| 40963 | #else | |
| 40964 | #define vcmla_rot90_lane_f32(__p0_194, __p1_194, __p2_194, __p3_194) __extension__ ({ \ | |
| 40965 | float32x2_t __s0_194 = __p0_194; \ | |
| 40966 | float32x2_t __s1_194 = __p1_194; \ | |
| 40967 | float32x2_t __s2_194 = __p2_194; \ | |
| 40968 | float32x2_t __rev0_194; __rev0_194 = __builtin_shufflevector(__s0_194, __s0_194, 1, 0); \ | |
| 40969 | float32x2_t __rev1_194; __rev1_194 = __builtin_shufflevector(__s1_194, __s1_194, 1, 0); \ | |
| 40970 | float32x2_t __rev2_194; __rev2_194 = __builtin_shufflevector(__s2_194, __s2_194, 1, 0); \ | |
| 40971 | float32x2_t __ret_194; \ | |
| 40972 | float32x2_t __reint_194 = __rev2_194; \ | |
| 40973 | uint64x1_t __reint1_194 = (uint64x1_t) {vget_lane_u64(*(uint64x1_t *) &__reint_194, __p3_194)}; \ | |
| 40974 | __ret_194 = __noswap_vcmla_rot90_f32(__rev0_194, __rev1_194, *(float32x2_t *) &__reint1_194); \ | |
| 40975 | __ret_194 = __builtin_shufflevector(__ret_194, __ret_194, 1, 0); \ | |
| 40976 | __ret_194; \ | |
| 40977 | }) | |
| 40978 | #endif | |
| 40979 | ||
| 40980 | #ifdef __LITTLE_ENDIAN__ | |
| 40981 | #define vcmlaq_rot90_lane_f32(__p0_195, __p1_195, __p2_195, __p3_195) __extension__ ({ \ | |
| 40982 | float32x4_t __s0_195 = __p0_195; \ | |
| 40983 | float32x4_t __s1_195 = __p1_195; \ | |
| 40984 | float32x2_t __s2_195 = __p2_195; \ | |
| 40985 | float32x4_t __ret_195; \ | |
| 40986 | float32x2_t __reint_195 = __s2_195; \ | |
| 40987 | uint64x2_t __reint1_195 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_195, __p3_195), vget_lane_u64(*(uint64x1_t *) &__reint_195, __p3_195)}; \ | |
| 40988 | __ret_195 = vcmlaq_rot90_f32(__s0_195, __s1_195, *(float32x4_t *) &__reint1_195); \ | |
| 40989 | __ret_195; \ | |
| 40990 | }) | |
| 40991 | #else | |
| 40992 | #define vcmlaq_rot90_lane_f32(__p0_196, __p1_196, __p2_196, __p3_196) __extension__ ({ \ | |
| 40993 | float32x4_t __s0_196 = __p0_196; \ | |
| 40994 | float32x4_t __s1_196 = __p1_196; \ | |
| 40995 | float32x2_t __s2_196 = __p2_196; \ | |
| 40996 | float32x4_t __rev0_196; __rev0_196 = __builtin_shufflevector(__s0_196, __s0_196, 3, 2, 1, 0); \ | |
| 40997 | float32x4_t __rev1_196; __rev1_196 = __builtin_shufflevector(__s1_196, __s1_196, 3, 2, 1, 0); \ | |
| 40998 | float32x2_t __rev2_196; __rev2_196 = __builtin_shufflevector(__s2_196, __s2_196, 1, 0); \ | |
| 40999 | float32x4_t __ret_196; \ | |
| 41000 | float32x2_t __reint_196 = __rev2_196; \ | |
| 41001 | uint64x2_t __reint1_196 = (uint64x2_t) {vget_lane_u64(*(uint64x1_t *) &__reint_196, __p3_196), vget_lane_u64(*(uint64x1_t *) &__reint_196, __p3_196)}; \ | |
| 41002 | __ret_196 = __noswap_vcmlaq_rot90_f32(__rev0_196, __rev1_196, *(float32x4_t *) &__reint1_196); \ | |
| 41003 | __ret_196 = __builtin_shufflevector(__ret_196, __ret_196, 3, 2, 1, 0); \ | |
| 41004 | __ret_196; \ | |
| 41005 | }) | |
| 41006 | #endif | |
| 41007 | ||
| 41008 | #ifdef __LITTLE_ENDIAN__ | |
| 41009 | #define vcmla_rot90_laneq_f32(__p0_197, __p1_197, __p2_197, __p3_197) __extension__ ({ \ | |
| 41010 | float32x2_t __s0_197 = __p0_197; \ | |
| 41011 | float32x2_t __s1_197 = __p1_197; \ | |
| 41012 | float32x4_t __s2_197 = __p2_197; \ | |
| 41013 | float32x2_t __ret_197; \ | |
| 41014 | float32x4_t __reint_197 = __s2_197; \ | |
| 41015 | uint64x1_t __reint1_197 = (uint64x1_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_197, __p3_197)}; \ | |
| 41016 | __ret_197 = vcmla_rot90_f32(__s0_197, __s1_197, *(float32x2_t *) &__reint1_197); \ | |
| 41017 | __ret_197; \ | |
| 41018 | }) | |
| 41019 | #else | |
| 41020 | #define vcmla_rot90_laneq_f32(__p0_198, __p1_198, __p2_198, __p3_198) __extension__ ({ \ | |
| 41021 | float32x2_t __s0_198 = __p0_198; \ | |
| 41022 | float32x2_t __s1_198 = __p1_198; \ | |
| 41023 | float32x4_t __s2_198 = __p2_198; \ | |
| 41024 | float32x2_t __rev0_198; __rev0_198 = __builtin_shufflevector(__s0_198, __s0_198, 1, 0); \ | |
| 41025 | float32x2_t __rev1_198; __rev1_198 = __builtin_shufflevector(__s1_198, __s1_198, 1, 0); \ | |
| 41026 | float32x4_t __rev2_198; __rev2_198 = __builtin_shufflevector(__s2_198, __s2_198, 3, 2, 1, 0); \ | |
| 41027 | float32x2_t __ret_198; \ | |
| 41028 | float32x4_t __reint_198 = __rev2_198; \ | |
| 41029 | uint64x1_t __reint1_198 = (uint64x1_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_198, __p3_198)}; \ | |
| 41030 | __ret_198 = __noswap_vcmla_rot90_f32(__rev0_198, __rev1_198, *(float32x2_t *) &__reint1_198); \ | |
| 41031 | __ret_198 = __builtin_shufflevector(__ret_198, __ret_198, 1, 0); \ | |
| 41032 | __ret_198; \ | |
| 41033 | }) | |
| 41034 | #endif | |
| 41035 | ||
| 41036 | #ifdef __LITTLE_ENDIAN__ | |
| 41037 | #define vcmlaq_rot90_laneq_f32(__p0_199, __p1_199, __p2_199, __p3_199) __extension__ ({ \ | |
| 41038 | float32x4_t __s0_199 = __p0_199; \ | |
| 41039 | float32x4_t __s1_199 = __p1_199; \ | |
| 41040 | float32x4_t __s2_199 = __p2_199; \ | |
| 41041 | float32x4_t __ret_199; \ | |
| 41042 | float32x4_t __reint_199 = __s2_199; \ | |
| 41043 | uint64x2_t __reint1_199 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_199, __p3_199), vgetq_lane_u64(*(uint64x2_t *) &__reint_199, __p3_199)}; \ | |
| 41044 | __ret_199 = vcmlaq_rot90_f32(__s0_199, __s1_199, *(float32x4_t *) &__reint1_199); \ | |
| 41045 | __ret_199; \ | |
| 41046 | }) | |
| 41047 | #else | |
| 41048 | #define vcmlaq_rot90_laneq_f32(__p0_200, __p1_200, __p2_200, __p3_200) __extension__ ({ \ | |
| 41049 | float32x4_t __s0_200 = __p0_200; \ | |
| 41050 | float32x4_t __s1_200 = __p1_200; \ | |
| 41051 | float32x4_t __s2_200 = __p2_200; \ | |
| 41052 | float32x4_t __rev0_200; __rev0_200 = __builtin_shufflevector(__s0_200, __s0_200, 3, 2, 1, 0); \ | |
| 41053 | float32x4_t __rev1_200; __rev1_200 = __builtin_shufflevector(__s1_200, __s1_200, 3, 2, 1, 0); \ | |
| 41054 | float32x4_t __rev2_200; __rev2_200 = __builtin_shufflevector(__s2_200, __s2_200, 3, 2, 1, 0); \ | |
| 41055 | float32x4_t __ret_200; \ | |
| 41056 | float32x4_t __reint_200 = __rev2_200; \ | |
| 41057 | uint64x2_t __reint1_200 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_200, __p3_200), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_200, __p3_200)}; \ | |
| 41058 | __ret_200 = __noswap_vcmlaq_rot90_f32(__rev0_200, __rev1_200, *(float32x4_t *) &__reint1_200); \ | |
| 41059 | __ret_200 = __builtin_shufflevector(__ret_200, __ret_200, 3, 2, 1, 0); \ | |
| 41060 | __ret_200; \ | |
| 41061 | }) | |
| 41062 | #endif | |
| 41063 | ||
| 41064 | #endif | |
| 41065 | #if defined(__ARM_FEATURE_COMPLEX) && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) | |
| 41066 | #ifdef __LITTLE_ENDIAN__ | |
| 41067 | __ai float16x4_t vcadd_rot270_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 41068 | float16x4_t __ret; | |
| 41069 | __ret = (float16x4_t) __builtin_neon_vcadd_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, 8); | |
| 41070 | return __ret; | |
| 41071 | } | |
| 41072 | #else | |
| 41073 | __ai float16x4_t vcadd_rot270_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 41074 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 41075 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 41076 | float16x4_t __ret; | |
| 41077 | __ret = (float16x4_t) __builtin_neon_vcadd_rot270_v((int8x8_t)__rev0, (int8x8_t)__rev1, 8); | |
| 41078 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 41079 | return __ret; | |
| 41080 | } | |
| 41081 | #endif | |
| 41082 | ||
| 41083 | #ifdef __LITTLE_ENDIAN__ | |
| 41084 | __ai float16x4_t vcadd_rot90_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 41085 | float16x4_t __ret; | |
| 41086 | __ret = (float16x4_t) __builtin_neon_vcadd_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, 8); | |
| 41087 | return __ret; | |
| 41088 | } | |
| 41089 | #else | |
| 41090 | __ai float16x4_t vcadd_rot90_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 41091 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 41092 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 41093 | float16x4_t __ret; | |
| 41094 | __ret = (float16x4_t) __builtin_neon_vcadd_rot90_v((int8x8_t)__rev0, (int8x8_t)__rev1, 8); | |
| 41095 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 41096 | return __ret; | |
| 41097 | } | |
| 41098 | #endif | |
| 41099 | ||
| 41100 | #ifdef __LITTLE_ENDIAN__ | |
| 41101 | __ai float16x8_t vcaddq_rot270_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 41102 | float16x8_t __ret; | |
| 41103 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, 40); | |
| 41104 | return __ret; | |
| 41105 | } | |
| 41106 | #else | |
| 41107 | __ai float16x8_t vcaddq_rot270_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 41108 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41109 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41110 | float16x8_t __ret; | |
| 41111 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, 40); | |
| 41112 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41113 | return __ret; | |
| 41114 | } | |
| 41115 | #endif | |
| 41116 | ||
| 41117 | #ifdef __LITTLE_ENDIAN__ | |
| 41118 | __ai float16x8_t vcaddq_rot90_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 41119 | float16x8_t __ret; | |
| 41120 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, 40); | |
| 41121 | return __ret; | |
| 41122 | } | |
| 41123 | #else | |
| 41124 | __ai float16x8_t vcaddq_rot90_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 41125 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41126 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41127 | float16x8_t __ret; | |
| 41128 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, 40); | |
| 41129 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41130 | return __ret; | |
| 41131 | } | |
| 41132 | #endif | |
| 41133 | ||
| 41134 | #ifdef __LITTLE_ENDIAN__ | |
| 41135 | __ai float16x8_t vcmlaq_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41136 | float16x8_t __ret; | |
| 41137 | __ret = (float16x8_t) __builtin_neon_vcmlaq_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41138 | return __ret; | |
| 41139 | } | |
| 41140 | #else | |
| 41141 | __ai float16x8_t vcmlaq_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41142 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41143 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41144 | float16x8_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41145 | float16x8_t __ret; | |
| 41146 | __ret = (float16x8_t) __builtin_neon_vcmlaq_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 40); | |
| 41147 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41148 | return __ret; | |
| 41149 | } | |
| 41150 | __ai float16x8_t __noswap_vcmlaq_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41151 | float16x8_t __ret; | |
| 41152 | __ret = (float16x8_t) __builtin_neon_vcmlaq_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41153 | return __ret; | |
| 41154 | } | |
| 41155 | #endif | |
| 41156 | ||
| 41157 | #ifdef __LITTLE_ENDIAN__ | |
| 41158 | __ai float16x4_t vcmla_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41159 | float16x4_t __ret; | |
| 41160 | __ret = (float16x4_t) __builtin_neon_vcmla_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41161 | return __ret; | |
| 41162 | } | |
| 41163 | #else | |
| 41164 | __ai float16x4_t vcmla_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41165 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 41166 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 41167 | float16x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 41168 | float16x4_t __ret; | |
| 41169 | __ret = (float16x4_t) __builtin_neon_vcmla_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 8); | |
| 41170 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 41171 | return __ret; | |
| 41172 | } | |
| 41173 | __ai float16x4_t __noswap_vcmla_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41174 | float16x4_t __ret; | |
| 41175 | __ret = (float16x4_t) __builtin_neon_vcmla_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41176 | return __ret; | |
| 41177 | } | |
| 41178 | #endif | |
| 41179 | ||
| 41180 | #ifdef __LITTLE_ENDIAN__ | |
| 41181 | #define vcmla_lane_f16(__p0_201, __p1_201, __p2_201, __p3_201) __extension__ ({ \ | |
| 41182 | float16x4_t __s0_201 = __p0_201; \ | |
| 41183 | float16x4_t __s1_201 = __p1_201; \ | |
| 41184 | float16x4_t __s2_201 = __p2_201; \ | |
| 41185 | float16x4_t __ret_201; \ | |
| 41186 | float16x4_t __reint_201 = __s2_201; \ | |
| 41187 | uint32x2_t __reint1_201 = (uint32x2_t) {vget_lane_u32(*(uint32x2_t *) &__reint_201, __p3_201), vget_lane_u32(*(uint32x2_t *) &__reint_201, __p3_201)}; \ | |
| 41188 | __ret_201 = vcmla_f16(__s0_201, __s1_201, *(float16x4_t *) &__reint1_201); \ | |
| 41189 | __ret_201; \ | |
| 41190 | }) | |
| 41191 | #else | |
| 41192 | #define vcmla_lane_f16(__p0_202, __p1_202, __p2_202, __p3_202) __extension__ ({ \ | |
| 41193 | float16x4_t __s0_202 = __p0_202; \ | |
| 41194 | float16x4_t __s1_202 = __p1_202; \ | |
| 41195 | float16x4_t __s2_202 = __p2_202; \ | |
| 41196 | float16x4_t __rev0_202; __rev0_202 = __builtin_shufflevector(__s0_202, __s0_202, 3, 2, 1, 0); \ | |
| 41197 | float16x4_t __rev1_202; __rev1_202 = __builtin_shufflevector(__s1_202, __s1_202, 3, 2, 1, 0); \ | |
| 41198 | float16x4_t __rev2_202; __rev2_202 = __builtin_shufflevector(__s2_202, __s2_202, 3, 2, 1, 0); \ | |
| 41199 | float16x4_t __ret_202; \ | |
| 41200 | float16x4_t __reint_202 = __rev2_202; \ | |
| 41201 | uint32x2_t __reint1_202 = (uint32x2_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_202, __p3_202), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_202, __p3_202)}; \ | |
| 41202 | __ret_202 = __noswap_vcmla_f16(__rev0_202, __rev1_202, *(float16x4_t *) &__reint1_202); \ | |
| 41203 | __ret_202 = __builtin_shufflevector(__ret_202, __ret_202, 3, 2, 1, 0); \ | |
| 41204 | __ret_202; \ | |
| 41205 | }) | |
| 41206 | #endif | |
| 41207 | ||
| 41208 | #ifdef __LITTLE_ENDIAN__ | |
| 41209 | #define vcmlaq_lane_f16(__p0_203, __p1_203, __p2_203, __p3_203) __extension__ ({ \ | |
| 41210 | float16x8_t __s0_203 = __p0_203; \ | |
| 41211 | float16x8_t __s1_203 = __p1_203; \ | |
| 41212 | float16x4_t __s2_203 = __p2_203; \ | |
| 41213 | float16x8_t __ret_203; \ | |
| 41214 | float16x4_t __reint_203 = __s2_203; \ | |
| 41215 | uint32x4_t __reint1_203 = (uint32x4_t) {vget_lane_u32(*(uint32x2_t *) &__reint_203, __p3_203), vget_lane_u32(*(uint32x2_t *) &__reint_203, __p3_203), vget_lane_u32(*(uint32x2_t *) &__reint_203, __p3_203), vget_lane_u32(*(uint32x2_t *) &__reint_203, __p3_203)}; \ | |
| 41216 | __ret_203 = vcmlaq_f16(__s0_203, __s1_203, *(float16x8_t *) &__reint1_203); \ | |
| 41217 | __ret_203; \ | |
| 41218 | }) | |
| 41219 | #else | |
| 41220 | #define vcmlaq_lane_f16(__p0_204, __p1_204, __p2_204, __p3_204) __extension__ ({ \ | |
| 41221 | float16x8_t __s0_204 = __p0_204; \ | |
| 41222 | float16x8_t __s1_204 = __p1_204; \ | |
| 41223 | float16x4_t __s2_204 = __p2_204; \ | |
| 41224 | float16x8_t __rev0_204; __rev0_204 = __builtin_shufflevector(__s0_204, __s0_204, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41225 | float16x8_t __rev1_204; __rev1_204 = __builtin_shufflevector(__s1_204, __s1_204, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41226 | float16x4_t __rev2_204; __rev2_204 = __builtin_shufflevector(__s2_204, __s2_204, 3, 2, 1, 0); \ | |
| 41227 | float16x8_t __ret_204; \ | |
| 41228 | float16x4_t __reint_204 = __rev2_204; \ | |
| 41229 | uint32x4_t __reint1_204 = (uint32x4_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_204, __p3_204), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_204, __p3_204), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_204, __p3_204), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_204, __p3_204)}; \ | |
| 41230 | __ret_204 = __noswap_vcmlaq_f16(__rev0_204, __rev1_204, *(float16x8_t *) &__reint1_204); \ | |
| 41231 | __ret_204 = __builtin_shufflevector(__ret_204, __ret_204, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41232 | __ret_204; \ | |
| 41233 | }) | |
| 41234 | #endif | |
| 41235 | ||
| 41236 | #ifdef __LITTLE_ENDIAN__ | |
| 41237 | #define vcmla_laneq_f16(__p0_205, __p1_205, __p2_205, __p3_205) __extension__ ({ \ | |
| 41238 | float16x4_t __s0_205 = __p0_205; \ | |
| 41239 | float16x4_t __s1_205 = __p1_205; \ | |
| 41240 | float16x8_t __s2_205 = __p2_205; \ | |
| 41241 | float16x4_t __ret_205; \ | |
| 41242 | float16x8_t __reint_205 = __s2_205; \ | |
| 41243 | uint32x2_t __reint1_205 = (uint32x2_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_205, __p3_205), vgetq_lane_u32(*(uint32x4_t *) &__reint_205, __p3_205)}; \ | |
| 41244 | __ret_205 = vcmla_f16(__s0_205, __s1_205, *(float16x4_t *) &__reint1_205); \ | |
| 41245 | __ret_205; \ | |
| 41246 | }) | |
| 41247 | #else | |
| 41248 | #define vcmla_laneq_f16(__p0_206, __p1_206, __p2_206, __p3_206) __extension__ ({ \ | |
| 41249 | float16x4_t __s0_206 = __p0_206; \ | |
| 41250 | float16x4_t __s1_206 = __p1_206; \ | |
| 41251 | float16x8_t __s2_206 = __p2_206; \ | |
| 41252 | float16x4_t __rev0_206; __rev0_206 = __builtin_shufflevector(__s0_206, __s0_206, 3, 2, 1, 0); \ | |
| 41253 | float16x4_t __rev1_206; __rev1_206 = __builtin_shufflevector(__s1_206, __s1_206, 3, 2, 1, 0); \ | |
| 41254 | float16x8_t __rev2_206; __rev2_206 = __builtin_shufflevector(__s2_206, __s2_206, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41255 | float16x4_t __ret_206; \ | |
| 41256 | float16x8_t __reint_206 = __rev2_206; \ | |
| 41257 | uint32x2_t __reint1_206 = (uint32x2_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_206, __p3_206), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_206, __p3_206)}; \ | |
| 41258 | __ret_206 = __noswap_vcmla_f16(__rev0_206, __rev1_206, *(float16x4_t *) &__reint1_206); \ | |
| 41259 | __ret_206 = __builtin_shufflevector(__ret_206, __ret_206, 3, 2, 1, 0); \ | |
| 41260 | __ret_206; \ | |
| 41261 | }) | |
| 41262 | #endif | |
| 41263 | ||
| 41264 | #ifdef __LITTLE_ENDIAN__ | |
| 41265 | #define vcmlaq_laneq_f16(__p0_207, __p1_207, __p2_207, __p3_207) __extension__ ({ \ | |
| 41266 | float16x8_t __s0_207 = __p0_207; \ | |
| 41267 | float16x8_t __s1_207 = __p1_207; \ | |
| 41268 | float16x8_t __s2_207 = __p2_207; \ | |
| 41269 | float16x8_t __ret_207; \ | |
| 41270 | float16x8_t __reint_207 = __s2_207; \ | |
| 41271 | uint32x4_t __reint1_207 = (uint32x4_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_207, __p3_207), vgetq_lane_u32(*(uint32x4_t *) &__reint_207, __p3_207), vgetq_lane_u32(*(uint32x4_t *) &__reint_207, __p3_207), vgetq_lane_u32(*(uint32x4_t *) &__reint_207, __p3_207)}; \ | |
| 41272 | __ret_207 = vcmlaq_f16(__s0_207, __s1_207, *(float16x8_t *) &__reint1_207); \ | |
| 41273 | __ret_207; \ | |
| 41274 | }) | |
| 41275 | #else | |
| 41276 | #define vcmlaq_laneq_f16(__p0_208, __p1_208, __p2_208, __p3_208) __extension__ ({ \ | |
| 41277 | float16x8_t __s0_208 = __p0_208; \ | |
| 41278 | float16x8_t __s1_208 = __p1_208; \ | |
| 41279 | float16x8_t __s2_208 = __p2_208; \ | |
| 41280 | float16x8_t __rev0_208; __rev0_208 = __builtin_shufflevector(__s0_208, __s0_208, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41281 | float16x8_t __rev1_208; __rev1_208 = __builtin_shufflevector(__s1_208, __s1_208, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41282 | float16x8_t __rev2_208; __rev2_208 = __builtin_shufflevector(__s2_208, __s2_208, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41283 | float16x8_t __ret_208; \ | |
| 41284 | float16x8_t __reint_208 = __rev2_208; \ | |
| 41285 | uint32x4_t __reint1_208 = (uint32x4_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_208, __p3_208), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_208, __p3_208), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_208, __p3_208), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_208, __p3_208)}; \ | |
| 41286 | __ret_208 = __noswap_vcmlaq_f16(__rev0_208, __rev1_208, *(float16x8_t *) &__reint1_208); \ | |
| 41287 | __ret_208 = __builtin_shufflevector(__ret_208, __ret_208, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41288 | __ret_208; \ | |
| 41289 | }) | |
| 41290 | #endif | |
| 41291 | ||
| 41292 | #ifdef __LITTLE_ENDIAN__ | |
| 41293 | __ai float16x8_t vcmlaq_rot180_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41294 | float16x8_t __ret; | |
| 41295 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41296 | return __ret; | |
| 41297 | } | |
| 41298 | #else | |
| 41299 | __ai float16x8_t vcmlaq_rot180_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41300 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41301 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41302 | float16x8_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41303 | float16x8_t __ret; | |
| 41304 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 40); | |
| 41305 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41306 | return __ret; | |
| 41307 | } | |
| 41308 | __ai float16x8_t __noswap_vcmlaq_rot180_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41309 | float16x8_t __ret; | |
| 41310 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41311 | return __ret; | |
| 41312 | } | |
| 41313 | #endif | |
| 41314 | ||
| 41315 | #ifdef __LITTLE_ENDIAN__ | |
| 41316 | __ai float16x4_t vcmla_rot180_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41317 | float16x4_t __ret; | |
| 41318 | __ret = (float16x4_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41319 | return __ret; | |
| 41320 | } | |
| 41321 | #else | |
| 41322 | __ai float16x4_t vcmla_rot180_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41323 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 41324 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 41325 | float16x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 41326 | float16x4_t __ret; | |
| 41327 | __ret = (float16x4_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 8); | |
| 41328 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 41329 | return __ret; | |
| 41330 | } | |
| 41331 | __ai float16x4_t __noswap_vcmla_rot180_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41332 | float16x4_t __ret; | |
| 41333 | __ret = (float16x4_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41334 | return __ret; | |
| 41335 | } | |
| 41336 | #endif | |
| 41337 | ||
| 41338 | #ifdef __LITTLE_ENDIAN__ | |
| 41339 | #define vcmla_rot180_lane_f16(__p0_209, __p1_209, __p2_209, __p3_209) __extension__ ({ \ | |
| 41340 | float16x4_t __s0_209 = __p0_209; \ | |
| 41341 | float16x4_t __s1_209 = __p1_209; \ | |
| 41342 | float16x4_t __s2_209 = __p2_209; \ | |
| 41343 | float16x4_t __ret_209; \ | |
| 41344 | float16x4_t __reint_209 = __s2_209; \ | |
| 41345 | uint32x2_t __reint1_209 = (uint32x2_t) {vget_lane_u32(*(uint32x2_t *) &__reint_209, __p3_209), vget_lane_u32(*(uint32x2_t *) &__reint_209, __p3_209)}; \ | |
| 41346 | __ret_209 = vcmla_rot180_f16(__s0_209, __s1_209, *(float16x4_t *) &__reint1_209); \ | |
| 41347 | __ret_209; \ | |
| 41348 | }) | |
| 41349 | #else | |
| 41350 | #define vcmla_rot180_lane_f16(__p0_210, __p1_210, __p2_210, __p3_210) __extension__ ({ \ | |
| 41351 | float16x4_t __s0_210 = __p0_210; \ | |
| 41352 | float16x4_t __s1_210 = __p1_210; \ | |
| 41353 | float16x4_t __s2_210 = __p2_210; \ | |
| 41354 | float16x4_t __rev0_210; __rev0_210 = __builtin_shufflevector(__s0_210, __s0_210, 3, 2, 1, 0); \ | |
| 41355 | float16x4_t __rev1_210; __rev1_210 = __builtin_shufflevector(__s1_210, __s1_210, 3, 2, 1, 0); \ | |
| 41356 | float16x4_t __rev2_210; __rev2_210 = __builtin_shufflevector(__s2_210, __s2_210, 3, 2, 1, 0); \ | |
| 41357 | float16x4_t __ret_210; \ | |
| 41358 | float16x4_t __reint_210 = __rev2_210; \ | |
| 41359 | uint32x2_t __reint1_210 = (uint32x2_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_210, __p3_210), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_210, __p3_210)}; \ | |
| 41360 | __ret_210 = __noswap_vcmla_rot180_f16(__rev0_210, __rev1_210, *(float16x4_t *) &__reint1_210); \ | |
| 41361 | __ret_210 = __builtin_shufflevector(__ret_210, __ret_210, 3, 2, 1, 0); \ | |
| 41362 | __ret_210; \ | |
| 41363 | }) | |
| 41364 | #endif | |
| 41365 | ||
| 41366 | #ifdef __LITTLE_ENDIAN__ | |
| 41367 | #define vcmlaq_rot180_lane_f16(__p0_211, __p1_211, __p2_211, __p3_211) __extension__ ({ \ | |
| 41368 | float16x8_t __s0_211 = __p0_211; \ | |
| 41369 | float16x8_t __s1_211 = __p1_211; \ | |
| 41370 | float16x4_t __s2_211 = __p2_211; \ | |
| 41371 | float16x8_t __ret_211; \ | |
| 41372 | float16x4_t __reint_211 = __s2_211; \ | |
| 41373 | uint32x4_t __reint1_211 = (uint32x4_t) {vget_lane_u32(*(uint32x2_t *) &__reint_211, __p3_211), vget_lane_u32(*(uint32x2_t *) &__reint_211, __p3_211), vget_lane_u32(*(uint32x2_t *) &__reint_211, __p3_211), vget_lane_u32(*(uint32x2_t *) &__reint_211, __p3_211)}; \ | |
| 41374 | __ret_211 = vcmlaq_rot180_f16(__s0_211, __s1_211, *(float16x8_t *) &__reint1_211); \ | |
| 41375 | __ret_211; \ | |
| 41376 | }) | |
| 41377 | #else | |
| 41378 | #define vcmlaq_rot180_lane_f16(__p0_212, __p1_212, __p2_212, __p3_212) __extension__ ({ \ | |
| 41379 | float16x8_t __s0_212 = __p0_212; \ | |
| 41380 | float16x8_t __s1_212 = __p1_212; \ | |
| 41381 | float16x4_t __s2_212 = __p2_212; \ | |
| 41382 | float16x8_t __rev0_212; __rev0_212 = __builtin_shufflevector(__s0_212, __s0_212, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41383 | float16x8_t __rev1_212; __rev1_212 = __builtin_shufflevector(__s1_212, __s1_212, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41384 | float16x4_t __rev2_212; __rev2_212 = __builtin_shufflevector(__s2_212, __s2_212, 3, 2, 1, 0); \ | |
| 41385 | float16x8_t __ret_212; \ | |
| 41386 | float16x4_t __reint_212 = __rev2_212; \ | |
| 41387 | uint32x4_t __reint1_212 = (uint32x4_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_212, __p3_212), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_212, __p3_212), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_212, __p3_212), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_212, __p3_212)}; \ | |
| 41388 | __ret_212 = __noswap_vcmlaq_rot180_f16(__rev0_212, __rev1_212, *(float16x8_t *) &__reint1_212); \ | |
| 41389 | __ret_212 = __builtin_shufflevector(__ret_212, __ret_212, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41390 | __ret_212; \ | |
| 41391 | }) | |
| 41392 | #endif | |
| 41393 | ||
| 41394 | #ifdef __LITTLE_ENDIAN__ | |
| 41395 | #define vcmla_rot180_laneq_f16(__p0_213, __p1_213, __p2_213, __p3_213) __extension__ ({ \ | |
| 41396 | float16x4_t __s0_213 = __p0_213; \ | |
| 41397 | float16x4_t __s1_213 = __p1_213; \ | |
| 41398 | float16x8_t __s2_213 = __p2_213; \ | |
| 41399 | float16x4_t __ret_213; \ | |
| 41400 | float16x8_t __reint_213 = __s2_213; \ | |
| 41401 | uint32x2_t __reint1_213 = (uint32x2_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_213, __p3_213), vgetq_lane_u32(*(uint32x4_t *) &__reint_213, __p3_213)}; \ | |
| 41402 | __ret_213 = vcmla_rot180_f16(__s0_213, __s1_213, *(float16x4_t *) &__reint1_213); \ | |
| 41403 | __ret_213; \ | |
| 41404 | }) | |
| 41405 | #else | |
| 41406 | #define vcmla_rot180_laneq_f16(__p0_214, __p1_214, __p2_214, __p3_214) __extension__ ({ \ | |
| 41407 | float16x4_t __s0_214 = __p0_214; \ | |
| 41408 | float16x4_t __s1_214 = __p1_214; \ | |
| 41409 | float16x8_t __s2_214 = __p2_214; \ | |
| 41410 | float16x4_t __rev0_214; __rev0_214 = __builtin_shufflevector(__s0_214, __s0_214, 3, 2, 1, 0); \ | |
| 41411 | float16x4_t __rev1_214; __rev1_214 = __builtin_shufflevector(__s1_214, __s1_214, 3, 2, 1, 0); \ | |
| 41412 | float16x8_t __rev2_214; __rev2_214 = __builtin_shufflevector(__s2_214, __s2_214, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41413 | float16x4_t __ret_214; \ | |
| 41414 | float16x8_t __reint_214 = __rev2_214; \ | |
| 41415 | uint32x2_t __reint1_214 = (uint32x2_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_214, __p3_214), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_214, __p3_214)}; \ | |
| 41416 | __ret_214 = __noswap_vcmla_rot180_f16(__rev0_214, __rev1_214, *(float16x4_t *) &__reint1_214); \ | |
| 41417 | __ret_214 = __builtin_shufflevector(__ret_214, __ret_214, 3, 2, 1, 0); \ | |
| 41418 | __ret_214; \ | |
| 41419 | }) | |
| 41420 | #endif | |
| 41421 | ||
| 41422 | #ifdef __LITTLE_ENDIAN__ | |
| 41423 | #define vcmlaq_rot180_laneq_f16(__p0_215, __p1_215, __p2_215, __p3_215) __extension__ ({ \ | |
| 41424 | float16x8_t __s0_215 = __p0_215; \ | |
| 41425 | float16x8_t __s1_215 = __p1_215; \ | |
| 41426 | float16x8_t __s2_215 = __p2_215; \ | |
| 41427 | float16x8_t __ret_215; \ | |
| 41428 | float16x8_t __reint_215 = __s2_215; \ | |
| 41429 | uint32x4_t __reint1_215 = (uint32x4_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_215, __p3_215), vgetq_lane_u32(*(uint32x4_t *) &__reint_215, __p3_215), vgetq_lane_u32(*(uint32x4_t *) &__reint_215, __p3_215), vgetq_lane_u32(*(uint32x4_t *) &__reint_215, __p3_215)}; \ | |
| 41430 | __ret_215 = vcmlaq_rot180_f16(__s0_215, __s1_215, *(float16x8_t *) &__reint1_215); \ | |
| 41431 | __ret_215; \ | |
| 41432 | }) | |
| 41433 | #else | |
| 41434 | #define vcmlaq_rot180_laneq_f16(__p0_216, __p1_216, __p2_216, __p3_216) __extension__ ({ \ | |
| 41435 | float16x8_t __s0_216 = __p0_216; \ | |
| 41436 | float16x8_t __s1_216 = __p1_216; \ | |
| 41437 | float16x8_t __s2_216 = __p2_216; \ | |
| 41438 | float16x8_t __rev0_216; __rev0_216 = __builtin_shufflevector(__s0_216, __s0_216, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41439 | float16x8_t __rev1_216; __rev1_216 = __builtin_shufflevector(__s1_216, __s1_216, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41440 | float16x8_t __rev2_216; __rev2_216 = __builtin_shufflevector(__s2_216, __s2_216, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41441 | float16x8_t __ret_216; \ | |
| 41442 | float16x8_t __reint_216 = __rev2_216; \ | |
| 41443 | uint32x4_t __reint1_216 = (uint32x4_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_216, __p3_216), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_216, __p3_216), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_216, __p3_216), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_216, __p3_216)}; \ | |
| 41444 | __ret_216 = __noswap_vcmlaq_rot180_f16(__rev0_216, __rev1_216, *(float16x8_t *) &__reint1_216); \ | |
| 41445 | __ret_216 = __builtin_shufflevector(__ret_216, __ret_216, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41446 | __ret_216; \ | |
| 41447 | }) | |
| 41448 | #endif | |
| 41449 | ||
| 41450 | #ifdef __LITTLE_ENDIAN__ | |
| 41451 | __ai float16x8_t vcmlaq_rot270_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41452 | float16x8_t __ret; | |
| 41453 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41454 | return __ret; | |
| 41455 | } | |
| 41456 | #else | |
| 41457 | __ai float16x8_t vcmlaq_rot270_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41458 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41459 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41460 | float16x8_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41461 | float16x8_t __ret; | |
| 41462 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 40); | |
| 41463 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41464 | return __ret; | |
| 41465 | } | |
| 41466 | __ai float16x8_t __noswap_vcmlaq_rot270_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41467 | float16x8_t __ret; | |
| 41468 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41469 | return __ret; | |
| 41470 | } | |
| 41471 | #endif | |
| 41472 | ||
| 41473 | #ifdef __LITTLE_ENDIAN__ | |
| 41474 | __ai float16x4_t vcmla_rot270_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41475 | float16x4_t __ret; | |
| 41476 | __ret = (float16x4_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41477 | return __ret; | |
| 41478 | } | |
| 41479 | #else | |
| 41480 | __ai float16x4_t vcmla_rot270_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41481 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 41482 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 41483 | float16x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 41484 | float16x4_t __ret; | |
| 41485 | __ret = (float16x4_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 8); | |
| 41486 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 41487 | return __ret; | |
| 41488 | } | |
| 41489 | __ai float16x4_t __noswap_vcmla_rot270_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41490 | float16x4_t __ret; | |
| 41491 | __ret = (float16x4_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41492 | return __ret; | |
| 41493 | } | |
| 41494 | #endif | |
| 41495 | ||
| 41496 | #ifdef __LITTLE_ENDIAN__ | |
| 41497 | #define vcmla_rot270_lane_f16(__p0_217, __p1_217, __p2_217, __p3_217) __extension__ ({ \ | |
| 41498 | float16x4_t __s0_217 = __p0_217; \ | |
| 41499 | float16x4_t __s1_217 = __p1_217; \ | |
| 41500 | float16x4_t __s2_217 = __p2_217; \ | |
| 41501 | float16x4_t __ret_217; \ | |
| 41502 | float16x4_t __reint_217 = __s2_217; \ | |
| 41503 | uint32x2_t __reint1_217 = (uint32x2_t) {vget_lane_u32(*(uint32x2_t *) &__reint_217, __p3_217), vget_lane_u32(*(uint32x2_t *) &__reint_217, __p3_217)}; \ | |
| 41504 | __ret_217 = vcmla_rot270_f16(__s0_217, __s1_217, *(float16x4_t *) &__reint1_217); \ | |
| 41505 | __ret_217; \ | |
| 41506 | }) | |
| 41507 | #else | |
| 41508 | #define vcmla_rot270_lane_f16(__p0_218, __p1_218, __p2_218, __p3_218) __extension__ ({ \ | |
| 41509 | float16x4_t __s0_218 = __p0_218; \ | |
| 41510 | float16x4_t __s1_218 = __p1_218; \ | |
| 41511 | float16x4_t __s2_218 = __p2_218; \ | |
| 41512 | float16x4_t __rev0_218; __rev0_218 = __builtin_shufflevector(__s0_218, __s0_218, 3, 2, 1, 0); \ | |
| 41513 | float16x4_t __rev1_218; __rev1_218 = __builtin_shufflevector(__s1_218, __s1_218, 3, 2, 1, 0); \ | |
| 41514 | float16x4_t __rev2_218; __rev2_218 = __builtin_shufflevector(__s2_218, __s2_218, 3, 2, 1, 0); \ | |
| 41515 | float16x4_t __ret_218; \ | |
| 41516 | float16x4_t __reint_218 = __rev2_218; \ | |
| 41517 | uint32x2_t __reint1_218 = (uint32x2_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_218, __p3_218), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_218, __p3_218)}; \ | |
| 41518 | __ret_218 = __noswap_vcmla_rot270_f16(__rev0_218, __rev1_218, *(float16x4_t *) &__reint1_218); \ | |
| 41519 | __ret_218 = __builtin_shufflevector(__ret_218, __ret_218, 3, 2, 1, 0); \ | |
| 41520 | __ret_218; \ | |
| 41521 | }) | |
| 41522 | #endif | |
| 41523 | ||
| 41524 | #ifdef __LITTLE_ENDIAN__ | |
| 41525 | #define vcmlaq_rot270_lane_f16(__p0_219, __p1_219, __p2_219, __p3_219) __extension__ ({ \ | |
| 41526 | float16x8_t __s0_219 = __p0_219; \ | |
| 41527 | float16x8_t __s1_219 = __p1_219; \ | |
| 41528 | float16x4_t __s2_219 = __p2_219; \ | |
| 41529 | float16x8_t __ret_219; \ | |
| 41530 | float16x4_t __reint_219 = __s2_219; \ | |
| 41531 | uint32x4_t __reint1_219 = (uint32x4_t) {vget_lane_u32(*(uint32x2_t *) &__reint_219, __p3_219), vget_lane_u32(*(uint32x2_t *) &__reint_219, __p3_219), vget_lane_u32(*(uint32x2_t *) &__reint_219, __p3_219), vget_lane_u32(*(uint32x2_t *) &__reint_219, __p3_219)}; \ | |
| 41532 | __ret_219 = vcmlaq_rot270_f16(__s0_219, __s1_219, *(float16x8_t *) &__reint1_219); \ | |
| 41533 | __ret_219; \ | |
| 41534 | }) | |
| 41535 | #else | |
| 41536 | #define vcmlaq_rot270_lane_f16(__p0_220, __p1_220, __p2_220, __p3_220) __extension__ ({ \ | |
| 41537 | float16x8_t __s0_220 = __p0_220; \ | |
| 41538 | float16x8_t __s1_220 = __p1_220; \ | |
| 41539 | float16x4_t __s2_220 = __p2_220; \ | |
| 41540 | float16x8_t __rev0_220; __rev0_220 = __builtin_shufflevector(__s0_220, __s0_220, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41541 | float16x8_t __rev1_220; __rev1_220 = __builtin_shufflevector(__s1_220, __s1_220, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41542 | float16x4_t __rev2_220; __rev2_220 = __builtin_shufflevector(__s2_220, __s2_220, 3, 2, 1, 0); \ | |
| 41543 | float16x8_t __ret_220; \ | |
| 41544 | float16x4_t __reint_220 = __rev2_220; \ | |
| 41545 | uint32x4_t __reint1_220 = (uint32x4_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_220, __p3_220), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_220, __p3_220), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_220, __p3_220), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_220, __p3_220)}; \ | |
| 41546 | __ret_220 = __noswap_vcmlaq_rot270_f16(__rev0_220, __rev1_220, *(float16x8_t *) &__reint1_220); \ | |
| 41547 | __ret_220 = __builtin_shufflevector(__ret_220, __ret_220, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41548 | __ret_220; \ | |
| 41549 | }) | |
| 41550 | #endif | |
| 41551 | ||
| 41552 | #ifdef __LITTLE_ENDIAN__ | |
| 41553 | #define vcmla_rot270_laneq_f16(__p0_221, __p1_221, __p2_221, __p3_221) __extension__ ({ \ | |
| 41554 | float16x4_t __s0_221 = __p0_221; \ | |
| 41555 | float16x4_t __s1_221 = __p1_221; \ | |
| 41556 | float16x8_t __s2_221 = __p2_221; \ | |
| 41557 | float16x4_t __ret_221; \ | |
| 41558 | float16x8_t __reint_221 = __s2_221; \ | |
| 41559 | uint32x2_t __reint1_221 = (uint32x2_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_221, __p3_221), vgetq_lane_u32(*(uint32x4_t *) &__reint_221, __p3_221)}; \ | |
| 41560 | __ret_221 = vcmla_rot270_f16(__s0_221, __s1_221, *(float16x4_t *) &__reint1_221); \ | |
| 41561 | __ret_221; \ | |
| 41562 | }) | |
| 41563 | #else | |
| 41564 | #define vcmla_rot270_laneq_f16(__p0_222, __p1_222, __p2_222, __p3_222) __extension__ ({ \ | |
| 41565 | float16x4_t __s0_222 = __p0_222; \ | |
| 41566 | float16x4_t __s1_222 = __p1_222; \ | |
| 41567 | float16x8_t __s2_222 = __p2_222; \ | |
| 41568 | float16x4_t __rev0_222; __rev0_222 = __builtin_shufflevector(__s0_222, __s0_222, 3, 2, 1, 0); \ | |
| 41569 | float16x4_t __rev1_222; __rev1_222 = __builtin_shufflevector(__s1_222, __s1_222, 3, 2, 1, 0); \ | |
| 41570 | float16x8_t __rev2_222; __rev2_222 = __builtin_shufflevector(__s2_222, __s2_222, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41571 | float16x4_t __ret_222; \ | |
| 41572 | float16x8_t __reint_222 = __rev2_222; \ | |
| 41573 | uint32x2_t __reint1_222 = (uint32x2_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_222, __p3_222), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_222, __p3_222)}; \ | |
| 41574 | __ret_222 = __noswap_vcmla_rot270_f16(__rev0_222, __rev1_222, *(float16x4_t *) &__reint1_222); \ | |
| 41575 | __ret_222 = __builtin_shufflevector(__ret_222, __ret_222, 3, 2, 1, 0); \ | |
| 41576 | __ret_222; \ | |
| 41577 | }) | |
| 41578 | #endif | |
| 41579 | ||
| 41580 | #ifdef __LITTLE_ENDIAN__ | |
| 41581 | #define vcmlaq_rot270_laneq_f16(__p0_223, __p1_223, __p2_223, __p3_223) __extension__ ({ \ | |
| 41582 | float16x8_t __s0_223 = __p0_223; \ | |
| 41583 | float16x8_t __s1_223 = __p1_223; \ | |
| 41584 | float16x8_t __s2_223 = __p2_223; \ | |
| 41585 | float16x8_t __ret_223; \ | |
| 41586 | float16x8_t __reint_223 = __s2_223; \ | |
| 41587 | uint32x4_t __reint1_223 = (uint32x4_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_223, __p3_223), vgetq_lane_u32(*(uint32x4_t *) &__reint_223, __p3_223), vgetq_lane_u32(*(uint32x4_t *) &__reint_223, __p3_223), vgetq_lane_u32(*(uint32x4_t *) &__reint_223, __p3_223)}; \ | |
| 41588 | __ret_223 = vcmlaq_rot270_f16(__s0_223, __s1_223, *(float16x8_t *) &__reint1_223); \ | |
| 41589 | __ret_223; \ | |
| 41590 | }) | |
| 41591 | #else | |
| 41592 | #define vcmlaq_rot270_laneq_f16(__p0_224, __p1_224, __p2_224, __p3_224) __extension__ ({ \ | |
| 41593 | float16x8_t __s0_224 = __p0_224; \ | |
| 41594 | float16x8_t __s1_224 = __p1_224; \ | |
| 41595 | float16x8_t __s2_224 = __p2_224; \ | |
| 41596 | float16x8_t __rev0_224; __rev0_224 = __builtin_shufflevector(__s0_224, __s0_224, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41597 | float16x8_t __rev1_224; __rev1_224 = __builtin_shufflevector(__s1_224, __s1_224, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41598 | float16x8_t __rev2_224; __rev2_224 = __builtin_shufflevector(__s2_224, __s2_224, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41599 | float16x8_t __ret_224; \ | |
| 41600 | float16x8_t __reint_224 = __rev2_224; \ | |
| 41601 | uint32x4_t __reint1_224 = (uint32x4_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_224, __p3_224), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_224, __p3_224), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_224, __p3_224), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_224, __p3_224)}; \ | |
| 41602 | __ret_224 = __noswap_vcmlaq_rot270_f16(__rev0_224, __rev1_224, *(float16x8_t *) &__reint1_224); \ | |
| 41603 | __ret_224 = __builtin_shufflevector(__ret_224, __ret_224, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41604 | __ret_224; \ | |
| 41605 | }) | |
| 41606 | #endif | |
| 41607 | ||
| 41608 | #ifdef __LITTLE_ENDIAN__ | |
| 41609 | __ai float16x8_t vcmlaq_rot90_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41610 | float16x8_t __ret; | |
| 41611 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41612 | return __ret; | |
| 41613 | } | |
| 41614 | #else | |
| 41615 | __ai float16x8_t vcmlaq_rot90_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41616 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41617 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41618 | float16x8_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41619 | float16x8_t __ret; | |
| 41620 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 40); | |
| 41621 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41622 | return __ret; | |
| 41623 | } | |
| 41624 | __ai float16x8_t __noswap_vcmlaq_rot90_f16(float16x8_t __p0, float16x8_t __p1, float16x8_t __p2) { | |
| 41625 | float16x8_t __ret; | |
| 41626 | __ret = (float16x8_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 40); | |
| 41627 | return __ret; | |
| 41628 | } | |
| 40432 | 41629 | #endif |
| 40433 | #if defined(__ARM_FEATURE_COMPLEX) && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) | |
| 41630 | ||
| 40434 | 41631 | #ifdef __LITTLE_ENDIAN__ |
| 40435 | __ai float16x4_t vcadd_rot270_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 41632 | __ai float16x4_t vcmla_rot90_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 40436 | 41633 | float16x4_t __ret; |
| 40437 | __ret = (float16x4_t) __builtin_neon_vcadd_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, 8); | |
| 41634 | __ret = (float16x4_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 40438 | 41635 | return __ret; |
| 40439 | 41636 | } |
| 40440 | 41637 | #else |
| 40441 | __ai float16x4_t vcadd_rot270_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 41638 | __ai float16x4_t vcmla_rot90_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 40442 | 41639 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); |
| 40443 | 41640 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); |
| 41641 | float16x4_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 3, 2, 1, 0); | |
| 40444 | 41642 | float16x4_t __ret; |
| 40445 | __ret = (float16x4_t) __builtin_neon_vcadd_rot270_v((int8x8_t)__rev0, (int8x8_t)__rev1, 8); | |
| 41643 | __ret = (float16x4_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__rev0, (int8x8_t)__rev1, (int8x8_t)__rev2, 8); | |
| 40446 | 41644 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); |
| 40447 | 41645 | return __ret; |
| 40448 | 41646 | } |
| 41647 | __ai float16x4_t __noswap_vcmla_rot90_f16(float16x4_t __p0, float16x4_t __p1, float16x4_t __p2) { | |
| 41648 | float16x4_t __ret; | |
| 41649 | __ret = (float16x4_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 8); | |
| 41650 | return __ret; | |
| 41651 | } | |
| 40449 | 41652 | #endif |
| 40450 | 41653 | |
| 40451 | 41654 | #ifdef __LITTLE_ENDIAN__ |
| 40452 | __ai float16x4_t vcadd_rot90_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 40453 | float16x4_t __ret; | |
| 40454 | __ret = (float16x4_t) __builtin_neon_vcadd_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, 8); | |
| 41655 | #define vcmla_rot90_lane_f16(__p0_225, __p1_225, __p2_225, __p3_225) __extension__ ({ \ | |
| 41656 | float16x4_t __s0_225 = __p0_225; \ | |
| 41657 | float16x4_t __s1_225 = __p1_225; \ | |
| 41658 | float16x4_t __s2_225 = __p2_225; \ | |
| 41659 | float16x4_t __ret_225; \ | |
| 41660 | float16x4_t __reint_225 = __s2_225; \ | |
| 41661 | uint32x2_t __reint1_225 = (uint32x2_t) {vget_lane_u32(*(uint32x2_t *) &__reint_225, __p3_225), vget_lane_u32(*(uint32x2_t *) &__reint_225, __p3_225)}; \ | |
| 41662 | __ret_225 = vcmla_rot90_f16(__s0_225, __s1_225, *(float16x4_t *) &__reint1_225); \ | |
| 41663 | __ret_225; \ | |
| 41664 | }) | |
| 41665 | #else | |
| 41666 | #define vcmla_rot90_lane_f16(__p0_226, __p1_226, __p2_226, __p3_226) __extension__ ({ \ | |
| 41667 | float16x4_t __s0_226 = __p0_226; \ | |
| 41668 | float16x4_t __s1_226 = __p1_226; \ | |
| 41669 | float16x4_t __s2_226 = __p2_226; \ | |
| 41670 | float16x4_t __rev0_226; __rev0_226 = __builtin_shufflevector(__s0_226, __s0_226, 3, 2, 1, 0); \ | |
| 41671 | float16x4_t __rev1_226; __rev1_226 = __builtin_shufflevector(__s1_226, __s1_226, 3, 2, 1, 0); \ | |
| 41672 | float16x4_t __rev2_226; __rev2_226 = __builtin_shufflevector(__s2_226, __s2_226, 3, 2, 1, 0); \ | |
| 41673 | float16x4_t __ret_226; \ | |
| 41674 | float16x4_t __reint_226 = __rev2_226; \ | |
| 41675 | uint32x2_t __reint1_226 = (uint32x2_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_226, __p3_226), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_226, __p3_226)}; \ | |
| 41676 | __ret_226 = __noswap_vcmla_rot90_f16(__rev0_226, __rev1_226, *(float16x4_t *) &__reint1_226); \ | |
| 41677 | __ret_226 = __builtin_shufflevector(__ret_226, __ret_226, 3, 2, 1, 0); \ | |
| 41678 | __ret_226; \ | |
| 41679 | }) | |
| 41680 | #endif | |
| 41681 | ||
| 41682 | #ifdef __LITTLE_ENDIAN__ | |
| 41683 | #define vcmlaq_rot90_lane_f16(__p0_227, __p1_227, __p2_227, __p3_227) __extension__ ({ \ | |
| 41684 | float16x8_t __s0_227 = __p0_227; \ | |
| 41685 | float16x8_t __s1_227 = __p1_227; \ | |
| 41686 | float16x4_t __s2_227 = __p2_227; \ | |
| 41687 | float16x8_t __ret_227; \ | |
| 41688 | float16x4_t __reint_227 = __s2_227; \ | |
| 41689 | uint32x4_t __reint1_227 = (uint32x4_t) {vget_lane_u32(*(uint32x2_t *) &__reint_227, __p3_227), vget_lane_u32(*(uint32x2_t *) &__reint_227, __p3_227), vget_lane_u32(*(uint32x2_t *) &__reint_227, __p3_227), vget_lane_u32(*(uint32x2_t *) &__reint_227, __p3_227)}; \ | |
| 41690 | __ret_227 = vcmlaq_rot90_f16(__s0_227, __s1_227, *(float16x8_t *) &__reint1_227); \ | |
| 41691 | __ret_227; \ | |
| 41692 | }) | |
| 41693 | #else | |
| 41694 | #define vcmlaq_rot90_lane_f16(__p0_228, __p1_228, __p2_228, __p3_228) __extension__ ({ \ | |
| 41695 | float16x8_t __s0_228 = __p0_228; \ | |
| 41696 | float16x8_t __s1_228 = __p1_228; \ | |
| 41697 | float16x4_t __s2_228 = __p2_228; \ | |
| 41698 | float16x8_t __rev0_228; __rev0_228 = __builtin_shufflevector(__s0_228, __s0_228, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41699 | float16x8_t __rev1_228; __rev1_228 = __builtin_shufflevector(__s1_228, __s1_228, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41700 | float16x4_t __rev2_228; __rev2_228 = __builtin_shufflevector(__s2_228, __s2_228, 3, 2, 1, 0); \ | |
| 41701 | float16x8_t __ret_228; \ | |
| 41702 | float16x4_t __reint_228 = __rev2_228; \ | |
| 41703 | uint32x4_t __reint1_228 = (uint32x4_t) {__noswap_vget_lane_u32(*(uint32x2_t *) &__reint_228, __p3_228), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_228, __p3_228), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_228, __p3_228), __noswap_vget_lane_u32(*(uint32x2_t *) &__reint_228, __p3_228)}; \ | |
| 41704 | __ret_228 = __noswap_vcmlaq_rot90_f16(__rev0_228, __rev1_228, *(float16x8_t *) &__reint1_228); \ | |
| 41705 | __ret_228 = __builtin_shufflevector(__ret_228, __ret_228, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41706 | __ret_228; \ | |
| 41707 | }) | |
| 41708 | #endif | |
| 41709 | ||
| 41710 | #ifdef __LITTLE_ENDIAN__ | |
| 41711 | #define vcmla_rot90_laneq_f16(__p0_229, __p1_229, __p2_229, __p3_229) __extension__ ({ \ | |
| 41712 | float16x4_t __s0_229 = __p0_229; \ | |
| 41713 | float16x4_t __s1_229 = __p1_229; \ | |
| 41714 | float16x8_t __s2_229 = __p2_229; \ | |
| 41715 | float16x4_t __ret_229; \ | |
| 41716 | float16x8_t __reint_229 = __s2_229; \ | |
| 41717 | uint32x2_t __reint1_229 = (uint32x2_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_229, __p3_229), vgetq_lane_u32(*(uint32x4_t *) &__reint_229, __p3_229)}; \ | |
| 41718 | __ret_229 = vcmla_rot90_f16(__s0_229, __s1_229, *(float16x4_t *) &__reint1_229); \ | |
| 41719 | __ret_229; \ | |
| 41720 | }) | |
| 41721 | #else | |
| 41722 | #define vcmla_rot90_laneq_f16(__p0_230, __p1_230, __p2_230, __p3_230) __extension__ ({ \ | |
| 41723 | float16x4_t __s0_230 = __p0_230; \ | |
| 41724 | float16x4_t __s1_230 = __p1_230; \ | |
| 41725 | float16x8_t __s2_230 = __p2_230; \ | |
| 41726 | float16x4_t __rev0_230; __rev0_230 = __builtin_shufflevector(__s0_230, __s0_230, 3, 2, 1, 0); \ | |
| 41727 | float16x4_t __rev1_230; __rev1_230 = __builtin_shufflevector(__s1_230, __s1_230, 3, 2, 1, 0); \ | |
| 41728 | float16x8_t __rev2_230; __rev2_230 = __builtin_shufflevector(__s2_230, __s2_230, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41729 | float16x4_t __ret_230; \ | |
| 41730 | float16x8_t __reint_230 = __rev2_230; \ | |
| 41731 | uint32x2_t __reint1_230 = (uint32x2_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_230, __p3_230), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_230, __p3_230)}; \ | |
| 41732 | __ret_230 = __noswap_vcmla_rot90_f16(__rev0_230, __rev1_230, *(float16x4_t *) &__reint1_230); \ | |
| 41733 | __ret_230 = __builtin_shufflevector(__ret_230, __ret_230, 3, 2, 1, 0); \ | |
| 41734 | __ret_230; \ | |
| 41735 | }) | |
| 41736 | #endif | |
| 41737 | ||
| 41738 | #ifdef __LITTLE_ENDIAN__ | |
| 41739 | #define vcmlaq_rot90_laneq_f16(__p0_231, __p1_231, __p2_231, __p3_231) __extension__ ({ \ | |
| 41740 | float16x8_t __s0_231 = __p0_231; \ | |
| 41741 | float16x8_t __s1_231 = __p1_231; \ | |
| 41742 | float16x8_t __s2_231 = __p2_231; \ | |
| 41743 | float16x8_t __ret_231; \ | |
| 41744 | float16x8_t __reint_231 = __s2_231; \ | |
| 41745 | uint32x4_t __reint1_231 = (uint32x4_t) {vgetq_lane_u32(*(uint32x4_t *) &__reint_231, __p3_231), vgetq_lane_u32(*(uint32x4_t *) &__reint_231, __p3_231), vgetq_lane_u32(*(uint32x4_t *) &__reint_231, __p3_231), vgetq_lane_u32(*(uint32x4_t *) &__reint_231, __p3_231)}; \ | |
| 41746 | __ret_231 = vcmlaq_rot90_f16(__s0_231, __s1_231, *(float16x8_t *) &__reint1_231); \ | |
| 41747 | __ret_231; \ | |
| 41748 | }) | |
| 41749 | #else | |
| 41750 | #define vcmlaq_rot90_laneq_f16(__p0_232, __p1_232, __p2_232, __p3_232) __extension__ ({ \ | |
| 41751 | float16x8_t __s0_232 = __p0_232; \ | |
| 41752 | float16x8_t __s1_232 = __p1_232; \ | |
| 41753 | float16x8_t __s2_232 = __p2_232; \ | |
| 41754 | float16x8_t __rev0_232; __rev0_232 = __builtin_shufflevector(__s0_232, __s0_232, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41755 | float16x8_t __rev1_232; __rev1_232 = __builtin_shufflevector(__s1_232, __s1_232, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41756 | float16x8_t __rev2_232; __rev2_232 = __builtin_shufflevector(__s2_232, __s2_232, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41757 | float16x8_t __ret_232; \ | |
| 41758 | float16x8_t __reint_232 = __rev2_232; \ | |
| 41759 | uint32x4_t __reint1_232 = (uint32x4_t) {__noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_232, __p3_232), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_232, __p3_232), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_232, __p3_232), __noswap_vgetq_lane_u32(*(uint32x4_t *) &__reint_232, __p3_232)}; \ | |
| 41760 | __ret_232 = __noswap_vcmlaq_rot90_f16(__rev0_232, __rev1_232, *(float16x8_t *) &__reint1_232); \ | |
| 41761 | __ret_232 = __builtin_shufflevector(__ret_232, __ret_232, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 41762 | __ret_232; \ | |
| 41763 | }) | |
| 41764 | #endif | |
| 41765 | ||
| 41766 | #endif | |
| 41767 | #if defined(__ARM_FEATURE_COMPLEX) && defined(__aarch64__) | |
| 41768 | #ifdef __LITTLE_ENDIAN__ | |
| 41769 | __ai float64x2_t vcaddq_rot270_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 41770 | float64x2_t __ret; | |
| 41771 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, 42); | |
| 40455 | 41772 | return __ret; |
| 40456 | 41773 | } |
| 40457 | 41774 | #else |
| 40458 | __ai float16x4_t vcadd_rot90_f16(float16x4_t __p0, float16x4_t __p1) { | |
| 40459 | float16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 40460 | float16x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); | |
| 40461 | float16x4_t __ret; | |
| 40462 | __ret = (float16x4_t) __builtin_neon_vcadd_rot90_v((int8x8_t)__rev0, (int8x8_t)__rev1, 8); | |
| 40463 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 41775 | __ai float64x2_t vcaddq_rot270_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 41776 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 41777 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 41778 | float64x2_t __ret; | |
| 41779 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, 42); | |
| 41780 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40464 | 41781 | return __ret; |
| 40465 | 41782 | } |
| 40466 | 41783 | #endif |
| 40467 | 41784 | |
| 40468 | 41785 | #ifdef __LITTLE_ENDIAN__ |
| 40469 | __ai float16x8_t vcaddq_rot270_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 40470 | float16x8_t __ret; | |
| 40471 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, 40); | |
| 41786 | __ai float64x2_t vcaddq_rot90_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 41787 | float64x2_t __ret; | |
| 41788 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, 42); | |
| 40472 | 41789 | return __ret; |
| 40473 | 41790 | } |
| 40474 | 41791 | #else |
| 40475 | __ai float16x8_t vcaddq_rot270_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 40476 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 40477 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 40478 | float16x8_t __ret; | |
| 40479 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, 40); | |
| 40480 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41792 | __ai float64x2_t vcaddq_rot90_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 41793 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 41794 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 41795 | float64x2_t __ret; | |
| 41796 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, 42); | |
| 41797 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40481 | 41798 | return __ret; |
| 40482 | 41799 | } |
| 40483 | 41800 | #endif |
| 40484 | 41801 | |
| 40485 | 41802 | #ifdef __LITTLE_ENDIAN__ |
| 40486 | __ai float16x8_t vcaddq_rot90_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 40487 | float16x8_t __ret; | |
| 40488 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, 40); | |
| 41803 | __ai float64x2_t vcmlaq_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 41804 | float64x2_t __ret; | |
| 41805 | __ret = (float64x2_t) __builtin_neon_vcmlaq_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 40489 | 41806 | return __ret; |
| 40490 | 41807 | } |
| 40491 | 41808 | #else |
| 40492 | __ai float16x8_t vcaddq_rot90_f16(float16x8_t __p0, float16x8_t __p1) { | |
| 40493 | float16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 40494 | float16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 40495 | float16x8_t __ret; | |
| 40496 | __ret = (float16x8_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, 40); | |
| 40497 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 41809 | __ai float64x2_t vcmlaq_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 41810 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 41811 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 41812 | float64x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 41813 | float64x2_t __ret; | |
| 41814 | __ret = (float64x2_t) __builtin_neon_vcmlaq_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 42); | |
| 41815 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 41816 | return __ret; | |
| 41817 | } | |
| 41818 | __ai float64x2_t __noswap_vcmlaq_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 41819 | float64x2_t __ret; | |
| 41820 | __ret = (float64x2_t) __builtin_neon_vcmlaq_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 40498 | 41821 | return __ret; |
| 40499 | 41822 | } |
| 40500 | 41823 | #endif |
| 40501 | 41824 | |
| 41825 | __ai float64x1_t vcmla_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) { | |
| 41826 | float64x1_t __ret; | |
| 41827 | __ret = (float64x1_t) __builtin_neon_vcmla_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 10); | |
| 41828 | return __ret; | |
| 41829 | } | |
| 41830 | #define vcmla_lane_f64(__p0_233, __p1_233, __p2_233, __p3_233) __extension__ ({ \ | |
| 41831 | float64x1_t __s0_233 = __p0_233; \ | |
| 41832 | float64x1_t __s1_233 = __p1_233; \ | |
| 41833 | float64x1_t __s2_233 = __p2_233; \ | |
| 41834 | float64x1_t __ret_233; \ | |
| 41835 | float64x1_t __reint_233 = __s2_233; \ | |
| 41836 | uint64x2_t __reint1_233 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_233, __p3_233), vgetq_lane_u64(*(uint64x2_t *) &__reint_233, __p3_233)}; \ | |
| 41837 | __ret_233 = vcmla_f64(__s0_233, __s1_233, *(float64x1_t *) &__reint1_233); \ | |
| 41838 | __ret_233; \ | |
| 41839 | }) | |
| 41840 | #ifdef __LITTLE_ENDIAN__ | |
| 41841 | #define vcmlaq_lane_f64(__p0_234, __p1_234, __p2_234, __p3_234) __extension__ ({ \ | |
| 41842 | float64x2_t __s0_234 = __p0_234; \ | |
| 41843 | float64x2_t __s1_234 = __p1_234; \ | |
| 41844 | float64x1_t __s2_234 = __p2_234; \ | |
| 41845 | float64x2_t __ret_234; \ | |
| 41846 | float64x1_t __reint_234 = __s2_234; \ | |
| 41847 | uint64x2_t __reint1_234 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_234, __p3_234), vgetq_lane_u64(*(uint64x2_t *) &__reint_234, __p3_234)}; \ | |
| 41848 | __ret_234 = vcmlaq_f64(__s0_234, __s1_234, *(float64x2_t *) &__reint1_234); \ | |
| 41849 | __ret_234; \ | |
| 41850 | }) | |
| 41851 | #else | |
| 41852 | #define vcmlaq_lane_f64(__p0_235, __p1_235, __p2_235, __p3_235) __extension__ ({ \ | |
| 41853 | float64x2_t __s0_235 = __p0_235; \ | |
| 41854 | float64x2_t __s1_235 = __p1_235; \ | |
| 41855 | float64x1_t __s2_235 = __p2_235; \ | |
| 41856 | float64x2_t __rev0_235; __rev0_235 = __builtin_shufflevector(__s0_235, __s0_235, 1, 0); \ | |
| 41857 | float64x2_t __rev1_235; __rev1_235 = __builtin_shufflevector(__s1_235, __s1_235, 1, 0); \ | |
| 41858 | float64x2_t __ret_235; \ | |
| 41859 | float64x1_t __reint_235 = __s2_235; \ | |
| 41860 | uint64x2_t __reint1_235 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_235, __p3_235), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_235, __p3_235)}; \ | |
| 41861 | __ret_235 = __noswap_vcmlaq_f64(__rev0_235, __rev1_235, *(float64x2_t *) &__reint1_235); \ | |
| 41862 | __ret_235 = __builtin_shufflevector(__ret_235, __ret_235, 1, 0); \ | |
| 41863 | __ret_235; \ | |
| 41864 | }) | |
| 40502 | 41865 | #endif |
| 40503 | #if defined(__ARM_FEATURE_COMPLEX) && defined(__aarch64__) | |
| 41866 | ||
| 40504 | 41867 | #ifdef __LITTLE_ENDIAN__ |
| 40505 | __ai float64x2_t vcaddq_rot270_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 41868 | #define vcmla_laneq_f64(__p0_236, __p1_236, __p2_236, __p3_236) __extension__ ({ \ | |
| 41869 | float64x1_t __s0_236 = __p0_236; \ | |
| 41870 | float64x1_t __s1_236 = __p1_236; \ | |
| 41871 | float64x2_t __s2_236 = __p2_236; \ | |
| 41872 | float64x1_t __ret_236; \ | |
| 41873 | float64x2_t __reint_236 = __s2_236; \ | |
| 41874 | uint64x2_t __reint1_236 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_236, __p3_236), vgetq_lane_u64(*(uint64x2_t *) &__reint_236, __p3_236)}; \ | |
| 41875 | __ret_236 = vcmla_f64(__s0_236, __s1_236, *(float64x1_t *) &__reint1_236); \ | |
| 41876 | __ret_236; \ | |
| 41877 | }) | |
| 41878 | #else | |
| 41879 | #define vcmla_laneq_f64(__p0_237, __p1_237, __p2_237, __p3_237) __extension__ ({ \ | |
| 41880 | float64x1_t __s0_237 = __p0_237; \ | |
| 41881 | float64x1_t __s1_237 = __p1_237; \ | |
| 41882 | float64x2_t __s2_237 = __p2_237; \ | |
| 41883 | float64x2_t __rev2_237; __rev2_237 = __builtin_shufflevector(__s2_237, __s2_237, 1, 0); \ | |
| 41884 | float64x1_t __ret_237; \ | |
| 41885 | float64x2_t __reint_237 = __rev2_237; \ | |
| 41886 | uint64x2_t __reint1_237 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_237, __p3_237), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_237, __p3_237)}; \ | |
| 41887 | __ret_237 = vcmla_f64(__s0_237, __s1_237, *(float64x1_t *) &__reint1_237); \ | |
| 41888 | __ret_237; \ | |
| 41889 | }) | |
| 41890 | #endif | |
| 41891 | ||
| 41892 | #ifdef __LITTLE_ENDIAN__ | |
| 41893 | #define vcmlaq_laneq_f64(__p0_238, __p1_238, __p2_238, __p3_238) __extension__ ({ \ | |
| 41894 | float64x2_t __s0_238 = __p0_238; \ | |
| 41895 | float64x2_t __s1_238 = __p1_238; \ | |
| 41896 | float64x2_t __s2_238 = __p2_238; \ | |
| 41897 | float64x2_t __ret_238; \ | |
| 41898 | float64x2_t __reint_238 = __s2_238; \ | |
| 41899 | uint64x2_t __reint1_238 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_238, __p3_238), vgetq_lane_u64(*(uint64x2_t *) &__reint_238, __p3_238)}; \ | |
| 41900 | __ret_238 = vcmlaq_f64(__s0_238, __s1_238, *(float64x2_t *) &__reint1_238); \ | |
| 41901 | __ret_238; \ | |
| 41902 | }) | |
| 41903 | #else | |
| 41904 | #define vcmlaq_laneq_f64(__p0_239, __p1_239, __p2_239, __p3_239) __extension__ ({ \ | |
| 41905 | float64x2_t __s0_239 = __p0_239; \ | |
| 41906 | float64x2_t __s1_239 = __p1_239; \ | |
| 41907 | float64x2_t __s2_239 = __p2_239; \ | |
| 41908 | float64x2_t __rev0_239; __rev0_239 = __builtin_shufflevector(__s0_239, __s0_239, 1, 0); \ | |
| 41909 | float64x2_t __rev1_239; __rev1_239 = __builtin_shufflevector(__s1_239, __s1_239, 1, 0); \ | |
| 41910 | float64x2_t __rev2_239; __rev2_239 = __builtin_shufflevector(__s2_239, __s2_239, 1, 0); \ | |
| 41911 | float64x2_t __ret_239; \ | |
| 41912 | float64x2_t __reint_239 = __rev2_239; \ | |
| 41913 | uint64x2_t __reint1_239 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_239, __p3_239), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_239, __p3_239)}; \ | |
| 41914 | __ret_239 = __noswap_vcmlaq_f64(__rev0_239, __rev1_239, *(float64x2_t *) &__reint1_239); \ | |
| 41915 | __ret_239 = __builtin_shufflevector(__ret_239, __ret_239, 1, 0); \ | |
| 41916 | __ret_239; \ | |
| 41917 | }) | |
| 41918 | #endif | |
| 41919 | ||
| 41920 | #ifdef __LITTLE_ENDIAN__ | |
| 41921 | __ai float64x2_t vcmlaq_rot180_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 40506 | 41922 | float64x2_t __ret; |
| 40507 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, 42); | |
| 41923 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 40508 | 41924 | return __ret; |
| 40509 | 41925 | } |
| 40510 | 41926 | #else |
| 40511 | __ai float64x2_t vcaddq_rot270_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 41927 | __ai float64x2_t vcmlaq_rot180_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 40512 | 41928 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); |
| 40513 | 41929 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); |
| 41930 | float64x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 40514 | 41931 | float64x2_t __ret; |
| 40515 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, 42); | |
| 41932 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 42); | |
| 41933 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 41934 | return __ret; | |
| 41935 | } | |
| 41936 | __ai float64x2_t __noswap_vcmlaq_rot180_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 41937 | float64x2_t __ret; | |
| 41938 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot180_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 41939 | return __ret; | |
| 41940 | } | |
| 41941 | #endif | |
| 41942 | ||
| 41943 | __ai float64x1_t vcmla_rot180_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) { | |
| 41944 | float64x1_t __ret; | |
| 41945 | __ret = (float64x1_t) __builtin_neon_vcmla_rot180_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 10); | |
| 41946 | return __ret; | |
| 41947 | } | |
| 41948 | #define vcmla_rot180_lane_f64(__p0_240, __p1_240, __p2_240, __p3_240) __extension__ ({ \ | |
| 41949 | float64x1_t __s0_240 = __p0_240; \ | |
| 41950 | float64x1_t __s1_240 = __p1_240; \ | |
| 41951 | float64x1_t __s2_240 = __p2_240; \ | |
| 41952 | float64x1_t __ret_240; \ | |
| 41953 | float64x1_t __reint_240 = __s2_240; \ | |
| 41954 | uint64x2_t __reint1_240 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_240, __p3_240), vgetq_lane_u64(*(uint64x2_t *) &__reint_240, __p3_240)}; \ | |
| 41955 | __ret_240 = vcmla_rot180_f64(__s0_240, __s1_240, *(float64x1_t *) &__reint1_240); \ | |
| 41956 | __ret_240; \ | |
| 41957 | }) | |
| 41958 | #ifdef __LITTLE_ENDIAN__ | |
| 41959 | #define vcmlaq_rot180_lane_f64(__p0_241, __p1_241, __p2_241, __p3_241) __extension__ ({ \ | |
| 41960 | float64x2_t __s0_241 = __p0_241; \ | |
| 41961 | float64x2_t __s1_241 = __p1_241; \ | |
| 41962 | float64x1_t __s2_241 = __p2_241; \ | |
| 41963 | float64x2_t __ret_241; \ | |
| 41964 | float64x1_t __reint_241 = __s2_241; \ | |
| 41965 | uint64x2_t __reint1_241 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_241, __p3_241), vgetq_lane_u64(*(uint64x2_t *) &__reint_241, __p3_241)}; \ | |
| 41966 | __ret_241 = vcmlaq_rot180_f64(__s0_241, __s1_241, *(float64x2_t *) &__reint1_241); \ | |
| 41967 | __ret_241; \ | |
| 41968 | }) | |
| 41969 | #else | |
| 41970 | #define vcmlaq_rot180_lane_f64(__p0_242, __p1_242, __p2_242, __p3_242) __extension__ ({ \ | |
| 41971 | float64x2_t __s0_242 = __p0_242; \ | |
| 41972 | float64x2_t __s1_242 = __p1_242; \ | |
| 41973 | float64x1_t __s2_242 = __p2_242; \ | |
| 41974 | float64x2_t __rev0_242; __rev0_242 = __builtin_shufflevector(__s0_242, __s0_242, 1, 0); \ | |
| 41975 | float64x2_t __rev1_242; __rev1_242 = __builtin_shufflevector(__s1_242, __s1_242, 1, 0); \ | |
| 41976 | float64x2_t __ret_242; \ | |
| 41977 | float64x1_t __reint_242 = __s2_242; \ | |
| 41978 | uint64x2_t __reint1_242 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_242, __p3_242), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_242, __p3_242)}; \ | |
| 41979 | __ret_242 = __noswap_vcmlaq_rot180_f64(__rev0_242, __rev1_242, *(float64x2_t *) &__reint1_242); \ | |
| 41980 | __ret_242 = __builtin_shufflevector(__ret_242, __ret_242, 1, 0); \ | |
| 41981 | __ret_242; \ | |
| 41982 | }) | |
| 41983 | #endif | |
| 41984 | ||
| 41985 | #ifdef __LITTLE_ENDIAN__ | |
| 41986 | #define vcmla_rot180_laneq_f64(__p0_243, __p1_243, __p2_243, __p3_243) __extension__ ({ \ | |
| 41987 | float64x1_t __s0_243 = __p0_243; \ | |
| 41988 | float64x1_t __s1_243 = __p1_243; \ | |
| 41989 | float64x2_t __s2_243 = __p2_243; \ | |
| 41990 | float64x1_t __ret_243; \ | |
| 41991 | float64x2_t __reint_243 = __s2_243; \ | |
| 41992 | uint64x2_t __reint1_243 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_243, __p3_243), vgetq_lane_u64(*(uint64x2_t *) &__reint_243, __p3_243)}; \ | |
| 41993 | __ret_243 = vcmla_rot180_f64(__s0_243, __s1_243, *(float64x1_t *) &__reint1_243); \ | |
| 41994 | __ret_243; \ | |
| 41995 | }) | |
| 41996 | #else | |
| 41997 | #define vcmla_rot180_laneq_f64(__p0_244, __p1_244, __p2_244, __p3_244) __extension__ ({ \ | |
| 41998 | float64x1_t __s0_244 = __p0_244; \ | |
| 41999 | float64x1_t __s1_244 = __p1_244; \ | |
| 42000 | float64x2_t __s2_244 = __p2_244; \ | |
| 42001 | float64x2_t __rev2_244; __rev2_244 = __builtin_shufflevector(__s2_244, __s2_244, 1, 0); \ | |
| 42002 | float64x1_t __ret_244; \ | |
| 42003 | float64x2_t __reint_244 = __rev2_244; \ | |
| 42004 | uint64x2_t __reint1_244 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_244, __p3_244), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_244, __p3_244)}; \ | |
| 42005 | __ret_244 = vcmla_rot180_f64(__s0_244, __s1_244, *(float64x1_t *) &__reint1_244); \ | |
| 42006 | __ret_244; \ | |
| 42007 | }) | |
| 42008 | #endif | |
| 42009 | ||
| 42010 | #ifdef __LITTLE_ENDIAN__ | |
| 42011 | #define vcmlaq_rot180_laneq_f64(__p0_245, __p1_245, __p2_245, __p3_245) __extension__ ({ \ | |
| 42012 | float64x2_t __s0_245 = __p0_245; \ | |
| 42013 | float64x2_t __s1_245 = __p1_245; \ | |
| 42014 | float64x2_t __s2_245 = __p2_245; \ | |
| 42015 | float64x2_t __ret_245; \ | |
| 42016 | float64x2_t __reint_245 = __s2_245; \ | |
| 42017 | uint64x2_t __reint1_245 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_245, __p3_245), vgetq_lane_u64(*(uint64x2_t *) &__reint_245, __p3_245)}; \ | |
| 42018 | __ret_245 = vcmlaq_rot180_f64(__s0_245, __s1_245, *(float64x2_t *) &__reint1_245); \ | |
| 42019 | __ret_245; \ | |
| 42020 | }) | |
| 42021 | #else | |
| 42022 | #define vcmlaq_rot180_laneq_f64(__p0_246, __p1_246, __p2_246, __p3_246) __extension__ ({ \ | |
| 42023 | float64x2_t __s0_246 = __p0_246; \ | |
| 42024 | float64x2_t __s1_246 = __p1_246; \ | |
| 42025 | float64x2_t __s2_246 = __p2_246; \ | |
| 42026 | float64x2_t __rev0_246; __rev0_246 = __builtin_shufflevector(__s0_246, __s0_246, 1, 0); \ | |
| 42027 | float64x2_t __rev1_246; __rev1_246 = __builtin_shufflevector(__s1_246, __s1_246, 1, 0); \ | |
| 42028 | float64x2_t __rev2_246; __rev2_246 = __builtin_shufflevector(__s2_246, __s2_246, 1, 0); \ | |
| 42029 | float64x2_t __ret_246; \ | |
| 42030 | float64x2_t __reint_246 = __rev2_246; \ | |
| 42031 | uint64x2_t __reint1_246 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_246, __p3_246), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_246, __p3_246)}; \ | |
| 42032 | __ret_246 = __noswap_vcmlaq_rot180_f64(__rev0_246, __rev1_246, *(float64x2_t *) &__reint1_246); \ | |
| 42033 | __ret_246 = __builtin_shufflevector(__ret_246, __ret_246, 1, 0); \ | |
| 42034 | __ret_246; \ | |
| 42035 | }) | |
| 42036 | #endif | |
| 42037 | ||
| 42038 | #ifdef __LITTLE_ENDIAN__ | |
| 42039 | __ai float64x2_t vcmlaq_rot270_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 42040 | float64x2_t __ret; | |
| 42041 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 42042 | return __ret; | |
| 42043 | } | |
| 42044 | #else | |
| 42045 | __ai float64x2_t vcmlaq_rot270_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 42046 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 42047 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 42048 | float64x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 42049 | float64x2_t __ret; | |
| 42050 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 42); | |
| 42051 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 42052 | return __ret; | |
| 42053 | } | |
| 42054 | __ai float64x2_t __noswap_vcmlaq_rot270_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 42055 | float64x2_t __ret; | |
| 42056 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot270_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 42057 | return __ret; | |
| 42058 | } | |
| 42059 | #endif | |
| 42060 | ||
| 42061 | __ai float64x1_t vcmla_rot270_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) { | |
| 42062 | float64x1_t __ret; | |
| 42063 | __ret = (float64x1_t) __builtin_neon_vcmla_rot270_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 10); | |
| 42064 | return __ret; | |
| 42065 | } | |
| 42066 | #define vcmla_rot270_lane_f64(__p0_247, __p1_247, __p2_247, __p3_247) __extension__ ({ \ | |
| 42067 | float64x1_t __s0_247 = __p0_247; \ | |
| 42068 | float64x1_t __s1_247 = __p1_247; \ | |
| 42069 | float64x1_t __s2_247 = __p2_247; \ | |
| 42070 | float64x1_t __ret_247; \ | |
| 42071 | float64x1_t __reint_247 = __s2_247; \ | |
| 42072 | uint64x2_t __reint1_247 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_247, __p3_247), vgetq_lane_u64(*(uint64x2_t *) &__reint_247, __p3_247)}; \ | |
| 42073 | __ret_247 = vcmla_rot270_f64(__s0_247, __s1_247, *(float64x1_t *) &__reint1_247); \ | |
| 42074 | __ret_247; \ | |
| 42075 | }) | |
| 42076 | #ifdef __LITTLE_ENDIAN__ | |
| 42077 | #define vcmlaq_rot270_lane_f64(__p0_248, __p1_248, __p2_248, __p3_248) __extension__ ({ \ | |
| 42078 | float64x2_t __s0_248 = __p0_248; \ | |
| 42079 | float64x2_t __s1_248 = __p1_248; \ | |
| 42080 | float64x1_t __s2_248 = __p2_248; \ | |
| 42081 | float64x2_t __ret_248; \ | |
| 42082 | float64x1_t __reint_248 = __s2_248; \ | |
| 42083 | uint64x2_t __reint1_248 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_248, __p3_248), vgetq_lane_u64(*(uint64x2_t *) &__reint_248, __p3_248)}; \ | |
| 42084 | __ret_248 = vcmlaq_rot270_f64(__s0_248, __s1_248, *(float64x2_t *) &__reint1_248); \ | |
| 42085 | __ret_248; \ | |
| 42086 | }) | |
| 42087 | #else | |
| 42088 | #define vcmlaq_rot270_lane_f64(__p0_249, __p1_249, __p2_249, __p3_249) __extension__ ({ \ | |
| 42089 | float64x2_t __s0_249 = __p0_249; \ | |
| 42090 | float64x2_t __s1_249 = __p1_249; \ | |
| 42091 | float64x1_t __s2_249 = __p2_249; \ | |
| 42092 | float64x2_t __rev0_249; __rev0_249 = __builtin_shufflevector(__s0_249, __s0_249, 1, 0); \ | |
| 42093 | float64x2_t __rev1_249; __rev1_249 = __builtin_shufflevector(__s1_249, __s1_249, 1, 0); \ | |
| 42094 | float64x2_t __ret_249; \ | |
| 42095 | float64x1_t __reint_249 = __s2_249; \ | |
| 42096 | uint64x2_t __reint1_249 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_249, __p3_249), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_249, __p3_249)}; \ | |
| 42097 | __ret_249 = __noswap_vcmlaq_rot270_f64(__rev0_249, __rev1_249, *(float64x2_t *) &__reint1_249); \ | |
| 42098 | __ret_249 = __builtin_shufflevector(__ret_249, __ret_249, 1, 0); \ | |
| 42099 | __ret_249; \ | |
| 42100 | }) | |
| 42101 | #endif | |
| 42102 | ||
| 42103 | #ifdef __LITTLE_ENDIAN__ | |
| 42104 | #define vcmla_rot270_laneq_f64(__p0_250, __p1_250, __p2_250, __p3_250) __extension__ ({ \ | |
| 42105 | float64x1_t __s0_250 = __p0_250; \ | |
| 42106 | float64x1_t __s1_250 = __p1_250; \ | |
| 42107 | float64x2_t __s2_250 = __p2_250; \ | |
| 42108 | float64x1_t __ret_250; \ | |
| 42109 | float64x2_t __reint_250 = __s2_250; \ | |
| 42110 | uint64x2_t __reint1_250 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_250, __p3_250), vgetq_lane_u64(*(uint64x2_t *) &__reint_250, __p3_250)}; \ | |
| 42111 | __ret_250 = vcmla_rot270_f64(__s0_250, __s1_250, *(float64x1_t *) &__reint1_250); \ | |
| 42112 | __ret_250; \ | |
| 42113 | }) | |
| 42114 | #else | |
| 42115 | #define vcmla_rot270_laneq_f64(__p0_251, __p1_251, __p2_251, __p3_251) __extension__ ({ \ | |
| 42116 | float64x1_t __s0_251 = __p0_251; \ | |
| 42117 | float64x1_t __s1_251 = __p1_251; \ | |
| 42118 | float64x2_t __s2_251 = __p2_251; \ | |
| 42119 | float64x2_t __rev2_251; __rev2_251 = __builtin_shufflevector(__s2_251, __s2_251, 1, 0); \ | |
| 42120 | float64x1_t __ret_251; \ | |
| 42121 | float64x2_t __reint_251 = __rev2_251; \ | |
| 42122 | uint64x2_t __reint1_251 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_251, __p3_251), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_251, __p3_251)}; \ | |
| 42123 | __ret_251 = vcmla_rot270_f64(__s0_251, __s1_251, *(float64x1_t *) &__reint1_251); \ | |
| 42124 | __ret_251; \ | |
| 42125 | }) | |
| 42126 | #endif | |
| 42127 | ||
| 42128 | #ifdef __LITTLE_ENDIAN__ | |
| 42129 | #define vcmlaq_rot270_laneq_f64(__p0_252, __p1_252, __p2_252, __p3_252) __extension__ ({ \ | |
| 42130 | float64x2_t __s0_252 = __p0_252; \ | |
| 42131 | float64x2_t __s1_252 = __p1_252; \ | |
| 42132 | float64x2_t __s2_252 = __p2_252; \ | |
| 42133 | float64x2_t __ret_252; \ | |
| 42134 | float64x2_t __reint_252 = __s2_252; \ | |
| 42135 | uint64x2_t __reint1_252 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_252, __p3_252), vgetq_lane_u64(*(uint64x2_t *) &__reint_252, __p3_252)}; \ | |
| 42136 | __ret_252 = vcmlaq_rot270_f64(__s0_252, __s1_252, *(float64x2_t *) &__reint1_252); \ | |
| 42137 | __ret_252; \ | |
| 42138 | }) | |
| 42139 | #else | |
| 42140 | #define vcmlaq_rot270_laneq_f64(__p0_253, __p1_253, __p2_253, __p3_253) __extension__ ({ \ | |
| 42141 | float64x2_t __s0_253 = __p0_253; \ | |
| 42142 | float64x2_t __s1_253 = __p1_253; \ | |
| 42143 | float64x2_t __s2_253 = __p2_253; \ | |
| 42144 | float64x2_t __rev0_253; __rev0_253 = __builtin_shufflevector(__s0_253, __s0_253, 1, 0); \ | |
| 42145 | float64x2_t __rev1_253; __rev1_253 = __builtin_shufflevector(__s1_253, __s1_253, 1, 0); \ | |
| 42146 | float64x2_t __rev2_253; __rev2_253 = __builtin_shufflevector(__s2_253, __s2_253, 1, 0); \ | |
| 42147 | float64x2_t __ret_253; \ | |
| 42148 | float64x2_t __reint_253 = __rev2_253; \ | |
| 42149 | uint64x2_t __reint1_253 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_253, __p3_253), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_253, __p3_253)}; \ | |
| 42150 | __ret_253 = __noswap_vcmlaq_rot270_f64(__rev0_253, __rev1_253, *(float64x2_t *) &__reint1_253); \ | |
| 42151 | __ret_253 = __builtin_shufflevector(__ret_253, __ret_253, 1, 0); \ | |
| 42152 | __ret_253; \ | |
| 42153 | }) | |
| 42154 | #endif | |
| 42155 | ||
| 42156 | #ifdef __LITTLE_ENDIAN__ | |
| 42157 | __ai float64x2_t vcmlaq_rot90_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 42158 | float64x2_t __ret; | |
| 42159 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 42160 | return __ret; | |
| 42161 | } | |
| 42162 | #else | |
| 42163 | __ai float64x2_t vcmlaq_rot90_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 42164 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 42165 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 42166 | float64x2_t __rev2; __rev2 = __builtin_shufflevector(__p2, __p2, 1, 0); | |
| 42167 | float64x2_t __ret; | |
| 42168 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, (int8x16_t)__rev2, 42); | |
| 40516 | 42169 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); |
| 40517 | 42170 | return __ret; |
| 40518 | 42171 | } |
| 42172 | __ai float64x2_t __noswap_vcmlaq_rot90_f64(float64x2_t __p0, float64x2_t __p1, float64x2_t __p2) { | |
| 42173 | float64x2_t __ret; | |
| 42174 | __ret = (float64x2_t) __builtin_neon_vcmlaq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, (int8x16_t)__p2, 42); | |
| 42175 | return __ret; | |
| 42176 | } | |
| 42177 | #endif | |
| 42178 | ||
| 42179 | __ai float64x1_t vcmla_rot90_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) { | |
| 42180 | float64x1_t __ret; | |
| 42181 | __ret = (float64x1_t) __builtin_neon_vcmla_rot90_v((int8x8_t)__p0, (int8x8_t)__p1, (int8x8_t)__p2, 10); | |
| 42182 | return __ret; | |
| 42183 | } | |
| 42184 | #define vcmla_rot90_lane_f64(__p0_254, __p1_254, __p2_254, __p3_254) __extension__ ({ \ | |
| 42185 | float64x1_t __s0_254 = __p0_254; \ | |
| 42186 | float64x1_t __s1_254 = __p1_254; \ | |
| 42187 | float64x1_t __s2_254 = __p2_254; \ | |
| 42188 | float64x1_t __ret_254; \ | |
| 42189 | float64x1_t __reint_254 = __s2_254; \ | |
| 42190 | uint64x2_t __reint1_254 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_254, __p3_254), vgetq_lane_u64(*(uint64x2_t *) &__reint_254, __p3_254)}; \ | |
| 42191 | __ret_254 = vcmla_rot90_f64(__s0_254, __s1_254, *(float64x1_t *) &__reint1_254); \ | |
| 42192 | __ret_254; \ | |
| 42193 | }) | |
| 42194 | #ifdef __LITTLE_ENDIAN__ | |
| 42195 | #define vcmlaq_rot90_lane_f64(__p0_255, __p1_255, __p2_255, __p3_255) __extension__ ({ \ | |
| 42196 | float64x2_t __s0_255 = __p0_255; \ | |
| 42197 | float64x2_t __s1_255 = __p1_255; \ | |
| 42198 | float64x1_t __s2_255 = __p2_255; \ | |
| 42199 | float64x2_t __ret_255; \ | |
| 42200 | float64x1_t __reint_255 = __s2_255; \ | |
| 42201 | uint64x2_t __reint1_255 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_255, __p3_255), vgetq_lane_u64(*(uint64x2_t *) &__reint_255, __p3_255)}; \ | |
| 42202 | __ret_255 = vcmlaq_rot90_f64(__s0_255, __s1_255, *(float64x2_t *) &__reint1_255); \ | |
| 42203 | __ret_255; \ | |
| 42204 | }) | |
| 42205 | #else | |
| 42206 | #define vcmlaq_rot90_lane_f64(__p0_256, __p1_256, __p2_256, __p3_256) __extension__ ({ \ | |
| 42207 | float64x2_t __s0_256 = __p0_256; \ | |
| 42208 | float64x2_t __s1_256 = __p1_256; \ | |
| 42209 | float64x1_t __s2_256 = __p2_256; \ | |
| 42210 | float64x2_t __rev0_256; __rev0_256 = __builtin_shufflevector(__s0_256, __s0_256, 1, 0); \ | |
| 42211 | float64x2_t __rev1_256; __rev1_256 = __builtin_shufflevector(__s1_256, __s1_256, 1, 0); \ | |
| 42212 | float64x2_t __ret_256; \ | |
| 42213 | float64x1_t __reint_256 = __s2_256; \ | |
| 42214 | uint64x2_t __reint1_256 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_256, __p3_256), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_256, __p3_256)}; \ | |
| 42215 | __ret_256 = __noswap_vcmlaq_rot90_f64(__rev0_256, __rev1_256, *(float64x2_t *) &__reint1_256); \ | |
| 42216 | __ret_256 = __builtin_shufflevector(__ret_256, __ret_256, 1, 0); \ | |
| 42217 | __ret_256; \ | |
| 42218 | }) | |
| 40519 | 42219 | #endif |
| 40520 | 42220 | |
| 40521 | 42221 | #ifdef __LITTLE_ENDIAN__ |
| 40522 | __ai float64x2_t vcaddq_rot90_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 40523 | float64x2_t __ret; | |
| 40524 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__p0, (int8x16_t)__p1, 42); | |
| 40525 | return __ret; | |
| 40526 | } | |
| 42222 | #define vcmla_rot90_laneq_f64(__p0_257, __p1_257, __p2_257, __p3_257) __extension__ ({ \ | |
| 42223 | float64x1_t __s0_257 = __p0_257; \ | |
| 42224 | float64x1_t __s1_257 = __p1_257; \ | |
| 42225 | float64x2_t __s2_257 = __p2_257; \ | |
| 42226 | float64x1_t __ret_257; \ | |
| 42227 | float64x2_t __reint_257 = __s2_257; \ | |
| 42228 | uint64x2_t __reint1_257 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_257, __p3_257), vgetq_lane_u64(*(uint64x2_t *) &__reint_257, __p3_257)}; \ | |
| 42229 | __ret_257 = vcmla_rot90_f64(__s0_257, __s1_257, *(float64x1_t *) &__reint1_257); \ | |
| 42230 | __ret_257; \ | |
| 42231 | }) | |
| 40527 | 42232 | #else |
| 40528 | __ai float64x2_t vcaddq_rot90_f64(float64x2_t __p0, float64x2_t __p1) { | |
| 40529 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 40530 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 40531 | float64x2_t __ret; | |
| 40532 | __ret = (float64x2_t) __builtin_neon_vcaddq_rot90_v((int8x16_t)__rev0, (int8x16_t)__rev1, 42); | |
| 40533 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 40534 | return __ret; | |
| 40535 | } | |
| 42233 | #define vcmla_rot90_laneq_f64(__p0_258, __p1_258, __p2_258, __p3_258) __extension__ ({ \ | |
| 42234 | float64x1_t __s0_258 = __p0_258; \ | |
| 42235 | float64x1_t __s1_258 = __p1_258; \ | |
| 42236 | float64x2_t __s2_258 = __p2_258; \ | |
| 42237 | float64x2_t __rev2_258; __rev2_258 = __builtin_shufflevector(__s2_258, __s2_258, 1, 0); \ | |
| 42238 | float64x1_t __ret_258; \ | |
| 42239 | float64x2_t __reint_258 = __rev2_258; \ | |
| 42240 | uint64x2_t __reint1_258 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_258, __p3_258), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_258, __p3_258)}; \ | |
| 42241 | __ret_258 = vcmla_rot90_f64(__s0_258, __s1_258, *(float64x1_t *) &__reint1_258); \ | |
| 42242 | __ret_258; \ | |
| 42243 | }) | |
| 42244 | #endif | |
| 42245 | ||
| 42246 | #ifdef __LITTLE_ENDIAN__ | |
| 42247 | #define vcmlaq_rot90_laneq_f64(__p0_259, __p1_259, __p2_259, __p3_259) __extension__ ({ \ | |
| 42248 | float64x2_t __s0_259 = __p0_259; \ | |
| 42249 | float64x2_t __s1_259 = __p1_259; \ | |
| 42250 | float64x2_t __s2_259 = __p2_259; \ | |
| 42251 | float64x2_t __ret_259; \ | |
| 42252 | float64x2_t __reint_259 = __s2_259; \ | |
| 42253 | uint64x2_t __reint1_259 = (uint64x2_t) {vgetq_lane_u64(*(uint64x2_t *) &__reint_259, __p3_259), vgetq_lane_u64(*(uint64x2_t *) &__reint_259, __p3_259)}; \ | |
| 42254 | __ret_259 = vcmlaq_rot90_f64(__s0_259, __s1_259, *(float64x2_t *) &__reint1_259); \ | |
| 42255 | __ret_259; \ | |
| 42256 | }) | |
| 42257 | #else | |
| 42258 | #define vcmlaq_rot90_laneq_f64(__p0_260, __p1_260, __p2_260, __p3_260) __extension__ ({ \ | |
| 42259 | float64x2_t __s0_260 = __p0_260; \ | |
| 42260 | float64x2_t __s1_260 = __p1_260; \ | |
| 42261 | float64x2_t __s2_260 = __p2_260; \ | |
| 42262 | float64x2_t __rev0_260; __rev0_260 = __builtin_shufflevector(__s0_260, __s0_260, 1, 0); \ | |
| 42263 | float64x2_t __rev1_260; __rev1_260 = __builtin_shufflevector(__s1_260, __s1_260, 1, 0); \ | |
| 42264 | float64x2_t __rev2_260; __rev2_260 = __builtin_shufflevector(__s2_260, __s2_260, 1, 0); \ | |
| 42265 | float64x2_t __ret_260; \ | |
| 42266 | float64x2_t __reint_260 = __rev2_260; \ | |
| 42267 | uint64x2_t __reint1_260 = (uint64x2_t) {__noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_260, __p3_260), __noswap_vgetq_lane_u64(*(uint64x2_t *) &__reint_260, __p3_260)}; \ | |
| 42268 | __ret_260 = __noswap_vcmlaq_rot90_f64(__rev0_260, __rev1_260, *(float64x2_t *) &__reint1_260); \ | |
| 42269 | __ret_260 = __builtin_shufflevector(__ret_260, __ret_260, 1, 0); \ | |
| 42270 | __ret_260; \ | |
| 42271 | }) | |
| 40536 | 42272 | #endif |
| 40537 | 42273 | |
| 40538 | 42274 | #endif |
| ... | ... | @@ -40630,228 +42366,228 @@ __ai int32x2_t __noswap_vdot_s32(int32x2_t __p0, int8x8_t __p1, int8x8_t __p2) { |
| 40630 | 42366 | #endif |
| 40631 | 42367 | |
| 40632 | 42368 | #ifdef __LITTLE_ENDIAN__ |
| 40633 | #define vdotq_lane_u32(__p0_169, __p1_169, __p2_169, __p3_169) __extension__ ({ \ | |
| 40634 | uint32x4_t __s0_169 = __p0_169; \ | |
| 40635 | uint8x16_t __s1_169 = __p1_169; \ | |
| 40636 | uint8x8_t __s2_169 = __p2_169; \ | |
| 40637 | uint32x4_t __ret_169; \ | |
| 40638 | uint8x8_t __reint_169 = __s2_169; \ | |
| 40639 | uint32x4_t __reint1_169 = splatq_lane_u32(*(uint32x2_t *) &__reint_169, __p3_169); \ | |
| 40640 | __ret_169 = vdotq_u32(__s0_169, __s1_169, *(uint8x16_t *) &__reint1_169); \ | |
| 40641 | __ret_169; \ | |
| 42369 | #define vdotq_lane_u32(__p0_261, __p1_261, __p2_261, __p3_261) __extension__ ({ \ | |
| 42370 | uint32x4_t __s0_261 = __p0_261; \ | |
| 42371 | uint8x16_t __s1_261 = __p1_261; \ | |
| 42372 | uint8x8_t __s2_261 = __p2_261; \ | |
| 42373 | uint32x4_t __ret_261; \ | |
| 42374 | uint8x8_t __reint_261 = __s2_261; \ | |
| 42375 | uint32x4_t __reint1_261 = splatq_lane_u32(*(uint32x2_t *) &__reint_261, __p3_261); \ | |
| 42376 | __ret_261 = vdotq_u32(__s0_261, __s1_261, *(uint8x16_t *) &__reint1_261); \ | |
| 42377 | __ret_261; \ | |
| 40642 | 42378 | }) |
| 40643 | 42379 | #else |
| 40644 | #define vdotq_lane_u32(__p0_170, __p1_170, __p2_170, __p3_170) __extension__ ({ \ | |
| 40645 | uint32x4_t __s0_170 = __p0_170; \ | |
| 40646 | uint8x16_t __s1_170 = __p1_170; \ | |
| 40647 | uint8x8_t __s2_170 = __p2_170; \ | |
| 40648 | uint32x4_t __rev0_170; __rev0_170 = __builtin_shufflevector(__s0_170, __s0_170, 3, 2, 1, 0); \ | |
| 40649 | uint8x16_t __rev1_170; __rev1_170 = __builtin_shufflevector(__s1_170, __s1_170, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40650 | uint8x8_t __rev2_170; __rev2_170 = __builtin_shufflevector(__s2_170, __s2_170, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40651 | uint32x4_t __ret_170; \ | |
| 40652 | uint8x8_t __reint_170 = __rev2_170; \ | |
| 40653 | uint32x4_t __reint1_170 = __noswap_splatq_lane_u32(*(uint32x2_t *) &__reint_170, __p3_170); \ | |
| 40654 | __ret_170 = __noswap_vdotq_u32(__rev0_170, __rev1_170, *(uint8x16_t *) &__reint1_170); \ | |
| 40655 | __ret_170 = __builtin_shufflevector(__ret_170, __ret_170, 3, 2, 1, 0); \ | |
| 40656 | __ret_170; \ | |
| 42380 | #define vdotq_lane_u32(__p0_262, __p1_262, __p2_262, __p3_262) __extension__ ({ \ | |
| 42381 | uint32x4_t __s0_262 = __p0_262; \ | |
| 42382 | uint8x16_t __s1_262 = __p1_262; \ | |
| 42383 | uint8x8_t __s2_262 = __p2_262; \ | |
| 42384 | uint32x4_t __rev0_262; __rev0_262 = __builtin_shufflevector(__s0_262, __s0_262, 3, 2, 1, 0); \ | |
| 42385 | uint8x16_t __rev1_262; __rev1_262 = __builtin_shufflevector(__s1_262, __s1_262, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42386 | uint8x8_t __rev2_262; __rev2_262 = __builtin_shufflevector(__s2_262, __s2_262, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42387 | uint32x4_t __ret_262; \ | |
| 42388 | uint8x8_t __reint_262 = __rev2_262; \ | |
| 42389 | uint32x4_t __reint1_262 = __noswap_splatq_lane_u32(*(uint32x2_t *) &__reint_262, __p3_262); \ | |
| 42390 | __ret_262 = __noswap_vdotq_u32(__rev0_262, __rev1_262, *(uint8x16_t *) &__reint1_262); \ | |
| 42391 | __ret_262 = __builtin_shufflevector(__ret_262, __ret_262, 3, 2, 1, 0); \ | |
| 42392 | __ret_262; \ | |
| 40657 | 42393 | }) |
| 40658 | 42394 | #endif |
| 40659 | 42395 | |
| 40660 | 42396 | #ifdef __LITTLE_ENDIAN__ |
| 40661 | #define vdotq_lane_s32(__p0_171, __p1_171, __p2_171, __p3_171) __extension__ ({ \ | |
| 40662 | int32x4_t __s0_171 = __p0_171; \ | |
| 40663 | int8x16_t __s1_171 = __p1_171; \ | |
| 40664 | int8x8_t __s2_171 = __p2_171; \ | |
| 40665 | int32x4_t __ret_171; \ | |
| 40666 | int8x8_t __reint_171 = __s2_171; \ | |
| 40667 | int32x4_t __reint1_171 = splatq_lane_s32(*(int32x2_t *) &__reint_171, __p3_171); \ | |
| 40668 | __ret_171 = vdotq_s32(__s0_171, __s1_171, *(int8x16_t *) &__reint1_171); \ | |
| 40669 | __ret_171; \ | |
| 42397 | #define vdotq_lane_s32(__p0_263, __p1_263, __p2_263, __p3_263) __extension__ ({ \ | |
| 42398 | int32x4_t __s0_263 = __p0_263; \ | |
| 42399 | int8x16_t __s1_263 = __p1_263; \ | |
| 42400 | int8x8_t __s2_263 = __p2_263; \ | |
| 42401 | int32x4_t __ret_263; \ | |
| 42402 | int8x8_t __reint_263 = __s2_263; \ | |
| 42403 | int32x4_t __reint1_263 = splatq_lane_s32(*(int32x2_t *) &__reint_263, __p3_263); \ | |
| 42404 | __ret_263 = vdotq_s32(__s0_263, __s1_263, *(int8x16_t *) &__reint1_263); \ | |
| 42405 | __ret_263; \ | |
| 40670 | 42406 | }) |
| 40671 | 42407 | #else |
| 40672 | #define vdotq_lane_s32(__p0_172, __p1_172, __p2_172, __p3_172) __extension__ ({ \ | |
| 40673 | int32x4_t __s0_172 = __p0_172; \ | |
| 40674 | int8x16_t __s1_172 = __p1_172; \ | |
| 40675 | int8x8_t __s2_172 = __p2_172; \ | |
| 40676 | int32x4_t __rev0_172; __rev0_172 = __builtin_shufflevector(__s0_172, __s0_172, 3, 2, 1, 0); \ | |
| 40677 | int8x16_t __rev1_172; __rev1_172 = __builtin_shufflevector(__s1_172, __s1_172, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40678 | int8x8_t __rev2_172; __rev2_172 = __builtin_shufflevector(__s2_172, __s2_172, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40679 | int32x4_t __ret_172; \ | |
| 40680 | int8x8_t __reint_172 = __rev2_172; \ | |
| 40681 | int32x4_t __reint1_172 = __noswap_splatq_lane_s32(*(int32x2_t *) &__reint_172, __p3_172); \ | |
| 40682 | __ret_172 = __noswap_vdotq_s32(__rev0_172, __rev1_172, *(int8x16_t *) &__reint1_172); \ | |
| 40683 | __ret_172 = __builtin_shufflevector(__ret_172, __ret_172, 3, 2, 1, 0); \ | |
| 40684 | __ret_172; \ | |
| 42408 | #define vdotq_lane_s32(__p0_264, __p1_264, __p2_264, __p3_264) __extension__ ({ \ | |
| 42409 | int32x4_t __s0_264 = __p0_264; \ | |
| 42410 | int8x16_t __s1_264 = __p1_264; \ | |
| 42411 | int8x8_t __s2_264 = __p2_264; \ | |
| 42412 | int32x4_t __rev0_264; __rev0_264 = __builtin_shufflevector(__s0_264, __s0_264, 3, 2, 1, 0); \ | |
| 42413 | int8x16_t __rev1_264; __rev1_264 = __builtin_shufflevector(__s1_264, __s1_264, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42414 | int8x8_t __rev2_264; __rev2_264 = __builtin_shufflevector(__s2_264, __s2_264, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42415 | int32x4_t __ret_264; \ | |
| 42416 | int8x8_t __reint_264 = __rev2_264; \ | |
| 42417 | int32x4_t __reint1_264 = __noswap_splatq_lane_s32(*(int32x2_t *) &__reint_264, __p3_264); \ | |
| 42418 | __ret_264 = __noswap_vdotq_s32(__rev0_264, __rev1_264, *(int8x16_t *) &__reint1_264); \ | |
| 42419 | __ret_264 = __builtin_shufflevector(__ret_264, __ret_264, 3, 2, 1, 0); \ | |
| 42420 | __ret_264; \ | |
| 40685 | 42421 | }) |
| 40686 | 42422 | #endif |
| 40687 | 42423 | |
| 40688 | 42424 | #ifdef __LITTLE_ENDIAN__ |
| 40689 | #define vdot_lane_u32(__p0_173, __p1_173, __p2_173, __p3_173) __extension__ ({ \ | |
| 40690 | uint32x2_t __s0_173 = __p0_173; \ | |
| 40691 | uint8x8_t __s1_173 = __p1_173; \ | |
| 40692 | uint8x8_t __s2_173 = __p2_173; \ | |
| 40693 | uint32x2_t __ret_173; \ | |
| 40694 | uint8x8_t __reint_173 = __s2_173; \ | |
| 40695 | uint32x2_t __reint1_173 = splat_lane_u32(*(uint32x2_t *) &__reint_173, __p3_173); \ | |
| 40696 | __ret_173 = vdot_u32(__s0_173, __s1_173, *(uint8x8_t *) &__reint1_173); \ | |
| 40697 | __ret_173; \ | |
| 42425 | #define vdot_lane_u32(__p0_265, __p1_265, __p2_265, __p3_265) __extension__ ({ \ | |
| 42426 | uint32x2_t __s0_265 = __p0_265; \ | |
| 42427 | uint8x8_t __s1_265 = __p1_265; \ | |
| 42428 | uint8x8_t __s2_265 = __p2_265; \ | |
| 42429 | uint32x2_t __ret_265; \ | |
| 42430 | uint8x8_t __reint_265 = __s2_265; \ | |
| 42431 | uint32x2_t __reint1_265 = splat_lane_u32(*(uint32x2_t *) &__reint_265, __p3_265); \ | |
| 42432 | __ret_265 = vdot_u32(__s0_265, __s1_265, *(uint8x8_t *) &__reint1_265); \ | |
| 42433 | __ret_265; \ | |
| 40698 | 42434 | }) |
| 40699 | 42435 | #else |
| 40700 | #define vdot_lane_u32(__p0_174, __p1_174, __p2_174, __p3_174) __extension__ ({ \ | |
| 40701 | uint32x2_t __s0_174 = __p0_174; \ | |
| 40702 | uint8x8_t __s1_174 = __p1_174; \ | |
| 40703 | uint8x8_t __s2_174 = __p2_174; \ | |
| 40704 | uint32x2_t __rev0_174; __rev0_174 = __builtin_shufflevector(__s0_174, __s0_174, 1, 0); \ | |
| 40705 | uint8x8_t __rev1_174; __rev1_174 = __builtin_shufflevector(__s1_174, __s1_174, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40706 | uint8x8_t __rev2_174; __rev2_174 = __builtin_shufflevector(__s2_174, __s2_174, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40707 | uint32x2_t __ret_174; \ | |
| 40708 | uint8x8_t __reint_174 = __rev2_174; \ | |
| 40709 | uint32x2_t __reint1_174 = __noswap_splat_lane_u32(*(uint32x2_t *) &__reint_174, __p3_174); \ | |
| 40710 | __ret_174 = __noswap_vdot_u32(__rev0_174, __rev1_174, *(uint8x8_t *) &__reint1_174); \ | |
| 40711 | __ret_174 = __builtin_shufflevector(__ret_174, __ret_174, 1, 0); \ | |
| 40712 | __ret_174; \ | |
| 42436 | #define vdot_lane_u32(__p0_266, __p1_266, __p2_266, __p3_266) __extension__ ({ \ | |
| 42437 | uint32x2_t __s0_266 = __p0_266; \ | |
| 42438 | uint8x8_t __s1_266 = __p1_266; \ | |
| 42439 | uint8x8_t __s2_266 = __p2_266; \ | |
| 42440 | uint32x2_t __rev0_266; __rev0_266 = __builtin_shufflevector(__s0_266, __s0_266, 1, 0); \ | |
| 42441 | uint8x8_t __rev1_266; __rev1_266 = __builtin_shufflevector(__s1_266, __s1_266, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42442 | uint8x8_t __rev2_266; __rev2_266 = __builtin_shufflevector(__s2_266, __s2_266, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42443 | uint32x2_t __ret_266; \ | |
| 42444 | uint8x8_t __reint_266 = __rev2_266; \ | |
| 42445 | uint32x2_t __reint1_266 = __noswap_splat_lane_u32(*(uint32x2_t *) &__reint_266, __p3_266); \ | |
| 42446 | __ret_266 = __noswap_vdot_u32(__rev0_266, __rev1_266, *(uint8x8_t *) &__reint1_266); \ | |
| 42447 | __ret_266 = __builtin_shufflevector(__ret_266, __ret_266, 1, 0); \ | |
| 42448 | __ret_266; \ | |
| 40713 | 42449 | }) |
| 40714 | 42450 | #endif |
| 40715 | 42451 | |
| 40716 | 42452 | #ifdef __LITTLE_ENDIAN__ |
| 40717 | #define vdot_lane_s32(__p0_175, __p1_175, __p2_175, __p3_175) __extension__ ({ \ | |
| 40718 | int32x2_t __s0_175 = __p0_175; \ | |
| 40719 | int8x8_t __s1_175 = __p1_175; \ | |
| 40720 | int8x8_t __s2_175 = __p2_175; \ | |
| 40721 | int32x2_t __ret_175; \ | |
| 40722 | int8x8_t __reint_175 = __s2_175; \ | |
| 40723 | int32x2_t __reint1_175 = splat_lane_s32(*(int32x2_t *) &__reint_175, __p3_175); \ | |
| 40724 | __ret_175 = vdot_s32(__s0_175, __s1_175, *(int8x8_t *) &__reint1_175); \ | |
| 40725 | __ret_175; \ | |
| 42453 | #define vdot_lane_s32(__p0_267, __p1_267, __p2_267, __p3_267) __extension__ ({ \ | |
| 42454 | int32x2_t __s0_267 = __p0_267; \ | |
| 42455 | int8x8_t __s1_267 = __p1_267; \ | |
| 42456 | int8x8_t __s2_267 = __p2_267; \ | |
| 42457 | int32x2_t __ret_267; \ | |
| 42458 | int8x8_t __reint_267 = __s2_267; \ | |
| 42459 | int32x2_t __reint1_267 = splat_lane_s32(*(int32x2_t *) &__reint_267, __p3_267); \ | |
| 42460 | __ret_267 = vdot_s32(__s0_267, __s1_267, *(int8x8_t *) &__reint1_267); \ | |
| 42461 | __ret_267; \ | |
| 40726 | 42462 | }) |
| 40727 | 42463 | #else |
| 40728 | #define vdot_lane_s32(__p0_176, __p1_176, __p2_176, __p3_176) __extension__ ({ \ | |
| 40729 | int32x2_t __s0_176 = __p0_176; \ | |
| 40730 | int8x8_t __s1_176 = __p1_176; \ | |
| 40731 | int8x8_t __s2_176 = __p2_176; \ | |
| 40732 | int32x2_t __rev0_176; __rev0_176 = __builtin_shufflevector(__s0_176, __s0_176, 1, 0); \ | |
| 40733 | int8x8_t __rev1_176; __rev1_176 = __builtin_shufflevector(__s1_176, __s1_176, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40734 | int8x8_t __rev2_176; __rev2_176 = __builtin_shufflevector(__s2_176, __s2_176, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40735 | int32x2_t __ret_176; \ | |
| 40736 | int8x8_t __reint_176 = __rev2_176; \ | |
| 40737 | int32x2_t __reint1_176 = __noswap_splat_lane_s32(*(int32x2_t *) &__reint_176, __p3_176); \ | |
| 40738 | __ret_176 = __noswap_vdot_s32(__rev0_176, __rev1_176, *(int8x8_t *) &__reint1_176); \ | |
| 40739 | __ret_176 = __builtin_shufflevector(__ret_176, __ret_176, 1, 0); \ | |
| 40740 | __ret_176; \ | |
| 42464 | #define vdot_lane_s32(__p0_268, __p1_268, __p2_268, __p3_268) __extension__ ({ \ | |
| 42465 | int32x2_t __s0_268 = __p0_268; \ | |
| 42466 | int8x8_t __s1_268 = __p1_268; \ | |
| 42467 | int8x8_t __s2_268 = __p2_268; \ | |
| 42468 | int32x2_t __rev0_268; __rev0_268 = __builtin_shufflevector(__s0_268, __s0_268, 1, 0); \ | |
| 42469 | int8x8_t __rev1_268; __rev1_268 = __builtin_shufflevector(__s1_268, __s1_268, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42470 | int8x8_t __rev2_268; __rev2_268 = __builtin_shufflevector(__s2_268, __s2_268, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42471 | int32x2_t __ret_268; \ | |
| 42472 | int8x8_t __reint_268 = __rev2_268; \ | |
| 42473 | int32x2_t __reint1_268 = __noswap_splat_lane_s32(*(int32x2_t *) &__reint_268, __p3_268); \ | |
| 42474 | __ret_268 = __noswap_vdot_s32(__rev0_268, __rev1_268, *(int8x8_t *) &__reint1_268); \ | |
| 42475 | __ret_268 = __builtin_shufflevector(__ret_268, __ret_268, 1, 0); \ | |
| 42476 | __ret_268; \ | |
| 40741 | 42477 | }) |
| 40742 | 42478 | #endif |
| 40743 | 42479 | |
| 40744 | 42480 | #endif |
| 40745 | 42481 | #if defined(__ARM_FEATURE_DOTPROD) && defined(__aarch64__) |
| 40746 | 42482 | #ifdef __LITTLE_ENDIAN__ |
| 40747 | #define vdotq_laneq_u32(__p0_177, __p1_177, __p2_177, __p3_177) __extension__ ({ \ | |
| 40748 | uint32x4_t __s0_177 = __p0_177; \ | |
| 40749 | uint8x16_t __s1_177 = __p1_177; \ | |
| 40750 | uint8x16_t __s2_177 = __p2_177; \ | |
| 40751 | uint32x4_t __ret_177; \ | |
| 40752 | uint8x16_t __reint_177 = __s2_177; \ | |
| 40753 | uint32x4_t __reint1_177 = splatq_laneq_u32(*(uint32x4_t *) &__reint_177, __p3_177); \ | |
| 40754 | __ret_177 = vdotq_u32(__s0_177, __s1_177, *(uint8x16_t *) &__reint1_177); \ | |
| 40755 | __ret_177; \ | |
| 42483 | #define vdotq_laneq_u32(__p0_269, __p1_269, __p2_269, __p3_269) __extension__ ({ \ | |
| 42484 | uint32x4_t __s0_269 = __p0_269; \ | |
| 42485 | uint8x16_t __s1_269 = __p1_269; \ | |
| 42486 | uint8x16_t __s2_269 = __p2_269; \ | |
| 42487 | uint32x4_t __ret_269; \ | |
| 42488 | uint8x16_t __reint_269 = __s2_269; \ | |
| 42489 | uint32x4_t __reint1_269 = splatq_laneq_u32(*(uint32x4_t *) &__reint_269, __p3_269); \ | |
| 42490 | __ret_269 = vdotq_u32(__s0_269, __s1_269, *(uint8x16_t *) &__reint1_269); \ | |
| 42491 | __ret_269; \ | |
| 40756 | 42492 | }) |
| 40757 | 42493 | #else |
| 40758 | #define vdotq_laneq_u32(__p0_178, __p1_178, __p2_178, __p3_178) __extension__ ({ \ | |
| 40759 | uint32x4_t __s0_178 = __p0_178; \ | |
| 40760 | uint8x16_t __s1_178 = __p1_178; \ | |
| 40761 | uint8x16_t __s2_178 = __p2_178; \ | |
| 40762 | uint32x4_t __rev0_178; __rev0_178 = __builtin_shufflevector(__s0_178, __s0_178, 3, 2, 1, 0); \ | |
| 40763 | uint8x16_t __rev1_178; __rev1_178 = __builtin_shufflevector(__s1_178, __s1_178, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40764 | uint8x16_t __rev2_178; __rev2_178 = __builtin_shufflevector(__s2_178, __s2_178, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40765 | uint32x4_t __ret_178; \ | |
| 40766 | uint8x16_t __reint_178 = __rev2_178; \ | |
| 40767 | uint32x4_t __reint1_178 = __noswap_splatq_laneq_u32(*(uint32x4_t *) &__reint_178, __p3_178); \ | |
| 40768 | __ret_178 = __noswap_vdotq_u32(__rev0_178, __rev1_178, *(uint8x16_t *) &__reint1_178); \ | |
| 40769 | __ret_178 = __builtin_shufflevector(__ret_178, __ret_178, 3, 2, 1, 0); \ | |
| 40770 | __ret_178; \ | |
| 42494 | #define vdotq_laneq_u32(__p0_270, __p1_270, __p2_270, __p3_270) __extension__ ({ \ | |
| 42495 | uint32x4_t __s0_270 = __p0_270; \ | |
| 42496 | uint8x16_t __s1_270 = __p1_270; \ | |
| 42497 | uint8x16_t __s2_270 = __p2_270; \ | |
| 42498 | uint32x4_t __rev0_270; __rev0_270 = __builtin_shufflevector(__s0_270, __s0_270, 3, 2, 1, 0); \ | |
| 42499 | uint8x16_t __rev1_270; __rev1_270 = __builtin_shufflevector(__s1_270, __s1_270, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42500 | uint8x16_t __rev2_270; __rev2_270 = __builtin_shufflevector(__s2_270, __s2_270, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42501 | uint32x4_t __ret_270; \ | |
| 42502 | uint8x16_t __reint_270 = __rev2_270; \ | |
| 42503 | uint32x4_t __reint1_270 = __noswap_splatq_laneq_u32(*(uint32x4_t *) &__reint_270, __p3_270); \ | |
| 42504 | __ret_270 = __noswap_vdotq_u32(__rev0_270, __rev1_270, *(uint8x16_t *) &__reint1_270); \ | |
| 42505 | __ret_270 = __builtin_shufflevector(__ret_270, __ret_270, 3, 2, 1, 0); \ | |
| 42506 | __ret_270; \ | |
| 40771 | 42507 | }) |
| 40772 | 42508 | #endif |
| 40773 | 42509 | |
| 40774 | 42510 | #ifdef __LITTLE_ENDIAN__ |
| 40775 | #define vdotq_laneq_s32(__p0_179, __p1_179, __p2_179, __p3_179) __extension__ ({ \ | |
| 40776 | int32x4_t __s0_179 = __p0_179; \ | |
| 40777 | int8x16_t __s1_179 = __p1_179; \ | |
| 40778 | int8x16_t __s2_179 = __p2_179; \ | |
| 40779 | int32x4_t __ret_179; \ | |
| 40780 | int8x16_t __reint_179 = __s2_179; \ | |
| 40781 | int32x4_t __reint1_179 = splatq_laneq_s32(*(int32x4_t *) &__reint_179, __p3_179); \ | |
| 40782 | __ret_179 = vdotq_s32(__s0_179, __s1_179, *(int8x16_t *) &__reint1_179); \ | |
| 40783 | __ret_179; \ | |
| 42511 | #define vdotq_laneq_s32(__p0_271, __p1_271, __p2_271, __p3_271) __extension__ ({ \ | |
| 42512 | int32x4_t __s0_271 = __p0_271; \ | |
| 42513 | int8x16_t __s1_271 = __p1_271; \ | |
| 42514 | int8x16_t __s2_271 = __p2_271; \ | |
| 42515 | int32x4_t __ret_271; \ | |
| 42516 | int8x16_t __reint_271 = __s2_271; \ | |
| 42517 | int32x4_t __reint1_271 = splatq_laneq_s32(*(int32x4_t *) &__reint_271, __p3_271); \ | |
| 42518 | __ret_271 = vdotq_s32(__s0_271, __s1_271, *(int8x16_t *) &__reint1_271); \ | |
| 42519 | __ret_271; \ | |
| 40784 | 42520 | }) |
| 40785 | 42521 | #else |
| 40786 | #define vdotq_laneq_s32(__p0_180, __p1_180, __p2_180, __p3_180) __extension__ ({ \ | |
| 40787 | int32x4_t __s0_180 = __p0_180; \ | |
| 40788 | int8x16_t __s1_180 = __p1_180; \ | |
| 40789 | int8x16_t __s2_180 = __p2_180; \ | |
| 40790 | int32x4_t __rev0_180; __rev0_180 = __builtin_shufflevector(__s0_180, __s0_180, 3, 2, 1, 0); \ | |
| 40791 | int8x16_t __rev1_180; __rev1_180 = __builtin_shufflevector(__s1_180, __s1_180, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40792 | int8x16_t __rev2_180; __rev2_180 = __builtin_shufflevector(__s2_180, __s2_180, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40793 | int32x4_t __ret_180; \ | |
| 40794 | int8x16_t __reint_180 = __rev2_180; \ | |
| 40795 | int32x4_t __reint1_180 = __noswap_splatq_laneq_s32(*(int32x4_t *) &__reint_180, __p3_180); \ | |
| 40796 | __ret_180 = __noswap_vdotq_s32(__rev0_180, __rev1_180, *(int8x16_t *) &__reint1_180); \ | |
| 40797 | __ret_180 = __builtin_shufflevector(__ret_180, __ret_180, 3, 2, 1, 0); \ | |
| 40798 | __ret_180; \ | |
| 42522 | #define vdotq_laneq_s32(__p0_272, __p1_272, __p2_272, __p3_272) __extension__ ({ \ | |
| 42523 | int32x4_t __s0_272 = __p0_272; \ | |
| 42524 | int8x16_t __s1_272 = __p1_272; \ | |
| 42525 | int8x16_t __s2_272 = __p2_272; \ | |
| 42526 | int32x4_t __rev0_272; __rev0_272 = __builtin_shufflevector(__s0_272, __s0_272, 3, 2, 1, 0); \ | |
| 42527 | int8x16_t __rev1_272; __rev1_272 = __builtin_shufflevector(__s1_272, __s1_272, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42528 | int8x16_t __rev2_272; __rev2_272 = __builtin_shufflevector(__s2_272, __s2_272, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42529 | int32x4_t __ret_272; \ | |
| 42530 | int8x16_t __reint_272 = __rev2_272; \ | |
| 42531 | int32x4_t __reint1_272 = __noswap_splatq_laneq_s32(*(int32x4_t *) &__reint_272, __p3_272); \ | |
| 42532 | __ret_272 = __noswap_vdotq_s32(__rev0_272, __rev1_272, *(int8x16_t *) &__reint1_272); \ | |
| 42533 | __ret_272 = __builtin_shufflevector(__ret_272, __ret_272, 3, 2, 1, 0); \ | |
| 42534 | __ret_272; \ | |
| 40799 | 42535 | }) |
| 40800 | 42536 | #endif |
| 40801 | 42537 | |
| 40802 | 42538 | #ifdef __LITTLE_ENDIAN__ |
| 40803 | #define vdot_laneq_u32(__p0_181, __p1_181, __p2_181, __p3_181) __extension__ ({ \ | |
| 40804 | uint32x2_t __s0_181 = __p0_181; \ | |
| 40805 | uint8x8_t __s1_181 = __p1_181; \ | |
| 40806 | uint8x16_t __s2_181 = __p2_181; \ | |
| 40807 | uint32x2_t __ret_181; \ | |
| 40808 | uint8x16_t __reint_181 = __s2_181; \ | |
| 40809 | uint32x2_t __reint1_181 = splat_laneq_u32(*(uint32x4_t *) &__reint_181, __p3_181); \ | |
| 40810 | __ret_181 = vdot_u32(__s0_181, __s1_181, *(uint8x8_t *) &__reint1_181); \ | |
| 40811 | __ret_181; \ | |
| 42539 | #define vdot_laneq_u32(__p0_273, __p1_273, __p2_273, __p3_273) __extension__ ({ \ | |
| 42540 | uint32x2_t __s0_273 = __p0_273; \ | |
| 42541 | uint8x8_t __s1_273 = __p1_273; \ | |
| 42542 | uint8x16_t __s2_273 = __p2_273; \ | |
| 42543 | uint32x2_t __ret_273; \ | |
| 42544 | uint8x16_t __reint_273 = __s2_273; \ | |
| 42545 | uint32x2_t __reint1_273 = splat_laneq_u32(*(uint32x4_t *) &__reint_273, __p3_273); \ | |
| 42546 | __ret_273 = vdot_u32(__s0_273, __s1_273, *(uint8x8_t *) &__reint1_273); \ | |
| 42547 | __ret_273; \ | |
| 40812 | 42548 | }) |
| 40813 | 42549 | #else |
| 40814 | #define vdot_laneq_u32(__p0_182, __p1_182, __p2_182, __p3_182) __extension__ ({ \ | |
| 40815 | uint32x2_t __s0_182 = __p0_182; \ | |
| 40816 | uint8x8_t __s1_182 = __p1_182; \ | |
| 40817 | uint8x16_t __s2_182 = __p2_182; \ | |
| 40818 | uint32x2_t __rev0_182; __rev0_182 = __builtin_shufflevector(__s0_182, __s0_182, 1, 0); \ | |
| 40819 | uint8x8_t __rev1_182; __rev1_182 = __builtin_shufflevector(__s1_182, __s1_182, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40820 | uint8x16_t __rev2_182; __rev2_182 = __builtin_shufflevector(__s2_182, __s2_182, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40821 | uint32x2_t __ret_182; \ | |
| 40822 | uint8x16_t __reint_182 = __rev2_182; \ | |
| 40823 | uint32x2_t __reint1_182 = __noswap_splat_laneq_u32(*(uint32x4_t *) &__reint_182, __p3_182); \ | |
| 40824 | __ret_182 = __noswap_vdot_u32(__rev0_182, __rev1_182, *(uint8x8_t *) &__reint1_182); \ | |
| 40825 | __ret_182 = __builtin_shufflevector(__ret_182, __ret_182, 1, 0); \ | |
| 40826 | __ret_182; \ | |
| 42550 | #define vdot_laneq_u32(__p0_274, __p1_274, __p2_274, __p3_274) __extension__ ({ \ | |
| 42551 | uint32x2_t __s0_274 = __p0_274; \ | |
| 42552 | uint8x8_t __s1_274 = __p1_274; \ | |
| 42553 | uint8x16_t __s2_274 = __p2_274; \ | |
| 42554 | uint32x2_t __rev0_274; __rev0_274 = __builtin_shufflevector(__s0_274, __s0_274, 1, 0); \ | |
| 42555 | uint8x8_t __rev1_274; __rev1_274 = __builtin_shufflevector(__s1_274, __s1_274, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42556 | uint8x16_t __rev2_274; __rev2_274 = __builtin_shufflevector(__s2_274, __s2_274, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42557 | uint32x2_t __ret_274; \ | |
| 42558 | uint8x16_t __reint_274 = __rev2_274; \ | |
| 42559 | uint32x2_t __reint1_274 = __noswap_splat_laneq_u32(*(uint32x4_t *) &__reint_274, __p3_274); \ | |
| 42560 | __ret_274 = __noswap_vdot_u32(__rev0_274, __rev1_274, *(uint8x8_t *) &__reint1_274); \ | |
| 42561 | __ret_274 = __builtin_shufflevector(__ret_274, __ret_274, 1, 0); \ | |
| 42562 | __ret_274; \ | |
| 40827 | 42563 | }) |
| 40828 | 42564 | #endif |
| 40829 | 42565 | |
| 40830 | 42566 | #ifdef __LITTLE_ENDIAN__ |
| 40831 | #define vdot_laneq_s32(__p0_183, __p1_183, __p2_183, __p3_183) __extension__ ({ \ | |
| 40832 | int32x2_t __s0_183 = __p0_183; \ | |
| 40833 | int8x8_t __s1_183 = __p1_183; \ | |
| 40834 | int8x16_t __s2_183 = __p2_183; \ | |
| 40835 | int32x2_t __ret_183; \ | |
| 40836 | int8x16_t __reint_183 = __s2_183; \ | |
| 40837 | int32x2_t __reint1_183 = splat_laneq_s32(*(int32x4_t *) &__reint_183, __p3_183); \ | |
| 40838 | __ret_183 = vdot_s32(__s0_183, __s1_183, *(int8x8_t *) &__reint1_183); \ | |
| 40839 | __ret_183; \ | |
| 42567 | #define vdot_laneq_s32(__p0_275, __p1_275, __p2_275, __p3_275) __extension__ ({ \ | |
| 42568 | int32x2_t __s0_275 = __p0_275; \ | |
| 42569 | int8x8_t __s1_275 = __p1_275; \ | |
| 42570 | int8x16_t __s2_275 = __p2_275; \ | |
| 42571 | int32x2_t __ret_275; \ | |
| 42572 | int8x16_t __reint_275 = __s2_275; \ | |
| 42573 | int32x2_t __reint1_275 = splat_laneq_s32(*(int32x4_t *) &__reint_275, __p3_275); \ | |
| 42574 | __ret_275 = vdot_s32(__s0_275, __s1_275, *(int8x8_t *) &__reint1_275); \ | |
| 42575 | __ret_275; \ | |
| 40840 | 42576 | }) |
| 40841 | 42577 | #else |
| 40842 | #define vdot_laneq_s32(__p0_184, __p1_184, __p2_184, __p3_184) __extension__ ({ \ | |
| 40843 | int32x2_t __s0_184 = __p0_184; \ | |
| 40844 | int8x8_t __s1_184 = __p1_184; \ | |
| 40845 | int8x16_t __s2_184 = __p2_184; \ | |
| 40846 | int32x2_t __rev0_184; __rev0_184 = __builtin_shufflevector(__s0_184, __s0_184, 1, 0); \ | |
| 40847 | int8x8_t __rev1_184; __rev1_184 = __builtin_shufflevector(__s1_184, __s1_184, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40848 | int8x16_t __rev2_184; __rev2_184 = __builtin_shufflevector(__s2_184, __s2_184, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 40849 | int32x2_t __ret_184; \ | |
| 40850 | int8x16_t __reint_184 = __rev2_184; \ | |
| 40851 | int32x2_t __reint1_184 = __noswap_splat_laneq_s32(*(int32x4_t *) &__reint_184, __p3_184); \ | |
| 40852 | __ret_184 = __noswap_vdot_s32(__rev0_184, __rev1_184, *(int8x8_t *) &__reint1_184); \ | |
| 40853 | __ret_184 = __builtin_shufflevector(__ret_184, __ret_184, 1, 0); \ | |
| 40854 | __ret_184; \ | |
| 42578 | #define vdot_laneq_s32(__p0_276, __p1_276, __p2_276, __p3_276) __extension__ ({ \ | |
| 42579 | int32x2_t __s0_276 = __p0_276; \ | |
| 42580 | int8x8_t __s1_276 = __p1_276; \ | |
| 42581 | int8x16_t __s2_276 = __p2_276; \ | |
| 42582 | int32x2_t __rev0_276; __rev0_276 = __builtin_shufflevector(__s0_276, __s0_276, 1, 0); \ | |
| 42583 | int8x8_t __rev1_276; __rev1_276 = __builtin_shufflevector(__s1_276, __s1_276, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42584 | int8x16_t __rev2_276; __rev2_276 = __builtin_shufflevector(__s2_276, __s2_276, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42585 | int32x2_t __ret_276; \ | |
| 42586 | int8x16_t __reint_276 = __rev2_276; \ | |
| 42587 | int32x2_t __reint1_276 = __noswap_splat_laneq_s32(*(int32x4_t *) &__reint_276, __p3_276); \ | |
| 42588 | __ret_276 = __noswap_vdot_s32(__rev0_276, __rev1_276, *(int8x8_t *) &__reint1_276); \ | |
| 42589 | __ret_276 = __builtin_shufflevector(__ret_276, __ret_276, 1, 0); \ | |
| 42590 | __ret_276; \ | |
| 40855 | 42591 | }) |
| 40856 | 42592 | #endif |
| 40857 | 42593 | |
| ... | ... | @@ -42518,44 +44254,44 @@ __ai float16x4_t vmul_f16(float16x4_t __p0, float16x4_t __p1) { |
| 42518 | 44254 | #endif |
| 42519 | 44255 | |
| 42520 | 44256 | #ifdef __LITTLE_ENDIAN__ |
| 42521 | #define vmulq_lane_f16(__p0_185, __p1_185, __p2_185) __extension__ ({ \ | |
| 42522 | float16x8_t __s0_185 = __p0_185; \ | |
| 42523 | float16x4_t __s1_185 = __p1_185; \ | |
| 42524 | float16x8_t __ret_185; \ | |
| 42525 | __ret_185 = __s0_185 * splatq_lane_f16(__s1_185, __p2_185); \ | |
| 42526 | __ret_185; \ | |
| 44257 | #define vmulq_lane_f16(__p0_277, __p1_277, __p2_277) __extension__ ({ \ | |
| 44258 | float16x8_t __s0_277 = __p0_277; \ | |
| 44259 | float16x4_t __s1_277 = __p1_277; \ | |
| 44260 | float16x8_t __ret_277; \ | |
| 44261 | __ret_277 = __s0_277 * splatq_lane_f16(__s1_277, __p2_277); \ | |
| 44262 | __ret_277; \ | |
| 42527 | 44263 | }) |
| 42528 | 44264 | #else |
| 42529 | #define vmulq_lane_f16(__p0_186, __p1_186, __p2_186) __extension__ ({ \ | |
| 42530 | float16x8_t __s0_186 = __p0_186; \ | |
| 42531 | float16x4_t __s1_186 = __p1_186; \ | |
| 42532 | float16x8_t __rev0_186; __rev0_186 = __builtin_shufflevector(__s0_186, __s0_186, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42533 | float16x4_t __rev1_186; __rev1_186 = __builtin_shufflevector(__s1_186, __s1_186, 3, 2, 1, 0); \ | |
| 42534 | float16x8_t __ret_186; \ | |
| 42535 | __ret_186 = __rev0_186 * __noswap_splatq_lane_f16(__rev1_186, __p2_186); \ | |
| 42536 | __ret_186 = __builtin_shufflevector(__ret_186, __ret_186, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 42537 | __ret_186; \ | |
| 44265 | #define vmulq_lane_f16(__p0_278, __p1_278, __p2_278) __extension__ ({ \ | |
| 44266 | float16x8_t __s0_278 = __p0_278; \ | |
| 44267 | float16x4_t __s1_278 = __p1_278; \ | |
| 44268 | float16x8_t __rev0_278; __rev0_278 = __builtin_shufflevector(__s0_278, __s0_278, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44269 | float16x4_t __rev1_278; __rev1_278 = __builtin_shufflevector(__s1_278, __s1_278, 3, 2, 1, 0); \ | |
| 44270 | float16x8_t __ret_278; \ | |
| 44271 | __ret_278 = __rev0_278 * __noswap_splatq_lane_f16(__rev1_278, __p2_278); \ | |
| 44272 | __ret_278 = __builtin_shufflevector(__ret_278, __ret_278, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44273 | __ret_278; \ | |
| 42538 | 44274 | }) |
| 42539 | 44275 | #endif |
| 42540 | 44276 | |
| 42541 | 44277 | #ifdef __LITTLE_ENDIAN__ |
| 42542 | #define vmul_lane_f16(__p0_187, __p1_187, __p2_187) __extension__ ({ \ | |
| 42543 | float16x4_t __s0_187 = __p0_187; \ | |
| 42544 | float16x4_t __s1_187 = __p1_187; \ | |
| 42545 | float16x4_t __ret_187; \ | |
| 42546 | __ret_187 = __s0_187 * splat_lane_f16(__s1_187, __p2_187); \ | |
| 42547 | __ret_187; \ | |
| 44278 | #define vmul_lane_f16(__p0_279, __p1_279, __p2_279) __extension__ ({ \ | |
| 44279 | float16x4_t __s0_279 = __p0_279; \ | |
| 44280 | float16x4_t __s1_279 = __p1_279; \ | |
| 44281 | float16x4_t __ret_279; \ | |
| 44282 | __ret_279 = __s0_279 * splat_lane_f16(__s1_279, __p2_279); \ | |
| 44283 | __ret_279; \ | |
| 42548 | 44284 | }) |
| 42549 | 44285 | #else |
| 42550 | #define vmul_lane_f16(__p0_188, __p1_188, __p2_188) __extension__ ({ \ | |
| 42551 | float16x4_t __s0_188 = __p0_188; \ | |
| 42552 | float16x4_t __s1_188 = __p1_188; \ | |
| 42553 | float16x4_t __rev0_188; __rev0_188 = __builtin_shufflevector(__s0_188, __s0_188, 3, 2, 1, 0); \ | |
| 42554 | float16x4_t __rev1_188; __rev1_188 = __builtin_shufflevector(__s1_188, __s1_188, 3, 2, 1, 0); \ | |
| 42555 | float16x4_t __ret_188; \ | |
| 42556 | __ret_188 = __rev0_188 * __noswap_splat_lane_f16(__rev1_188, __p2_188); \ | |
| 42557 | __ret_188 = __builtin_shufflevector(__ret_188, __ret_188, 3, 2, 1, 0); \ | |
| 42558 | __ret_188; \ | |
| 44286 | #define vmul_lane_f16(__p0_280, __p1_280, __p2_280) __extension__ ({ \ | |
| 44287 | float16x4_t __s0_280 = __p0_280; \ | |
| 44288 | float16x4_t __s1_280 = __p1_280; \ | |
| 44289 | float16x4_t __rev0_280; __rev0_280 = __builtin_shufflevector(__s0_280, __s0_280, 3, 2, 1, 0); \ | |
| 44290 | float16x4_t __rev1_280; __rev1_280 = __builtin_shufflevector(__s1_280, __s1_280, 3, 2, 1, 0); \ | |
| 44291 | float16x4_t __ret_280; \ | |
| 44292 | __ret_280 = __rev0_280 * __noswap_splat_lane_f16(__rev1_280, __p2_280); \ | |
| 44293 | __ret_280 = __builtin_shufflevector(__ret_280, __ret_280, 3, 2, 1, 0); \ | |
| 44294 | __ret_280; \ | |
| 42559 | 44295 | }) |
| 42560 | 44296 | #endif |
| 42561 | 44297 | |
| ... | ... | @@ -43297,140 +45033,140 @@ __ai float16x4_t vdiv_f16(float16x4_t __p0, float16x4_t __p1) { |
| 43297 | 45033 | #endif |
| 43298 | 45034 | |
| 43299 | 45035 | #ifdef __LITTLE_ENDIAN__ |
| 43300 | #define vfmsh_lane_f16(__p0_189, __p1_189, __p2_189, __p3_189) __extension__ ({ \ | |
| 43301 | float16_t __s0_189 = __p0_189; \ | |
| 43302 | float16_t __s1_189 = __p1_189; \ | |
| 43303 | float16x4_t __s2_189 = __p2_189; \ | |
| 43304 | float16_t __ret_189; \ | |
| 43305 | __ret_189 = vfmah_lane_f16(__s0_189, -__s1_189, __s2_189, __p3_189); \ | |
| 43306 | __ret_189; \ | |
| 45036 | #define vfmsh_lane_f16(__p0_281, __p1_281, __p2_281, __p3_281) __extension__ ({ \ | |
| 45037 | float16_t __s0_281 = __p0_281; \ | |
| 45038 | float16_t __s1_281 = __p1_281; \ | |
| 45039 | float16x4_t __s2_281 = __p2_281; \ | |
| 45040 | float16_t __ret_281; \ | |
| 45041 | __ret_281 = vfmah_lane_f16(__s0_281, -__s1_281, __s2_281, __p3_281); \ | |
| 45042 | __ret_281; \ | |
| 43307 | 45043 | }) |
| 43308 | 45044 | #else |
| 43309 | #define vfmsh_lane_f16(__p0_190, __p1_190, __p2_190, __p3_190) __extension__ ({ \ | |
| 43310 | float16_t __s0_190 = __p0_190; \ | |
| 43311 | float16_t __s1_190 = __p1_190; \ | |
| 43312 | float16x4_t __s2_190 = __p2_190; \ | |
| 43313 | float16x4_t __rev2_190; __rev2_190 = __builtin_shufflevector(__s2_190, __s2_190, 3, 2, 1, 0); \ | |
| 43314 | float16_t __ret_190; \ | |
| 43315 | __ret_190 = __noswap_vfmah_lane_f16(__s0_190, -__s1_190, __rev2_190, __p3_190); \ | |
| 43316 | __ret_190; \ | |
| 45045 | #define vfmsh_lane_f16(__p0_282, __p1_282, __p2_282, __p3_282) __extension__ ({ \ | |
| 45046 | float16_t __s0_282 = __p0_282; \ | |
| 45047 | float16_t __s1_282 = __p1_282; \ | |
| 45048 | float16x4_t __s2_282 = __p2_282; \ | |
| 45049 | float16x4_t __rev2_282; __rev2_282 = __builtin_shufflevector(__s2_282, __s2_282, 3, 2, 1, 0); \ | |
| 45050 | float16_t __ret_282; \ | |
| 45051 | __ret_282 = __noswap_vfmah_lane_f16(__s0_282, -__s1_282, __rev2_282, __p3_282); \ | |
| 45052 | __ret_282; \ | |
| 43317 | 45053 | }) |
| 43318 | 45054 | #endif |
| 43319 | 45055 | |
| 43320 | 45056 | #ifdef __LITTLE_ENDIAN__ |
| 43321 | #define vfmsq_lane_f16(__p0_191, __p1_191, __p2_191, __p3_191) __extension__ ({ \ | |
| 43322 | float16x8_t __s0_191 = __p0_191; \ | |
| 43323 | float16x8_t __s1_191 = __p1_191; \ | |
| 43324 | float16x4_t __s2_191 = __p2_191; \ | |
| 43325 | float16x8_t __ret_191; \ | |
| 43326 | __ret_191 = vfmaq_lane_f16(__s0_191, -__s1_191, __s2_191, __p3_191); \ | |
| 43327 | __ret_191; \ | |
| 45057 | #define vfmsq_lane_f16(__p0_283, __p1_283, __p2_283, __p3_283) __extension__ ({ \ | |
| 45058 | float16x8_t __s0_283 = __p0_283; \ | |
| 45059 | float16x8_t __s1_283 = __p1_283; \ | |
| 45060 | float16x4_t __s2_283 = __p2_283; \ | |
| 45061 | float16x8_t __ret_283; \ | |
| 45062 | __ret_283 = vfmaq_lane_f16(__s0_283, -__s1_283, __s2_283, __p3_283); \ | |
| 45063 | __ret_283; \ | |
| 43328 | 45064 | }) |
| 43329 | 45065 | #else |
| 43330 | #define vfmsq_lane_f16(__p0_192, __p1_192, __p2_192, __p3_192) __extension__ ({ \ | |
| 43331 | float16x8_t __s0_192 = __p0_192; \ | |
| 43332 | float16x8_t __s1_192 = __p1_192; \ | |
| 43333 | float16x4_t __s2_192 = __p2_192; \ | |
| 43334 | float16x8_t __rev0_192; __rev0_192 = __builtin_shufflevector(__s0_192, __s0_192, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43335 | float16x8_t __rev1_192; __rev1_192 = __builtin_shufflevector(__s1_192, __s1_192, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43336 | float16x4_t __rev2_192; __rev2_192 = __builtin_shufflevector(__s2_192, __s2_192, 3, 2, 1, 0); \ | |
| 43337 | float16x8_t __ret_192; \ | |
| 43338 | __ret_192 = __noswap_vfmaq_lane_f16(__rev0_192, -__rev1_192, __rev2_192, __p3_192); \ | |
| 43339 | __ret_192 = __builtin_shufflevector(__ret_192, __ret_192, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43340 | __ret_192; \ | |
| 45066 | #define vfmsq_lane_f16(__p0_284, __p1_284, __p2_284, __p3_284) __extension__ ({ \ | |
| 45067 | float16x8_t __s0_284 = __p0_284; \ | |
| 45068 | float16x8_t __s1_284 = __p1_284; \ | |
| 45069 | float16x4_t __s2_284 = __p2_284; \ | |
| 45070 | float16x8_t __rev0_284; __rev0_284 = __builtin_shufflevector(__s0_284, __s0_284, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45071 | float16x8_t __rev1_284; __rev1_284 = __builtin_shufflevector(__s1_284, __s1_284, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45072 | float16x4_t __rev2_284; __rev2_284 = __builtin_shufflevector(__s2_284, __s2_284, 3, 2, 1, 0); \ | |
| 45073 | float16x8_t __ret_284; \ | |
| 45074 | __ret_284 = __noswap_vfmaq_lane_f16(__rev0_284, -__rev1_284, __rev2_284, __p3_284); \ | |
| 45075 | __ret_284 = __builtin_shufflevector(__ret_284, __ret_284, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45076 | __ret_284; \ | |
| 43341 | 45077 | }) |
| 43342 | 45078 | #endif |
| 43343 | 45079 | |
| 43344 | 45080 | #ifdef __LITTLE_ENDIAN__ |
| 43345 | #define vfms_lane_f16(__p0_193, __p1_193, __p2_193, __p3_193) __extension__ ({ \ | |
| 43346 | float16x4_t __s0_193 = __p0_193; \ | |
| 43347 | float16x4_t __s1_193 = __p1_193; \ | |
| 43348 | float16x4_t __s2_193 = __p2_193; \ | |
| 43349 | float16x4_t __ret_193; \ | |
| 43350 | __ret_193 = vfma_lane_f16(__s0_193, -__s1_193, __s2_193, __p3_193); \ | |
| 43351 | __ret_193; \ | |
| 45081 | #define vfms_lane_f16(__p0_285, __p1_285, __p2_285, __p3_285) __extension__ ({ \ | |
| 45082 | float16x4_t __s0_285 = __p0_285; \ | |
| 45083 | float16x4_t __s1_285 = __p1_285; \ | |
| 45084 | float16x4_t __s2_285 = __p2_285; \ | |
| 45085 | float16x4_t __ret_285; \ | |
| 45086 | __ret_285 = vfma_lane_f16(__s0_285, -__s1_285, __s2_285, __p3_285); \ | |
| 45087 | __ret_285; \ | |
| 43352 | 45088 | }) |
| 43353 | 45089 | #else |
| 43354 | #define vfms_lane_f16(__p0_194, __p1_194, __p2_194, __p3_194) __extension__ ({ \ | |
| 43355 | float16x4_t __s0_194 = __p0_194; \ | |
| 43356 | float16x4_t __s1_194 = __p1_194; \ | |
| 43357 | float16x4_t __s2_194 = __p2_194; \ | |
| 43358 | float16x4_t __rev0_194; __rev0_194 = __builtin_shufflevector(__s0_194, __s0_194, 3, 2, 1, 0); \ | |
| 43359 | float16x4_t __rev1_194; __rev1_194 = __builtin_shufflevector(__s1_194, __s1_194, 3, 2, 1, 0); \ | |
| 43360 | float16x4_t __rev2_194; __rev2_194 = __builtin_shufflevector(__s2_194, __s2_194, 3, 2, 1, 0); \ | |
| 43361 | float16x4_t __ret_194; \ | |
| 43362 | __ret_194 = __noswap_vfma_lane_f16(__rev0_194, -__rev1_194, __rev2_194, __p3_194); \ | |
| 43363 | __ret_194 = __builtin_shufflevector(__ret_194, __ret_194, 3, 2, 1, 0); \ | |
| 43364 | __ret_194; \ | |
| 45090 | #define vfms_lane_f16(__p0_286, __p1_286, __p2_286, __p3_286) __extension__ ({ \ | |
| 45091 | float16x4_t __s0_286 = __p0_286; \ | |
| 45092 | float16x4_t __s1_286 = __p1_286; \ | |
| 45093 | float16x4_t __s2_286 = __p2_286; \ | |
| 45094 | float16x4_t __rev0_286; __rev0_286 = __builtin_shufflevector(__s0_286, __s0_286, 3, 2, 1, 0); \ | |
| 45095 | float16x4_t __rev1_286; __rev1_286 = __builtin_shufflevector(__s1_286, __s1_286, 3, 2, 1, 0); \ | |
| 45096 | float16x4_t __rev2_286; __rev2_286 = __builtin_shufflevector(__s2_286, __s2_286, 3, 2, 1, 0); \ | |
| 45097 | float16x4_t __ret_286; \ | |
| 45098 | __ret_286 = __noswap_vfma_lane_f16(__rev0_286, -__rev1_286, __rev2_286, __p3_286); \ | |
| 45099 | __ret_286 = __builtin_shufflevector(__ret_286, __ret_286, 3, 2, 1, 0); \ | |
| 45100 | __ret_286; \ | |
| 43365 | 45101 | }) |
| 43366 | 45102 | #endif |
| 43367 | 45103 | |
| 43368 | 45104 | #ifdef __LITTLE_ENDIAN__ |
| 43369 | #define vfmsh_laneq_f16(__p0_195, __p1_195, __p2_195, __p3_195) __extension__ ({ \ | |
| 43370 | float16_t __s0_195 = __p0_195; \ | |
| 43371 | float16_t __s1_195 = __p1_195; \ | |
| 43372 | float16x8_t __s2_195 = __p2_195; \ | |
| 43373 | float16_t __ret_195; \ | |
| 43374 | __ret_195 = vfmah_laneq_f16(__s0_195, -__s1_195, __s2_195, __p3_195); \ | |
| 43375 | __ret_195; \ | |
| 45105 | #define vfmsh_laneq_f16(__p0_287, __p1_287, __p2_287, __p3_287) __extension__ ({ \ | |
| 45106 | float16_t __s0_287 = __p0_287; \ | |
| 45107 | float16_t __s1_287 = __p1_287; \ | |
| 45108 | float16x8_t __s2_287 = __p2_287; \ | |
| 45109 | float16_t __ret_287; \ | |
| 45110 | __ret_287 = vfmah_laneq_f16(__s0_287, -__s1_287, __s2_287, __p3_287); \ | |
| 45111 | __ret_287; \ | |
| 43376 | 45112 | }) |
| 43377 | 45113 | #else |
| 43378 | #define vfmsh_laneq_f16(__p0_196, __p1_196, __p2_196, __p3_196) __extension__ ({ \ | |
| 43379 | float16_t __s0_196 = __p0_196; \ | |
| 43380 | float16_t __s1_196 = __p1_196; \ | |
| 43381 | float16x8_t __s2_196 = __p2_196; \ | |
| 43382 | float16x8_t __rev2_196; __rev2_196 = __builtin_shufflevector(__s2_196, __s2_196, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43383 | float16_t __ret_196; \ | |
| 43384 | __ret_196 = __noswap_vfmah_laneq_f16(__s0_196, -__s1_196, __rev2_196, __p3_196); \ | |
| 43385 | __ret_196; \ | |
| 45114 | #define vfmsh_laneq_f16(__p0_288, __p1_288, __p2_288, __p3_288) __extension__ ({ \ | |
| 45115 | float16_t __s0_288 = __p0_288; \ | |
| 45116 | float16_t __s1_288 = __p1_288; \ | |
| 45117 | float16x8_t __s2_288 = __p2_288; \ | |
| 45118 | float16x8_t __rev2_288; __rev2_288 = __builtin_shufflevector(__s2_288, __s2_288, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45119 | float16_t __ret_288; \ | |
| 45120 | __ret_288 = __noswap_vfmah_laneq_f16(__s0_288, -__s1_288, __rev2_288, __p3_288); \ | |
| 45121 | __ret_288; \ | |
| 43386 | 45122 | }) |
| 43387 | 45123 | #endif |
| 43388 | 45124 | |
| 43389 | 45125 | #ifdef __LITTLE_ENDIAN__ |
| 43390 | #define vfmsq_laneq_f16(__p0_197, __p1_197, __p2_197, __p3_197) __extension__ ({ \ | |
| 43391 | float16x8_t __s0_197 = __p0_197; \ | |
| 43392 | float16x8_t __s1_197 = __p1_197; \ | |
| 43393 | float16x8_t __s2_197 = __p2_197; \ | |
| 43394 | float16x8_t __ret_197; \ | |
| 43395 | __ret_197 = vfmaq_laneq_f16(__s0_197, -__s1_197, __s2_197, __p3_197); \ | |
| 43396 | __ret_197; \ | |
| 45126 | #define vfmsq_laneq_f16(__p0_289, __p1_289, __p2_289, __p3_289) __extension__ ({ \ | |
| 45127 | float16x8_t __s0_289 = __p0_289; \ | |
| 45128 | float16x8_t __s1_289 = __p1_289; \ | |
| 45129 | float16x8_t __s2_289 = __p2_289; \ | |
| 45130 | float16x8_t __ret_289; \ | |
| 45131 | __ret_289 = vfmaq_laneq_f16(__s0_289, -__s1_289, __s2_289, __p3_289); \ | |
| 45132 | __ret_289; \ | |
| 43397 | 45133 | }) |
| 43398 | 45134 | #else |
| 43399 | #define vfmsq_laneq_f16(__p0_198, __p1_198, __p2_198, __p3_198) __extension__ ({ \ | |
| 43400 | float16x8_t __s0_198 = __p0_198; \ | |
| 43401 | float16x8_t __s1_198 = __p1_198; \ | |
| 43402 | float16x8_t __s2_198 = __p2_198; \ | |
| 43403 | float16x8_t __rev0_198; __rev0_198 = __builtin_shufflevector(__s0_198, __s0_198, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43404 | float16x8_t __rev1_198; __rev1_198 = __builtin_shufflevector(__s1_198, __s1_198, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43405 | float16x8_t __rev2_198; __rev2_198 = __builtin_shufflevector(__s2_198, __s2_198, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43406 | float16x8_t __ret_198; \ | |
| 43407 | __ret_198 = __noswap_vfmaq_laneq_f16(__rev0_198, -__rev1_198, __rev2_198, __p3_198); \ | |
| 43408 | __ret_198 = __builtin_shufflevector(__ret_198, __ret_198, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43409 | __ret_198; \ | |
| 45135 | #define vfmsq_laneq_f16(__p0_290, __p1_290, __p2_290, __p3_290) __extension__ ({ \ | |
| 45136 | float16x8_t __s0_290 = __p0_290; \ | |
| 45137 | float16x8_t __s1_290 = __p1_290; \ | |
| 45138 | float16x8_t __s2_290 = __p2_290; \ | |
| 45139 | float16x8_t __rev0_290; __rev0_290 = __builtin_shufflevector(__s0_290, __s0_290, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45140 | float16x8_t __rev1_290; __rev1_290 = __builtin_shufflevector(__s1_290, __s1_290, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45141 | float16x8_t __rev2_290; __rev2_290 = __builtin_shufflevector(__s2_290, __s2_290, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45142 | float16x8_t __ret_290; \ | |
| 45143 | __ret_290 = __noswap_vfmaq_laneq_f16(__rev0_290, -__rev1_290, __rev2_290, __p3_290); \ | |
| 45144 | __ret_290 = __builtin_shufflevector(__ret_290, __ret_290, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45145 | __ret_290; \ | |
| 43410 | 45146 | }) |
| 43411 | 45147 | #endif |
| 43412 | 45148 | |
| 43413 | 45149 | #ifdef __LITTLE_ENDIAN__ |
| 43414 | #define vfms_laneq_f16(__p0_199, __p1_199, __p2_199, __p3_199) __extension__ ({ \ | |
| 43415 | float16x4_t __s0_199 = __p0_199; \ | |
| 43416 | float16x4_t __s1_199 = __p1_199; \ | |
| 43417 | float16x8_t __s2_199 = __p2_199; \ | |
| 43418 | float16x4_t __ret_199; \ | |
| 43419 | __ret_199 = vfma_laneq_f16(__s0_199, -__s1_199, __s2_199, __p3_199); \ | |
| 43420 | __ret_199; \ | |
| 45150 | #define vfms_laneq_f16(__p0_291, __p1_291, __p2_291, __p3_291) __extension__ ({ \ | |
| 45151 | float16x4_t __s0_291 = __p0_291; \ | |
| 45152 | float16x4_t __s1_291 = __p1_291; \ | |
| 45153 | float16x8_t __s2_291 = __p2_291; \ | |
| 45154 | float16x4_t __ret_291; \ | |
| 45155 | __ret_291 = vfma_laneq_f16(__s0_291, -__s1_291, __s2_291, __p3_291); \ | |
| 45156 | __ret_291; \ | |
| 43421 | 45157 | }) |
| 43422 | 45158 | #else |
| 43423 | #define vfms_laneq_f16(__p0_200, __p1_200, __p2_200, __p3_200) __extension__ ({ \ | |
| 43424 | float16x4_t __s0_200 = __p0_200; \ | |
| 43425 | float16x4_t __s1_200 = __p1_200; \ | |
| 43426 | float16x8_t __s2_200 = __p2_200; \ | |
| 43427 | float16x4_t __rev0_200; __rev0_200 = __builtin_shufflevector(__s0_200, __s0_200, 3, 2, 1, 0); \ | |
| 43428 | float16x4_t __rev1_200; __rev1_200 = __builtin_shufflevector(__s1_200, __s1_200, 3, 2, 1, 0); \ | |
| 43429 | float16x8_t __rev2_200; __rev2_200 = __builtin_shufflevector(__s2_200, __s2_200, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43430 | float16x4_t __ret_200; \ | |
| 43431 | __ret_200 = __noswap_vfma_laneq_f16(__rev0_200, -__rev1_200, __rev2_200, __p3_200); \ | |
| 43432 | __ret_200 = __builtin_shufflevector(__ret_200, __ret_200, 3, 2, 1, 0); \ | |
| 43433 | __ret_200; \ | |
| 45159 | #define vfms_laneq_f16(__p0_292, __p1_292, __p2_292, __p3_292) __extension__ ({ \ | |
| 45160 | float16x4_t __s0_292 = __p0_292; \ | |
| 45161 | float16x4_t __s1_292 = __p1_292; \ | |
| 45162 | float16x8_t __s2_292 = __p2_292; \ | |
| 45163 | float16x4_t __rev0_292; __rev0_292 = __builtin_shufflevector(__s0_292, __s0_292, 3, 2, 1, 0); \ | |
| 45164 | float16x4_t __rev1_292; __rev1_292 = __builtin_shufflevector(__s1_292, __s1_292, 3, 2, 1, 0); \ | |
| 45165 | float16x8_t __rev2_292; __rev2_292 = __builtin_shufflevector(__s2_292, __s2_292, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45166 | float16x4_t __ret_292; \ | |
| 45167 | __ret_292 = __noswap_vfma_laneq_f16(__rev0_292, -__rev1_292, __rev2_292, __p3_292); \ | |
| 45168 | __ret_292 = __builtin_shufflevector(__ret_292, __ret_292, 3, 2, 1, 0); \ | |
| 45169 | __ret_292; \ | |
| 43434 | 45170 | }) |
| 43435 | 45171 | #endif |
| 43436 | 45172 | |
| ... | ... | @@ -43617,44 +45353,44 @@ __ai float16x4_t vdiv_f16(float16x4_t __p0, float16x4_t __p1) { |
| 43617 | 45353 | #endif |
| 43618 | 45354 | |
| 43619 | 45355 | #ifdef __LITTLE_ENDIAN__ |
| 43620 | #define vmulq_laneq_f16(__p0_201, __p1_201, __p2_201) __extension__ ({ \ | |
| 43621 | float16x8_t __s0_201 = __p0_201; \ | |
| 43622 | float16x8_t __s1_201 = __p1_201; \ | |
| 43623 | float16x8_t __ret_201; \ | |
| 43624 | __ret_201 = __s0_201 * splatq_laneq_f16(__s1_201, __p2_201); \ | |
| 43625 | __ret_201; \ | |
| 45356 | #define vmulq_laneq_f16(__p0_293, __p1_293, __p2_293) __extension__ ({ \ | |
| 45357 | float16x8_t __s0_293 = __p0_293; \ | |
| 45358 | float16x8_t __s1_293 = __p1_293; \ | |
| 45359 | float16x8_t __ret_293; \ | |
| 45360 | __ret_293 = __s0_293 * splatq_laneq_f16(__s1_293, __p2_293); \ | |
| 45361 | __ret_293; \ | |
| 43626 | 45362 | }) |
| 43627 | 45363 | #else |
| 43628 | #define vmulq_laneq_f16(__p0_202, __p1_202, __p2_202) __extension__ ({ \ | |
| 43629 | float16x8_t __s0_202 = __p0_202; \ | |
| 43630 | float16x8_t __s1_202 = __p1_202; \ | |
| 43631 | float16x8_t __rev0_202; __rev0_202 = __builtin_shufflevector(__s0_202, __s0_202, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43632 | float16x8_t __rev1_202; __rev1_202 = __builtin_shufflevector(__s1_202, __s1_202, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43633 | float16x8_t __ret_202; \ | |
| 43634 | __ret_202 = __rev0_202 * __noswap_splatq_laneq_f16(__rev1_202, __p2_202); \ | |
| 43635 | __ret_202 = __builtin_shufflevector(__ret_202, __ret_202, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43636 | __ret_202; \ | |
| 45364 | #define vmulq_laneq_f16(__p0_294, __p1_294, __p2_294) __extension__ ({ \ | |
| 45365 | float16x8_t __s0_294 = __p0_294; \ | |
| 45366 | float16x8_t __s1_294 = __p1_294; \ | |
| 45367 | float16x8_t __rev0_294; __rev0_294 = __builtin_shufflevector(__s0_294, __s0_294, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45368 | float16x8_t __rev1_294; __rev1_294 = __builtin_shufflevector(__s1_294, __s1_294, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45369 | float16x8_t __ret_294; \ | |
| 45370 | __ret_294 = __rev0_294 * __noswap_splatq_laneq_f16(__rev1_294, __p2_294); \ | |
| 45371 | __ret_294 = __builtin_shufflevector(__ret_294, __ret_294, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45372 | __ret_294; \ | |
| 43637 | 45373 | }) |
| 43638 | 45374 | #endif |
| 43639 | 45375 | |
| 43640 | 45376 | #ifdef __LITTLE_ENDIAN__ |
| 43641 | #define vmul_laneq_f16(__p0_203, __p1_203, __p2_203) __extension__ ({ \ | |
| 43642 | float16x4_t __s0_203 = __p0_203; \ | |
| 43643 | float16x8_t __s1_203 = __p1_203; \ | |
| 43644 | float16x4_t __ret_203; \ | |
| 43645 | __ret_203 = __s0_203 * splat_laneq_f16(__s1_203, __p2_203); \ | |
| 43646 | __ret_203; \ | |
| 45377 | #define vmul_laneq_f16(__p0_295, __p1_295, __p2_295) __extension__ ({ \ | |
| 45378 | float16x4_t __s0_295 = __p0_295; \ | |
| 45379 | float16x8_t __s1_295 = __p1_295; \ | |
| 45380 | float16x4_t __ret_295; \ | |
| 45381 | __ret_295 = __s0_295 * splat_laneq_f16(__s1_295, __p2_295); \ | |
| 45382 | __ret_295; \ | |
| 43647 | 45383 | }) |
| 43648 | 45384 | #else |
| 43649 | #define vmul_laneq_f16(__p0_204, __p1_204, __p2_204) __extension__ ({ \ | |
| 43650 | float16x4_t __s0_204 = __p0_204; \ | |
| 43651 | float16x8_t __s1_204 = __p1_204; \ | |
| 43652 | float16x4_t __rev0_204; __rev0_204 = __builtin_shufflevector(__s0_204, __s0_204, 3, 2, 1, 0); \ | |
| 43653 | float16x8_t __rev1_204; __rev1_204 = __builtin_shufflevector(__s1_204, __s1_204, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43654 | float16x4_t __ret_204; \ | |
| 43655 | __ret_204 = __rev0_204 * __noswap_splat_laneq_f16(__rev1_204, __p2_204); \ | |
| 43656 | __ret_204 = __builtin_shufflevector(__ret_204, __ret_204, 3, 2, 1, 0); \ | |
| 43657 | __ret_204; \ | |
| 45385 | #define vmul_laneq_f16(__p0_296, __p1_296, __p2_296) __extension__ ({ \ | |
| 45386 | float16x4_t __s0_296 = __p0_296; \ | |
| 45387 | float16x8_t __s1_296 = __p1_296; \ | |
| 45388 | float16x4_t __rev0_296; __rev0_296 = __builtin_shufflevector(__s0_296, __s0_296, 3, 2, 1, 0); \ | |
| 45389 | float16x8_t __rev1_296; __rev1_296 = __builtin_shufflevector(__s1_296, __s1_296, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45390 | float16x4_t __ret_296; \ | |
| 45391 | __ret_296 = __rev0_296 * __noswap_splat_laneq_f16(__rev1_296, __p2_296); \ | |
| 45392 | __ret_296 = __builtin_shufflevector(__ret_296, __ret_296, 3, 2, 1, 0); \ | |
| 45393 | __ret_296; \ | |
| 43658 | 45394 | }) |
| 43659 | 45395 | #endif |
| 43660 | 45396 | |
| ... | ... | @@ -43722,44 +45458,44 @@ __ai float16x4_t __noswap_vmulx_f16(float16x4_t __p0, float16x4_t __p1) { |
| 43722 | 45458 | #endif |
| 43723 | 45459 | |
| 43724 | 45460 | #ifdef __LITTLE_ENDIAN__ |
| 43725 | #define vmulxq_lane_f16(__p0_205, __p1_205, __p2_205) __extension__ ({ \ | |
| 43726 | float16x8_t __s0_205 = __p0_205; \ | |
| 43727 | float16x4_t __s1_205 = __p1_205; \ | |
| 43728 | float16x8_t __ret_205; \ | |
| 43729 | __ret_205 = vmulxq_f16(__s0_205, splatq_lane_f16(__s1_205, __p2_205)); \ | |
| 43730 | __ret_205; \ | |
| 45461 | #define vmulxq_lane_f16(__p0_297, __p1_297, __p2_297) __extension__ ({ \ | |
| 45462 | float16x8_t __s0_297 = __p0_297; \ | |
| 45463 | float16x4_t __s1_297 = __p1_297; \ | |
| 45464 | float16x8_t __ret_297; \ | |
| 45465 | __ret_297 = vmulxq_f16(__s0_297, splatq_lane_f16(__s1_297, __p2_297)); \ | |
| 45466 | __ret_297; \ | |
| 43731 | 45467 | }) |
| 43732 | 45468 | #else |
| 43733 | #define vmulxq_lane_f16(__p0_206, __p1_206, __p2_206) __extension__ ({ \ | |
| 43734 | float16x8_t __s0_206 = __p0_206; \ | |
| 43735 | float16x4_t __s1_206 = __p1_206; \ | |
| 43736 | float16x8_t __rev0_206; __rev0_206 = __builtin_shufflevector(__s0_206, __s0_206, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43737 | float16x4_t __rev1_206; __rev1_206 = __builtin_shufflevector(__s1_206, __s1_206, 3, 2, 1, 0); \ | |
| 43738 | float16x8_t __ret_206; \ | |
| 43739 | __ret_206 = __noswap_vmulxq_f16(__rev0_206, __noswap_splatq_lane_f16(__rev1_206, __p2_206)); \ | |
| 43740 | __ret_206 = __builtin_shufflevector(__ret_206, __ret_206, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43741 | __ret_206; \ | |
| 45469 | #define vmulxq_lane_f16(__p0_298, __p1_298, __p2_298) __extension__ ({ \ | |
| 45470 | float16x8_t __s0_298 = __p0_298; \ | |
| 45471 | float16x4_t __s1_298 = __p1_298; \ | |
| 45472 | float16x8_t __rev0_298; __rev0_298 = __builtin_shufflevector(__s0_298, __s0_298, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45473 | float16x4_t __rev1_298; __rev1_298 = __builtin_shufflevector(__s1_298, __s1_298, 3, 2, 1, 0); \ | |
| 45474 | float16x8_t __ret_298; \ | |
| 45475 | __ret_298 = __noswap_vmulxq_f16(__rev0_298, __noswap_splatq_lane_f16(__rev1_298, __p2_298)); \ | |
| 45476 | __ret_298 = __builtin_shufflevector(__ret_298, __ret_298, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45477 | __ret_298; \ | |
| 43742 | 45478 | }) |
| 43743 | 45479 | #endif |
| 43744 | 45480 | |
| 43745 | 45481 | #ifdef __LITTLE_ENDIAN__ |
| 43746 | #define vmulx_lane_f16(__p0_207, __p1_207, __p2_207) __extension__ ({ \ | |
| 43747 | float16x4_t __s0_207 = __p0_207; \ | |
| 43748 | float16x4_t __s1_207 = __p1_207; \ | |
| 43749 | float16x4_t __ret_207; \ | |
| 43750 | __ret_207 = vmulx_f16(__s0_207, splat_lane_f16(__s1_207, __p2_207)); \ | |
| 43751 | __ret_207; \ | |
| 45482 | #define vmulx_lane_f16(__p0_299, __p1_299, __p2_299) __extension__ ({ \ | |
| 45483 | float16x4_t __s0_299 = __p0_299; \ | |
| 45484 | float16x4_t __s1_299 = __p1_299; \ | |
| 45485 | float16x4_t __ret_299; \ | |
| 45486 | __ret_299 = vmulx_f16(__s0_299, splat_lane_f16(__s1_299, __p2_299)); \ | |
| 45487 | __ret_299; \ | |
| 43752 | 45488 | }) |
| 43753 | 45489 | #else |
| 43754 | #define vmulx_lane_f16(__p0_208, __p1_208, __p2_208) __extension__ ({ \ | |
| 43755 | float16x4_t __s0_208 = __p0_208; \ | |
| 43756 | float16x4_t __s1_208 = __p1_208; \ | |
| 43757 | float16x4_t __rev0_208; __rev0_208 = __builtin_shufflevector(__s0_208, __s0_208, 3, 2, 1, 0); \ | |
| 43758 | float16x4_t __rev1_208; __rev1_208 = __builtin_shufflevector(__s1_208, __s1_208, 3, 2, 1, 0); \ | |
| 43759 | float16x4_t __ret_208; \ | |
| 43760 | __ret_208 = __noswap_vmulx_f16(__rev0_208, __noswap_splat_lane_f16(__rev1_208, __p2_208)); \ | |
| 43761 | __ret_208 = __builtin_shufflevector(__ret_208, __ret_208, 3, 2, 1, 0); \ | |
| 43762 | __ret_208; \ | |
| 45490 | #define vmulx_lane_f16(__p0_300, __p1_300, __p2_300) __extension__ ({ \ | |
| 45491 | float16x4_t __s0_300 = __p0_300; \ | |
| 45492 | float16x4_t __s1_300 = __p1_300; \ | |
| 45493 | float16x4_t __rev0_300; __rev0_300 = __builtin_shufflevector(__s0_300, __s0_300, 3, 2, 1, 0); \ | |
| 45494 | float16x4_t __rev1_300; __rev1_300 = __builtin_shufflevector(__s1_300, __s1_300, 3, 2, 1, 0); \ | |
| 45495 | float16x4_t __ret_300; \ | |
| 45496 | __ret_300 = __noswap_vmulx_f16(__rev0_300, __noswap_splat_lane_f16(__rev1_300, __p2_300)); \ | |
| 45497 | __ret_300 = __builtin_shufflevector(__ret_300, __ret_300, 3, 2, 1, 0); \ | |
| 45498 | __ret_300; \ | |
| 43763 | 45499 | }) |
| 43764 | 45500 | #endif |
| 43765 | 45501 | |
| ... | ... | @@ -43783,44 +45519,44 @@ __ai float16x4_t __noswap_vmulx_f16(float16x4_t __p0, float16x4_t __p1) { |
| 43783 | 45519 | #endif |
| 43784 | 45520 | |
| 43785 | 45521 | #ifdef __LITTLE_ENDIAN__ |
| 43786 | #define vmulxq_laneq_f16(__p0_209, __p1_209, __p2_209) __extension__ ({ \ | |
| 43787 | float16x8_t __s0_209 = __p0_209; \ | |
| 43788 | float16x8_t __s1_209 = __p1_209; \ | |
| 43789 | float16x8_t __ret_209; \ | |
| 43790 | __ret_209 = vmulxq_f16(__s0_209, splatq_laneq_f16(__s1_209, __p2_209)); \ | |
| 43791 | __ret_209; \ | |
| 45522 | #define vmulxq_laneq_f16(__p0_301, __p1_301, __p2_301) __extension__ ({ \ | |
| 45523 | float16x8_t __s0_301 = __p0_301; \ | |
| 45524 | float16x8_t __s1_301 = __p1_301; \ | |
| 45525 | float16x8_t __ret_301; \ | |
| 45526 | __ret_301 = vmulxq_f16(__s0_301, splatq_laneq_f16(__s1_301, __p2_301)); \ | |
| 45527 | __ret_301; \ | |
| 43792 | 45528 | }) |
| 43793 | 45529 | #else |
| 43794 | #define vmulxq_laneq_f16(__p0_210, __p1_210, __p2_210) __extension__ ({ \ | |
| 43795 | float16x8_t __s0_210 = __p0_210; \ | |
| 43796 | float16x8_t __s1_210 = __p1_210; \ | |
| 43797 | float16x8_t __rev0_210; __rev0_210 = __builtin_shufflevector(__s0_210, __s0_210, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43798 | float16x8_t __rev1_210; __rev1_210 = __builtin_shufflevector(__s1_210, __s1_210, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43799 | float16x8_t __ret_210; \ | |
| 43800 | __ret_210 = __noswap_vmulxq_f16(__rev0_210, __noswap_splatq_laneq_f16(__rev1_210, __p2_210)); \ | |
| 43801 | __ret_210 = __builtin_shufflevector(__ret_210, __ret_210, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43802 | __ret_210; \ | |
| 45530 | #define vmulxq_laneq_f16(__p0_302, __p1_302, __p2_302) __extension__ ({ \ | |
| 45531 | float16x8_t __s0_302 = __p0_302; \ | |
| 45532 | float16x8_t __s1_302 = __p1_302; \ | |
| 45533 | float16x8_t __rev0_302; __rev0_302 = __builtin_shufflevector(__s0_302, __s0_302, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45534 | float16x8_t __rev1_302; __rev1_302 = __builtin_shufflevector(__s1_302, __s1_302, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45535 | float16x8_t __ret_302; \ | |
| 45536 | __ret_302 = __noswap_vmulxq_f16(__rev0_302, __noswap_splatq_laneq_f16(__rev1_302, __p2_302)); \ | |
| 45537 | __ret_302 = __builtin_shufflevector(__ret_302, __ret_302, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45538 | __ret_302; \ | |
| 43803 | 45539 | }) |
| 43804 | 45540 | #endif |
| 43805 | 45541 | |
| 43806 | 45542 | #ifdef __LITTLE_ENDIAN__ |
| 43807 | #define vmulx_laneq_f16(__p0_211, __p1_211, __p2_211) __extension__ ({ \ | |
| 43808 | float16x4_t __s0_211 = __p0_211; \ | |
| 43809 | float16x8_t __s1_211 = __p1_211; \ | |
| 43810 | float16x4_t __ret_211; \ | |
| 43811 | __ret_211 = vmulx_f16(__s0_211, splat_laneq_f16(__s1_211, __p2_211)); \ | |
| 43812 | __ret_211; \ | |
| 45543 | #define vmulx_laneq_f16(__p0_303, __p1_303, __p2_303) __extension__ ({ \ | |
| 45544 | float16x4_t __s0_303 = __p0_303; \ | |
| 45545 | float16x8_t __s1_303 = __p1_303; \ | |
| 45546 | float16x4_t __ret_303; \ | |
| 45547 | __ret_303 = vmulx_f16(__s0_303, splat_laneq_f16(__s1_303, __p2_303)); \ | |
| 45548 | __ret_303; \ | |
| 43813 | 45549 | }) |
| 43814 | 45550 | #else |
| 43815 | #define vmulx_laneq_f16(__p0_212, __p1_212, __p2_212) __extension__ ({ \ | |
| 43816 | float16x4_t __s0_212 = __p0_212; \ | |
| 43817 | float16x8_t __s1_212 = __p1_212; \ | |
| 43818 | float16x4_t __rev0_212; __rev0_212 = __builtin_shufflevector(__s0_212, __s0_212, 3, 2, 1, 0); \ | |
| 43819 | float16x8_t __rev1_212; __rev1_212 = __builtin_shufflevector(__s1_212, __s1_212, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 43820 | float16x4_t __ret_212; \ | |
| 43821 | __ret_212 = __noswap_vmulx_f16(__rev0_212, __noswap_splat_laneq_f16(__rev1_212, __p2_212)); \ | |
| 43822 | __ret_212 = __builtin_shufflevector(__ret_212, __ret_212, 3, 2, 1, 0); \ | |
| 43823 | __ret_212; \ | |
| 45551 | #define vmulx_laneq_f16(__p0_304, __p1_304, __p2_304) __extension__ ({ \ | |
| 45552 | float16x4_t __s0_304 = __p0_304; \ | |
| 45553 | float16x8_t __s1_304 = __p1_304; \ | |
| 45554 | float16x4_t __rev0_304; __rev0_304 = __builtin_shufflevector(__s0_304, __s0_304, 3, 2, 1, 0); \ | |
| 45555 | float16x8_t __rev1_304; __rev1_304 = __builtin_shufflevector(__s1_304, __s1_304, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 45556 | float16x4_t __ret_304; \ | |
| 45557 | __ret_304 = __noswap_vmulx_f16(__rev0_304, __noswap_splat_laneq_f16(__rev1_304, __p2_304)); \ | |
| 45558 | __ret_304 = __builtin_shufflevector(__ret_304, __ret_304, 3, 2, 1, 0); \ | |
| 45559 | __ret_304; \ | |
| 43824 | 45560 | }) |
| 43825 | 45561 | #endif |
| 43826 | 45562 | |
| ... | ... | @@ -44336,54 +46072,54 @@ __ai int32x2_t __noswap_vusdot_s32(int32x2_t __p0, uint8x8_t __p1, int8x8_t __p2 |
| 44336 | 46072 | #endif |
| 44337 | 46073 | |
| 44338 | 46074 | #ifdef __LITTLE_ENDIAN__ |
| 44339 | #define vusdotq_lane_s32(__p0_213, __p1_213, __p2_213, __p3_213) __extension__ ({ \ | |
| 44340 | int32x4_t __s0_213 = __p0_213; \ | |
| 44341 | uint8x16_t __s1_213 = __p1_213; \ | |
| 44342 | int8x8_t __s2_213 = __p2_213; \ | |
| 44343 | int32x4_t __ret_213; \ | |
| 44344 | int8x8_t __reint_213 = __s2_213; \ | |
| 44345 | __ret_213 = vusdotq_s32(__s0_213, __s1_213, (int8x16_t)(splatq_lane_s32(*(int32x2_t *) &__reint_213, __p3_213))); \ | |
| 44346 | __ret_213; \ | |
| 46075 | #define vusdotq_lane_s32(__p0_305, __p1_305, __p2_305, __p3_305) __extension__ ({ \ | |
| 46076 | int32x4_t __s0_305 = __p0_305; \ | |
| 46077 | uint8x16_t __s1_305 = __p1_305; \ | |
| 46078 | int8x8_t __s2_305 = __p2_305; \ | |
| 46079 | int32x4_t __ret_305; \ | |
| 46080 | int8x8_t __reint_305 = __s2_305; \ | |
| 46081 | __ret_305 = vusdotq_s32(__s0_305, __s1_305, (int8x16_t)(splatq_lane_s32(*(int32x2_t *) &__reint_305, __p3_305))); \ | |
| 46082 | __ret_305; \ | |
| 44347 | 46083 | }) |
| 44348 | 46084 | #else |
| 44349 | #define vusdotq_lane_s32(__p0_214, __p1_214, __p2_214, __p3_214) __extension__ ({ \ | |
| 44350 | int32x4_t __s0_214 = __p0_214; \ | |
| 44351 | uint8x16_t __s1_214 = __p1_214; \ | |
| 44352 | int8x8_t __s2_214 = __p2_214; \ | |
| 44353 | int32x4_t __rev0_214; __rev0_214 = __builtin_shufflevector(__s0_214, __s0_214, 3, 2, 1, 0); \ | |
| 44354 | uint8x16_t __rev1_214; __rev1_214 = __builtin_shufflevector(__s1_214, __s1_214, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44355 | int8x8_t __rev2_214; __rev2_214 = __builtin_shufflevector(__s2_214, __s2_214, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44356 | int32x4_t __ret_214; \ | |
| 44357 | int8x8_t __reint_214 = __rev2_214; \ | |
| 44358 | __ret_214 = __noswap_vusdotq_s32(__rev0_214, __rev1_214, (int8x16_t)(__noswap_splatq_lane_s32(*(int32x2_t *) &__reint_214, __p3_214))); \ | |
| 44359 | __ret_214 = __builtin_shufflevector(__ret_214, __ret_214, 3, 2, 1, 0); \ | |
| 44360 | __ret_214; \ | |
| 46085 | #define vusdotq_lane_s32(__p0_306, __p1_306, __p2_306, __p3_306) __extension__ ({ \ | |
| 46086 | int32x4_t __s0_306 = __p0_306; \ | |
| 46087 | uint8x16_t __s1_306 = __p1_306; \ | |
| 46088 | int8x8_t __s2_306 = __p2_306; \ | |
| 46089 | int32x4_t __rev0_306; __rev0_306 = __builtin_shufflevector(__s0_306, __s0_306, 3, 2, 1, 0); \ | |
| 46090 | uint8x16_t __rev1_306; __rev1_306 = __builtin_shufflevector(__s1_306, __s1_306, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46091 | int8x8_t __rev2_306; __rev2_306 = __builtin_shufflevector(__s2_306, __s2_306, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46092 | int32x4_t __ret_306; \ | |
| 46093 | int8x8_t __reint_306 = __rev2_306; \ | |
| 46094 | __ret_306 = __noswap_vusdotq_s32(__rev0_306, __rev1_306, (int8x16_t)(__noswap_splatq_lane_s32(*(int32x2_t *) &__reint_306, __p3_306))); \ | |
| 46095 | __ret_306 = __builtin_shufflevector(__ret_306, __ret_306, 3, 2, 1, 0); \ | |
| 46096 | __ret_306; \ | |
| 44361 | 46097 | }) |
| 44362 | 46098 | #endif |
| 44363 | 46099 | |
| 44364 | 46100 | #ifdef __LITTLE_ENDIAN__ |
| 44365 | #define vusdot_lane_s32(__p0_215, __p1_215, __p2_215, __p3_215) __extension__ ({ \ | |
| 44366 | int32x2_t __s0_215 = __p0_215; \ | |
| 44367 | uint8x8_t __s1_215 = __p1_215; \ | |
| 44368 | int8x8_t __s2_215 = __p2_215; \ | |
| 44369 | int32x2_t __ret_215; \ | |
| 44370 | int8x8_t __reint_215 = __s2_215; \ | |
| 44371 | __ret_215 = vusdot_s32(__s0_215, __s1_215, (int8x8_t)(splat_lane_s32(*(int32x2_t *) &__reint_215, __p3_215))); \ | |
| 44372 | __ret_215; \ | |
| 46101 | #define vusdot_lane_s32(__p0_307, __p1_307, __p2_307, __p3_307) __extension__ ({ \ | |
| 46102 | int32x2_t __s0_307 = __p0_307; \ | |
| 46103 | uint8x8_t __s1_307 = __p1_307; \ | |
| 46104 | int8x8_t __s2_307 = __p2_307; \ | |
| 46105 | int32x2_t __ret_307; \ | |
| 46106 | int8x8_t __reint_307 = __s2_307; \ | |
| 46107 | __ret_307 = vusdot_s32(__s0_307, __s1_307, (int8x8_t)(splat_lane_s32(*(int32x2_t *) &__reint_307, __p3_307))); \ | |
| 46108 | __ret_307; \ | |
| 44373 | 46109 | }) |
| 44374 | 46110 | #else |
| 44375 | #define vusdot_lane_s32(__p0_216, __p1_216, __p2_216, __p3_216) __extension__ ({ \ | |
| 44376 | int32x2_t __s0_216 = __p0_216; \ | |
| 44377 | uint8x8_t __s1_216 = __p1_216; \ | |
| 44378 | int8x8_t __s2_216 = __p2_216; \ | |
| 44379 | int32x2_t __rev0_216; __rev0_216 = __builtin_shufflevector(__s0_216, __s0_216, 1, 0); \ | |
| 44380 | uint8x8_t __rev1_216; __rev1_216 = __builtin_shufflevector(__s1_216, __s1_216, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44381 | int8x8_t __rev2_216; __rev2_216 = __builtin_shufflevector(__s2_216, __s2_216, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44382 | int32x2_t __ret_216; \ | |
| 44383 | int8x8_t __reint_216 = __rev2_216; \ | |
| 44384 | __ret_216 = __noswap_vusdot_s32(__rev0_216, __rev1_216, (int8x8_t)(__noswap_splat_lane_s32(*(int32x2_t *) &__reint_216, __p3_216))); \ | |
| 44385 | __ret_216 = __builtin_shufflevector(__ret_216, __ret_216, 1, 0); \ | |
| 44386 | __ret_216; \ | |
| 46111 | #define vusdot_lane_s32(__p0_308, __p1_308, __p2_308, __p3_308) __extension__ ({ \ | |
| 46112 | int32x2_t __s0_308 = __p0_308; \ | |
| 46113 | uint8x8_t __s1_308 = __p1_308; \ | |
| 46114 | int8x8_t __s2_308 = __p2_308; \ | |
| 46115 | int32x2_t __rev0_308; __rev0_308 = __builtin_shufflevector(__s0_308, __s0_308, 1, 0); \ | |
| 46116 | uint8x8_t __rev1_308; __rev1_308 = __builtin_shufflevector(__s1_308, __s1_308, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46117 | int8x8_t __rev2_308; __rev2_308 = __builtin_shufflevector(__s2_308, __s2_308, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46118 | int32x2_t __ret_308; \ | |
| 46119 | int8x8_t __reint_308 = __rev2_308; \ | |
| 46120 | __ret_308 = __noswap_vusdot_s32(__rev0_308, __rev1_308, (int8x8_t)(__noswap_splat_lane_s32(*(int32x2_t *) &__reint_308, __p3_308))); \ | |
| 46121 | __ret_308 = __builtin_shufflevector(__ret_308, __ret_308, 1, 0); \ | |
| 46122 | __ret_308; \ | |
| 44387 | 46123 | }) |
| 44388 | 46124 | #endif |
| 44389 | 46125 | |
| ... | ... | @@ -44480,98 +46216,98 @@ __ai int16x4_t vqrdmlah_s16(int16x4_t __p0, int16x4_t __p1, int16x4_t __p2) { |
| 44480 | 46216 | #endif |
| 44481 | 46217 | |
| 44482 | 46218 | #ifdef __LITTLE_ENDIAN__ |
| 44483 | #define vqrdmlahq_lane_s32(__p0_217, __p1_217, __p2_217, __p3_217) __extension__ ({ \ | |
| 44484 | int32x4_t __s0_217 = __p0_217; \ | |
| 44485 | int32x4_t __s1_217 = __p1_217; \ | |
| 44486 | int32x2_t __s2_217 = __p2_217; \ | |
| 44487 | int32x4_t __ret_217; \ | |
| 44488 | __ret_217 = vqaddq_s32(__s0_217, vqrdmulhq_s32(__s1_217, splatq_lane_s32(__s2_217, __p3_217))); \ | |
| 44489 | __ret_217; \ | |
| 46219 | #define vqrdmlahq_lane_s32(__p0_309, __p1_309, __p2_309, __p3_309) __extension__ ({ \ | |
| 46220 | int32x4_t __s0_309 = __p0_309; \ | |
| 46221 | int32x4_t __s1_309 = __p1_309; \ | |
| 46222 | int32x2_t __s2_309 = __p2_309; \ | |
| 46223 | int32x4_t __ret_309; \ | |
| 46224 | __ret_309 = vqaddq_s32(__s0_309, vqrdmulhq_s32(__s1_309, splatq_lane_s32(__s2_309, __p3_309))); \ | |
| 46225 | __ret_309; \ | |
| 44490 | 46226 | }) |
| 44491 | 46227 | #else |
| 44492 | #define vqrdmlahq_lane_s32(__p0_218, __p1_218, __p2_218, __p3_218) __extension__ ({ \ | |
| 44493 | int32x4_t __s0_218 = __p0_218; \ | |
| 44494 | int32x4_t __s1_218 = __p1_218; \ | |
| 44495 | int32x2_t __s2_218 = __p2_218; \ | |
| 44496 | int32x4_t __rev0_218; __rev0_218 = __builtin_shufflevector(__s0_218, __s0_218, 3, 2, 1, 0); \ | |
| 44497 | int32x4_t __rev1_218; __rev1_218 = __builtin_shufflevector(__s1_218, __s1_218, 3, 2, 1, 0); \ | |
| 44498 | int32x2_t __rev2_218; __rev2_218 = __builtin_shufflevector(__s2_218, __s2_218, 1, 0); \ | |
| 44499 | int32x4_t __ret_218; \ | |
| 44500 | __ret_218 = __noswap_vqaddq_s32(__rev0_218, __noswap_vqrdmulhq_s32(__rev1_218, __noswap_splatq_lane_s32(__rev2_218, __p3_218))); \ | |
| 44501 | __ret_218 = __builtin_shufflevector(__ret_218, __ret_218, 3, 2, 1, 0); \ | |
| 44502 | __ret_218; \ | |
| 46228 | #define vqrdmlahq_lane_s32(__p0_310, __p1_310, __p2_310, __p3_310) __extension__ ({ \ | |
| 46229 | int32x4_t __s0_310 = __p0_310; \ | |
| 46230 | int32x4_t __s1_310 = __p1_310; \ | |
| 46231 | int32x2_t __s2_310 = __p2_310; \ | |
| 46232 | int32x4_t __rev0_310; __rev0_310 = __builtin_shufflevector(__s0_310, __s0_310, 3, 2, 1, 0); \ | |
| 46233 | int32x4_t __rev1_310; __rev1_310 = __builtin_shufflevector(__s1_310, __s1_310, 3, 2, 1, 0); \ | |
| 46234 | int32x2_t __rev2_310; __rev2_310 = __builtin_shufflevector(__s2_310, __s2_310, 1, 0); \ | |
| 46235 | int32x4_t __ret_310; \ | |
| 46236 | __ret_310 = __noswap_vqaddq_s32(__rev0_310, __noswap_vqrdmulhq_s32(__rev1_310, __noswap_splatq_lane_s32(__rev2_310, __p3_310))); \ | |
| 46237 | __ret_310 = __builtin_shufflevector(__ret_310, __ret_310, 3, 2, 1, 0); \ | |
| 46238 | __ret_310; \ | |
| 44503 | 46239 | }) |
| 44504 | 46240 | #endif |
| 44505 | 46241 | |
| 44506 | 46242 | #ifdef __LITTLE_ENDIAN__ |
| 44507 | #define vqrdmlahq_lane_s16(__p0_219, __p1_219, __p2_219, __p3_219) __extension__ ({ \ | |
| 44508 | int16x8_t __s0_219 = __p0_219; \ | |
| 44509 | int16x8_t __s1_219 = __p1_219; \ | |
| 44510 | int16x4_t __s2_219 = __p2_219; \ | |
| 44511 | int16x8_t __ret_219; \ | |
| 44512 | __ret_219 = vqaddq_s16(__s0_219, vqrdmulhq_s16(__s1_219, splatq_lane_s16(__s2_219, __p3_219))); \ | |
| 44513 | __ret_219; \ | |
| 46243 | #define vqrdmlahq_lane_s16(__p0_311, __p1_311, __p2_311, __p3_311) __extension__ ({ \ | |
| 46244 | int16x8_t __s0_311 = __p0_311; \ | |
| 46245 | int16x8_t __s1_311 = __p1_311; \ | |
| 46246 | int16x4_t __s2_311 = __p2_311; \ | |
| 46247 | int16x8_t __ret_311; \ | |
| 46248 | __ret_311 = vqaddq_s16(__s0_311, vqrdmulhq_s16(__s1_311, splatq_lane_s16(__s2_311, __p3_311))); \ | |
| 46249 | __ret_311; \ | |
| 44514 | 46250 | }) |
| 44515 | 46251 | #else |
| 44516 | #define vqrdmlahq_lane_s16(__p0_220, __p1_220, __p2_220, __p3_220) __extension__ ({ \ | |
| 44517 | int16x8_t __s0_220 = __p0_220; \ | |
| 44518 | int16x8_t __s1_220 = __p1_220; \ | |
| 44519 | int16x4_t __s2_220 = __p2_220; \ | |
| 44520 | int16x8_t __rev0_220; __rev0_220 = __builtin_shufflevector(__s0_220, __s0_220, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44521 | int16x8_t __rev1_220; __rev1_220 = __builtin_shufflevector(__s1_220, __s1_220, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44522 | int16x4_t __rev2_220; __rev2_220 = __builtin_shufflevector(__s2_220, __s2_220, 3, 2, 1, 0); \ | |
| 44523 | int16x8_t __ret_220; \ | |
| 44524 | __ret_220 = __noswap_vqaddq_s16(__rev0_220, __noswap_vqrdmulhq_s16(__rev1_220, __noswap_splatq_lane_s16(__rev2_220, __p3_220))); \ | |
| 44525 | __ret_220 = __builtin_shufflevector(__ret_220, __ret_220, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44526 | __ret_220; \ | |
| 46252 | #define vqrdmlahq_lane_s16(__p0_312, __p1_312, __p2_312, __p3_312) __extension__ ({ \ | |
| 46253 | int16x8_t __s0_312 = __p0_312; \ | |
| 46254 | int16x8_t __s1_312 = __p1_312; \ | |
| 46255 | int16x4_t __s2_312 = __p2_312; \ | |
| 46256 | int16x8_t __rev0_312; __rev0_312 = __builtin_shufflevector(__s0_312, __s0_312, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46257 | int16x8_t __rev1_312; __rev1_312 = __builtin_shufflevector(__s1_312, __s1_312, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46258 | int16x4_t __rev2_312; __rev2_312 = __builtin_shufflevector(__s2_312, __s2_312, 3, 2, 1, 0); \ | |
| 46259 | int16x8_t __ret_312; \ | |
| 46260 | __ret_312 = __noswap_vqaddq_s16(__rev0_312, __noswap_vqrdmulhq_s16(__rev1_312, __noswap_splatq_lane_s16(__rev2_312, __p3_312))); \ | |
| 46261 | __ret_312 = __builtin_shufflevector(__ret_312, __ret_312, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46262 | __ret_312; \ | |
| 44527 | 46263 | }) |
| 44528 | 46264 | #endif |
| 44529 | 46265 | |
| 44530 | 46266 | #ifdef __LITTLE_ENDIAN__ |
| 44531 | #define vqrdmlah_lane_s32(__p0_221, __p1_221, __p2_221, __p3_221) __extension__ ({ \ | |
| 44532 | int32x2_t __s0_221 = __p0_221; \ | |
| 44533 | int32x2_t __s1_221 = __p1_221; \ | |
| 44534 | int32x2_t __s2_221 = __p2_221; \ | |
| 44535 | int32x2_t __ret_221; \ | |
| 44536 | __ret_221 = vqadd_s32(__s0_221, vqrdmulh_s32(__s1_221, splat_lane_s32(__s2_221, __p3_221))); \ | |
| 44537 | __ret_221; \ | |
| 46267 | #define vqrdmlah_lane_s32(__p0_313, __p1_313, __p2_313, __p3_313) __extension__ ({ \ | |
| 46268 | int32x2_t __s0_313 = __p0_313; \ | |
| 46269 | int32x2_t __s1_313 = __p1_313; \ | |
| 46270 | int32x2_t __s2_313 = __p2_313; \ | |
| 46271 | int32x2_t __ret_313; \ | |
| 46272 | __ret_313 = vqadd_s32(__s0_313, vqrdmulh_s32(__s1_313, splat_lane_s32(__s2_313, __p3_313))); \ | |
| 46273 | __ret_313; \ | |
| 44538 | 46274 | }) |
| 44539 | 46275 | #else |
| 44540 | #define vqrdmlah_lane_s32(__p0_222, __p1_222, __p2_222, __p3_222) __extension__ ({ \ | |
| 44541 | int32x2_t __s0_222 = __p0_222; \ | |
| 44542 | int32x2_t __s1_222 = __p1_222; \ | |
| 44543 | int32x2_t __s2_222 = __p2_222; \ | |
| 44544 | int32x2_t __rev0_222; __rev0_222 = __builtin_shufflevector(__s0_222, __s0_222, 1, 0); \ | |
| 44545 | int32x2_t __rev1_222; __rev1_222 = __builtin_shufflevector(__s1_222, __s1_222, 1, 0); \ | |
| 44546 | int32x2_t __rev2_222; __rev2_222 = __builtin_shufflevector(__s2_222, __s2_222, 1, 0); \ | |
| 44547 | int32x2_t __ret_222; \ | |
| 44548 | __ret_222 = __noswap_vqadd_s32(__rev0_222, __noswap_vqrdmulh_s32(__rev1_222, __noswap_splat_lane_s32(__rev2_222, __p3_222))); \ | |
| 44549 | __ret_222 = __builtin_shufflevector(__ret_222, __ret_222, 1, 0); \ | |
| 44550 | __ret_222; \ | |
| 46276 | #define vqrdmlah_lane_s32(__p0_314, __p1_314, __p2_314, __p3_314) __extension__ ({ \ | |
| 46277 | int32x2_t __s0_314 = __p0_314; \ | |
| 46278 | int32x2_t __s1_314 = __p1_314; \ | |
| 46279 | int32x2_t __s2_314 = __p2_314; \ | |
| 46280 | int32x2_t __rev0_314; __rev0_314 = __builtin_shufflevector(__s0_314, __s0_314, 1, 0); \ | |
| 46281 | int32x2_t __rev1_314; __rev1_314 = __builtin_shufflevector(__s1_314, __s1_314, 1, 0); \ | |
| 46282 | int32x2_t __rev2_314; __rev2_314 = __builtin_shufflevector(__s2_314, __s2_314, 1, 0); \ | |
| 46283 | int32x2_t __ret_314; \ | |
| 46284 | __ret_314 = __noswap_vqadd_s32(__rev0_314, __noswap_vqrdmulh_s32(__rev1_314, __noswap_splat_lane_s32(__rev2_314, __p3_314))); \ | |
| 46285 | __ret_314 = __builtin_shufflevector(__ret_314, __ret_314, 1, 0); \ | |
| 46286 | __ret_314; \ | |
| 44551 | 46287 | }) |
| 44552 | 46288 | #endif |
| 44553 | 46289 | |
| 44554 | 46290 | #ifdef __LITTLE_ENDIAN__ |
| 44555 | #define vqrdmlah_lane_s16(__p0_223, __p1_223, __p2_223, __p3_223) __extension__ ({ \ | |
| 44556 | int16x4_t __s0_223 = __p0_223; \ | |
| 44557 | int16x4_t __s1_223 = __p1_223; \ | |
| 44558 | int16x4_t __s2_223 = __p2_223; \ | |
| 44559 | int16x4_t __ret_223; \ | |
| 44560 | __ret_223 = vqadd_s16(__s0_223, vqrdmulh_s16(__s1_223, splat_lane_s16(__s2_223, __p3_223))); \ | |
| 44561 | __ret_223; \ | |
| 46291 | #define vqrdmlah_lane_s16(__p0_315, __p1_315, __p2_315, __p3_315) __extension__ ({ \ | |
| 46292 | int16x4_t __s0_315 = __p0_315; \ | |
| 46293 | int16x4_t __s1_315 = __p1_315; \ | |
| 46294 | int16x4_t __s2_315 = __p2_315; \ | |
| 46295 | int16x4_t __ret_315; \ | |
| 46296 | __ret_315 = vqadd_s16(__s0_315, vqrdmulh_s16(__s1_315, splat_lane_s16(__s2_315, __p3_315))); \ | |
| 46297 | __ret_315; \ | |
| 44562 | 46298 | }) |
| 44563 | 46299 | #else |
| 44564 | #define vqrdmlah_lane_s16(__p0_224, __p1_224, __p2_224, __p3_224) __extension__ ({ \ | |
| 44565 | int16x4_t __s0_224 = __p0_224; \ | |
| 44566 | int16x4_t __s1_224 = __p1_224; \ | |
| 44567 | int16x4_t __s2_224 = __p2_224; \ | |
| 44568 | int16x4_t __rev0_224; __rev0_224 = __builtin_shufflevector(__s0_224, __s0_224, 3, 2, 1, 0); \ | |
| 44569 | int16x4_t __rev1_224; __rev1_224 = __builtin_shufflevector(__s1_224, __s1_224, 3, 2, 1, 0); \ | |
| 44570 | int16x4_t __rev2_224; __rev2_224 = __builtin_shufflevector(__s2_224, __s2_224, 3, 2, 1, 0); \ | |
| 44571 | int16x4_t __ret_224; \ | |
| 44572 | __ret_224 = __noswap_vqadd_s16(__rev0_224, __noswap_vqrdmulh_s16(__rev1_224, __noswap_splat_lane_s16(__rev2_224, __p3_224))); \ | |
| 44573 | __ret_224 = __builtin_shufflevector(__ret_224, __ret_224, 3, 2, 1, 0); \ | |
| 44574 | __ret_224; \ | |
| 46300 | #define vqrdmlah_lane_s16(__p0_316, __p1_316, __p2_316, __p3_316) __extension__ ({ \ | |
| 46301 | int16x4_t __s0_316 = __p0_316; \ | |
| 46302 | int16x4_t __s1_316 = __p1_316; \ | |
| 46303 | int16x4_t __s2_316 = __p2_316; \ | |
| 46304 | int16x4_t __rev0_316; __rev0_316 = __builtin_shufflevector(__s0_316, __s0_316, 3, 2, 1, 0); \ | |
| 46305 | int16x4_t __rev1_316; __rev1_316 = __builtin_shufflevector(__s1_316, __s1_316, 3, 2, 1, 0); \ | |
| 46306 | int16x4_t __rev2_316; __rev2_316 = __builtin_shufflevector(__s2_316, __s2_316, 3, 2, 1, 0); \ | |
| 46307 | int16x4_t __ret_316; \ | |
| 46308 | __ret_316 = __noswap_vqadd_s16(__rev0_316, __noswap_vqrdmulh_s16(__rev1_316, __noswap_splat_lane_s16(__rev2_316, __p3_316))); \ | |
| 46309 | __ret_316 = __builtin_shufflevector(__ret_316, __ret_316, 3, 2, 1, 0); \ | |
| 46310 | __ret_316; \ | |
| 44575 | 46311 | }) |
| 44576 | 46312 | #endif |
| 44577 | 46313 | |
| ... | ... | @@ -44648,292 +46384,292 @@ __ai int16x4_t vqrdmlsh_s16(int16x4_t __p0, int16x4_t __p1, int16x4_t __p2) { |
| 44648 | 46384 | #endif |
| 44649 | 46385 | |
| 44650 | 46386 | #ifdef __LITTLE_ENDIAN__ |
| 44651 | #define vqrdmlshq_lane_s32(__p0_225, __p1_225, __p2_225, __p3_225) __extension__ ({ \ | |
| 44652 | int32x4_t __s0_225 = __p0_225; \ | |
| 44653 | int32x4_t __s1_225 = __p1_225; \ | |
| 44654 | int32x2_t __s2_225 = __p2_225; \ | |
| 44655 | int32x4_t __ret_225; \ | |
| 44656 | __ret_225 = vqsubq_s32(__s0_225, vqrdmulhq_s32(__s1_225, splatq_lane_s32(__s2_225, __p3_225))); \ | |
| 44657 | __ret_225; \ | |
| 46387 | #define vqrdmlshq_lane_s32(__p0_317, __p1_317, __p2_317, __p3_317) __extension__ ({ \ | |
| 46388 | int32x4_t __s0_317 = __p0_317; \ | |
| 46389 | int32x4_t __s1_317 = __p1_317; \ | |
| 46390 | int32x2_t __s2_317 = __p2_317; \ | |
| 46391 | int32x4_t __ret_317; \ | |
| 46392 | __ret_317 = vqsubq_s32(__s0_317, vqrdmulhq_s32(__s1_317, splatq_lane_s32(__s2_317, __p3_317))); \ | |
| 46393 | __ret_317; \ | |
| 44658 | 46394 | }) |
| 44659 | 46395 | #else |
| 44660 | #define vqrdmlshq_lane_s32(__p0_226, __p1_226, __p2_226, __p3_226) __extension__ ({ \ | |
| 44661 | int32x4_t __s0_226 = __p0_226; \ | |
| 44662 | int32x4_t __s1_226 = __p1_226; \ | |
| 44663 | int32x2_t __s2_226 = __p2_226; \ | |
| 44664 | int32x4_t __rev0_226; __rev0_226 = __builtin_shufflevector(__s0_226, __s0_226, 3, 2, 1, 0); \ | |
| 44665 | int32x4_t __rev1_226; __rev1_226 = __builtin_shufflevector(__s1_226, __s1_226, 3, 2, 1, 0); \ | |
| 44666 | int32x2_t __rev2_226; __rev2_226 = __builtin_shufflevector(__s2_226, __s2_226, 1, 0); \ | |
| 44667 | int32x4_t __ret_226; \ | |
| 44668 | __ret_226 = __noswap_vqsubq_s32(__rev0_226, __noswap_vqrdmulhq_s32(__rev1_226, __noswap_splatq_lane_s32(__rev2_226, __p3_226))); \ | |
| 44669 | __ret_226 = __builtin_shufflevector(__ret_226, __ret_226, 3, 2, 1, 0); \ | |
| 44670 | __ret_226; \ | |
| 46396 | #define vqrdmlshq_lane_s32(__p0_318, __p1_318, __p2_318, __p3_318) __extension__ ({ \ | |
| 46397 | int32x4_t __s0_318 = __p0_318; \ | |
| 46398 | int32x4_t __s1_318 = __p1_318; \ | |
| 46399 | int32x2_t __s2_318 = __p2_318; \ | |
| 46400 | int32x4_t __rev0_318; __rev0_318 = __builtin_shufflevector(__s0_318, __s0_318, 3, 2, 1, 0); \ | |
| 46401 | int32x4_t __rev1_318; __rev1_318 = __builtin_shufflevector(__s1_318, __s1_318, 3, 2, 1, 0); \ | |
| 46402 | int32x2_t __rev2_318; __rev2_318 = __builtin_shufflevector(__s2_318, __s2_318, 1, 0); \ | |
| 46403 | int32x4_t __ret_318; \ | |
| 46404 | __ret_318 = __noswap_vqsubq_s32(__rev0_318, __noswap_vqrdmulhq_s32(__rev1_318, __noswap_splatq_lane_s32(__rev2_318, __p3_318))); \ | |
| 46405 | __ret_318 = __builtin_shufflevector(__ret_318, __ret_318, 3, 2, 1, 0); \ | |
| 46406 | __ret_318; \ | |
| 44671 | 46407 | }) |
| 44672 | 46408 | #endif |
| 44673 | 46409 | |
| 44674 | 46410 | #ifdef __LITTLE_ENDIAN__ |
| 44675 | #define vqrdmlshq_lane_s16(__p0_227, __p1_227, __p2_227, __p3_227) __extension__ ({ \ | |
| 44676 | int16x8_t __s0_227 = __p0_227; \ | |
| 44677 | int16x8_t __s1_227 = __p1_227; \ | |
| 44678 | int16x4_t __s2_227 = __p2_227; \ | |
| 44679 | int16x8_t __ret_227; \ | |
| 44680 | __ret_227 = vqsubq_s16(__s0_227, vqrdmulhq_s16(__s1_227, splatq_lane_s16(__s2_227, __p3_227))); \ | |
| 44681 | __ret_227; \ | |
| 46411 | #define vqrdmlshq_lane_s16(__p0_319, __p1_319, __p2_319, __p3_319) __extension__ ({ \ | |
| 46412 | int16x8_t __s0_319 = __p0_319; \ | |
| 46413 | int16x8_t __s1_319 = __p1_319; \ | |
| 46414 | int16x4_t __s2_319 = __p2_319; \ | |
| 46415 | int16x8_t __ret_319; \ | |
| 46416 | __ret_319 = vqsubq_s16(__s0_319, vqrdmulhq_s16(__s1_319, splatq_lane_s16(__s2_319, __p3_319))); \ | |
| 46417 | __ret_319; \ | |
| 44682 | 46418 | }) |
| 44683 | 46419 | #else |
| 44684 | #define vqrdmlshq_lane_s16(__p0_228, __p1_228, __p2_228, __p3_228) __extension__ ({ \ | |
| 44685 | int16x8_t __s0_228 = __p0_228; \ | |
| 44686 | int16x8_t __s1_228 = __p1_228; \ | |
| 44687 | int16x4_t __s2_228 = __p2_228; \ | |
| 44688 | int16x8_t __rev0_228; __rev0_228 = __builtin_shufflevector(__s0_228, __s0_228, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44689 | int16x8_t __rev1_228; __rev1_228 = __builtin_shufflevector(__s1_228, __s1_228, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44690 | int16x4_t __rev2_228; __rev2_228 = __builtin_shufflevector(__s2_228, __s2_228, 3, 2, 1, 0); \ | |
| 44691 | int16x8_t __ret_228; \ | |
| 44692 | __ret_228 = __noswap_vqsubq_s16(__rev0_228, __noswap_vqrdmulhq_s16(__rev1_228, __noswap_splatq_lane_s16(__rev2_228, __p3_228))); \ | |
| 44693 | __ret_228 = __builtin_shufflevector(__ret_228, __ret_228, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44694 | __ret_228; \ | |
| 46420 | #define vqrdmlshq_lane_s16(__p0_320, __p1_320, __p2_320, __p3_320) __extension__ ({ \ | |
| 46421 | int16x8_t __s0_320 = __p0_320; \ | |
| 46422 | int16x8_t __s1_320 = __p1_320; \ | |
| 46423 | int16x4_t __s2_320 = __p2_320; \ | |
| 46424 | int16x8_t __rev0_320; __rev0_320 = __builtin_shufflevector(__s0_320, __s0_320, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46425 | int16x8_t __rev1_320; __rev1_320 = __builtin_shufflevector(__s1_320, __s1_320, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46426 | int16x4_t __rev2_320; __rev2_320 = __builtin_shufflevector(__s2_320, __s2_320, 3, 2, 1, 0); \ | |
| 46427 | int16x8_t __ret_320; \ | |
| 46428 | __ret_320 = __noswap_vqsubq_s16(__rev0_320, __noswap_vqrdmulhq_s16(__rev1_320, __noswap_splatq_lane_s16(__rev2_320, __p3_320))); \ | |
| 46429 | __ret_320 = __builtin_shufflevector(__ret_320, __ret_320, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46430 | __ret_320; \ | |
| 44695 | 46431 | }) |
| 44696 | 46432 | #endif |
| 44697 | 46433 | |
| 44698 | 46434 | #ifdef __LITTLE_ENDIAN__ |
| 44699 | #define vqrdmlsh_lane_s32(__p0_229, __p1_229, __p2_229, __p3_229) __extension__ ({ \ | |
| 44700 | int32x2_t __s0_229 = __p0_229; \ | |
| 44701 | int32x2_t __s1_229 = __p1_229; \ | |
| 44702 | int32x2_t __s2_229 = __p2_229; \ | |
| 44703 | int32x2_t __ret_229; \ | |
| 44704 | __ret_229 = vqsub_s32(__s0_229, vqrdmulh_s32(__s1_229, splat_lane_s32(__s2_229, __p3_229))); \ | |
| 44705 | __ret_229; \ | |
| 46435 | #define vqrdmlsh_lane_s32(__p0_321, __p1_321, __p2_321, __p3_321) __extension__ ({ \ | |
| 46436 | int32x2_t __s0_321 = __p0_321; \ | |
| 46437 | int32x2_t __s1_321 = __p1_321; \ | |
| 46438 | int32x2_t __s2_321 = __p2_321; \ | |
| 46439 | int32x2_t __ret_321; \ | |
| 46440 | __ret_321 = vqsub_s32(__s0_321, vqrdmulh_s32(__s1_321, splat_lane_s32(__s2_321, __p3_321))); \ | |
| 46441 | __ret_321; \ | |
| 44706 | 46442 | }) |
| 44707 | 46443 | #else |
| 44708 | #define vqrdmlsh_lane_s32(__p0_230, __p1_230, __p2_230, __p3_230) __extension__ ({ \ | |
| 44709 | int32x2_t __s0_230 = __p0_230; \ | |
| 44710 | int32x2_t __s1_230 = __p1_230; \ | |
| 44711 | int32x2_t __s2_230 = __p2_230; \ | |
| 44712 | int32x2_t __rev0_230; __rev0_230 = __builtin_shufflevector(__s0_230, __s0_230, 1, 0); \ | |
| 44713 | int32x2_t __rev1_230; __rev1_230 = __builtin_shufflevector(__s1_230, __s1_230, 1, 0); \ | |
| 44714 | int32x2_t __rev2_230; __rev2_230 = __builtin_shufflevector(__s2_230, __s2_230, 1, 0); \ | |
| 44715 | int32x2_t __ret_230; \ | |
| 44716 | __ret_230 = __noswap_vqsub_s32(__rev0_230, __noswap_vqrdmulh_s32(__rev1_230, __noswap_splat_lane_s32(__rev2_230, __p3_230))); \ | |
| 44717 | __ret_230 = __builtin_shufflevector(__ret_230, __ret_230, 1, 0); \ | |
| 44718 | __ret_230; \ | |
| 46444 | #define vqrdmlsh_lane_s32(__p0_322, __p1_322, __p2_322, __p3_322) __extension__ ({ \ | |
| 46445 | int32x2_t __s0_322 = __p0_322; \ | |
| 46446 | int32x2_t __s1_322 = __p1_322; \ | |
| 46447 | int32x2_t __s2_322 = __p2_322; \ | |
| 46448 | int32x2_t __rev0_322; __rev0_322 = __builtin_shufflevector(__s0_322, __s0_322, 1, 0); \ | |
| 46449 | int32x2_t __rev1_322; __rev1_322 = __builtin_shufflevector(__s1_322, __s1_322, 1, 0); \ | |
| 46450 | int32x2_t __rev2_322; __rev2_322 = __builtin_shufflevector(__s2_322, __s2_322, 1, 0); \ | |
| 46451 | int32x2_t __ret_322; \ | |
| 46452 | __ret_322 = __noswap_vqsub_s32(__rev0_322, __noswap_vqrdmulh_s32(__rev1_322, __noswap_splat_lane_s32(__rev2_322, __p3_322))); \ | |
| 46453 | __ret_322 = __builtin_shufflevector(__ret_322, __ret_322, 1, 0); \ | |
| 46454 | __ret_322; \ | |
| 44719 | 46455 | }) |
| 44720 | 46456 | #endif |
| 44721 | 46457 | |
| 44722 | 46458 | #ifdef __LITTLE_ENDIAN__ |
| 44723 | #define vqrdmlsh_lane_s16(__p0_231, __p1_231, __p2_231, __p3_231) __extension__ ({ \ | |
| 44724 | int16x4_t __s0_231 = __p0_231; \ | |
| 44725 | int16x4_t __s1_231 = __p1_231; \ | |
| 44726 | int16x4_t __s2_231 = __p2_231; \ | |
| 44727 | int16x4_t __ret_231; \ | |
| 44728 | __ret_231 = vqsub_s16(__s0_231, vqrdmulh_s16(__s1_231, splat_lane_s16(__s2_231, __p3_231))); \ | |
| 44729 | __ret_231; \ | |
| 46459 | #define vqrdmlsh_lane_s16(__p0_323, __p1_323, __p2_323, __p3_323) __extension__ ({ \ | |
| 46460 | int16x4_t __s0_323 = __p0_323; \ | |
| 46461 | int16x4_t __s1_323 = __p1_323; \ | |
| 46462 | int16x4_t __s2_323 = __p2_323; \ | |
| 46463 | int16x4_t __ret_323; \ | |
| 46464 | __ret_323 = vqsub_s16(__s0_323, vqrdmulh_s16(__s1_323, splat_lane_s16(__s2_323, __p3_323))); \ | |
| 46465 | __ret_323; \ | |
| 44730 | 46466 | }) |
| 44731 | 46467 | #else |
| 44732 | #define vqrdmlsh_lane_s16(__p0_232, __p1_232, __p2_232, __p3_232) __extension__ ({ \ | |
| 44733 | int16x4_t __s0_232 = __p0_232; \ | |
| 44734 | int16x4_t __s1_232 = __p1_232; \ | |
| 44735 | int16x4_t __s2_232 = __p2_232; \ | |
| 44736 | int16x4_t __rev0_232; __rev0_232 = __builtin_shufflevector(__s0_232, __s0_232, 3, 2, 1, 0); \ | |
| 44737 | int16x4_t __rev1_232; __rev1_232 = __builtin_shufflevector(__s1_232, __s1_232, 3, 2, 1, 0); \ | |
| 44738 | int16x4_t __rev2_232; __rev2_232 = __builtin_shufflevector(__s2_232, __s2_232, 3, 2, 1, 0); \ | |
| 44739 | int16x4_t __ret_232; \ | |
| 44740 | __ret_232 = __noswap_vqsub_s16(__rev0_232, __noswap_vqrdmulh_s16(__rev1_232, __noswap_splat_lane_s16(__rev2_232, __p3_232))); \ | |
| 44741 | __ret_232 = __builtin_shufflevector(__ret_232, __ret_232, 3, 2, 1, 0); \ | |
| 44742 | __ret_232; \ | |
| 46468 | #define vqrdmlsh_lane_s16(__p0_324, __p1_324, __p2_324, __p3_324) __extension__ ({ \ | |
| 46469 | int16x4_t __s0_324 = __p0_324; \ | |
| 46470 | int16x4_t __s1_324 = __p1_324; \ | |
| 46471 | int16x4_t __s2_324 = __p2_324; \ | |
| 46472 | int16x4_t __rev0_324; __rev0_324 = __builtin_shufflevector(__s0_324, __s0_324, 3, 2, 1, 0); \ | |
| 46473 | int16x4_t __rev1_324; __rev1_324 = __builtin_shufflevector(__s1_324, __s1_324, 3, 2, 1, 0); \ | |
| 46474 | int16x4_t __rev2_324; __rev2_324 = __builtin_shufflevector(__s2_324, __s2_324, 3, 2, 1, 0); \ | |
| 46475 | int16x4_t __ret_324; \ | |
| 46476 | __ret_324 = __noswap_vqsub_s16(__rev0_324, __noswap_vqrdmulh_s16(__rev1_324, __noswap_splat_lane_s16(__rev2_324, __p3_324))); \ | |
| 46477 | __ret_324 = __builtin_shufflevector(__ret_324, __ret_324, 3, 2, 1, 0); \ | |
| 46478 | __ret_324; \ | |
| 44743 | 46479 | }) |
| 44744 | 46480 | #endif |
| 44745 | 46481 | |
| 44746 | 46482 | #endif |
| 44747 | 46483 | #if defined(__ARM_FEATURE_QRDMX) && defined(__aarch64__) |
| 44748 | 46484 | #ifdef __LITTLE_ENDIAN__ |
| 44749 | #define vqrdmlahq_laneq_s32(__p0_233, __p1_233, __p2_233, __p3_233) __extension__ ({ \ | |
| 44750 | int32x4_t __s0_233 = __p0_233; \ | |
| 44751 | int32x4_t __s1_233 = __p1_233; \ | |
| 44752 | int32x4_t __s2_233 = __p2_233; \ | |
| 44753 | int32x4_t __ret_233; \ | |
| 44754 | __ret_233 = vqaddq_s32(__s0_233, vqrdmulhq_s32(__s1_233, splatq_laneq_s32(__s2_233, __p3_233))); \ | |
| 44755 | __ret_233; \ | |
| 46485 | #define vqrdmlahq_laneq_s32(__p0_325, __p1_325, __p2_325, __p3_325) __extension__ ({ \ | |
| 46486 | int32x4_t __s0_325 = __p0_325; \ | |
| 46487 | int32x4_t __s1_325 = __p1_325; \ | |
| 46488 | int32x4_t __s2_325 = __p2_325; \ | |
| 46489 | int32x4_t __ret_325; \ | |
| 46490 | __ret_325 = vqaddq_s32(__s0_325, vqrdmulhq_s32(__s1_325, splatq_laneq_s32(__s2_325, __p3_325))); \ | |
| 46491 | __ret_325; \ | |
| 44756 | 46492 | }) |
| 44757 | 46493 | #else |
| 44758 | #define vqrdmlahq_laneq_s32(__p0_234, __p1_234, __p2_234, __p3_234) __extension__ ({ \ | |
| 44759 | int32x4_t __s0_234 = __p0_234; \ | |
| 44760 | int32x4_t __s1_234 = __p1_234; \ | |
| 44761 | int32x4_t __s2_234 = __p2_234; \ | |
| 44762 | int32x4_t __rev0_234; __rev0_234 = __builtin_shufflevector(__s0_234, __s0_234, 3, 2, 1, 0); \ | |
| 44763 | int32x4_t __rev1_234; __rev1_234 = __builtin_shufflevector(__s1_234, __s1_234, 3, 2, 1, 0); \ | |
| 44764 | int32x4_t __rev2_234; __rev2_234 = __builtin_shufflevector(__s2_234, __s2_234, 3, 2, 1, 0); \ | |
| 44765 | int32x4_t __ret_234; \ | |
| 44766 | __ret_234 = __noswap_vqaddq_s32(__rev0_234, __noswap_vqrdmulhq_s32(__rev1_234, __noswap_splatq_laneq_s32(__rev2_234, __p3_234))); \ | |
| 44767 | __ret_234 = __builtin_shufflevector(__ret_234, __ret_234, 3, 2, 1, 0); \ | |
| 44768 | __ret_234; \ | |
| 46494 | #define vqrdmlahq_laneq_s32(__p0_326, __p1_326, __p2_326, __p3_326) __extension__ ({ \ | |
| 46495 | int32x4_t __s0_326 = __p0_326; \ | |
| 46496 | int32x4_t __s1_326 = __p1_326; \ | |
| 46497 | int32x4_t __s2_326 = __p2_326; \ | |
| 46498 | int32x4_t __rev0_326; __rev0_326 = __builtin_shufflevector(__s0_326, __s0_326, 3, 2, 1, 0); \ | |
| 46499 | int32x4_t __rev1_326; __rev1_326 = __builtin_shufflevector(__s1_326, __s1_326, 3, 2, 1, 0); \ | |
| 46500 | int32x4_t __rev2_326; __rev2_326 = __builtin_shufflevector(__s2_326, __s2_326, 3, 2, 1, 0); \ | |
| 46501 | int32x4_t __ret_326; \ | |
| 46502 | __ret_326 = __noswap_vqaddq_s32(__rev0_326, __noswap_vqrdmulhq_s32(__rev1_326, __noswap_splatq_laneq_s32(__rev2_326, __p3_326))); \ | |
| 46503 | __ret_326 = __builtin_shufflevector(__ret_326, __ret_326, 3, 2, 1, 0); \ | |
| 46504 | __ret_326; \ | |
| 44769 | 46505 | }) |
| 44770 | 46506 | #endif |
| 44771 | 46507 | |
| 44772 | 46508 | #ifdef __LITTLE_ENDIAN__ |
| 44773 | #define vqrdmlahq_laneq_s16(__p0_235, __p1_235, __p2_235, __p3_235) __extension__ ({ \ | |
| 44774 | int16x8_t __s0_235 = __p0_235; \ | |
| 44775 | int16x8_t __s1_235 = __p1_235; \ | |
| 44776 | int16x8_t __s2_235 = __p2_235; \ | |
| 44777 | int16x8_t __ret_235; \ | |
| 44778 | __ret_235 = vqaddq_s16(__s0_235, vqrdmulhq_s16(__s1_235, splatq_laneq_s16(__s2_235, __p3_235))); \ | |
| 44779 | __ret_235; \ | |
| 46509 | #define vqrdmlahq_laneq_s16(__p0_327, __p1_327, __p2_327, __p3_327) __extension__ ({ \ | |
| 46510 | int16x8_t __s0_327 = __p0_327; \ | |
| 46511 | int16x8_t __s1_327 = __p1_327; \ | |
| 46512 | int16x8_t __s2_327 = __p2_327; \ | |
| 46513 | int16x8_t __ret_327; \ | |
| 46514 | __ret_327 = vqaddq_s16(__s0_327, vqrdmulhq_s16(__s1_327, splatq_laneq_s16(__s2_327, __p3_327))); \ | |
| 46515 | __ret_327; \ | |
| 44780 | 46516 | }) |
| 44781 | 46517 | #else |
| 44782 | #define vqrdmlahq_laneq_s16(__p0_236, __p1_236, __p2_236, __p3_236) __extension__ ({ \ | |
| 44783 | int16x8_t __s0_236 = __p0_236; \ | |
| 44784 | int16x8_t __s1_236 = __p1_236; \ | |
| 44785 | int16x8_t __s2_236 = __p2_236; \ | |
| 44786 | int16x8_t __rev0_236; __rev0_236 = __builtin_shufflevector(__s0_236, __s0_236, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44787 | int16x8_t __rev1_236; __rev1_236 = __builtin_shufflevector(__s1_236, __s1_236, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44788 | int16x8_t __rev2_236; __rev2_236 = __builtin_shufflevector(__s2_236, __s2_236, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44789 | int16x8_t __ret_236; \ | |
| 44790 | __ret_236 = __noswap_vqaddq_s16(__rev0_236, __noswap_vqrdmulhq_s16(__rev1_236, __noswap_splatq_laneq_s16(__rev2_236, __p3_236))); \ | |
| 44791 | __ret_236 = __builtin_shufflevector(__ret_236, __ret_236, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44792 | __ret_236; \ | |
| 46518 | #define vqrdmlahq_laneq_s16(__p0_328, __p1_328, __p2_328, __p3_328) __extension__ ({ \ | |
| 46519 | int16x8_t __s0_328 = __p0_328; \ | |
| 46520 | int16x8_t __s1_328 = __p1_328; \ | |
| 46521 | int16x8_t __s2_328 = __p2_328; \ | |
| 46522 | int16x8_t __rev0_328; __rev0_328 = __builtin_shufflevector(__s0_328, __s0_328, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46523 | int16x8_t __rev1_328; __rev1_328 = __builtin_shufflevector(__s1_328, __s1_328, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46524 | int16x8_t __rev2_328; __rev2_328 = __builtin_shufflevector(__s2_328, __s2_328, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46525 | int16x8_t __ret_328; \ | |
| 46526 | __ret_328 = __noswap_vqaddq_s16(__rev0_328, __noswap_vqrdmulhq_s16(__rev1_328, __noswap_splatq_laneq_s16(__rev2_328, __p3_328))); \ | |
| 46527 | __ret_328 = __builtin_shufflevector(__ret_328, __ret_328, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46528 | __ret_328; \ | |
| 44793 | 46529 | }) |
| 44794 | 46530 | #endif |
| 44795 | 46531 | |
| 44796 | 46532 | #ifdef __LITTLE_ENDIAN__ |
| 44797 | #define vqrdmlah_laneq_s32(__p0_237, __p1_237, __p2_237, __p3_237) __extension__ ({ \ | |
| 44798 | int32x2_t __s0_237 = __p0_237; \ | |
| 44799 | int32x2_t __s1_237 = __p1_237; \ | |
| 44800 | int32x4_t __s2_237 = __p2_237; \ | |
| 44801 | int32x2_t __ret_237; \ | |
| 44802 | __ret_237 = vqadd_s32(__s0_237, vqrdmulh_s32(__s1_237, splat_laneq_s32(__s2_237, __p3_237))); \ | |
| 44803 | __ret_237; \ | |
| 46533 | #define vqrdmlah_laneq_s32(__p0_329, __p1_329, __p2_329, __p3_329) __extension__ ({ \ | |
| 46534 | int32x2_t __s0_329 = __p0_329; \ | |
| 46535 | int32x2_t __s1_329 = __p1_329; \ | |
| 46536 | int32x4_t __s2_329 = __p2_329; \ | |
| 46537 | int32x2_t __ret_329; \ | |
| 46538 | __ret_329 = vqadd_s32(__s0_329, vqrdmulh_s32(__s1_329, splat_laneq_s32(__s2_329, __p3_329))); \ | |
| 46539 | __ret_329; \ | |
| 44804 | 46540 | }) |
| 44805 | 46541 | #else |
| 44806 | #define vqrdmlah_laneq_s32(__p0_238, __p1_238, __p2_238, __p3_238) __extension__ ({ \ | |
| 44807 | int32x2_t __s0_238 = __p0_238; \ | |
| 44808 | int32x2_t __s1_238 = __p1_238; \ | |
| 44809 | int32x4_t __s2_238 = __p2_238; \ | |
| 44810 | int32x2_t __rev0_238; __rev0_238 = __builtin_shufflevector(__s0_238, __s0_238, 1, 0); \ | |
| 44811 | int32x2_t __rev1_238; __rev1_238 = __builtin_shufflevector(__s1_238, __s1_238, 1, 0); \ | |
| 44812 | int32x4_t __rev2_238; __rev2_238 = __builtin_shufflevector(__s2_238, __s2_238, 3, 2, 1, 0); \ | |
| 44813 | int32x2_t __ret_238; \ | |
| 44814 | __ret_238 = __noswap_vqadd_s32(__rev0_238, __noswap_vqrdmulh_s32(__rev1_238, __noswap_splat_laneq_s32(__rev2_238, __p3_238))); \ | |
| 44815 | __ret_238 = __builtin_shufflevector(__ret_238, __ret_238, 1, 0); \ | |
| 44816 | __ret_238; \ | |
| 46542 | #define vqrdmlah_laneq_s32(__p0_330, __p1_330, __p2_330, __p3_330) __extension__ ({ \ | |
| 46543 | int32x2_t __s0_330 = __p0_330; \ | |
| 46544 | int32x2_t __s1_330 = __p1_330; \ | |
| 46545 | int32x4_t __s2_330 = __p2_330; \ | |
| 46546 | int32x2_t __rev0_330; __rev0_330 = __builtin_shufflevector(__s0_330, __s0_330, 1, 0); \ | |
| 46547 | int32x2_t __rev1_330; __rev1_330 = __builtin_shufflevector(__s1_330, __s1_330, 1, 0); \ | |
| 46548 | int32x4_t __rev2_330; __rev2_330 = __builtin_shufflevector(__s2_330, __s2_330, 3, 2, 1, 0); \ | |
| 46549 | int32x2_t __ret_330; \ | |
| 46550 | __ret_330 = __noswap_vqadd_s32(__rev0_330, __noswap_vqrdmulh_s32(__rev1_330, __noswap_splat_laneq_s32(__rev2_330, __p3_330))); \ | |
| 46551 | __ret_330 = __builtin_shufflevector(__ret_330, __ret_330, 1, 0); \ | |
| 46552 | __ret_330; \ | |
| 44817 | 46553 | }) |
| 44818 | 46554 | #endif |
| 44819 | 46555 | |
| 44820 | 46556 | #ifdef __LITTLE_ENDIAN__ |
| 44821 | #define vqrdmlah_laneq_s16(__p0_239, __p1_239, __p2_239, __p3_239) __extension__ ({ \ | |
| 44822 | int16x4_t __s0_239 = __p0_239; \ | |
| 44823 | int16x4_t __s1_239 = __p1_239; \ | |
| 44824 | int16x8_t __s2_239 = __p2_239; \ | |
| 44825 | int16x4_t __ret_239; \ | |
| 44826 | __ret_239 = vqadd_s16(__s0_239, vqrdmulh_s16(__s1_239, splat_laneq_s16(__s2_239, __p3_239))); \ | |
| 44827 | __ret_239; \ | |
| 46557 | #define vqrdmlah_laneq_s16(__p0_331, __p1_331, __p2_331, __p3_331) __extension__ ({ \ | |
| 46558 | int16x4_t __s0_331 = __p0_331; \ | |
| 46559 | int16x4_t __s1_331 = __p1_331; \ | |
| 46560 | int16x8_t __s2_331 = __p2_331; \ | |
| 46561 | int16x4_t __ret_331; \ | |
| 46562 | __ret_331 = vqadd_s16(__s0_331, vqrdmulh_s16(__s1_331, splat_laneq_s16(__s2_331, __p3_331))); \ | |
| 46563 | __ret_331; \ | |
| 44828 | 46564 | }) |
| 44829 | 46565 | #else |
| 44830 | #define vqrdmlah_laneq_s16(__p0_240, __p1_240, __p2_240, __p3_240) __extension__ ({ \ | |
| 44831 | int16x4_t __s0_240 = __p0_240; \ | |
| 44832 | int16x4_t __s1_240 = __p1_240; \ | |
| 44833 | int16x8_t __s2_240 = __p2_240; \ | |
| 44834 | int16x4_t __rev0_240; __rev0_240 = __builtin_shufflevector(__s0_240, __s0_240, 3, 2, 1, 0); \ | |
| 44835 | int16x4_t __rev1_240; __rev1_240 = __builtin_shufflevector(__s1_240, __s1_240, 3, 2, 1, 0); \ | |
| 44836 | int16x8_t __rev2_240; __rev2_240 = __builtin_shufflevector(__s2_240, __s2_240, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44837 | int16x4_t __ret_240; \ | |
| 44838 | __ret_240 = __noswap_vqadd_s16(__rev0_240, __noswap_vqrdmulh_s16(__rev1_240, __noswap_splat_laneq_s16(__rev2_240, __p3_240))); \ | |
| 44839 | __ret_240 = __builtin_shufflevector(__ret_240, __ret_240, 3, 2, 1, 0); \ | |
| 44840 | __ret_240; \ | |
| 46566 | #define vqrdmlah_laneq_s16(__p0_332, __p1_332, __p2_332, __p3_332) __extension__ ({ \ | |
| 46567 | int16x4_t __s0_332 = __p0_332; \ | |
| 46568 | int16x4_t __s1_332 = __p1_332; \ | |
| 46569 | int16x8_t __s2_332 = __p2_332; \ | |
| 46570 | int16x4_t __rev0_332; __rev0_332 = __builtin_shufflevector(__s0_332, __s0_332, 3, 2, 1, 0); \ | |
| 46571 | int16x4_t __rev1_332; __rev1_332 = __builtin_shufflevector(__s1_332, __s1_332, 3, 2, 1, 0); \ | |
| 46572 | int16x8_t __rev2_332; __rev2_332 = __builtin_shufflevector(__s2_332, __s2_332, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46573 | int16x4_t __ret_332; \ | |
| 46574 | __ret_332 = __noswap_vqadd_s16(__rev0_332, __noswap_vqrdmulh_s16(__rev1_332, __noswap_splat_laneq_s16(__rev2_332, __p3_332))); \ | |
| 46575 | __ret_332 = __builtin_shufflevector(__ret_332, __ret_332, 3, 2, 1, 0); \ | |
| 46576 | __ret_332; \ | |
| 44841 | 46577 | }) |
| 44842 | 46578 | #endif |
| 44843 | 46579 | |
| 44844 | 46580 | #ifdef __LITTLE_ENDIAN__ |
| 44845 | #define vqrdmlshq_laneq_s32(__p0_241, __p1_241, __p2_241, __p3_241) __extension__ ({ \ | |
| 44846 | int32x4_t __s0_241 = __p0_241; \ | |
| 44847 | int32x4_t __s1_241 = __p1_241; \ | |
| 44848 | int32x4_t __s2_241 = __p2_241; \ | |
| 44849 | int32x4_t __ret_241; \ | |
| 44850 | __ret_241 = vqsubq_s32(__s0_241, vqrdmulhq_s32(__s1_241, splatq_laneq_s32(__s2_241, __p3_241))); \ | |
| 44851 | __ret_241; \ | |
| 46581 | #define vqrdmlshq_laneq_s32(__p0_333, __p1_333, __p2_333, __p3_333) __extension__ ({ \ | |
| 46582 | int32x4_t __s0_333 = __p0_333; \ | |
| 46583 | int32x4_t __s1_333 = __p1_333; \ | |
| 46584 | int32x4_t __s2_333 = __p2_333; \ | |
| 46585 | int32x4_t __ret_333; \ | |
| 46586 | __ret_333 = vqsubq_s32(__s0_333, vqrdmulhq_s32(__s1_333, splatq_laneq_s32(__s2_333, __p3_333))); \ | |
| 46587 | __ret_333; \ | |
| 44852 | 46588 | }) |
| 44853 | 46589 | #else |
| 44854 | #define vqrdmlshq_laneq_s32(__p0_242, __p1_242, __p2_242, __p3_242) __extension__ ({ \ | |
| 44855 | int32x4_t __s0_242 = __p0_242; \ | |
| 44856 | int32x4_t __s1_242 = __p1_242; \ | |
| 44857 | int32x4_t __s2_242 = __p2_242; \ | |
| 44858 | int32x4_t __rev0_242; __rev0_242 = __builtin_shufflevector(__s0_242, __s0_242, 3, 2, 1, 0); \ | |
| 44859 | int32x4_t __rev1_242; __rev1_242 = __builtin_shufflevector(__s1_242, __s1_242, 3, 2, 1, 0); \ | |
| 44860 | int32x4_t __rev2_242; __rev2_242 = __builtin_shufflevector(__s2_242, __s2_242, 3, 2, 1, 0); \ | |
| 44861 | int32x4_t __ret_242; \ | |
| 44862 | __ret_242 = __noswap_vqsubq_s32(__rev0_242, __noswap_vqrdmulhq_s32(__rev1_242, __noswap_splatq_laneq_s32(__rev2_242, __p3_242))); \ | |
| 44863 | __ret_242 = __builtin_shufflevector(__ret_242, __ret_242, 3, 2, 1, 0); \ | |
| 44864 | __ret_242; \ | |
| 46590 | #define vqrdmlshq_laneq_s32(__p0_334, __p1_334, __p2_334, __p3_334) __extension__ ({ \ | |
| 46591 | int32x4_t __s0_334 = __p0_334; \ | |
| 46592 | int32x4_t __s1_334 = __p1_334; \ | |
| 46593 | int32x4_t __s2_334 = __p2_334; \ | |
| 46594 | int32x4_t __rev0_334; __rev0_334 = __builtin_shufflevector(__s0_334, __s0_334, 3, 2, 1, 0); \ | |
| 46595 | int32x4_t __rev1_334; __rev1_334 = __builtin_shufflevector(__s1_334, __s1_334, 3, 2, 1, 0); \ | |
| 46596 | int32x4_t __rev2_334; __rev2_334 = __builtin_shufflevector(__s2_334, __s2_334, 3, 2, 1, 0); \ | |
| 46597 | int32x4_t __ret_334; \ | |
| 46598 | __ret_334 = __noswap_vqsubq_s32(__rev0_334, __noswap_vqrdmulhq_s32(__rev1_334, __noswap_splatq_laneq_s32(__rev2_334, __p3_334))); \ | |
| 46599 | __ret_334 = __builtin_shufflevector(__ret_334, __ret_334, 3, 2, 1, 0); \ | |
| 46600 | __ret_334; \ | |
| 44865 | 46601 | }) |
| 44866 | 46602 | #endif |
| 44867 | 46603 | |
| 44868 | 46604 | #ifdef __LITTLE_ENDIAN__ |
| 44869 | #define vqrdmlshq_laneq_s16(__p0_243, __p1_243, __p2_243, __p3_243) __extension__ ({ \ | |
| 44870 | int16x8_t __s0_243 = __p0_243; \ | |
| 44871 | int16x8_t __s1_243 = __p1_243; \ | |
| 44872 | int16x8_t __s2_243 = __p2_243; \ | |
| 44873 | int16x8_t __ret_243; \ | |
| 44874 | __ret_243 = vqsubq_s16(__s0_243, vqrdmulhq_s16(__s1_243, splatq_laneq_s16(__s2_243, __p3_243))); \ | |
| 44875 | __ret_243; \ | |
| 46605 | #define vqrdmlshq_laneq_s16(__p0_335, __p1_335, __p2_335, __p3_335) __extension__ ({ \ | |
| 46606 | int16x8_t __s0_335 = __p0_335; \ | |
| 46607 | int16x8_t __s1_335 = __p1_335; \ | |
| 46608 | int16x8_t __s2_335 = __p2_335; \ | |
| 46609 | int16x8_t __ret_335; \ | |
| 46610 | __ret_335 = vqsubq_s16(__s0_335, vqrdmulhq_s16(__s1_335, splatq_laneq_s16(__s2_335, __p3_335))); \ | |
| 46611 | __ret_335; \ | |
| 44876 | 46612 | }) |
| 44877 | 46613 | #else |
| 44878 | #define vqrdmlshq_laneq_s16(__p0_244, __p1_244, __p2_244, __p3_244) __extension__ ({ \ | |
| 44879 | int16x8_t __s0_244 = __p0_244; \ | |
| 44880 | int16x8_t __s1_244 = __p1_244; \ | |
| 44881 | int16x8_t __s2_244 = __p2_244; \ | |
| 44882 | int16x8_t __rev0_244; __rev0_244 = __builtin_shufflevector(__s0_244, __s0_244, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44883 | int16x8_t __rev1_244; __rev1_244 = __builtin_shufflevector(__s1_244, __s1_244, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44884 | int16x8_t __rev2_244; __rev2_244 = __builtin_shufflevector(__s2_244, __s2_244, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44885 | int16x8_t __ret_244; \ | |
| 44886 | __ret_244 = __noswap_vqsubq_s16(__rev0_244, __noswap_vqrdmulhq_s16(__rev1_244, __noswap_splatq_laneq_s16(__rev2_244, __p3_244))); \ | |
| 44887 | __ret_244 = __builtin_shufflevector(__ret_244, __ret_244, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44888 | __ret_244; \ | |
| 46614 | #define vqrdmlshq_laneq_s16(__p0_336, __p1_336, __p2_336, __p3_336) __extension__ ({ \ | |
| 46615 | int16x8_t __s0_336 = __p0_336; \ | |
| 46616 | int16x8_t __s1_336 = __p1_336; \ | |
| 46617 | int16x8_t __s2_336 = __p2_336; \ | |
| 46618 | int16x8_t __rev0_336; __rev0_336 = __builtin_shufflevector(__s0_336, __s0_336, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46619 | int16x8_t __rev1_336; __rev1_336 = __builtin_shufflevector(__s1_336, __s1_336, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46620 | int16x8_t __rev2_336; __rev2_336 = __builtin_shufflevector(__s2_336, __s2_336, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46621 | int16x8_t __ret_336; \ | |
| 46622 | __ret_336 = __noswap_vqsubq_s16(__rev0_336, __noswap_vqrdmulhq_s16(__rev1_336, __noswap_splatq_laneq_s16(__rev2_336, __p3_336))); \ | |
| 46623 | __ret_336 = __builtin_shufflevector(__ret_336, __ret_336, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46624 | __ret_336; \ | |
| 44889 | 46625 | }) |
| 44890 | 46626 | #endif |
| 44891 | 46627 | |
| 44892 | 46628 | #ifdef __LITTLE_ENDIAN__ |
| 44893 | #define vqrdmlsh_laneq_s32(__p0_245, __p1_245, __p2_245, __p3_245) __extension__ ({ \ | |
| 44894 | int32x2_t __s0_245 = __p0_245; \ | |
| 44895 | int32x2_t __s1_245 = __p1_245; \ | |
| 44896 | int32x4_t __s2_245 = __p2_245; \ | |
| 44897 | int32x2_t __ret_245; \ | |
| 44898 | __ret_245 = vqsub_s32(__s0_245, vqrdmulh_s32(__s1_245, splat_laneq_s32(__s2_245, __p3_245))); \ | |
| 44899 | __ret_245; \ | |
| 46629 | #define vqrdmlsh_laneq_s32(__p0_337, __p1_337, __p2_337, __p3_337) __extension__ ({ \ | |
| 46630 | int32x2_t __s0_337 = __p0_337; \ | |
| 46631 | int32x2_t __s1_337 = __p1_337; \ | |
| 46632 | int32x4_t __s2_337 = __p2_337; \ | |
| 46633 | int32x2_t __ret_337; \ | |
| 46634 | __ret_337 = vqsub_s32(__s0_337, vqrdmulh_s32(__s1_337, splat_laneq_s32(__s2_337, __p3_337))); \ | |
| 46635 | __ret_337; \ | |
| 44900 | 46636 | }) |
| 44901 | 46637 | #else |
| 44902 | #define vqrdmlsh_laneq_s32(__p0_246, __p1_246, __p2_246, __p3_246) __extension__ ({ \ | |
| 44903 | int32x2_t __s0_246 = __p0_246; \ | |
| 44904 | int32x2_t __s1_246 = __p1_246; \ | |
| 44905 | int32x4_t __s2_246 = __p2_246; \ | |
| 44906 | int32x2_t __rev0_246; __rev0_246 = __builtin_shufflevector(__s0_246, __s0_246, 1, 0); \ | |
| 44907 | int32x2_t __rev1_246; __rev1_246 = __builtin_shufflevector(__s1_246, __s1_246, 1, 0); \ | |
| 44908 | int32x4_t __rev2_246; __rev2_246 = __builtin_shufflevector(__s2_246, __s2_246, 3, 2, 1, 0); \ | |
| 44909 | int32x2_t __ret_246; \ | |
| 44910 | __ret_246 = __noswap_vqsub_s32(__rev0_246, __noswap_vqrdmulh_s32(__rev1_246, __noswap_splat_laneq_s32(__rev2_246, __p3_246))); \ | |
| 44911 | __ret_246 = __builtin_shufflevector(__ret_246, __ret_246, 1, 0); \ | |
| 44912 | __ret_246; \ | |
| 46638 | #define vqrdmlsh_laneq_s32(__p0_338, __p1_338, __p2_338, __p3_338) __extension__ ({ \ | |
| 46639 | int32x2_t __s0_338 = __p0_338; \ | |
| 46640 | int32x2_t __s1_338 = __p1_338; \ | |
| 46641 | int32x4_t __s2_338 = __p2_338; \ | |
| 46642 | int32x2_t __rev0_338; __rev0_338 = __builtin_shufflevector(__s0_338, __s0_338, 1, 0); \ | |
| 46643 | int32x2_t __rev1_338; __rev1_338 = __builtin_shufflevector(__s1_338, __s1_338, 1, 0); \ | |
| 46644 | int32x4_t __rev2_338; __rev2_338 = __builtin_shufflevector(__s2_338, __s2_338, 3, 2, 1, 0); \ | |
| 46645 | int32x2_t __ret_338; \ | |
| 46646 | __ret_338 = __noswap_vqsub_s32(__rev0_338, __noswap_vqrdmulh_s32(__rev1_338, __noswap_splat_laneq_s32(__rev2_338, __p3_338))); \ | |
| 46647 | __ret_338 = __builtin_shufflevector(__ret_338, __ret_338, 1, 0); \ | |
| 46648 | __ret_338; \ | |
| 44913 | 46649 | }) |
| 44914 | 46650 | #endif |
| 44915 | 46651 | |
| 44916 | 46652 | #ifdef __LITTLE_ENDIAN__ |
| 44917 | #define vqrdmlsh_laneq_s16(__p0_247, __p1_247, __p2_247, __p3_247) __extension__ ({ \ | |
| 44918 | int16x4_t __s0_247 = __p0_247; \ | |
| 44919 | int16x4_t __s1_247 = __p1_247; \ | |
| 44920 | int16x8_t __s2_247 = __p2_247; \ | |
| 44921 | int16x4_t __ret_247; \ | |
| 44922 | __ret_247 = vqsub_s16(__s0_247, vqrdmulh_s16(__s1_247, splat_laneq_s16(__s2_247, __p3_247))); \ | |
| 44923 | __ret_247; \ | |
| 46653 | #define vqrdmlsh_laneq_s16(__p0_339, __p1_339, __p2_339, __p3_339) __extension__ ({ \ | |
| 46654 | int16x4_t __s0_339 = __p0_339; \ | |
| 46655 | int16x4_t __s1_339 = __p1_339; \ | |
| 46656 | int16x8_t __s2_339 = __p2_339; \ | |
| 46657 | int16x4_t __ret_339; \ | |
| 46658 | __ret_339 = vqsub_s16(__s0_339, vqrdmulh_s16(__s1_339, splat_laneq_s16(__s2_339, __p3_339))); \ | |
| 46659 | __ret_339; \ | |
| 44924 | 46660 | }) |
| 44925 | 46661 | #else |
| 44926 | #define vqrdmlsh_laneq_s16(__p0_248, __p1_248, __p2_248, __p3_248) __extension__ ({ \ | |
| 44927 | int16x4_t __s0_248 = __p0_248; \ | |
| 44928 | int16x4_t __s1_248 = __p1_248; \ | |
| 44929 | int16x8_t __s2_248 = __p2_248; \ | |
| 44930 | int16x4_t __rev0_248; __rev0_248 = __builtin_shufflevector(__s0_248, __s0_248, 3, 2, 1, 0); \ | |
| 44931 | int16x4_t __rev1_248; __rev1_248 = __builtin_shufflevector(__s1_248, __s1_248, 3, 2, 1, 0); \ | |
| 44932 | int16x8_t __rev2_248; __rev2_248 = __builtin_shufflevector(__s2_248, __s2_248, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 44933 | int16x4_t __ret_248; \ | |
| 44934 | __ret_248 = __noswap_vqsub_s16(__rev0_248, __noswap_vqrdmulh_s16(__rev1_248, __noswap_splat_laneq_s16(__rev2_248, __p3_248))); \ | |
| 44935 | __ret_248 = __builtin_shufflevector(__ret_248, __ret_248, 3, 2, 1, 0); \ | |
| 44936 | __ret_248; \ | |
| 46662 | #define vqrdmlsh_laneq_s16(__p0_340, __p1_340, __p2_340, __p3_340) __extension__ ({ \ | |
| 46663 | int16x4_t __s0_340 = __p0_340; \ | |
| 46664 | int16x4_t __s1_340 = __p1_340; \ | |
| 46665 | int16x8_t __s2_340 = __p2_340; \ | |
| 46666 | int16x4_t __rev0_340; __rev0_340 = __builtin_shufflevector(__s0_340, __s0_340, 3, 2, 1, 0); \ | |
| 46667 | int16x4_t __rev1_340; __rev1_340 = __builtin_shufflevector(__s1_340, __s1_340, 3, 2, 1, 0); \ | |
| 46668 | int16x8_t __rev2_340; __rev2_340 = __builtin_shufflevector(__s2_340, __s2_340, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 46669 | int16x4_t __ret_340; \ | |
| 46670 | __ret_340 = __noswap_vqsub_s16(__rev0_340, __noswap_vqrdmulh_s16(__rev1_340, __noswap_splat_laneq_s16(__rev2_340, __p3_340))); \ | |
| 46671 | __ret_340 = __builtin_shufflevector(__ret_340, __ret_340, 3, 2, 1, 0); \ | |
| 46672 | __ret_340; \ | |
| 44937 | 46673 | }) |
| 44938 | 46674 | #endif |
| 44939 | 46675 | |
| ... | ... | @@ -45860,9 +47596,9 @@ __ai uint64_t vceqd_u64(uint64_t __p0, uint64_t __p1) { |
| 45860 | 47596 | __ret = (uint64_t) __builtin_neon_vceqd_u64(__p0, __p1); |
| 45861 | 47597 | return __ret; |
| 45862 | 47598 | } |
| 45863 | __ai int64_t vceqd_s64(int64_t __p0, int64_t __p1) { | |
| 45864 | int64_t __ret; | |
| 45865 | __ret = (int64_t) __builtin_neon_vceqd_s64(__p0, __p1); | |
| 47599 | __ai uint64_t vceqd_s64(int64_t __p0, int64_t __p1) { | |
| 47600 | uint64_t __ret; | |
| 47601 | __ret = (uint64_t) __builtin_neon_vceqd_s64(__p0, __p1); | |
| 45866 | 47602 | return __ret; |
| 45867 | 47603 | } |
| 45868 | 47604 | __ai uint64_t vceqd_f64(float64_t __p0, float64_t __p1) { |
| ... | ... | @@ -45881,37 +47617,21 @@ __ai uint8x8_t vceqz_p8(poly8x8_t __p0) { |
| 45881 | 47617 | __ret = (uint8x8_t) __builtin_neon_vceqz_v((int8x8_t)__p0, 16); |
| 45882 | 47618 | return __ret; |
| 45883 | 47619 | } |
| 45884 | #else | |
| 45885 | __ai uint8x8_t vceqz_p8(poly8x8_t __p0) { | |
| 45886 | poly8x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 45887 | uint8x8_t __ret; | |
| 45888 | __ret = (uint8x8_t) __builtin_neon_vceqz_v((int8x8_t)__rev0, 16); | |
| 45889 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 45890 | return __ret; | |
| 45891 | } | |
| 45892 | #endif | |
| 45893 | ||
| 45894 | __ai uint64x1_t vceqz_p64(poly64x1_t __p0) { | |
| 45895 | uint64x1_t __ret; | |
| 45896 | __ret = (uint64x1_t) __builtin_neon_vceqz_v((int8x8_t)__p0, 19); | |
| 45897 | return __ret; | |
| 45898 | } | |
| 45899 | #ifdef __LITTLE_ENDIAN__ | |
| 45900 | __ai uint16x4_t vceqz_p16(poly16x4_t __p0) { | |
| 45901 | uint16x4_t __ret; | |
| 45902 | __ret = (uint16x4_t) __builtin_neon_vceqz_v((int8x8_t)__p0, 17); | |
| 45903 | return __ret; | |
| 45904 | } | |
| 45905 | #else | |
| 45906 | __ai uint16x4_t vceqz_p16(poly16x4_t __p0) { | |
| 45907 | poly16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 45908 | uint16x4_t __ret; | |
| 45909 | __ret = (uint16x4_t) __builtin_neon_vceqz_v((int8x8_t)__rev0, 17); | |
| 45910 | __ret = __builtin_shufflevector(__ret, __ret, 3, 2, 1, 0); | |
| 47620 | #else | |
| 47621 | __ai uint8x8_t vceqz_p8(poly8x8_t __p0) { | |
| 47622 | poly8x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 47623 | uint8x8_t __ret; | |
| 47624 | __ret = (uint8x8_t) __builtin_neon_vceqz_v((int8x8_t)__rev0, 16); | |
| 47625 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 45911 | 47626 | return __ret; |
| 45912 | 47627 | } |
| 45913 | 47628 | #endif |
| 45914 | 47629 | |
| 47630 | __ai uint64x1_t vceqz_p64(poly64x1_t __p0) { | |
| 47631 | uint64x1_t __ret; | |
| 47632 | __ret = (uint64x1_t) __builtin_neon_vceqz_v((int8x8_t)__p0, 19); | |
| 47633 | return __ret; | |
| 47634 | } | |
| 45915 | 47635 | #ifdef __LITTLE_ENDIAN__ |
| 45916 | 47636 | __ai uint8x16_t vceqzq_p8(poly8x16_t __p0) { |
| 45917 | 47637 | uint8x16_t __ret; |
| ... | ... | @@ -45944,22 +47664,6 @@ __ai uint64x2_t vceqzq_p64(poly64x2_t __p0) { |
| 45944 | 47664 | } |
| 45945 | 47665 | #endif |
| 45946 | 47666 | |
| 45947 | #ifdef __LITTLE_ENDIAN__ | |
| 45948 | __ai uint16x8_t vceqzq_p16(poly16x8_t __p0) { | |
| 45949 | uint16x8_t __ret; | |
| 45950 | __ret = (uint16x8_t) __builtin_neon_vceqzq_v((int8x16_t)__p0, 49); | |
| 45951 | return __ret; | |
| 45952 | } | |
| 45953 | #else | |
| 45954 | __ai uint16x8_t vceqzq_p16(poly16x8_t __p0) { | |
| 45955 | poly16x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 45956 | uint16x8_t __ret; | |
| 45957 | __ret = (uint16x8_t) __builtin_neon_vceqzq_v((int8x16_t)__rev0, 49); | |
| 45958 | __ret = __builtin_shufflevector(__ret, __ret, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 45959 | return __ret; | |
| 45960 | } | |
| 45961 | #endif | |
| 45962 | ||
| 45963 | 47667 | #ifdef __LITTLE_ENDIAN__ |
| 45964 | 47668 | __ai uint8x16_t vceqzq_u8(uint8x16_t __p0) { |
| 45965 | 47669 | uint8x16_t __ret; |
| ... | ... | @@ -46252,9 +47956,9 @@ __ai uint64_t vceqzd_u64(uint64_t __p0) { |
| 46252 | 47956 | __ret = (uint64_t) __builtin_neon_vceqzd_u64(__p0); |
| 46253 | 47957 | return __ret; |
| 46254 | 47958 | } |
| 46255 | __ai int64_t vceqzd_s64(int64_t __p0) { | |
| 46256 | int64_t __ret; | |
| 46257 | __ret = (int64_t) __builtin_neon_vceqzd_s64(__p0); | |
| 47959 | __ai uint64_t vceqzd_s64(int64_t __p0) { | |
| 47960 | uint64_t __ret; | |
| 47961 | __ret = (uint64_t) __builtin_neon_vceqzd_s64(__p0); | |
| 46258 | 47962 | return __ret; |
| 46259 | 47963 | } |
| 46260 | 47964 | __ai uint64_t vceqzd_f64(float64_t __p0) { |
| ... | ... | @@ -46333,9 +48037,9 @@ __ai uint64x1_t vcge_s64(int64x1_t __p0, int64x1_t __p1) { |
| 46333 | 48037 | __ret = (uint64x1_t)(__p0 >= __p1); |
| 46334 | 48038 | return __ret; |
| 46335 | 48039 | } |
| 46336 | __ai int64_t vcged_s64(int64_t __p0, int64_t __p1) { | |
| 46337 | int64_t __ret; | |
| 46338 | __ret = (int64_t) __builtin_neon_vcged_s64(__p0, __p1); | |
| 48040 | __ai uint64_t vcged_s64(int64_t __p0, int64_t __p1) { | |
| 48041 | uint64_t __ret; | |
| 48042 | __ret = (uint64_t) __builtin_neon_vcged_s64(__p0, __p1); | |
| 46339 | 48043 | return __ret; |
| 46340 | 48044 | } |
| 46341 | 48045 | __ai uint64_t vcged_u64(uint64_t __p0, uint64_t __p1) { |
| ... | ... | @@ -46523,9 +48227,9 @@ __ai uint16x4_t vcgez_s16(int16x4_t __p0) { |
| 46523 | 48227 | } |
| 46524 | 48228 | #endif |
| 46525 | 48229 | |
| 46526 | __ai int64_t vcgezd_s64(int64_t __p0) { | |
| 46527 | int64_t __ret; | |
| 46528 | __ret = (int64_t) __builtin_neon_vcgezd_s64(__p0); | |
| 48230 | __ai uint64_t vcgezd_s64(int64_t __p0) { | |
| 48231 | uint64_t __ret; | |
| 48232 | __ret = (uint64_t) __builtin_neon_vcgezd_s64(__p0); | |
| 46529 | 48233 | return __ret; |
| 46530 | 48234 | } |
| 46531 | 48235 | __ai uint64_t vcgezd_f64(float64_t __p0) { |
| ... | ... | @@ -46604,9 +48308,9 @@ __ai uint64x1_t vcgt_s64(int64x1_t __p0, int64x1_t __p1) { |
| 46604 | 48308 | __ret = (uint64x1_t)(__p0 > __p1); |
| 46605 | 48309 | return __ret; |
| 46606 | 48310 | } |
| 46607 | __ai int64_t vcgtd_s64(int64_t __p0, int64_t __p1) { | |
| 46608 | int64_t __ret; | |
| 46609 | __ret = (int64_t) __builtin_neon_vcgtd_s64(__p0, __p1); | |
| 48311 | __ai uint64_t vcgtd_s64(int64_t __p0, int64_t __p1) { | |
| 48312 | uint64_t __ret; | |
| 48313 | __ret = (uint64_t) __builtin_neon_vcgtd_s64(__p0, __p1); | |
| 46610 | 48314 | return __ret; |
| 46611 | 48315 | } |
| 46612 | 48316 | __ai uint64_t vcgtd_u64(uint64_t __p0, uint64_t __p1) { |
| ... | ... | @@ -46794,9 +48498,9 @@ __ai uint16x4_t vcgtz_s16(int16x4_t __p0) { |
| 46794 | 48498 | } |
| 46795 | 48499 | #endif |
| 46796 | 48500 | |
| 46797 | __ai int64_t vcgtzd_s64(int64_t __p0) { | |
| 46798 | int64_t __ret; | |
| 46799 | __ret = (int64_t) __builtin_neon_vcgtzd_s64(__p0); | |
| 48501 | __ai uint64_t vcgtzd_s64(int64_t __p0) { | |
| 48502 | uint64_t __ret; | |
| 48503 | __ret = (uint64_t) __builtin_neon_vcgtzd_s64(__p0); | |
| 46800 | 48504 | return __ret; |
| 46801 | 48505 | } |
| 46802 | 48506 | __ai uint64_t vcgtzd_f64(float64_t __p0) { |
| ... | ... | @@ -46880,9 +48584,9 @@ __ai uint64_t vcled_u64(uint64_t __p0, uint64_t __p1) { |
| 46880 | 48584 | __ret = (uint64_t) __builtin_neon_vcled_u64(__p0, __p1); |
| 46881 | 48585 | return __ret; |
| 46882 | 48586 | } |
| 46883 | __ai int64_t vcled_s64(int64_t __p0, int64_t __p1) { | |
| 46884 | int64_t __ret; | |
| 46885 | __ret = (int64_t) __builtin_neon_vcled_s64(__p0, __p1); | |
| 48587 | __ai uint64_t vcled_s64(int64_t __p0, int64_t __p1) { | |
| 48588 | uint64_t __ret; | |
| 48589 | __ret = (uint64_t) __builtin_neon_vcled_s64(__p0, __p1); | |
| 46886 | 48590 | return __ret; |
| 46887 | 48591 | } |
| 46888 | 48592 | __ai uint64_t vcled_f64(float64_t __p0, float64_t __p1) { |
| ... | ... | @@ -47065,9 +48769,9 @@ __ai uint16x4_t vclez_s16(int16x4_t __p0) { |
| 47065 | 48769 | } |
| 47066 | 48770 | #endif |
| 47067 | 48771 | |
| 47068 | __ai int64_t vclezd_s64(int64_t __p0) { | |
| 47069 | int64_t __ret; | |
| 47070 | __ret = (int64_t) __builtin_neon_vclezd_s64(__p0); | |
| 48772 | __ai uint64_t vclezd_s64(int64_t __p0) { | |
| 48773 | uint64_t __ret; | |
| 48774 | __ret = (uint64_t) __builtin_neon_vclezd_s64(__p0); | |
| 47071 | 48775 | return __ret; |
| 47072 | 48776 | } |
| 47073 | 48777 | __ai uint64_t vclezd_f64(float64_t __p0) { |
| ... | ... | @@ -47151,9 +48855,9 @@ __ai uint64_t vcltd_u64(uint64_t __p0, uint64_t __p1) { |
| 47151 | 48855 | __ret = (uint64_t) __builtin_neon_vcltd_u64(__p0, __p1); |
| 47152 | 48856 | return __ret; |
| 47153 | 48857 | } |
| 47154 | __ai int64_t vcltd_s64(int64_t __p0, int64_t __p1) { | |
| 47155 | int64_t __ret; | |
| 47156 | __ret = (int64_t) __builtin_neon_vcltd_s64(__p0, __p1); | |
| 48858 | __ai uint64_t vcltd_s64(int64_t __p0, int64_t __p1) { | |
| 48859 | uint64_t __ret; | |
| 48860 | __ret = (uint64_t) __builtin_neon_vcltd_s64(__p0, __p1); | |
| 47157 | 48861 | return __ret; |
| 47158 | 48862 | } |
| 47159 | 48863 | __ai uint64_t vcltd_f64(float64_t __p0, float64_t __p1) { |
| ... | ... | @@ -47336,9 +49040,9 @@ __ai uint16x4_t vcltz_s16(int16x4_t __p0) { |
| 47336 | 49040 | } |
| 47337 | 49041 | #endif |
| 47338 | 49042 | |
| 47339 | __ai int64_t vcltzd_s64(int64_t __p0) { | |
| 47340 | int64_t __ret; | |
| 47341 | __ret = (int64_t) __builtin_neon_vcltzd_s64(__p0); | |
| 49043 | __ai uint64_t vcltzd_s64(int64_t __p0) { | |
| 49044 | uint64_t __ret; | |
| 49045 | __ret = (uint64_t) __builtin_neon_vcltzd_s64(__p0); | |
| 47342 | 49046 | return __ret; |
| 47343 | 49047 | } |
| 47344 | 49048 | __ai uint64_t vcltzd_f64(float64_t __p0) { |
| ... | ... | @@ -47382,892 +49086,892 @@ __ai float64x2_t vcombine_f64(float64x1_t __p0, float64x1_t __p1) { |
| 47382 | 49086 | #endif |
| 47383 | 49087 | |
| 47384 | 49088 | #ifdef __LITTLE_ENDIAN__ |
| 47385 | #define vcopyq_lane_p8(__p0_249, __p1_249, __p2_249, __p3_249) __extension__ ({ \ | |
| 47386 | poly8x16_t __s0_249 = __p0_249; \ | |
| 47387 | poly8x8_t __s2_249 = __p2_249; \ | |
| 47388 | poly8x16_t __ret_249; \ | |
| 47389 | __ret_249 = vsetq_lane_p8(vget_lane_p8(__s2_249, __p3_249), __s0_249, __p1_249); \ | |
| 47390 | __ret_249; \ | |
| 49089 | #define vcopyq_lane_p8(__p0_341, __p1_341, __p2_341, __p3_341) __extension__ ({ \ | |
| 49090 | poly8x16_t __s0_341 = __p0_341; \ | |
| 49091 | poly8x8_t __s2_341 = __p2_341; \ | |
| 49092 | poly8x16_t __ret_341; \ | |
| 49093 | __ret_341 = vsetq_lane_p8(vget_lane_p8(__s2_341, __p3_341), __s0_341, __p1_341); \ | |
| 49094 | __ret_341; \ | |
| 47391 | 49095 | }) |
| 47392 | 49096 | #else |
| 47393 | #define vcopyq_lane_p8(__p0_250, __p1_250, __p2_250, __p3_250) __extension__ ({ \ | |
| 47394 | poly8x16_t __s0_250 = __p0_250; \ | |
| 47395 | poly8x8_t __s2_250 = __p2_250; \ | |
| 47396 | poly8x16_t __rev0_250; __rev0_250 = __builtin_shufflevector(__s0_250, __s0_250, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47397 | poly8x8_t __rev2_250; __rev2_250 = __builtin_shufflevector(__s2_250, __s2_250, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47398 | poly8x16_t __ret_250; \ | |
| 47399 | __ret_250 = __noswap_vsetq_lane_p8(__noswap_vget_lane_p8(__rev2_250, __p3_250), __rev0_250, __p1_250); \ | |
| 47400 | __ret_250 = __builtin_shufflevector(__ret_250, __ret_250, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47401 | __ret_250; \ | |
| 49097 | #define vcopyq_lane_p8(__p0_342, __p1_342, __p2_342, __p3_342) __extension__ ({ \ | |
| 49098 | poly8x16_t __s0_342 = __p0_342; \ | |
| 49099 | poly8x8_t __s2_342 = __p2_342; \ | |
| 49100 | poly8x16_t __rev0_342; __rev0_342 = __builtin_shufflevector(__s0_342, __s0_342, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49101 | poly8x8_t __rev2_342; __rev2_342 = __builtin_shufflevector(__s2_342, __s2_342, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49102 | poly8x16_t __ret_342; \ | |
| 49103 | __ret_342 = __noswap_vsetq_lane_p8(__noswap_vget_lane_p8(__rev2_342, __p3_342), __rev0_342, __p1_342); \ | |
| 49104 | __ret_342 = __builtin_shufflevector(__ret_342, __ret_342, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49105 | __ret_342; \ | |
| 47402 | 49106 | }) |
| 47403 | 49107 | #endif |
| 47404 | 49108 | |
| 47405 | 49109 | #ifdef __LITTLE_ENDIAN__ |
| 47406 | #define vcopyq_lane_p16(__p0_251, __p1_251, __p2_251, __p3_251) __extension__ ({ \ | |
| 47407 | poly16x8_t __s0_251 = __p0_251; \ | |
| 47408 | poly16x4_t __s2_251 = __p2_251; \ | |
| 47409 | poly16x8_t __ret_251; \ | |
| 47410 | __ret_251 = vsetq_lane_p16(vget_lane_p16(__s2_251, __p3_251), __s0_251, __p1_251); \ | |
| 47411 | __ret_251; \ | |
| 49110 | #define vcopyq_lane_p16(__p0_343, __p1_343, __p2_343, __p3_343) __extension__ ({ \ | |
| 49111 | poly16x8_t __s0_343 = __p0_343; \ | |
| 49112 | poly16x4_t __s2_343 = __p2_343; \ | |
| 49113 | poly16x8_t __ret_343; \ | |
| 49114 | __ret_343 = vsetq_lane_p16(vget_lane_p16(__s2_343, __p3_343), __s0_343, __p1_343); \ | |
| 49115 | __ret_343; \ | |
| 47412 | 49116 | }) |
| 47413 | 49117 | #else |
| 47414 | #define vcopyq_lane_p16(__p0_252, __p1_252, __p2_252, __p3_252) __extension__ ({ \ | |
| 47415 | poly16x8_t __s0_252 = __p0_252; \ | |
| 47416 | poly16x4_t __s2_252 = __p2_252; \ | |
| 47417 | poly16x8_t __rev0_252; __rev0_252 = __builtin_shufflevector(__s0_252, __s0_252, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47418 | poly16x4_t __rev2_252; __rev2_252 = __builtin_shufflevector(__s2_252, __s2_252, 3, 2, 1, 0); \ | |
| 47419 | poly16x8_t __ret_252; \ | |
| 47420 | __ret_252 = __noswap_vsetq_lane_p16(__noswap_vget_lane_p16(__rev2_252, __p3_252), __rev0_252, __p1_252); \ | |
| 47421 | __ret_252 = __builtin_shufflevector(__ret_252, __ret_252, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47422 | __ret_252; \ | |
| 49118 | #define vcopyq_lane_p16(__p0_344, __p1_344, __p2_344, __p3_344) __extension__ ({ \ | |
| 49119 | poly16x8_t __s0_344 = __p0_344; \ | |
| 49120 | poly16x4_t __s2_344 = __p2_344; \ | |
| 49121 | poly16x8_t __rev0_344; __rev0_344 = __builtin_shufflevector(__s0_344, __s0_344, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49122 | poly16x4_t __rev2_344; __rev2_344 = __builtin_shufflevector(__s2_344, __s2_344, 3, 2, 1, 0); \ | |
| 49123 | poly16x8_t __ret_344; \ | |
| 49124 | __ret_344 = __noswap_vsetq_lane_p16(__noswap_vget_lane_p16(__rev2_344, __p3_344), __rev0_344, __p1_344); \ | |
| 49125 | __ret_344 = __builtin_shufflevector(__ret_344, __ret_344, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49126 | __ret_344; \ | |
| 47423 | 49127 | }) |
| 47424 | 49128 | #endif |
| 47425 | 49129 | |
| 47426 | 49130 | #ifdef __LITTLE_ENDIAN__ |
| 47427 | #define vcopyq_lane_u8(__p0_253, __p1_253, __p2_253, __p3_253) __extension__ ({ \ | |
| 47428 | uint8x16_t __s0_253 = __p0_253; \ | |
| 47429 | uint8x8_t __s2_253 = __p2_253; \ | |
| 47430 | uint8x16_t __ret_253; \ | |
| 47431 | __ret_253 = vsetq_lane_u8(vget_lane_u8(__s2_253, __p3_253), __s0_253, __p1_253); \ | |
| 47432 | __ret_253; \ | |
| 49131 | #define vcopyq_lane_u8(__p0_345, __p1_345, __p2_345, __p3_345) __extension__ ({ \ | |
| 49132 | uint8x16_t __s0_345 = __p0_345; \ | |
| 49133 | uint8x8_t __s2_345 = __p2_345; \ | |
| 49134 | uint8x16_t __ret_345; \ | |
| 49135 | __ret_345 = vsetq_lane_u8(vget_lane_u8(__s2_345, __p3_345), __s0_345, __p1_345); \ | |
| 49136 | __ret_345; \ | |
| 47433 | 49137 | }) |
| 47434 | 49138 | #else |
| 47435 | #define vcopyq_lane_u8(__p0_254, __p1_254, __p2_254, __p3_254) __extension__ ({ \ | |
| 47436 | uint8x16_t __s0_254 = __p0_254; \ | |
| 47437 | uint8x8_t __s2_254 = __p2_254; \ | |
| 47438 | uint8x16_t __rev0_254; __rev0_254 = __builtin_shufflevector(__s0_254, __s0_254, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47439 | uint8x8_t __rev2_254; __rev2_254 = __builtin_shufflevector(__s2_254, __s2_254, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47440 | uint8x16_t __ret_254; \ | |
| 47441 | __ret_254 = __noswap_vsetq_lane_u8(__noswap_vget_lane_u8(__rev2_254, __p3_254), __rev0_254, __p1_254); \ | |
| 47442 | __ret_254 = __builtin_shufflevector(__ret_254, __ret_254, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47443 | __ret_254; \ | |
| 49139 | #define vcopyq_lane_u8(__p0_346, __p1_346, __p2_346, __p3_346) __extension__ ({ \ | |
| 49140 | uint8x16_t __s0_346 = __p0_346; \ | |
| 49141 | uint8x8_t __s2_346 = __p2_346; \ | |
| 49142 | uint8x16_t __rev0_346; __rev0_346 = __builtin_shufflevector(__s0_346, __s0_346, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49143 | uint8x8_t __rev2_346; __rev2_346 = __builtin_shufflevector(__s2_346, __s2_346, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49144 | uint8x16_t __ret_346; \ | |
| 49145 | __ret_346 = __noswap_vsetq_lane_u8(__noswap_vget_lane_u8(__rev2_346, __p3_346), __rev0_346, __p1_346); \ | |
| 49146 | __ret_346 = __builtin_shufflevector(__ret_346, __ret_346, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49147 | __ret_346; \ | |
| 47444 | 49148 | }) |
| 47445 | 49149 | #endif |
| 47446 | 49150 | |
| 47447 | 49151 | #ifdef __LITTLE_ENDIAN__ |
| 47448 | #define vcopyq_lane_u32(__p0_255, __p1_255, __p2_255, __p3_255) __extension__ ({ \ | |
| 47449 | uint32x4_t __s0_255 = __p0_255; \ | |
| 47450 | uint32x2_t __s2_255 = __p2_255; \ | |
| 47451 | uint32x4_t __ret_255; \ | |
| 47452 | __ret_255 = vsetq_lane_u32(vget_lane_u32(__s2_255, __p3_255), __s0_255, __p1_255); \ | |
| 47453 | __ret_255; \ | |
| 49152 | #define vcopyq_lane_u32(__p0_347, __p1_347, __p2_347, __p3_347) __extension__ ({ \ | |
| 49153 | uint32x4_t __s0_347 = __p0_347; \ | |
| 49154 | uint32x2_t __s2_347 = __p2_347; \ | |
| 49155 | uint32x4_t __ret_347; \ | |
| 49156 | __ret_347 = vsetq_lane_u32(vget_lane_u32(__s2_347, __p3_347), __s0_347, __p1_347); \ | |
| 49157 | __ret_347; \ | |
| 47454 | 49158 | }) |
| 47455 | 49159 | #else |
| 47456 | #define vcopyq_lane_u32(__p0_256, __p1_256, __p2_256, __p3_256) __extension__ ({ \ | |
| 47457 | uint32x4_t __s0_256 = __p0_256; \ | |
| 47458 | uint32x2_t __s2_256 = __p2_256; \ | |
| 47459 | uint32x4_t __rev0_256; __rev0_256 = __builtin_shufflevector(__s0_256, __s0_256, 3, 2, 1, 0); \ | |
| 47460 | uint32x2_t __rev2_256; __rev2_256 = __builtin_shufflevector(__s2_256, __s2_256, 1, 0); \ | |
| 47461 | uint32x4_t __ret_256; \ | |
| 47462 | __ret_256 = __noswap_vsetq_lane_u32(__noswap_vget_lane_u32(__rev2_256, __p3_256), __rev0_256, __p1_256); \ | |
| 47463 | __ret_256 = __builtin_shufflevector(__ret_256, __ret_256, 3, 2, 1, 0); \ | |
| 47464 | __ret_256; \ | |
| 49160 | #define vcopyq_lane_u32(__p0_348, __p1_348, __p2_348, __p3_348) __extension__ ({ \ | |
| 49161 | uint32x4_t __s0_348 = __p0_348; \ | |
| 49162 | uint32x2_t __s2_348 = __p2_348; \ | |
| 49163 | uint32x4_t __rev0_348; __rev0_348 = __builtin_shufflevector(__s0_348, __s0_348, 3, 2, 1, 0); \ | |
| 49164 | uint32x2_t __rev2_348; __rev2_348 = __builtin_shufflevector(__s2_348, __s2_348, 1, 0); \ | |
| 49165 | uint32x4_t __ret_348; \ | |
| 49166 | __ret_348 = __noswap_vsetq_lane_u32(__noswap_vget_lane_u32(__rev2_348, __p3_348), __rev0_348, __p1_348); \ | |
| 49167 | __ret_348 = __builtin_shufflevector(__ret_348, __ret_348, 3, 2, 1, 0); \ | |
| 49168 | __ret_348; \ | |
| 47465 | 49169 | }) |
| 47466 | 49170 | #endif |
| 47467 | 49171 | |
| 47468 | 49172 | #ifdef __LITTLE_ENDIAN__ |
| 47469 | #define vcopyq_lane_u64(__p0_257, __p1_257, __p2_257, __p3_257) __extension__ ({ \ | |
| 47470 | uint64x2_t __s0_257 = __p0_257; \ | |
| 47471 | uint64x1_t __s2_257 = __p2_257; \ | |
| 47472 | uint64x2_t __ret_257; \ | |
| 47473 | __ret_257 = vsetq_lane_u64(vget_lane_u64(__s2_257, __p3_257), __s0_257, __p1_257); \ | |
| 47474 | __ret_257; \ | |
| 49173 | #define vcopyq_lane_u64(__p0_349, __p1_349, __p2_349, __p3_349) __extension__ ({ \ | |
| 49174 | uint64x2_t __s0_349 = __p0_349; \ | |
| 49175 | uint64x1_t __s2_349 = __p2_349; \ | |
| 49176 | uint64x2_t __ret_349; \ | |
| 49177 | __ret_349 = vsetq_lane_u64(vget_lane_u64(__s2_349, __p3_349), __s0_349, __p1_349); \ | |
| 49178 | __ret_349; \ | |
| 47475 | 49179 | }) |
| 47476 | 49180 | #else |
| 47477 | #define vcopyq_lane_u64(__p0_258, __p1_258, __p2_258, __p3_258) __extension__ ({ \ | |
| 47478 | uint64x2_t __s0_258 = __p0_258; \ | |
| 47479 | uint64x1_t __s2_258 = __p2_258; \ | |
| 47480 | uint64x2_t __rev0_258; __rev0_258 = __builtin_shufflevector(__s0_258, __s0_258, 1, 0); \ | |
| 47481 | uint64x2_t __ret_258; \ | |
| 47482 | __ret_258 = __noswap_vsetq_lane_u64(vget_lane_u64(__s2_258, __p3_258), __rev0_258, __p1_258); \ | |
| 47483 | __ret_258 = __builtin_shufflevector(__ret_258, __ret_258, 1, 0); \ | |
| 47484 | __ret_258; \ | |
| 49181 | #define vcopyq_lane_u64(__p0_350, __p1_350, __p2_350, __p3_350) __extension__ ({ \ | |
| 49182 | uint64x2_t __s0_350 = __p0_350; \ | |
| 49183 | uint64x1_t __s2_350 = __p2_350; \ | |
| 49184 | uint64x2_t __rev0_350; __rev0_350 = __builtin_shufflevector(__s0_350, __s0_350, 1, 0); \ | |
| 49185 | uint64x2_t __ret_350; \ | |
| 49186 | __ret_350 = __noswap_vsetq_lane_u64(vget_lane_u64(__s2_350, __p3_350), __rev0_350, __p1_350); \ | |
| 49187 | __ret_350 = __builtin_shufflevector(__ret_350, __ret_350, 1, 0); \ | |
| 49188 | __ret_350; \ | |
| 47485 | 49189 | }) |
| 47486 | 49190 | #endif |
| 47487 | 49191 | |
| 47488 | 49192 | #ifdef __LITTLE_ENDIAN__ |
| 47489 | #define vcopyq_lane_u16(__p0_259, __p1_259, __p2_259, __p3_259) __extension__ ({ \ | |
| 47490 | uint16x8_t __s0_259 = __p0_259; \ | |
| 47491 | uint16x4_t __s2_259 = __p2_259; \ | |
| 47492 | uint16x8_t __ret_259; \ | |
| 47493 | __ret_259 = vsetq_lane_u16(vget_lane_u16(__s2_259, __p3_259), __s0_259, __p1_259); \ | |
| 47494 | __ret_259; \ | |
| 49193 | #define vcopyq_lane_u16(__p0_351, __p1_351, __p2_351, __p3_351) __extension__ ({ \ | |
| 49194 | uint16x8_t __s0_351 = __p0_351; \ | |
| 49195 | uint16x4_t __s2_351 = __p2_351; \ | |
| 49196 | uint16x8_t __ret_351; \ | |
| 49197 | __ret_351 = vsetq_lane_u16(vget_lane_u16(__s2_351, __p3_351), __s0_351, __p1_351); \ | |
| 49198 | __ret_351; \ | |
| 47495 | 49199 | }) |
| 47496 | 49200 | #else |
| 47497 | #define vcopyq_lane_u16(__p0_260, __p1_260, __p2_260, __p3_260) __extension__ ({ \ | |
| 47498 | uint16x8_t __s0_260 = __p0_260; \ | |
| 47499 | uint16x4_t __s2_260 = __p2_260; \ | |
| 47500 | uint16x8_t __rev0_260; __rev0_260 = __builtin_shufflevector(__s0_260, __s0_260, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47501 | uint16x4_t __rev2_260; __rev2_260 = __builtin_shufflevector(__s2_260, __s2_260, 3, 2, 1, 0); \ | |
| 47502 | uint16x8_t __ret_260; \ | |
| 47503 | __ret_260 = __noswap_vsetq_lane_u16(__noswap_vget_lane_u16(__rev2_260, __p3_260), __rev0_260, __p1_260); \ | |
| 47504 | __ret_260 = __builtin_shufflevector(__ret_260, __ret_260, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47505 | __ret_260; \ | |
| 49201 | #define vcopyq_lane_u16(__p0_352, __p1_352, __p2_352, __p3_352) __extension__ ({ \ | |
| 49202 | uint16x8_t __s0_352 = __p0_352; \ | |
| 49203 | uint16x4_t __s2_352 = __p2_352; \ | |
| 49204 | uint16x8_t __rev0_352; __rev0_352 = __builtin_shufflevector(__s0_352, __s0_352, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49205 | uint16x4_t __rev2_352; __rev2_352 = __builtin_shufflevector(__s2_352, __s2_352, 3, 2, 1, 0); \ | |
| 49206 | uint16x8_t __ret_352; \ | |
| 49207 | __ret_352 = __noswap_vsetq_lane_u16(__noswap_vget_lane_u16(__rev2_352, __p3_352), __rev0_352, __p1_352); \ | |
| 49208 | __ret_352 = __builtin_shufflevector(__ret_352, __ret_352, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49209 | __ret_352; \ | |
| 47506 | 49210 | }) |
| 47507 | 49211 | #endif |
| 47508 | 49212 | |
| 47509 | 49213 | #ifdef __LITTLE_ENDIAN__ |
| 47510 | #define vcopyq_lane_s8(__p0_261, __p1_261, __p2_261, __p3_261) __extension__ ({ \ | |
| 47511 | int8x16_t __s0_261 = __p0_261; \ | |
| 47512 | int8x8_t __s2_261 = __p2_261; \ | |
| 47513 | int8x16_t __ret_261; \ | |
| 47514 | __ret_261 = vsetq_lane_s8(vget_lane_s8(__s2_261, __p3_261), __s0_261, __p1_261); \ | |
| 47515 | __ret_261; \ | |
| 49214 | #define vcopyq_lane_s8(__p0_353, __p1_353, __p2_353, __p3_353) __extension__ ({ \ | |
| 49215 | int8x16_t __s0_353 = __p0_353; \ | |
| 49216 | int8x8_t __s2_353 = __p2_353; \ | |
| 49217 | int8x16_t __ret_353; \ | |
| 49218 | __ret_353 = vsetq_lane_s8(vget_lane_s8(__s2_353, __p3_353), __s0_353, __p1_353); \ | |
| 49219 | __ret_353; \ | |
| 47516 | 49220 | }) |
| 47517 | 49221 | #else |
| 47518 | #define vcopyq_lane_s8(__p0_262, __p1_262, __p2_262, __p3_262) __extension__ ({ \ | |
| 47519 | int8x16_t __s0_262 = __p0_262; \ | |
| 47520 | int8x8_t __s2_262 = __p2_262; \ | |
| 47521 | int8x16_t __rev0_262; __rev0_262 = __builtin_shufflevector(__s0_262, __s0_262, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47522 | int8x8_t __rev2_262; __rev2_262 = __builtin_shufflevector(__s2_262, __s2_262, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47523 | int8x16_t __ret_262; \ | |
| 47524 | __ret_262 = __noswap_vsetq_lane_s8(__noswap_vget_lane_s8(__rev2_262, __p3_262), __rev0_262, __p1_262); \ | |
| 47525 | __ret_262 = __builtin_shufflevector(__ret_262, __ret_262, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47526 | __ret_262; \ | |
| 49222 | #define vcopyq_lane_s8(__p0_354, __p1_354, __p2_354, __p3_354) __extension__ ({ \ | |
| 49223 | int8x16_t __s0_354 = __p0_354; \ | |
| 49224 | int8x8_t __s2_354 = __p2_354; \ | |
| 49225 | int8x16_t __rev0_354; __rev0_354 = __builtin_shufflevector(__s0_354, __s0_354, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49226 | int8x8_t __rev2_354; __rev2_354 = __builtin_shufflevector(__s2_354, __s2_354, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49227 | int8x16_t __ret_354; \ | |
| 49228 | __ret_354 = __noswap_vsetq_lane_s8(__noswap_vget_lane_s8(__rev2_354, __p3_354), __rev0_354, __p1_354); \ | |
| 49229 | __ret_354 = __builtin_shufflevector(__ret_354, __ret_354, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49230 | __ret_354; \ | |
| 47527 | 49231 | }) |
| 47528 | 49232 | #endif |
| 47529 | 49233 | |
| 47530 | 49234 | #ifdef __LITTLE_ENDIAN__ |
| 47531 | #define vcopyq_lane_f32(__p0_263, __p1_263, __p2_263, __p3_263) __extension__ ({ \ | |
| 47532 | float32x4_t __s0_263 = __p0_263; \ | |
| 47533 | float32x2_t __s2_263 = __p2_263; \ | |
| 47534 | float32x4_t __ret_263; \ | |
| 47535 | __ret_263 = vsetq_lane_f32(vget_lane_f32(__s2_263, __p3_263), __s0_263, __p1_263); \ | |
| 47536 | __ret_263; \ | |
| 49235 | #define vcopyq_lane_f32(__p0_355, __p1_355, __p2_355, __p3_355) __extension__ ({ \ | |
| 49236 | float32x4_t __s0_355 = __p0_355; \ | |
| 49237 | float32x2_t __s2_355 = __p2_355; \ | |
| 49238 | float32x4_t __ret_355; \ | |
| 49239 | __ret_355 = vsetq_lane_f32(vget_lane_f32(__s2_355, __p3_355), __s0_355, __p1_355); \ | |
| 49240 | __ret_355; \ | |
| 47537 | 49241 | }) |
| 47538 | 49242 | #else |
| 47539 | #define vcopyq_lane_f32(__p0_264, __p1_264, __p2_264, __p3_264) __extension__ ({ \ | |
| 47540 | float32x4_t __s0_264 = __p0_264; \ | |
| 47541 | float32x2_t __s2_264 = __p2_264; \ | |
| 47542 | float32x4_t __rev0_264; __rev0_264 = __builtin_shufflevector(__s0_264, __s0_264, 3, 2, 1, 0); \ | |
| 47543 | float32x2_t __rev2_264; __rev2_264 = __builtin_shufflevector(__s2_264, __s2_264, 1, 0); \ | |
| 47544 | float32x4_t __ret_264; \ | |
| 47545 | __ret_264 = __noswap_vsetq_lane_f32(__noswap_vget_lane_f32(__rev2_264, __p3_264), __rev0_264, __p1_264); \ | |
| 47546 | __ret_264 = __builtin_shufflevector(__ret_264, __ret_264, 3, 2, 1, 0); \ | |
| 47547 | __ret_264; \ | |
| 49243 | #define vcopyq_lane_f32(__p0_356, __p1_356, __p2_356, __p3_356) __extension__ ({ \ | |
| 49244 | float32x4_t __s0_356 = __p0_356; \ | |
| 49245 | float32x2_t __s2_356 = __p2_356; \ | |
| 49246 | float32x4_t __rev0_356; __rev0_356 = __builtin_shufflevector(__s0_356, __s0_356, 3, 2, 1, 0); \ | |
| 49247 | float32x2_t __rev2_356; __rev2_356 = __builtin_shufflevector(__s2_356, __s2_356, 1, 0); \ | |
| 49248 | float32x4_t __ret_356; \ | |
| 49249 | __ret_356 = __noswap_vsetq_lane_f32(__noswap_vget_lane_f32(__rev2_356, __p3_356), __rev0_356, __p1_356); \ | |
| 49250 | __ret_356 = __builtin_shufflevector(__ret_356, __ret_356, 3, 2, 1, 0); \ | |
| 49251 | __ret_356; \ | |
| 47548 | 49252 | }) |
| 47549 | 49253 | #endif |
| 47550 | 49254 | |
| 47551 | 49255 | #ifdef __LITTLE_ENDIAN__ |
| 47552 | #define vcopyq_lane_s32(__p0_265, __p1_265, __p2_265, __p3_265) __extension__ ({ \ | |
| 47553 | int32x4_t __s0_265 = __p0_265; \ | |
| 47554 | int32x2_t __s2_265 = __p2_265; \ | |
| 47555 | int32x4_t __ret_265; \ | |
| 47556 | __ret_265 = vsetq_lane_s32(vget_lane_s32(__s2_265, __p3_265), __s0_265, __p1_265); \ | |
| 47557 | __ret_265; \ | |
| 49256 | #define vcopyq_lane_s32(__p0_357, __p1_357, __p2_357, __p3_357) __extension__ ({ \ | |
| 49257 | int32x4_t __s0_357 = __p0_357; \ | |
| 49258 | int32x2_t __s2_357 = __p2_357; \ | |
| 49259 | int32x4_t __ret_357; \ | |
| 49260 | __ret_357 = vsetq_lane_s32(vget_lane_s32(__s2_357, __p3_357), __s0_357, __p1_357); \ | |
| 49261 | __ret_357; \ | |
| 47558 | 49262 | }) |
| 47559 | 49263 | #else |
| 47560 | #define vcopyq_lane_s32(__p0_266, __p1_266, __p2_266, __p3_266) __extension__ ({ \ | |
| 47561 | int32x4_t __s0_266 = __p0_266; \ | |
| 47562 | int32x2_t __s2_266 = __p2_266; \ | |
| 47563 | int32x4_t __rev0_266; __rev0_266 = __builtin_shufflevector(__s0_266, __s0_266, 3, 2, 1, 0); \ | |
| 47564 | int32x2_t __rev2_266; __rev2_266 = __builtin_shufflevector(__s2_266, __s2_266, 1, 0); \ | |
| 47565 | int32x4_t __ret_266; \ | |
| 47566 | __ret_266 = __noswap_vsetq_lane_s32(__noswap_vget_lane_s32(__rev2_266, __p3_266), __rev0_266, __p1_266); \ | |
| 47567 | __ret_266 = __builtin_shufflevector(__ret_266, __ret_266, 3, 2, 1, 0); \ | |
| 47568 | __ret_266; \ | |
| 49264 | #define vcopyq_lane_s32(__p0_358, __p1_358, __p2_358, __p3_358) __extension__ ({ \ | |
| 49265 | int32x4_t __s0_358 = __p0_358; \ | |
| 49266 | int32x2_t __s2_358 = __p2_358; \ | |
| 49267 | int32x4_t __rev0_358; __rev0_358 = __builtin_shufflevector(__s0_358, __s0_358, 3, 2, 1, 0); \ | |
| 49268 | int32x2_t __rev2_358; __rev2_358 = __builtin_shufflevector(__s2_358, __s2_358, 1, 0); \ | |
| 49269 | int32x4_t __ret_358; \ | |
| 49270 | __ret_358 = __noswap_vsetq_lane_s32(__noswap_vget_lane_s32(__rev2_358, __p3_358), __rev0_358, __p1_358); \ | |
| 49271 | __ret_358 = __builtin_shufflevector(__ret_358, __ret_358, 3, 2, 1, 0); \ | |
| 49272 | __ret_358; \ | |
| 47569 | 49273 | }) |
| 47570 | 49274 | #endif |
| 47571 | 49275 | |
| 47572 | 49276 | #ifdef __LITTLE_ENDIAN__ |
| 47573 | #define vcopyq_lane_s64(__p0_267, __p1_267, __p2_267, __p3_267) __extension__ ({ \ | |
| 47574 | int64x2_t __s0_267 = __p0_267; \ | |
| 47575 | int64x1_t __s2_267 = __p2_267; \ | |
| 47576 | int64x2_t __ret_267; \ | |
| 47577 | __ret_267 = vsetq_lane_s64(vget_lane_s64(__s2_267, __p3_267), __s0_267, __p1_267); \ | |
| 47578 | __ret_267; \ | |
| 49277 | #define vcopyq_lane_s64(__p0_359, __p1_359, __p2_359, __p3_359) __extension__ ({ \ | |
| 49278 | int64x2_t __s0_359 = __p0_359; \ | |
| 49279 | int64x1_t __s2_359 = __p2_359; \ | |
| 49280 | int64x2_t __ret_359; \ | |
| 49281 | __ret_359 = vsetq_lane_s64(vget_lane_s64(__s2_359, __p3_359), __s0_359, __p1_359); \ | |
| 49282 | __ret_359; \ | |
| 47579 | 49283 | }) |
| 47580 | 49284 | #else |
| 47581 | #define vcopyq_lane_s64(__p0_268, __p1_268, __p2_268, __p3_268) __extension__ ({ \ | |
| 47582 | int64x2_t __s0_268 = __p0_268; \ | |
| 47583 | int64x1_t __s2_268 = __p2_268; \ | |
| 47584 | int64x2_t __rev0_268; __rev0_268 = __builtin_shufflevector(__s0_268, __s0_268, 1, 0); \ | |
| 47585 | int64x2_t __ret_268; \ | |
| 47586 | __ret_268 = __noswap_vsetq_lane_s64(vget_lane_s64(__s2_268, __p3_268), __rev0_268, __p1_268); \ | |
| 47587 | __ret_268 = __builtin_shufflevector(__ret_268, __ret_268, 1, 0); \ | |
| 47588 | __ret_268; \ | |
| 49285 | #define vcopyq_lane_s64(__p0_360, __p1_360, __p2_360, __p3_360) __extension__ ({ \ | |
| 49286 | int64x2_t __s0_360 = __p0_360; \ | |
| 49287 | int64x1_t __s2_360 = __p2_360; \ | |
| 49288 | int64x2_t __rev0_360; __rev0_360 = __builtin_shufflevector(__s0_360, __s0_360, 1, 0); \ | |
| 49289 | int64x2_t __ret_360; \ | |
| 49290 | __ret_360 = __noswap_vsetq_lane_s64(vget_lane_s64(__s2_360, __p3_360), __rev0_360, __p1_360); \ | |
| 49291 | __ret_360 = __builtin_shufflevector(__ret_360, __ret_360, 1, 0); \ | |
| 49292 | __ret_360; \ | |
| 47589 | 49293 | }) |
| 47590 | 49294 | #endif |
| 47591 | 49295 | |
| 47592 | 49296 | #ifdef __LITTLE_ENDIAN__ |
| 47593 | #define vcopyq_lane_s16(__p0_269, __p1_269, __p2_269, __p3_269) __extension__ ({ \ | |
| 47594 | int16x8_t __s0_269 = __p0_269; \ | |
| 47595 | int16x4_t __s2_269 = __p2_269; \ | |
| 47596 | int16x8_t __ret_269; \ | |
| 47597 | __ret_269 = vsetq_lane_s16(vget_lane_s16(__s2_269, __p3_269), __s0_269, __p1_269); \ | |
| 47598 | __ret_269; \ | |
| 49297 | #define vcopyq_lane_s16(__p0_361, __p1_361, __p2_361, __p3_361) __extension__ ({ \ | |
| 49298 | int16x8_t __s0_361 = __p0_361; \ | |
| 49299 | int16x4_t __s2_361 = __p2_361; \ | |
| 49300 | int16x8_t __ret_361; \ | |
| 49301 | __ret_361 = vsetq_lane_s16(vget_lane_s16(__s2_361, __p3_361), __s0_361, __p1_361); \ | |
| 49302 | __ret_361; \ | |
| 47599 | 49303 | }) |
| 47600 | 49304 | #else |
| 47601 | #define vcopyq_lane_s16(__p0_270, __p1_270, __p2_270, __p3_270) __extension__ ({ \ | |
| 47602 | int16x8_t __s0_270 = __p0_270; \ | |
| 47603 | int16x4_t __s2_270 = __p2_270; \ | |
| 47604 | int16x8_t __rev0_270; __rev0_270 = __builtin_shufflevector(__s0_270, __s0_270, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47605 | int16x4_t __rev2_270; __rev2_270 = __builtin_shufflevector(__s2_270, __s2_270, 3, 2, 1, 0); \ | |
| 47606 | int16x8_t __ret_270; \ | |
| 47607 | __ret_270 = __noswap_vsetq_lane_s16(__noswap_vget_lane_s16(__rev2_270, __p3_270), __rev0_270, __p1_270); \ | |
| 47608 | __ret_270 = __builtin_shufflevector(__ret_270, __ret_270, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47609 | __ret_270; \ | |
| 49305 | #define vcopyq_lane_s16(__p0_362, __p1_362, __p2_362, __p3_362) __extension__ ({ \ | |
| 49306 | int16x8_t __s0_362 = __p0_362; \ | |
| 49307 | int16x4_t __s2_362 = __p2_362; \ | |
| 49308 | int16x8_t __rev0_362; __rev0_362 = __builtin_shufflevector(__s0_362, __s0_362, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49309 | int16x4_t __rev2_362; __rev2_362 = __builtin_shufflevector(__s2_362, __s2_362, 3, 2, 1, 0); \ | |
| 49310 | int16x8_t __ret_362; \ | |
| 49311 | __ret_362 = __noswap_vsetq_lane_s16(__noswap_vget_lane_s16(__rev2_362, __p3_362), __rev0_362, __p1_362); \ | |
| 49312 | __ret_362 = __builtin_shufflevector(__ret_362, __ret_362, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49313 | __ret_362; \ | |
| 47610 | 49314 | }) |
| 47611 | 49315 | #endif |
| 47612 | 49316 | |
| 47613 | 49317 | #ifdef __LITTLE_ENDIAN__ |
| 47614 | #define vcopy_lane_p8(__p0_271, __p1_271, __p2_271, __p3_271) __extension__ ({ \ | |
| 47615 | poly8x8_t __s0_271 = __p0_271; \ | |
| 47616 | poly8x8_t __s2_271 = __p2_271; \ | |
| 47617 | poly8x8_t __ret_271; \ | |
| 47618 | __ret_271 = vset_lane_p8(vget_lane_p8(__s2_271, __p3_271), __s0_271, __p1_271); \ | |
| 47619 | __ret_271; \ | |
| 49318 | #define vcopy_lane_p8(__p0_363, __p1_363, __p2_363, __p3_363) __extension__ ({ \ | |
| 49319 | poly8x8_t __s0_363 = __p0_363; \ | |
| 49320 | poly8x8_t __s2_363 = __p2_363; \ | |
| 49321 | poly8x8_t __ret_363; \ | |
| 49322 | __ret_363 = vset_lane_p8(vget_lane_p8(__s2_363, __p3_363), __s0_363, __p1_363); \ | |
| 49323 | __ret_363; \ | |
| 47620 | 49324 | }) |
| 47621 | 49325 | #else |
| 47622 | #define vcopy_lane_p8(__p0_272, __p1_272, __p2_272, __p3_272) __extension__ ({ \ | |
| 47623 | poly8x8_t __s0_272 = __p0_272; \ | |
| 47624 | poly8x8_t __s2_272 = __p2_272; \ | |
| 47625 | poly8x8_t __rev0_272; __rev0_272 = __builtin_shufflevector(__s0_272, __s0_272, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47626 | poly8x8_t __rev2_272; __rev2_272 = __builtin_shufflevector(__s2_272, __s2_272, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47627 | poly8x8_t __ret_272; \ | |
| 47628 | __ret_272 = __noswap_vset_lane_p8(__noswap_vget_lane_p8(__rev2_272, __p3_272), __rev0_272, __p1_272); \ | |
| 47629 | __ret_272 = __builtin_shufflevector(__ret_272, __ret_272, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47630 | __ret_272; \ | |
| 49326 | #define vcopy_lane_p8(__p0_364, __p1_364, __p2_364, __p3_364) __extension__ ({ \ | |
| 49327 | poly8x8_t __s0_364 = __p0_364; \ | |
| 49328 | poly8x8_t __s2_364 = __p2_364; \ | |
| 49329 | poly8x8_t __rev0_364; __rev0_364 = __builtin_shufflevector(__s0_364, __s0_364, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49330 | poly8x8_t __rev2_364; __rev2_364 = __builtin_shufflevector(__s2_364, __s2_364, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49331 | poly8x8_t __ret_364; \ | |
| 49332 | __ret_364 = __noswap_vset_lane_p8(__noswap_vget_lane_p8(__rev2_364, __p3_364), __rev0_364, __p1_364); \ | |
| 49333 | __ret_364 = __builtin_shufflevector(__ret_364, __ret_364, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49334 | __ret_364; \ | |
| 47631 | 49335 | }) |
| 47632 | 49336 | #endif |
| 47633 | 49337 | |
| 47634 | 49338 | #ifdef __LITTLE_ENDIAN__ |
| 47635 | #define vcopy_lane_p16(__p0_273, __p1_273, __p2_273, __p3_273) __extension__ ({ \ | |
| 47636 | poly16x4_t __s0_273 = __p0_273; \ | |
| 47637 | poly16x4_t __s2_273 = __p2_273; \ | |
| 47638 | poly16x4_t __ret_273; \ | |
| 47639 | __ret_273 = vset_lane_p16(vget_lane_p16(__s2_273, __p3_273), __s0_273, __p1_273); \ | |
| 47640 | __ret_273; \ | |
| 49339 | #define vcopy_lane_p16(__p0_365, __p1_365, __p2_365, __p3_365) __extension__ ({ \ | |
| 49340 | poly16x4_t __s0_365 = __p0_365; \ | |
| 49341 | poly16x4_t __s2_365 = __p2_365; \ | |
| 49342 | poly16x4_t __ret_365; \ | |
| 49343 | __ret_365 = vset_lane_p16(vget_lane_p16(__s2_365, __p3_365), __s0_365, __p1_365); \ | |
| 49344 | __ret_365; \ | |
| 47641 | 49345 | }) |
| 47642 | 49346 | #else |
| 47643 | #define vcopy_lane_p16(__p0_274, __p1_274, __p2_274, __p3_274) __extension__ ({ \ | |
| 47644 | poly16x4_t __s0_274 = __p0_274; \ | |
| 47645 | poly16x4_t __s2_274 = __p2_274; \ | |
| 47646 | poly16x4_t __rev0_274; __rev0_274 = __builtin_shufflevector(__s0_274, __s0_274, 3, 2, 1, 0); \ | |
| 47647 | poly16x4_t __rev2_274; __rev2_274 = __builtin_shufflevector(__s2_274, __s2_274, 3, 2, 1, 0); \ | |
| 47648 | poly16x4_t __ret_274; \ | |
| 47649 | __ret_274 = __noswap_vset_lane_p16(__noswap_vget_lane_p16(__rev2_274, __p3_274), __rev0_274, __p1_274); \ | |
| 47650 | __ret_274 = __builtin_shufflevector(__ret_274, __ret_274, 3, 2, 1, 0); \ | |
| 47651 | __ret_274; \ | |
| 49347 | #define vcopy_lane_p16(__p0_366, __p1_366, __p2_366, __p3_366) __extension__ ({ \ | |
| 49348 | poly16x4_t __s0_366 = __p0_366; \ | |
| 49349 | poly16x4_t __s2_366 = __p2_366; \ | |
| 49350 | poly16x4_t __rev0_366; __rev0_366 = __builtin_shufflevector(__s0_366, __s0_366, 3, 2, 1, 0); \ | |
| 49351 | poly16x4_t __rev2_366; __rev2_366 = __builtin_shufflevector(__s2_366, __s2_366, 3, 2, 1, 0); \ | |
| 49352 | poly16x4_t __ret_366; \ | |
| 49353 | __ret_366 = __noswap_vset_lane_p16(__noswap_vget_lane_p16(__rev2_366, __p3_366), __rev0_366, __p1_366); \ | |
| 49354 | __ret_366 = __builtin_shufflevector(__ret_366, __ret_366, 3, 2, 1, 0); \ | |
| 49355 | __ret_366; \ | |
| 47652 | 49356 | }) |
| 47653 | 49357 | #endif |
| 47654 | 49358 | |
| 47655 | 49359 | #ifdef __LITTLE_ENDIAN__ |
| 47656 | #define vcopy_lane_u8(__p0_275, __p1_275, __p2_275, __p3_275) __extension__ ({ \ | |
| 47657 | uint8x8_t __s0_275 = __p0_275; \ | |
| 47658 | uint8x8_t __s2_275 = __p2_275; \ | |
| 47659 | uint8x8_t __ret_275; \ | |
| 47660 | __ret_275 = vset_lane_u8(vget_lane_u8(__s2_275, __p3_275), __s0_275, __p1_275); \ | |
| 47661 | __ret_275; \ | |
| 49360 | #define vcopy_lane_u8(__p0_367, __p1_367, __p2_367, __p3_367) __extension__ ({ \ | |
| 49361 | uint8x8_t __s0_367 = __p0_367; \ | |
| 49362 | uint8x8_t __s2_367 = __p2_367; \ | |
| 49363 | uint8x8_t __ret_367; \ | |
| 49364 | __ret_367 = vset_lane_u8(vget_lane_u8(__s2_367, __p3_367), __s0_367, __p1_367); \ | |
| 49365 | __ret_367; \ | |
| 47662 | 49366 | }) |
| 47663 | 49367 | #else |
| 47664 | #define vcopy_lane_u8(__p0_276, __p1_276, __p2_276, __p3_276) __extension__ ({ \ | |
| 47665 | uint8x8_t __s0_276 = __p0_276; \ | |
| 47666 | uint8x8_t __s2_276 = __p2_276; \ | |
| 47667 | uint8x8_t __rev0_276; __rev0_276 = __builtin_shufflevector(__s0_276, __s0_276, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47668 | uint8x8_t __rev2_276; __rev2_276 = __builtin_shufflevector(__s2_276, __s2_276, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47669 | uint8x8_t __ret_276; \ | |
| 47670 | __ret_276 = __noswap_vset_lane_u8(__noswap_vget_lane_u8(__rev2_276, __p3_276), __rev0_276, __p1_276); \ | |
| 47671 | __ret_276 = __builtin_shufflevector(__ret_276, __ret_276, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47672 | __ret_276; \ | |
| 49368 | #define vcopy_lane_u8(__p0_368, __p1_368, __p2_368, __p3_368) __extension__ ({ \ | |
| 49369 | uint8x8_t __s0_368 = __p0_368; \ | |
| 49370 | uint8x8_t __s2_368 = __p2_368; \ | |
| 49371 | uint8x8_t __rev0_368; __rev0_368 = __builtin_shufflevector(__s0_368, __s0_368, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49372 | uint8x8_t __rev2_368; __rev2_368 = __builtin_shufflevector(__s2_368, __s2_368, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49373 | uint8x8_t __ret_368; \ | |
| 49374 | __ret_368 = __noswap_vset_lane_u8(__noswap_vget_lane_u8(__rev2_368, __p3_368), __rev0_368, __p1_368); \ | |
| 49375 | __ret_368 = __builtin_shufflevector(__ret_368, __ret_368, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49376 | __ret_368; \ | |
| 47673 | 49377 | }) |
| 47674 | 49378 | #endif |
| 47675 | 49379 | |
| 47676 | 49380 | #ifdef __LITTLE_ENDIAN__ |
| 47677 | #define vcopy_lane_u32(__p0_277, __p1_277, __p2_277, __p3_277) __extension__ ({ \ | |
| 47678 | uint32x2_t __s0_277 = __p0_277; \ | |
| 47679 | uint32x2_t __s2_277 = __p2_277; \ | |
| 47680 | uint32x2_t __ret_277; \ | |
| 47681 | __ret_277 = vset_lane_u32(vget_lane_u32(__s2_277, __p3_277), __s0_277, __p1_277); \ | |
| 47682 | __ret_277; \ | |
| 49381 | #define vcopy_lane_u32(__p0_369, __p1_369, __p2_369, __p3_369) __extension__ ({ \ | |
| 49382 | uint32x2_t __s0_369 = __p0_369; \ | |
| 49383 | uint32x2_t __s2_369 = __p2_369; \ | |
| 49384 | uint32x2_t __ret_369; \ | |
| 49385 | __ret_369 = vset_lane_u32(vget_lane_u32(__s2_369, __p3_369), __s0_369, __p1_369); \ | |
| 49386 | __ret_369; \ | |
| 47683 | 49387 | }) |
| 47684 | 49388 | #else |
| 47685 | #define vcopy_lane_u32(__p0_278, __p1_278, __p2_278, __p3_278) __extension__ ({ \ | |
| 47686 | uint32x2_t __s0_278 = __p0_278; \ | |
| 47687 | uint32x2_t __s2_278 = __p2_278; \ | |
| 47688 | uint32x2_t __rev0_278; __rev0_278 = __builtin_shufflevector(__s0_278, __s0_278, 1, 0); \ | |
| 47689 | uint32x2_t __rev2_278; __rev2_278 = __builtin_shufflevector(__s2_278, __s2_278, 1, 0); \ | |
| 47690 | uint32x2_t __ret_278; \ | |
| 47691 | __ret_278 = __noswap_vset_lane_u32(__noswap_vget_lane_u32(__rev2_278, __p3_278), __rev0_278, __p1_278); \ | |
| 47692 | __ret_278 = __builtin_shufflevector(__ret_278, __ret_278, 1, 0); \ | |
| 47693 | __ret_278; \ | |
| 49389 | #define vcopy_lane_u32(__p0_370, __p1_370, __p2_370, __p3_370) __extension__ ({ \ | |
| 49390 | uint32x2_t __s0_370 = __p0_370; \ | |
| 49391 | uint32x2_t __s2_370 = __p2_370; \ | |
| 49392 | uint32x2_t __rev0_370; __rev0_370 = __builtin_shufflevector(__s0_370, __s0_370, 1, 0); \ | |
| 49393 | uint32x2_t __rev2_370; __rev2_370 = __builtin_shufflevector(__s2_370, __s2_370, 1, 0); \ | |
| 49394 | uint32x2_t __ret_370; \ | |
| 49395 | __ret_370 = __noswap_vset_lane_u32(__noswap_vget_lane_u32(__rev2_370, __p3_370), __rev0_370, __p1_370); \ | |
| 49396 | __ret_370 = __builtin_shufflevector(__ret_370, __ret_370, 1, 0); \ | |
| 49397 | __ret_370; \ | |
| 47694 | 49398 | }) |
| 47695 | 49399 | #endif |
| 47696 | 49400 | |
| 47697 | #define vcopy_lane_u64(__p0_279, __p1_279, __p2_279, __p3_279) __extension__ ({ \ | |
| 47698 | uint64x1_t __s0_279 = __p0_279; \ | |
| 47699 | uint64x1_t __s2_279 = __p2_279; \ | |
| 47700 | uint64x1_t __ret_279; \ | |
| 47701 | __ret_279 = vset_lane_u64(vget_lane_u64(__s2_279, __p3_279), __s0_279, __p1_279); \ | |
| 47702 | __ret_279; \ | |
| 49401 | #define vcopy_lane_u64(__p0_371, __p1_371, __p2_371, __p3_371) __extension__ ({ \ | |
| 49402 | uint64x1_t __s0_371 = __p0_371; \ | |
| 49403 | uint64x1_t __s2_371 = __p2_371; \ | |
| 49404 | uint64x1_t __ret_371; \ | |
| 49405 | __ret_371 = vset_lane_u64(vget_lane_u64(__s2_371, __p3_371), __s0_371, __p1_371); \ | |
| 49406 | __ret_371; \ | |
| 47703 | 49407 | }) |
| 47704 | 49408 | #ifdef __LITTLE_ENDIAN__ |
| 47705 | #define vcopy_lane_u16(__p0_280, __p1_280, __p2_280, __p3_280) __extension__ ({ \ | |
| 47706 | uint16x4_t __s0_280 = __p0_280; \ | |
| 47707 | uint16x4_t __s2_280 = __p2_280; \ | |
| 47708 | uint16x4_t __ret_280; \ | |
| 47709 | __ret_280 = vset_lane_u16(vget_lane_u16(__s2_280, __p3_280), __s0_280, __p1_280); \ | |
| 47710 | __ret_280; \ | |
| 49409 | #define vcopy_lane_u16(__p0_372, __p1_372, __p2_372, __p3_372) __extension__ ({ \ | |
| 49410 | uint16x4_t __s0_372 = __p0_372; \ | |
| 49411 | uint16x4_t __s2_372 = __p2_372; \ | |
| 49412 | uint16x4_t __ret_372; \ | |
| 49413 | __ret_372 = vset_lane_u16(vget_lane_u16(__s2_372, __p3_372), __s0_372, __p1_372); \ | |
| 49414 | __ret_372; \ | |
| 47711 | 49415 | }) |
| 47712 | 49416 | #else |
| 47713 | #define vcopy_lane_u16(__p0_281, __p1_281, __p2_281, __p3_281) __extension__ ({ \ | |
| 47714 | uint16x4_t __s0_281 = __p0_281; \ | |
| 47715 | uint16x4_t __s2_281 = __p2_281; \ | |
| 47716 | uint16x4_t __rev0_281; __rev0_281 = __builtin_shufflevector(__s0_281, __s0_281, 3, 2, 1, 0); \ | |
| 47717 | uint16x4_t __rev2_281; __rev2_281 = __builtin_shufflevector(__s2_281, __s2_281, 3, 2, 1, 0); \ | |
| 47718 | uint16x4_t __ret_281; \ | |
| 47719 | __ret_281 = __noswap_vset_lane_u16(__noswap_vget_lane_u16(__rev2_281, __p3_281), __rev0_281, __p1_281); \ | |
| 47720 | __ret_281 = __builtin_shufflevector(__ret_281, __ret_281, 3, 2, 1, 0); \ | |
| 47721 | __ret_281; \ | |
| 49417 | #define vcopy_lane_u16(__p0_373, __p1_373, __p2_373, __p3_373) __extension__ ({ \ | |
| 49418 | uint16x4_t __s0_373 = __p0_373; \ | |
| 49419 | uint16x4_t __s2_373 = __p2_373; \ | |
| 49420 | uint16x4_t __rev0_373; __rev0_373 = __builtin_shufflevector(__s0_373, __s0_373, 3, 2, 1, 0); \ | |
| 49421 | uint16x4_t __rev2_373; __rev2_373 = __builtin_shufflevector(__s2_373, __s2_373, 3, 2, 1, 0); \ | |
| 49422 | uint16x4_t __ret_373; \ | |
| 49423 | __ret_373 = __noswap_vset_lane_u16(__noswap_vget_lane_u16(__rev2_373, __p3_373), __rev0_373, __p1_373); \ | |
| 49424 | __ret_373 = __builtin_shufflevector(__ret_373, __ret_373, 3, 2, 1, 0); \ | |
| 49425 | __ret_373; \ | |
| 47722 | 49426 | }) |
| 47723 | 49427 | #endif |
| 47724 | 49428 | |
| 47725 | 49429 | #ifdef __LITTLE_ENDIAN__ |
| 47726 | #define vcopy_lane_s8(__p0_282, __p1_282, __p2_282, __p3_282) __extension__ ({ \ | |
| 47727 | int8x8_t __s0_282 = __p0_282; \ | |
| 47728 | int8x8_t __s2_282 = __p2_282; \ | |
| 47729 | int8x8_t __ret_282; \ | |
| 47730 | __ret_282 = vset_lane_s8(vget_lane_s8(__s2_282, __p3_282), __s0_282, __p1_282); \ | |
| 47731 | __ret_282; \ | |
| 49430 | #define vcopy_lane_s8(__p0_374, __p1_374, __p2_374, __p3_374) __extension__ ({ \ | |
| 49431 | int8x8_t __s0_374 = __p0_374; \ | |
| 49432 | int8x8_t __s2_374 = __p2_374; \ | |
| 49433 | int8x8_t __ret_374; \ | |
| 49434 | __ret_374 = vset_lane_s8(vget_lane_s8(__s2_374, __p3_374), __s0_374, __p1_374); \ | |
| 49435 | __ret_374; \ | |
| 47732 | 49436 | }) |
| 47733 | 49437 | #else |
| 47734 | #define vcopy_lane_s8(__p0_283, __p1_283, __p2_283, __p3_283) __extension__ ({ \ | |
| 47735 | int8x8_t __s0_283 = __p0_283; \ | |
| 47736 | int8x8_t __s2_283 = __p2_283; \ | |
| 47737 | int8x8_t __rev0_283; __rev0_283 = __builtin_shufflevector(__s0_283, __s0_283, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47738 | int8x8_t __rev2_283; __rev2_283 = __builtin_shufflevector(__s2_283, __s2_283, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47739 | int8x8_t __ret_283; \ | |
| 47740 | __ret_283 = __noswap_vset_lane_s8(__noswap_vget_lane_s8(__rev2_283, __p3_283), __rev0_283, __p1_283); \ | |
| 47741 | __ret_283 = __builtin_shufflevector(__ret_283, __ret_283, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47742 | __ret_283; \ | |
| 49438 | #define vcopy_lane_s8(__p0_375, __p1_375, __p2_375, __p3_375) __extension__ ({ \ | |
| 49439 | int8x8_t __s0_375 = __p0_375; \ | |
| 49440 | int8x8_t __s2_375 = __p2_375; \ | |
| 49441 | int8x8_t __rev0_375; __rev0_375 = __builtin_shufflevector(__s0_375, __s0_375, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49442 | int8x8_t __rev2_375; __rev2_375 = __builtin_shufflevector(__s2_375, __s2_375, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49443 | int8x8_t __ret_375; \ | |
| 49444 | __ret_375 = __noswap_vset_lane_s8(__noswap_vget_lane_s8(__rev2_375, __p3_375), __rev0_375, __p1_375); \ | |
| 49445 | __ret_375 = __builtin_shufflevector(__ret_375, __ret_375, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49446 | __ret_375; \ | |
| 47743 | 49447 | }) |
| 47744 | 49448 | #endif |
| 47745 | 49449 | |
| 47746 | 49450 | #ifdef __LITTLE_ENDIAN__ |
| 47747 | #define vcopy_lane_f32(__p0_284, __p1_284, __p2_284, __p3_284) __extension__ ({ \ | |
| 47748 | float32x2_t __s0_284 = __p0_284; \ | |
| 47749 | float32x2_t __s2_284 = __p2_284; \ | |
| 47750 | float32x2_t __ret_284; \ | |
| 47751 | __ret_284 = vset_lane_f32(vget_lane_f32(__s2_284, __p3_284), __s0_284, __p1_284); \ | |
| 47752 | __ret_284; \ | |
| 49451 | #define vcopy_lane_f32(__p0_376, __p1_376, __p2_376, __p3_376) __extension__ ({ \ | |
| 49452 | float32x2_t __s0_376 = __p0_376; \ | |
| 49453 | float32x2_t __s2_376 = __p2_376; \ | |
| 49454 | float32x2_t __ret_376; \ | |
| 49455 | __ret_376 = vset_lane_f32(vget_lane_f32(__s2_376, __p3_376), __s0_376, __p1_376); \ | |
| 49456 | __ret_376; \ | |
| 47753 | 49457 | }) |
| 47754 | 49458 | #else |
| 47755 | #define vcopy_lane_f32(__p0_285, __p1_285, __p2_285, __p3_285) __extension__ ({ \ | |
| 47756 | float32x2_t __s0_285 = __p0_285; \ | |
| 47757 | float32x2_t __s2_285 = __p2_285; \ | |
| 47758 | float32x2_t __rev0_285; __rev0_285 = __builtin_shufflevector(__s0_285, __s0_285, 1, 0); \ | |
| 47759 | float32x2_t __rev2_285; __rev2_285 = __builtin_shufflevector(__s2_285, __s2_285, 1, 0); \ | |
| 47760 | float32x2_t __ret_285; \ | |
| 47761 | __ret_285 = __noswap_vset_lane_f32(__noswap_vget_lane_f32(__rev2_285, __p3_285), __rev0_285, __p1_285); \ | |
| 47762 | __ret_285 = __builtin_shufflevector(__ret_285, __ret_285, 1, 0); \ | |
| 47763 | __ret_285; \ | |
| 49459 | #define vcopy_lane_f32(__p0_377, __p1_377, __p2_377, __p3_377) __extension__ ({ \ | |
| 49460 | float32x2_t __s0_377 = __p0_377; \ | |
| 49461 | float32x2_t __s2_377 = __p2_377; \ | |
| 49462 | float32x2_t __rev0_377; __rev0_377 = __builtin_shufflevector(__s0_377, __s0_377, 1, 0); \ | |
| 49463 | float32x2_t __rev2_377; __rev2_377 = __builtin_shufflevector(__s2_377, __s2_377, 1, 0); \ | |
| 49464 | float32x2_t __ret_377; \ | |
| 49465 | __ret_377 = __noswap_vset_lane_f32(__noswap_vget_lane_f32(__rev2_377, __p3_377), __rev0_377, __p1_377); \ | |
| 49466 | __ret_377 = __builtin_shufflevector(__ret_377, __ret_377, 1, 0); \ | |
| 49467 | __ret_377; \ | |
| 47764 | 49468 | }) |
| 47765 | 49469 | #endif |
| 47766 | 49470 | |
| 47767 | 49471 | #ifdef __LITTLE_ENDIAN__ |
| 47768 | #define vcopy_lane_s32(__p0_286, __p1_286, __p2_286, __p3_286) __extension__ ({ \ | |
| 47769 | int32x2_t __s0_286 = __p0_286; \ | |
| 47770 | int32x2_t __s2_286 = __p2_286; \ | |
| 47771 | int32x2_t __ret_286; \ | |
| 47772 | __ret_286 = vset_lane_s32(vget_lane_s32(__s2_286, __p3_286), __s0_286, __p1_286); \ | |
| 47773 | __ret_286; \ | |
| 49472 | #define vcopy_lane_s32(__p0_378, __p1_378, __p2_378, __p3_378) __extension__ ({ \ | |
| 49473 | int32x2_t __s0_378 = __p0_378; \ | |
| 49474 | int32x2_t __s2_378 = __p2_378; \ | |
| 49475 | int32x2_t __ret_378; \ | |
| 49476 | __ret_378 = vset_lane_s32(vget_lane_s32(__s2_378, __p3_378), __s0_378, __p1_378); \ | |
| 49477 | __ret_378; \ | |
| 47774 | 49478 | }) |
| 47775 | 49479 | #else |
| 47776 | #define vcopy_lane_s32(__p0_287, __p1_287, __p2_287, __p3_287) __extension__ ({ \ | |
| 47777 | int32x2_t __s0_287 = __p0_287; \ | |
| 47778 | int32x2_t __s2_287 = __p2_287; \ | |
| 47779 | int32x2_t __rev0_287; __rev0_287 = __builtin_shufflevector(__s0_287, __s0_287, 1, 0); \ | |
| 47780 | int32x2_t __rev2_287; __rev2_287 = __builtin_shufflevector(__s2_287, __s2_287, 1, 0); \ | |
| 47781 | int32x2_t __ret_287; \ | |
| 47782 | __ret_287 = __noswap_vset_lane_s32(__noswap_vget_lane_s32(__rev2_287, __p3_287), __rev0_287, __p1_287); \ | |
| 47783 | __ret_287 = __builtin_shufflevector(__ret_287, __ret_287, 1, 0); \ | |
| 47784 | __ret_287; \ | |
| 49480 | #define vcopy_lane_s32(__p0_379, __p1_379, __p2_379, __p3_379) __extension__ ({ \ | |
| 49481 | int32x2_t __s0_379 = __p0_379; \ | |
| 49482 | int32x2_t __s2_379 = __p2_379; \ | |
| 49483 | int32x2_t __rev0_379; __rev0_379 = __builtin_shufflevector(__s0_379, __s0_379, 1, 0); \ | |
| 49484 | int32x2_t __rev2_379; __rev2_379 = __builtin_shufflevector(__s2_379, __s2_379, 1, 0); \ | |
| 49485 | int32x2_t __ret_379; \ | |
| 49486 | __ret_379 = __noswap_vset_lane_s32(__noswap_vget_lane_s32(__rev2_379, __p3_379), __rev0_379, __p1_379); \ | |
| 49487 | __ret_379 = __builtin_shufflevector(__ret_379, __ret_379, 1, 0); \ | |
| 49488 | __ret_379; \ | |
| 47785 | 49489 | }) |
| 47786 | 49490 | #endif |
| 47787 | 49491 | |
| 47788 | #define vcopy_lane_s64(__p0_288, __p1_288, __p2_288, __p3_288) __extension__ ({ \ | |
| 47789 | int64x1_t __s0_288 = __p0_288; \ | |
| 47790 | int64x1_t __s2_288 = __p2_288; \ | |
| 47791 | int64x1_t __ret_288; \ | |
| 47792 | __ret_288 = vset_lane_s64(vget_lane_s64(__s2_288, __p3_288), __s0_288, __p1_288); \ | |
| 47793 | __ret_288; \ | |
| 49492 | #define vcopy_lane_s64(__p0_380, __p1_380, __p2_380, __p3_380) __extension__ ({ \ | |
| 49493 | int64x1_t __s0_380 = __p0_380; \ | |
| 49494 | int64x1_t __s2_380 = __p2_380; \ | |
| 49495 | int64x1_t __ret_380; \ | |
| 49496 | __ret_380 = vset_lane_s64(vget_lane_s64(__s2_380, __p3_380), __s0_380, __p1_380); \ | |
| 49497 | __ret_380; \ | |
| 47794 | 49498 | }) |
| 47795 | 49499 | #ifdef __LITTLE_ENDIAN__ |
| 47796 | #define vcopy_lane_s16(__p0_289, __p1_289, __p2_289, __p3_289) __extension__ ({ \ | |
| 47797 | int16x4_t __s0_289 = __p0_289; \ | |
| 47798 | int16x4_t __s2_289 = __p2_289; \ | |
| 47799 | int16x4_t __ret_289; \ | |
| 47800 | __ret_289 = vset_lane_s16(vget_lane_s16(__s2_289, __p3_289), __s0_289, __p1_289); \ | |
| 47801 | __ret_289; \ | |
| 49500 | #define vcopy_lane_s16(__p0_381, __p1_381, __p2_381, __p3_381) __extension__ ({ \ | |
| 49501 | int16x4_t __s0_381 = __p0_381; \ | |
| 49502 | int16x4_t __s2_381 = __p2_381; \ | |
| 49503 | int16x4_t __ret_381; \ | |
| 49504 | __ret_381 = vset_lane_s16(vget_lane_s16(__s2_381, __p3_381), __s0_381, __p1_381); \ | |
| 49505 | __ret_381; \ | |
| 47802 | 49506 | }) |
| 47803 | 49507 | #else |
| 47804 | #define vcopy_lane_s16(__p0_290, __p1_290, __p2_290, __p3_290) __extension__ ({ \ | |
| 47805 | int16x4_t __s0_290 = __p0_290; \ | |
| 47806 | int16x4_t __s2_290 = __p2_290; \ | |
| 47807 | int16x4_t __rev0_290; __rev0_290 = __builtin_shufflevector(__s0_290, __s0_290, 3, 2, 1, 0); \ | |
| 47808 | int16x4_t __rev2_290; __rev2_290 = __builtin_shufflevector(__s2_290, __s2_290, 3, 2, 1, 0); \ | |
| 47809 | int16x4_t __ret_290; \ | |
| 47810 | __ret_290 = __noswap_vset_lane_s16(__noswap_vget_lane_s16(__rev2_290, __p3_290), __rev0_290, __p1_290); \ | |
| 47811 | __ret_290 = __builtin_shufflevector(__ret_290, __ret_290, 3, 2, 1, 0); \ | |
| 47812 | __ret_290; \ | |
| 49508 | #define vcopy_lane_s16(__p0_382, __p1_382, __p2_382, __p3_382) __extension__ ({ \ | |
| 49509 | int16x4_t __s0_382 = __p0_382; \ | |
| 49510 | int16x4_t __s2_382 = __p2_382; \ | |
| 49511 | int16x4_t __rev0_382; __rev0_382 = __builtin_shufflevector(__s0_382, __s0_382, 3, 2, 1, 0); \ | |
| 49512 | int16x4_t __rev2_382; __rev2_382 = __builtin_shufflevector(__s2_382, __s2_382, 3, 2, 1, 0); \ | |
| 49513 | int16x4_t __ret_382; \ | |
| 49514 | __ret_382 = __noswap_vset_lane_s16(__noswap_vget_lane_s16(__rev2_382, __p3_382), __rev0_382, __p1_382); \ | |
| 49515 | __ret_382 = __builtin_shufflevector(__ret_382, __ret_382, 3, 2, 1, 0); \ | |
| 49516 | __ret_382; \ | |
| 47813 | 49517 | }) |
| 47814 | 49518 | #endif |
| 47815 | 49519 | |
| 47816 | 49520 | #ifdef __LITTLE_ENDIAN__ |
| 47817 | #define vcopyq_laneq_p8(__p0_291, __p1_291, __p2_291, __p3_291) __extension__ ({ \ | |
| 47818 | poly8x16_t __s0_291 = __p0_291; \ | |
| 47819 | poly8x16_t __s2_291 = __p2_291; \ | |
| 47820 | poly8x16_t __ret_291; \ | |
| 47821 | __ret_291 = vsetq_lane_p8(vgetq_lane_p8(__s2_291, __p3_291), __s0_291, __p1_291); \ | |
| 47822 | __ret_291; \ | |
| 49521 | #define vcopyq_laneq_p8(__p0_383, __p1_383, __p2_383, __p3_383) __extension__ ({ \ | |
| 49522 | poly8x16_t __s0_383 = __p0_383; \ | |
| 49523 | poly8x16_t __s2_383 = __p2_383; \ | |
| 49524 | poly8x16_t __ret_383; \ | |
| 49525 | __ret_383 = vsetq_lane_p8(vgetq_lane_p8(__s2_383, __p3_383), __s0_383, __p1_383); \ | |
| 49526 | __ret_383; \ | |
| 47823 | 49527 | }) |
| 47824 | 49528 | #else |
| 47825 | #define vcopyq_laneq_p8(__p0_292, __p1_292, __p2_292, __p3_292) __extension__ ({ \ | |
| 47826 | poly8x16_t __s0_292 = __p0_292; \ | |
| 47827 | poly8x16_t __s2_292 = __p2_292; \ | |
| 47828 | poly8x16_t __rev0_292; __rev0_292 = __builtin_shufflevector(__s0_292, __s0_292, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47829 | poly8x16_t __rev2_292; __rev2_292 = __builtin_shufflevector(__s2_292, __s2_292, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47830 | poly8x16_t __ret_292; \ | |
| 47831 | __ret_292 = __noswap_vsetq_lane_p8(__noswap_vgetq_lane_p8(__rev2_292, __p3_292), __rev0_292, __p1_292); \ | |
| 47832 | __ret_292 = __builtin_shufflevector(__ret_292, __ret_292, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47833 | __ret_292; \ | |
| 49529 | #define vcopyq_laneq_p8(__p0_384, __p1_384, __p2_384, __p3_384) __extension__ ({ \ | |
| 49530 | poly8x16_t __s0_384 = __p0_384; \ | |
| 49531 | poly8x16_t __s2_384 = __p2_384; \ | |
| 49532 | poly8x16_t __rev0_384; __rev0_384 = __builtin_shufflevector(__s0_384, __s0_384, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49533 | poly8x16_t __rev2_384; __rev2_384 = __builtin_shufflevector(__s2_384, __s2_384, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49534 | poly8x16_t __ret_384; \ | |
| 49535 | __ret_384 = __noswap_vsetq_lane_p8(__noswap_vgetq_lane_p8(__rev2_384, __p3_384), __rev0_384, __p1_384); \ | |
| 49536 | __ret_384 = __builtin_shufflevector(__ret_384, __ret_384, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49537 | __ret_384; \ | |
| 47834 | 49538 | }) |
| 47835 | 49539 | #endif |
| 47836 | 49540 | |
| 47837 | 49541 | #ifdef __LITTLE_ENDIAN__ |
| 47838 | #define vcopyq_laneq_p16(__p0_293, __p1_293, __p2_293, __p3_293) __extension__ ({ \ | |
| 47839 | poly16x8_t __s0_293 = __p0_293; \ | |
| 47840 | poly16x8_t __s2_293 = __p2_293; \ | |
| 47841 | poly16x8_t __ret_293; \ | |
| 47842 | __ret_293 = vsetq_lane_p16(vgetq_lane_p16(__s2_293, __p3_293), __s0_293, __p1_293); \ | |
| 47843 | __ret_293; \ | |
| 49542 | #define vcopyq_laneq_p16(__p0_385, __p1_385, __p2_385, __p3_385) __extension__ ({ \ | |
| 49543 | poly16x8_t __s0_385 = __p0_385; \ | |
| 49544 | poly16x8_t __s2_385 = __p2_385; \ | |
| 49545 | poly16x8_t __ret_385; \ | |
| 49546 | __ret_385 = vsetq_lane_p16(vgetq_lane_p16(__s2_385, __p3_385), __s0_385, __p1_385); \ | |
| 49547 | __ret_385; \ | |
| 47844 | 49548 | }) |
| 47845 | 49549 | #else |
| 47846 | #define vcopyq_laneq_p16(__p0_294, __p1_294, __p2_294, __p3_294) __extension__ ({ \ | |
| 47847 | poly16x8_t __s0_294 = __p0_294; \ | |
| 47848 | poly16x8_t __s2_294 = __p2_294; \ | |
| 47849 | poly16x8_t __rev0_294; __rev0_294 = __builtin_shufflevector(__s0_294, __s0_294, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47850 | poly16x8_t __rev2_294; __rev2_294 = __builtin_shufflevector(__s2_294, __s2_294, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47851 | poly16x8_t __ret_294; \ | |
| 47852 | __ret_294 = __noswap_vsetq_lane_p16(__noswap_vgetq_lane_p16(__rev2_294, __p3_294), __rev0_294, __p1_294); \ | |
| 47853 | __ret_294 = __builtin_shufflevector(__ret_294, __ret_294, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47854 | __ret_294; \ | |
| 49550 | #define vcopyq_laneq_p16(__p0_386, __p1_386, __p2_386, __p3_386) __extension__ ({ \ | |
| 49551 | poly16x8_t __s0_386 = __p0_386; \ | |
| 49552 | poly16x8_t __s2_386 = __p2_386; \ | |
| 49553 | poly16x8_t __rev0_386; __rev0_386 = __builtin_shufflevector(__s0_386, __s0_386, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49554 | poly16x8_t __rev2_386; __rev2_386 = __builtin_shufflevector(__s2_386, __s2_386, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49555 | poly16x8_t __ret_386; \ | |
| 49556 | __ret_386 = __noswap_vsetq_lane_p16(__noswap_vgetq_lane_p16(__rev2_386, __p3_386), __rev0_386, __p1_386); \ | |
| 49557 | __ret_386 = __builtin_shufflevector(__ret_386, __ret_386, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49558 | __ret_386; \ | |
| 47855 | 49559 | }) |
| 47856 | 49560 | #endif |
| 47857 | 49561 | |
| 47858 | 49562 | #ifdef __LITTLE_ENDIAN__ |
| 47859 | #define vcopyq_laneq_u8(__p0_295, __p1_295, __p2_295, __p3_295) __extension__ ({ \ | |
| 47860 | uint8x16_t __s0_295 = __p0_295; \ | |
| 47861 | uint8x16_t __s2_295 = __p2_295; \ | |
| 47862 | uint8x16_t __ret_295; \ | |
| 47863 | __ret_295 = vsetq_lane_u8(vgetq_lane_u8(__s2_295, __p3_295), __s0_295, __p1_295); \ | |
| 47864 | __ret_295; \ | |
| 49563 | #define vcopyq_laneq_u8(__p0_387, __p1_387, __p2_387, __p3_387) __extension__ ({ \ | |
| 49564 | uint8x16_t __s0_387 = __p0_387; \ | |
| 49565 | uint8x16_t __s2_387 = __p2_387; \ | |
| 49566 | uint8x16_t __ret_387; \ | |
| 49567 | __ret_387 = vsetq_lane_u8(vgetq_lane_u8(__s2_387, __p3_387), __s0_387, __p1_387); \ | |
| 49568 | __ret_387; \ | |
| 47865 | 49569 | }) |
| 47866 | 49570 | #else |
| 47867 | #define vcopyq_laneq_u8(__p0_296, __p1_296, __p2_296, __p3_296) __extension__ ({ \ | |
| 47868 | uint8x16_t __s0_296 = __p0_296; \ | |
| 47869 | uint8x16_t __s2_296 = __p2_296; \ | |
| 47870 | uint8x16_t __rev0_296; __rev0_296 = __builtin_shufflevector(__s0_296, __s0_296, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47871 | uint8x16_t __rev2_296; __rev2_296 = __builtin_shufflevector(__s2_296, __s2_296, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47872 | uint8x16_t __ret_296; \ | |
| 47873 | __ret_296 = __noswap_vsetq_lane_u8(__noswap_vgetq_lane_u8(__rev2_296, __p3_296), __rev0_296, __p1_296); \ | |
| 47874 | __ret_296 = __builtin_shufflevector(__ret_296, __ret_296, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47875 | __ret_296; \ | |
| 49571 | #define vcopyq_laneq_u8(__p0_388, __p1_388, __p2_388, __p3_388) __extension__ ({ \ | |
| 49572 | uint8x16_t __s0_388 = __p0_388; \ | |
| 49573 | uint8x16_t __s2_388 = __p2_388; \ | |
| 49574 | uint8x16_t __rev0_388; __rev0_388 = __builtin_shufflevector(__s0_388, __s0_388, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49575 | uint8x16_t __rev2_388; __rev2_388 = __builtin_shufflevector(__s2_388, __s2_388, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49576 | uint8x16_t __ret_388; \ | |
| 49577 | __ret_388 = __noswap_vsetq_lane_u8(__noswap_vgetq_lane_u8(__rev2_388, __p3_388), __rev0_388, __p1_388); \ | |
| 49578 | __ret_388 = __builtin_shufflevector(__ret_388, __ret_388, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49579 | __ret_388; \ | |
| 47876 | 49580 | }) |
| 47877 | 49581 | #endif |
| 47878 | 49582 | |
| 47879 | 49583 | #ifdef __LITTLE_ENDIAN__ |
| 47880 | #define vcopyq_laneq_u32(__p0_297, __p1_297, __p2_297, __p3_297) __extension__ ({ \ | |
| 47881 | uint32x4_t __s0_297 = __p0_297; \ | |
| 47882 | uint32x4_t __s2_297 = __p2_297; \ | |
| 47883 | uint32x4_t __ret_297; \ | |
| 47884 | __ret_297 = vsetq_lane_u32(vgetq_lane_u32(__s2_297, __p3_297), __s0_297, __p1_297); \ | |
| 47885 | __ret_297; \ | |
| 49584 | #define vcopyq_laneq_u32(__p0_389, __p1_389, __p2_389, __p3_389) __extension__ ({ \ | |
| 49585 | uint32x4_t __s0_389 = __p0_389; \ | |
| 49586 | uint32x4_t __s2_389 = __p2_389; \ | |
| 49587 | uint32x4_t __ret_389; \ | |
| 49588 | __ret_389 = vsetq_lane_u32(vgetq_lane_u32(__s2_389, __p3_389), __s0_389, __p1_389); \ | |
| 49589 | __ret_389; \ | |
| 47886 | 49590 | }) |
| 47887 | 49591 | #else |
| 47888 | #define vcopyq_laneq_u32(__p0_298, __p1_298, __p2_298, __p3_298) __extension__ ({ \ | |
| 47889 | uint32x4_t __s0_298 = __p0_298; \ | |
| 47890 | uint32x4_t __s2_298 = __p2_298; \ | |
| 47891 | uint32x4_t __rev0_298; __rev0_298 = __builtin_shufflevector(__s0_298, __s0_298, 3, 2, 1, 0); \ | |
| 47892 | uint32x4_t __rev2_298; __rev2_298 = __builtin_shufflevector(__s2_298, __s2_298, 3, 2, 1, 0); \ | |
| 47893 | uint32x4_t __ret_298; \ | |
| 47894 | __ret_298 = __noswap_vsetq_lane_u32(__noswap_vgetq_lane_u32(__rev2_298, __p3_298), __rev0_298, __p1_298); \ | |
| 47895 | __ret_298 = __builtin_shufflevector(__ret_298, __ret_298, 3, 2, 1, 0); \ | |
| 47896 | __ret_298; \ | |
| 49592 | #define vcopyq_laneq_u32(__p0_390, __p1_390, __p2_390, __p3_390) __extension__ ({ \ | |
| 49593 | uint32x4_t __s0_390 = __p0_390; \ | |
| 49594 | uint32x4_t __s2_390 = __p2_390; \ | |
| 49595 | uint32x4_t __rev0_390; __rev0_390 = __builtin_shufflevector(__s0_390, __s0_390, 3, 2, 1, 0); \ | |
| 49596 | uint32x4_t __rev2_390; __rev2_390 = __builtin_shufflevector(__s2_390, __s2_390, 3, 2, 1, 0); \ | |
| 49597 | uint32x4_t __ret_390; \ | |
| 49598 | __ret_390 = __noswap_vsetq_lane_u32(__noswap_vgetq_lane_u32(__rev2_390, __p3_390), __rev0_390, __p1_390); \ | |
| 49599 | __ret_390 = __builtin_shufflevector(__ret_390, __ret_390, 3, 2, 1, 0); \ | |
| 49600 | __ret_390; \ | |
| 47897 | 49601 | }) |
| 47898 | 49602 | #endif |
| 47899 | 49603 | |
| 47900 | 49604 | #ifdef __LITTLE_ENDIAN__ |
| 47901 | #define vcopyq_laneq_u64(__p0_299, __p1_299, __p2_299, __p3_299) __extension__ ({ \ | |
| 47902 | uint64x2_t __s0_299 = __p0_299; \ | |
| 47903 | uint64x2_t __s2_299 = __p2_299; \ | |
| 47904 | uint64x2_t __ret_299; \ | |
| 47905 | __ret_299 = vsetq_lane_u64(vgetq_lane_u64(__s2_299, __p3_299), __s0_299, __p1_299); \ | |
| 47906 | __ret_299; \ | |
| 49605 | #define vcopyq_laneq_u64(__p0_391, __p1_391, __p2_391, __p3_391) __extension__ ({ \ | |
| 49606 | uint64x2_t __s0_391 = __p0_391; \ | |
| 49607 | uint64x2_t __s2_391 = __p2_391; \ | |
| 49608 | uint64x2_t __ret_391; \ | |
| 49609 | __ret_391 = vsetq_lane_u64(vgetq_lane_u64(__s2_391, __p3_391), __s0_391, __p1_391); \ | |
| 49610 | __ret_391; \ | |
| 47907 | 49611 | }) |
| 47908 | 49612 | #else |
| 47909 | #define vcopyq_laneq_u64(__p0_300, __p1_300, __p2_300, __p3_300) __extension__ ({ \ | |
| 47910 | uint64x2_t __s0_300 = __p0_300; \ | |
| 47911 | uint64x2_t __s2_300 = __p2_300; \ | |
| 47912 | uint64x2_t __rev0_300; __rev0_300 = __builtin_shufflevector(__s0_300, __s0_300, 1, 0); \ | |
| 47913 | uint64x2_t __rev2_300; __rev2_300 = __builtin_shufflevector(__s2_300, __s2_300, 1, 0); \ | |
| 47914 | uint64x2_t __ret_300; \ | |
| 47915 | __ret_300 = __noswap_vsetq_lane_u64(__noswap_vgetq_lane_u64(__rev2_300, __p3_300), __rev0_300, __p1_300); \ | |
| 47916 | __ret_300 = __builtin_shufflevector(__ret_300, __ret_300, 1, 0); \ | |
| 47917 | __ret_300; \ | |
| 49613 | #define vcopyq_laneq_u64(__p0_392, __p1_392, __p2_392, __p3_392) __extension__ ({ \ | |
| 49614 | uint64x2_t __s0_392 = __p0_392; \ | |
| 49615 | uint64x2_t __s2_392 = __p2_392; \ | |
| 49616 | uint64x2_t __rev0_392; __rev0_392 = __builtin_shufflevector(__s0_392, __s0_392, 1, 0); \ | |
| 49617 | uint64x2_t __rev2_392; __rev2_392 = __builtin_shufflevector(__s2_392, __s2_392, 1, 0); \ | |
| 49618 | uint64x2_t __ret_392; \ | |
| 49619 | __ret_392 = __noswap_vsetq_lane_u64(__noswap_vgetq_lane_u64(__rev2_392, __p3_392), __rev0_392, __p1_392); \ | |
| 49620 | __ret_392 = __builtin_shufflevector(__ret_392, __ret_392, 1, 0); \ | |
| 49621 | __ret_392; \ | |
| 47918 | 49622 | }) |
| 47919 | 49623 | #endif |
| 47920 | 49624 | |
| 47921 | 49625 | #ifdef __LITTLE_ENDIAN__ |
| 47922 | #define vcopyq_laneq_u16(__p0_301, __p1_301, __p2_301, __p3_301) __extension__ ({ \ | |
| 47923 | uint16x8_t __s0_301 = __p0_301; \ | |
| 47924 | uint16x8_t __s2_301 = __p2_301; \ | |
| 47925 | uint16x8_t __ret_301; \ | |
| 47926 | __ret_301 = vsetq_lane_u16(vgetq_lane_u16(__s2_301, __p3_301), __s0_301, __p1_301); \ | |
| 47927 | __ret_301; \ | |
| 49626 | #define vcopyq_laneq_u16(__p0_393, __p1_393, __p2_393, __p3_393) __extension__ ({ \ | |
| 49627 | uint16x8_t __s0_393 = __p0_393; \ | |
| 49628 | uint16x8_t __s2_393 = __p2_393; \ | |
| 49629 | uint16x8_t __ret_393; \ | |
| 49630 | __ret_393 = vsetq_lane_u16(vgetq_lane_u16(__s2_393, __p3_393), __s0_393, __p1_393); \ | |
| 49631 | __ret_393; \ | |
| 47928 | 49632 | }) |
| 47929 | 49633 | #else |
| 47930 | #define vcopyq_laneq_u16(__p0_302, __p1_302, __p2_302, __p3_302) __extension__ ({ \ | |
| 47931 | uint16x8_t __s0_302 = __p0_302; \ | |
| 47932 | uint16x8_t __s2_302 = __p2_302; \ | |
| 47933 | uint16x8_t __rev0_302; __rev0_302 = __builtin_shufflevector(__s0_302, __s0_302, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47934 | uint16x8_t __rev2_302; __rev2_302 = __builtin_shufflevector(__s2_302, __s2_302, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47935 | uint16x8_t __ret_302; \ | |
| 47936 | __ret_302 = __noswap_vsetq_lane_u16(__noswap_vgetq_lane_u16(__rev2_302, __p3_302), __rev0_302, __p1_302); \ | |
| 47937 | __ret_302 = __builtin_shufflevector(__ret_302, __ret_302, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47938 | __ret_302; \ | |
| 49634 | #define vcopyq_laneq_u16(__p0_394, __p1_394, __p2_394, __p3_394) __extension__ ({ \ | |
| 49635 | uint16x8_t __s0_394 = __p0_394; \ | |
| 49636 | uint16x8_t __s2_394 = __p2_394; \ | |
| 49637 | uint16x8_t __rev0_394; __rev0_394 = __builtin_shufflevector(__s0_394, __s0_394, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49638 | uint16x8_t __rev2_394; __rev2_394 = __builtin_shufflevector(__s2_394, __s2_394, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49639 | uint16x8_t __ret_394; \ | |
| 49640 | __ret_394 = __noswap_vsetq_lane_u16(__noswap_vgetq_lane_u16(__rev2_394, __p3_394), __rev0_394, __p1_394); \ | |
| 49641 | __ret_394 = __builtin_shufflevector(__ret_394, __ret_394, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49642 | __ret_394; \ | |
| 47939 | 49643 | }) |
| 47940 | 49644 | #endif |
| 47941 | 49645 | |
| 47942 | 49646 | #ifdef __LITTLE_ENDIAN__ |
| 47943 | #define vcopyq_laneq_s8(__p0_303, __p1_303, __p2_303, __p3_303) __extension__ ({ \ | |
| 47944 | int8x16_t __s0_303 = __p0_303; \ | |
| 47945 | int8x16_t __s2_303 = __p2_303; \ | |
| 47946 | int8x16_t __ret_303; \ | |
| 47947 | __ret_303 = vsetq_lane_s8(vgetq_lane_s8(__s2_303, __p3_303), __s0_303, __p1_303); \ | |
| 47948 | __ret_303; \ | |
| 49647 | #define vcopyq_laneq_s8(__p0_395, __p1_395, __p2_395, __p3_395) __extension__ ({ \ | |
| 49648 | int8x16_t __s0_395 = __p0_395; \ | |
| 49649 | int8x16_t __s2_395 = __p2_395; \ | |
| 49650 | int8x16_t __ret_395; \ | |
| 49651 | __ret_395 = vsetq_lane_s8(vgetq_lane_s8(__s2_395, __p3_395), __s0_395, __p1_395); \ | |
| 49652 | __ret_395; \ | |
| 47949 | 49653 | }) |
| 47950 | 49654 | #else |
| 47951 | #define vcopyq_laneq_s8(__p0_304, __p1_304, __p2_304, __p3_304) __extension__ ({ \ | |
| 47952 | int8x16_t __s0_304 = __p0_304; \ | |
| 47953 | int8x16_t __s2_304 = __p2_304; \ | |
| 47954 | int8x16_t __rev0_304; __rev0_304 = __builtin_shufflevector(__s0_304, __s0_304, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47955 | int8x16_t __rev2_304; __rev2_304 = __builtin_shufflevector(__s2_304, __s2_304, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47956 | int8x16_t __ret_304; \ | |
| 47957 | __ret_304 = __noswap_vsetq_lane_s8(__noswap_vgetq_lane_s8(__rev2_304, __p3_304), __rev0_304, __p1_304); \ | |
| 47958 | __ret_304 = __builtin_shufflevector(__ret_304, __ret_304, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 47959 | __ret_304; \ | |
| 49655 | #define vcopyq_laneq_s8(__p0_396, __p1_396, __p2_396, __p3_396) __extension__ ({ \ | |
| 49656 | int8x16_t __s0_396 = __p0_396; \ | |
| 49657 | int8x16_t __s2_396 = __p2_396; \ | |
| 49658 | int8x16_t __rev0_396; __rev0_396 = __builtin_shufflevector(__s0_396, __s0_396, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49659 | int8x16_t __rev2_396; __rev2_396 = __builtin_shufflevector(__s2_396, __s2_396, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49660 | int8x16_t __ret_396; \ | |
| 49661 | __ret_396 = __noswap_vsetq_lane_s8(__noswap_vgetq_lane_s8(__rev2_396, __p3_396), __rev0_396, __p1_396); \ | |
| 49662 | __ret_396 = __builtin_shufflevector(__ret_396, __ret_396, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49663 | __ret_396; \ | |
| 47960 | 49664 | }) |
| 47961 | 49665 | #endif |
| 47962 | 49666 | |
| 47963 | 49667 | #ifdef __LITTLE_ENDIAN__ |
| 47964 | #define vcopyq_laneq_f32(__p0_305, __p1_305, __p2_305, __p3_305) __extension__ ({ \ | |
| 47965 | float32x4_t __s0_305 = __p0_305; \ | |
| 47966 | float32x4_t __s2_305 = __p2_305; \ | |
| 47967 | float32x4_t __ret_305; \ | |
| 47968 | __ret_305 = vsetq_lane_f32(vgetq_lane_f32(__s2_305, __p3_305), __s0_305, __p1_305); \ | |
| 47969 | __ret_305; \ | |
| 49668 | #define vcopyq_laneq_f32(__p0_397, __p1_397, __p2_397, __p3_397) __extension__ ({ \ | |
| 49669 | float32x4_t __s0_397 = __p0_397; \ | |
| 49670 | float32x4_t __s2_397 = __p2_397; \ | |
| 49671 | float32x4_t __ret_397; \ | |
| 49672 | __ret_397 = vsetq_lane_f32(vgetq_lane_f32(__s2_397, __p3_397), __s0_397, __p1_397); \ | |
| 49673 | __ret_397; \ | |
| 47970 | 49674 | }) |
| 47971 | 49675 | #else |
| 47972 | #define vcopyq_laneq_f32(__p0_306, __p1_306, __p2_306, __p3_306) __extension__ ({ \ | |
| 47973 | float32x4_t __s0_306 = __p0_306; \ | |
| 47974 | float32x4_t __s2_306 = __p2_306; \ | |
| 47975 | float32x4_t __rev0_306; __rev0_306 = __builtin_shufflevector(__s0_306, __s0_306, 3, 2, 1, 0); \ | |
| 47976 | float32x4_t __rev2_306; __rev2_306 = __builtin_shufflevector(__s2_306, __s2_306, 3, 2, 1, 0); \ | |
| 47977 | float32x4_t __ret_306; \ | |
| 47978 | __ret_306 = __noswap_vsetq_lane_f32(__noswap_vgetq_lane_f32(__rev2_306, __p3_306), __rev0_306, __p1_306); \ | |
| 47979 | __ret_306 = __builtin_shufflevector(__ret_306, __ret_306, 3, 2, 1, 0); \ | |
| 47980 | __ret_306; \ | |
| 49676 | #define vcopyq_laneq_f32(__p0_398, __p1_398, __p2_398, __p3_398) __extension__ ({ \ | |
| 49677 | float32x4_t __s0_398 = __p0_398; \ | |
| 49678 | float32x4_t __s2_398 = __p2_398; \ | |
| 49679 | float32x4_t __rev0_398; __rev0_398 = __builtin_shufflevector(__s0_398, __s0_398, 3, 2, 1, 0); \ | |
| 49680 | float32x4_t __rev2_398; __rev2_398 = __builtin_shufflevector(__s2_398, __s2_398, 3, 2, 1, 0); \ | |
| 49681 | float32x4_t __ret_398; \ | |
| 49682 | __ret_398 = __noswap_vsetq_lane_f32(__noswap_vgetq_lane_f32(__rev2_398, __p3_398), __rev0_398, __p1_398); \ | |
| 49683 | __ret_398 = __builtin_shufflevector(__ret_398, __ret_398, 3, 2, 1, 0); \ | |
| 49684 | __ret_398; \ | |
| 47981 | 49685 | }) |
| 47982 | 49686 | #endif |
| 47983 | 49687 | |
| 47984 | 49688 | #ifdef __LITTLE_ENDIAN__ |
| 47985 | #define vcopyq_laneq_s32(__p0_307, __p1_307, __p2_307, __p3_307) __extension__ ({ \ | |
| 47986 | int32x4_t __s0_307 = __p0_307; \ | |
| 47987 | int32x4_t __s2_307 = __p2_307; \ | |
| 47988 | int32x4_t __ret_307; \ | |
| 47989 | __ret_307 = vsetq_lane_s32(vgetq_lane_s32(__s2_307, __p3_307), __s0_307, __p1_307); \ | |
| 47990 | __ret_307; \ | |
| 49689 | #define vcopyq_laneq_s32(__p0_399, __p1_399, __p2_399, __p3_399) __extension__ ({ \ | |
| 49690 | int32x4_t __s0_399 = __p0_399; \ | |
| 49691 | int32x4_t __s2_399 = __p2_399; \ | |
| 49692 | int32x4_t __ret_399; \ | |
| 49693 | __ret_399 = vsetq_lane_s32(vgetq_lane_s32(__s2_399, __p3_399), __s0_399, __p1_399); \ | |
| 49694 | __ret_399; \ | |
| 47991 | 49695 | }) |
| 47992 | 49696 | #else |
| 47993 | #define vcopyq_laneq_s32(__p0_308, __p1_308, __p2_308, __p3_308) __extension__ ({ \ | |
| 47994 | int32x4_t __s0_308 = __p0_308; \ | |
| 47995 | int32x4_t __s2_308 = __p2_308; \ | |
| 47996 | int32x4_t __rev0_308; __rev0_308 = __builtin_shufflevector(__s0_308, __s0_308, 3, 2, 1, 0); \ | |
| 47997 | int32x4_t __rev2_308; __rev2_308 = __builtin_shufflevector(__s2_308, __s2_308, 3, 2, 1, 0); \ | |
| 47998 | int32x4_t __ret_308; \ | |
| 47999 | __ret_308 = __noswap_vsetq_lane_s32(__noswap_vgetq_lane_s32(__rev2_308, __p3_308), __rev0_308, __p1_308); \ | |
| 48000 | __ret_308 = __builtin_shufflevector(__ret_308, __ret_308, 3, 2, 1, 0); \ | |
| 48001 | __ret_308; \ | |
| 49697 | #define vcopyq_laneq_s32(__p0_400, __p1_400, __p2_400, __p3_400) __extension__ ({ \ | |
| 49698 | int32x4_t __s0_400 = __p0_400; \ | |
| 49699 | int32x4_t __s2_400 = __p2_400; \ | |
| 49700 | int32x4_t __rev0_400; __rev0_400 = __builtin_shufflevector(__s0_400, __s0_400, 3, 2, 1, 0); \ | |
| 49701 | int32x4_t __rev2_400; __rev2_400 = __builtin_shufflevector(__s2_400, __s2_400, 3, 2, 1, 0); \ | |
| 49702 | int32x4_t __ret_400; \ | |
| 49703 | __ret_400 = __noswap_vsetq_lane_s32(__noswap_vgetq_lane_s32(__rev2_400, __p3_400), __rev0_400, __p1_400); \ | |
| 49704 | __ret_400 = __builtin_shufflevector(__ret_400, __ret_400, 3, 2, 1, 0); \ | |
| 49705 | __ret_400; \ | |
| 48002 | 49706 | }) |
| 48003 | 49707 | #endif |
| 48004 | 49708 | |
| 48005 | 49709 | #ifdef __LITTLE_ENDIAN__ |
| 48006 | #define vcopyq_laneq_s64(__p0_309, __p1_309, __p2_309, __p3_309) __extension__ ({ \ | |
| 48007 | int64x2_t __s0_309 = __p0_309; \ | |
| 48008 | int64x2_t __s2_309 = __p2_309; \ | |
| 48009 | int64x2_t __ret_309; \ | |
| 48010 | __ret_309 = vsetq_lane_s64(vgetq_lane_s64(__s2_309, __p3_309), __s0_309, __p1_309); \ | |
| 48011 | __ret_309; \ | |
| 49710 | #define vcopyq_laneq_s64(__p0_401, __p1_401, __p2_401, __p3_401) __extension__ ({ \ | |
| 49711 | int64x2_t __s0_401 = __p0_401; \ | |
| 49712 | int64x2_t __s2_401 = __p2_401; \ | |
| 49713 | int64x2_t __ret_401; \ | |
| 49714 | __ret_401 = vsetq_lane_s64(vgetq_lane_s64(__s2_401, __p3_401), __s0_401, __p1_401); \ | |
| 49715 | __ret_401; \ | |
| 48012 | 49716 | }) |
| 48013 | 49717 | #else |
| 48014 | #define vcopyq_laneq_s64(__p0_310, __p1_310, __p2_310, __p3_310) __extension__ ({ \ | |
| 48015 | int64x2_t __s0_310 = __p0_310; \ | |
| 48016 | int64x2_t __s2_310 = __p2_310; \ | |
| 48017 | int64x2_t __rev0_310; __rev0_310 = __builtin_shufflevector(__s0_310, __s0_310, 1, 0); \ | |
| 48018 | int64x2_t __rev2_310; __rev2_310 = __builtin_shufflevector(__s2_310, __s2_310, 1, 0); \ | |
| 48019 | int64x2_t __ret_310; \ | |
| 48020 | __ret_310 = __noswap_vsetq_lane_s64(__noswap_vgetq_lane_s64(__rev2_310, __p3_310), __rev0_310, __p1_310); \ | |
| 48021 | __ret_310 = __builtin_shufflevector(__ret_310, __ret_310, 1, 0); \ | |
| 48022 | __ret_310; \ | |
| 49718 | #define vcopyq_laneq_s64(__p0_402, __p1_402, __p2_402, __p3_402) __extension__ ({ \ | |
| 49719 | int64x2_t __s0_402 = __p0_402; \ | |
| 49720 | int64x2_t __s2_402 = __p2_402; \ | |
| 49721 | int64x2_t __rev0_402; __rev0_402 = __builtin_shufflevector(__s0_402, __s0_402, 1, 0); \ | |
| 49722 | int64x2_t __rev2_402; __rev2_402 = __builtin_shufflevector(__s2_402, __s2_402, 1, 0); \ | |
| 49723 | int64x2_t __ret_402; \ | |
| 49724 | __ret_402 = __noswap_vsetq_lane_s64(__noswap_vgetq_lane_s64(__rev2_402, __p3_402), __rev0_402, __p1_402); \ | |
| 49725 | __ret_402 = __builtin_shufflevector(__ret_402, __ret_402, 1, 0); \ | |
| 49726 | __ret_402; \ | |
| 48023 | 49727 | }) |
| 48024 | 49728 | #endif |
| 48025 | 49729 | |
| 48026 | 49730 | #ifdef __LITTLE_ENDIAN__ |
| 48027 | #define vcopyq_laneq_s16(__p0_311, __p1_311, __p2_311, __p3_311) __extension__ ({ \ | |
| 48028 | int16x8_t __s0_311 = __p0_311; \ | |
| 48029 | int16x8_t __s2_311 = __p2_311; \ | |
| 48030 | int16x8_t __ret_311; \ | |
| 48031 | __ret_311 = vsetq_lane_s16(vgetq_lane_s16(__s2_311, __p3_311), __s0_311, __p1_311); \ | |
| 48032 | __ret_311; \ | |
| 49731 | #define vcopyq_laneq_s16(__p0_403, __p1_403, __p2_403, __p3_403) __extension__ ({ \ | |
| 49732 | int16x8_t __s0_403 = __p0_403; \ | |
| 49733 | int16x8_t __s2_403 = __p2_403; \ | |
| 49734 | int16x8_t __ret_403; \ | |
| 49735 | __ret_403 = vsetq_lane_s16(vgetq_lane_s16(__s2_403, __p3_403), __s0_403, __p1_403); \ | |
| 49736 | __ret_403; \ | |
| 48033 | 49737 | }) |
| 48034 | 49738 | #else |
| 48035 | #define vcopyq_laneq_s16(__p0_312, __p1_312, __p2_312, __p3_312) __extension__ ({ \ | |
| 48036 | int16x8_t __s0_312 = __p0_312; \ | |
| 48037 | int16x8_t __s2_312 = __p2_312; \ | |
| 48038 | int16x8_t __rev0_312; __rev0_312 = __builtin_shufflevector(__s0_312, __s0_312, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48039 | int16x8_t __rev2_312; __rev2_312 = __builtin_shufflevector(__s2_312, __s2_312, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48040 | int16x8_t __ret_312; \ | |
| 48041 | __ret_312 = __noswap_vsetq_lane_s16(__noswap_vgetq_lane_s16(__rev2_312, __p3_312), __rev0_312, __p1_312); \ | |
| 48042 | __ret_312 = __builtin_shufflevector(__ret_312, __ret_312, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48043 | __ret_312; \ | |
| 49739 | #define vcopyq_laneq_s16(__p0_404, __p1_404, __p2_404, __p3_404) __extension__ ({ \ | |
| 49740 | int16x8_t __s0_404 = __p0_404; \ | |
| 49741 | int16x8_t __s2_404 = __p2_404; \ | |
| 49742 | int16x8_t __rev0_404; __rev0_404 = __builtin_shufflevector(__s0_404, __s0_404, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49743 | int16x8_t __rev2_404; __rev2_404 = __builtin_shufflevector(__s2_404, __s2_404, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49744 | int16x8_t __ret_404; \ | |
| 49745 | __ret_404 = __noswap_vsetq_lane_s16(__noswap_vgetq_lane_s16(__rev2_404, __p3_404), __rev0_404, __p1_404); \ | |
| 49746 | __ret_404 = __builtin_shufflevector(__ret_404, __ret_404, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49747 | __ret_404; \ | |
| 48044 | 49748 | }) |
| 48045 | 49749 | #endif |
| 48046 | 49750 | |
| 48047 | 49751 | #ifdef __LITTLE_ENDIAN__ |
| 48048 | #define vcopy_laneq_p8(__p0_313, __p1_313, __p2_313, __p3_313) __extension__ ({ \ | |
| 48049 | poly8x8_t __s0_313 = __p0_313; \ | |
| 48050 | poly8x16_t __s2_313 = __p2_313; \ | |
| 48051 | poly8x8_t __ret_313; \ | |
| 48052 | __ret_313 = vset_lane_p8(vgetq_lane_p8(__s2_313, __p3_313), __s0_313, __p1_313); \ | |
| 48053 | __ret_313; \ | |
| 49752 | #define vcopy_laneq_p8(__p0_405, __p1_405, __p2_405, __p3_405) __extension__ ({ \ | |
| 49753 | poly8x8_t __s0_405 = __p0_405; \ | |
| 49754 | poly8x16_t __s2_405 = __p2_405; \ | |
| 49755 | poly8x8_t __ret_405; \ | |
| 49756 | __ret_405 = vset_lane_p8(vgetq_lane_p8(__s2_405, __p3_405), __s0_405, __p1_405); \ | |
| 49757 | __ret_405; \ | |
| 48054 | 49758 | }) |
| 48055 | 49759 | #else |
| 48056 | #define vcopy_laneq_p8(__p0_314, __p1_314, __p2_314, __p3_314) __extension__ ({ \ | |
| 48057 | poly8x8_t __s0_314 = __p0_314; \ | |
| 48058 | poly8x16_t __s2_314 = __p2_314; \ | |
| 48059 | poly8x8_t __rev0_314; __rev0_314 = __builtin_shufflevector(__s0_314, __s0_314, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48060 | poly8x16_t __rev2_314; __rev2_314 = __builtin_shufflevector(__s2_314, __s2_314, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48061 | poly8x8_t __ret_314; \ | |
| 48062 | __ret_314 = __noswap_vset_lane_p8(__noswap_vgetq_lane_p8(__rev2_314, __p3_314), __rev0_314, __p1_314); \ | |
| 48063 | __ret_314 = __builtin_shufflevector(__ret_314, __ret_314, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48064 | __ret_314; \ | |
| 49760 | #define vcopy_laneq_p8(__p0_406, __p1_406, __p2_406, __p3_406) __extension__ ({ \ | |
| 49761 | poly8x8_t __s0_406 = __p0_406; \ | |
| 49762 | poly8x16_t __s2_406 = __p2_406; \ | |
| 49763 | poly8x8_t __rev0_406; __rev0_406 = __builtin_shufflevector(__s0_406, __s0_406, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49764 | poly8x16_t __rev2_406; __rev2_406 = __builtin_shufflevector(__s2_406, __s2_406, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49765 | poly8x8_t __ret_406; \ | |
| 49766 | __ret_406 = __noswap_vset_lane_p8(__noswap_vgetq_lane_p8(__rev2_406, __p3_406), __rev0_406, __p1_406); \ | |
| 49767 | __ret_406 = __builtin_shufflevector(__ret_406, __ret_406, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49768 | __ret_406; \ | |
| 48065 | 49769 | }) |
| 48066 | 49770 | #endif |
| 48067 | 49771 | |
| 48068 | 49772 | #ifdef __LITTLE_ENDIAN__ |
| 48069 | #define vcopy_laneq_p16(__p0_315, __p1_315, __p2_315, __p3_315) __extension__ ({ \ | |
| 48070 | poly16x4_t __s0_315 = __p0_315; \ | |
| 48071 | poly16x8_t __s2_315 = __p2_315; \ | |
| 48072 | poly16x4_t __ret_315; \ | |
| 48073 | __ret_315 = vset_lane_p16(vgetq_lane_p16(__s2_315, __p3_315), __s0_315, __p1_315); \ | |
| 48074 | __ret_315; \ | |
| 49773 | #define vcopy_laneq_p16(__p0_407, __p1_407, __p2_407, __p3_407) __extension__ ({ \ | |
| 49774 | poly16x4_t __s0_407 = __p0_407; \ | |
| 49775 | poly16x8_t __s2_407 = __p2_407; \ | |
| 49776 | poly16x4_t __ret_407; \ | |
| 49777 | __ret_407 = vset_lane_p16(vgetq_lane_p16(__s2_407, __p3_407), __s0_407, __p1_407); \ | |
| 49778 | __ret_407; \ | |
| 48075 | 49779 | }) |
| 48076 | 49780 | #else |
| 48077 | #define vcopy_laneq_p16(__p0_316, __p1_316, __p2_316, __p3_316) __extension__ ({ \ | |
| 48078 | poly16x4_t __s0_316 = __p0_316; \ | |
| 48079 | poly16x8_t __s2_316 = __p2_316; \ | |
| 48080 | poly16x4_t __rev0_316; __rev0_316 = __builtin_shufflevector(__s0_316, __s0_316, 3, 2, 1, 0); \ | |
| 48081 | poly16x8_t __rev2_316; __rev2_316 = __builtin_shufflevector(__s2_316, __s2_316, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48082 | poly16x4_t __ret_316; \ | |
| 48083 | __ret_316 = __noswap_vset_lane_p16(__noswap_vgetq_lane_p16(__rev2_316, __p3_316), __rev0_316, __p1_316); \ | |
| 48084 | __ret_316 = __builtin_shufflevector(__ret_316, __ret_316, 3, 2, 1, 0); \ | |
| 48085 | __ret_316; \ | |
| 49781 | #define vcopy_laneq_p16(__p0_408, __p1_408, __p2_408, __p3_408) __extension__ ({ \ | |
| 49782 | poly16x4_t __s0_408 = __p0_408; \ | |
| 49783 | poly16x8_t __s2_408 = __p2_408; \ | |
| 49784 | poly16x4_t __rev0_408; __rev0_408 = __builtin_shufflevector(__s0_408, __s0_408, 3, 2, 1, 0); \ | |
| 49785 | poly16x8_t __rev2_408; __rev2_408 = __builtin_shufflevector(__s2_408, __s2_408, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49786 | poly16x4_t __ret_408; \ | |
| 49787 | __ret_408 = __noswap_vset_lane_p16(__noswap_vgetq_lane_p16(__rev2_408, __p3_408), __rev0_408, __p1_408); \ | |
| 49788 | __ret_408 = __builtin_shufflevector(__ret_408, __ret_408, 3, 2, 1, 0); \ | |
| 49789 | __ret_408; \ | |
| 48086 | 49790 | }) |
| 48087 | 49791 | #endif |
| 48088 | 49792 | |
| 48089 | 49793 | #ifdef __LITTLE_ENDIAN__ |
| 48090 | #define vcopy_laneq_u8(__p0_317, __p1_317, __p2_317, __p3_317) __extension__ ({ \ | |
| 48091 | uint8x8_t __s0_317 = __p0_317; \ | |
| 48092 | uint8x16_t __s2_317 = __p2_317; \ | |
| 48093 | uint8x8_t __ret_317; \ | |
| 48094 | __ret_317 = vset_lane_u8(vgetq_lane_u8(__s2_317, __p3_317), __s0_317, __p1_317); \ | |
| 48095 | __ret_317; \ | |
| 49794 | #define vcopy_laneq_u8(__p0_409, __p1_409, __p2_409, __p3_409) __extension__ ({ \ | |
| 49795 | uint8x8_t __s0_409 = __p0_409; \ | |
| 49796 | uint8x16_t __s2_409 = __p2_409; \ | |
| 49797 | uint8x8_t __ret_409; \ | |
| 49798 | __ret_409 = vset_lane_u8(vgetq_lane_u8(__s2_409, __p3_409), __s0_409, __p1_409); \ | |
| 49799 | __ret_409; \ | |
| 48096 | 49800 | }) |
| 48097 | 49801 | #else |
| 48098 | #define vcopy_laneq_u8(__p0_318, __p1_318, __p2_318, __p3_318) __extension__ ({ \ | |
| 48099 | uint8x8_t __s0_318 = __p0_318; \ | |
| 48100 | uint8x16_t __s2_318 = __p2_318; \ | |
| 48101 | uint8x8_t __rev0_318; __rev0_318 = __builtin_shufflevector(__s0_318, __s0_318, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48102 | uint8x16_t __rev2_318; __rev2_318 = __builtin_shufflevector(__s2_318, __s2_318, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48103 | uint8x8_t __ret_318; \ | |
| 48104 | __ret_318 = __noswap_vset_lane_u8(__noswap_vgetq_lane_u8(__rev2_318, __p3_318), __rev0_318, __p1_318); \ | |
| 48105 | __ret_318 = __builtin_shufflevector(__ret_318, __ret_318, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48106 | __ret_318; \ | |
| 49802 | #define vcopy_laneq_u8(__p0_410, __p1_410, __p2_410, __p3_410) __extension__ ({ \ | |
| 49803 | uint8x8_t __s0_410 = __p0_410; \ | |
| 49804 | uint8x16_t __s2_410 = __p2_410; \ | |
| 49805 | uint8x8_t __rev0_410; __rev0_410 = __builtin_shufflevector(__s0_410, __s0_410, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49806 | uint8x16_t __rev2_410; __rev2_410 = __builtin_shufflevector(__s2_410, __s2_410, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49807 | uint8x8_t __ret_410; \ | |
| 49808 | __ret_410 = __noswap_vset_lane_u8(__noswap_vgetq_lane_u8(__rev2_410, __p3_410), __rev0_410, __p1_410); \ | |
| 49809 | __ret_410 = __builtin_shufflevector(__ret_410, __ret_410, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49810 | __ret_410; \ | |
| 48107 | 49811 | }) |
| 48108 | 49812 | #endif |
| 48109 | 49813 | |
| 48110 | 49814 | #ifdef __LITTLE_ENDIAN__ |
| 48111 | #define vcopy_laneq_u32(__p0_319, __p1_319, __p2_319, __p3_319) __extension__ ({ \ | |
| 48112 | uint32x2_t __s0_319 = __p0_319; \ | |
| 48113 | uint32x4_t __s2_319 = __p2_319; \ | |
| 48114 | uint32x2_t __ret_319; \ | |
| 48115 | __ret_319 = vset_lane_u32(vgetq_lane_u32(__s2_319, __p3_319), __s0_319, __p1_319); \ | |
| 48116 | __ret_319; \ | |
| 49815 | #define vcopy_laneq_u32(__p0_411, __p1_411, __p2_411, __p3_411) __extension__ ({ \ | |
| 49816 | uint32x2_t __s0_411 = __p0_411; \ | |
| 49817 | uint32x4_t __s2_411 = __p2_411; \ | |
| 49818 | uint32x2_t __ret_411; \ | |
| 49819 | __ret_411 = vset_lane_u32(vgetq_lane_u32(__s2_411, __p3_411), __s0_411, __p1_411); \ | |
| 49820 | __ret_411; \ | |
| 48117 | 49821 | }) |
| 48118 | 49822 | #else |
| 48119 | #define vcopy_laneq_u32(__p0_320, __p1_320, __p2_320, __p3_320) __extension__ ({ \ | |
| 48120 | uint32x2_t __s0_320 = __p0_320; \ | |
| 48121 | uint32x4_t __s2_320 = __p2_320; \ | |
| 48122 | uint32x2_t __rev0_320; __rev0_320 = __builtin_shufflevector(__s0_320, __s0_320, 1, 0); \ | |
| 48123 | uint32x4_t __rev2_320; __rev2_320 = __builtin_shufflevector(__s2_320, __s2_320, 3, 2, 1, 0); \ | |
| 48124 | uint32x2_t __ret_320; \ | |
| 48125 | __ret_320 = __noswap_vset_lane_u32(__noswap_vgetq_lane_u32(__rev2_320, __p3_320), __rev0_320, __p1_320); \ | |
| 48126 | __ret_320 = __builtin_shufflevector(__ret_320, __ret_320, 1, 0); \ | |
| 48127 | __ret_320; \ | |
| 49823 | #define vcopy_laneq_u32(__p0_412, __p1_412, __p2_412, __p3_412) __extension__ ({ \ | |
| 49824 | uint32x2_t __s0_412 = __p0_412; \ | |
| 49825 | uint32x4_t __s2_412 = __p2_412; \ | |
| 49826 | uint32x2_t __rev0_412; __rev0_412 = __builtin_shufflevector(__s0_412, __s0_412, 1, 0); \ | |
| 49827 | uint32x4_t __rev2_412; __rev2_412 = __builtin_shufflevector(__s2_412, __s2_412, 3, 2, 1, 0); \ | |
| 49828 | uint32x2_t __ret_412; \ | |
| 49829 | __ret_412 = __noswap_vset_lane_u32(__noswap_vgetq_lane_u32(__rev2_412, __p3_412), __rev0_412, __p1_412); \ | |
| 49830 | __ret_412 = __builtin_shufflevector(__ret_412, __ret_412, 1, 0); \ | |
| 49831 | __ret_412; \ | |
| 48128 | 49832 | }) |
| 48129 | 49833 | #endif |
| 48130 | 49834 | |
| 48131 | 49835 | #ifdef __LITTLE_ENDIAN__ |
| 48132 | #define vcopy_laneq_u64(__p0_321, __p1_321, __p2_321, __p3_321) __extension__ ({ \ | |
| 48133 | uint64x1_t __s0_321 = __p0_321; \ | |
| 48134 | uint64x2_t __s2_321 = __p2_321; \ | |
| 48135 | uint64x1_t __ret_321; \ | |
| 48136 | __ret_321 = vset_lane_u64(vgetq_lane_u64(__s2_321, __p3_321), __s0_321, __p1_321); \ | |
| 48137 | __ret_321; \ | |
| 49836 | #define vcopy_laneq_u64(__p0_413, __p1_413, __p2_413, __p3_413) __extension__ ({ \ | |
| 49837 | uint64x1_t __s0_413 = __p0_413; \ | |
| 49838 | uint64x2_t __s2_413 = __p2_413; \ | |
| 49839 | uint64x1_t __ret_413; \ | |
| 49840 | __ret_413 = vset_lane_u64(vgetq_lane_u64(__s2_413, __p3_413), __s0_413, __p1_413); \ | |
| 49841 | __ret_413; \ | |
| 48138 | 49842 | }) |
| 48139 | 49843 | #else |
| 48140 | #define vcopy_laneq_u64(__p0_322, __p1_322, __p2_322, __p3_322) __extension__ ({ \ | |
| 48141 | uint64x1_t __s0_322 = __p0_322; \ | |
| 48142 | uint64x2_t __s2_322 = __p2_322; \ | |
| 48143 | uint64x2_t __rev2_322; __rev2_322 = __builtin_shufflevector(__s2_322, __s2_322, 1, 0); \ | |
| 48144 | uint64x1_t __ret_322; \ | |
| 48145 | __ret_322 = vset_lane_u64(__noswap_vgetq_lane_u64(__rev2_322, __p3_322), __s0_322, __p1_322); \ | |
| 48146 | __ret_322; \ | |
| 49844 | #define vcopy_laneq_u64(__p0_414, __p1_414, __p2_414, __p3_414) __extension__ ({ \ | |
| 49845 | uint64x1_t __s0_414 = __p0_414; \ | |
| 49846 | uint64x2_t __s2_414 = __p2_414; \ | |
| 49847 | uint64x2_t __rev2_414; __rev2_414 = __builtin_shufflevector(__s2_414, __s2_414, 1, 0); \ | |
| 49848 | uint64x1_t __ret_414; \ | |
| 49849 | __ret_414 = vset_lane_u64(__noswap_vgetq_lane_u64(__rev2_414, __p3_414), __s0_414, __p1_414); \ | |
| 49850 | __ret_414; \ | |
| 48147 | 49851 | }) |
| 48148 | 49852 | #endif |
| 48149 | 49853 | |
| 48150 | 49854 | #ifdef __LITTLE_ENDIAN__ |
| 48151 | #define vcopy_laneq_u16(__p0_323, __p1_323, __p2_323, __p3_323) __extension__ ({ \ | |
| 48152 | uint16x4_t __s0_323 = __p0_323; \ | |
| 48153 | uint16x8_t __s2_323 = __p2_323; \ | |
| 48154 | uint16x4_t __ret_323; \ | |
| 48155 | __ret_323 = vset_lane_u16(vgetq_lane_u16(__s2_323, __p3_323), __s0_323, __p1_323); \ | |
| 48156 | __ret_323; \ | |
| 49855 | #define vcopy_laneq_u16(__p0_415, __p1_415, __p2_415, __p3_415) __extension__ ({ \ | |
| 49856 | uint16x4_t __s0_415 = __p0_415; \ | |
| 49857 | uint16x8_t __s2_415 = __p2_415; \ | |
| 49858 | uint16x4_t __ret_415; \ | |
| 49859 | __ret_415 = vset_lane_u16(vgetq_lane_u16(__s2_415, __p3_415), __s0_415, __p1_415); \ | |
| 49860 | __ret_415; \ | |
| 48157 | 49861 | }) |
| 48158 | 49862 | #else |
| 48159 | #define vcopy_laneq_u16(__p0_324, __p1_324, __p2_324, __p3_324) __extension__ ({ \ | |
| 48160 | uint16x4_t __s0_324 = __p0_324; \ | |
| 48161 | uint16x8_t __s2_324 = __p2_324; \ | |
| 48162 | uint16x4_t __rev0_324; __rev0_324 = __builtin_shufflevector(__s0_324, __s0_324, 3, 2, 1, 0); \ | |
| 48163 | uint16x8_t __rev2_324; __rev2_324 = __builtin_shufflevector(__s2_324, __s2_324, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48164 | uint16x4_t __ret_324; \ | |
| 48165 | __ret_324 = __noswap_vset_lane_u16(__noswap_vgetq_lane_u16(__rev2_324, __p3_324), __rev0_324, __p1_324); \ | |
| 48166 | __ret_324 = __builtin_shufflevector(__ret_324, __ret_324, 3, 2, 1, 0); \ | |
| 48167 | __ret_324; \ | |
| 49863 | #define vcopy_laneq_u16(__p0_416, __p1_416, __p2_416, __p3_416) __extension__ ({ \ | |
| 49864 | uint16x4_t __s0_416 = __p0_416; \ | |
| 49865 | uint16x8_t __s2_416 = __p2_416; \ | |
| 49866 | uint16x4_t __rev0_416; __rev0_416 = __builtin_shufflevector(__s0_416, __s0_416, 3, 2, 1, 0); \ | |
| 49867 | uint16x8_t __rev2_416; __rev2_416 = __builtin_shufflevector(__s2_416, __s2_416, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49868 | uint16x4_t __ret_416; \ | |
| 49869 | __ret_416 = __noswap_vset_lane_u16(__noswap_vgetq_lane_u16(__rev2_416, __p3_416), __rev0_416, __p1_416); \ | |
| 49870 | __ret_416 = __builtin_shufflevector(__ret_416, __ret_416, 3, 2, 1, 0); \ | |
| 49871 | __ret_416; \ | |
| 48168 | 49872 | }) |
| 48169 | 49873 | #endif |
| 48170 | 49874 | |
| 48171 | 49875 | #ifdef __LITTLE_ENDIAN__ |
| 48172 | #define vcopy_laneq_s8(__p0_325, __p1_325, __p2_325, __p3_325) __extension__ ({ \ | |
| 48173 | int8x8_t __s0_325 = __p0_325; \ | |
| 48174 | int8x16_t __s2_325 = __p2_325; \ | |
| 48175 | int8x8_t __ret_325; \ | |
| 48176 | __ret_325 = vset_lane_s8(vgetq_lane_s8(__s2_325, __p3_325), __s0_325, __p1_325); \ | |
| 48177 | __ret_325; \ | |
| 49876 | #define vcopy_laneq_s8(__p0_417, __p1_417, __p2_417, __p3_417) __extension__ ({ \ | |
| 49877 | int8x8_t __s0_417 = __p0_417; \ | |
| 49878 | int8x16_t __s2_417 = __p2_417; \ | |
| 49879 | int8x8_t __ret_417; \ | |
| 49880 | __ret_417 = vset_lane_s8(vgetq_lane_s8(__s2_417, __p3_417), __s0_417, __p1_417); \ | |
| 49881 | __ret_417; \ | |
| 48178 | 49882 | }) |
| 48179 | 49883 | #else |
| 48180 | #define vcopy_laneq_s8(__p0_326, __p1_326, __p2_326, __p3_326) __extension__ ({ \ | |
| 48181 | int8x8_t __s0_326 = __p0_326; \ | |
| 48182 | int8x16_t __s2_326 = __p2_326; \ | |
| 48183 | int8x8_t __rev0_326; __rev0_326 = __builtin_shufflevector(__s0_326, __s0_326, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48184 | int8x16_t __rev2_326; __rev2_326 = __builtin_shufflevector(__s2_326, __s2_326, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48185 | int8x8_t __ret_326; \ | |
| 48186 | __ret_326 = __noswap_vset_lane_s8(__noswap_vgetq_lane_s8(__rev2_326, __p3_326), __rev0_326, __p1_326); \ | |
| 48187 | __ret_326 = __builtin_shufflevector(__ret_326, __ret_326, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48188 | __ret_326; \ | |
| 49884 | #define vcopy_laneq_s8(__p0_418, __p1_418, __p2_418, __p3_418) __extension__ ({ \ | |
| 49885 | int8x8_t __s0_418 = __p0_418; \ | |
| 49886 | int8x16_t __s2_418 = __p2_418; \ | |
| 49887 | int8x8_t __rev0_418; __rev0_418 = __builtin_shufflevector(__s0_418, __s0_418, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49888 | int8x16_t __rev2_418; __rev2_418 = __builtin_shufflevector(__s2_418, __s2_418, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49889 | int8x8_t __ret_418; \ | |
| 49890 | __ret_418 = __noswap_vset_lane_s8(__noswap_vgetq_lane_s8(__rev2_418, __p3_418), __rev0_418, __p1_418); \ | |
| 49891 | __ret_418 = __builtin_shufflevector(__ret_418, __ret_418, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49892 | __ret_418; \ | |
| 48189 | 49893 | }) |
| 48190 | 49894 | #endif |
| 48191 | 49895 | |
| 48192 | 49896 | #ifdef __LITTLE_ENDIAN__ |
| 48193 | #define vcopy_laneq_f32(__p0_327, __p1_327, __p2_327, __p3_327) __extension__ ({ \ | |
| 48194 | float32x2_t __s0_327 = __p0_327; \ | |
| 48195 | float32x4_t __s2_327 = __p2_327; \ | |
| 48196 | float32x2_t __ret_327; \ | |
| 48197 | __ret_327 = vset_lane_f32(vgetq_lane_f32(__s2_327, __p3_327), __s0_327, __p1_327); \ | |
| 48198 | __ret_327; \ | |
| 49897 | #define vcopy_laneq_f32(__p0_419, __p1_419, __p2_419, __p3_419) __extension__ ({ \ | |
| 49898 | float32x2_t __s0_419 = __p0_419; \ | |
| 49899 | float32x4_t __s2_419 = __p2_419; \ | |
| 49900 | float32x2_t __ret_419; \ | |
| 49901 | __ret_419 = vset_lane_f32(vgetq_lane_f32(__s2_419, __p3_419), __s0_419, __p1_419); \ | |
| 49902 | __ret_419; \ | |
| 48199 | 49903 | }) |
| 48200 | 49904 | #else |
| 48201 | #define vcopy_laneq_f32(__p0_328, __p1_328, __p2_328, __p3_328) __extension__ ({ \ | |
| 48202 | float32x2_t __s0_328 = __p0_328; \ | |
| 48203 | float32x4_t __s2_328 = __p2_328; \ | |
| 48204 | float32x2_t __rev0_328; __rev0_328 = __builtin_shufflevector(__s0_328, __s0_328, 1, 0); \ | |
| 48205 | float32x4_t __rev2_328; __rev2_328 = __builtin_shufflevector(__s2_328, __s2_328, 3, 2, 1, 0); \ | |
| 48206 | float32x2_t __ret_328; \ | |
| 48207 | __ret_328 = __noswap_vset_lane_f32(__noswap_vgetq_lane_f32(__rev2_328, __p3_328), __rev0_328, __p1_328); \ | |
| 48208 | __ret_328 = __builtin_shufflevector(__ret_328, __ret_328, 1, 0); \ | |
| 48209 | __ret_328; \ | |
| 49905 | #define vcopy_laneq_f32(__p0_420, __p1_420, __p2_420, __p3_420) __extension__ ({ \ | |
| 49906 | float32x2_t __s0_420 = __p0_420; \ | |
| 49907 | float32x4_t __s2_420 = __p2_420; \ | |
| 49908 | float32x2_t __rev0_420; __rev0_420 = __builtin_shufflevector(__s0_420, __s0_420, 1, 0); \ | |
| 49909 | float32x4_t __rev2_420; __rev2_420 = __builtin_shufflevector(__s2_420, __s2_420, 3, 2, 1, 0); \ | |
| 49910 | float32x2_t __ret_420; \ | |
| 49911 | __ret_420 = __noswap_vset_lane_f32(__noswap_vgetq_lane_f32(__rev2_420, __p3_420), __rev0_420, __p1_420); \ | |
| 49912 | __ret_420 = __builtin_shufflevector(__ret_420, __ret_420, 1, 0); \ | |
| 49913 | __ret_420; \ | |
| 48210 | 49914 | }) |
| 48211 | 49915 | #endif |
| 48212 | 49916 | |
| 48213 | 49917 | #ifdef __LITTLE_ENDIAN__ |
| 48214 | #define vcopy_laneq_s32(__p0_329, __p1_329, __p2_329, __p3_329) __extension__ ({ \ | |
| 48215 | int32x2_t __s0_329 = __p0_329; \ | |
| 48216 | int32x4_t __s2_329 = __p2_329; \ | |
| 48217 | int32x2_t __ret_329; \ | |
| 48218 | __ret_329 = vset_lane_s32(vgetq_lane_s32(__s2_329, __p3_329), __s0_329, __p1_329); \ | |
| 48219 | __ret_329; \ | |
| 49918 | #define vcopy_laneq_s32(__p0_421, __p1_421, __p2_421, __p3_421) __extension__ ({ \ | |
| 49919 | int32x2_t __s0_421 = __p0_421; \ | |
| 49920 | int32x4_t __s2_421 = __p2_421; \ | |
| 49921 | int32x2_t __ret_421; \ | |
| 49922 | __ret_421 = vset_lane_s32(vgetq_lane_s32(__s2_421, __p3_421), __s0_421, __p1_421); \ | |
| 49923 | __ret_421; \ | |
| 48220 | 49924 | }) |
| 48221 | 49925 | #else |
| 48222 | #define vcopy_laneq_s32(__p0_330, __p1_330, __p2_330, __p3_330) __extension__ ({ \ | |
| 48223 | int32x2_t __s0_330 = __p0_330; \ | |
| 48224 | int32x4_t __s2_330 = __p2_330; \ | |
| 48225 | int32x2_t __rev0_330; __rev0_330 = __builtin_shufflevector(__s0_330, __s0_330, 1, 0); \ | |
| 48226 | int32x4_t __rev2_330; __rev2_330 = __builtin_shufflevector(__s2_330, __s2_330, 3, 2, 1, 0); \ | |
| 48227 | int32x2_t __ret_330; \ | |
| 48228 | __ret_330 = __noswap_vset_lane_s32(__noswap_vgetq_lane_s32(__rev2_330, __p3_330), __rev0_330, __p1_330); \ | |
| 48229 | __ret_330 = __builtin_shufflevector(__ret_330, __ret_330, 1, 0); \ | |
| 48230 | __ret_330; \ | |
| 49926 | #define vcopy_laneq_s32(__p0_422, __p1_422, __p2_422, __p3_422) __extension__ ({ \ | |
| 49927 | int32x2_t __s0_422 = __p0_422; \ | |
| 49928 | int32x4_t __s2_422 = __p2_422; \ | |
| 49929 | int32x2_t __rev0_422; __rev0_422 = __builtin_shufflevector(__s0_422, __s0_422, 1, 0); \ | |
| 49930 | int32x4_t __rev2_422; __rev2_422 = __builtin_shufflevector(__s2_422, __s2_422, 3, 2, 1, 0); \ | |
| 49931 | int32x2_t __ret_422; \ | |
| 49932 | __ret_422 = __noswap_vset_lane_s32(__noswap_vgetq_lane_s32(__rev2_422, __p3_422), __rev0_422, __p1_422); \ | |
| 49933 | __ret_422 = __builtin_shufflevector(__ret_422, __ret_422, 1, 0); \ | |
| 49934 | __ret_422; \ | |
| 48231 | 49935 | }) |
| 48232 | 49936 | #endif |
| 48233 | 49937 | |
| 48234 | 49938 | #ifdef __LITTLE_ENDIAN__ |
| 48235 | #define vcopy_laneq_s64(__p0_331, __p1_331, __p2_331, __p3_331) __extension__ ({ \ | |
| 48236 | int64x1_t __s0_331 = __p0_331; \ | |
| 48237 | int64x2_t __s2_331 = __p2_331; \ | |
| 48238 | int64x1_t __ret_331; \ | |
| 48239 | __ret_331 = vset_lane_s64(vgetq_lane_s64(__s2_331, __p3_331), __s0_331, __p1_331); \ | |
| 48240 | __ret_331; \ | |
| 49939 | #define vcopy_laneq_s64(__p0_423, __p1_423, __p2_423, __p3_423) __extension__ ({ \ | |
| 49940 | int64x1_t __s0_423 = __p0_423; \ | |
| 49941 | int64x2_t __s2_423 = __p2_423; \ | |
| 49942 | int64x1_t __ret_423; \ | |
| 49943 | __ret_423 = vset_lane_s64(vgetq_lane_s64(__s2_423, __p3_423), __s0_423, __p1_423); \ | |
| 49944 | __ret_423; \ | |
| 48241 | 49945 | }) |
| 48242 | 49946 | #else |
| 48243 | #define vcopy_laneq_s64(__p0_332, __p1_332, __p2_332, __p3_332) __extension__ ({ \ | |
| 48244 | int64x1_t __s0_332 = __p0_332; \ | |
| 48245 | int64x2_t __s2_332 = __p2_332; \ | |
| 48246 | int64x2_t __rev2_332; __rev2_332 = __builtin_shufflevector(__s2_332, __s2_332, 1, 0); \ | |
| 48247 | int64x1_t __ret_332; \ | |
| 48248 | __ret_332 = vset_lane_s64(__noswap_vgetq_lane_s64(__rev2_332, __p3_332), __s0_332, __p1_332); \ | |
| 48249 | __ret_332; \ | |
| 49947 | #define vcopy_laneq_s64(__p0_424, __p1_424, __p2_424, __p3_424) __extension__ ({ \ | |
| 49948 | int64x1_t __s0_424 = __p0_424; \ | |
| 49949 | int64x2_t __s2_424 = __p2_424; \ | |
| 49950 | int64x2_t __rev2_424; __rev2_424 = __builtin_shufflevector(__s2_424, __s2_424, 1, 0); \ | |
| 49951 | int64x1_t __ret_424; \ | |
| 49952 | __ret_424 = vset_lane_s64(__noswap_vgetq_lane_s64(__rev2_424, __p3_424), __s0_424, __p1_424); \ | |
| 49953 | __ret_424; \ | |
| 48250 | 49954 | }) |
| 48251 | 49955 | #endif |
| 48252 | 49956 | |
| 48253 | 49957 | #ifdef __LITTLE_ENDIAN__ |
| 48254 | #define vcopy_laneq_s16(__p0_333, __p1_333, __p2_333, __p3_333) __extension__ ({ \ | |
| 48255 | int16x4_t __s0_333 = __p0_333; \ | |
| 48256 | int16x8_t __s2_333 = __p2_333; \ | |
| 48257 | int16x4_t __ret_333; \ | |
| 48258 | __ret_333 = vset_lane_s16(vgetq_lane_s16(__s2_333, __p3_333), __s0_333, __p1_333); \ | |
| 48259 | __ret_333; \ | |
| 49958 | #define vcopy_laneq_s16(__p0_425, __p1_425, __p2_425, __p3_425) __extension__ ({ \ | |
| 49959 | int16x4_t __s0_425 = __p0_425; \ | |
| 49960 | int16x8_t __s2_425 = __p2_425; \ | |
| 49961 | int16x4_t __ret_425; \ | |
| 49962 | __ret_425 = vset_lane_s16(vgetq_lane_s16(__s2_425, __p3_425), __s0_425, __p1_425); \ | |
| 49963 | __ret_425; \ | |
| 48260 | 49964 | }) |
| 48261 | 49965 | #else |
| 48262 | #define vcopy_laneq_s16(__p0_334, __p1_334, __p2_334, __p3_334) __extension__ ({ \ | |
| 48263 | int16x4_t __s0_334 = __p0_334; \ | |
| 48264 | int16x8_t __s2_334 = __p2_334; \ | |
| 48265 | int16x4_t __rev0_334; __rev0_334 = __builtin_shufflevector(__s0_334, __s0_334, 3, 2, 1, 0); \ | |
| 48266 | int16x8_t __rev2_334; __rev2_334 = __builtin_shufflevector(__s2_334, __s2_334, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 48267 | int16x4_t __ret_334; \ | |
| 48268 | __ret_334 = __noswap_vset_lane_s16(__noswap_vgetq_lane_s16(__rev2_334, __p3_334), __rev0_334, __p1_334); \ | |
| 48269 | __ret_334 = __builtin_shufflevector(__ret_334, __ret_334, 3, 2, 1, 0); \ | |
| 48270 | __ret_334; \ | |
| 49966 | #define vcopy_laneq_s16(__p0_426, __p1_426, __p2_426, __p3_426) __extension__ ({ \ | |
| 49967 | int16x4_t __s0_426 = __p0_426; \ | |
| 49968 | int16x8_t __s2_426 = __p2_426; \ | |
| 49969 | int16x4_t __rev0_426; __rev0_426 = __builtin_shufflevector(__s0_426, __s0_426, 3, 2, 1, 0); \ | |
| 49970 | int16x8_t __rev2_426; __rev2_426 = __builtin_shufflevector(__s2_426, __s2_426, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49971 | int16x4_t __ret_426; \ | |
| 49972 | __ret_426 = __noswap_vset_lane_s16(__noswap_vgetq_lane_s16(__rev2_426, __p3_426), __rev0_426, __p1_426); \ | |
| 49973 | __ret_426 = __builtin_shufflevector(__ret_426, __ret_426, 3, 2, 1, 0); \ | |
| 49974 | __ret_426; \ | |
| 48271 | 49975 | }) |
| 48272 | 49976 | #endif |
| 48273 | 49977 | |
| ... | ... | @@ -49009,85 +50713,85 @@ __ai float32x2_t vdiv_f32(float32x2_t __p0, float32x2_t __p1) { |
| 49009 | 50713 | }) |
| 49010 | 50714 | #endif |
| 49011 | 50715 | |
| 49012 | #define vdup_lane_p64(__p0_335, __p1_335) __extension__ ({ \ | |
| 49013 | poly64x1_t __s0_335 = __p0_335; \ | |
| 49014 | poly64x1_t __ret_335; \ | |
| 49015 | __ret_335 = splat_lane_p64(__s0_335, __p1_335); \ | |
| 49016 | __ret_335; \ | |
| 50716 | #define vdup_lane_p64(__p0_427, __p1_427) __extension__ ({ \ | |
| 50717 | poly64x1_t __s0_427 = __p0_427; \ | |
| 50718 | poly64x1_t __ret_427; \ | |
| 50719 | __ret_427 = splat_lane_p64(__s0_427, __p1_427); \ | |
| 50720 | __ret_427; \ | |
| 49017 | 50721 | }) |
| 49018 | 50722 | #ifdef __LITTLE_ENDIAN__ |
| 49019 | #define vdupq_lane_p64(__p0_336, __p1_336) __extension__ ({ \ | |
| 49020 | poly64x1_t __s0_336 = __p0_336; \ | |
| 49021 | poly64x2_t __ret_336; \ | |
| 49022 | __ret_336 = splatq_lane_p64(__s0_336, __p1_336); \ | |
| 49023 | __ret_336; \ | |
| 50723 | #define vdupq_lane_p64(__p0_428, __p1_428) __extension__ ({ \ | |
| 50724 | poly64x1_t __s0_428 = __p0_428; \ | |
| 50725 | poly64x2_t __ret_428; \ | |
| 50726 | __ret_428 = splatq_lane_p64(__s0_428, __p1_428); \ | |
| 50727 | __ret_428; \ | |
| 49024 | 50728 | }) |
| 49025 | 50729 | #else |
| 49026 | #define vdupq_lane_p64(__p0_337, __p1_337) __extension__ ({ \ | |
| 49027 | poly64x1_t __s0_337 = __p0_337; \ | |
| 49028 | poly64x2_t __ret_337; \ | |
| 49029 | __ret_337 = __noswap_splatq_lane_p64(__s0_337, __p1_337); \ | |
| 49030 | __ret_337 = __builtin_shufflevector(__ret_337, __ret_337, 1, 0); \ | |
| 49031 | __ret_337; \ | |
| 50730 | #define vdupq_lane_p64(__p0_429, __p1_429) __extension__ ({ \ | |
| 50731 | poly64x1_t __s0_429 = __p0_429; \ | |
| 50732 | poly64x2_t __ret_429; \ | |
| 50733 | __ret_429 = __noswap_splatq_lane_p64(__s0_429, __p1_429); \ | |
| 50734 | __ret_429 = __builtin_shufflevector(__ret_429, __ret_429, 1, 0); \ | |
| 50735 | __ret_429; \ | |
| 49032 | 50736 | }) |
| 49033 | 50737 | #endif |
| 49034 | 50738 | |
| 49035 | 50739 | #ifdef __LITTLE_ENDIAN__ |
| 49036 | #define vdupq_lane_f64(__p0_338, __p1_338) __extension__ ({ \ | |
| 49037 | float64x1_t __s0_338 = __p0_338; \ | |
| 49038 | float64x2_t __ret_338; \ | |
| 49039 | __ret_338 = splatq_lane_f64(__s0_338, __p1_338); \ | |
| 49040 | __ret_338; \ | |
| 50740 | #define vdupq_lane_f64(__p0_430, __p1_430) __extension__ ({ \ | |
| 50741 | float64x1_t __s0_430 = __p0_430; \ | |
| 50742 | float64x2_t __ret_430; \ | |
| 50743 | __ret_430 = splatq_lane_f64(__s0_430, __p1_430); \ | |
| 50744 | __ret_430; \ | |
| 49041 | 50745 | }) |
| 49042 | 50746 | #else |
| 49043 | #define vdupq_lane_f64(__p0_339, __p1_339) __extension__ ({ \ | |
| 49044 | float64x1_t __s0_339 = __p0_339; \ | |
| 49045 | float64x2_t __ret_339; \ | |
| 49046 | __ret_339 = __noswap_splatq_lane_f64(__s0_339, __p1_339); \ | |
| 49047 | __ret_339 = __builtin_shufflevector(__ret_339, __ret_339, 1, 0); \ | |
| 49048 | __ret_339; \ | |
| 50747 | #define vdupq_lane_f64(__p0_431, __p1_431) __extension__ ({ \ | |
| 50748 | float64x1_t __s0_431 = __p0_431; \ | |
| 50749 | float64x2_t __ret_431; \ | |
| 50750 | __ret_431 = __noswap_splatq_lane_f64(__s0_431, __p1_431); \ | |
| 50751 | __ret_431 = __builtin_shufflevector(__ret_431, __ret_431, 1, 0); \ | |
| 50752 | __ret_431; \ | |
| 49049 | 50753 | }) |
| 49050 | 50754 | #endif |
| 49051 | 50755 | |
| 49052 | 50756 | #ifdef __LITTLE_ENDIAN__ |
| 49053 | #define vdupq_lane_f16(__p0_340, __p1_340) __extension__ ({ \ | |
| 49054 | float16x4_t __s0_340 = __p0_340; \ | |
| 49055 | float16x8_t __ret_340; \ | |
| 49056 | __ret_340 = splatq_lane_f16(__s0_340, __p1_340); \ | |
| 49057 | __ret_340; \ | |
| 50757 | #define vdupq_lane_f16(__p0_432, __p1_432) __extension__ ({ \ | |
| 50758 | float16x4_t __s0_432 = __p0_432; \ | |
| 50759 | float16x8_t __ret_432; \ | |
| 50760 | __ret_432 = splatq_lane_f16(__s0_432, __p1_432); \ | |
| 50761 | __ret_432; \ | |
| 49058 | 50762 | }) |
| 49059 | 50763 | #else |
| 49060 | #define vdupq_lane_f16(__p0_341, __p1_341) __extension__ ({ \ | |
| 49061 | float16x4_t __s0_341 = __p0_341; \ | |
| 49062 | float16x4_t __rev0_341; __rev0_341 = __builtin_shufflevector(__s0_341, __s0_341, 3, 2, 1, 0); \ | |
| 49063 | float16x8_t __ret_341; \ | |
| 49064 | __ret_341 = __noswap_splatq_lane_f16(__rev0_341, __p1_341); \ | |
| 49065 | __ret_341 = __builtin_shufflevector(__ret_341, __ret_341, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49066 | __ret_341; \ | |
| 50764 | #define vdupq_lane_f16(__p0_433, __p1_433) __extension__ ({ \ | |
| 50765 | float16x4_t __s0_433 = __p0_433; \ | |
| 50766 | float16x4_t __rev0_433; __rev0_433 = __builtin_shufflevector(__s0_433, __s0_433, 3, 2, 1, 0); \ | |
| 50767 | float16x8_t __ret_433; \ | |
| 50768 | __ret_433 = __noswap_splatq_lane_f16(__rev0_433, __p1_433); \ | |
| 50769 | __ret_433 = __builtin_shufflevector(__ret_433, __ret_433, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 50770 | __ret_433; \ | |
| 49067 | 50771 | }) |
| 49068 | 50772 | #endif |
| 49069 | 50773 | |
| 49070 | #define vdup_lane_f64(__p0_342, __p1_342) __extension__ ({ \ | |
| 49071 | float64x1_t __s0_342 = __p0_342; \ | |
| 49072 | float64x1_t __ret_342; \ | |
| 49073 | __ret_342 = splat_lane_f64(__s0_342, __p1_342); \ | |
| 49074 | __ret_342; \ | |
| 50774 | #define vdup_lane_f64(__p0_434, __p1_434) __extension__ ({ \ | |
| 50775 | float64x1_t __s0_434 = __p0_434; \ | |
| 50776 | float64x1_t __ret_434; \ | |
| 50777 | __ret_434 = splat_lane_f64(__s0_434, __p1_434); \ | |
| 50778 | __ret_434; \ | |
| 49075 | 50779 | }) |
| 49076 | 50780 | #ifdef __LITTLE_ENDIAN__ |
| 49077 | #define vdup_lane_f16(__p0_343, __p1_343) __extension__ ({ \ | |
| 49078 | float16x4_t __s0_343 = __p0_343; \ | |
| 49079 | float16x4_t __ret_343; \ | |
| 49080 | __ret_343 = splat_lane_f16(__s0_343, __p1_343); \ | |
| 49081 | __ret_343; \ | |
| 50781 | #define vdup_lane_f16(__p0_435, __p1_435) __extension__ ({ \ | |
| 50782 | float16x4_t __s0_435 = __p0_435; \ | |
| 50783 | float16x4_t __ret_435; \ | |
| 50784 | __ret_435 = splat_lane_f16(__s0_435, __p1_435); \ | |
| 50785 | __ret_435; \ | |
| 49082 | 50786 | }) |
| 49083 | 50787 | #else |
| 49084 | #define vdup_lane_f16(__p0_344, __p1_344) __extension__ ({ \ | |
| 49085 | float16x4_t __s0_344 = __p0_344; \ | |
| 49086 | float16x4_t __rev0_344; __rev0_344 = __builtin_shufflevector(__s0_344, __s0_344, 3, 2, 1, 0); \ | |
| 49087 | float16x4_t __ret_344; \ | |
| 49088 | __ret_344 = __noswap_splat_lane_f16(__rev0_344, __p1_344); \ | |
| 49089 | __ret_344 = __builtin_shufflevector(__ret_344, __ret_344, 3, 2, 1, 0); \ | |
| 49090 | __ret_344; \ | |
| 50788 | #define vdup_lane_f16(__p0_436, __p1_436) __extension__ ({ \ | |
| 50789 | float16x4_t __s0_436 = __p0_436; \ | |
| 50790 | float16x4_t __rev0_436; __rev0_436 = __builtin_shufflevector(__s0_436, __s0_436, 3, 2, 1, 0); \ | |
| 50791 | float16x4_t __ret_436; \ | |
| 50792 | __ret_436 = __noswap_splat_lane_f16(__rev0_436, __p1_436); \ | |
| 50793 | __ret_436 = __builtin_shufflevector(__ret_436, __ret_436, 3, 2, 1, 0); \ | |
| 50794 | __ret_436; \ | |
| 49091 | 50795 | }) |
| 49092 | 50796 | #endif |
| 49093 | 50797 | |
| ... | ... | @@ -49296,502 +51000,502 @@ __ai float32x2_t vdiv_f32(float32x2_t __p0, float32x2_t __p1) { |
| 49296 | 51000 | #endif |
| 49297 | 51001 | |
| 49298 | 51002 | #ifdef __LITTLE_ENDIAN__ |
| 49299 | #define vdup_laneq_p8(__p0_345, __p1_345) __extension__ ({ \ | |
| 49300 | poly8x16_t __s0_345 = __p0_345; \ | |
| 49301 | poly8x8_t __ret_345; \ | |
| 49302 | __ret_345 = splat_laneq_p8(__s0_345, __p1_345); \ | |
| 49303 | __ret_345; \ | |
| 51003 | #define vdup_laneq_p8(__p0_437, __p1_437) __extension__ ({ \ | |
| 51004 | poly8x16_t __s0_437 = __p0_437; \ | |
| 51005 | poly8x8_t __ret_437; \ | |
| 51006 | __ret_437 = splat_laneq_p8(__s0_437, __p1_437); \ | |
| 51007 | __ret_437; \ | |
| 49304 | 51008 | }) |
| 49305 | 51009 | #else |
| 49306 | #define vdup_laneq_p8(__p0_346, __p1_346) __extension__ ({ \ | |
| 49307 | poly8x16_t __s0_346 = __p0_346; \ | |
| 49308 | poly8x16_t __rev0_346; __rev0_346 = __builtin_shufflevector(__s0_346, __s0_346, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49309 | poly8x8_t __ret_346; \ | |
| 49310 | __ret_346 = __noswap_splat_laneq_p8(__rev0_346, __p1_346); \ | |
| 49311 | __ret_346 = __builtin_shufflevector(__ret_346, __ret_346, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49312 | __ret_346; \ | |
| 51010 | #define vdup_laneq_p8(__p0_438, __p1_438) __extension__ ({ \ | |
| 51011 | poly8x16_t __s0_438 = __p0_438; \ | |
| 51012 | poly8x16_t __rev0_438; __rev0_438 = __builtin_shufflevector(__s0_438, __s0_438, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51013 | poly8x8_t __ret_438; \ | |
| 51014 | __ret_438 = __noswap_splat_laneq_p8(__rev0_438, __p1_438); \ | |
| 51015 | __ret_438 = __builtin_shufflevector(__ret_438, __ret_438, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51016 | __ret_438; \ | |
| 49313 | 51017 | }) |
| 49314 | 51018 | #endif |
| 49315 | 51019 | |
| 49316 | 51020 | #ifdef __LITTLE_ENDIAN__ |
| 49317 | #define vdup_laneq_p64(__p0_347, __p1_347) __extension__ ({ \ | |
| 49318 | poly64x2_t __s0_347 = __p0_347; \ | |
| 49319 | poly64x1_t __ret_347; \ | |
| 49320 | __ret_347 = splat_laneq_p64(__s0_347, __p1_347); \ | |
| 49321 | __ret_347; \ | |
| 51021 | #define vdup_laneq_p64(__p0_439, __p1_439) __extension__ ({ \ | |
| 51022 | poly64x2_t __s0_439 = __p0_439; \ | |
| 51023 | poly64x1_t __ret_439; \ | |
| 51024 | __ret_439 = splat_laneq_p64(__s0_439, __p1_439); \ | |
| 51025 | __ret_439; \ | |
| 49322 | 51026 | }) |
| 49323 | 51027 | #else |
| 49324 | #define vdup_laneq_p64(__p0_348, __p1_348) __extension__ ({ \ | |
| 49325 | poly64x2_t __s0_348 = __p0_348; \ | |
| 49326 | poly64x2_t __rev0_348; __rev0_348 = __builtin_shufflevector(__s0_348, __s0_348, 1, 0); \ | |
| 49327 | poly64x1_t __ret_348; \ | |
| 49328 | __ret_348 = __noswap_splat_laneq_p64(__rev0_348, __p1_348); \ | |
| 49329 | __ret_348; \ | |
| 51028 | #define vdup_laneq_p64(__p0_440, __p1_440) __extension__ ({ \ | |
| 51029 | poly64x2_t __s0_440 = __p0_440; \ | |
| 51030 | poly64x2_t __rev0_440; __rev0_440 = __builtin_shufflevector(__s0_440, __s0_440, 1, 0); \ | |
| 51031 | poly64x1_t __ret_440; \ | |
| 51032 | __ret_440 = __noswap_splat_laneq_p64(__rev0_440, __p1_440); \ | |
| 51033 | __ret_440; \ | |
| 49330 | 51034 | }) |
| 49331 | 51035 | #endif |
| 49332 | 51036 | |
| 49333 | 51037 | #ifdef __LITTLE_ENDIAN__ |
| 49334 | #define vdup_laneq_p16(__p0_349, __p1_349) __extension__ ({ \ | |
| 49335 | poly16x8_t __s0_349 = __p0_349; \ | |
| 49336 | poly16x4_t __ret_349; \ | |
| 49337 | __ret_349 = splat_laneq_p16(__s0_349, __p1_349); \ | |
| 49338 | __ret_349; \ | |
| 51038 | #define vdup_laneq_p16(__p0_441, __p1_441) __extension__ ({ \ | |
| 51039 | poly16x8_t __s0_441 = __p0_441; \ | |
| 51040 | poly16x4_t __ret_441; \ | |
| 51041 | __ret_441 = splat_laneq_p16(__s0_441, __p1_441); \ | |
| 51042 | __ret_441; \ | |
| 49339 | 51043 | }) |
| 49340 | 51044 | #else |
| 49341 | #define vdup_laneq_p16(__p0_350, __p1_350) __extension__ ({ \ | |
| 49342 | poly16x8_t __s0_350 = __p0_350; \ | |
| 49343 | poly16x8_t __rev0_350; __rev0_350 = __builtin_shufflevector(__s0_350, __s0_350, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49344 | poly16x4_t __ret_350; \ | |
| 49345 | __ret_350 = __noswap_splat_laneq_p16(__rev0_350, __p1_350); \ | |
| 49346 | __ret_350 = __builtin_shufflevector(__ret_350, __ret_350, 3, 2, 1, 0); \ | |
| 49347 | __ret_350; \ | |
| 51045 | #define vdup_laneq_p16(__p0_442, __p1_442) __extension__ ({ \ | |
| 51046 | poly16x8_t __s0_442 = __p0_442; \ | |
| 51047 | poly16x8_t __rev0_442; __rev0_442 = __builtin_shufflevector(__s0_442, __s0_442, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51048 | poly16x4_t __ret_442; \ | |
| 51049 | __ret_442 = __noswap_splat_laneq_p16(__rev0_442, __p1_442); \ | |
| 51050 | __ret_442 = __builtin_shufflevector(__ret_442, __ret_442, 3, 2, 1, 0); \ | |
| 51051 | __ret_442; \ | |
| 49348 | 51052 | }) |
| 49349 | 51053 | #endif |
| 49350 | 51054 | |
| 49351 | 51055 | #ifdef __LITTLE_ENDIAN__ |
| 49352 | #define vdupq_laneq_p8(__p0_351, __p1_351) __extension__ ({ \ | |
| 49353 | poly8x16_t __s0_351 = __p0_351; \ | |
| 49354 | poly8x16_t __ret_351; \ | |
| 49355 | __ret_351 = splatq_laneq_p8(__s0_351, __p1_351); \ | |
| 49356 | __ret_351; \ | |
| 51056 | #define vdupq_laneq_p8(__p0_443, __p1_443) __extension__ ({ \ | |
| 51057 | poly8x16_t __s0_443 = __p0_443; \ | |
| 51058 | poly8x16_t __ret_443; \ | |
| 51059 | __ret_443 = splatq_laneq_p8(__s0_443, __p1_443); \ | |
| 51060 | __ret_443; \ | |
| 49357 | 51061 | }) |
| 49358 | 51062 | #else |
| 49359 | #define vdupq_laneq_p8(__p0_352, __p1_352) __extension__ ({ \ | |
| 49360 | poly8x16_t __s0_352 = __p0_352; \ | |
| 49361 | poly8x16_t __rev0_352; __rev0_352 = __builtin_shufflevector(__s0_352, __s0_352, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49362 | poly8x16_t __ret_352; \ | |
| 49363 | __ret_352 = __noswap_splatq_laneq_p8(__rev0_352, __p1_352); \ | |
| 49364 | __ret_352 = __builtin_shufflevector(__ret_352, __ret_352, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49365 | __ret_352; \ | |
| 51063 | #define vdupq_laneq_p8(__p0_444, __p1_444) __extension__ ({ \ | |
| 51064 | poly8x16_t __s0_444 = __p0_444; \ | |
| 51065 | poly8x16_t __rev0_444; __rev0_444 = __builtin_shufflevector(__s0_444, __s0_444, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51066 | poly8x16_t __ret_444; \ | |
| 51067 | __ret_444 = __noswap_splatq_laneq_p8(__rev0_444, __p1_444); \ | |
| 51068 | __ret_444 = __builtin_shufflevector(__ret_444, __ret_444, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51069 | __ret_444; \ | |
| 49366 | 51070 | }) |
| 49367 | 51071 | #endif |
| 49368 | 51072 | |
| 49369 | 51073 | #ifdef __LITTLE_ENDIAN__ |
| 49370 | #define vdupq_laneq_p64(__p0_353, __p1_353) __extension__ ({ \ | |
| 49371 | poly64x2_t __s0_353 = __p0_353; \ | |
| 49372 | poly64x2_t __ret_353; \ | |
| 49373 | __ret_353 = splatq_laneq_p64(__s0_353, __p1_353); \ | |
| 49374 | __ret_353; \ | |
| 51074 | #define vdupq_laneq_p64(__p0_445, __p1_445) __extension__ ({ \ | |
| 51075 | poly64x2_t __s0_445 = __p0_445; \ | |
| 51076 | poly64x2_t __ret_445; \ | |
| 51077 | __ret_445 = splatq_laneq_p64(__s0_445, __p1_445); \ | |
| 51078 | __ret_445; \ | |
| 49375 | 51079 | }) |
| 49376 | 51080 | #else |
| 49377 | #define vdupq_laneq_p64(__p0_354, __p1_354) __extension__ ({ \ | |
| 49378 | poly64x2_t __s0_354 = __p0_354; \ | |
| 49379 | poly64x2_t __rev0_354; __rev0_354 = __builtin_shufflevector(__s0_354, __s0_354, 1, 0); \ | |
| 49380 | poly64x2_t __ret_354; \ | |
| 49381 | __ret_354 = __noswap_splatq_laneq_p64(__rev0_354, __p1_354); \ | |
| 49382 | __ret_354 = __builtin_shufflevector(__ret_354, __ret_354, 1, 0); \ | |
| 49383 | __ret_354; \ | |
| 51081 | #define vdupq_laneq_p64(__p0_446, __p1_446) __extension__ ({ \ | |
| 51082 | poly64x2_t __s0_446 = __p0_446; \ | |
| 51083 | poly64x2_t __rev0_446; __rev0_446 = __builtin_shufflevector(__s0_446, __s0_446, 1, 0); \ | |
| 51084 | poly64x2_t __ret_446; \ | |
| 51085 | __ret_446 = __noswap_splatq_laneq_p64(__rev0_446, __p1_446); \ | |
| 51086 | __ret_446 = __builtin_shufflevector(__ret_446, __ret_446, 1, 0); \ | |
| 51087 | __ret_446; \ | |
| 49384 | 51088 | }) |
| 49385 | 51089 | #endif |
| 49386 | 51090 | |
| 49387 | 51091 | #ifdef __LITTLE_ENDIAN__ |
| 49388 | #define vdupq_laneq_p16(__p0_355, __p1_355) __extension__ ({ \ | |
| 49389 | poly16x8_t __s0_355 = __p0_355; \ | |
| 49390 | poly16x8_t __ret_355; \ | |
| 49391 | __ret_355 = splatq_laneq_p16(__s0_355, __p1_355); \ | |
| 49392 | __ret_355; \ | |
| 51092 | #define vdupq_laneq_p16(__p0_447, __p1_447) __extension__ ({ \ | |
| 51093 | poly16x8_t __s0_447 = __p0_447; \ | |
| 51094 | poly16x8_t __ret_447; \ | |
| 51095 | __ret_447 = splatq_laneq_p16(__s0_447, __p1_447); \ | |
| 51096 | __ret_447; \ | |
| 49393 | 51097 | }) |
| 49394 | 51098 | #else |
| 49395 | #define vdupq_laneq_p16(__p0_356, __p1_356) __extension__ ({ \ | |
| 49396 | poly16x8_t __s0_356 = __p0_356; \ | |
| 49397 | poly16x8_t __rev0_356; __rev0_356 = __builtin_shufflevector(__s0_356, __s0_356, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49398 | poly16x8_t __ret_356; \ | |
| 49399 | __ret_356 = __noswap_splatq_laneq_p16(__rev0_356, __p1_356); \ | |
| 49400 | __ret_356 = __builtin_shufflevector(__ret_356, __ret_356, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49401 | __ret_356; \ | |
| 51099 | #define vdupq_laneq_p16(__p0_448, __p1_448) __extension__ ({ \ | |
| 51100 | poly16x8_t __s0_448 = __p0_448; \ | |
| 51101 | poly16x8_t __rev0_448; __rev0_448 = __builtin_shufflevector(__s0_448, __s0_448, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51102 | poly16x8_t __ret_448; \ | |
| 51103 | __ret_448 = __noswap_splatq_laneq_p16(__rev0_448, __p1_448); \ | |
| 51104 | __ret_448 = __builtin_shufflevector(__ret_448, __ret_448, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51105 | __ret_448; \ | |
| 49402 | 51106 | }) |
| 49403 | 51107 | #endif |
| 49404 | 51108 | |
| 49405 | 51109 | #ifdef __LITTLE_ENDIAN__ |
| 49406 | #define vdupq_laneq_u8(__p0_357, __p1_357) __extension__ ({ \ | |
| 49407 | uint8x16_t __s0_357 = __p0_357; \ | |
| 49408 | uint8x16_t __ret_357; \ | |
| 49409 | __ret_357 = splatq_laneq_u8(__s0_357, __p1_357); \ | |
| 49410 | __ret_357; \ | |
| 51110 | #define vdupq_laneq_u8(__p0_449, __p1_449) __extension__ ({ \ | |
| 51111 | uint8x16_t __s0_449 = __p0_449; \ | |
| 51112 | uint8x16_t __ret_449; \ | |
| 51113 | __ret_449 = splatq_laneq_u8(__s0_449, __p1_449); \ | |
| 51114 | __ret_449; \ | |
| 49411 | 51115 | }) |
| 49412 | 51116 | #else |
| 49413 | #define vdupq_laneq_u8(__p0_358, __p1_358) __extension__ ({ \ | |
| 49414 | uint8x16_t __s0_358 = __p0_358; \ | |
| 49415 | uint8x16_t __rev0_358; __rev0_358 = __builtin_shufflevector(__s0_358, __s0_358, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49416 | uint8x16_t __ret_358; \ | |
| 49417 | __ret_358 = __noswap_splatq_laneq_u8(__rev0_358, __p1_358); \ | |
| 49418 | __ret_358 = __builtin_shufflevector(__ret_358, __ret_358, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49419 | __ret_358; \ | |
| 51117 | #define vdupq_laneq_u8(__p0_450, __p1_450) __extension__ ({ \ | |
| 51118 | uint8x16_t __s0_450 = __p0_450; \ | |
| 51119 | uint8x16_t __rev0_450; __rev0_450 = __builtin_shufflevector(__s0_450, __s0_450, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51120 | uint8x16_t __ret_450; \ | |
| 51121 | __ret_450 = __noswap_splatq_laneq_u8(__rev0_450, __p1_450); \ | |
| 51122 | __ret_450 = __builtin_shufflevector(__ret_450, __ret_450, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51123 | __ret_450; \ | |
| 49420 | 51124 | }) |
| 49421 | 51125 | #endif |
| 49422 | 51126 | |
| 49423 | 51127 | #ifdef __LITTLE_ENDIAN__ |
| 49424 | #define vdupq_laneq_u32(__p0_359, __p1_359) __extension__ ({ \ | |
| 49425 | uint32x4_t __s0_359 = __p0_359; \ | |
| 49426 | uint32x4_t __ret_359; \ | |
| 49427 | __ret_359 = splatq_laneq_u32(__s0_359, __p1_359); \ | |
| 49428 | __ret_359; \ | |
| 51128 | #define vdupq_laneq_u32(__p0_451, __p1_451) __extension__ ({ \ | |
| 51129 | uint32x4_t __s0_451 = __p0_451; \ | |
| 51130 | uint32x4_t __ret_451; \ | |
| 51131 | __ret_451 = splatq_laneq_u32(__s0_451, __p1_451); \ | |
| 51132 | __ret_451; \ | |
| 49429 | 51133 | }) |
| 49430 | 51134 | #else |
| 49431 | #define vdupq_laneq_u32(__p0_360, __p1_360) __extension__ ({ \ | |
| 49432 | uint32x4_t __s0_360 = __p0_360; \ | |
| 49433 | uint32x4_t __rev0_360; __rev0_360 = __builtin_shufflevector(__s0_360, __s0_360, 3, 2, 1, 0); \ | |
| 49434 | uint32x4_t __ret_360; \ | |
| 49435 | __ret_360 = __noswap_splatq_laneq_u32(__rev0_360, __p1_360); \ | |
| 49436 | __ret_360 = __builtin_shufflevector(__ret_360, __ret_360, 3, 2, 1, 0); \ | |
| 49437 | __ret_360; \ | |
| 51135 | #define vdupq_laneq_u32(__p0_452, __p1_452) __extension__ ({ \ | |
| 51136 | uint32x4_t __s0_452 = __p0_452; \ | |
| 51137 | uint32x4_t __rev0_452; __rev0_452 = __builtin_shufflevector(__s0_452, __s0_452, 3, 2, 1, 0); \ | |
| 51138 | uint32x4_t __ret_452; \ | |
| 51139 | __ret_452 = __noswap_splatq_laneq_u32(__rev0_452, __p1_452); \ | |
| 51140 | __ret_452 = __builtin_shufflevector(__ret_452, __ret_452, 3, 2, 1, 0); \ | |
| 51141 | __ret_452; \ | |
| 49438 | 51142 | }) |
| 49439 | 51143 | #endif |
| 49440 | 51144 | |
| 49441 | 51145 | #ifdef __LITTLE_ENDIAN__ |
| 49442 | #define vdupq_laneq_u64(__p0_361, __p1_361) __extension__ ({ \ | |
| 49443 | uint64x2_t __s0_361 = __p0_361; \ | |
| 49444 | uint64x2_t __ret_361; \ | |
| 49445 | __ret_361 = splatq_laneq_u64(__s0_361, __p1_361); \ | |
| 49446 | __ret_361; \ | |
| 51146 | #define vdupq_laneq_u64(__p0_453, __p1_453) __extension__ ({ \ | |
| 51147 | uint64x2_t __s0_453 = __p0_453; \ | |
| 51148 | uint64x2_t __ret_453; \ | |
| 51149 | __ret_453 = splatq_laneq_u64(__s0_453, __p1_453); \ | |
| 51150 | __ret_453; \ | |
| 49447 | 51151 | }) |
| 49448 | 51152 | #else |
| 49449 | #define vdupq_laneq_u64(__p0_362, __p1_362) __extension__ ({ \ | |
| 49450 | uint64x2_t __s0_362 = __p0_362; \ | |
| 49451 | uint64x2_t __rev0_362; __rev0_362 = __builtin_shufflevector(__s0_362, __s0_362, 1, 0); \ | |
| 49452 | uint64x2_t __ret_362; \ | |
| 49453 | __ret_362 = __noswap_splatq_laneq_u64(__rev0_362, __p1_362); \ | |
| 49454 | __ret_362 = __builtin_shufflevector(__ret_362, __ret_362, 1, 0); \ | |
| 49455 | __ret_362; \ | |
| 51153 | #define vdupq_laneq_u64(__p0_454, __p1_454) __extension__ ({ \ | |
| 51154 | uint64x2_t __s0_454 = __p0_454; \ | |
| 51155 | uint64x2_t __rev0_454; __rev0_454 = __builtin_shufflevector(__s0_454, __s0_454, 1, 0); \ | |
| 51156 | uint64x2_t __ret_454; \ | |
| 51157 | __ret_454 = __noswap_splatq_laneq_u64(__rev0_454, __p1_454); \ | |
| 51158 | __ret_454 = __builtin_shufflevector(__ret_454, __ret_454, 1, 0); \ | |
| 51159 | __ret_454; \ | |
| 49456 | 51160 | }) |
| 49457 | 51161 | #endif |
| 49458 | 51162 | |
| 49459 | 51163 | #ifdef __LITTLE_ENDIAN__ |
| 49460 | #define vdupq_laneq_u16(__p0_363, __p1_363) __extension__ ({ \ | |
| 49461 | uint16x8_t __s0_363 = __p0_363; \ | |
| 49462 | uint16x8_t __ret_363; \ | |
| 49463 | __ret_363 = splatq_laneq_u16(__s0_363, __p1_363); \ | |
| 49464 | __ret_363; \ | |
| 51164 | #define vdupq_laneq_u16(__p0_455, __p1_455) __extension__ ({ \ | |
| 51165 | uint16x8_t __s0_455 = __p0_455; \ | |
| 51166 | uint16x8_t __ret_455; \ | |
| 51167 | __ret_455 = splatq_laneq_u16(__s0_455, __p1_455); \ | |
| 51168 | __ret_455; \ | |
| 49465 | 51169 | }) |
| 49466 | 51170 | #else |
| 49467 | #define vdupq_laneq_u16(__p0_364, __p1_364) __extension__ ({ \ | |
| 49468 | uint16x8_t __s0_364 = __p0_364; \ | |
| 49469 | uint16x8_t __rev0_364; __rev0_364 = __builtin_shufflevector(__s0_364, __s0_364, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49470 | uint16x8_t __ret_364; \ | |
| 49471 | __ret_364 = __noswap_splatq_laneq_u16(__rev0_364, __p1_364); \ | |
| 49472 | __ret_364 = __builtin_shufflevector(__ret_364, __ret_364, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49473 | __ret_364; \ | |
| 51171 | #define vdupq_laneq_u16(__p0_456, __p1_456) __extension__ ({ \ | |
| 51172 | uint16x8_t __s0_456 = __p0_456; \ | |
| 51173 | uint16x8_t __rev0_456; __rev0_456 = __builtin_shufflevector(__s0_456, __s0_456, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51174 | uint16x8_t __ret_456; \ | |
| 51175 | __ret_456 = __noswap_splatq_laneq_u16(__rev0_456, __p1_456); \ | |
| 51176 | __ret_456 = __builtin_shufflevector(__ret_456, __ret_456, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51177 | __ret_456; \ | |
| 49474 | 51178 | }) |
| 49475 | 51179 | #endif |
| 49476 | 51180 | |
| 49477 | 51181 | #ifdef __LITTLE_ENDIAN__ |
| 49478 | #define vdupq_laneq_s8(__p0_365, __p1_365) __extension__ ({ \ | |
| 49479 | int8x16_t __s0_365 = __p0_365; \ | |
| 49480 | int8x16_t __ret_365; \ | |
| 49481 | __ret_365 = splatq_laneq_s8(__s0_365, __p1_365); \ | |
| 49482 | __ret_365; \ | |
| 51182 | #define vdupq_laneq_s8(__p0_457, __p1_457) __extension__ ({ \ | |
| 51183 | int8x16_t __s0_457 = __p0_457; \ | |
| 51184 | int8x16_t __ret_457; \ | |
| 51185 | __ret_457 = splatq_laneq_s8(__s0_457, __p1_457); \ | |
| 51186 | __ret_457; \ | |
| 49483 | 51187 | }) |
| 49484 | 51188 | #else |
| 49485 | #define vdupq_laneq_s8(__p0_366, __p1_366) __extension__ ({ \ | |
| 49486 | int8x16_t __s0_366 = __p0_366; \ | |
| 49487 | int8x16_t __rev0_366; __rev0_366 = __builtin_shufflevector(__s0_366, __s0_366, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49488 | int8x16_t __ret_366; \ | |
| 49489 | __ret_366 = __noswap_splatq_laneq_s8(__rev0_366, __p1_366); \ | |
| 49490 | __ret_366 = __builtin_shufflevector(__ret_366, __ret_366, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49491 | __ret_366; \ | |
| 51189 | #define vdupq_laneq_s8(__p0_458, __p1_458) __extension__ ({ \ | |
| 51190 | int8x16_t __s0_458 = __p0_458; \ | |
| 51191 | int8x16_t __rev0_458; __rev0_458 = __builtin_shufflevector(__s0_458, __s0_458, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51192 | int8x16_t __ret_458; \ | |
| 51193 | __ret_458 = __noswap_splatq_laneq_s8(__rev0_458, __p1_458); \ | |
| 51194 | __ret_458 = __builtin_shufflevector(__ret_458, __ret_458, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51195 | __ret_458; \ | |
| 49492 | 51196 | }) |
| 49493 | 51197 | #endif |
| 49494 | 51198 | |
| 49495 | 51199 | #ifdef __LITTLE_ENDIAN__ |
| 49496 | #define vdupq_laneq_f64(__p0_367, __p1_367) __extension__ ({ \ | |
| 49497 | float64x2_t __s0_367 = __p0_367; \ | |
| 49498 | float64x2_t __ret_367; \ | |
| 49499 | __ret_367 = splatq_laneq_f64(__s0_367, __p1_367); \ | |
| 49500 | __ret_367; \ | |
| 51200 | #define vdupq_laneq_f64(__p0_459, __p1_459) __extension__ ({ \ | |
| 51201 | float64x2_t __s0_459 = __p0_459; \ | |
| 51202 | float64x2_t __ret_459; \ | |
| 51203 | __ret_459 = splatq_laneq_f64(__s0_459, __p1_459); \ | |
| 51204 | __ret_459; \ | |
| 49501 | 51205 | }) |
| 49502 | 51206 | #else |
| 49503 | #define vdupq_laneq_f64(__p0_368, __p1_368) __extension__ ({ \ | |
| 49504 | float64x2_t __s0_368 = __p0_368; \ | |
| 49505 | float64x2_t __rev0_368; __rev0_368 = __builtin_shufflevector(__s0_368, __s0_368, 1, 0); \ | |
| 49506 | float64x2_t __ret_368; \ | |
| 49507 | __ret_368 = __noswap_splatq_laneq_f64(__rev0_368, __p1_368); \ | |
| 49508 | __ret_368 = __builtin_shufflevector(__ret_368, __ret_368, 1, 0); \ | |
| 49509 | __ret_368; \ | |
| 51207 | #define vdupq_laneq_f64(__p0_460, __p1_460) __extension__ ({ \ | |
| 51208 | float64x2_t __s0_460 = __p0_460; \ | |
| 51209 | float64x2_t __rev0_460; __rev0_460 = __builtin_shufflevector(__s0_460, __s0_460, 1, 0); \ | |
| 51210 | float64x2_t __ret_460; \ | |
| 51211 | __ret_460 = __noswap_splatq_laneq_f64(__rev0_460, __p1_460); \ | |
| 51212 | __ret_460 = __builtin_shufflevector(__ret_460, __ret_460, 1, 0); \ | |
| 51213 | __ret_460; \ | |
| 49510 | 51214 | }) |
| 49511 | 51215 | #endif |
| 49512 | 51216 | |
| 49513 | 51217 | #ifdef __LITTLE_ENDIAN__ |
| 49514 | #define vdupq_laneq_f32(__p0_369, __p1_369) __extension__ ({ \ | |
| 49515 | float32x4_t __s0_369 = __p0_369; \ | |
| 49516 | float32x4_t __ret_369; \ | |
| 49517 | __ret_369 = splatq_laneq_f32(__s0_369, __p1_369); \ | |
| 49518 | __ret_369; \ | |
| 51218 | #define vdupq_laneq_f32(__p0_461, __p1_461) __extension__ ({ \ | |
| 51219 | float32x4_t __s0_461 = __p0_461; \ | |
| 51220 | float32x4_t __ret_461; \ | |
| 51221 | __ret_461 = splatq_laneq_f32(__s0_461, __p1_461); \ | |
| 51222 | __ret_461; \ | |
| 49519 | 51223 | }) |
| 49520 | 51224 | #else |
| 49521 | #define vdupq_laneq_f32(__p0_370, __p1_370) __extension__ ({ \ | |
| 49522 | float32x4_t __s0_370 = __p0_370; \ | |
| 49523 | float32x4_t __rev0_370; __rev0_370 = __builtin_shufflevector(__s0_370, __s0_370, 3, 2, 1, 0); \ | |
| 49524 | float32x4_t __ret_370; \ | |
| 49525 | __ret_370 = __noswap_splatq_laneq_f32(__rev0_370, __p1_370); \ | |
| 49526 | __ret_370 = __builtin_shufflevector(__ret_370, __ret_370, 3, 2, 1, 0); \ | |
| 49527 | __ret_370; \ | |
| 51225 | #define vdupq_laneq_f32(__p0_462, __p1_462) __extension__ ({ \ | |
| 51226 | float32x4_t __s0_462 = __p0_462; \ | |
| 51227 | float32x4_t __rev0_462; __rev0_462 = __builtin_shufflevector(__s0_462, __s0_462, 3, 2, 1, 0); \ | |
| 51228 | float32x4_t __ret_462; \ | |
| 51229 | __ret_462 = __noswap_splatq_laneq_f32(__rev0_462, __p1_462); \ | |
| 51230 | __ret_462 = __builtin_shufflevector(__ret_462, __ret_462, 3, 2, 1, 0); \ | |
| 51231 | __ret_462; \ | |
| 49528 | 51232 | }) |
| 49529 | 51233 | #endif |
| 49530 | 51234 | |
| 49531 | 51235 | #ifdef __LITTLE_ENDIAN__ |
| 49532 | #define vdupq_laneq_f16(__p0_371, __p1_371) __extension__ ({ \ | |
| 49533 | float16x8_t __s0_371 = __p0_371; \ | |
| 49534 | float16x8_t __ret_371; \ | |
| 49535 | __ret_371 = splatq_laneq_f16(__s0_371, __p1_371); \ | |
| 49536 | __ret_371; \ | |
| 51236 | #define vdupq_laneq_f16(__p0_463, __p1_463) __extension__ ({ \ | |
| 51237 | float16x8_t __s0_463 = __p0_463; \ | |
| 51238 | float16x8_t __ret_463; \ | |
| 51239 | __ret_463 = splatq_laneq_f16(__s0_463, __p1_463); \ | |
| 51240 | __ret_463; \ | |
| 49537 | 51241 | }) |
| 49538 | 51242 | #else |
| 49539 | #define vdupq_laneq_f16(__p0_372, __p1_372) __extension__ ({ \ | |
| 49540 | float16x8_t __s0_372 = __p0_372; \ | |
| 49541 | float16x8_t __rev0_372; __rev0_372 = __builtin_shufflevector(__s0_372, __s0_372, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49542 | float16x8_t __ret_372; \ | |
| 49543 | __ret_372 = __noswap_splatq_laneq_f16(__rev0_372, __p1_372); \ | |
| 49544 | __ret_372 = __builtin_shufflevector(__ret_372, __ret_372, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49545 | __ret_372; \ | |
| 51243 | #define vdupq_laneq_f16(__p0_464, __p1_464) __extension__ ({ \ | |
| 51244 | float16x8_t __s0_464 = __p0_464; \ | |
| 51245 | float16x8_t __rev0_464; __rev0_464 = __builtin_shufflevector(__s0_464, __s0_464, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51246 | float16x8_t __ret_464; \ | |
| 51247 | __ret_464 = __noswap_splatq_laneq_f16(__rev0_464, __p1_464); \ | |
| 51248 | __ret_464 = __builtin_shufflevector(__ret_464, __ret_464, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51249 | __ret_464; \ | |
| 49546 | 51250 | }) |
| 49547 | 51251 | #endif |
| 49548 | 51252 | |
| 49549 | 51253 | #ifdef __LITTLE_ENDIAN__ |
| 49550 | #define vdupq_laneq_s32(__p0_373, __p1_373) __extension__ ({ \ | |
| 49551 | int32x4_t __s0_373 = __p0_373; \ | |
| 49552 | int32x4_t __ret_373; \ | |
| 49553 | __ret_373 = splatq_laneq_s32(__s0_373, __p1_373); \ | |
| 49554 | __ret_373; \ | |
| 51254 | #define vdupq_laneq_s32(__p0_465, __p1_465) __extension__ ({ \ | |
| 51255 | int32x4_t __s0_465 = __p0_465; \ | |
| 51256 | int32x4_t __ret_465; \ | |
| 51257 | __ret_465 = splatq_laneq_s32(__s0_465, __p1_465); \ | |
| 51258 | __ret_465; \ | |
| 49555 | 51259 | }) |
| 49556 | 51260 | #else |
| 49557 | #define vdupq_laneq_s32(__p0_374, __p1_374) __extension__ ({ \ | |
| 49558 | int32x4_t __s0_374 = __p0_374; \ | |
| 49559 | int32x4_t __rev0_374; __rev0_374 = __builtin_shufflevector(__s0_374, __s0_374, 3, 2, 1, 0); \ | |
| 49560 | int32x4_t __ret_374; \ | |
| 49561 | __ret_374 = __noswap_splatq_laneq_s32(__rev0_374, __p1_374); \ | |
| 49562 | __ret_374 = __builtin_shufflevector(__ret_374, __ret_374, 3, 2, 1, 0); \ | |
| 49563 | __ret_374; \ | |
| 51261 | #define vdupq_laneq_s32(__p0_466, __p1_466) __extension__ ({ \ | |
| 51262 | int32x4_t __s0_466 = __p0_466; \ | |
| 51263 | int32x4_t __rev0_466; __rev0_466 = __builtin_shufflevector(__s0_466, __s0_466, 3, 2, 1, 0); \ | |
| 51264 | int32x4_t __ret_466; \ | |
| 51265 | __ret_466 = __noswap_splatq_laneq_s32(__rev0_466, __p1_466); \ | |
| 51266 | __ret_466 = __builtin_shufflevector(__ret_466, __ret_466, 3, 2, 1, 0); \ | |
| 51267 | __ret_466; \ | |
| 49564 | 51268 | }) |
| 49565 | 51269 | #endif |
| 49566 | 51270 | |
| 49567 | 51271 | #ifdef __LITTLE_ENDIAN__ |
| 49568 | #define vdupq_laneq_s64(__p0_375, __p1_375) __extension__ ({ \ | |
| 49569 | int64x2_t __s0_375 = __p0_375; \ | |
| 49570 | int64x2_t __ret_375; \ | |
| 49571 | __ret_375 = splatq_laneq_s64(__s0_375, __p1_375); \ | |
| 49572 | __ret_375; \ | |
| 51272 | #define vdupq_laneq_s64(__p0_467, __p1_467) __extension__ ({ \ | |
| 51273 | int64x2_t __s0_467 = __p0_467; \ | |
| 51274 | int64x2_t __ret_467; \ | |
| 51275 | __ret_467 = splatq_laneq_s64(__s0_467, __p1_467); \ | |
| 51276 | __ret_467; \ | |
| 49573 | 51277 | }) |
| 49574 | 51278 | #else |
| 49575 | #define vdupq_laneq_s64(__p0_376, __p1_376) __extension__ ({ \ | |
| 49576 | int64x2_t __s0_376 = __p0_376; \ | |
| 49577 | int64x2_t __rev0_376; __rev0_376 = __builtin_shufflevector(__s0_376, __s0_376, 1, 0); \ | |
| 49578 | int64x2_t __ret_376; \ | |
| 49579 | __ret_376 = __noswap_splatq_laneq_s64(__rev0_376, __p1_376); \ | |
| 49580 | __ret_376 = __builtin_shufflevector(__ret_376, __ret_376, 1, 0); \ | |
| 49581 | __ret_376; \ | |
| 51279 | #define vdupq_laneq_s64(__p0_468, __p1_468) __extension__ ({ \ | |
| 51280 | int64x2_t __s0_468 = __p0_468; \ | |
| 51281 | int64x2_t __rev0_468; __rev0_468 = __builtin_shufflevector(__s0_468, __s0_468, 1, 0); \ | |
| 51282 | int64x2_t __ret_468; \ | |
| 51283 | __ret_468 = __noswap_splatq_laneq_s64(__rev0_468, __p1_468); \ | |
| 51284 | __ret_468 = __builtin_shufflevector(__ret_468, __ret_468, 1, 0); \ | |
| 51285 | __ret_468; \ | |
| 49582 | 51286 | }) |
| 49583 | 51287 | #endif |
| 49584 | 51288 | |
| 49585 | 51289 | #ifdef __LITTLE_ENDIAN__ |
| 49586 | #define vdupq_laneq_s16(__p0_377, __p1_377) __extension__ ({ \ | |
| 49587 | int16x8_t __s0_377 = __p0_377; \ | |
| 49588 | int16x8_t __ret_377; \ | |
| 49589 | __ret_377 = splatq_laneq_s16(__s0_377, __p1_377); \ | |
| 49590 | __ret_377; \ | |
| 51290 | #define vdupq_laneq_s16(__p0_469, __p1_469) __extension__ ({ \ | |
| 51291 | int16x8_t __s0_469 = __p0_469; \ | |
| 51292 | int16x8_t __ret_469; \ | |
| 51293 | __ret_469 = splatq_laneq_s16(__s0_469, __p1_469); \ | |
| 51294 | __ret_469; \ | |
| 49591 | 51295 | }) |
| 49592 | 51296 | #else |
| 49593 | #define vdupq_laneq_s16(__p0_378, __p1_378) __extension__ ({ \ | |
| 49594 | int16x8_t __s0_378 = __p0_378; \ | |
| 49595 | int16x8_t __rev0_378; __rev0_378 = __builtin_shufflevector(__s0_378, __s0_378, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49596 | int16x8_t __ret_378; \ | |
| 49597 | __ret_378 = __noswap_splatq_laneq_s16(__rev0_378, __p1_378); \ | |
| 49598 | __ret_378 = __builtin_shufflevector(__ret_378, __ret_378, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49599 | __ret_378; \ | |
| 51297 | #define vdupq_laneq_s16(__p0_470, __p1_470) __extension__ ({ \ | |
| 51298 | int16x8_t __s0_470 = __p0_470; \ | |
| 51299 | int16x8_t __rev0_470; __rev0_470 = __builtin_shufflevector(__s0_470, __s0_470, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51300 | int16x8_t __ret_470; \ | |
| 51301 | __ret_470 = __noswap_splatq_laneq_s16(__rev0_470, __p1_470); \ | |
| 51302 | __ret_470 = __builtin_shufflevector(__ret_470, __ret_470, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51303 | __ret_470; \ | |
| 49600 | 51304 | }) |
| 49601 | 51305 | #endif |
| 49602 | 51306 | |
| 49603 | 51307 | #ifdef __LITTLE_ENDIAN__ |
| 49604 | #define vdup_laneq_u8(__p0_379, __p1_379) __extension__ ({ \ | |
| 49605 | uint8x16_t __s0_379 = __p0_379; \ | |
| 49606 | uint8x8_t __ret_379; \ | |
| 49607 | __ret_379 = splat_laneq_u8(__s0_379, __p1_379); \ | |
| 49608 | __ret_379; \ | |
| 51308 | #define vdup_laneq_u8(__p0_471, __p1_471) __extension__ ({ \ | |
| 51309 | uint8x16_t __s0_471 = __p0_471; \ | |
| 51310 | uint8x8_t __ret_471; \ | |
| 51311 | __ret_471 = splat_laneq_u8(__s0_471, __p1_471); \ | |
| 51312 | __ret_471; \ | |
| 49609 | 51313 | }) |
| 49610 | 51314 | #else |
| 49611 | #define vdup_laneq_u8(__p0_380, __p1_380) __extension__ ({ \ | |
| 49612 | uint8x16_t __s0_380 = __p0_380; \ | |
| 49613 | uint8x16_t __rev0_380; __rev0_380 = __builtin_shufflevector(__s0_380, __s0_380, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49614 | uint8x8_t __ret_380; \ | |
| 49615 | __ret_380 = __noswap_splat_laneq_u8(__rev0_380, __p1_380); \ | |
| 49616 | __ret_380 = __builtin_shufflevector(__ret_380, __ret_380, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49617 | __ret_380; \ | |
| 51315 | #define vdup_laneq_u8(__p0_472, __p1_472) __extension__ ({ \ | |
| 51316 | uint8x16_t __s0_472 = __p0_472; \ | |
| 51317 | uint8x16_t __rev0_472; __rev0_472 = __builtin_shufflevector(__s0_472, __s0_472, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51318 | uint8x8_t __ret_472; \ | |
| 51319 | __ret_472 = __noswap_splat_laneq_u8(__rev0_472, __p1_472); \ | |
| 51320 | __ret_472 = __builtin_shufflevector(__ret_472, __ret_472, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51321 | __ret_472; \ | |
| 49618 | 51322 | }) |
| 49619 | 51323 | #endif |
| 49620 | 51324 | |
| 49621 | 51325 | #ifdef __LITTLE_ENDIAN__ |
| 49622 | #define vdup_laneq_u32(__p0_381, __p1_381) __extension__ ({ \ | |
| 49623 | uint32x4_t __s0_381 = __p0_381; \ | |
| 49624 | uint32x2_t __ret_381; \ | |
| 49625 | __ret_381 = splat_laneq_u32(__s0_381, __p1_381); \ | |
| 49626 | __ret_381; \ | |
| 51326 | #define vdup_laneq_u32(__p0_473, __p1_473) __extension__ ({ \ | |
| 51327 | uint32x4_t __s0_473 = __p0_473; \ | |
| 51328 | uint32x2_t __ret_473; \ | |
| 51329 | __ret_473 = splat_laneq_u32(__s0_473, __p1_473); \ | |
| 51330 | __ret_473; \ | |
| 49627 | 51331 | }) |
| 49628 | 51332 | #else |
| 49629 | #define vdup_laneq_u32(__p0_382, __p1_382) __extension__ ({ \ | |
| 49630 | uint32x4_t __s0_382 = __p0_382; \ | |
| 49631 | uint32x4_t __rev0_382; __rev0_382 = __builtin_shufflevector(__s0_382, __s0_382, 3, 2, 1, 0); \ | |
| 49632 | uint32x2_t __ret_382; \ | |
| 49633 | __ret_382 = __noswap_splat_laneq_u32(__rev0_382, __p1_382); \ | |
| 49634 | __ret_382 = __builtin_shufflevector(__ret_382, __ret_382, 1, 0); \ | |
| 49635 | __ret_382; \ | |
| 51333 | #define vdup_laneq_u32(__p0_474, __p1_474) __extension__ ({ \ | |
| 51334 | uint32x4_t __s0_474 = __p0_474; \ | |
| 51335 | uint32x4_t __rev0_474; __rev0_474 = __builtin_shufflevector(__s0_474, __s0_474, 3, 2, 1, 0); \ | |
| 51336 | uint32x2_t __ret_474; \ | |
| 51337 | __ret_474 = __noswap_splat_laneq_u32(__rev0_474, __p1_474); \ | |
| 51338 | __ret_474 = __builtin_shufflevector(__ret_474, __ret_474, 1, 0); \ | |
| 51339 | __ret_474; \ | |
| 49636 | 51340 | }) |
| 49637 | 51341 | #endif |
| 49638 | 51342 | |
| 49639 | 51343 | #ifdef __LITTLE_ENDIAN__ |
| 49640 | #define vdup_laneq_u64(__p0_383, __p1_383) __extension__ ({ \ | |
| 49641 | uint64x2_t __s0_383 = __p0_383; \ | |
| 49642 | uint64x1_t __ret_383; \ | |
| 49643 | __ret_383 = splat_laneq_u64(__s0_383, __p1_383); \ | |
| 49644 | __ret_383; \ | |
| 51344 | #define vdup_laneq_u64(__p0_475, __p1_475) __extension__ ({ \ | |
| 51345 | uint64x2_t __s0_475 = __p0_475; \ | |
| 51346 | uint64x1_t __ret_475; \ | |
| 51347 | __ret_475 = splat_laneq_u64(__s0_475, __p1_475); \ | |
| 51348 | __ret_475; \ | |
| 49645 | 51349 | }) |
| 49646 | 51350 | #else |
| 49647 | #define vdup_laneq_u64(__p0_384, __p1_384) __extension__ ({ \ | |
| 49648 | uint64x2_t __s0_384 = __p0_384; \ | |
| 49649 | uint64x2_t __rev0_384; __rev0_384 = __builtin_shufflevector(__s0_384, __s0_384, 1, 0); \ | |
| 49650 | uint64x1_t __ret_384; \ | |
| 49651 | __ret_384 = __noswap_splat_laneq_u64(__rev0_384, __p1_384); \ | |
| 49652 | __ret_384; \ | |
| 51351 | #define vdup_laneq_u64(__p0_476, __p1_476) __extension__ ({ \ | |
| 51352 | uint64x2_t __s0_476 = __p0_476; \ | |
| 51353 | uint64x2_t __rev0_476; __rev0_476 = __builtin_shufflevector(__s0_476, __s0_476, 1, 0); \ | |
| 51354 | uint64x1_t __ret_476; \ | |
| 51355 | __ret_476 = __noswap_splat_laneq_u64(__rev0_476, __p1_476); \ | |
| 51356 | __ret_476; \ | |
| 49653 | 51357 | }) |
| 49654 | 51358 | #endif |
| 49655 | 51359 | |
| 49656 | 51360 | #ifdef __LITTLE_ENDIAN__ |
| 49657 | #define vdup_laneq_u16(__p0_385, __p1_385) __extension__ ({ \ | |
| 49658 | uint16x8_t __s0_385 = __p0_385; \ | |
| 49659 | uint16x4_t __ret_385; \ | |
| 49660 | __ret_385 = splat_laneq_u16(__s0_385, __p1_385); \ | |
| 49661 | __ret_385; \ | |
| 51361 | #define vdup_laneq_u16(__p0_477, __p1_477) __extension__ ({ \ | |
| 51362 | uint16x8_t __s0_477 = __p0_477; \ | |
| 51363 | uint16x4_t __ret_477; \ | |
| 51364 | __ret_477 = splat_laneq_u16(__s0_477, __p1_477); \ | |
| 51365 | __ret_477; \ | |
| 49662 | 51366 | }) |
| 49663 | 51367 | #else |
| 49664 | #define vdup_laneq_u16(__p0_386, __p1_386) __extension__ ({ \ | |
| 49665 | uint16x8_t __s0_386 = __p0_386; \ | |
| 49666 | uint16x8_t __rev0_386; __rev0_386 = __builtin_shufflevector(__s0_386, __s0_386, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49667 | uint16x4_t __ret_386; \ | |
| 49668 | __ret_386 = __noswap_splat_laneq_u16(__rev0_386, __p1_386); \ | |
| 49669 | __ret_386 = __builtin_shufflevector(__ret_386, __ret_386, 3, 2, 1, 0); \ | |
| 49670 | __ret_386; \ | |
| 51368 | #define vdup_laneq_u16(__p0_478, __p1_478) __extension__ ({ \ | |
| 51369 | uint16x8_t __s0_478 = __p0_478; \ | |
| 51370 | uint16x8_t __rev0_478; __rev0_478 = __builtin_shufflevector(__s0_478, __s0_478, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51371 | uint16x4_t __ret_478; \ | |
| 51372 | __ret_478 = __noswap_splat_laneq_u16(__rev0_478, __p1_478); \ | |
| 51373 | __ret_478 = __builtin_shufflevector(__ret_478, __ret_478, 3, 2, 1, 0); \ | |
| 51374 | __ret_478; \ | |
| 49671 | 51375 | }) |
| 49672 | 51376 | #endif |
| 49673 | 51377 | |
| 49674 | 51378 | #ifdef __LITTLE_ENDIAN__ |
| 49675 | #define vdup_laneq_s8(__p0_387, __p1_387) __extension__ ({ \ | |
| 49676 | int8x16_t __s0_387 = __p0_387; \ | |
| 49677 | int8x8_t __ret_387; \ | |
| 49678 | __ret_387 = splat_laneq_s8(__s0_387, __p1_387); \ | |
| 49679 | __ret_387; \ | |
| 51379 | #define vdup_laneq_s8(__p0_479, __p1_479) __extension__ ({ \ | |
| 51380 | int8x16_t __s0_479 = __p0_479; \ | |
| 51381 | int8x8_t __ret_479; \ | |
| 51382 | __ret_479 = splat_laneq_s8(__s0_479, __p1_479); \ | |
| 51383 | __ret_479; \ | |
| 49680 | 51384 | }) |
| 49681 | 51385 | #else |
| 49682 | #define vdup_laneq_s8(__p0_388, __p1_388) __extension__ ({ \ | |
| 49683 | int8x16_t __s0_388 = __p0_388; \ | |
| 49684 | int8x16_t __rev0_388; __rev0_388 = __builtin_shufflevector(__s0_388, __s0_388, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49685 | int8x8_t __ret_388; \ | |
| 49686 | __ret_388 = __noswap_splat_laneq_s8(__rev0_388, __p1_388); \ | |
| 49687 | __ret_388 = __builtin_shufflevector(__ret_388, __ret_388, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49688 | __ret_388; \ | |
| 51386 | #define vdup_laneq_s8(__p0_480, __p1_480) __extension__ ({ \ | |
| 51387 | int8x16_t __s0_480 = __p0_480; \ | |
| 51388 | int8x16_t __rev0_480; __rev0_480 = __builtin_shufflevector(__s0_480, __s0_480, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51389 | int8x8_t __ret_480; \ | |
| 51390 | __ret_480 = __noswap_splat_laneq_s8(__rev0_480, __p1_480); \ | |
| 51391 | __ret_480 = __builtin_shufflevector(__ret_480, __ret_480, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51392 | __ret_480; \ | |
| 49689 | 51393 | }) |
| 49690 | 51394 | #endif |
| 49691 | 51395 | |
| 49692 | 51396 | #ifdef __LITTLE_ENDIAN__ |
| 49693 | #define vdup_laneq_f64(__p0_389, __p1_389) __extension__ ({ \ | |
| 49694 | float64x2_t __s0_389 = __p0_389; \ | |
| 49695 | float64x1_t __ret_389; \ | |
| 49696 | __ret_389 = splat_laneq_f64(__s0_389, __p1_389); \ | |
| 49697 | __ret_389; \ | |
| 51397 | #define vdup_laneq_f64(__p0_481, __p1_481) __extension__ ({ \ | |
| 51398 | float64x2_t __s0_481 = __p0_481; \ | |
| 51399 | float64x1_t __ret_481; \ | |
| 51400 | __ret_481 = splat_laneq_f64(__s0_481, __p1_481); \ | |
| 51401 | __ret_481; \ | |
| 49698 | 51402 | }) |
| 49699 | 51403 | #else |
| 49700 | #define vdup_laneq_f64(__p0_390, __p1_390) __extension__ ({ \ | |
| 49701 | float64x2_t __s0_390 = __p0_390; \ | |
| 49702 | float64x2_t __rev0_390; __rev0_390 = __builtin_shufflevector(__s0_390, __s0_390, 1, 0); \ | |
| 49703 | float64x1_t __ret_390; \ | |
| 49704 | __ret_390 = __noswap_splat_laneq_f64(__rev0_390, __p1_390); \ | |
| 49705 | __ret_390; \ | |
| 51404 | #define vdup_laneq_f64(__p0_482, __p1_482) __extension__ ({ \ | |
| 51405 | float64x2_t __s0_482 = __p0_482; \ | |
| 51406 | float64x2_t __rev0_482; __rev0_482 = __builtin_shufflevector(__s0_482, __s0_482, 1, 0); \ | |
| 51407 | float64x1_t __ret_482; \ | |
| 51408 | __ret_482 = __noswap_splat_laneq_f64(__rev0_482, __p1_482); \ | |
| 51409 | __ret_482; \ | |
| 49706 | 51410 | }) |
| 49707 | 51411 | #endif |
| 49708 | 51412 | |
| 49709 | 51413 | #ifdef __LITTLE_ENDIAN__ |
| 49710 | #define vdup_laneq_f32(__p0_391, __p1_391) __extension__ ({ \ | |
| 49711 | float32x4_t __s0_391 = __p0_391; \ | |
| 49712 | float32x2_t __ret_391; \ | |
| 49713 | __ret_391 = splat_laneq_f32(__s0_391, __p1_391); \ | |
| 49714 | __ret_391; \ | |
| 51414 | #define vdup_laneq_f32(__p0_483, __p1_483) __extension__ ({ \ | |
| 51415 | float32x4_t __s0_483 = __p0_483; \ | |
| 51416 | float32x2_t __ret_483; \ | |
| 51417 | __ret_483 = splat_laneq_f32(__s0_483, __p1_483); \ | |
| 51418 | __ret_483; \ | |
| 49715 | 51419 | }) |
| 49716 | 51420 | #else |
| 49717 | #define vdup_laneq_f32(__p0_392, __p1_392) __extension__ ({ \ | |
| 49718 | float32x4_t __s0_392 = __p0_392; \ | |
| 49719 | float32x4_t __rev0_392; __rev0_392 = __builtin_shufflevector(__s0_392, __s0_392, 3, 2, 1, 0); \ | |
| 49720 | float32x2_t __ret_392; \ | |
| 49721 | __ret_392 = __noswap_splat_laneq_f32(__rev0_392, __p1_392); \ | |
| 49722 | __ret_392 = __builtin_shufflevector(__ret_392, __ret_392, 1, 0); \ | |
| 49723 | __ret_392; \ | |
| 51421 | #define vdup_laneq_f32(__p0_484, __p1_484) __extension__ ({ \ | |
| 51422 | float32x4_t __s0_484 = __p0_484; \ | |
| 51423 | float32x4_t __rev0_484; __rev0_484 = __builtin_shufflevector(__s0_484, __s0_484, 3, 2, 1, 0); \ | |
| 51424 | float32x2_t __ret_484; \ | |
| 51425 | __ret_484 = __noswap_splat_laneq_f32(__rev0_484, __p1_484); \ | |
| 51426 | __ret_484 = __builtin_shufflevector(__ret_484, __ret_484, 1, 0); \ | |
| 51427 | __ret_484; \ | |
| 49724 | 51428 | }) |
| 49725 | 51429 | #endif |
| 49726 | 51430 | |
| 49727 | 51431 | #ifdef __LITTLE_ENDIAN__ |
| 49728 | #define vdup_laneq_f16(__p0_393, __p1_393) __extension__ ({ \ | |
| 49729 | float16x8_t __s0_393 = __p0_393; \ | |
| 49730 | float16x4_t __ret_393; \ | |
| 49731 | __ret_393 = splat_laneq_f16(__s0_393, __p1_393); \ | |
| 49732 | __ret_393; \ | |
| 51432 | #define vdup_laneq_f16(__p0_485, __p1_485) __extension__ ({ \ | |
| 51433 | float16x8_t __s0_485 = __p0_485; \ | |
| 51434 | float16x4_t __ret_485; \ | |
| 51435 | __ret_485 = splat_laneq_f16(__s0_485, __p1_485); \ | |
| 51436 | __ret_485; \ | |
| 49733 | 51437 | }) |
| 49734 | 51438 | #else |
| 49735 | #define vdup_laneq_f16(__p0_394, __p1_394) __extension__ ({ \ | |
| 49736 | float16x8_t __s0_394 = __p0_394; \ | |
| 49737 | float16x8_t __rev0_394; __rev0_394 = __builtin_shufflevector(__s0_394, __s0_394, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49738 | float16x4_t __ret_394; \ | |
| 49739 | __ret_394 = __noswap_splat_laneq_f16(__rev0_394, __p1_394); \ | |
| 49740 | __ret_394 = __builtin_shufflevector(__ret_394, __ret_394, 3, 2, 1, 0); \ | |
| 49741 | __ret_394; \ | |
| 51439 | #define vdup_laneq_f16(__p0_486, __p1_486) __extension__ ({ \ | |
| 51440 | float16x8_t __s0_486 = __p0_486; \ | |
| 51441 | float16x8_t __rev0_486; __rev0_486 = __builtin_shufflevector(__s0_486, __s0_486, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51442 | float16x4_t __ret_486; \ | |
| 51443 | __ret_486 = __noswap_splat_laneq_f16(__rev0_486, __p1_486); \ | |
| 51444 | __ret_486 = __builtin_shufflevector(__ret_486, __ret_486, 3, 2, 1, 0); \ | |
| 51445 | __ret_486; \ | |
| 49742 | 51446 | }) |
| 49743 | 51447 | #endif |
| 49744 | 51448 | |
| 49745 | 51449 | #ifdef __LITTLE_ENDIAN__ |
| 49746 | #define vdup_laneq_s32(__p0_395, __p1_395) __extension__ ({ \ | |
| 49747 | int32x4_t __s0_395 = __p0_395; \ | |
| 49748 | int32x2_t __ret_395; \ | |
| 49749 | __ret_395 = splat_laneq_s32(__s0_395, __p1_395); \ | |
| 49750 | __ret_395; \ | |
| 51450 | #define vdup_laneq_s32(__p0_487, __p1_487) __extension__ ({ \ | |
| 51451 | int32x4_t __s0_487 = __p0_487; \ | |
| 51452 | int32x2_t __ret_487; \ | |
| 51453 | __ret_487 = splat_laneq_s32(__s0_487, __p1_487); \ | |
| 51454 | __ret_487; \ | |
| 49751 | 51455 | }) |
| 49752 | 51456 | #else |
| 49753 | #define vdup_laneq_s32(__p0_396, __p1_396) __extension__ ({ \ | |
| 49754 | int32x4_t __s0_396 = __p0_396; \ | |
| 49755 | int32x4_t __rev0_396; __rev0_396 = __builtin_shufflevector(__s0_396, __s0_396, 3, 2, 1, 0); \ | |
| 49756 | int32x2_t __ret_396; \ | |
| 49757 | __ret_396 = __noswap_splat_laneq_s32(__rev0_396, __p1_396); \ | |
| 49758 | __ret_396 = __builtin_shufflevector(__ret_396, __ret_396, 1, 0); \ | |
| 49759 | __ret_396; \ | |
| 51457 | #define vdup_laneq_s32(__p0_488, __p1_488) __extension__ ({ \ | |
| 51458 | int32x4_t __s0_488 = __p0_488; \ | |
| 51459 | int32x4_t __rev0_488; __rev0_488 = __builtin_shufflevector(__s0_488, __s0_488, 3, 2, 1, 0); \ | |
| 51460 | int32x2_t __ret_488; \ | |
| 51461 | __ret_488 = __noswap_splat_laneq_s32(__rev0_488, __p1_488); \ | |
| 51462 | __ret_488 = __builtin_shufflevector(__ret_488, __ret_488, 1, 0); \ | |
| 51463 | __ret_488; \ | |
| 49760 | 51464 | }) |
| 49761 | 51465 | #endif |
| 49762 | 51466 | |
| 49763 | 51467 | #ifdef __LITTLE_ENDIAN__ |
| 49764 | #define vdup_laneq_s64(__p0_397, __p1_397) __extension__ ({ \ | |
| 49765 | int64x2_t __s0_397 = __p0_397; \ | |
| 49766 | int64x1_t __ret_397; \ | |
| 49767 | __ret_397 = splat_laneq_s64(__s0_397, __p1_397); \ | |
| 49768 | __ret_397; \ | |
| 51468 | #define vdup_laneq_s64(__p0_489, __p1_489) __extension__ ({ \ | |
| 51469 | int64x2_t __s0_489 = __p0_489; \ | |
| 51470 | int64x1_t __ret_489; \ | |
| 51471 | __ret_489 = splat_laneq_s64(__s0_489, __p1_489); \ | |
| 51472 | __ret_489; \ | |
| 49769 | 51473 | }) |
| 49770 | 51474 | #else |
| 49771 | #define vdup_laneq_s64(__p0_398, __p1_398) __extension__ ({ \ | |
| 49772 | int64x2_t __s0_398 = __p0_398; \ | |
| 49773 | int64x2_t __rev0_398; __rev0_398 = __builtin_shufflevector(__s0_398, __s0_398, 1, 0); \ | |
| 49774 | int64x1_t __ret_398; \ | |
| 49775 | __ret_398 = __noswap_splat_laneq_s64(__rev0_398, __p1_398); \ | |
| 49776 | __ret_398; \ | |
| 51475 | #define vdup_laneq_s64(__p0_490, __p1_490) __extension__ ({ \ | |
| 51476 | int64x2_t __s0_490 = __p0_490; \ | |
| 51477 | int64x2_t __rev0_490; __rev0_490 = __builtin_shufflevector(__s0_490, __s0_490, 1, 0); \ | |
| 51478 | int64x1_t __ret_490; \ | |
| 51479 | __ret_490 = __noswap_splat_laneq_s64(__rev0_490, __p1_490); \ | |
| 51480 | __ret_490; \ | |
| 49777 | 51481 | }) |
| 49778 | 51482 | #endif |
| 49779 | 51483 | |
| 49780 | 51484 | #ifdef __LITTLE_ENDIAN__ |
| 49781 | #define vdup_laneq_s16(__p0_399, __p1_399) __extension__ ({ \ | |
| 49782 | int16x8_t __s0_399 = __p0_399; \ | |
| 49783 | int16x4_t __ret_399; \ | |
| 49784 | __ret_399 = splat_laneq_s16(__s0_399, __p1_399); \ | |
| 49785 | __ret_399; \ | |
| 51485 | #define vdup_laneq_s16(__p0_491, __p1_491) __extension__ ({ \ | |
| 51486 | int16x8_t __s0_491 = __p0_491; \ | |
| 51487 | int16x4_t __ret_491; \ | |
| 51488 | __ret_491 = splat_laneq_s16(__s0_491, __p1_491); \ | |
| 51489 | __ret_491; \ | |
| 49786 | 51490 | }) |
| 49787 | 51491 | #else |
| 49788 | #define vdup_laneq_s16(__p0_400, __p1_400) __extension__ ({ \ | |
| 49789 | int16x8_t __s0_400 = __p0_400; \ | |
| 49790 | int16x8_t __rev0_400; __rev0_400 = __builtin_shufflevector(__s0_400, __s0_400, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 49791 | int16x4_t __ret_400; \ | |
| 49792 | __ret_400 = __noswap_splat_laneq_s16(__rev0_400, __p1_400); \ | |
| 49793 | __ret_400 = __builtin_shufflevector(__ret_400, __ret_400, 3, 2, 1, 0); \ | |
| 49794 | __ret_400; \ | |
| 51492 | #define vdup_laneq_s16(__p0_492, __p1_492) __extension__ ({ \ | |
| 51493 | int16x8_t __s0_492 = __p0_492; \ | |
| 51494 | int16x8_t __rev0_492; __rev0_492 = __builtin_shufflevector(__s0_492, __s0_492, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 51495 | int16x4_t __ret_492; \ | |
| 51496 | __ret_492 = __noswap_splat_laneq_s16(__rev0_492, __p1_492); \ | |
| 51497 | __ret_492 = __builtin_shufflevector(__ret_492, __ret_492, 3, 2, 1, 0); \ | |
| 51498 | __ret_492; \ | |
| 49795 | 51499 | }) |
| 49796 | 51500 | #endif |
| 49797 | 51501 | |
| ... | ... | @@ -50287,246 +51991,246 @@ __ai float64x1_t vfms_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) |
| 50287 | 51991 | __ret = vfma_f64(__p0, -__p1, __p2); |
| 50288 | 51992 | return __ret; |
| 50289 | 51993 | } |
| 50290 | #define vfmsd_lane_f64(__p0_401, __p1_401, __p2_401, __p3_401) __extension__ ({ \ | |
| 50291 | float64_t __s0_401 = __p0_401; \ | |
| 50292 | float64_t __s1_401 = __p1_401; \ | |
| 50293 | float64x1_t __s2_401 = __p2_401; \ | |
| 50294 | float64_t __ret_401; \ | |
| 50295 | __ret_401 = vfmad_lane_f64(__s0_401, -__s1_401, __s2_401, __p3_401); \ | |
| 50296 | __ret_401; \ | |
| 51994 | #define vfmsd_lane_f64(__p0_493, __p1_493, __p2_493, __p3_493) __extension__ ({ \ | |
| 51995 | float64_t __s0_493 = __p0_493; \ | |
| 51996 | float64_t __s1_493 = __p1_493; \ | |
| 51997 | float64x1_t __s2_493 = __p2_493; \ | |
| 51998 | float64_t __ret_493; \ | |
| 51999 | __ret_493 = vfmad_lane_f64(__s0_493, -__s1_493, __s2_493, __p3_493); \ | |
| 52000 | __ret_493; \ | |
| 50297 | 52001 | }) |
| 50298 | 52002 | #ifdef __LITTLE_ENDIAN__ |
| 50299 | #define vfmss_lane_f32(__p0_402, __p1_402, __p2_402, __p3_402) __extension__ ({ \ | |
| 50300 | float32_t __s0_402 = __p0_402; \ | |
| 50301 | float32_t __s1_402 = __p1_402; \ | |
| 50302 | float32x2_t __s2_402 = __p2_402; \ | |
| 50303 | float32_t __ret_402; \ | |
| 50304 | __ret_402 = vfmas_lane_f32(__s0_402, -__s1_402, __s2_402, __p3_402); \ | |
| 50305 | __ret_402; \ | |
| 52003 | #define vfmss_lane_f32(__p0_494, __p1_494, __p2_494, __p3_494) __extension__ ({ \ | |
| 52004 | float32_t __s0_494 = __p0_494; \ | |
| 52005 | float32_t __s1_494 = __p1_494; \ | |
| 52006 | float32x2_t __s2_494 = __p2_494; \ | |
| 52007 | float32_t __ret_494; \ | |
| 52008 | __ret_494 = vfmas_lane_f32(__s0_494, -__s1_494, __s2_494, __p3_494); \ | |
| 52009 | __ret_494; \ | |
| 50306 | 52010 | }) |
| 50307 | 52011 | #else |
| 50308 | #define vfmss_lane_f32(__p0_403, __p1_403, __p2_403, __p3_403) __extension__ ({ \ | |
| 50309 | float32_t __s0_403 = __p0_403; \ | |
| 50310 | float32_t __s1_403 = __p1_403; \ | |
| 50311 | float32x2_t __s2_403 = __p2_403; \ | |
| 50312 | float32x2_t __rev2_403; __rev2_403 = __builtin_shufflevector(__s2_403, __s2_403, 1, 0); \ | |
| 50313 | float32_t __ret_403; \ | |
| 50314 | __ret_403 = __noswap_vfmas_lane_f32(__s0_403, -__s1_403, __rev2_403, __p3_403); \ | |
| 50315 | __ret_403; \ | |
| 52012 | #define vfmss_lane_f32(__p0_495, __p1_495, __p2_495, __p3_495) __extension__ ({ \ | |
| 52013 | float32_t __s0_495 = __p0_495; \ | |
| 52014 | float32_t __s1_495 = __p1_495; \ | |
| 52015 | float32x2_t __s2_495 = __p2_495; \ | |
| 52016 | float32x2_t __rev2_495; __rev2_495 = __builtin_shufflevector(__s2_495, __s2_495, 1, 0); \ | |
| 52017 | float32_t __ret_495; \ | |
| 52018 | __ret_495 = __noswap_vfmas_lane_f32(__s0_495, -__s1_495, __rev2_495, __p3_495); \ | |
| 52019 | __ret_495; \ | |
| 50316 | 52020 | }) |
| 50317 | 52021 | #endif |
| 50318 | 52022 | |
| 50319 | 52023 | #ifdef __LITTLE_ENDIAN__ |
| 50320 | #define vfmsq_lane_f64(__p0_404, __p1_404, __p2_404, __p3_404) __extension__ ({ \ | |
| 50321 | float64x2_t __s0_404 = __p0_404; \ | |
| 50322 | float64x2_t __s1_404 = __p1_404; \ | |
| 50323 | float64x1_t __s2_404 = __p2_404; \ | |
| 50324 | float64x2_t __ret_404; \ | |
| 50325 | __ret_404 = vfmaq_lane_f64(__s0_404, -__s1_404, __s2_404, __p3_404); \ | |
| 50326 | __ret_404; \ | |
| 52024 | #define vfmsq_lane_f64(__p0_496, __p1_496, __p2_496, __p3_496) __extension__ ({ \ | |
| 52025 | float64x2_t __s0_496 = __p0_496; \ | |
| 52026 | float64x2_t __s1_496 = __p1_496; \ | |
| 52027 | float64x1_t __s2_496 = __p2_496; \ | |
| 52028 | float64x2_t __ret_496; \ | |
| 52029 | __ret_496 = vfmaq_lane_f64(__s0_496, -__s1_496, __s2_496, __p3_496); \ | |
| 52030 | __ret_496; \ | |
| 50327 | 52031 | }) |
| 50328 | 52032 | #else |
| 50329 | #define vfmsq_lane_f64(__p0_405, __p1_405, __p2_405, __p3_405) __extension__ ({ \ | |
| 50330 | float64x2_t __s0_405 = __p0_405; \ | |
| 50331 | float64x2_t __s1_405 = __p1_405; \ | |
| 50332 | float64x1_t __s2_405 = __p2_405; \ | |
| 50333 | float64x2_t __rev0_405; __rev0_405 = __builtin_shufflevector(__s0_405, __s0_405, 1, 0); \ | |
| 50334 | float64x2_t __rev1_405; __rev1_405 = __builtin_shufflevector(__s1_405, __s1_405, 1, 0); \ | |
| 50335 | float64x2_t __ret_405; \ | |
| 50336 | __ret_405 = __noswap_vfmaq_lane_f64(__rev0_405, -__rev1_405, __s2_405, __p3_405); \ | |
| 50337 | __ret_405 = __builtin_shufflevector(__ret_405, __ret_405, 1, 0); \ | |
| 50338 | __ret_405; \ | |
| 52033 | #define vfmsq_lane_f64(__p0_497, __p1_497, __p2_497, __p3_497) __extension__ ({ \ | |
| 52034 | float64x2_t __s0_497 = __p0_497; \ | |
| 52035 | float64x2_t __s1_497 = __p1_497; \ | |
| 52036 | float64x1_t __s2_497 = __p2_497; \ | |
| 52037 | float64x2_t __rev0_497; __rev0_497 = __builtin_shufflevector(__s0_497, __s0_497, 1, 0); \ | |
| 52038 | float64x2_t __rev1_497; __rev1_497 = __builtin_shufflevector(__s1_497, __s1_497, 1, 0); \ | |
| 52039 | float64x2_t __ret_497; \ | |
| 52040 | __ret_497 = __noswap_vfmaq_lane_f64(__rev0_497, -__rev1_497, __s2_497, __p3_497); \ | |
| 52041 | __ret_497 = __builtin_shufflevector(__ret_497, __ret_497, 1, 0); \ | |
| 52042 | __ret_497; \ | |
| 50339 | 52043 | }) |
| 50340 | 52044 | #endif |
| 50341 | 52045 | |
| 50342 | 52046 | #ifdef __LITTLE_ENDIAN__ |
| 50343 | #define vfmsq_lane_f32(__p0_406, __p1_406, __p2_406, __p3_406) __extension__ ({ \ | |
| 50344 | float32x4_t __s0_406 = __p0_406; \ | |
| 50345 | float32x4_t __s1_406 = __p1_406; \ | |
| 50346 | float32x2_t __s2_406 = __p2_406; \ | |
| 50347 | float32x4_t __ret_406; \ | |
| 50348 | __ret_406 = vfmaq_lane_f32(__s0_406, -__s1_406, __s2_406, __p3_406); \ | |
| 50349 | __ret_406; \ | |
| 52047 | #define vfmsq_lane_f32(__p0_498, __p1_498, __p2_498, __p3_498) __extension__ ({ \ | |
| 52048 | float32x4_t __s0_498 = __p0_498; \ | |
| 52049 | float32x4_t __s1_498 = __p1_498; \ | |
| 52050 | float32x2_t __s2_498 = __p2_498; \ | |
| 52051 | float32x4_t __ret_498; \ | |
| 52052 | __ret_498 = vfmaq_lane_f32(__s0_498, -__s1_498, __s2_498, __p3_498); \ | |
| 52053 | __ret_498; \ | |
| 50350 | 52054 | }) |
| 50351 | 52055 | #else |
| 50352 | #define vfmsq_lane_f32(__p0_407, __p1_407, __p2_407, __p3_407) __extension__ ({ \ | |
| 50353 | float32x4_t __s0_407 = __p0_407; \ | |
| 50354 | float32x4_t __s1_407 = __p1_407; \ | |
| 50355 | float32x2_t __s2_407 = __p2_407; \ | |
| 50356 | float32x4_t __rev0_407; __rev0_407 = __builtin_shufflevector(__s0_407, __s0_407, 3, 2, 1, 0); \ | |
| 50357 | float32x4_t __rev1_407; __rev1_407 = __builtin_shufflevector(__s1_407, __s1_407, 3, 2, 1, 0); \ | |
| 50358 | float32x2_t __rev2_407; __rev2_407 = __builtin_shufflevector(__s2_407, __s2_407, 1, 0); \ | |
| 50359 | float32x4_t __ret_407; \ | |
| 50360 | __ret_407 = __noswap_vfmaq_lane_f32(__rev0_407, -__rev1_407, __rev2_407, __p3_407); \ | |
| 50361 | __ret_407 = __builtin_shufflevector(__ret_407, __ret_407, 3, 2, 1, 0); \ | |
| 50362 | __ret_407; \ | |
| 52056 | #define vfmsq_lane_f32(__p0_499, __p1_499, __p2_499, __p3_499) __extension__ ({ \ | |
| 52057 | float32x4_t __s0_499 = __p0_499; \ | |
| 52058 | float32x4_t __s1_499 = __p1_499; \ | |
| 52059 | float32x2_t __s2_499 = __p2_499; \ | |
| 52060 | float32x4_t __rev0_499; __rev0_499 = __builtin_shufflevector(__s0_499, __s0_499, 3, 2, 1, 0); \ | |
| 52061 | float32x4_t __rev1_499; __rev1_499 = __builtin_shufflevector(__s1_499, __s1_499, 3, 2, 1, 0); \ | |
| 52062 | float32x2_t __rev2_499; __rev2_499 = __builtin_shufflevector(__s2_499, __s2_499, 1, 0); \ | |
| 52063 | float32x4_t __ret_499; \ | |
| 52064 | __ret_499 = __noswap_vfmaq_lane_f32(__rev0_499, -__rev1_499, __rev2_499, __p3_499); \ | |
| 52065 | __ret_499 = __builtin_shufflevector(__ret_499, __ret_499, 3, 2, 1, 0); \ | |
| 52066 | __ret_499; \ | |
| 50363 | 52067 | }) |
| 50364 | 52068 | #endif |
| 50365 | 52069 | |
| 50366 | #define vfms_lane_f64(__p0_408, __p1_408, __p2_408, __p3_408) __extension__ ({ \ | |
| 50367 | float64x1_t __s0_408 = __p0_408; \ | |
| 50368 | float64x1_t __s1_408 = __p1_408; \ | |
| 50369 | float64x1_t __s2_408 = __p2_408; \ | |
| 50370 | float64x1_t __ret_408; \ | |
| 50371 | __ret_408 = vfma_lane_f64(__s0_408, -__s1_408, __s2_408, __p3_408); \ | |
| 50372 | __ret_408; \ | |
| 52070 | #define vfms_lane_f64(__p0_500, __p1_500, __p2_500, __p3_500) __extension__ ({ \ | |
| 52071 | float64x1_t __s0_500 = __p0_500; \ | |
| 52072 | float64x1_t __s1_500 = __p1_500; \ | |
| 52073 | float64x1_t __s2_500 = __p2_500; \ | |
| 52074 | float64x1_t __ret_500; \ | |
| 52075 | __ret_500 = vfma_lane_f64(__s0_500, -__s1_500, __s2_500, __p3_500); \ | |
| 52076 | __ret_500; \ | |
| 50373 | 52077 | }) |
| 50374 | 52078 | #ifdef __LITTLE_ENDIAN__ |
| 50375 | #define vfms_lane_f32(__p0_409, __p1_409, __p2_409, __p3_409) __extension__ ({ \ | |
| 50376 | float32x2_t __s0_409 = __p0_409; \ | |
| 50377 | float32x2_t __s1_409 = __p1_409; \ | |
| 50378 | float32x2_t __s2_409 = __p2_409; \ | |
| 50379 | float32x2_t __ret_409; \ | |
| 50380 | __ret_409 = vfma_lane_f32(__s0_409, -__s1_409, __s2_409, __p3_409); \ | |
| 50381 | __ret_409; \ | |
| 52079 | #define vfms_lane_f32(__p0_501, __p1_501, __p2_501, __p3_501) __extension__ ({ \ | |
| 52080 | float32x2_t __s0_501 = __p0_501; \ | |
| 52081 | float32x2_t __s1_501 = __p1_501; \ | |
| 52082 | float32x2_t __s2_501 = __p2_501; \ | |
| 52083 | float32x2_t __ret_501; \ | |
| 52084 | __ret_501 = vfma_lane_f32(__s0_501, -__s1_501, __s2_501, __p3_501); \ | |
| 52085 | __ret_501; \ | |
| 50382 | 52086 | }) |
| 50383 | 52087 | #else |
| 50384 | #define vfms_lane_f32(__p0_410, __p1_410, __p2_410, __p3_410) __extension__ ({ \ | |
| 50385 | float32x2_t __s0_410 = __p0_410; \ | |
| 50386 | float32x2_t __s1_410 = __p1_410; \ | |
| 50387 | float32x2_t __s2_410 = __p2_410; \ | |
| 50388 | float32x2_t __rev0_410; __rev0_410 = __builtin_shufflevector(__s0_410, __s0_410, 1, 0); \ | |
| 50389 | float32x2_t __rev1_410; __rev1_410 = __builtin_shufflevector(__s1_410, __s1_410, 1, 0); \ | |
| 50390 | float32x2_t __rev2_410; __rev2_410 = __builtin_shufflevector(__s2_410, __s2_410, 1, 0); \ | |
| 50391 | float32x2_t __ret_410; \ | |
| 50392 | __ret_410 = __noswap_vfma_lane_f32(__rev0_410, -__rev1_410, __rev2_410, __p3_410); \ | |
| 50393 | __ret_410 = __builtin_shufflevector(__ret_410, __ret_410, 1, 0); \ | |
| 50394 | __ret_410; \ | |
| 52088 | #define vfms_lane_f32(__p0_502, __p1_502, __p2_502, __p3_502) __extension__ ({ \ | |
| 52089 | float32x2_t __s0_502 = __p0_502; \ | |
| 52090 | float32x2_t __s1_502 = __p1_502; \ | |
| 52091 | float32x2_t __s2_502 = __p2_502; \ | |
| 52092 | float32x2_t __rev0_502; __rev0_502 = __builtin_shufflevector(__s0_502, __s0_502, 1, 0); \ | |
| 52093 | float32x2_t __rev1_502; __rev1_502 = __builtin_shufflevector(__s1_502, __s1_502, 1, 0); \ | |
| 52094 | float32x2_t __rev2_502; __rev2_502 = __builtin_shufflevector(__s2_502, __s2_502, 1, 0); \ | |
| 52095 | float32x2_t __ret_502; \ | |
| 52096 | __ret_502 = __noswap_vfma_lane_f32(__rev0_502, -__rev1_502, __rev2_502, __p3_502); \ | |
| 52097 | __ret_502 = __builtin_shufflevector(__ret_502, __ret_502, 1, 0); \ | |
| 52098 | __ret_502; \ | |
| 50395 | 52099 | }) |
| 50396 | 52100 | #endif |
| 50397 | 52101 | |
| 50398 | 52102 | #ifdef __LITTLE_ENDIAN__ |
| 50399 | #define vfmsd_laneq_f64(__p0_411, __p1_411, __p2_411, __p3_411) __extension__ ({ \ | |
| 50400 | float64_t __s0_411 = __p0_411; \ | |
| 50401 | float64_t __s1_411 = __p1_411; \ | |
| 50402 | float64x2_t __s2_411 = __p2_411; \ | |
| 50403 | float64_t __ret_411; \ | |
| 50404 | __ret_411 = vfmad_laneq_f64(__s0_411, -__s1_411, __s2_411, __p3_411); \ | |
| 50405 | __ret_411; \ | |
| 52103 | #define vfmsd_laneq_f64(__p0_503, __p1_503, __p2_503, __p3_503) __extension__ ({ \ | |
| 52104 | float64_t __s0_503 = __p0_503; \ | |
| 52105 | float64_t __s1_503 = __p1_503; \ | |
| 52106 | float64x2_t __s2_503 = __p2_503; \ | |
| 52107 | float64_t __ret_503; \ | |
| 52108 | __ret_503 = vfmad_laneq_f64(__s0_503, -__s1_503, __s2_503, __p3_503); \ | |
| 52109 | __ret_503; \ | |
| 50406 | 52110 | }) |
| 50407 | 52111 | #else |
| 50408 | #define vfmsd_laneq_f64(__p0_412, __p1_412, __p2_412, __p3_412) __extension__ ({ \ | |
| 50409 | float64_t __s0_412 = __p0_412; \ | |
| 50410 | float64_t __s1_412 = __p1_412; \ | |
| 50411 | float64x2_t __s2_412 = __p2_412; \ | |
| 50412 | float64x2_t __rev2_412; __rev2_412 = __builtin_shufflevector(__s2_412, __s2_412, 1, 0); \ | |
| 50413 | float64_t __ret_412; \ | |
| 50414 | __ret_412 = __noswap_vfmad_laneq_f64(__s0_412, -__s1_412, __rev2_412, __p3_412); \ | |
| 50415 | __ret_412; \ | |
| 52112 | #define vfmsd_laneq_f64(__p0_504, __p1_504, __p2_504, __p3_504) __extension__ ({ \ | |
| 52113 | float64_t __s0_504 = __p0_504; \ | |
| 52114 | float64_t __s1_504 = __p1_504; \ | |
| 52115 | float64x2_t __s2_504 = __p2_504; \ | |
| 52116 | float64x2_t __rev2_504; __rev2_504 = __builtin_shufflevector(__s2_504, __s2_504, 1, 0); \ | |
| 52117 | float64_t __ret_504; \ | |
| 52118 | __ret_504 = __noswap_vfmad_laneq_f64(__s0_504, -__s1_504, __rev2_504, __p3_504); \ | |
| 52119 | __ret_504; \ | |
| 50416 | 52120 | }) |
| 50417 | 52121 | #endif |
| 50418 | 52122 | |
| 50419 | 52123 | #ifdef __LITTLE_ENDIAN__ |
| 50420 | #define vfmss_laneq_f32(__p0_413, __p1_413, __p2_413, __p3_413) __extension__ ({ \ | |
| 50421 | float32_t __s0_413 = __p0_413; \ | |
| 50422 | float32_t __s1_413 = __p1_413; \ | |
| 50423 | float32x4_t __s2_413 = __p2_413; \ | |
| 50424 | float32_t __ret_413; \ | |
| 50425 | __ret_413 = vfmas_laneq_f32(__s0_413, -__s1_413, __s2_413, __p3_413); \ | |
| 50426 | __ret_413; \ | |
| 52124 | #define vfmss_laneq_f32(__p0_505, __p1_505, __p2_505, __p3_505) __extension__ ({ \ | |
| 52125 | float32_t __s0_505 = __p0_505; \ | |
| 52126 | float32_t __s1_505 = __p1_505; \ | |
| 52127 | float32x4_t __s2_505 = __p2_505; \ | |
| 52128 | float32_t __ret_505; \ | |
| 52129 | __ret_505 = vfmas_laneq_f32(__s0_505, -__s1_505, __s2_505, __p3_505); \ | |
| 52130 | __ret_505; \ | |
| 50427 | 52131 | }) |
| 50428 | 52132 | #else |
| 50429 | #define vfmss_laneq_f32(__p0_414, __p1_414, __p2_414, __p3_414) __extension__ ({ \ | |
| 50430 | float32_t __s0_414 = __p0_414; \ | |
| 50431 | float32_t __s1_414 = __p1_414; \ | |
| 50432 | float32x4_t __s2_414 = __p2_414; \ | |
| 50433 | float32x4_t __rev2_414; __rev2_414 = __builtin_shufflevector(__s2_414, __s2_414, 3, 2, 1, 0); \ | |
| 50434 | float32_t __ret_414; \ | |
| 50435 | __ret_414 = __noswap_vfmas_laneq_f32(__s0_414, -__s1_414, __rev2_414, __p3_414); \ | |
| 50436 | __ret_414; \ | |
| 52133 | #define vfmss_laneq_f32(__p0_506, __p1_506, __p2_506, __p3_506) __extension__ ({ \ | |
| 52134 | float32_t __s0_506 = __p0_506; \ | |
| 52135 | float32_t __s1_506 = __p1_506; \ | |
| 52136 | float32x4_t __s2_506 = __p2_506; \ | |
| 52137 | float32x4_t __rev2_506; __rev2_506 = __builtin_shufflevector(__s2_506, __s2_506, 3, 2, 1, 0); \ | |
| 52138 | float32_t __ret_506; \ | |
| 52139 | __ret_506 = __noswap_vfmas_laneq_f32(__s0_506, -__s1_506, __rev2_506, __p3_506); \ | |
| 52140 | __ret_506; \ | |
| 50437 | 52141 | }) |
| 50438 | 52142 | #endif |
| 50439 | 52143 | |
| 50440 | 52144 | #ifdef __LITTLE_ENDIAN__ |
| 50441 | #define vfmsq_laneq_f64(__p0_415, __p1_415, __p2_415, __p3_415) __extension__ ({ \ | |
| 50442 | float64x2_t __s0_415 = __p0_415; \ | |
| 50443 | float64x2_t __s1_415 = __p1_415; \ | |
| 50444 | float64x2_t __s2_415 = __p2_415; \ | |
| 50445 | float64x2_t __ret_415; \ | |
| 50446 | __ret_415 = vfmaq_laneq_f64(__s0_415, -__s1_415, __s2_415, __p3_415); \ | |
| 50447 | __ret_415; \ | |
| 52145 | #define vfmsq_laneq_f64(__p0_507, __p1_507, __p2_507, __p3_507) __extension__ ({ \ | |
| 52146 | float64x2_t __s0_507 = __p0_507; \ | |
| 52147 | float64x2_t __s1_507 = __p1_507; \ | |
| 52148 | float64x2_t __s2_507 = __p2_507; \ | |
| 52149 | float64x2_t __ret_507; \ | |
| 52150 | __ret_507 = vfmaq_laneq_f64(__s0_507, -__s1_507, __s2_507, __p3_507); \ | |
| 52151 | __ret_507; \ | |
| 50448 | 52152 | }) |
| 50449 | 52153 | #else |
| 50450 | #define vfmsq_laneq_f64(__p0_416, __p1_416, __p2_416, __p3_416) __extension__ ({ \ | |
| 50451 | float64x2_t __s0_416 = __p0_416; \ | |
| 50452 | float64x2_t __s1_416 = __p1_416; \ | |
| 50453 | float64x2_t __s2_416 = __p2_416; \ | |
| 50454 | float64x2_t __rev0_416; __rev0_416 = __builtin_shufflevector(__s0_416, __s0_416, 1, 0); \ | |
| 50455 | float64x2_t __rev1_416; __rev1_416 = __builtin_shufflevector(__s1_416, __s1_416, 1, 0); \ | |
| 50456 | float64x2_t __rev2_416; __rev2_416 = __builtin_shufflevector(__s2_416, __s2_416, 1, 0); \ | |
| 50457 | float64x2_t __ret_416; \ | |
| 50458 | __ret_416 = __noswap_vfmaq_laneq_f64(__rev0_416, -__rev1_416, __rev2_416, __p3_416); \ | |
| 50459 | __ret_416 = __builtin_shufflevector(__ret_416, __ret_416, 1, 0); \ | |
| 50460 | __ret_416; \ | |
| 52154 | #define vfmsq_laneq_f64(__p0_508, __p1_508, __p2_508, __p3_508) __extension__ ({ \ | |
| 52155 | float64x2_t __s0_508 = __p0_508; \ | |
| 52156 | float64x2_t __s1_508 = __p1_508; \ | |
| 52157 | float64x2_t __s2_508 = __p2_508; \ | |
| 52158 | float64x2_t __rev0_508; __rev0_508 = __builtin_shufflevector(__s0_508, __s0_508, 1, 0); \ | |
| 52159 | float64x2_t __rev1_508; __rev1_508 = __builtin_shufflevector(__s1_508, __s1_508, 1, 0); \ | |
| 52160 | float64x2_t __rev2_508; __rev2_508 = __builtin_shufflevector(__s2_508, __s2_508, 1, 0); \ | |
| 52161 | float64x2_t __ret_508; \ | |
| 52162 | __ret_508 = __noswap_vfmaq_laneq_f64(__rev0_508, -__rev1_508, __rev2_508, __p3_508); \ | |
| 52163 | __ret_508 = __builtin_shufflevector(__ret_508, __ret_508, 1, 0); \ | |
| 52164 | __ret_508; \ | |
| 50461 | 52165 | }) |
| 50462 | 52166 | #endif |
| 50463 | 52167 | |
| 50464 | 52168 | #ifdef __LITTLE_ENDIAN__ |
| 50465 | #define vfmsq_laneq_f32(__p0_417, __p1_417, __p2_417, __p3_417) __extension__ ({ \ | |
| 50466 | float32x4_t __s0_417 = __p0_417; \ | |
| 50467 | float32x4_t __s1_417 = __p1_417; \ | |
| 50468 | float32x4_t __s2_417 = __p2_417; \ | |
| 50469 | float32x4_t __ret_417; \ | |
| 50470 | __ret_417 = vfmaq_laneq_f32(__s0_417, -__s1_417, __s2_417, __p3_417); \ | |
| 50471 | __ret_417; \ | |
| 52169 | #define vfmsq_laneq_f32(__p0_509, __p1_509, __p2_509, __p3_509) __extension__ ({ \ | |
| 52170 | float32x4_t __s0_509 = __p0_509; \ | |
| 52171 | float32x4_t __s1_509 = __p1_509; \ | |
| 52172 | float32x4_t __s2_509 = __p2_509; \ | |
| 52173 | float32x4_t __ret_509; \ | |
| 52174 | __ret_509 = vfmaq_laneq_f32(__s0_509, -__s1_509, __s2_509, __p3_509); \ | |
| 52175 | __ret_509; \ | |
| 50472 | 52176 | }) |
| 50473 | 52177 | #else |
| 50474 | #define vfmsq_laneq_f32(__p0_418, __p1_418, __p2_418, __p3_418) __extension__ ({ \ | |
| 50475 | float32x4_t __s0_418 = __p0_418; \ | |
| 50476 | float32x4_t __s1_418 = __p1_418; \ | |
| 50477 | float32x4_t __s2_418 = __p2_418; \ | |
| 50478 | float32x4_t __rev0_418; __rev0_418 = __builtin_shufflevector(__s0_418, __s0_418, 3, 2, 1, 0); \ | |
| 50479 | float32x4_t __rev1_418; __rev1_418 = __builtin_shufflevector(__s1_418, __s1_418, 3, 2, 1, 0); \ | |
| 50480 | float32x4_t __rev2_418; __rev2_418 = __builtin_shufflevector(__s2_418, __s2_418, 3, 2, 1, 0); \ | |
| 50481 | float32x4_t __ret_418; \ | |
| 50482 | __ret_418 = __noswap_vfmaq_laneq_f32(__rev0_418, -__rev1_418, __rev2_418, __p3_418); \ | |
| 50483 | __ret_418 = __builtin_shufflevector(__ret_418, __ret_418, 3, 2, 1, 0); \ | |
| 50484 | __ret_418; \ | |
| 52178 | #define vfmsq_laneq_f32(__p0_510, __p1_510, __p2_510, __p3_510) __extension__ ({ \ | |
| 52179 | float32x4_t __s0_510 = __p0_510; \ | |
| 52180 | float32x4_t __s1_510 = __p1_510; \ | |
| 52181 | float32x4_t __s2_510 = __p2_510; \ | |
| 52182 | float32x4_t __rev0_510; __rev0_510 = __builtin_shufflevector(__s0_510, __s0_510, 3, 2, 1, 0); \ | |
| 52183 | float32x4_t __rev1_510; __rev1_510 = __builtin_shufflevector(__s1_510, __s1_510, 3, 2, 1, 0); \ | |
| 52184 | float32x4_t __rev2_510; __rev2_510 = __builtin_shufflevector(__s2_510, __s2_510, 3, 2, 1, 0); \ | |
| 52185 | float32x4_t __ret_510; \ | |
| 52186 | __ret_510 = __noswap_vfmaq_laneq_f32(__rev0_510, -__rev1_510, __rev2_510, __p3_510); \ | |
| 52187 | __ret_510 = __builtin_shufflevector(__ret_510, __ret_510, 3, 2, 1, 0); \ | |
| 52188 | __ret_510; \ | |
| 50485 | 52189 | }) |
| 50486 | 52190 | #endif |
| 50487 | 52191 | |
| 50488 | 52192 | #ifdef __LITTLE_ENDIAN__ |
| 50489 | #define vfms_laneq_f64(__p0_419, __p1_419, __p2_419, __p3_419) __extension__ ({ \ | |
| 50490 | float64x1_t __s0_419 = __p0_419; \ | |
| 50491 | float64x1_t __s1_419 = __p1_419; \ | |
| 50492 | float64x2_t __s2_419 = __p2_419; \ | |
| 50493 | float64x1_t __ret_419; \ | |
| 50494 | __ret_419 = vfma_laneq_f64(__s0_419, -__s1_419, __s2_419, __p3_419); \ | |
| 50495 | __ret_419; \ | |
| 52193 | #define vfms_laneq_f64(__p0_511, __p1_511, __p2_511, __p3_511) __extension__ ({ \ | |
| 52194 | float64x1_t __s0_511 = __p0_511; \ | |
| 52195 | float64x1_t __s1_511 = __p1_511; \ | |
| 52196 | float64x2_t __s2_511 = __p2_511; \ | |
| 52197 | float64x1_t __ret_511; \ | |
| 52198 | __ret_511 = vfma_laneq_f64(__s0_511, -__s1_511, __s2_511, __p3_511); \ | |
| 52199 | __ret_511; \ | |
| 50496 | 52200 | }) |
| 50497 | 52201 | #else |
| 50498 | #define vfms_laneq_f64(__p0_420, __p1_420, __p2_420, __p3_420) __extension__ ({ \ | |
| 50499 | float64x1_t __s0_420 = __p0_420; \ | |
| 50500 | float64x1_t __s1_420 = __p1_420; \ | |
| 50501 | float64x2_t __s2_420 = __p2_420; \ | |
| 50502 | float64x2_t __rev2_420; __rev2_420 = __builtin_shufflevector(__s2_420, __s2_420, 1, 0); \ | |
| 50503 | float64x1_t __ret_420; \ | |
| 50504 | __ret_420 = __noswap_vfma_laneq_f64(__s0_420, -__s1_420, __rev2_420, __p3_420); \ | |
| 50505 | __ret_420; \ | |
| 52202 | #define vfms_laneq_f64(__p0_512, __p1_512, __p2_512, __p3_512) __extension__ ({ \ | |
| 52203 | float64x1_t __s0_512 = __p0_512; \ | |
| 52204 | float64x1_t __s1_512 = __p1_512; \ | |
| 52205 | float64x2_t __s2_512 = __p2_512; \ | |
| 52206 | float64x2_t __rev2_512; __rev2_512 = __builtin_shufflevector(__s2_512, __s2_512, 1, 0); \ | |
| 52207 | float64x1_t __ret_512; \ | |
| 52208 | __ret_512 = __noswap_vfma_laneq_f64(__s0_512, -__s1_512, __rev2_512, __p3_512); \ | |
| 52209 | __ret_512; \ | |
| 50506 | 52210 | }) |
| 50507 | 52211 | #endif |
| 50508 | 52212 | |
| 50509 | 52213 | #ifdef __LITTLE_ENDIAN__ |
| 50510 | #define vfms_laneq_f32(__p0_421, __p1_421, __p2_421, __p3_421) __extension__ ({ \ | |
| 50511 | float32x2_t __s0_421 = __p0_421; \ | |
| 50512 | float32x2_t __s1_421 = __p1_421; \ | |
| 50513 | float32x4_t __s2_421 = __p2_421; \ | |
| 50514 | float32x2_t __ret_421; \ | |
| 50515 | __ret_421 = vfma_laneq_f32(__s0_421, -__s1_421, __s2_421, __p3_421); \ | |
| 50516 | __ret_421; \ | |
| 52214 | #define vfms_laneq_f32(__p0_513, __p1_513, __p2_513, __p3_513) __extension__ ({ \ | |
| 52215 | float32x2_t __s0_513 = __p0_513; \ | |
| 52216 | float32x2_t __s1_513 = __p1_513; \ | |
| 52217 | float32x4_t __s2_513 = __p2_513; \ | |
| 52218 | float32x2_t __ret_513; \ | |
| 52219 | __ret_513 = vfma_laneq_f32(__s0_513, -__s1_513, __s2_513, __p3_513); \ | |
| 52220 | __ret_513; \ | |
| 50517 | 52221 | }) |
| 50518 | 52222 | #else |
| 50519 | #define vfms_laneq_f32(__p0_422, __p1_422, __p2_422, __p3_422) __extension__ ({ \ | |
| 50520 | float32x2_t __s0_422 = __p0_422; \ | |
| 50521 | float32x2_t __s1_422 = __p1_422; \ | |
| 50522 | float32x4_t __s2_422 = __p2_422; \ | |
| 50523 | float32x2_t __rev0_422; __rev0_422 = __builtin_shufflevector(__s0_422, __s0_422, 1, 0); \ | |
| 50524 | float32x2_t __rev1_422; __rev1_422 = __builtin_shufflevector(__s1_422, __s1_422, 1, 0); \ | |
| 50525 | float32x4_t __rev2_422; __rev2_422 = __builtin_shufflevector(__s2_422, __s2_422, 3, 2, 1, 0); \ | |
| 50526 | float32x2_t __ret_422; \ | |
| 50527 | __ret_422 = __noswap_vfma_laneq_f32(__rev0_422, -__rev1_422, __rev2_422, __p3_422); \ | |
| 50528 | __ret_422 = __builtin_shufflevector(__ret_422, __ret_422, 1, 0); \ | |
| 50529 | __ret_422; \ | |
| 52223 | #define vfms_laneq_f32(__p0_514, __p1_514, __p2_514, __p3_514) __extension__ ({ \ | |
| 52224 | float32x2_t __s0_514 = __p0_514; \ | |
| 52225 | float32x2_t __s1_514 = __p1_514; \ | |
| 52226 | float32x4_t __s2_514 = __p2_514; \ | |
| 52227 | float32x2_t __rev0_514; __rev0_514 = __builtin_shufflevector(__s0_514, __s0_514, 1, 0); \ | |
| 52228 | float32x2_t __rev1_514; __rev1_514 = __builtin_shufflevector(__s1_514, __s1_514, 1, 0); \ | |
| 52229 | float32x4_t __rev2_514; __rev2_514 = __builtin_shufflevector(__s2_514, __s2_514, 3, 2, 1, 0); \ | |
| 52230 | float32x2_t __ret_514; \ | |
| 52231 | __ret_514 = __noswap_vfma_laneq_f32(__rev0_514, -__rev1_514, __rev2_514, __p3_514); \ | |
| 52232 | __ret_514 = __builtin_shufflevector(__ret_514, __ret_514, 1, 0); \ | |
| 52233 | __ret_514; \ | |
| 50530 | 52234 | }) |
| 50531 | 52235 | #endif |
| 50532 | 52236 | |
| ... | ... | @@ -52548,547 +54252,530 @@ __ai float64x1_t vmla_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) |
| 52548 | 54252 | return __ret; |
| 52549 | 54253 | } |
| 52550 | 54254 | #ifdef __LITTLE_ENDIAN__ |
| 52551 | #define vmlaq_laneq_u32(__p0_423, __p1_423, __p2_423, __p3_423) __extension__ ({ \ | |
| 52552 | uint32x4_t __s0_423 = __p0_423; \ | |
| 52553 | uint32x4_t __s1_423 = __p1_423; \ | |
| 52554 | uint32x4_t __s2_423 = __p2_423; \ | |
| 52555 | uint32x4_t __ret_423; \ | |
| 52556 | __ret_423 = __s0_423 + __s1_423 * splatq_laneq_u32(__s2_423, __p3_423); \ | |
| 52557 | __ret_423; \ | |
| 54255 | #define vmlaq_laneq_u32(__p0_515, __p1_515, __p2_515, __p3_515) __extension__ ({ \ | |
| 54256 | uint32x4_t __s0_515 = __p0_515; \ | |
| 54257 | uint32x4_t __s1_515 = __p1_515; \ | |
| 54258 | uint32x4_t __s2_515 = __p2_515; \ | |
| 54259 | uint32x4_t __ret_515; \ | |
| 54260 | __ret_515 = __s0_515 + __s1_515 * splatq_laneq_u32(__s2_515, __p3_515); \ | |
| 54261 | __ret_515; \ | |
| 52558 | 54262 | }) |
| 52559 | 54263 | #else |
| 52560 | #define vmlaq_laneq_u32(__p0_424, __p1_424, __p2_424, __p3_424) __extension__ ({ \ | |
| 52561 | uint32x4_t __s0_424 = __p0_424; \ | |
| 52562 | uint32x4_t __s1_424 = __p1_424; \ | |
| 52563 | uint32x4_t __s2_424 = __p2_424; \ | |
| 52564 | uint32x4_t __rev0_424; __rev0_424 = __builtin_shufflevector(__s0_424, __s0_424, 3, 2, 1, 0); \ | |
| 52565 | uint32x4_t __rev1_424; __rev1_424 = __builtin_shufflevector(__s1_424, __s1_424, 3, 2, 1, 0); \ | |
| 52566 | uint32x4_t __rev2_424; __rev2_424 = __builtin_shufflevector(__s2_424, __s2_424, 3, 2, 1, 0); \ | |
| 52567 | uint32x4_t __ret_424; \ | |
| 52568 | __ret_424 = __rev0_424 + __rev1_424 * __noswap_splatq_laneq_u32(__rev2_424, __p3_424); \ | |
| 52569 | __ret_424 = __builtin_shufflevector(__ret_424, __ret_424, 3, 2, 1, 0); \ | |
| 52570 | __ret_424; \ | |
| 54264 | #define vmlaq_laneq_u32(__p0_516, __p1_516, __p2_516, __p3_516) __extension__ ({ \ | |
| 54265 | uint32x4_t __s0_516 = __p0_516; \ | |
| 54266 | uint32x4_t __s1_516 = __p1_516; \ | |
| 54267 | uint32x4_t __s2_516 = __p2_516; \ | |
| 54268 | uint32x4_t __rev0_516; __rev0_516 = __builtin_shufflevector(__s0_516, __s0_516, 3, 2, 1, 0); \ | |
| 54269 | uint32x4_t __rev1_516; __rev1_516 = __builtin_shufflevector(__s1_516, __s1_516, 3, 2, 1, 0); \ | |
| 54270 | uint32x4_t __rev2_516; __rev2_516 = __builtin_shufflevector(__s2_516, __s2_516, 3, 2, 1, 0); \ | |
| 54271 | uint32x4_t __ret_516; \ | |
| 54272 | __ret_516 = __rev0_516 + __rev1_516 * __noswap_splatq_laneq_u32(__rev2_516, __p3_516); \ | |
| 54273 | __ret_516 = __builtin_shufflevector(__ret_516, __ret_516, 3, 2, 1, 0); \ | |
| 54274 | __ret_516; \ | |
| 52571 | 54275 | }) |
| 52572 | 54276 | #endif |
| 52573 | 54277 | |
| 52574 | 54278 | #ifdef __LITTLE_ENDIAN__ |
| 52575 | #define vmlaq_laneq_u16(__p0_425, __p1_425, __p2_425, __p3_425) __extension__ ({ \ | |
| 52576 | uint16x8_t __s0_425 = __p0_425; \ | |
| 52577 | uint16x8_t __s1_425 = __p1_425; \ | |
| 52578 | uint16x8_t __s2_425 = __p2_425; \ | |
| 52579 | uint16x8_t __ret_425; \ | |
| 52580 | __ret_425 = __s0_425 + __s1_425 * splatq_laneq_u16(__s2_425, __p3_425); \ | |
| 52581 | __ret_425; \ | |
| 54279 | #define vmlaq_laneq_u16(__p0_517, __p1_517, __p2_517, __p3_517) __extension__ ({ \ | |
| 54280 | uint16x8_t __s0_517 = __p0_517; \ | |
| 54281 | uint16x8_t __s1_517 = __p1_517; \ | |
| 54282 | uint16x8_t __s2_517 = __p2_517; \ | |
| 54283 | uint16x8_t __ret_517; \ | |
| 54284 | __ret_517 = __s0_517 + __s1_517 * splatq_laneq_u16(__s2_517, __p3_517); \ | |
| 54285 | __ret_517; \ | |
| 52582 | 54286 | }) |
| 52583 | 54287 | #else |
| 52584 | #define vmlaq_laneq_u16(__p0_426, __p1_426, __p2_426, __p3_426) __extension__ ({ \ | |
| 52585 | uint16x8_t __s0_426 = __p0_426; \ | |
| 52586 | uint16x8_t __s1_426 = __p1_426; \ | |
| 52587 | uint16x8_t __s2_426 = __p2_426; \ | |
| 52588 | uint16x8_t __rev0_426; __rev0_426 = __builtin_shufflevector(__s0_426, __s0_426, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52589 | uint16x8_t __rev1_426; __rev1_426 = __builtin_shufflevector(__s1_426, __s1_426, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52590 | uint16x8_t __rev2_426; __rev2_426 = __builtin_shufflevector(__s2_426, __s2_426, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52591 | uint16x8_t __ret_426; \ | |
| 52592 | __ret_426 = __rev0_426 + __rev1_426 * __noswap_splatq_laneq_u16(__rev2_426, __p3_426); \ | |
| 52593 | __ret_426 = __builtin_shufflevector(__ret_426, __ret_426, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52594 | __ret_426; \ | |
| 54288 | #define vmlaq_laneq_u16(__p0_518, __p1_518, __p2_518, __p3_518) __extension__ ({ \ | |
| 54289 | uint16x8_t __s0_518 = __p0_518; \ | |
| 54290 | uint16x8_t __s1_518 = __p1_518; \ | |
| 54291 | uint16x8_t __s2_518 = __p2_518; \ | |
| 54292 | uint16x8_t __rev0_518; __rev0_518 = __builtin_shufflevector(__s0_518, __s0_518, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54293 | uint16x8_t __rev1_518; __rev1_518 = __builtin_shufflevector(__s1_518, __s1_518, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54294 | uint16x8_t __rev2_518; __rev2_518 = __builtin_shufflevector(__s2_518, __s2_518, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54295 | uint16x8_t __ret_518; \ | |
| 54296 | __ret_518 = __rev0_518 + __rev1_518 * __noswap_splatq_laneq_u16(__rev2_518, __p3_518); \ | |
| 54297 | __ret_518 = __builtin_shufflevector(__ret_518, __ret_518, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54298 | __ret_518; \ | |
| 52595 | 54299 | }) |
| 52596 | 54300 | #endif |
| 52597 | 54301 | |
| 52598 | 54302 | #ifdef __LITTLE_ENDIAN__ |
| 52599 | #define vmlaq_laneq_f32(__p0_427, __p1_427, __p2_427, __p3_427) __extension__ ({ \ | |
| 52600 | float32x4_t __s0_427 = __p0_427; \ | |
| 52601 | float32x4_t __s1_427 = __p1_427; \ | |
| 52602 | float32x4_t __s2_427 = __p2_427; \ | |
| 52603 | float32x4_t __ret_427; \ | |
| 52604 | __ret_427 = __s0_427 + __s1_427 * splatq_laneq_f32(__s2_427, __p3_427); \ | |
| 52605 | __ret_427; \ | |
| 54303 | #define vmlaq_laneq_f32(__p0_519, __p1_519, __p2_519, __p3_519) __extension__ ({ \ | |
| 54304 | float32x4_t __s0_519 = __p0_519; \ | |
| 54305 | float32x4_t __s1_519 = __p1_519; \ | |
| 54306 | float32x4_t __s2_519 = __p2_519; \ | |
| 54307 | float32x4_t __ret_519; \ | |
| 54308 | __ret_519 = __s0_519 + __s1_519 * splatq_laneq_f32(__s2_519, __p3_519); \ | |
| 54309 | __ret_519; \ | |
| 52606 | 54310 | }) |
| 52607 | 54311 | #else |
| 52608 | #define vmlaq_laneq_f32(__p0_428, __p1_428, __p2_428, __p3_428) __extension__ ({ \ | |
| 52609 | float32x4_t __s0_428 = __p0_428; \ | |
| 52610 | float32x4_t __s1_428 = __p1_428; \ | |
| 52611 | float32x4_t __s2_428 = __p2_428; \ | |
| 52612 | float32x4_t __rev0_428; __rev0_428 = __builtin_shufflevector(__s0_428, __s0_428, 3, 2, 1, 0); \ | |
| 52613 | float32x4_t __rev1_428; __rev1_428 = __builtin_shufflevector(__s1_428, __s1_428, 3, 2, 1, 0); \ | |
| 52614 | float32x4_t __rev2_428; __rev2_428 = __builtin_shufflevector(__s2_428, __s2_428, 3, 2, 1, 0); \ | |
| 52615 | float32x4_t __ret_428; \ | |
| 52616 | __ret_428 = __rev0_428 + __rev1_428 * __noswap_splatq_laneq_f32(__rev2_428, __p3_428); \ | |
| 52617 | __ret_428 = __builtin_shufflevector(__ret_428, __ret_428, 3, 2, 1, 0); \ | |
| 52618 | __ret_428; \ | |
| 54312 | #define vmlaq_laneq_f32(__p0_520, __p1_520, __p2_520, __p3_520) __extension__ ({ \ | |
| 54313 | float32x4_t __s0_520 = __p0_520; \ | |
| 54314 | float32x4_t __s1_520 = __p1_520; \ | |
| 54315 | float32x4_t __s2_520 = __p2_520; \ | |
| 54316 | float32x4_t __rev0_520; __rev0_520 = __builtin_shufflevector(__s0_520, __s0_520, 3, 2, 1, 0); \ | |
| 54317 | float32x4_t __rev1_520; __rev1_520 = __builtin_shufflevector(__s1_520, __s1_520, 3, 2, 1, 0); \ | |
| 54318 | float32x4_t __rev2_520; __rev2_520 = __builtin_shufflevector(__s2_520, __s2_520, 3, 2, 1, 0); \ | |
| 54319 | float32x4_t __ret_520; \ | |
| 54320 | __ret_520 = __rev0_520 + __rev1_520 * __noswap_splatq_laneq_f32(__rev2_520, __p3_520); \ | |
| 54321 | __ret_520 = __builtin_shufflevector(__ret_520, __ret_520, 3, 2, 1, 0); \ | |
| 54322 | __ret_520; \ | |
| 52619 | 54323 | }) |
| 52620 | 54324 | #endif |
| 52621 | 54325 | |
| 52622 | 54326 | #ifdef __LITTLE_ENDIAN__ |
| 52623 | #define vmlaq_laneq_s32(__p0_429, __p1_429, __p2_429, __p3_429) __extension__ ({ \ | |
| 52624 | int32x4_t __s0_429 = __p0_429; \ | |
| 52625 | int32x4_t __s1_429 = __p1_429; \ | |
| 52626 | int32x4_t __s2_429 = __p2_429; \ | |
| 52627 | int32x4_t __ret_429; \ | |
| 52628 | __ret_429 = __s0_429 + __s1_429 * splatq_laneq_s32(__s2_429, __p3_429); \ | |
| 52629 | __ret_429; \ | |
| 54327 | #define vmlaq_laneq_s32(__p0_521, __p1_521, __p2_521, __p3_521) __extension__ ({ \ | |
| 54328 | int32x4_t __s0_521 = __p0_521; \ | |
| 54329 | int32x4_t __s1_521 = __p1_521; \ | |
| 54330 | int32x4_t __s2_521 = __p2_521; \ | |
| 54331 | int32x4_t __ret_521; \ | |
| 54332 | __ret_521 = __s0_521 + __s1_521 * splatq_laneq_s32(__s2_521, __p3_521); \ | |
| 54333 | __ret_521; \ | |
| 52630 | 54334 | }) |
| 52631 | 54335 | #else |
| 52632 | #define vmlaq_laneq_s32(__p0_430, __p1_430, __p2_430, __p3_430) __extension__ ({ \ | |
| 52633 | int32x4_t __s0_430 = __p0_430; \ | |
| 52634 | int32x4_t __s1_430 = __p1_430; \ | |
| 52635 | int32x4_t __s2_430 = __p2_430; \ | |
| 52636 | int32x4_t __rev0_430; __rev0_430 = __builtin_shufflevector(__s0_430, __s0_430, 3, 2, 1, 0); \ | |
| 52637 | int32x4_t __rev1_430; __rev1_430 = __builtin_shufflevector(__s1_430, __s1_430, 3, 2, 1, 0); \ | |
| 52638 | int32x4_t __rev2_430; __rev2_430 = __builtin_shufflevector(__s2_430, __s2_430, 3, 2, 1, 0); \ | |
| 52639 | int32x4_t __ret_430; \ | |
| 52640 | __ret_430 = __rev0_430 + __rev1_430 * __noswap_splatq_laneq_s32(__rev2_430, __p3_430); \ | |
| 52641 | __ret_430 = __builtin_shufflevector(__ret_430, __ret_430, 3, 2, 1, 0); \ | |
| 52642 | __ret_430; \ | |
| 54336 | #define vmlaq_laneq_s32(__p0_522, __p1_522, __p2_522, __p3_522) __extension__ ({ \ | |
| 54337 | int32x4_t __s0_522 = __p0_522; \ | |
| 54338 | int32x4_t __s1_522 = __p1_522; \ | |
| 54339 | int32x4_t __s2_522 = __p2_522; \ | |
| 54340 | int32x4_t __rev0_522; __rev0_522 = __builtin_shufflevector(__s0_522, __s0_522, 3, 2, 1, 0); \ | |
| 54341 | int32x4_t __rev1_522; __rev1_522 = __builtin_shufflevector(__s1_522, __s1_522, 3, 2, 1, 0); \ | |
| 54342 | int32x4_t __rev2_522; __rev2_522 = __builtin_shufflevector(__s2_522, __s2_522, 3, 2, 1, 0); \ | |
| 54343 | int32x4_t __ret_522; \ | |
| 54344 | __ret_522 = __rev0_522 + __rev1_522 * __noswap_splatq_laneq_s32(__rev2_522, __p3_522); \ | |
| 54345 | __ret_522 = __builtin_shufflevector(__ret_522, __ret_522, 3, 2, 1, 0); \ | |
| 54346 | __ret_522; \ | |
| 52643 | 54347 | }) |
| 52644 | 54348 | #endif |
| 52645 | 54349 | |
| 52646 | 54350 | #ifdef __LITTLE_ENDIAN__ |
| 52647 | #define vmlaq_laneq_s16(__p0_431, __p1_431, __p2_431, __p3_431) __extension__ ({ \ | |
| 52648 | int16x8_t __s0_431 = __p0_431; \ | |
| 52649 | int16x8_t __s1_431 = __p1_431; \ | |
| 52650 | int16x8_t __s2_431 = __p2_431; \ | |
| 52651 | int16x8_t __ret_431; \ | |
| 52652 | __ret_431 = __s0_431 + __s1_431 * splatq_laneq_s16(__s2_431, __p3_431); \ | |
| 52653 | __ret_431; \ | |
| 54351 | #define vmlaq_laneq_s16(__p0_523, __p1_523, __p2_523, __p3_523) __extension__ ({ \ | |
| 54352 | int16x8_t __s0_523 = __p0_523; \ | |
| 54353 | int16x8_t __s1_523 = __p1_523; \ | |
| 54354 | int16x8_t __s2_523 = __p2_523; \ | |
| 54355 | int16x8_t __ret_523; \ | |
| 54356 | __ret_523 = __s0_523 + __s1_523 * splatq_laneq_s16(__s2_523, __p3_523); \ | |
| 54357 | __ret_523; \ | |
| 52654 | 54358 | }) |
| 52655 | 54359 | #else |
| 52656 | #define vmlaq_laneq_s16(__p0_432, __p1_432, __p2_432, __p3_432) __extension__ ({ \ | |
| 52657 | int16x8_t __s0_432 = __p0_432; \ | |
| 52658 | int16x8_t __s1_432 = __p1_432; \ | |
| 52659 | int16x8_t __s2_432 = __p2_432; \ | |
| 52660 | int16x8_t __rev0_432; __rev0_432 = __builtin_shufflevector(__s0_432, __s0_432, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52661 | int16x8_t __rev1_432; __rev1_432 = __builtin_shufflevector(__s1_432, __s1_432, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52662 | int16x8_t __rev2_432; __rev2_432 = __builtin_shufflevector(__s2_432, __s2_432, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52663 | int16x8_t __ret_432; \ | |
| 52664 | __ret_432 = __rev0_432 + __rev1_432 * __noswap_splatq_laneq_s16(__rev2_432, __p3_432); \ | |
| 52665 | __ret_432 = __builtin_shufflevector(__ret_432, __ret_432, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52666 | __ret_432; \ | |
| 54360 | #define vmlaq_laneq_s16(__p0_524, __p1_524, __p2_524, __p3_524) __extension__ ({ \ | |
| 54361 | int16x8_t __s0_524 = __p0_524; \ | |
| 54362 | int16x8_t __s1_524 = __p1_524; \ | |
| 54363 | int16x8_t __s2_524 = __p2_524; \ | |
| 54364 | int16x8_t __rev0_524; __rev0_524 = __builtin_shufflevector(__s0_524, __s0_524, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54365 | int16x8_t __rev1_524; __rev1_524 = __builtin_shufflevector(__s1_524, __s1_524, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54366 | int16x8_t __rev2_524; __rev2_524 = __builtin_shufflevector(__s2_524, __s2_524, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54367 | int16x8_t __ret_524; \ | |
| 54368 | __ret_524 = __rev0_524 + __rev1_524 * __noswap_splatq_laneq_s16(__rev2_524, __p3_524); \ | |
| 54369 | __ret_524 = __builtin_shufflevector(__ret_524, __ret_524, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54370 | __ret_524; \ | |
| 52667 | 54371 | }) |
| 52668 | 54372 | #endif |
| 52669 | 54373 | |
| 52670 | 54374 | #ifdef __LITTLE_ENDIAN__ |
| 52671 | #define vmla_laneq_u32(__p0_433, __p1_433, __p2_433, __p3_433) __extension__ ({ \ | |
| 52672 | uint32x2_t __s0_433 = __p0_433; \ | |
| 52673 | uint32x2_t __s1_433 = __p1_433; \ | |
| 52674 | uint32x4_t __s2_433 = __p2_433; \ | |
| 52675 | uint32x2_t __ret_433; \ | |
| 52676 | __ret_433 = __s0_433 + __s1_433 * splat_laneq_u32(__s2_433, __p3_433); \ | |
| 52677 | __ret_433; \ | |
| 54375 | #define vmla_laneq_u32(__p0_525, __p1_525, __p2_525, __p3_525) __extension__ ({ \ | |
| 54376 | uint32x2_t __s0_525 = __p0_525; \ | |
| 54377 | uint32x2_t __s1_525 = __p1_525; \ | |
| 54378 | uint32x4_t __s2_525 = __p2_525; \ | |
| 54379 | uint32x2_t __ret_525; \ | |
| 54380 | __ret_525 = __s0_525 + __s1_525 * splat_laneq_u32(__s2_525, __p3_525); \ | |
| 54381 | __ret_525; \ | |
| 52678 | 54382 | }) |
| 52679 | 54383 | #else |
| 52680 | #define vmla_laneq_u32(__p0_434, __p1_434, __p2_434, __p3_434) __extension__ ({ \ | |
| 52681 | uint32x2_t __s0_434 = __p0_434; \ | |
| 52682 | uint32x2_t __s1_434 = __p1_434; \ | |
| 52683 | uint32x4_t __s2_434 = __p2_434; \ | |
| 52684 | uint32x2_t __rev0_434; __rev0_434 = __builtin_shufflevector(__s0_434, __s0_434, 1, 0); \ | |
| 52685 | uint32x2_t __rev1_434; __rev1_434 = __builtin_shufflevector(__s1_434, __s1_434, 1, 0); \ | |
| 52686 | uint32x4_t __rev2_434; __rev2_434 = __builtin_shufflevector(__s2_434, __s2_434, 3, 2, 1, 0); \ | |
| 52687 | uint32x2_t __ret_434; \ | |
| 52688 | __ret_434 = __rev0_434 + __rev1_434 * __noswap_splat_laneq_u32(__rev2_434, __p3_434); \ | |
| 52689 | __ret_434 = __builtin_shufflevector(__ret_434, __ret_434, 1, 0); \ | |
| 52690 | __ret_434; \ | |
| 54384 | #define vmla_laneq_u32(__p0_526, __p1_526, __p2_526, __p3_526) __extension__ ({ \ | |
| 54385 | uint32x2_t __s0_526 = __p0_526; \ | |
| 54386 | uint32x2_t __s1_526 = __p1_526; \ | |
| 54387 | uint32x4_t __s2_526 = __p2_526; \ | |
| 54388 | uint32x2_t __rev0_526; __rev0_526 = __builtin_shufflevector(__s0_526, __s0_526, 1, 0); \ | |
| 54389 | uint32x2_t __rev1_526; __rev1_526 = __builtin_shufflevector(__s1_526, __s1_526, 1, 0); \ | |
| 54390 | uint32x4_t __rev2_526; __rev2_526 = __builtin_shufflevector(__s2_526, __s2_526, 3, 2, 1, 0); \ | |
| 54391 | uint32x2_t __ret_526; \ | |
| 54392 | __ret_526 = __rev0_526 + __rev1_526 * __noswap_splat_laneq_u32(__rev2_526, __p3_526); \ | |
| 54393 | __ret_526 = __builtin_shufflevector(__ret_526, __ret_526, 1, 0); \ | |
| 54394 | __ret_526; \ | |
| 52691 | 54395 | }) |
| 52692 | 54396 | #endif |
| 52693 | 54397 | |
| 52694 | 54398 | #ifdef __LITTLE_ENDIAN__ |
| 52695 | #define vmla_laneq_u16(__p0_435, __p1_435, __p2_435, __p3_435) __extension__ ({ \ | |
| 52696 | uint16x4_t __s0_435 = __p0_435; \ | |
| 52697 | uint16x4_t __s1_435 = __p1_435; \ | |
| 52698 | uint16x8_t __s2_435 = __p2_435; \ | |
| 52699 | uint16x4_t __ret_435; \ | |
| 52700 | __ret_435 = __s0_435 + __s1_435 * splat_laneq_u16(__s2_435, __p3_435); \ | |
| 52701 | __ret_435; \ | |
| 54399 | #define vmla_laneq_u16(__p0_527, __p1_527, __p2_527, __p3_527) __extension__ ({ \ | |
| 54400 | uint16x4_t __s0_527 = __p0_527; \ | |
| 54401 | uint16x4_t __s1_527 = __p1_527; \ | |
| 54402 | uint16x8_t __s2_527 = __p2_527; \ | |
| 54403 | uint16x4_t __ret_527; \ | |
| 54404 | __ret_527 = __s0_527 + __s1_527 * splat_laneq_u16(__s2_527, __p3_527); \ | |
| 54405 | __ret_527; \ | |
| 52702 | 54406 | }) |
| 52703 | 54407 | #else |
| 52704 | #define vmla_laneq_u16(__p0_436, __p1_436, __p2_436, __p3_436) __extension__ ({ \ | |
| 52705 | uint16x4_t __s0_436 = __p0_436; \ | |
| 52706 | uint16x4_t __s1_436 = __p1_436; \ | |
| 52707 | uint16x8_t __s2_436 = __p2_436; \ | |
| 52708 | uint16x4_t __rev0_436; __rev0_436 = __builtin_shufflevector(__s0_436, __s0_436, 3, 2, 1, 0); \ | |
| 52709 | uint16x4_t __rev1_436; __rev1_436 = __builtin_shufflevector(__s1_436, __s1_436, 3, 2, 1, 0); \ | |
| 52710 | uint16x8_t __rev2_436; __rev2_436 = __builtin_shufflevector(__s2_436, __s2_436, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52711 | uint16x4_t __ret_436; \ | |
| 52712 | __ret_436 = __rev0_436 + __rev1_436 * __noswap_splat_laneq_u16(__rev2_436, __p3_436); \ | |
| 52713 | __ret_436 = __builtin_shufflevector(__ret_436, __ret_436, 3, 2, 1, 0); \ | |
| 52714 | __ret_436; \ | |
| 54408 | #define vmla_laneq_u16(__p0_528, __p1_528, __p2_528, __p3_528) __extension__ ({ \ | |
| 54409 | uint16x4_t __s0_528 = __p0_528; \ | |
| 54410 | uint16x4_t __s1_528 = __p1_528; \ | |
| 54411 | uint16x8_t __s2_528 = __p2_528; \ | |
| 54412 | uint16x4_t __rev0_528; __rev0_528 = __builtin_shufflevector(__s0_528, __s0_528, 3, 2, 1, 0); \ | |
| 54413 | uint16x4_t __rev1_528; __rev1_528 = __builtin_shufflevector(__s1_528, __s1_528, 3, 2, 1, 0); \ | |
| 54414 | uint16x8_t __rev2_528; __rev2_528 = __builtin_shufflevector(__s2_528, __s2_528, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54415 | uint16x4_t __ret_528; \ | |
| 54416 | __ret_528 = __rev0_528 + __rev1_528 * __noswap_splat_laneq_u16(__rev2_528, __p3_528); \ | |
| 54417 | __ret_528 = __builtin_shufflevector(__ret_528, __ret_528, 3, 2, 1, 0); \ | |
| 54418 | __ret_528; \ | |
| 52715 | 54419 | }) |
| 52716 | 54420 | #endif |
| 52717 | 54421 | |
| 52718 | 54422 | #ifdef __LITTLE_ENDIAN__ |
| 52719 | #define vmla_laneq_f32(__p0_437, __p1_437, __p2_437, __p3_437) __extension__ ({ \ | |
| 52720 | float32x2_t __s0_437 = __p0_437; \ | |
| 52721 | float32x2_t __s1_437 = __p1_437; \ | |
| 52722 | float32x4_t __s2_437 = __p2_437; \ | |
| 52723 | float32x2_t __ret_437; \ | |
| 52724 | __ret_437 = __s0_437 + __s1_437 * splat_laneq_f32(__s2_437, __p3_437); \ | |
| 52725 | __ret_437; \ | |
| 54423 | #define vmla_laneq_f32(__p0_529, __p1_529, __p2_529, __p3_529) __extension__ ({ \ | |
| 54424 | float32x2_t __s0_529 = __p0_529; \ | |
| 54425 | float32x2_t __s1_529 = __p1_529; \ | |
| 54426 | float32x4_t __s2_529 = __p2_529; \ | |
| 54427 | float32x2_t __ret_529; \ | |
| 54428 | __ret_529 = __s0_529 + __s1_529 * splat_laneq_f32(__s2_529, __p3_529); \ | |
| 54429 | __ret_529; \ | |
| 52726 | 54430 | }) |
| 52727 | 54431 | #else |
| 52728 | #define vmla_laneq_f32(__p0_438, __p1_438, __p2_438, __p3_438) __extension__ ({ \ | |
| 52729 | float32x2_t __s0_438 = __p0_438; \ | |
| 52730 | float32x2_t __s1_438 = __p1_438; \ | |
| 52731 | float32x4_t __s2_438 = __p2_438; \ | |
| 52732 | float32x2_t __rev0_438; __rev0_438 = __builtin_shufflevector(__s0_438, __s0_438, 1, 0); \ | |
| 52733 | float32x2_t __rev1_438; __rev1_438 = __builtin_shufflevector(__s1_438, __s1_438, 1, 0); \ | |
| 52734 | float32x4_t __rev2_438; __rev2_438 = __builtin_shufflevector(__s2_438, __s2_438, 3, 2, 1, 0); \ | |
| 52735 | float32x2_t __ret_438; \ | |
| 52736 | __ret_438 = __rev0_438 + __rev1_438 * __noswap_splat_laneq_f32(__rev2_438, __p3_438); \ | |
| 52737 | __ret_438 = __builtin_shufflevector(__ret_438, __ret_438, 1, 0); \ | |
| 52738 | __ret_438; \ | |
| 54432 | #define vmla_laneq_f32(__p0_530, __p1_530, __p2_530, __p3_530) __extension__ ({ \ | |
| 54433 | float32x2_t __s0_530 = __p0_530; \ | |
| 54434 | float32x2_t __s1_530 = __p1_530; \ | |
| 54435 | float32x4_t __s2_530 = __p2_530; \ | |
| 54436 | float32x2_t __rev0_530; __rev0_530 = __builtin_shufflevector(__s0_530, __s0_530, 1, 0); \ | |
| 54437 | float32x2_t __rev1_530; __rev1_530 = __builtin_shufflevector(__s1_530, __s1_530, 1, 0); \ | |
| 54438 | float32x4_t __rev2_530; __rev2_530 = __builtin_shufflevector(__s2_530, __s2_530, 3, 2, 1, 0); \ | |
| 54439 | float32x2_t __ret_530; \ | |
| 54440 | __ret_530 = __rev0_530 + __rev1_530 * __noswap_splat_laneq_f32(__rev2_530, __p3_530); \ | |
| 54441 | __ret_530 = __builtin_shufflevector(__ret_530, __ret_530, 1, 0); \ | |
| 54442 | __ret_530; \ | |
| 52739 | 54443 | }) |
| 52740 | 54444 | #endif |
| 52741 | 54445 | |
| 52742 | 54446 | #ifdef __LITTLE_ENDIAN__ |
| 52743 | #define vmla_laneq_s32(__p0_439, __p1_439, __p2_439, __p3_439) __extension__ ({ \ | |
| 52744 | int32x2_t __s0_439 = __p0_439; \ | |
| 52745 | int32x2_t __s1_439 = __p1_439; \ | |
| 52746 | int32x4_t __s2_439 = __p2_439; \ | |
| 52747 | int32x2_t __ret_439; \ | |
| 52748 | __ret_439 = __s0_439 + __s1_439 * splat_laneq_s32(__s2_439, __p3_439); \ | |
| 52749 | __ret_439; \ | |
| 54447 | #define vmla_laneq_s32(__p0_531, __p1_531, __p2_531, __p3_531) __extension__ ({ \ | |
| 54448 | int32x2_t __s0_531 = __p0_531; \ | |
| 54449 | int32x2_t __s1_531 = __p1_531; \ | |
| 54450 | int32x4_t __s2_531 = __p2_531; \ | |
| 54451 | int32x2_t __ret_531; \ | |
| 54452 | __ret_531 = __s0_531 + __s1_531 * splat_laneq_s32(__s2_531, __p3_531); \ | |
| 54453 | __ret_531; \ | |
| 52750 | 54454 | }) |
| 52751 | 54455 | #else |
| 52752 | #define vmla_laneq_s32(__p0_440, __p1_440, __p2_440, __p3_440) __extension__ ({ \ | |
| 52753 | int32x2_t __s0_440 = __p0_440; \ | |
| 52754 | int32x2_t __s1_440 = __p1_440; \ | |
| 52755 | int32x4_t __s2_440 = __p2_440; \ | |
| 52756 | int32x2_t __rev0_440; __rev0_440 = __builtin_shufflevector(__s0_440, __s0_440, 1, 0); \ | |
| 52757 | int32x2_t __rev1_440; __rev1_440 = __builtin_shufflevector(__s1_440, __s1_440, 1, 0); \ | |
| 52758 | int32x4_t __rev2_440; __rev2_440 = __builtin_shufflevector(__s2_440, __s2_440, 3, 2, 1, 0); \ | |
| 52759 | int32x2_t __ret_440; \ | |
| 52760 | __ret_440 = __rev0_440 + __rev1_440 * __noswap_splat_laneq_s32(__rev2_440, __p3_440); \ | |
| 52761 | __ret_440 = __builtin_shufflevector(__ret_440, __ret_440, 1, 0); \ | |
| 52762 | __ret_440; \ | |
| 54456 | #define vmla_laneq_s32(__p0_532, __p1_532, __p2_532, __p3_532) __extension__ ({ \ | |
| 54457 | int32x2_t __s0_532 = __p0_532; \ | |
| 54458 | int32x2_t __s1_532 = __p1_532; \ | |
| 54459 | int32x4_t __s2_532 = __p2_532; \ | |
| 54460 | int32x2_t __rev0_532; __rev0_532 = __builtin_shufflevector(__s0_532, __s0_532, 1, 0); \ | |
| 54461 | int32x2_t __rev1_532; __rev1_532 = __builtin_shufflevector(__s1_532, __s1_532, 1, 0); \ | |
| 54462 | int32x4_t __rev2_532; __rev2_532 = __builtin_shufflevector(__s2_532, __s2_532, 3, 2, 1, 0); \ | |
| 54463 | int32x2_t __ret_532; \ | |
| 54464 | __ret_532 = __rev0_532 + __rev1_532 * __noswap_splat_laneq_s32(__rev2_532, __p3_532); \ | |
| 54465 | __ret_532 = __builtin_shufflevector(__ret_532, __ret_532, 1, 0); \ | |
| 54466 | __ret_532; \ | |
| 52763 | 54467 | }) |
| 52764 | 54468 | #endif |
| 52765 | 54469 | |
| 52766 | 54470 | #ifdef __LITTLE_ENDIAN__ |
| 52767 | #define vmla_laneq_s16(__p0_441, __p1_441, __p2_441, __p3_441) __extension__ ({ \ | |
| 52768 | int16x4_t __s0_441 = __p0_441; \ | |
| 52769 | int16x4_t __s1_441 = __p1_441; \ | |
| 52770 | int16x8_t __s2_441 = __p2_441; \ | |
| 52771 | int16x4_t __ret_441; \ | |
| 52772 | __ret_441 = __s0_441 + __s1_441 * splat_laneq_s16(__s2_441, __p3_441); \ | |
| 52773 | __ret_441; \ | |
| 54471 | #define vmla_laneq_s16(__p0_533, __p1_533, __p2_533, __p3_533) __extension__ ({ \ | |
| 54472 | int16x4_t __s0_533 = __p0_533; \ | |
| 54473 | int16x4_t __s1_533 = __p1_533; \ | |
| 54474 | int16x8_t __s2_533 = __p2_533; \ | |
| 54475 | int16x4_t __ret_533; \ | |
| 54476 | __ret_533 = __s0_533 + __s1_533 * splat_laneq_s16(__s2_533, __p3_533); \ | |
| 54477 | __ret_533; \ | |
| 52774 | 54478 | }) |
| 52775 | 54479 | #else |
| 52776 | #define vmla_laneq_s16(__p0_442, __p1_442, __p2_442, __p3_442) __extension__ ({ \ | |
| 52777 | int16x4_t __s0_442 = __p0_442; \ | |
| 52778 | int16x4_t __s1_442 = __p1_442; \ | |
| 52779 | int16x8_t __s2_442 = __p2_442; \ | |
| 52780 | int16x4_t __rev0_442; __rev0_442 = __builtin_shufflevector(__s0_442, __s0_442, 3, 2, 1, 0); \ | |
| 52781 | int16x4_t __rev1_442; __rev1_442 = __builtin_shufflevector(__s1_442, __s1_442, 3, 2, 1, 0); \ | |
| 52782 | int16x8_t __rev2_442; __rev2_442 = __builtin_shufflevector(__s2_442, __s2_442, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52783 | int16x4_t __ret_442; \ | |
| 52784 | __ret_442 = __rev0_442 + __rev1_442 * __noswap_splat_laneq_s16(__rev2_442, __p3_442); \ | |
| 52785 | __ret_442 = __builtin_shufflevector(__ret_442, __ret_442, 3, 2, 1, 0); \ | |
| 52786 | __ret_442; \ | |
| 54480 | #define vmla_laneq_s16(__p0_534, __p1_534, __p2_534, __p3_534) __extension__ ({ \ | |
| 54481 | int16x4_t __s0_534 = __p0_534; \ | |
| 54482 | int16x4_t __s1_534 = __p1_534; \ | |
| 54483 | int16x8_t __s2_534 = __p2_534; \ | |
| 54484 | int16x4_t __rev0_534; __rev0_534 = __builtin_shufflevector(__s0_534, __s0_534, 3, 2, 1, 0); \ | |
| 54485 | int16x4_t __rev1_534; __rev1_534 = __builtin_shufflevector(__s1_534, __s1_534, 3, 2, 1, 0); \ | |
| 54486 | int16x8_t __rev2_534; __rev2_534 = __builtin_shufflevector(__s2_534, __s2_534, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54487 | int16x4_t __ret_534; \ | |
| 54488 | __ret_534 = __rev0_534 + __rev1_534 * __noswap_splat_laneq_s16(__rev2_534, __p3_534); \ | |
| 54489 | __ret_534 = __builtin_shufflevector(__ret_534, __ret_534, 3, 2, 1, 0); \ | |
| 54490 | __ret_534; \ | |
| 52787 | 54491 | }) |
| 52788 | 54492 | #endif |
| 52789 | 54493 | |
| 52790 | 54494 | #ifdef __LITTLE_ENDIAN__ |
| 52791 | __ai float64x2_t vmlaq_n_f64(float64x2_t __p0, float64x2_t __p1, float64_t __p2) { | |
| 52792 | float64x2_t __ret; | |
| 52793 | __ret = __p0 + __p1 * (float64x2_t) {__p2, __p2}; | |
| 52794 | return __ret; | |
| 52795 | } | |
| 52796 | #else | |
| 52797 | __ai float64x2_t vmlaq_n_f64(float64x2_t __p0, float64x2_t __p1, float64_t __p2) { | |
| 52798 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 52799 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 52800 | float64x2_t __ret; | |
| 52801 | __ret = __rev0 + __rev1 * (float64x2_t) {__p2, __p2}; | |
| 52802 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 52803 | return __ret; | |
| 52804 | } | |
| 52805 | #endif | |
| 52806 | ||
| 52807 | #ifdef __LITTLE_ENDIAN__ | |
| 52808 | #define vmlal_high_lane_u32(__p0_443, __p1_443, __p2_443, __p3_443) __extension__ ({ \ | |
| 52809 | uint64x2_t __s0_443 = __p0_443; \ | |
| 52810 | uint32x4_t __s1_443 = __p1_443; \ | |
| 52811 | uint32x2_t __s2_443 = __p2_443; \ | |
| 52812 | uint64x2_t __ret_443; \ | |
| 52813 | __ret_443 = __s0_443 + vmull_u32(vget_high_u32(__s1_443), splat_lane_u32(__s2_443, __p3_443)); \ | |
| 52814 | __ret_443; \ | |
| 54495 | #define vmlal_high_lane_u32(__p0_535, __p1_535, __p2_535, __p3_535) __extension__ ({ \ | |
| 54496 | uint64x2_t __s0_535 = __p0_535; \ | |
| 54497 | uint32x4_t __s1_535 = __p1_535; \ | |
| 54498 | uint32x2_t __s2_535 = __p2_535; \ | |
| 54499 | uint64x2_t __ret_535; \ | |
| 54500 | __ret_535 = __s0_535 + vmull_u32(vget_high_u32(__s1_535), splat_lane_u32(__s2_535, __p3_535)); \ | |
| 54501 | __ret_535; \ | |
| 52815 | 54502 | }) |
| 52816 | 54503 | #else |
| 52817 | #define vmlal_high_lane_u32(__p0_444, __p1_444, __p2_444, __p3_444) __extension__ ({ \ | |
| 52818 | uint64x2_t __s0_444 = __p0_444; \ | |
| 52819 | uint32x4_t __s1_444 = __p1_444; \ | |
| 52820 | uint32x2_t __s2_444 = __p2_444; \ | |
| 52821 | uint64x2_t __rev0_444; __rev0_444 = __builtin_shufflevector(__s0_444, __s0_444, 1, 0); \ | |
| 52822 | uint32x4_t __rev1_444; __rev1_444 = __builtin_shufflevector(__s1_444, __s1_444, 3, 2, 1, 0); \ | |
| 52823 | uint32x2_t __rev2_444; __rev2_444 = __builtin_shufflevector(__s2_444, __s2_444, 1, 0); \ | |
| 52824 | uint64x2_t __ret_444; \ | |
| 52825 | __ret_444 = __rev0_444 + __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_444), __noswap_splat_lane_u32(__rev2_444, __p3_444)); \ | |
| 52826 | __ret_444 = __builtin_shufflevector(__ret_444, __ret_444, 1, 0); \ | |
| 52827 | __ret_444; \ | |
| 54504 | #define vmlal_high_lane_u32(__p0_536, __p1_536, __p2_536, __p3_536) __extension__ ({ \ | |
| 54505 | uint64x2_t __s0_536 = __p0_536; \ | |
| 54506 | uint32x4_t __s1_536 = __p1_536; \ | |
| 54507 | uint32x2_t __s2_536 = __p2_536; \ | |
| 54508 | uint64x2_t __rev0_536; __rev0_536 = __builtin_shufflevector(__s0_536, __s0_536, 1, 0); \ | |
| 54509 | uint32x4_t __rev1_536; __rev1_536 = __builtin_shufflevector(__s1_536, __s1_536, 3, 2, 1, 0); \ | |
| 54510 | uint32x2_t __rev2_536; __rev2_536 = __builtin_shufflevector(__s2_536, __s2_536, 1, 0); \ | |
| 54511 | uint64x2_t __ret_536; \ | |
| 54512 | __ret_536 = __rev0_536 + __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_536), __noswap_splat_lane_u32(__rev2_536, __p3_536)); \ | |
| 54513 | __ret_536 = __builtin_shufflevector(__ret_536, __ret_536, 1, 0); \ | |
| 54514 | __ret_536; \ | |
| 52828 | 54515 | }) |
| 52829 | 54516 | #endif |
| 52830 | 54517 | |
| 52831 | 54518 | #ifdef __LITTLE_ENDIAN__ |
| 52832 | #define vmlal_high_lane_u16(__p0_445, __p1_445, __p2_445, __p3_445) __extension__ ({ \ | |
| 52833 | uint32x4_t __s0_445 = __p0_445; \ | |
| 52834 | uint16x8_t __s1_445 = __p1_445; \ | |
| 52835 | uint16x4_t __s2_445 = __p2_445; \ | |
| 52836 | uint32x4_t __ret_445; \ | |
| 52837 | __ret_445 = __s0_445 + vmull_u16(vget_high_u16(__s1_445), splat_lane_u16(__s2_445, __p3_445)); \ | |
| 52838 | __ret_445; \ | |
| 54519 | #define vmlal_high_lane_u16(__p0_537, __p1_537, __p2_537, __p3_537) __extension__ ({ \ | |
| 54520 | uint32x4_t __s0_537 = __p0_537; \ | |
| 54521 | uint16x8_t __s1_537 = __p1_537; \ | |
| 54522 | uint16x4_t __s2_537 = __p2_537; \ | |
| 54523 | uint32x4_t __ret_537; \ | |
| 54524 | __ret_537 = __s0_537 + vmull_u16(vget_high_u16(__s1_537), splat_lane_u16(__s2_537, __p3_537)); \ | |
| 54525 | __ret_537; \ | |
| 52839 | 54526 | }) |
| 52840 | 54527 | #else |
| 52841 | #define vmlal_high_lane_u16(__p0_446, __p1_446, __p2_446, __p3_446) __extension__ ({ \ | |
| 52842 | uint32x4_t __s0_446 = __p0_446; \ | |
| 52843 | uint16x8_t __s1_446 = __p1_446; \ | |
| 52844 | uint16x4_t __s2_446 = __p2_446; \ | |
| 52845 | uint32x4_t __rev0_446; __rev0_446 = __builtin_shufflevector(__s0_446, __s0_446, 3, 2, 1, 0); \ | |
| 52846 | uint16x8_t __rev1_446; __rev1_446 = __builtin_shufflevector(__s1_446, __s1_446, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52847 | uint16x4_t __rev2_446; __rev2_446 = __builtin_shufflevector(__s2_446, __s2_446, 3, 2, 1, 0); \ | |
| 52848 | uint32x4_t __ret_446; \ | |
| 52849 | __ret_446 = __rev0_446 + __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_446), __noswap_splat_lane_u16(__rev2_446, __p3_446)); \ | |
| 52850 | __ret_446 = __builtin_shufflevector(__ret_446, __ret_446, 3, 2, 1, 0); \ | |
| 52851 | __ret_446; \ | |
| 54528 | #define vmlal_high_lane_u16(__p0_538, __p1_538, __p2_538, __p3_538) __extension__ ({ \ | |
| 54529 | uint32x4_t __s0_538 = __p0_538; \ | |
| 54530 | uint16x8_t __s1_538 = __p1_538; \ | |
| 54531 | uint16x4_t __s2_538 = __p2_538; \ | |
| 54532 | uint32x4_t __rev0_538; __rev0_538 = __builtin_shufflevector(__s0_538, __s0_538, 3, 2, 1, 0); \ | |
| 54533 | uint16x8_t __rev1_538; __rev1_538 = __builtin_shufflevector(__s1_538, __s1_538, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54534 | uint16x4_t __rev2_538; __rev2_538 = __builtin_shufflevector(__s2_538, __s2_538, 3, 2, 1, 0); \ | |
| 54535 | uint32x4_t __ret_538; \ | |
| 54536 | __ret_538 = __rev0_538 + __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_538), __noswap_splat_lane_u16(__rev2_538, __p3_538)); \ | |
| 54537 | __ret_538 = __builtin_shufflevector(__ret_538, __ret_538, 3, 2, 1, 0); \ | |
| 54538 | __ret_538; \ | |
| 52852 | 54539 | }) |
| 52853 | 54540 | #endif |
| 52854 | 54541 | |
| 52855 | 54542 | #ifdef __LITTLE_ENDIAN__ |
| 52856 | #define vmlal_high_lane_s32(__p0_447, __p1_447, __p2_447, __p3_447) __extension__ ({ \ | |
| 52857 | int64x2_t __s0_447 = __p0_447; \ | |
| 52858 | int32x4_t __s1_447 = __p1_447; \ | |
| 52859 | int32x2_t __s2_447 = __p2_447; \ | |
| 52860 | int64x2_t __ret_447; \ | |
| 52861 | __ret_447 = __s0_447 + vmull_s32(vget_high_s32(__s1_447), splat_lane_s32(__s2_447, __p3_447)); \ | |
| 52862 | __ret_447; \ | |
| 54543 | #define vmlal_high_lane_s32(__p0_539, __p1_539, __p2_539, __p3_539) __extension__ ({ \ | |
| 54544 | int64x2_t __s0_539 = __p0_539; \ | |
| 54545 | int32x4_t __s1_539 = __p1_539; \ | |
| 54546 | int32x2_t __s2_539 = __p2_539; \ | |
| 54547 | int64x2_t __ret_539; \ | |
| 54548 | __ret_539 = __s0_539 + vmull_s32(vget_high_s32(__s1_539), splat_lane_s32(__s2_539, __p3_539)); \ | |
| 54549 | __ret_539; \ | |
| 52863 | 54550 | }) |
| 52864 | 54551 | #else |
| 52865 | #define vmlal_high_lane_s32(__p0_448, __p1_448, __p2_448, __p3_448) __extension__ ({ \ | |
| 52866 | int64x2_t __s0_448 = __p0_448; \ | |
| 52867 | int32x4_t __s1_448 = __p1_448; \ | |
| 52868 | int32x2_t __s2_448 = __p2_448; \ | |
| 52869 | int64x2_t __rev0_448; __rev0_448 = __builtin_shufflevector(__s0_448, __s0_448, 1, 0); \ | |
| 52870 | int32x4_t __rev1_448; __rev1_448 = __builtin_shufflevector(__s1_448, __s1_448, 3, 2, 1, 0); \ | |
| 52871 | int32x2_t __rev2_448; __rev2_448 = __builtin_shufflevector(__s2_448, __s2_448, 1, 0); \ | |
| 52872 | int64x2_t __ret_448; \ | |
| 52873 | __ret_448 = __rev0_448 + __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_448), __noswap_splat_lane_s32(__rev2_448, __p3_448)); \ | |
| 52874 | __ret_448 = __builtin_shufflevector(__ret_448, __ret_448, 1, 0); \ | |
| 52875 | __ret_448; \ | |
| 54552 | #define vmlal_high_lane_s32(__p0_540, __p1_540, __p2_540, __p3_540) __extension__ ({ \ | |
| 54553 | int64x2_t __s0_540 = __p0_540; \ | |
| 54554 | int32x4_t __s1_540 = __p1_540; \ | |
| 54555 | int32x2_t __s2_540 = __p2_540; \ | |
| 54556 | int64x2_t __rev0_540; __rev0_540 = __builtin_shufflevector(__s0_540, __s0_540, 1, 0); \ | |
| 54557 | int32x4_t __rev1_540; __rev1_540 = __builtin_shufflevector(__s1_540, __s1_540, 3, 2, 1, 0); \ | |
| 54558 | int32x2_t __rev2_540; __rev2_540 = __builtin_shufflevector(__s2_540, __s2_540, 1, 0); \ | |
| 54559 | int64x2_t __ret_540; \ | |
| 54560 | __ret_540 = __rev0_540 + __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_540), __noswap_splat_lane_s32(__rev2_540, __p3_540)); \ | |
| 54561 | __ret_540 = __builtin_shufflevector(__ret_540, __ret_540, 1, 0); \ | |
| 54562 | __ret_540; \ | |
| 52876 | 54563 | }) |
| 52877 | 54564 | #endif |
| 52878 | 54565 | |
| 52879 | 54566 | #ifdef __LITTLE_ENDIAN__ |
| 52880 | #define vmlal_high_lane_s16(__p0_449, __p1_449, __p2_449, __p3_449) __extension__ ({ \ | |
| 52881 | int32x4_t __s0_449 = __p0_449; \ | |
| 52882 | int16x8_t __s1_449 = __p1_449; \ | |
| 52883 | int16x4_t __s2_449 = __p2_449; \ | |
| 52884 | int32x4_t __ret_449; \ | |
| 52885 | __ret_449 = __s0_449 + vmull_s16(vget_high_s16(__s1_449), splat_lane_s16(__s2_449, __p3_449)); \ | |
| 52886 | __ret_449; \ | |
| 54567 | #define vmlal_high_lane_s16(__p0_541, __p1_541, __p2_541, __p3_541) __extension__ ({ \ | |
| 54568 | int32x4_t __s0_541 = __p0_541; \ | |
| 54569 | int16x8_t __s1_541 = __p1_541; \ | |
| 54570 | int16x4_t __s2_541 = __p2_541; \ | |
| 54571 | int32x4_t __ret_541; \ | |
| 54572 | __ret_541 = __s0_541 + vmull_s16(vget_high_s16(__s1_541), splat_lane_s16(__s2_541, __p3_541)); \ | |
| 54573 | __ret_541; \ | |
| 52887 | 54574 | }) |
| 52888 | 54575 | #else |
| 52889 | #define vmlal_high_lane_s16(__p0_450, __p1_450, __p2_450, __p3_450) __extension__ ({ \ | |
| 52890 | int32x4_t __s0_450 = __p0_450; \ | |
| 52891 | int16x8_t __s1_450 = __p1_450; \ | |
| 52892 | int16x4_t __s2_450 = __p2_450; \ | |
| 52893 | int32x4_t __rev0_450; __rev0_450 = __builtin_shufflevector(__s0_450, __s0_450, 3, 2, 1, 0); \ | |
| 52894 | int16x8_t __rev1_450; __rev1_450 = __builtin_shufflevector(__s1_450, __s1_450, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52895 | int16x4_t __rev2_450; __rev2_450 = __builtin_shufflevector(__s2_450, __s2_450, 3, 2, 1, 0); \ | |
| 52896 | int32x4_t __ret_450; \ | |
| 52897 | __ret_450 = __rev0_450 + __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_450), __noswap_splat_lane_s16(__rev2_450, __p3_450)); \ | |
| 52898 | __ret_450 = __builtin_shufflevector(__ret_450, __ret_450, 3, 2, 1, 0); \ | |
| 52899 | __ret_450; \ | |
| 54576 | #define vmlal_high_lane_s16(__p0_542, __p1_542, __p2_542, __p3_542) __extension__ ({ \ | |
| 54577 | int32x4_t __s0_542 = __p0_542; \ | |
| 54578 | int16x8_t __s1_542 = __p1_542; \ | |
| 54579 | int16x4_t __s2_542 = __p2_542; \ | |
| 54580 | int32x4_t __rev0_542; __rev0_542 = __builtin_shufflevector(__s0_542, __s0_542, 3, 2, 1, 0); \ | |
| 54581 | int16x8_t __rev1_542; __rev1_542 = __builtin_shufflevector(__s1_542, __s1_542, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54582 | int16x4_t __rev2_542; __rev2_542 = __builtin_shufflevector(__s2_542, __s2_542, 3, 2, 1, 0); \ | |
| 54583 | int32x4_t __ret_542; \ | |
| 54584 | __ret_542 = __rev0_542 + __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_542), __noswap_splat_lane_s16(__rev2_542, __p3_542)); \ | |
| 54585 | __ret_542 = __builtin_shufflevector(__ret_542, __ret_542, 3, 2, 1, 0); \ | |
| 54586 | __ret_542; \ | |
| 52900 | 54587 | }) |
| 52901 | 54588 | #endif |
| 52902 | 54589 | |
| 52903 | 54590 | #ifdef __LITTLE_ENDIAN__ |
| 52904 | #define vmlal_high_laneq_u32(__p0_451, __p1_451, __p2_451, __p3_451) __extension__ ({ \ | |
| 52905 | uint64x2_t __s0_451 = __p0_451; \ | |
| 52906 | uint32x4_t __s1_451 = __p1_451; \ | |
| 52907 | uint32x4_t __s2_451 = __p2_451; \ | |
| 52908 | uint64x2_t __ret_451; \ | |
| 52909 | __ret_451 = __s0_451 + vmull_u32(vget_high_u32(__s1_451), splat_laneq_u32(__s2_451, __p3_451)); \ | |
| 52910 | __ret_451; \ | |
| 54591 | #define vmlal_high_laneq_u32(__p0_543, __p1_543, __p2_543, __p3_543) __extension__ ({ \ | |
| 54592 | uint64x2_t __s0_543 = __p0_543; \ | |
| 54593 | uint32x4_t __s1_543 = __p1_543; \ | |
| 54594 | uint32x4_t __s2_543 = __p2_543; \ | |
| 54595 | uint64x2_t __ret_543; \ | |
| 54596 | __ret_543 = __s0_543 + vmull_u32(vget_high_u32(__s1_543), splat_laneq_u32(__s2_543, __p3_543)); \ | |
| 54597 | __ret_543; \ | |
| 52911 | 54598 | }) |
| 52912 | 54599 | #else |
| 52913 | #define vmlal_high_laneq_u32(__p0_452, __p1_452, __p2_452, __p3_452) __extension__ ({ \ | |
| 52914 | uint64x2_t __s0_452 = __p0_452; \ | |
| 52915 | uint32x4_t __s1_452 = __p1_452; \ | |
| 52916 | uint32x4_t __s2_452 = __p2_452; \ | |
| 52917 | uint64x2_t __rev0_452; __rev0_452 = __builtin_shufflevector(__s0_452, __s0_452, 1, 0); \ | |
| 52918 | uint32x4_t __rev1_452; __rev1_452 = __builtin_shufflevector(__s1_452, __s1_452, 3, 2, 1, 0); \ | |
| 52919 | uint32x4_t __rev2_452; __rev2_452 = __builtin_shufflevector(__s2_452, __s2_452, 3, 2, 1, 0); \ | |
| 52920 | uint64x2_t __ret_452; \ | |
| 52921 | __ret_452 = __rev0_452 + __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_452), __noswap_splat_laneq_u32(__rev2_452, __p3_452)); \ | |
| 52922 | __ret_452 = __builtin_shufflevector(__ret_452, __ret_452, 1, 0); \ | |
| 52923 | __ret_452; \ | |
| 54600 | #define vmlal_high_laneq_u32(__p0_544, __p1_544, __p2_544, __p3_544) __extension__ ({ \ | |
| 54601 | uint64x2_t __s0_544 = __p0_544; \ | |
| 54602 | uint32x4_t __s1_544 = __p1_544; \ | |
| 54603 | uint32x4_t __s2_544 = __p2_544; \ | |
| 54604 | uint64x2_t __rev0_544; __rev0_544 = __builtin_shufflevector(__s0_544, __s0_544, 1, 0); \ | |
| 54605 | uint32x4_t __rev1_544; __rev1_544 = __builtin_shufflevector(__s1_544, __s1_544, 3, 2, 1, 0); \ | |
| 54606 | uint32x4_t __rev2_544; __rev2_544 = __builtin_shufflevector(__s2_544, __s2_544, 3, 2, 1, 0); \ | |
| 54607 | uint64x2_t __ret_544; \ | |
| 54608 | __ret_544 = __rev0_544 + __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_544), __noswap_splat_laneq_u32(__rev2_544, __p3_544)); \ | |
| 54609 | __ret_544 = __builtin_shufflevector(__ret_544, __ret_544, 1, 0); \ | |
| 54610 | __ret_544; \ | |
| 52924 | 54611 | }) |
| 52925 | 54612 | #endif |
| 52926 | 54613 | |
| 52927 | 54614 | #ifdef __LITTLE_ENDIAN__ |
| 52928 | #define vmlal_high_laneq_u16(__p0_453, __p1_453, __p2_453, __p3_453) __extension__ ({ \ | |
| 52929 | uint32x4_t __s0_453 = __p0_453; \ | |
| 52930 | uint16x8_t __s1_453 = __p1_453; \ | |
| 52931 | uint16x8_t __s2_453 = __p2_453; \ | |
| 52932 | uint32x4_t __ret_453; \ | |
| 52933 | __ret_453 = __s0_453 + vmull_u16(vget_high_u16(__s1_453), splat_laneq_u16(__s2_453, __p3_453)); \ | |
| 52934 | __ret_453; \ | |
| 54615 | #define vmlal_high_laneq_u16(__p0_545, __p1_545, __p2_545, __p3_545) __extension__ ({ \ | |
| 54616 | uint32x4_t __s0_545 = __p0_545; \ | |
| 54617 | uint16x8_t __s1_545 = __p1_545; \ | |
| 54618 | uint16x8_t __s2_545 = __p2_545; \ | |
| 54619 | uint32x4_t __ret_545; \ | |
| 54620 | __ret_545 = __s0_545 + vmull_u16(vget_high_u16(__s1_545), splat_laneq_u16(__s2_545, __p3_545)); \ | |
| 54621 | __ret_545; \ | |
| 52935 | 54622 | }) |
| 52936 | 54623 | #else |
| 52937 | #define vmlal_high_laneq_u16(__p0_454, __p1_454, __p2_454, __p3_454) __extension__ ({ \ | |
| 52938 | uint32x4_t __s0_454 = __p0_454; \ | |
| 52939 | uint16x8_t __s1_454 = __p1_454; \ | |
| 52940 | uint16x8_t __s2_454 = __p2_454; \ | |
| 52941 | uint32x4_t __rev0_454; __rev0_454 = __builtin_shufflevector(__s0_454, __s0_454, 3, 2, 1, 0); \ | |
| 52942 | uint16x8_t __rev1_454; __rev1_454 = __builtin_shufflevector(__s1_454, __s1_454, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52943 | uint16x8_t __rev2_454; __rev2_454 = __builtin_shufflevector(__s2_454, __s2_454, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52944 | uint32x4_t __ret_454; \ | |
| 52945 | __ret_454 = __rev0_454 + __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_454), __noswap_splat_laneq_u16(__rev2_454, __p3_454)); \ | |
| 52946 | __ret_454 = __builtin_shufflevector(__ret_454, __ret_454, 3, 2, 1, 0); \ | |
| 52947 | __ret_454; \ | |
| 54624 | #define vmlal_high_laneq_u16(__p0_546, __p1_546, __p2_546, __p3_546) __extension__ ({ \ | |
| 54625 | uint32x4_t __s0_546 = __p0_546; \ | |
| 54626 | uint16x8_t __s1_546 = __p1_546; \ | |
| 54627 | uint16x8_t __s2_546 = __p2_546; \ | |
| 54628 | uint32x4_t __rev0_546; __rev0_546 = __builtin_shufflevector(__s0_546, __s0_546, 3, 2, 1, 0); \ | |
| 54629 | uint16x8_t __rev1_546; __rev1_546 = __builtin_shufflevector(__s1_546, __s1_546, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54630 | uint16x8_t __rev2_546; __rev2_546 = __builtin_shufflevector(__s2_546, __s2_546, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54631 | uint32x4_t __ret_546; \ | |
| 54632 | __ret_546 = __rev0_546 + __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_546), __noswap_splat_laneq_u16(__rev2_546, __p3_546)); \ | |
| 54633 | __ret_546 = __builtin_shufflevector(__ret_546, __ret_546, 3, 2, 1, 0); \ | |
| 54634 | __ret_546; \ | |
| 52948 | 54635 | }) |
| 52949 | 54636 | #endif |
| 52950 | 54637 | |
| 52951 | 54638 | #ifdef __LITTLE_ENDIAN__ |
| 52952 | #define vmlal_high_laneq_s32(__p0_455, __p1_455, __p2_455, __p3_455) __extension__ ({ \ | |
| 52953 | int64x2_t __s0_455 = __p0_455; \ | |
| 52954 | int32x4_t __s1_455 = __p1_455; \ | |
| 52955 | int32x4_t __s2_455 = __p2_455; \ | |
| 52956 | int64x2_t __ret_455; \ | |
| 52957 | __ret_455 = __s0_455 + vmull_s32(vget_high_s32(__s1_455), splat_laneq_s32(__s2_455, __p3_455)); \ | |
| 52958 | __ret_455; \ | |
| 54639 | #define vmlal_high_laneq_s32(__p0_547, __p1_547, __p2_547, __p3_547) __extension__ ({ \ | |
| 54640 | int64x2_t __s0_547 = __p0_547; \ | |
| 54641 | int32x4_t __s1_547 = __p1_547; \ | |
| 54642 | int32x4_t __s2_547 = __p2_547; \ | |
| 54643 | int64x2_t __ret_547; \ | |
| 54644 | __ret_547 = __s0_547 + vmull_s32(vget_high_s32(__s1_547), splat_laneq_s32(__s2_547, __p3_547)); \ | |
| 54645 | __ret_547; \ | |
| 52959 | 54646 | }) |
| 52960 | 54647 | #else |
| 52961 | #define vmlal_high_laneq_s32(__p0_456, __p1_456, __p2_456, __p3_456) __extension__ ({ \ | |
| 52962 | int64x2_t __s0_456 = __p0_456; \ | |
| 52963 | int32x4_t __s1_456 = __p1_456; \ | |
| 52964 | int32x4_t __s2_456 = __p2_456; \ | |
| 52965 | int64x2_t __rev0_456; __rev0_456 = __builtin_shufflevector(__s0_456, __s0_456, 1, 0); \ | |
| 52966 | int32x4_t __rev1_456; __rev1_456 = __builtin_shufflevector(__s1_456, __s1_456, 3, 2, 1, 0); \ | |
| 52967 | int32x4_t __rev2_456; __rev2_456 = __builtin_shufflevector(__s2_456, __s2_456, 3, 2, 1, 0); \ | |
| 52968 | int64x2_t __ret_456; \ | |
| 52969 | __ret_456 = __rev0_456 + __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_456), __noswap_splat_laneq_s32(__rev2_456, __p3_456)); \ | |
| 52970 | __ret_456 = __builtin_shufflevector(__ret_456, __ret_456, 1, 0); \ | |
| 52971 | __ret_456; \ | |
| 54648 | #define vmlal_high_laneq_s32(__p0_548, __p1_548, __p2_548, __p3_548) __extension__ ({ \ | |
| 54649 | int64x2_t __s0_548 = __p0_548; \ | |
| 54650 | int32x4_t __s1_548 = __p1_548; \ | |
| 54651 | int32x4_t __s2_548 = __p2_548; \ | |
| 54652 | int64x2_t __rev0_548; __rev0_548 = __builtin_shufflevector(__s0_548, __s0_548, 1, 0); \ | |
| 54653 | int32x4_t __rev1_548; __rev1_548 = __builtin_shufflevector(__s1_548, __s1_548, 3, 2, 1, 0); \ | |
| 54654 | int32x4_t __rev2_548; __rev2_548 = __builtin_shufflevector(__s2_548, __s2_548, 3, 2, 1, 0); \ | |
| 54655 | int64x2_t __ret_548; \ | |
| 54656 | __ret_548 = __rev0_548 + __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_548), __noswap_splat_laneq_s32(__rev2_548, __p3_548)); \ | |
| 54657 | __ret_548 = __builtin_shufflevector(__ret_548, __ret_548, 1, 0); \ | |
| 54658 | __ret_548; \ | |
| 52972 | 54659 | }) |
| 52973 | 54660 | #endif |
| 52974 | 54661 | |
| 52975 | 54662 | #ifdef __LITTLE_ENDIAN__ |
| 52976 | #define vmlal_high_laneq_s16(__p0_457, __p1_457, __p2_457, __p3_457) __extension__ ({ \ | |
| 52977 | int32x4_t __s0_457 = __p0_457; \ | |
| 52978 | int16x8_t __s1_457 = __p1_457; \ | |
| 52979 | int16x8_t __s2_457 = __p2_457; \ | |
| 52980 | int32x4_t __ret_457; \ | |
| 52981 | __ret_457 = __s0_457 + vmull_s16(vget_high_s16(__s1_457), splat_laneq_s16(__s2_457, __p3_457)); \ | |
| 52982 | __ret_457; \ | |
| 54663 | #define vmlal_high_laneq_s16(__p0_549, __p1_549, __p2_549, __p3_549) __extension__ ({ \ | |
| 54664 | int32x4_t __s0_549 = __p0_549; \ | |
| 54665 | int16x8_t __s1_549 = __p1_549; \ | |
| 54666 | int16x8_t __s2_549 = __p2_549; \ | |
| 54667 | int32x4_t __ret_549; \ | |
| 54668 | __ret_549 = __s0_549 + vmull_s16(vget_high_s16(__s1_549), splat_laneq_s16(__s2_549, __p3_549)); \ | |
| 54669 | __ret_549; \ | |
| 52983 | 54670 | }) |
| 52984 | 54671 | #else |
| 52985 | #define vmlal_high_laneq_s16(__p0_458, __p1_458, __p2_458, __p3_458) __extension__ ({ \ | |
| 52986 | int32x4_t __s0_458 = __p0_458; \ | |
| 52987 | int16x8_t __s1_458 = __p1_458; \ | |
| 52988 | int16x8_t __s2_458 = __p2_458; \ | |
| 52989 | int32x4_t __rev0_458; __rev0_458 = __builtin_shufflevector(__s0_458, __s0_458, 3, 2, 1, 0); \ | |
| 52990 | int16x8_t __rev1_458; __rev1_458 = __builtin_shufflevector(__s1_458, __s1_458, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52991 | int16x8_t __rev2_458; __rev2_458 = __builtin_shufflevector(__s2_458, __s2_458, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 52992 | int32x4_t __ret_458; \ | |
| 52993 | __ret_458 = __rev0_458 + __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_458), __noswap_splat_laneq_s16(__rev2_458, __p3_458)); \ | |
| 52994 | __ret_458 = __builtin_shufflevector(__ret_458, __ret_458, 3, 2, 1, 0); \ | |
| 52995 | __ret_458; \ | |
| 54672 | #define vmlal_high_laneq_s16(__p0_550, __p1_550, __p2_550, __p3_550) __extension__ ({ \ | |
| 54673 | int32x4_t __s0_550 = __p0_550; \ | |
| 54674 | int16x8_t __s1_550 = __p1_550; \ | |
| 54675 | int16x8_t __s2_550 = __p2_550; \ | |
| 54676 | int32x4_t __rev0_550; __rev0_550 = __builtin_shufflevector(__s0_550, __s0_550, 3, 2, 1, 0); \ | |
| 54677 | int16x8_t __rev1_550; __rev1_550 = __builtin_shufflevector(__s1_550, __s1_550, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54678 | int16x8_t __rev2_550; __rev2_550 = __builtin_shufflevector(__s2_550, __s2_550, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54679 | int32x4_t __ret_550; \ | |
| 54680 | __ret_550 = __rev0_550 + __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_550), __noswap_splat_laneq_s16(__rev2_550, __p3_550)); \ | |
| 54681 | __ret_550 = __builtin_shufflevector(__ret_550, __ret_550, 3, 2, 1, 0); \ | |
| 54682 | __ret_550; \ | |
| 52996 | 54683 | }) |
| 52997 | 54684 | #endif |
| 52998 | 54685 | |
| 52999 | 54686 | #ifdef __LITTLE_ENDIAN__ |
| 53000 | #define vmlal_laneq_u32(__p0_459, __p1_459, __p2_459, __p3_459) __extension__ ({ \ | |
| 53001 | uint64x2_t __s0_459 = __p0_459; \ | |
| 53002 | uint32x2_t __s1_459 = __p1_459; \ | |
| 53003 | uint32x4_t __s2_459 = __p2_459; \ | |
| 53004 | uint64x2_t __ret_459; \ | |
| 53005 | __ret_459 = __s0_459 + vmull_u32(__s1_459, splat_laneq_u32(__s2_459, __p3_459)); \ | |
| 53006 | __ret_459; \ | |
| 54687 | #define vmlal_laneq_u32(__p0_551, __p1_551, __p2_551, __p3_551) __extension__ ({ \ | |
| 54688 | uint64x2_t __s0_551 = __p0_551; \ | |
| 54689 | uint32x2_t __s1_551 = __p1_551; \ | |
| 54690 | uint32x4_t __s2_551 = __p2_551; \ | |
| 54691 | uint64x2_t __ret_551; \ | |
| 54692 | __ret_551 = __s0_551 + vmull_u32(__s1_551, splat_laneq_u32(__s2_551, __p3_551)); \ | |
| 54693 | __ret_551; \ | |
| 53007 | 54694 | }) |
| 53008 | 54695 | #else |
| 53009 | #define vmlal_laneq_u32(__p0_460, __p1_460, __p2_460, __p3_460) __extension__ ({ \ | |
| 53010 | uint64x2_t __s0_460 = __p0_460; \ | |
| 53011 | uint32x2_t __s1_460 = __p1_460; \ | |
| 53012 | uint32x4_t __s2_460 = __p2_460; \ | |
| 53013 | uint64x2_t __rev0_460; __rev0_460 = __builtin_shufflevector(__s0_460, __s0_460, 1, 0); \ | |
| 53014 | uint32x2_t __rev1_460; __rev1_460 = __builtin_shufflevector(__s1_460, __s1_460, 1, 0); \ | |
| 53015 | uint32x4_t __rev2_460; __rev2_460 = __builtin_shufflevector(__s2_460, __s2_460, 3, 2, 1, 0); \ | |
| 53016 | uint64x2_t __ret_460; \ | |
| 53017 | __ret_460 = __rev0_460 + __noswap_vmull_u32(__rev1_460, __noswap_splat_laneq_u32(__rev2_460, __p3_460)); \ | |
| 53018 | __ret_460 = __builtin_shufflevector(__ret_460, __ret_460, 1, 0); \ | |
| 53019 | __ret_460; \ | |
| 54696 | #define vmlal_laneq_u32(__p0_552, __p1_552, __p2_552, __p3_552) __extension__ ({ \ | |
| 54697 | uint64x2_t __s0_552 = __p0_552; \ | |
| 54698 | uint32x2_t __s1_552 = __p1_552; \ | |
| 54699 | uint32x4_t __s2_552 = __p2_552; \ | |
| 54700 | uint64x2_t __rev0_552; __rev0_552 = __builtin_shufflevector(__s0_552, __s0_552, 1, 0); \ | |
| 54701 | uint32x2_t __rev1_552; __rev1_552 = __builtin_shufflevector(__s1_552, __s1_552, 1, 0); \ | |
| 54702 | uint32x4_t __rev2_552; __rev2_552 = __builtin_shufflevector(__s2_552, __s2_552, 3, 2, 1, 0); \ | |
| 54703 | uint64x2_t __ret_552; \ | |
| 54704 | __ret_552 = __rev0_552 + __noswap_vmull_u32(__rev1_552, __noswap_splat_laneq_u32(__rev2_552, __p3_552)); \ | |
| 54705 | __ret_552 = __builtin_shufflevector(__ret_552, __ret_552, 1, 0); \ | |
| 54706 | __ret_552; \ | |
| 53020 | 54707 | }) |
| 53021 | 54708 | #endif |
| 53022 | 54709 | |
| 53023 | 54710 | #ifdef __LITTLE_ENDIAN__ |
| 53024 | #define vmlal_laneq_u16(__p0_461, __p1_461, __p2_461, __p3_461) __extension__ ({ \ | |
| 53025 | uint32x4_t __s0_461 = __p0_461; \ | |
| 53026 | uint16x4_t __s1_461 = __p1_461; \ | |
| 53027 | uint16x8_t __s2_461 = __p2_461; \ | |
| 53028 | uint32x4_t __ret_461; \ | |
| 53029 | __ret_461 = __s0_461 + vmull_u16(__s1_461, splat_laneq_u16(__s2_461, __p3_461)); \ | |
| 53030 | __ret_461; \ | |
| 54711 | #define vmlal_laneq_u16(__p0_553, __p1_553, __p2_553, __p3_553) __extension__ ({ \ | |
| 54712 | uint32x4_t __s0_553 = __p0_553; \ | |
| 54713 | uint16x4_t __s1_553 = __p1_553; \ | |
| 54714 | uint16x8_t __s2_553 = __p2_553; \ | |
| 54715 | uint32x4_t __ret_553; \ | |
| 54716 | __ret_553 = __s0_553 + vmull_u16(__s1_553, splat_laneq_u16(__s2_553, __p3_553)); \ | |
| 54717 | __ret_553; \ | |
| 53031 | 54718 | }) |
| 53032 | 54719 | #else |
| 53033 | #define vmlal_laneq_u16(__p0_462, __p1_462, __p2_462, __p3_462) __extension__ ({ \ | |
| 53034 | uint32x4_t __s0_462 = __p0_462; \ | |
| 53035 | uint16x4_t __s1_462 = __p1_462; \ | |
| 53036 | uint16x8_t __s2_462 = __p2_462; \ | |
| 53037 | uint32x4_t __rev0_462; __rev0_462 = __builtin_shufflevector(__s0_462, __s0_462, 3, 2, 1, 0); \ | |
| 53038 | uint16x4_t __rev1_462; __rev1_462 = __builtin_shufflevector(__s1_462, __s1_462, 3, 2, 1, 0); \ | |
| 53039 | uint16x8_t __rev2_462; __rev2_462 = __builtin_shufflevector(__s2_462, __s2_462, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53040 | uint32x4_t __ret_462; \ | |
| 53041 | __ret_462 = __rev0_462 + __noswap_vmull_u16(__rev1_462, __noswap_splat_laneq_u16(__rev2_462, __p3_462)); \ | |
| 53042 | __ret_462 = __builtin_shufflevector(__ret_462, __ret_462, 3, 2, 1, 0); \ | |
| 53043 | __ret_462; \ | |
| 54720 | #define vmlal_laneq_u16(__p0_554, __p1_554, __p2_554, __p3_554) __extension__ ({ \ | |
| 54721 | uint32x4_t __s0_554 = __p0_554; \ | |
| 54722 | uint16x4_t __s1_554 = __p1_554; \ | |
| 54723 | uint16x8_t __s2_554 = __p2_554; \ | |
| 54724 | uint32x4_t __rev0_554; __rev0_554 = __builtin_shufflevector(__s0_554, __s0_554, 3, 2, 1, 0); \ | |
| 54725 | uint16x4_t __rev1_554; __rev1_554 = __builtin_shufflevector(__s1_554, __s1_554, 3, 2, 1, 0); \ | |
| 54726 | uint16x8_t __rev2_554; __rev2_554 = __builtin_shufflevector(__s2_554, __s2_554, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54727 | uint32x4_t __ret_554; \ | |
| 54728 | __ret_554 = __rev0_554 + __noswap_vmull_u16(__rev1_554, __noswap_splat_laneq_u16(__rev2_554, __p3_554)); \ | |
| 54729 | __ret_554 = __builtin_shufflevector(__ret_554, __ret_554, 3, 2, 1, 0); \ | |
| 54730 | __ret_554; \ | |
| 53044 | 54731 | }) |
| 53045 | 54732 | #endif |
| 53046 | 54733 | |
| 53047 | 54734 | #ifdef __LITTLE_ENDIAN__ |
| 53048 | #define vmlal_laneq_s32(__p0_463, __p1_463, __p2_463, __p3_463) __extension__ ({ \ | |
| 53049 | int64x2_t __s0_463 = __p0_463; \ | |
| 53050 | int32x2_t __s1_463 = __p1_463; \ | |
| 53051 | int32x4_t __s2_463 = __p2_463; \ | |
| 53052 | int64x2_t __ret_463; \ | |
| 53053 | __ret_463 = __s0_463 + vmull_s32(__s1_463, splat_laneq_s32(__s2_463, __p3_463)); \ | |
| 53054 | __ret_463; \ | |
| 54735 | #define vmlal_laneq_s32(__p0_555, __p1_555, __p2_555, __p3_555) __extension__ ({ \ | |
| 54736 | int64x2_t __s0_555 = __p0_555; \ | |
| 54737 | int32x2_t __s1_555 = __p1_555; \ | |
| 54738 | int32x4_t __s2_555 = __p2_555; \ | |
| 54739 | int64x2_t __ret_555; \ | |
| 54740 | __ret_555 = __s0_555 + vmull_s32(__s1_555, splat_laneq_s32(__s2_555, __p3_555)); \ | |
| 54741 | __ret_555; \ | |
| 53055 | 54742 | }) |
| 53056 | 54743 | #else |
| 53057 | #define vmlal_laneq_s32(__p0_464, __p1_464, __p2_464, __p3_464) __extension__ ({ \ | |
| 53058 | int64x2_t __s0_464 = __p0_464; \ | |
| 53059 | int32x2_t __s1_464 = __p1_464; \ | |
| 53060 | int32x4_t __s2_464 = __p2_464; \ | |
| 53061 | int64x2_t __rev0_464; __rev0_464 = __builtin_shufflevector(__s0_464, __s0_464, 1, 0); \ | |
| 53062 | int32x2_t __rev1_464; __rev1_464 = __builtin_shufflevector(__s1_464, __s1_464, 1, 0); \ | |
| 53063 | int32x4_t __rev2_464; __rev2_464 = __builtin_shufflevector(__s2_464, __s2_464, 3, 2, 1, 0); \ | |
| 53064 | int64x2_t __ret_464; \ | |
| 53065 | __ret_464 = __rev0_464 + __noswap_vmull_s32(__rev1_464, __noswap_splat_laneq_s32(__rev2_464, __p3_464)); \ | |
| 53066 | __ret_464 = __builtin_shufflevector(__ret_464, __ret_464, 1, 0); \ | |
| 53067 | __ret_464; \ | |
| 54744 | #define vmlal_laneq_s32(__p0_556, __p1_556, __p2_556, __p3_556) __extension__ ({ \ | |
| 54745 | int64x2_t __s0_556 = __p0_556; \ | |
| 54746 | int32x2_t __s1_556 = __p1_556; \ | |
| 54747 | int32x4_t __s2_556 = __p2_556; \ | |
| 54748 | int64x2_t __rev0_556; __rev0_556 = __builtin_shufflevector(__s0_556, __s0_556, 1, 0); \ | |
| 54749 | int32x2_t __rev1_556; __rev1_556 = __builtin_shufflevector(__s1_556, __s1_556, 1, 0); \ | |
| 54750 | int32x4_t __rev2_556; __rev2_556 = __builtin_shufflevector(__s2_556, __s2_556, 3, 2, 1, 0); \ | |
| 54751 | int64x2_t __ret_556; \ | |
| 54752 | __ret_556 = __rev0_556 + __noswap_vmull_s32(__rev1_556, __noswap_splat_laneq_s32(__rev2_556, __p3_556)); \ | |
| 54753 | __ret_556 = __builtin_shufflevector(__ret_556, __ret_556, 1, 0); \ | |
| 54754 | __ret_556; \ | |
| 53068 | 54755 | }) |
| 53069 | 54756 | #endif |
| 53070 | 54757 | |
| 53071 | 54758 | #ifdef __LITTLE_ENDIAN__ |
| 53072 | #define vmlal_laneq_s16(__p0_465, __p1_465, __p2_465, __p3_465) __extension__ ({ \ | |
| 53073 | int32x4_t __s0_465 = __p0_465; \ | |
| 53074 | int16x4_t __s1_465 = __p1_465; \ | |
| 53075 | int16x8_t __s2_465 = __p2_465; \ | |
| 53076 | int32x4_t __ret_465; \ | |
| 53077 | __ret_465 = __s0_465 + vmull_s16(__s1_465, splat_laneq_s16(__s2_465, __p3_465)); \ | |
| 53078 | __ret_465; \ | |
| 54759 | #define vmlal_laneq_s16(__p0_557, __p1_557, __p2_557, __p3_557) __extension__ ({ \ | |
| 54760 | int32x4_t __s0_557 = __p0_557; \ | |
| 54761 | int16x4_t __s1_557 = __p1_557; \ | |
| 54762 | int16x8_t __s2_557 = __p2_557; \ | |
| 54763 | int32x4_t __ret_557; \ | |
| 54764 | __ret_557 = __s0_557 + vmull_s16(__s1_557, splat_laneq_s16(__s2_557, __p3_557)); \ | |
| 54765 | __ret_557; \ | |
| 53079 | 54766 | }) |
| 53080 | 54767 | #else |
| 53081 | #define vmlal_laneq_s16(__p0_466, __p1_466, __p2_466, __p3_466) __extension__ ({ \ | |
| 53082 | int32x4_t __s0_466 = __p0_466; \ | |
| 53083 | int16x4_t __s1_466 = __p1_466; \ | |
| 53084 | int16x8_t __s2_466 = __p2_466; \ | |
| 53085 | int32x4_t __rev0_466; __rev0_466 = __builtin_shufflevector(__s0_466, __s0_466, 3, 2, 1, 0); \ | |
| 53086 | int16x4_t __rev1_466; __rev1_466 = __builtin_shufflevector(__s1_466, __s1_466, 3, 2, 1, 0); \ | |
| 53087 | int16x8_t __rev2_466; __rev2_466 = __builtin_shufflevector(__s2_466, __s2_466, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53088 | int32x4_t __ret_466; \ | |
| 53089 | __ret_466 = __rev0_466 + __noswap_vmull_s16(__rev1_466, __noswap_splat_laneq_s16(__rev2_466, __p3_466)); \ | |
| 53090 | __ret_466 = __builtin_shufflevector(__ret_466, __ret_466, 3, 2, 1, 0); \ | |
| 53091 | __ret_466; \ | |
| 54768 | #define vmlal_laneq_s16(__p0_558, __p1_558, __p2_558, __p3_558) __extension__ ({ \ | |
| 54769 | int32x4_t __s0_558 = __p0_558; \ | |
| 54770 | int16x4_t __s1_558 = __p1_558; \ | |
| 54771 | int16x8_t __s2_558 = __p2_558; \ | |
| 54772 | int32x4_t __rev0_558; __rev0_558 = __builtin_shufflevector(__s0_558, __s0_558, 3, 2, 1, 0); \ | |
| 54773 | int16x4_t __rev1_558; __rev1_558 = __builtin_shufflevector(__s1_558, __s1_558, 3, 2, 1, 0); \ | |
| 54774 | int16x8_t __rev2_558; __rev2_558 = __builtin_shufflevector(__s2_558, __s2_558, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54775 | int32x4_t __ret_558; \ | |
| 54776 | __ret_558 = __rev0_558 + __noswap_vmull_s16(__rev1_558, __noswap_splat_laneq_s16(__rev2_558, __p3_558)); \ | |
| 54777 | __ret_558 = __builtin_shufflevector(__ret_558, __ret_558, 3, 2, 1, 0); \ | |
| 54778 | __ret_558; \ | |
| 53092 | 54779 | }) |
| 53093 | 54780 | #endif |
| 53094 | 54781 | |
| ... | ... | @@ -53116,547 +54803,530 @@ __ai float64x1_t vmls_f64(float64x1_t __p0, float64x1_t __p1, float64x1_t __p2) |
| 53116 | 54803 | return __ret; |
| 53117 | 54804 | } |
| 53118 | 54805 | #ifdef __LITTLE_ENDIAN__ |
| 53119 | #define vmlsq_laneq_u32(__p0_467, __p1_467, __p2_467, __p3_467) __extension__ ({ \ | |
| 53120 | uint32x4_t __s0_467 = __p0_467; \ | |
| 53121 | uint32x4_t __s1_467 = __p1_467; \ | |
| 53122 | uint32x4_t __s2_467 = __p2_467; \ | |
| 53123 | uint32x4_t __ret_467; \ | |
| 53124 | __ret_467 = __s0_467 - __s1_467 * splatq_laneq_u32(__s2_467, __p3_467); \ | |
| 53125 | __ret_467; \ | |
| 54806 | #define vmlsq_laneq_u32(__p0_559, __p1_559, __p2_559, __p3_559) __extension__ ({ \ | |
| 54807 | uint32x4_t __s0_559 = __p0_559; \ | |
| 54808 | uint32x4_t __s1_559 = __p1_559; \ | |
| 54809 | uint32x4_t __s2_559 = __p2_559; \ | |
| 54810 | uint32x4_t __ret_559; \ | |
| 54811 | __ret_559 = __s0_559 - __s1_559 * splatq_laneq_u32(__s2_559, __p3_559); \ | |
| 54812 | __ret_559; \ | |
| 53126 | 54813 | }) |
| 53127 | 54814 | #else |
| 53128 | #define vmlsq_laneq_u32(__p0_468, __p1_468, __p2_468, __p3_468) __extension__ ({ \ | |
| 53129 | uint32x4_t __s0_468 = __p0_468; \ | |
| 53130 | uint32x4_t __s1_468 = __p1_468; \ | |
| 53131 | uint32x4_t __s2_468 = __p2_468; \ | |
| 53132 | uint32x4_t __rev0_468; __rev0_468 = __builtin_shufflevector(__s0_468, __s0_468, 3, 2, 1, 0); \ | |
| 53133 | uint32x4_t __rev1_468; __rev1_468 = __builtin_shufflevector(__s1_468, __s1_468, 3, 2, 1, 0); \ | |
| 53134 | uint32x4_t __rev2_468; __rev2_468 = __builtin_shufflevector(__s2_468, __s2_468, 3, 2, 1, 0); \ | |
| 53135 | uint32x4_t __ret_468; \ | |
| 53136 | __ret_468 = __rev0_468 - __rev1_468 * __noswap_splatq_laneq_u32(__rev2_468, __p3_468); \ | |
| 53137 | __ret_468 = __builtin_shufflevector(__ret_468, __ret_468, 3, 2, 1, 0); \ | |
| 53138 | __ret_468; \ | |
| 54815 | #define vmlsq_laneq_u32(__p0_560, __p1_560, __p2_560, __p3_560) __extension__ ({ \ | |
| 54816 | uint32x4_t __s0_560 = __p0_560; \ | |
| 54817 | uint32x4_t __s1_560 = __p1_560; \ | |
| 54818 | uint32x4_t __s2_560 = __p2_560; \ | |
| 54819 | uint32x4_t __rev0_560; __rev0_560 = __builtin_shufflevector(__s0_560, __s0_560, 3, 2, 1, 0); \ | |
| 54820 | uint32x4_t __rev1_560; __rev1_560 = __builtin_shufflevector(__s1_560, __s1_560, 3, 2, 1, 0); \ | |
| 54821 | uint32x4_t __rev2_560; __rev2_560 = __builtin_shufflevector(__s2_560, __s2_560, 3, 2, 1, 0); \ | |
| 54822 | uint32x4_t __ret_560; \ | |
| 54823 | __ret_560 = __rev0_560 - __rev1_560 * __noswap_splatq_laneq_u32(__rev2_560, __p3_560); \ | |
| 54824 | __ret_560 = __builtin_shufflevector(__ret_560, __ret_560, 3, 2, 1, 0); \ | |
| 54825 | __ret_560; \ | |
| 53139 | 54826 | }) |
| 53140 | 54827 | #endif |
| 53141 | 54828 | |
| 53142 | 54829 | #ifdef __LITTLE_ENDIAN__ |
| 53143 | #define vmlsq_laneq_u16(__p0_469, __p1_469, __p2_469, __p3_469) __extension__ ({ \ | |
| 53144 | uint16x8_t __s0_469 = __p0_469; \ | |
| 53145 | uint16x8_t __s1_469 = __p1_469; \ | |
| 53146 | uint16x8_t __s2_469 = __p2_469; \ | |
| 53147 | uint16x8_t __ret_469; \ | |
| 53148 | __ret_469 = __s0_469 - __s1_469 * splatq_laneq_u16(__s2_469, __p3_469); \ | |
| 53149 | __ret_469; \ | |
| 54830 | #define vmlsq_laneq_u16(__p0_561, __p1_561, __p2_561, __p3_561) __extension__ ({ \ | |
| 54831 | uint16x8_t __s0_561 = __p0_561; \ | |
| 54832 | uint16x8_t __s1_561 = __p1_561; \ | |
| 54833 | uint16x8_t __s2_561 = __p2_561; \ | |
| 54834 | uint16x8_t __ret_561; \ | |
| 54835 | __ret_561 = __s0_561 - __s1_561 * splatq_laneq_u16(__s2_561, __p3_561); \ | |
| 54836 | __ret_561; \ | |
| 53150 | 54837 | }) |
| 53151 | 54838 | #else |
| 53152 | #define vmlsq_laneq_u16(__p0_470, __p1_470, __p2_470, __p3_470) __extension__ ({ \ | |
| 53153 | uint16x8_t __s0_470 = __p0_470; \ | |
| 53154 | uint16x8_t __s1_470 = __p1_470; \ | |
| 53155 | uint16x8_t __s2_470 = __p2_470; \ | |
| 53156 | uint16x8_t __rev0_470; __rev0_470 = __builtin_shufflevector(__s0_470, __s0_470, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53157 | uint16x8_t __rev1_470; __rev1_470 = __builtin_shufflevector(__s1_470, __s1_470, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53158 | uint16x8_t __rev2_470; __rev2_470 = __builtin_shufflevector(__s2_470, __s2_470, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53159 | uint16x8_t __ret_470; \ | |
| 53160 | __ret_470 = __rev0_470 - __rev1_470 * __noswap_splatq_laneq_u16(__rev2_470, __p3_470); \ | |
| 53161 | __ret_470 = __builtin_shufflevector(__ret_470, __ret_470, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53162 | __ret_470; \ | |
| 54839 | #define vmlsq_laneq_u16(__p0_562, __p1_562, __p2_562, __p3_562) __extension__ ({ \ | |
| 54840 | uint16x8_t __s0_562 = __p0_562; \ | |
| 54841 | uint16x8_t __s1_562 = __p1_562; \ | |
| 54842 | uint16x8_t __s2_562 = __p2_562; \ | |
| 54843 | uint16x8_t __rev0_562; __rev0_562 = __builtin_shufflevector(__s0_562, __s0_562, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54844 | uint16x8_t __rev1_562; __rev1_562 = __builtin_shufflevector(__s1_562, __s1_562, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54845 | uint16x8_t __rev2_562; __rev2_562 = __builtin_shufflevector(__s2_562, __s2_562, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54846 | uint16x8_t __ret_562; \ | |
| 54847 | __ret_562 = __rev0_562 - __rev1_562 * __noswap_splatq_laneq_u16(__rev2_562, __p3_562); \ | |
| 54848 | __ret_562 = __builtin_shufflevector(__ret_562, __ret_562, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54849 | __ret_562; \ | |
| 53163 | 54850 | }) |
| 53164 | 54851 | #endif |
| 53165 | 54852 | |
| 53166 | 54853 | #ifdef __LITTLE_ENDIAN__ |
| 53167 | #define vmlsq_laneq_f32(__p0_471, __p1_471, __p2_471, __p3_471) __extension__ ({ \ | |
| 53168 | float32x4_t __s0_471 = __p0_471; \ | |
| 53169 | float32x4_t __s1_471 = __p1_471; \ | |
| 53170 | float32x4_t __s2_471 = __p2_471; \ | |
| 53171 | float32x4_t __ret_471; \ | |
| 53172 | __ret_471 = __s0_471 - __s1_471 * splatq_laneq_f32(__s2_471, __p3_471); \ | |
| 53173 | __ret_471; \ | |
| 54854 | #define vmlsq_laneq_f32(__p0_563, __p1_563, __p2_563, __p3_563) __extension__ ({ \ | |
| 54855 | float32x4_t __s0_563 = __p0_563; \ | |
| 54856 | float32x4_t __s1_563 = __p1_563; \ | |
| 54857 | float32x4_t __s2_563 = __p2_563; \ | |
| 54858 | float32x4_t __ret_563; \ | |
| 54859 | __ret_563 = __s0_563 - __s1_563 * splatq_laneq_f32(__s2_563, __p3_563); \ | |
| 54860 | __ret_563; \ | |
| 53174 | 54861 | }) |
| 53175 | 54862 | #else |
| 53176 | #define vmlsq_laneq_f32(__p0_472, __p1_472, __p2_472, __p3_472) __extension__ ({ \ | |
| 53177 | float32x4_t __s0_472 = __p0_472; \ | |
| 53178 | float32x4_t __s1_472 = __p1_472; \ | |
| 53179 | float32x4_t __s2_472 = __p2_472; \ | |
| 53180 | float32x4_t __rev0_472; __rev0_472 = __builtin_shufflevector(__s0_472, __s0_472, 3, 2, 1, 0); \ | |
| 53181 | float32x4_t __rev1_472; __rev1_472 = __builtin_shufflevector(__s1_472, __s1_472, 3, 2, 1, 0); \ | |
| 53182 | float32x4_t __rev2_472; __rev2_472 = __builtin_shufflevector(__s2_472, __s2_472, 3, 2, 1, 0); \ | |
| 53183 | float32x4_t __ret_472; \ | |
| 53184 | __ret_472 = __rev0_472 - __rev1_472 * __noswap_splatq_laneq_f32(__rev2_472, __p3_472); \ | |
| 53185 | __ret_472 = __builtin_shufflevector(__ret_472, __ret_472, 3, 2, 1, 0); \ | |
| 53186 | __ret_472; \ | |
| 54863 | #define vmlsq_laneq_f32(__p0_564, __p1_564, __p2_564, __p3_564) __extension__ ({ \ | |
| 54864 | float32x4_t __s0_564 = __p0_564; \ | |
| 54865 | float32x4_t __s1_564 = __p1_564; \ | |
| 54866 | float32x4_t __s2_564 = __p2_564; \ | |
| 54867 | float32x4_t __rev0_564; __rev0_564 = __builtin_shufflevector(__s0_564, __s0_564, 3, 2, 1, 0); \ | |
| 54868 | float32x4_t __rev1_564; __rev1_564 = __builtin_shufflevector(__s1_564, __s1_564, 3, 2, 1, 0); \ | |
| 54869 | float32x4_t __rev2_564; __rev2_564 = __builtin_shufflevector(__s2_564, __s2_564, 3, 2, 1, 0); \ | |
| 54870 | float32x4_t __ret_564; \ | |
| 54871 | __ret_564 = __rev0_564 - __rev1_564 * __noswap_splatq_laneq_f32(__rev2_564, __p3_564); \ | |
| 54872 | __ret_564 = __builtin_shufflevector(__ret_564, __ret_564, 3, 2, 1, 0); \ | |
| 54873 | __ret_564; \ | |
| 53187 | 54874 | }) |
| 53188 | 54875 | #endif |
| 53189 | 54876 | |
| 53190 | 54877 | #ifdef __LITTLE_ENDIAN__ |
| 53191 | #define vmlsq_laneq_s32(__p0_473, __p1_473, __p2_473, __p3_473) __extension__ ({ \ | |
| 53192 | int32x4_t __s0_473 = __p0_473; \ | |
| 53193 | int32x4_t __s1_473 = __p1_473; \ | |
| 53194 | int32x4_t __s2_473 = __p2_473; \ | |
| 53195 | int32x4_t __ret_473; \ | |
| 53196 | __ret_473 = __s0_473 - __s1_473 * splatq_laneq_s32(__s2_473, __p3_473); \ | |
| 53197 | __ret_473; \ | |
| 54878 | #define vmlsq_laneq_s32(__p0_565, __p1_565, __p2_565, __p3_565) __extension__ ({ \ | |
| 54879 | int32x4_t __s0_565 = __p0_565; \ | |
| 54880 | int32x4_t __s1_565 = __p1_565; \ | |
| 54881 | int32x4_t __s2_565 = __p2_565; \ | |
| 54882 | int32x4_t __ret_565; \ | |
| 54883 | __ret_565 = __s0_565 - __s1_565 * splatq_laneq_s32(__s2_565, __p3_565); \ | |
| 54884 | __ret_565; \ | |
| 53198 | 54885 | }) |
| 53199 | 54886 | #else |
| 53200 | #define vmlsq_laneq_s32(__p0_474, __p1_474, __p2_474, __p3_474) __extension__ ({ \ | |
| 53201 | int32x4_t __s0_474 = __p0_474; \ | |
| 53202 | int32x4_t __s1_474 = __p1_474; \ | |
| 53203 | int32x4_t __s2_474 = __p2_474; \ | |
| 53204 | int32x4_t __rev0_474; __rev0_474 = __builtin_shufflevector(__s0_474, __s0_474, 3, 2, 1, 0); \ | |
| 53205 | int32x4_t __rev1_474; __rev1_474 = __builtin_shufflevector(__s1_474, __s1_474, 3, 2, 1, 0); \ | |
| 53206 | int32x4_t __rev2_474; __rev2_474 = __builtin_shufflevector(__s2_474, __s2_474, 3, 2, 1, 0); \ | |
| 53207 | int32x4_t __ret_474; \ | |
| 53208 | __ret_474 = __rev0_474 - __rev1_474 * __noswap_splatq_laneq_s32(__rev2_474, __p3_474); \ | |
| 53209 | __ret_474 = __builtin_shufflevector(__ret_474, __ret_474, 3, 2, 1, 0); \ | |
| 53210 | __ret_474; \ | |
| 54887 | #define vmlsq_laneq_s32(__p0_566, __p1_566, __p2_566, __p3_566) __extension__ ({ \ | |
| 54888 | int32x4_t __s0_566 = __p0_566; \ | |
| 54889 | int32x4_t __s1_566 = __p1_566; \ | |
| 54890 | int32x4_t __s2_566 = __p2_566; \ | |
| 54891 | int32x4_t __rev0_566; __rev0_566 = __builtin_shufflevector(__s0_566, __s0_566, 3, 2, 1, 0); \ | |
| 54892 | int32x4_t __rev1_566; __rev1_566 = __builtin_shufflevector(__s1_566, __s1_566, 3, 2, 1, 0); \ | |
| 54893 | int32x4_t __rev2_566; __rev2_566 = __builtin_shufflevector(__s2_566, __s2_566, 3, 2, 1, 0); \ | |
| 54894 | int32x4_t __ret_566; \ | |
| 54895 | __ret_566 = __rev0_566 - __rev1_566 * __noswap_splatq_laneq_s32(__rev2_566, __p3_566); \ | |
| 54896 | __ret_566 = __builtin_shufflevector(__ret_566, __ret_566, 3, 2, 1, 0); \ | |
| 54897 | __ret_566; \ | |
| 53211 | 54898 | }) |
| 53212 | 54899 | #endif |
| 53213 | 54900 | |
| 53214 | 54901 | #ifdef __LITTLE_ENDIAN__ |
| 53215 | #define vmlsq_laneq_s16(__p0_475, __p1_475, __p2_475, __p3_475) __extension__ ({ \ | |
| 53216 | int16x8_t __s0_475 = __p0_475; \ | |
| 53217 | int16x8_t __s1_475 = __p1_475; \ | |
| 53218 | int16x8_t __s2_475 = __p2_475; \ | |
| 53219 | int16x8_t __ret_475; \ | |
| 53220 | __ret_475 = __s0_475 - __s1_475 * splatq_laneq_s16(__s2_475, __p3_475); \ | |
| 53221 | __ret_475; \ | |
| 54902 | #define vmlsq_laneq_s16(__p0_567, __p1_567, __p2_567, __p3_567) __extension__ ({ \ | |
| 54903 | int16x8_t __s0_567 = __p0_567; \ | |
| 54904 | int16x8_t __s1_567 = __p1_567; \ | |
| 54905 | int16x8_t __s2_567 = __p2_567; \ | |
| 54906 | int16x8_t __ret_567; \ | |
| 54907 | __ret_567 = __s0_567 - __s1_567 * splatq_laneq_s16(__s2_567, __p3_567); \ | |
| 54908 | __ret_567; \ | |
| 53222 | 54909 | }) |
| 53223 | 54910 | #else |
| 53224 | #define vmlsq_laneq_s16(__p0_476, __p1_476, __p2_476, __p3_476) __extension__ ({ \ | |
| 53225 | int16x8_t __s0_476 = __p0_476; \ | |
| 53226 | int16x8_t __s1_476 = __p1_476; \ | |
| 53227 | int16x8_t __s2_476 = __p2_476; \ | |
| 53228 | int16x8_t __rev0_476; __rev0_476 = __builtin_shufflevector(__s0_476, __s0_476, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53229 | int16x8_t __rev1_476; __rev1_476 = __builtin_shufflevector(__s1_476, __s1_476, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53230 | int16x8_t __rev2_476; __rev2_476 = __builtin_shufflevector(__s2_476, __s2_476, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53231 | int16x8_t __ret_476; \ | |
| 53232 | __ret_476 = __rev0_476 - __rev1_476 * __noswap_splatq_laneq_s16(__rev2_476, __p3_476); \ | |
| 53233 | __ret_476 = __builtin_shufflevector(__ret_476, __ret_476, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53234 | __ret_476; \ | |
| 54911 | #define vmlsq_laneq_s16(__p0_568, __p1_568, __p2_568, __p3_568) __extension__ ({ \ | |
| 54912 | int16x8_t __s0_568 = __p0_568; \ | |
| 54913 | int16x8_t __s1_568 = __p1_568; \ | |
| 54914 | int16x8_t __s2_568 = __p2_568; \ | |
| 54915 | int16x8_t __rev0_568; __rev0_568 = __builtin_shufflevector(__s0_568, __s0_568, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54916 | int16x8_t __rev1_568; __rev1_568 = __builtin_shufflevector(__s1_568, __s1_568, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54917 | int16x8_t __rev2_568; __rev2_568 = __builtin_shufflevector(__s2_568, __s2_568, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54918 | int16x8_t __ret_568; \ | |
| 54919 | __ret_568 = __rev0_568 - __rev1_568 * __noswap_splatq_laneq_s16(__rev2_568, __p3_568); \ | |
| 54920 | __ret_568 = __builtin_shufflevector(__ret_568, __ret_568, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54921 | __ret_568; \ | |
| 53235 | 54922 | }) |
| 53236 | 54923 | #endif |
| 53237 | 54924 | |
| 53238 | 54925 | #ifdef __LITTLE_ENDIAN__ |
| 53239 | #define vmls_laneq_u32(__p0_477, __p1_477, __p2_477, __p3_477) __extension__ ({ \ | |
| 53240 | uint32x2_t __s0_477 = __p0_477; \ | |
| 53241 | uint32x2_t __s1_477 = __p1_477; \ | |
| 53242 | uint32x4_t __s2_477 = __p2_477; \ | |
| 53243 | uint32x2_t __ret_477; \ | |
| 53244 | __ret_477 = __s0_477 - __s1_477 * splat_laneq_u32(__s2_477, __p3_477); \ | |
| 53245 | __ret_477; \ | |
| 54926 | #define vmls_laneq_u32(__p0_569, __p1_569, __p2_569, __p3_569) __extension__ ({ \ | |
| 54927 | uint32x2_t __s0_569 = __p0_569; \ | |
| 54928 | uint32x2_t __s1_569 = __p1_569; \ | |
| 54929 | uint32x4_t __s2_569 = __p2_569; \ | |
| 54930 | uint32x2_t __ret_569; \ | |
| 54931 | __ret_569 = __s0_569 - __s1_569 * splat_laneq_u32(__s2_569, __p3_569); \ | |
| 54932 | __ret_569; \ | |
| 53246 | 54933 | }) |
| 53247 | 54934 | #else |
| 53248 | #define vmls_laneq_u32(__p0_478, __p1_478, __p2_478, __p3_478) __extension__ ({ \ | |
| 53249 | uint32x2_t __s0_478 = __p0_478; \ | |
| 53250 | uint32x2_t __s1_478 = __p1_478; \ | |
| 53251 | uint32x4_t __s2_478 = __p2_478; \ | |
| 53252 | uint32x2_t __rev0_478; __rev0_478 = __builtin_shufflevector(__s0_478, __s0_478, 1, 0); \ | |
| 53253 | uint32x2_t __rev1_478; __rev1_478 = __builtin_shufflevector(__s1_478, __s1_478, 1, 0); \ | |
| 53254 | uint32x4_t __rev2_478; __rev2_478 = __builtin_shufflevector(__s2_478, __s2_478, 3, 2, 1, 0); \ | |
| 53255 | uint32x2_t __ret_478; \ | |
| 53256 | __ret_478 = __rev0_478 - __rev1_478 * __noswap_splat_laneq_u32(__rev2_478, __p3_478); \ | |
| 53257 | __ret_478 = __builtin_shufflevector(__ret_478, __ret_478, 1, 0); \ | |
| 53258 | __ret_478; \ | |
| 54935 | #define vmls_laneq_u32(__p0_570, __p1_570, __p2_570, __p3_570) __extension__ ({ \ | |
| 54936 | uint32x2_t __s0_570 = __p0_570; \ | |
| 54937 | uint32x2_t __s1_570 = __p1_570; \ | |
| 54938 | uint32x4_t __s2_570 = __p2_570; \ | |
| 54939 | uint32x2_t __rev0_570; __rev0_570 = __builtin_shufflevector(__s0_570, __s0_570, 1, 0); \ | |
| 54940 | uint32x2_t __rev1_570; __rev1_570 = __builtin_shufflevector(__s1_570, __s1_570, 1, 0); \ | |
| 54941 | uint32x4_t __rev2_570; __rev2_570 = __builtin_shufflevector(__s2_570, __s2_570, 3, 2, 1, 0); \ | |
| 54942 | uint32x2_t __ret_570; \ | |
| 54943 | __ret_570 = __rev0_570 - __rev1_570 * __noswap_splat_laneq_u32(__rev2_570, __p3_570); \ | |
| 54944 | __ret_570 = __builtin_shufflevector(__ret_570, __ret_570, 1, 0); \ | |
| 54945 | __ret_570; \ | |
| 53259 | 54946 | }) |
| 53260 | 54947 | #endif |
| 53261 | 54948 | |
| 53262 | 54949 | #ifdef __LITTLE_ENDIAN__ |
| 53263 | #define vmls_laneq_u16(__p0_479, __p1_479, __p2_479, __p3_479) __extension__ ({ \ | |
| 53264 | uint16x4_t __s0_479 = __p0_479; \ | |
| 53265 | uint16x4_t __s1_479 = __p1_479; \ | |
| 53266 | uint16x8_t __s2_479 = __p2_479; \ | |
| 53267 | uint16x4_t __ret_479; \ | |
| 53268 | __ret_479 = __s0_479 - __s1_479 * splat_laneq_u16(__s2_479, __p3_479); \ | |
| 53269 | __ret_479; \ | |
| 54950 | #define vmls_laneq_u16(__p0_571, __p1_571, __p2_571, __p3_571) __extension__ ({ \ | |
| 54951 | uint16x4_t __s0_571 = __p0_571; \ | |
| 54952 | uint16x4_t __s1_571 = __p1_571; \ | |
| 54953 | uint16x8_t __s2_571 = __p2_571; \ | |
| 54954 | uint16x4_t __ret_571; \ | |
| 54955 | __ret_571 = __s0_571 - __s1_571 * splat_laneq_u16(__s2_571, __p3_571); \ | |
| 54956 | __ret_571; \ | |
| 53270 | 54957 | }) |
| 53271 | 54958 | #else |
| 53272 | #define vmls_laneq_u16(__p0_480, __p1_480, __p2_480, __p3_480) __extension__ ({ \ | |
| 53273 | uint16x4_t __s0_480 = __p0_480; \ | |
| 53274 | uint16x4_t __s1_480 = __p1_480; \ | |
| 53275 | uint16x8_t __s2_480 = __p2_480; \ | |
| 53276 | uint16x4_t __rev0_480; __rev0_480 = __builtin_shufflevector(__s0_480, __s0_480, 3, 2, 1, 0); \ | |
| 53277 | uint16x4_t __rev1_480; __rev1_480 = __builtin_shufflevector(__s1_480, __s1_480, 3, 2, 1, 0); \ | |
| 53278 | uint16x8_t __rev2_480; __rev2_480 = __builtin_shufflevector(__s2_480, __s2_480, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53279 | uint16x4_t __ret_480; \ | |
| 53280 | __ret_480 = __rev0_480 - __rev1_480 * __noswap_splat_laneq_u16(__rev2_480, __p3_480); \ | |
| 53281 | __ret_480 = __builtin_shufflevector(__ret_480, __ret_480, 3, 2, 1, 0); \ | |
| 53282 | __ret_480; \ | |
| 54959 | #define vmls_laneq_u16(__p0_572, __p1_572, __p2_572, __p3_572) __extension__ ({ \ | |
| 54960 | uint16x4_t __s0_572 = __p0_572; \ | |
| 54961 | uint16x4_t __s1_572 = __p1_572; \ | |
| 54962 | uint16x8_t __s2_572 = __p2_572; \ | |
| 54963 | uint16x4_t __rev0_572; __rev0_572 = __builtin_shufflevector(__s0_572, __s0_572, 3, 2, 1, 0); \ | |
| 54964 | uint16x4_t __rev1_572; __rev1_572 = __builtin_shufflevector(__s1_572, __s1_572, 3, 2, 1, 0); \ | |
| 54965 | uint16x8_t __rev2_572; __rev2_572 = __builtin_shufflevector(__s2_572, __s2_572, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54966 | uint16x4_t __ret_572; \ | |
| 54967 | __ret_572 = __rev0_572 - __rev1_572 * __noswap_splat_laneq_u16(__rev2_572, __p3_572); \ | |
| 54968 | __ret_572 = __builtin_shufflevector(__ret_572, __ret_572, 3, 2, 1, 0); \ | |
| 54969 | __ret_572; \ | |
| 53283 | 54970 | }) |
| 53284 | 54971 | #endif |
| 53285 | 54972 | |
| 53286 | 54973 | #ifdef __LITTLE_ENDIAN__ |
| 53287 | #define vmls_laneq_f32(__p0_481, __p1_481, __p2_481, __p3_481) __extension__ ({ \ | |
| 53288 | float32x2_t __s0_481 = __p0_481; \ | |
| 53289 | float32x2_t __s1_481 = __p1_481; \ | |
| 53290 | float32x4_t __s2_481 = __p2_481; \ | |
| 53291 | float32x2_t __ret_481; \ | |
| 53292 | __ret_481 = __s0_481 - __s1_481 * splat_laneq_f32(__s2_481, __p3_481); \ | |
| 53293 | __ret_481; \ | |
| 54974 | #define vmls_laneq_f32(__p0_573, __p1_573, __p2_573, __p3_573) __extension__ ({ \ | |
| 54975 | float32x2_t __s0_573 = __p0_573; \ | |
| 54976 | float32x2_t __s1_573 = __p1_573; \ | |
| 54977 | float32x4_t __s2_573 = __p2_573; \ | |
| 54978 | float32x2_t __ret_573; \ | |
| 54979 | __ret_573 = __s0_573 - __s1_573 * splat_laneq_f32(__s2_573, __p3_573); \ | |
| 54980 | __ret_573; \ | |
| 53294 | 54981 | }) |
| 53295 | 54982 | #else |
| 53296 | #define vmls_laneq_f32(__p0_482, __p1_482, __p2_482, __p3_482) __extension__ ({ \ | |
| 53297 | float32x2_t __s0_482 = __p0_482; \ | |
| 53298 | float32x2_t __s1_482 = __p1_482; \ | |
| 53299 | float32x4_t __s2_482 = __p2_482; \ | |
| 53300 | float32x2_t __rev0_482; __rev0_482 = __builtin_shufflevector(__s0_482, __s0_482, 1, 0); \ | |
| 53301 | float32x2_t __rev1_482; __rev1_482 = __builtin_shufflevector(__s1_482, __s1_482, 1, 0); \ | |
| 53302 | float32x4_t __rev2_482; __rev2_482 = __builtin_shufflevector(__s2_482, __s2_482, 3, 2, 1, 0); \ | |
| 53303 | float32x2_t __ret_482; \ | |
| 53304 | __ret_482 = __rev0_482 - __rev1_482 * __noswap_splat_laneq_f32(__rev2_482, __p3_482); \ | |
| 53305 | __ret_482 = __builtin_shufflevector(__ret_482, __ret_482, 1, 0); \ | |
| 53306 | __ret_482; \ | |
| 54983 | #define vmls_laneq_f32(__p0_574, __p1_574, __p2_574, __p3_574) __extension__ ({ \ | |
| 54984 | float32x2_t __s0_574 = __p0_574; \ | |
| 54985 | float32x2_t __s1_574 = __p1_574; \ | |
| 54986 | float32x4_t __s2_574 = __p2_574; \ | |
| 54987 | float32x2_t __rev0_574; __rev0_574 = __builtin_shufflevector(__s0_574, __s0_574, 1, 0); \ | |
| 54988 | float32x2_t __rev1_574; __rev1_574 = __builtin_shufflevector(__s1_574, __s1_574, 1, 0); \ | |
| 54989 | float32x4_t __rev2_574; __rev2_574 = __builtin_shufflevector(__s2_574, __s2_574, 3, 2, 1, 0); \ | |
| 54990 | float32x2_t __ret_574; \ | |
| 54991 | __ret_574 = __rev0_574 - __rev1_574 * __noswap_splat_laneq_f32(__rev2_574, __p3_574); \ | |
| 54992 | __ret_574 = __builtin_shufflevector(__ret_574, __ret_574, 1, 0); \ | |
| 54993 | __ret_574; \ | |
| 53307 | 54994 | }) |
| 53308 | 54995 | #endif |
| 53309 | 54996 | |
| 53310 | 54997 | #ifdef __LITTLE_ENDIAN__ |
| 53311 | #define vmls_laneq_s32(__p0_483, __p1_483, __p2_483, __p3_483) __extension__ ({ \ | |
| 53312 | int32x2_t __s0_483 = __p0_483; \ | |
| 53313 | int32x2_t __s1_483 = __p1_483; \ | |
| 53314 | int32x4_t __s2_483 = __p2_483; \ | |
| 53315 | int32x2_t __ret_483; \ | |
| 53316 | __ret_483 = __s0_483 - __s1_483 * splat_laneq_s32(__s2_483, __p3_483); \ | |
| 53317 | __ret_483; \ | |
| 54998 | #define vmls_laneq_s32(__p0_575, __p1_575, __p2_575, __p3_575) __extension__ ({ \ | |
| 54999 | int32x2_t __s0_575 = __p0_575; \ | |
| 55000 | int32x2_t __s1_575 = __p1_575; \ | |
| 55001 | int32x4_t __s2_575 = __p2_575; \ | |
| 55002 | int32x2_t __ret_575; \ | |
| 55003 | __ret_575 = __s0_575 - __s1_575 * splat_laneq_s32(__s2_575, __p3_575); \ | |
| 55004 | __ret_575; \ | |
| 53318 | 55005 | }) |
| 53319 | 55006 | #else |
| 53320 | #define vmls_laneq_s32(__p0_484, __p1_484, __p2_484, __p3_484) __extension__ ({ \ | |
| 53321 | int32x2_t __s0_484 = __p0_484; \ | |
| 53322 | int32x2_t __s1_484 = __p1_484; \ | |
| 53323 | int32x4_t __s2_484 = __p2_484; \ | |
| 53324 | int32x2_t __rev0_484; __rev0_484 = __builtin_shufflevector(__s0_484, __s0_484, 1, 0); \ | |
| 53325 | int32x2_t __rev1_484; __rev1_484 = __builtin_shufflevector(__s1_484, __s1_484, 1, 0); \ | |
| 53326 | int32x4_t __rev2_484; __rev2_484 = __builtin_shufflevector(__s2_484, __s2_484, 3, 2, 1, 0); \ | |
| 53327 | int32x2_t __ret_484; \ | |
| 53328 | __ret_484 = __rev0_484 - __rev1_484 * __noswap_splat_laneq_s32(__rev2_484, __p3_484); \ | |
| 53329 | __ret_484 = __builtin_shufflevector(__ret_484, __ret_484, 1, 0); \ | |
| 53330 | __ret_484; \ | |
| 55007 | #define vmls_laneq_s32(__p0_576, __p1_576, __p2_576, __p3_576) __extension__ ({ \ | |
| 55008 | int32x2_t __s0_576 = __p0_576; \ | |
| 55009 | int32x2_t __s1_576 = __p1_576; \ | |
| 55010 | int32x4_t __s2_576 = __p2_576; \ | |
| 55011 | int32x2_t __rev0_576; __rev0_576 = __builtin_shufflevector(__s0_576, __s0_576, 1, 0); \ | |
| 55012 | int32x2_t __rev1_576; __rev1_576 = __builtin_shufflevector(__s1_576, __s1_576, 1, 0); \ | |
| 55013 | int32x4_t __rev2_576; __rev2_576 = __builtin_shufflevector(__s2_576, __s2_576, 3, 2, 1, 0); \ | |
| 55014 | int32x2_t __ret_576; \ | |
| 55015 | __ret_576 = __rev0_576 - __rev1_576 * __noswap_splat_laneq_s32(__rev2_576, __p3_576); \ | |
| 55016 | __ret_576 = __builtin_shufflevector(__ret_576, __ret_576, 1, 0); \ | |
| 55017 | __ret_576; \ | |
| 53331 | 55018 | }) |
| 53332 | 55019 | #endif |
| 53333 | 55020 | |
| 53334 | 55021 | #ifdef __LITTLE_ENDIAN__ |
| 53335 | #define vmls_laneq_s16(__p0_485, __p1_485, __p2_485, __p3_485) __extension__ ({ \ | |
| 53336 | int16x4_t __s0_485 = __p0_485; \ | |
| 53337 | int16x4_t __s1_485 = __p1_485; \ | |
| 53338 | int16x8_t __s2_485 = __p2_485; \ | |
| 53339 | int16x4_t __ret_485; \ | |
| 53340 | __ret_485 = __s0_485 - __s1_485 * splat_laneq_s16(__s2_485, __p3_485); \ | |
| 53341 | __ret_485; \ | |
| 55022 | #define vmls_laneq_s16(__p0_577, __p1_577, __p2_577, __p3_577) __extension__ ({ \ | |
| 55023 | int16x4_t __s0_577 = __p0_577; \ | |
| 55024 | int16x4_t __s1_577 = __p1_577; \ | |
| 55025 | int16x8_t __s2_577 = __p2_577; \ | |
| 55026 | int16x4_t __ret_577; \ | |
| 55027 | __ret_577 = __s0_577 - __s1_577 * splat_laneq_s16(__s2_577, __p3_577); \ | |
| 55028 | __ret_577; \ | |
| 53342 | 55029 | }) |
| 53343 | 55030 | #else |
| 53344 | #define vmls_laneq_s16(__p0_486, __p1_486, __p2_486, __p3_486) __extension__ ({ \ | |
| 53345 | int16x4_t __s0_486 = __p0_486; \ | |
| 53346 | int16x4_t __s1_486 = __p1_486; \ | |
| 53347 | int16x8_t __s2_486 = __p2_486; \ | |
| 53348 | int16x4_t __rev0_486; __rev0_486 = __builtin_shufflevector(__s0_486, __s0_486, 3, 2, 1, 0); \ | |
| 53349 | int16x4_t __rev1_486; __rev1_486 = __builtin_shufflevector(__s1_486, __s1_486, 3, 2, 1, 0); \ | |
| 53350 | int16x8_t __rev2_486; __rev2_486 = __builtin_shufflevector(__s2_486, __s2_486, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53351 | int16x4_t __ret_486; \ | |
| 53352 | __ret_486 = __rev0_486 - __rev1_486 * __noswap_splat_laneq_s16(__rev2_486, __p3_486); \ | |
| 53353 | __ret_486 = __builtin_shufflevector(__ret_486, __ret_486, 3, 2, 1, 0); \ | |
| 53354 | __ret_486; \ | |
| 55031 | #define vmls_laneq_s16(__p0_578, __p1_578, __p2_578, __p3_578) __extension__ ({ \ | |
| 55032 | int16x4_t __s0_578 = __p0_578; \ | |
| 55033 | int16x4_t __s1_578 = __p1_578; \ | |
| 55034 | int16x8_t __s2_578 = __p2_578; \ | |
| 55035 | int16x4_t __rev0_578; __rev0_578 = __builtin_shufflevector(__s0_578, __s0_578, 3, 2, 1, 0); \ | |
| 55036 | int16x4_t __rev1_578; __rev1_578 = __builtin_shufflevector(__s1_578, __s1_578, 3, 2, 1, 0); \ | |
| 55037 | int16x8_t __rev2_578; __rev2_578 = __builtin_shufflevector(__s2_578, __s2_578, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55038 | int16x4_t __ret_578; \ | |
| 55039 | __ret_578 = __rev0_578 - __rev1_578 * __noswap_splat_laneq_s16(__rev2_578, __p3_578); \ | |
| 55040 | __ret_578 = __builtin_shufflevector(__ret_578, __ret_578, 3, 2, 1, 0); \ | |
| 55041 | __ret_578; \ | |
| 53355 | 55042 | }) |
| 53356 | 55043 | #endif |
| 53357 | 55044 | |
| 53358 | 55045 | #ifdef __LITTLE_ENDIAN__ |
| 53359 | __ai float64x2_t vmlsq_n_f64(float64x2_t __p0, float64x2_t __p1, float64_t __p2) { | |
| 53360 | float64x2_t __ret; | |
| 53361 | __ret = __p0 - __p1 * (float64x2_t) {__p2, __p2}; | |
| 53362 | return __ret; | |
| 53363 | } | |
| 53364 | #else | |
| 53365 | __ai float64x2_t vmlsq_n_f64(float64x2_t __p0, float64x2_t __p1, float64_t __p2) { | |
| 53366 | float64x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 53367 | float64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); | |
| 53368 | float64x2_t __ret; | |
| 53369 | __ret = __rev0 - __rev1 * (float64x2_t) {__p2, __p2}; | |
| 53370 | __ret = __builtin_shufflevector(__ret, __ret, 1, 0); | |
| 53371 | return __ret; | |
| 53372 | } | |
| 53373 | #endif | |
| 53374 | ||
| 53375 | #ifdef __LITTLE_ENDIAN__ | |
| 53376 | #define vmlsl_high_lane_u32(__p0_487, __p1_487, __p2_487, __p3_487) __extension__ ({ \ | |
| 53377 | uint64x2_t __s0_487 = __p0_487; \ | |
| 53378 | uint32x4_t __s1_487 = __p1_487; \ | |
| 53379 | uint32x2_t __s2_487 = __p2_487; \ | |
| 53380 | uint64x2_t __ret_487; \ | |
| 53381 | __ret_487 = __s0_487 - vmull_u32(vget_high_u32(__s1_487), splat_lane_u32(__s2_487, __p3_487)); \ | |
| 53382 | __ret_487; \ | |
| 55046 | #define vmlsl_high_lane_u32(__p0_579, __p1_579, __p2_579, __p3_579) __extension__ ({ \ | |
| 55047 | uint64x2_t __s0_579 = __p0_579; \ | |
| 55048 | uint32x4_t __s1_579 = __p1_579; \ | |
| 55049 | uint32x2_t __s2_579 = __p2_579; \ | |
| 55050 | uint64x2_t __ret_579; \ | |
| 55051 | __ret_579 = __s0_579 - vmull_u32(vget_high_u32(__s1_579), splat_lane_u32(__s2_579, __p3_579)); \ | |
| 55052 | __ret_579; \ | |
| 53383 | 55053 | }) |
| 53384 | 55054 | #else |
| 53385 | #define vmlsl_high_lane_u32(__p0_488, __p1_488, __p2_488, __p3_488) __extension__ ({ \ | |
| 53386 | uint64x2_t __s0_488 = __p0_488; \ | |
| 53387 | uint32x4_t __s1_488 = __p1_488; \ | |
| 53388 | uint32x2_t __s2_488 = __p2_488; \ | |
| 53389 | uint64x2_t __rev0_488; __rev0_488 = __builtin_shufflevector(__s0_488, __s0_488, 1, 0); \ | |
| 53390 | uint32x4_t __rev1_488; __rev1_488 = __builtin_shufflevector(__s1_488, __s1_488, 3, 2, 1, 0); \ | |
| 53391 | uint32x2_t __rev2_488; __rev2_488 = __builtin_shufflevector(__s2_488, __s2_488, 1, 0); \ | |
| 53392 | uint64x2_t __ret_488; \ | |
| 53393 | __ret_488 = __rev0_488 - __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_488), __noswap_splat_lane_u32(__rev2_488, __p3_488)); \ | |
| 53394 | __ret_488 = __builtin_shufflevector(__ret_488, __ret_488, 1, 0); \ | |
| 53395 | __ret_488; \ | |
| 55055 | #define vmlsl_high_lane_u32(__p0_580, __p1_580, __p2_580, __p3_580) __extension__ ({ \ | |
| 55056 | uint64x2_t __s0_580 = __p0_580; \ | |
| 55057 | uint32x4_t __s1_580 = __p1_580; \ | |
| 55058 | uint32x2_t __s2_580 = __p2_580; \ | |
| 55059 | uint64x2_t __rev0_580; __rev0_580 = __builtin_shufflevector(__s0_580, __s0_580, 1, 0); \ | |
| 55060 | uint32x4_t __rev1_580; __rev1_580 = __builtin_shufflevector(__s1_580, __s1_580, 3, 2, 1, 0); \ | |
| 55061 | uint32x2_t __rev2_580; __rev2_580 = __builtin_shufflevector(__s2_580, __s2_580, 1, 0); \ | |
| 55062 | uint64x2_t __ret_580; \ | |
| 55063 | __ret_580 = __rev0_580 - __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_580), __noswap_splat_lane_u32(__rev2_580, __p3_580)); \ | |
| 55064 | __ret_580 = __builtin_shufflevector(__ret_580, __ret_580, 1, 0); \ | |
| 55065 | __ret_580; \ | |
| 53396 | 55066 | }) |
| 53397 | 55067 | #endif |
| 53398 | 55068 | |
| 53399 | 55069 | #ifdef __LITTLE_ENDIAN__ |
| 53400 | #define vmlsl_high_lane_u16(__p0_489, __p1_489, __p2_489, __p3_489) __extension__ ({ \ | |
| 53401 | uint32x4_t __s0_489 = __p0_489; \ | |
| 53402 | uint16x8_t __s1_489 = __p1_489; \ | |
| 53403 | uint16x4_t __s2_489 = __p2_489; \ | |
| 53404 | uint32x4_t __ret_489; \ | |
| 53405 | __ret_489 = __s0_489 - vmull_u16(vget_high_u16(__s1_489), splat_lane_u16(__s2_489, __p3_489)); \ | |
| 53406 | __ret_489; \ | |
| 55070 | #define vmlsl_high_lane_u16(__p0_581, __p1_581, __p2_581, __p3_581) __extension__ ({ \ | |
| 55071 | uint32x4_t __s0_581 = __p0_581; \ | |
| 55072 | uint16x8_t __s1_581 = __p1_581; \ | |
| 55073 | uint16x4_t __s2_581 = __p2_581; \ | |
| 55074 | uint32x4_t __ret_581; \ | |
| 55075 | __ret_581 = __s0_581 - vmull_u16(vget_high_u16(__s1_581), splat_lane_u16(__s2_581, __p3_581)); \ | |
| 55076 | __ret_581; \ | |
| 53407 | 55077 | }) |
| 53408 | 55078 | #else |
| 53409 | #define vmlsl_high_lane_u16(__p0_490, __p1_490, __p2_490, __p3_490) __extension__ ({ \ | |
| 53410 | uint32x4_t __s0_490 = __p0_490; \ | |
| 53411 | uint16x8_t __s1_490 = __p1_490; \ | |
| 53412 | uint16x4_t __s2_490 = __p2_490; \ | |
| 53413 | uint32x4_t __rev0_490; __rev0_490 = __builtin_shufflevector(__s0_490, __s0_490, 3, 2, 1, 0); \ | |
| 53414 | uint16x8_t __rev1_490; __rev1_490 = __builtin_shufflevector(__s1_490, __s1_490, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53415 | uint16x4_t __rev2_490; __rev2_490 = __builtin_shufflevector(__s2_490, __s2_490, 3, 2, 1, 0); \ | |
| 53416 | uint32x4_t __ret_490; \ | |
| 53417 | __ret_490 = __rev0_490 - __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_490), __noswap_splat_lane_u16(__rev2_490, __p3_490)); \ | |
| 53418 | __ret_490 = __builtin_shufflevector(__ret_490, __ret_490, 3, 2, 1, 0); \ | |
| 53419 | __ret_490; \ | |
| 55079 | #define vmlsl_high_lane_u16(__p0_582, __p1_582, __p2_582, __p3_582) __extension__ ({ \ | |
| 55080 | uint32x4_t __s0_582 = __p0_582; \ | |
| 55081 | uint16x8_t __s1_582 = __p1_582; \ | |
| 55082 | uint16x4_t __s2_582 = __p2_582; \ | |
| 55083 | uint32x4_t __rev0_582; __rev0_582 = __builtin_shufflevector(__s0_582, __s0_582, 3, 2, 1, 0); \ | |
| 55084 | uint16x8_t __rev1_582; __rev1_582 = __builtin_shufflevector(__s1_582, __s1_582, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55085 | uint16x4_t __rev2_582; __rev2_582 = __builtin_shufflevector(__s2_582, __s2_582, 3, 2, 1, 0); \ | |
| 55086 | uint32x4_t __ret_582; \ | |
| 55087 | __ret_582 = __rev0_582 - __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_582), __noswap_splat_lane_u16(__rev2_582, __p3_582)); \ | |
| 55088 | __ret_582 = __builtin_shufflevector(__ret_582, __ret_582, 3, 2, 1, 0); \ | |
| 55089 | __ret_582; \ | |
| 53420 | 55090 | }) |
| 53421 | 55091 | #endif |
| 53422 | 55092 | |
| 53423 | 55093 | #ifdef __LITTLE_ENDIAN__ |
| 53424 | #define vmlsl_high_lane_s32(__p0_491, __p1_491, __p2_491, __p3_491) __extension__ ({ \ | |
| 53425 | int64x2_t __s0_491 = __p0_491; \ | |
| 53426 | int32x4_t __s1_491 = __p1_491; \ | |
| 53427 | int32x2_t __s2_491 = __p2_491; \ | |
| 53428 | int64x2_t __ret_491; \ | |
| 53429 | __ret_491 = __s0_491 - vmull_s32(vget_high_s32(__s1_491), splat_lane_s32(__s2_491, __p3_491)); \ | |
| 53430 | __ret_491; \ | |
| 55094 | #define vmlsl_high_lane_s32(__p0_583, __p1_583, __p2_583, __p3_583) __extension__ ({ \ | |
| 55095 | int64x2_t __s0_583 = __p0_583; \ | |
| 55096 | int32x4_t __s1_583 = __p1_583; \ | |
| 55097 | int32x2_t __s2_583 = __p2_583; \ | |
| 55098 | int64x2_t __ret_583; \ | |
| 55099 | __ret_583 = __s0_583 - vmull_s32(vget_high_s32(__s1_583), splat_lane_s32(__s2_583, __p3_583)); \ | |
| 55100 | __ret_583; \ | |
| 53431 | 55101 | }) |
| 53432 | 55102 | #else |
| 53433 | #define vmlsl_high_lane_s32(__p0_492, __p1_492, __p2_492, __p3_492) __extension__ ({ \ | |
| 53434 | int64x2_t __s0_492 = __p0_492; \ | |
| 53435 | int32x4_t __s1_492 = __p1_492; \ | |
| 53436 | int32x2_t __s2_492 = __p2_492; \ | |
| 53437 | int64x2_t __rev0_492; __rev0_492 = __builtin_shufflevector(__s0_492, __s0_492, 1, 0); \ | |
| 53438 | int32x4_t __rev1_492; __rev1_492 = __builtin_shufflevector(__s1_492, __s1_492, 3, 2, 1, 0); \ | |
| 53439 | int32x2_t __rev2_492; __rev2_492 = __builtin_shufflevector(__s2_492, __s2_492, 1, 0); \ | |
| 53440 | int64x2_t __ret_492; \ | |
| 53441 | __ret_492 = __rev0_492 - __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_492), __noswap_splat_lane_s32(__rev2_492, __p3_492)); \ | |
| 53442 | __ret_492 = __builtin_shufflevector(__ret_492, __ret_492, 1, 0); \ | |
| 53443 | __ret_492; \ | |
| 55103 | #define vmlsl_high_lane_s32(__p0_584, __p1_584, __p2_584, __p3_584) __extension__ ({ \ | |
| 55104 | int64x2_t __s0_584 = __p0_584; \ | |
| 55105 | int32x4_t __s1_584 = __p1_584; \ | |
| 55106 | int32x2_t __s2_584 = __p2_584; \ | |
| 55107 | int64x2_t __rev0_584; __rev0_584 = __builtin_shufflevector(__s0_584, __s0_584, 1, 0); \ | |
| 55108 | int32x4_t __rev1_584; __rev1_584 = __builtin_shufflevector(__s1_584, __s1_584, 3, 2, 1, 0); \ | |
| 55109 | int32x2_t __rev2_584; __rev2_584 = __builtin_shufflevector(__s2_584, __s2_584, 1, 0); \ | |
| 55110 | int64x2_t __ret_584; \ | |
| 55111 | __ret_584 = __rev0_584 - __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_584), __noswap_splat_lane_s32(__rev2_584, __p3_584)); \ | |
| 55112 | __ret_584 = __builtin_shufflevector(__ret_584, __ret_584, 1, 0); \ | |
| 55113 | __ret_584; \ | |
| 53444 | 55114 | }) |
| 53445 | 55115 | #endif |
| 53446 | 55116 | |
| 53447 | 55117 | #ifdef __LITTLE_ENDIAN__ |
| 53448 | #define vmlsl_high_lane_s16(__p0_493, __p1_493, __p2_493, __p3_493) __extension__ ({ \ | |
| 53449 | int32x4_t __s0_493 = __p0_493; \ | |
| 53450 | int16x8_t __s1_493 = __p1_493; \ | |
| 53451 | int16x4_t __s2_493 = __p2_493; \ | |
| 53452 | int32x4_t __ret_493; \ | |
| 53453 | __ret_493 = __s0_493 - vmull_s16(vget_high_s16(__s1_493), splat_lane_s16(__s2_493, __p3_493)); \ | |
| 53454 | __ret_493; \ | |
| 55118 | #define vmlsl_high_lane_s16(__p0_585, __p1_585, __p2_585, __p3_585) __extension__ ({ \ | |
| 55119 | int32x4_t __s0_585 = __p0_585; \ | |
| 55120 | int16x8_t __s1_585 = __p1_585; \ | |
| 55121 | int16x4_t __s2_585 = __p2_585; \ | |
| 55122 | int32x4_t __ret_585; \ | |
| 55123 | __ret_585 = __s0_585 - vmull_s16(vget_high_s16(__s1_585), splat_lane_s16(__s2_585, __p3_585)); \ | |
| 55124 | __ret_585; \ | |
| 53455 | 55125 | }) |
| 53456 | 55126 | #else |
| 53457 | #define vmlsl_high_lane_s16(__p0_494, __p1_494, __p2_494, __p3_494) __extension__ ({ \ | |
| 53458 | int32x4_t __s0_494 = __p0_494; \ | |
| 53459 | int16x8_t __s1_494 = __p1_494; \ | |
| 53460 | int16x4_t __s2_494 = __p2_494; \ | |
| 53461 | int32x4_t __rev0_494; __rev0_494 = __builtin_shufflevector(__s0_494, __s0_494, 3, 2, 1, 0); \ | |
| 53462 | int16x8_t __rev1_494; __rev1_494 = __builtin_shufflevector(__s1_494, __s1_494, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53463 | int16x4_t __rev2_494; __rev2_494 = __builtin_shufflevector(__s2_494, __s2_494, 3, 2, 1, 0); \ | |
| 53464 | int32x4_t __ret_494; \ | |
| 53465 | __ret_494 = __rev0_494 - __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_494), __noswap_splat_lane_s16(__rev2_494, __p3_494)); \ | |
| 53466 | __ret_494 = __builtin_shufflevector(__ret_494, __ret_494, 3, 2, 1, 0); \ | |
| 53467 | __ret_494; \ | |
| 55127 | #define vmlsl_high_lane_s16(__p0_586, __p1_586, __p2_586, __p3_586) __extension__ ({ \ | |
| 55128 | int32x4_t __s0_586 = __p0_586; \ | |
| 55129 | int16x8_t __s1_586 = __p1_586; \ | |
| 55130 | int16x4_t __s2_586 = __p2_586; \ | |
| 55131 | int32x4_t __rev0_586; __rev0_586 = __builtin_shufflevector(__s0_586, __s0_586, 3, 2, 1, 0); \ | |
| 55132 | int16x8_t __rev1_586; __rev1_586 = __builtin_shufflevector(__s1_586, __s1_586, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55133 | int16x4_t __rev2_586; __rev2_586 = __builtin_shufflevector(__s2_586, __s2_586, 3, 2, 1, 0); \ | |
| 55134 | int32x4_t __ret_586; \ | |
| 55135 | __ret_586 = __rev0_586 - __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_586), __noswap_splat_lane_s16(__rev2_586, __p3_586)); \ | |
| 55136 | __ret_586 = __builtin_shufflevector(__ret_586, __ret_586, 3, 2, 1, 0); \ | |
| 55137 | __ret_586; \ | |
| 53468 | 55138 | }) |
| 53469 | 55139 | #endif |
| 53470 | 55140 | |
| 53471 | 55141 | #ifdef __LITTLE_ENDIAN__ |
| 53472 | #define vmlsl_high_laneq_u32(__p0_495, __p1_495, __p2_495, __p3_495) __extension__ ({ \ | |
| 53473 | uint64x2_t __s0_495 = __p0_495; \ | |
| 53474 | uint32x4_t __s1_495 = __p1_495; \ | |
| 53475 | uint32x4_t __s2_495 = __p2_495; \ | |
| 53476 | uint64x2_t __ret_495; \ | |
| 53477 | __ret_495 = __s0_495 - vmull_u32(vget_high_u32(__s1_495), splat_laneq_u32(__s2_495, __p3_495)); \ | |
| 53478 | __ret_495; \ | |
| 55142 | #define vmlsl_high_laneq_u32(__p0_587, __p1_587, __p2_587, __p3_587) __extension__ ({ \ | |
| 55143 | uint64x2_t __s0_587 = __p0_587; \ | |
| 55144 | uint32x4_t __s1_587 = __p1_587; \ | |
| 55145 | uint32x4_t __s2_587 = __p2_587; \ | |
| 55146 | uint64x2_t __ret_587; \ | |
| 55147 | __ret_587 = __s0_587 - vmull_u32(vget_high_u32(__s1_587), splat_laneq_u32(__s2_587, __p3_587)); \ | |
| 55148 | __ret_587; \ | |
| 53479 | 55149 | }) |
| 53480 | 55150 | #else |
| 53481 | #define vmlsl_high_laneq_u32(__p0_496, __p1_496, __p2_496, __p3_496) __extension__ ({ \ | |
| 53482 | uint64x2_t __s0_496 = __p0_496; \ | |
| 53483 | uint32x4_t __s1_496 = __p1_496; \ | |
| 53484 | uint32x4_t __s2_496 = __p2_496; \ | |
| 53485 | uint64x2_t __rev0_496; __rev0_496 = __builtin_shufflevector(__s0_496, __s0_496, 1, 0); \ | |
| 53486 | uint32x4_t __rev1_496; __rev1_496 = __builtin_shufflevector(__s1_496, __s1_496, 3, 2, 1, 0); \ | |
| 53487 | uint32x4_t __rev2_496; __rev2_496 = __builtin_shufflevector(__s2_496, __s2_496, 3, 2, 1, 0); \ | |
| 53488 | uint64x2_t __ret_496; \ | |
| 53489 | __ret_496 = __rev0_496 - __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_496), __noswap_splat_laneq_u32(__rev2_496, __p3_496)); \ | |
| 53490 | __ret_496 = __builtin_shufflevector(__ret_496, __ret_496, 1, 0); \ | |
| 53491 | __ret_496; \ | |
| 55151 | #define vmlsl_high_laneq_u32(__p0_588, __p1_588, __p2_588, __p3_588) __extension__ ({ \ | |
| 55152 | uint64x2_t __s0_588 = __p0_588; \ | |
| 55153 | uint32x4_t __s1_588 = __p1_588; \ | |
| 55154 | uint32x4_t __s2_588 = __p2_588; \ | |
| 55155 | uint64x2_t __rev0_588; __rev0_588 = __builtin_shufflevector(__s0_588, __s0_588, 1, 0); \ | |
| 55156 | uint32x4_t __rev1_588; __rev1_588 = __builtin_shufflevector(__s1_588, __s1_588, 3, 2, 1, 0); \ | |
| 55157 | uint32x4_t __rev2_588; __rev2_588 = __builtin_shufflevector(__s2_588, __s2_588, 3, 2, 1, 0); \ | |
| 55158 | uint64x2_t __ret_588; \ | |
| 55159 | __ret_588 = __rev0_588 - __noswap_vmull_u32(__noswap_vget_high_u32(__rev1_588), __noswap_splat_laneq_u32(__rev2_588, __p3_588)); \ | |
| 55160 | __ret_588 = __builtin_shufflevector(__ret_588, __ret_588, 1, 0); \ | |
| 55161 | __ret_588; \ | |
| 53492 | 55162 | }) |
| 53493 | 55163 | #endif |
| 53494 | 55164 | |
| 53495 | 55165 | #ifdef __LITTLE_ENDIAN__ |
| 53496 | #define vmlsl_high_laneq_u16(__p0_497, __p1_497, __p2_497, __p3_497) __extension__ ({ \ | |
| 53497 | uint32x4_t __s0_497 = __p0_497; \ | |
| 53498 | uint16x8_t __s1_497 = __p1_497; \ | |
| 53499 | uint16x8_t __s2_497 = __p2_497; \ | |
| 53500 | uint32x4_t __ret_497; \ | |
| 53501 | __ret_497 = __s0_497 - vmull_u16(vget_high_u16(__s1_497), splat_laneq_u16(__s2_497, __p3_497)); \ | |
| 53502 | __ret_497; \ | |
| 55166 | #define vmlsl_high_laneq_u16(__p0_589, __p1_589, __p2_589, __p3_589) __extension__ ({ \ | |
| 55167 | uint32x4_t __s0_589 = __p0_589; \ | |
| 55168 | uint16x8_t __s1_589 = __p1_589; \ | |
| 55169 | uint16x8_t __s2_589 = __p2_589; \ | |
| 55170 | uint32x4_t __ret_589; \ | |
| 55171 | __ret_589 = __s0_589 - vmull_u16(vget_high_u16(__s1_589), splat_laneq_u16(__s2_589, __p3_589)); \ | |
| 55172 | __ret_589; \ | |
| 53503 | 55173 | }) |
| 53504 | 55174 | #else |
| 53505 | #define vmlsl_high_laneq_u16(__p0_498, __p1_498, __p2_498, __p3_498) __extension__ ({ \ | |
| 53506 | uint32x4_t __s0_498 = __p0_498; \ | |
| 53507 | uint16x8_t __s1_498 = __p1_498; \ | |
| 53508 | uint16x8_t __s2_498 = __p2_498; \ | |
| 53509 | uint32x4_t __rev0_498; __rev0_498 = __builtin_shufflevector(__s0_498, __s0_498, 3, 2, 1, 0); \ | |
| 53510 | uint16x8_t __rev1_498; __rev1_498 = __builtin_shufflevector(__s1_498, __s1_498, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53511 | uint16x8_t __rev2_498; __rev2_498 = __builtin_shufflevector(__s2_498, __s2_498, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53512 | uint32x4_t __ret_498; \ | |
| 53513 | __ret_498 = __rev0_498 - __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_498), __noswap_splat_laneq_u16(__rev2_498, __p3_498)); \ | |
| 53514 | __ret_498 = __builtin_shufflevector(__ret_498, __ret_498, 3, 2, 1, 0); \ | |
| 53515 | __ret_498; \ | |
| 55175 | #define vmlsl_high_laneq_u16(__p0_590, __p1_590, __p2_590, __p3_590) __extension__ ({ \ | |
| 55176 | uint32x4_t __s0_590 = __p0_590; \ | |
| 55177 | uint16x8_t __s1_590 = __p1_590; \ | |
| 55178 | uint16x8_t __s2_590 = __p2_590; \ | |
| 55179 | uint32x4_t __rev0_590; __rev0_590 = __builtin_shufflevector(__s0_590, __s0_590, 3, 2, 1, 0); \ | |
| 55180 | uint16x8_t __rev1_590; __rev1_590 = __builtin_shufflevector(__s1_590, __s1_590, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55181 | uint16x8_t __rev2_590; __rev2_590 = __builtin_shufflevector(__s2_590, __s2_590, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55182 | uint32x4_t __ret_590; \ | |
| 55183 | __ret_590 = __rev0_590 - __noswap_vmull_u16(__noswap_vget_high_u16(__rev1_590), __noswap_splat_laneq_u16(__rev2_590, __p3_590)); \ | |
| 55184 | __ret_590 = __builtin_shufflevector(__ret_590, __ret_590, 3, 2, 1, 0); \ | |
| 55185 | __ret_590; \ | |
| 53516 | 55186 | }) |
| 53517 | 55187 | #endif |
| 53518 | 55188 | |
| 53519 | 55189 | #ifdef __LITTLE_ENDIAN__ |
| 53520 | #define vmlsl_high_laneq_s32(__p0_499, __p1_499, __p2_499, __p3_499) __extension__ ({ \ | |
| 53521 | int64x2_t __s0_499 = __p0_499; \ | |
| 53522 | int32x4_t __s1_499 = __p1_499; \ | |
| 53523 | int32x4_t __s2_499 = __p2_499; \ | |
| 53524 | int64x2_t __ret_499; \ | |
| 53525 | __ret_499 = __s0_499 - vmull_s32(vget_high_s32(__s1_499), splat_laneq_s32(__s2_499, __p3_499)); \ | |
| 53526 | __ret_499; \ | |
| 55190 | #define vmlsl_high_laneq_s32(__p0_591, __p1_591, __p2_591, __p3_591) __extension__ ({ \ | |
| 55191 | int64x2_t __s0_591 = __p0_591; \ | |
| 55192 | int32x4_t __s1_591 = __p1_591; \ | |
| 55193 | int32x4_t __s2_591 = __p2_591; \ | |
| 55194 | int64x2_t __ret_591; \ | |
| 55195 | __ret_591 = __s0_591 - vmull_s32(vget_high_s32(__s1_591), splat_laneq_s32(__s2_591, __p3_591)); \ | |
| 55196 | __ret_591; \ | |
| 53527 | 55197 | }) |
| 53528 | 55198 | #else |
| 53529 | #define vmlsl_high_laneq_s32(__p0_500, __p1_500, __p2_500, __p3_500) __extension__ ({ \ | |
| 53530 | int64x2_t __s0_500 = __p0_500; \ | |
| 53531 | int32x4_t __s1_500 = __p1_500; \ | |
| 53532 | int32x4_t __s2_500 = __p2_500; \ | |
| 53533 | int64x2_t __rev0_500; __rev0_500 = __builtin_shufflevector(__s0_500, __s0_500, 1, 0); \ | |
| 53534 | int32x4_t __rev1_500; __rev1_500 = __builtin_shufflevector(__s1_500, __s1_500, 3, 2, 1, 0); \ | |
| 53535 | int32x4_t __rev2_500; __rev2_500 = __builtin_shufflevector(__s2_500, __s2_500, 3, 2, 1, 0); \ | |
| 53536 | int64x2_t __ret_500; \ | |
| 53537 | __ret_500 = __rev0_500 - __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_500), __noswap_splat_laneq_s32(__rev2_500, __p3_500)); \ | |
| 53538 | __ret_500 = __builtin_shufflevector(__ret_500, __ret_500, 1, 0); \ | |
| 53539 | __ret_500; \ | |
| 55199 | #define vmlsl_high_laneq_s32(__p0_592, __p1_592, __p2_592, __p3_592) __extension__ ({ \ | |
| 55200 | int64x2_t __s0_592 = __p0_592; \ | |
| 55201 | int32x4_t __s1_592 = __p1_592; \ | |
| 55202 | int32x4_t __s2_592 = __p2_592; \ | |
| 55203 | int64x2_t __rev0_592; __rev0_592 = __builtin_shufflevector(__s0_592, __s0_592, 1, 0); \ | |
| 55204 | int32x4_t __rev1_592; __rev1_592 = __builtin_shufflevector(__s1_592, __s1_592, 3, 2, 1, 0); \ | |
| 55205 | int32x4_t __rev2_592; __rev2_592 = __builtin_shufflevector(__s2_592, __s2_592, 3, 2, 1, 0); \ | |
| 55206 | int64x2_t __ret_592; \ | |
| 55207 | __ret_592 = __rev0_592 - __noswap_vmull_s32(__noswap_vget_high_s32(__rev1_592), __noswap_splat_laneq_s32(__rev2_592, __p3_592)); \ | |
| 55208 | __ret_592 = __builtin_shufflevector(__ret_592, __ret_592, 1, 0); \ | |
| 55209 | __ret_592; \ | |
| 53540 | 55210 | }) |
| 53541 | 55211 | #endif |
| 53542 | 55212 | |
| 53543 | 55213 | #ifdef __LITTLE_ENDIAN__ |
| 53544 | #define vmlsl_high_laneq_s16(__p0_501, __p1_501, __p2_501, __p3_501) __extension__ ({ \ | |
| 53545 | int32x4_t __s0_501 = __p0_501; \ | |
| 53546 | int16x8_t __s1_501 = __p1_501; \ | |
| 53547 | int16x8_t __s2_501 = __p2_501; \ | |
| 53548 | int32x4_t __ret_501; \ | |
| 53549 | __ret_501 = __s0_501 - vmull_s16(vget_high_s16(__s1_501), splat_laneq_s16(__s2_501, __p3_501)); \ | |
| 53550 | __ret_501; \ | |
| 55214 | #define vmlsl_high_laneq_s16(__p0_593, __p1_593, __p2_593, __p3_593) __extension__ ({ \ | |
| 55215 | int32x4_t __s0_593 = __p0_593; \ | |
| 55216 | int16x8_t __s1_593 = __p1_593; \ | |
| 55217 | int16x8_t __s2_593 = __p2_593; \ | |
| 55218 | int32x4_t __ret_593; \ | |
| 55219 | __ret_593 = __s0_593 - vmull_s16(vget_high_s16(__s1_593), splat_laneq_s16(__s2_593, __p3_593)); \ | |
| 55220 | __ret_593; \ | |
| 53551 | 55221 | }) |
| 53552 | 55222 | #else |
| 53553 | #define vmlsl_high_laneq_s16(__p0_502, __p1_502, __p2_502, __p3_502) __extension__ ({ \ | |
| 53554 | int32x4_t __s0_502 = __p0_502; \ | |
| 53555 | int16x8_t __s1_502 = __p1_502; \ | |
| 53556 | int16x8_t __s2_502 = __p2_502; \ | |
| 53557 | int32x4_t __rev0_502; __rev0_502 = __builtin_shufflevector(__s0_502, __s0_502, 3, 2, 1, 0); \ | |
| 53558 | int16x8_t __rev1_502; __rev1_502 = __builtin_shufflevector(__s1_502, __s1_502, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53559 | int16x8_t __rev2_502; __rev2_502 = __builtin_shufflevector(__s2_502, __s2_502, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53560 | int32x4_t __ret_502; \ | |
| 53561 | __ret_502 = __rev0_502 - __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_502), __noswap_splat_laneq_s16(__rev2_502, __p3_502)); \ | |
| 53562 | __ret_502 = __builtin_shufflevector(__ret_502, __ret_502, 3, 2, 1, 0); \ | |
| 53563 | __ret_502; \ | |
| 55223 | #define vmlsl_high_laneq_s16(__p0_594, __p1_594, __p2_594, __p3_594) __extension__ ({ \ | |
| 55224 | int32x4_t __s0_594 = __p0_594; \ | |
| 55225 | int16x8_t __s1_594 = __p1_594; \ | |
| 55226 | int16x8_t __s2_594 = __p2_594; \ | |
| 55227 | int32x4_t __rev0_594; __rev0_594 = __builtin_shufflevector(__s0_594, __s0_594, 3, 2, 1, 0); \ | |
| 55228 | int16x8_t __rev1_594; __rev1_594 = __builtin_shufflevector(__s1_594, __s1_594, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55229 | int16x8_t __rev2_594; __rev2_594 = __builtin_shufflevector(__s2_594, __s2_594, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55230 | int32x4_t __ret_594; \ | |
| 55231 | __ret_594 = __rev0_594 - __noswap_vmull_s16(__noswap_vget_high_s16(__rev1_594), __noswap_splat_laneq_s16(__rev2_594, __p3_594)); \ | |
| 55232 | __ret_594 = __builtin_shufflevector(__ret_594, __ret_594, 3, 2, 1, 0); \ | |
| 55233 | __ret_594; \ | |
| 53564 | 55234 | }) |
| 53565 | 55235 | #endif |
| 53566 | 55236 | |
| 53567 | 55237 | #ifdef __LITTLE_ENDIAN__ |
| 53568 | #define vmlsl_laneq_u32(__p0_503, __p1_503, __p2_503, __p3_503) __extension__ ({ \ | |
| 53569 | uint64x2_t __s0_503 = __p0_503; \ | |
| 53570 | uint32x2_t __s1_503 = __p1_503; \ | |
| 53571 | uint32x4_t __s2_503 = __p2_503; \ | |
| 53572 | uint64x2_t __ret_503; \ | |
| 53573 | __ret_503 = __s0_503 - vmull_u32(__s1_503, splat_laneq_u32(__s2_503, __p3_503)); \ | |
| 53574 | __ret_503; \ | |
| 55238 | #define vmlsl_laneq_u32(__p0_595, __p1_595, __p2_595, __p3_595) __extension__ ({ \ | |
| 55239 | uint64x2_t __s0_595 = __p0_595; \ | |
| 55240 | uint32x2_t __s1_595 = __p1_595; \ | |
| 55241 | uint32x4_t __s2_595 = __p2_595; \ | |
| 55242 | uint64x2_t __ret_595; \ | |
| 55243 | __ret_595 = __s0_595 - vmull_u32(__s1_595, splat_laneq_u32(__s2_595, __p3_595)); \ | |
| 55244 | __ret_595; \ | |
| 53575 | 55245 | }) |
| 53576 | 55246 | #else |
| 53577 | #define vmlsl_laneq_u32(__p0_504, __p1_504, __p2_504, __p3_504) __extension__ ({ \ | |
| 53578 | uint64x2_t __s0_504 = __p0_504; \ | |
| 53579 | uint32x2_t __s1_504 = __p1_504; \ | |
| 53580 | uint32x4_t __s2_504 = __p2_504; \ | |
| 53581 | uint64x2_t __rev0_504; __rev0_504 = __builtin_shufflevector(__s0_504, __s0_504, 1, 0); \ | |
| 53582 | uint32x2_t __rev1_504; __rev1_504 = __builtin_shufflevector(__s1_504, __s1_504, 1, 0); \ | |
| 53583 | uint32x4_t __rev2_504; __rev2_504 = __builtin_shufflevector(__s2_504, __s2_504, 3, 2, 1, 0); \ | |
| 53584 | uint64x2_t __ret_504; \ | |
| 53585 | __ret_504 = __rev0_504 - __noswap_vmull_u32(__rev1_504, __noswap_splat_laneq_u32(__rev2_504, __p3_504)); \ | |
| 53586 | __ret_504 = __builtin_shufflevector(__ret_504, __ret_504, 1, 0); \ | |
| 53587 | __ret_504; \ | |
| 55247 | #define vmlsl_laneq_u32(__p0_596, __p1_596, __p2_596, __p3_596) __extension__ ({ \ | |
| 55248 | uint64x2_t __s0_596 = __p0_596; \ | |
| 55249 | uint32x2_t __s1_596 = __p1_596; \ | |
| 55250 | uint32x4_t __s2_596 = __p2_596; \ | |
| 55251 | uint64x2_t __rev0_596; __rev0_596 = __builtin_shufflevector(__s0_596, __s0_596, 1, 0); \ | |
| 55252 | uint32x2_t __rev1_596; __rev1_596 = __builtin_shufflevector(__s1_596, __s1_596, 1, 0); \ | |
| 55253 | uint32x4_t __rev2_596; __rev2_596 = __builtin_shufflevector(__s2_596, __s2_596, 3, 2, 1, 0); \ | |
| 55254 | uint64x2_t __ret_596; \ | |
| 55255 | __ret_596 = __rev0_596 - __noswap_vmull_u32(__rev1_596, __noswap_splat_laneq_u32(__rev2_596, __p3_596)); \ | |
| 55256 | __ret_596 = __builtin_shufflevector(__ret_596, __ret_596, 1, 0); \ | |
| 55257 | __ret_596; \ | |
| 53588 | 55258 | }) |
| 53589 | 55259 | #endif |
| 53590 | 55260 | |
| 53591 | 55261 | #ifdef __LITTLE_ENDIAN__ |
| 53592 | #define vmlsl_laneq_u16(__p0_505, __p1_505, __p2_505, __p3_505) __extension__ ({ \ | |
| 53593 | uint32x4_t __s0_505 = __p0_505; \ | |
| 53594 | uint16x4_t __s1_505 = __p1_505; \ | |
| 53595 | uint16x8_t __s2_505 = __p2_505; \ | |
| 53596 | uint32x4_t __ret_505; \ | |
| 53597 | __ret_505 = __s0_505 - vmull_u16(__s1_505, splat_laneq_u16(__s2_505, __p3_505)); \ | |
| 53598 | __ret_505; \ | |
| 55262 | #define vmlsl_laneq_u16(__p0_597, __p1_597, __p2_597, __p3_597) __extension__ ({ \ | |
| 55263 | uint32x4_t __s0_597 = __p0_597; \ | |
| 55264 | uint16x4_t __s1_597 = __p1_597; \ | |
| 55265 | uint16x8_t __s2_597 = __p2_597; \ | |
| 55266 | uint32x4_t __ret_597; \ | |
| 55267 | __ret_597 = __s0_597 - vmull_u16(__s1_597, splat_laneq_u16(__s2_597, __p3_597)); \ | |
| 55268 | __ret_597; \ | |
| 53599 | 55269 | }) |
| 53600 | 55270 | #else |
| 53601 | #define vmlsl_laneq_u16(__p0_506, __p1_506, __p2_506, __p3_506) __extension__ ({ \ | |
| 53602 | uint32x4_t __s0_506 = __p0_506; \ | |
| 53603 | uint16x4_t __s1_506 = __p1_506; \ | |
| 53604 | uint16x8_t __s2_506 = __p2_506; \ | |
| 53605 | uint32x4_t __rev0_506; __rev0_506 = __builtin_shufflevector(__s0_506, __s0_506, 3, 2, 1, 0); \ | |
| 53606 | uint16x4_t __rev1_506; __rev1_506 = __builtin_shufflevector(__s1_506, __s1_506, 3, 2, 1, 0); \ | |
| 53607 | uint16x8_t __rev2_506; __rev2_506 = __builtin_shufflevector(__s2_506, __s2_506, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53608 | uint32x4_t __ret_506; \ | |
| 53609 | __ret_506 = __rev0_506 - __noswap_vmull_u16(__rev1_506, __noswap_splat_laneq_u16(__rev2_506, __p3_506)); \ | |
| 53610 | __ret_506 = __builtin_shufflevector(__ret_506, __ret_506, 3, 2, 1, 0); \ | |
| 53611 | __ret_506; \ | |
| 55271 | #define vmlsl_laneq_u16(__p0_598, __p1_598, __p2_598, __p3_598) __extension__ ({ \ | |
| 55272 | uint32x4_t __s0_598 = __p0_598; \ | |
| 55273 | uint16x4_t __s1_598 = __p1_598; \ | |
| 55274 | uint16x8_t __s2_598 = __p2_598; \ | |
| 55275 | uint32x4_t __rev0_598; __rev0_598 = __builtin_shufflevector(__s0_598, __s0_598, 3, 2, 1, 0); \ | |
| 55276 | uint16x4_t __rev1_598; __rev1_598 = __builtin_shufflevector(__s1_598, __s1_598, 3, 2, 1, 0); \ | |
| 55277 | uint16x8_t __rev2_598; __rev2_598 = __builtin_shufflevector(__s2_598, __s2_598, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55278 | uint32x4_t __ret_598; \ | |
| 55279 | __ret_598 = __rev0_598 - __noswap_vmull_u16(__rev1_598, __noswap_splat_laneq_u16(__rev2_598, __p3_598)); \ | |
| 55280 | __ret_598 = __builtin_shufflevector(__ret_598, __ret_598, 3, 2, 1, 0); \ | |
| 55281 | __ret_598; \ | |
| 53612 | 55282 | }) |
| 53613 | 55283 | #endif |
| 53614 | 55284 | |
| 53615 | 55285 | #ifdef __LITTLE_ENDIAN__ |
| 53616 | #define vmlsl_laneq_s32(__p0_507, __p1_507, __p2_507, __p3_507) __extension__ ({ \ | |
| 53617 | int64x2_t __s0_507 = __p0_507; \ | |
| 53618 | int32x2_t __s1_507 = __p1_507; \ | |
| 53619 | int32x4_t __s2_507 = __p2_507; \ | |
| 53620 | int64x2_t __ret_507; \ | |
| 53621 | __ret_507 = __s0_507 - vmull_s32(__s1_507, splat_laneq_s32(__s2_507, __p3_507)); \ | |
| 53622 | __ret_507; \ | |
| 55286 | #define vmlsl_laneq_s32(__p0_599, __p1_599, __p2_599, __p3_599) __extension__ ({ \ | |
| 55287 | int64x2_t __s0_599 = __p0_599; \ | |
| 55288 | int32x2_t __s1_599 = __p1_599; \ | |
| 55289 | int32x4_t __s2_599 = __p2_599; \ | |
| 55290 | int64x2_t __ret_599; \ | |
| 55291 | __ret_599 = __s0_599 - vmull_s32(__s1_599, splat_laneq_s32(__s2_599, __p3_599)); \ | |
| 55292 | __ret_599; \ | |
| 53623 | 55293 | }) |
| 53624 | 55294 | #else |
| 53625 | #define vmlsl_laneq_s32(__p0_508, __p1_508, __p2_508, __p3_508) __extension__ ({ \ | |
| 53626 | int64x2_t __s0_508 = __p0_508; \ | |
| 53627 | int32x2_t __s1_508 = __p1_508; \ | |
| 53628 | int32x4_t __s2_508 = __p2_508; \ | |
| 53629 | int64x2_t __rev0_508; __rev0_508 = __builtin_shufflevector(__s0_508, __s0_508, 1, 0); \ | |
| 53630 | int32x2_t __rev1_508; __rev1_508 = __builtin_shufflevector(__s1_508, __s1_508, 1, 0); \ | |
| 53631 | int32x4_t __rev2_508; __rev2_508 = __builtin_shufflevector(__s2_508, __s2_508, 3, 2, 1, 0); \ | |
| 53632 | int64x2_t __ret_508; \ | |
| 53633 | __ret_508 = __rev0_508 - __noswap_vmull_s32(__rev1_508, __noswap_splat_laneq_s32(__rev2_508, __p3_508)); \ | |
| 53634 | __ret_508 = __builtin_shufflevector(__ret_508, __ret_508, 1, 0); \ | |
| 53635 | __ret_508; \ | |
| 55295 | #define vmlsl_laneq_s32(__p0_600, __p1_600, __p2_600, __p3_600) __extension__ ({ \ | |
| 55296 | int64x2_t __s0_600 = __p0_600; \ | |
| 55297 | int32x2_t __s1_600 = __p1_600; \ | |
| 55298 | int32x4_t __s2_600 = __p2_600; \ | |
| 55299 | int64x2_t __rev0_600; __rev0_600 = __builtin_shufflevector(__s0_600, __s0_600, 1, 0); \ | |
| 55300 | int32x2_t __rev1_600; __rev1_600 = __builtin_shufflevector(__s1_600, __s1_600, 1, 0); \ | |
| 55301 | int32x4_t __rev2_600; __rev2_600 = __builtin_shufflevector(__s2_600, __s2_600, 3, 2, 1, 0); \ | |
| 55302 | int64x2_t __ret_600; \ | |
| 55303 | __ret_600 = __rev0_600 - __noswap_vmull_s32(__rev1_600, __noswap_splat_laneq_s32(__rev2_600, __p3_600)); \ | |
| 55304 | __ret_600 = __builtin_shufflevector(__ret_600, __ret_600, 1, 0); \ | |
| 55305 | __ret_600; \ | |
| 53636 | 55306 | }) |
| 53637 | 55307 | #endif |
| 53638 | 55308 | |
| 53639 | 55309 | #ifdef __LITTLE_ENDIAN__ |
| 53640 | #define vmlsl_laneq_s16(__p0_509, __p1_509, __p2_509, __p3_509) __extension__ ({ \ | |
| 53641 | int32x4_t __s0_509 = __p0_509; \ | |
| 53642 | int16x4_t __s1_509 = __p1_509; \ | |
| 53643 | int16x8_t __s2_509 = __p2_509; \ | |
| 53644 | int32x4_t __ret_509; \ | |
| 53645 | __ret_509 = __s0_509 - vmull_s16(__s1_509, splat_laneq_s16(__s2_509, __p3_509)); \ | |
| 53646 | __ret_509; \ | |
| 55310 | #define vmlsl_laneq_s16(__p0_601, __p1_601, __p2_601, __p3_601) __extension__ ({ \ | |
| 55311 | int32x4_t __s0_601 = __p0_601; \ | |
| 55312 | int16x4_t __s1_601 = __p1_601; \ | |
| 55313 | int16x8_t __s2_601 = __p2_601; \ | |
| 55314 | int32x4_t __ret_601; \ | |
| 55315 | __ret_601 = __s0_601 - vmull_s16(__s1_601, splat_laneq_s16(__s2_601, __p3_601)); \ | |
| 55316 | __ret_601; \ | |
| 53647 | 55317 | }) |
| 53648 | 55318 | #else |
| 53649 | #define vmlsl_laneq_s16(__p0_510, __p1_510, __p2_510, __p3_510) __extension__ ({ \ | |
| 53650 | int32x4_t __s0_510 = __p0_510; \ | |
| 53651 | int16x4_t __s1_510 = __p1_510; \ | |
| 53652 | int16x8_t __s2_510 = __p2_510; \ | |
| 53653 | int32x4_t __rev0_510; __rev0_510 = __builtin_shufflevector(__s0_510, __s0_510, 3, 2, 1, 0); \ | |
| 53654 | int16x4_t __rev1_510; __rev1_510 = __builtin_shufflevector(__s1_510, __s1_510, 3, 2, 1, 0); \ | |
| 53655 | int16x8_t __rev2_510; __rev2_510 = __builtin_shufflevector(__s2_510, __s2_510, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 53656 | int32x4_t __ret_510; \ | |
| 53657 | __ret_510 = __rev0_510 - __noswap_vmull_s16(__rev1_510, __noswap_splat_laneq_s16(__rev2_510, __p3_510)); \ | |
| 53658 | __ret_510 = __builtin_shufflevector(__ret_510, __ret_510, 3, 2, 1, 0); \ | |
| 53659 | __ret_510; \ | |
| 55319 | #define vmlsl_laneq_s16(__p0_602, __p1_602, __p2_602, __p3_602) __extension__ ({ \ | |
| 55320 | int32x4_t __s0_602 = __p0_602; \ | |
| 55321 | int16x4_t __s1_602 = __p1_602; \ | |
| 55322 | int16x8_t __s2_602 = __p2_602; \ | |
| 55323 | int32x4_t __rev0_602; __rev0_602 = __builtin_shufflevector(__s0_602, __s0_602, 3, 2, 1, 0); \ | |
| 55324 | int16x4_t __rev1_602; __rev1_602 = __builtin_shufflevector(__s1_602, __s1_602, 3, 2, 1, 0); \ | |
| 55325 | int16x8_t __rev2_602; __rev2_602 = __builtin_shufflevector(__s2_602, __s2_602, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55326 | int32x4_t __ret_602; \ | |
| 55327 | __ret_602 = __rev0_602 - __noswap_vmull_s16(__rev1_602, __noswap_splat_laneq_s16(__rev2_602, __p3_602)); \ | |
| 55328 | __ret_602 = __builtin_shufflevector(__ret_602, __ret_602, 3, 2, 1, 0); \ | |
| 55329 | __ret_602; \ | |
| 53660 | 55330 | }) |
| 53661 | 55331 | #endif |
| 53662 | 55332 | |
| ... | ... | @@ -53701,146 +55371,146 @@ __ai float64x1_t vmov_n_f64(float64_t __p0) { |
| 53701 | 55371 | return __ret; |
| 53702 | 55372 | } |
| 53703 | 55373 | #ifdef __LITTLE_ENDIAN__ |
| 53704 | __ai uint16x8_t vmovl_high_u8(uint8x16_t __p0_511) { | |
| 53705 | uint16x8_t __ret_511; | |
| 53706 | uint8x8_t __a1_511 = vget_high_u8(__p0_511); | |
| 53707 | __ret_511 = (uint16x8_t)(vshll_n_u8(__a1_511, 0)); | |
| 53708 | return __ret_511; | |
| 55374 | __ai uint16x8_t vmovl_high_u8(uint8x16_t __p0_603) { | |
| 55375 | uint16x8_t __ret_603; | |
| 55376 | uint8x8_t __a1_603 = vget_high_u8(__p0_603); | |
| 55377 | __ret_603 = (uint16x8_t)(vshll_n_u8(__a1_603, 0)); | |
| 55378 | return __ret_603; | |
| 53709 | 55379 | } |
| 53710 | 55380 | #else |
| 53711 | __ai uint16x8_t vmovl_high_u8(uint8x16_t __p0_512) { | |
| 53712 | uint8x16_t __rev0_512; __rev0_512 = __builtin_shufflevector(__p0_512, __p0_512, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 53713 | uint16x8_t __ret_512; | |
| 53714 | uint8x8_t __a1_512 = __noswap_vget_high_u8(__rev0_512); | |
| 53715 | __ret_512 = (uint16x8_t)(__noswap_vshll_n_u8(__a1_512, 0)); | |
| 53716 | __ret_512 = __builtin_shufflevector(__ret_512, __ret_512, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 53717 | return __ret_512; | |
| 55381 | __ai uint16x8_t vmovl_high_u8(uint8x16_t __p0_604) { | |
| 55382 | uint8x16_t __rev0_604; __rev0_604 = __builtin_shufflevector(__p0_604, __p0_604, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 55383 | uint16x8_t __ret_604; | |
| 55384 | uint8x8_t __a1_604 = __noswap_vget_high_u8(__rev0_604); | |
| 55385 | __ret_604 = (uint16x8_t)(__noswap_vshll_n_u8(__a1_604, 0)); | |
| 55386 | __ret_604 = __builtin_shufflevector(__ret_604, __ret_604, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 55387 | return __ret_604; | |
| 53718 | 55388 | } |
| 53719 | __ai uint16x8_t __noswap_vmovl_high_u8(uint8x16_t __p0_513) { | |
| 53720 | uint16x8_t __ret_513; | |
| 53721 | uint8x8_t __a1_513 = __noswap_vget_high_u8(__p0_513); | |
| 53722 | __ret_513 = (uint16x8_t)(__noswap_vshll_n_u8(__a1_513, 0)); | |
| 53723 | return __ret_513; | |
| 55389 | __ai uint16x8_t __noswap_vmovl_high_u8(uint8x16_t __p0_605) { | |
| 55390 | uint16x8_t __ret_605; | |
| 55391 | uint8x8_t __a1_605 = __noswap_vget_high_u8(__p0_605); | |
| 55392 | __ret_605 = (uint16x8_t)(__noswap_vshll_n_u8(__a1_605, 0)); | |
| 55393 | return __ret_605; | |
| 53724 | 55394 | } |
| 53725 | 55395 | #endif |
| 53726 | 55396 | |
| 53727 | 55397 | #ifdef __LITTLE_ENDIAN__ |
| 53728 | __ai uint64x2_t vmovl_high_u32(uint32x4_t __p0_514) { | |
| 53729 | uint64x2_t __ret_514; | |
| 53730 | uint32x2_t __a1_514 = vget_high_u32(__p0_514); | |
| 53731 | __ret_514 = (uint64x2_t)(vshll_n_u32(__a1_514, 0)); | |
| 53732 | return __ret_514; | |
| 55398 | __ai uint64x2_t vmovl_high_u32(uint32x4_t __p0_606) { | |
| 55399 | uint64x2_t __ret_606; | |
| 55400 | uint32x2_t __a1_606 = vget_high_u32(__p0_606); | |
| 55401 | __ret_606 = (uint64x2_t)(vshll_n_u32(__a1_606, 0)); | |
| 55402 | return __ret_606; | |
| 53733 | 55403 | } |
| 53734 | 55404 | #else |
| 53735 | __ai uint64x2_t vmovl_high_u32(uint32x4_t __p0_515) { | |
| 53736 | uint32x4_t __rev0_515; __rev0_515 = __builtin_shufflevector(__p0_515, __p0_515, 3, 2, 1, 0); | |
| 53737 | uint64x2_t __ret_515; | |
| 53738 | uint32x2_t __a1_515 = __noswap_vget_high_u32(__rev0_515); | |
| 53739 | __ret_515 = (uint64x2_t)(__noswap_vshll_n_u32(__a1_515, 0)); | |
| 53740 | __ret_515 = __builtin_shufflevector(__ret_515, __ret_515, 1, 0); | |
| 53741 | return __ret_515; | |
| 55405 | __ai uint64x2_t vmovl_high_u32(uint32x4_t __p0_607) { | |
| 55406 | uint32x4_t __rev0_607; __rev0_607 = __builtin_shufflevector(__p0_607, __p0_607, 3, 2, 1, 0); | |
| 55407 | uint64x2_t __ret_607; | |
| 55408 | uint32x2_t __a1_607 = __noswap_vget_high_u32(__rev0_607); | |
| 55409 | __ret_607 = (uint64x2_t)(__noswap_vshll_n_u32(__a1_607, 0)); | |
| 55410 | __ret_607 = __builtin_shufflevector(__ret_607, __ret_607, 1, 0); | |
| 55411 | return __ret_607; | |
| 53742 | 55412 | } |
| 53743 | __ai uint64x2_t __noswap_vmovl_high_u32(uint32x4_t __p0_516) { | |
| 53744 | uint64x2_t __ret_516; | |
| 53745 | uint32x2_t __a1_516 = __noswap_vget_high_u32(__p0_516); | |
| 53746 | __ret_516 = (uint64x2_t)(__noswap_vshll_n_u32(__a1_516, 0)); | |
| 53747 | return __ret_516; | |
| 55413 | __ai uint64x2_t __noswap_vmovl_high_u32(uint32x4_t __p0_608) { | |
| 55414 | uint64x2_t __ret_608; | |
| 55415 | uint32x2_t __a1_608 = __noswap_vget_high_u32(__p0_608); | |
| 55416 | __ret_608 = (uint64x2_t)(__noswap_vshll_n_u32(__a1_608, 0)); | |
| 55417 | return __ret_608; | |
| 53748 | 55418 | } |
| 53749 | 55419 | #endif |
| 53750 | 55420 | |
| 53751 | 55421 | #ifdef __LITTLE_ENDIAN__ |
| 53752 | __ai uint32x4_t vmovl_high_u16(uint16x8_t __p0_517) { | |
| 53753 | uint32x4_t __ret_517; | |
| 53754 | uint16x4_t __a1_517 = vget_high_u16(__p0_517); | |
| 53755 | __ret_517 = (uint32x4_t)(vshll_n_u16(__a1_517, 0)); | |
| 53756 | return __ret_517; | |
| 55422 | __ai uint32x4_t vmovl_high_u16(uint16x8_t __p0_609) { | |
| 55423 | uint32x4_t __ret_609; | |
| 55424 | uint16x4_t __a1_609 = vget_high_u16(__p0_609); | |
| 55425 | __ret_609 = (uint32x4_t)(vshll_n_u16(__a1_609, 0)); | |
| 55426 | return __ret_609; | |
| 53757 | 55427 | } |
| 53758 | 55428 | #else |
| 53759 | __ai uint32x4_t vmovl_high_u16(uint16x8_t __p0_518) { | |
| 53760 | uint16x8_t __rev0_518; __rev0_518 = __builtin_shufflevector(__p0_518, __p0_518, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 53761 | uint32x4_t __ret_518; | |
| 53762 | uint16x4_t __a1_518 = __noswap_vget_high_u16(__rev0_518); | |
| 53763 | __ret_518 = (uint32x4_t)(__noswap_vshll_n_u16(__a1_518, 0)); | |
| 53764 | __ret_518 = __builtin_shufflevector(__ret_518, __ret_518, 3, 2, 1, 0); | |
| 53765 | return __ret_518; | |
| 55429 | __ai uint32x4_t vmovl_high_u16(uint16x8_t __p0_610) { | |
| 55430 | uint16x8_t __rev0_610; __rev0_610 = __builtin_shufflevector(__p0_610, __p0_610, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 55431 | uint32x4_t __ret_610; | |
| 55432 | uint16x4_t __a1_610 = __noswap_vget_high_u16(__rev0_610); | |
| 55433 | __ret_610 = (uint32x4_t)(__noswap_vshll_n_u16(__a1_610, 0)); | |
| 55434 | __ret_610 = __builtin_shufflevector(__ret_610, __ret_610, 3, 2, 1, 0); | |
| 55435 | return __ret_610; | |
| 53766 | 55436 | } |
| 53767 | __ai uint32x4_t __noswap_vmovl_high_u16(uint16x8_t __p0_519) { | |
| 53768 | uint32x4_t __ret_519; | |
| 53769 | uint16x4_t __a1_519 = __noswap_vget_high_u16(__p0_519); | |
| 53770 | __ret_519 = (uint32x4_t)(__noswap_vshll_n_u16(__a1_519, 0)); | |
| 53771 | return __ret_519; | |
| 55437 | __ai uint32x4_t __noswap_vmovl_high_u16(uint16x8_t __p0_611) { | |
| 55438 | uint32x4_t __ret_611; | |
| 55439 | uint16x4_t __a1_611 = __noswap_vget_high_u16(__p0_611); | |
| 55440 | __ret_611 = (uint32x4_t)(__noswap_vshll_n_u16(__a1_611, 0)); | |
| 55441 | return __ret_611; | |
| 53772 | 55442 | } |
| 53773 | 55443 | #endif |
| 53774 | 55444 | |
| 53775 | 55445 | #ifdef __LITTLE_ENDIAN__ |
| 53776 | __ai int16x8_t vmovl_high_s8(int8x16_t __p0_520) { | |
| 53777 | int16x8_t __ret_520; | |
| 53778 | int8x8_t __a1_520 = vget_high_s8(__p0_520); | |
| 53779 | __ret_520 = (int16x8_t)(vshll_n_s8(__a1_520, 0)); | |
| 53780 | return __ret_520; | |
| 55446 | __ai int16x8_t vmovl_high_s8(int8x16_t __p0_612) { | |
| 55447 | int16x8_t __ret_612; | |
| 55448 | int8x8_t __a1_612 = vget_high_s8(__p0_612); | |
| 55449 | __ret_612 = (int16x8_t)(vshll_n_s8(__a1_612, 0)); | |
| 55450 | return __ret_612; | |
| 53781 | 55451 | } |
| 53782 | 55452 | #else |
| 53783 | __ai int16x8_t vmovl_high_s8(int8x16_t __p0_521) { | |
| 53784 | int8x16_t __rev0_521; __rev0_521 = __builtin_shufflevector(__p0_521, __p0_521, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 53785 | int16x8_t __ret_521; | |
| 53786 | int8x8_t __a1_521 = __noswap_vget_high_s8(__rev0_521); | |
| 53787 | __ret_521 = (int16x8_t)(__noswap_vshll_n_s8(__a1_521, 0)); | |
| 53788 | __ret_521 = __builtin_shufflevector(__ret_521, __ret_521, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 53789 | return __ret_521; | |
| 55453 | __ai int16x8_t vmovl_high_s8(int8x16_t __p0_613) { | |
| 55454 | int8x16_t __rev0_613; __rev0_613 = __builtin_shufflevector(__p0_613, __p0_613, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 55455 | int16x8_t __ret_613; | |
| 55456 | int8x8_t __a1_613 = __noswap_vget_high_s8(__rev0_613); | |
| 55457 | __ret_613 = (int16x8_t)(__noswap_vshll_n_s8(__a1_613, 0)); | |
| 55458 | __ret_613 = __builtin_shufflevector(__ret_613, __ret_613, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 55459 | return __ret_613; | |
| 53790 | 55460 | } |
| 53791 | __ai int16x8_t __noswap_vmovl_high_s8(int8x16_t __p0_522) { | |
| 53792 | int16x8_t __ret_522; | |
| 53793 | int8x8_t __a1_522 = __noswap_vget_high_s8(__p0_522); | |
| 53794 | __ret_522 = (int16x8_t)(__noswap_vshll_n_s8(__a1_522, 0)); | |
| 53795 | return __ret_522; | |
| 55461 | __ai int16x8_t __noswap_vmovl_high_s8(int8x16_t __p0_614) { | |
| 55462 | int16x8_t __ret_614; | |
| 55463 | int8x8_t __a1_614 = __noswap_vget_high_s8(__p0_614); | |
| 55464 | __ret_614 = (int16x8_t)(__noswap_vshll_n_s8(__a1_614, 0)); | |
| 55465 | return __ret_614; | |
| 53796 | 55466 | } |
| 53797 | 55467 | #endif |
| 53798 | 55468 | |
| 53799 | 55469 | #ifdef __LITTLE_ENDIAN__ |
| 53800 | __ai int64x2_t vmovl_high_s32(int32x4_t __p0_523) { | |
| 53801 | int64x2_t __ret_523; | |
| 53802 | int32x2_t __a1_523 = vget_high_s32(__p0_523); | |
| 53803 | __ret_523 = (int64x2_t)(vshll_n_s32(__a1_523, 0)); | |
| 53804 | return __ret_523; | |
| 55470 | __ai int64x2_t vmovl_high_s32(int32x4_t __p0_615) { | |
| 55471 | int64x2_t __ret_615; | |
| 55472 | int32x2_t __a1_615 = vget_high_s32(__p0_615); | |
| 55473 | __ret_615 = (int64x2_t)(vshll_n_s32(__a1_615, 0)); | |
| 55474 | return __ret_615; | |
| 53805 | 55475 | } |
| 53806 | 55476 | #else |
| 53807 | __ai int64x2_t vmovl_high_s32(int32x4_t __p0_524) { | |
| 53808 | int32x4_t __rev0_524; __rev0_524 = __builtin_shufflevector(__p0_524, __p0_524, 3, 2, 1, 0); | |
| 53809 | int64x2_t __ret_524; | |
| 53810 | int32x2_t __a1_524 = __noswap_vget_high_s32(__rev0_524); | |
| 53811 | __ret_524 = (int64x2_t)(__noswap_vshll_n_s32(__a1_524, 0)); | |
| 53812 | __ret_524 = __builtin_shufflevector(__ret_524, __ret_524, 1, 0); | |
| 53813 | return __ret_524; | |
| 55477 | __ai int64x2_t vmovl_high_s32(int32x4_t __p0_616) { | |
| 55478 | int32x4_t __rev0_616; __rev0_616 = __builtin_shufflevector(__p0_616, __p0_616, 3, 2, 1, 0); | |
| 55479 | int64x2_t __ret_616; | |
| 55480 | int32x2_t __a1_616 = __noswap_vget_high_s32(__rev0_616); | |
| 55481 | __ret_616 = (int64x2_t)(__noswap_vshll_n_s32(__a1_616, 0)); | |
| 55482 | __ret_616 = __builtin_shufflevector(__ret_616, __ret_616, 1, 0); | |
| 55483 | return __ret_616; | |
| 53814 | 55484 | } |
| 53815 | __ai int64x2_t __noswap_vmovl_high_s32(int32x4_t __p0_525) { | |
| 53816 | int64x2_t __ret_525; | |
| 53817 | int32x2_t __a1_525 = __noswap_vget_high_s32(__p0_525); | |
| 53818 | __ret_525 = (int64x2_t)(__noswap_vshll_n_s32(__a1_525, 0)); | |
| 53819 | return __ret_525; | |
| 55485 | __ai int64x2_t __noswap_vmovl_high_s32(int32x4_t __p0_617) { | |
| 55486 | int64x2_t __ret_617; | |
| 55487 | int32x2_t __a1_617 = __noswap_vget_high_s32(__p0_617); | |
| 55488 | __ret_617 = (int64x2_t)(__noswap_vshll_n_s32(__a1_617, 0)); | |
| 55489 | return __ret_617; | |
| 53820 | 55490 | } |
| 53821 | 55491 | #endif |
| 53822 | 55492 | |
| 53823 | 55493 | #ifdef __LITTLE_ENDIAN__ |
| 53824 | __ai int32x4_t vmovl_high_s16(int16x8_t __p0_526) { | |
| 53825 | int32x4_t __ret_526; | |
| 53826 | int16x4_t __a1_526 = vget_high_s16(__p0_526); | |
| 53827 | __ret_526 = (int32x4_t)(vshll_n_s16(__a1_526, 0)); | |
| 53828 | return __ret_526; | |
| 55494 | __ai int32x4_t vmovl_high_s16(int16x8_t __p0_618) { | |
| 55495 | int32x4_t __ret_618; | |
| 55496 | int16x4_t __a1_618 = vget_high_s16(__p0_618); | |
| 55497 | __ret_618 = (int32x4_t)(vshll_n_s16(__a1_618, 0)); | |
| 55498 | return __ret_618; | |
| 53829 | 55499 | } |
| 53830 | 55500 | #else |
| 53831 | __ai int32x4_t vmovl_high_s16(int16x8_t __p0_527) { | |
| 53832 | int16x8_t __rev0_527; __rev0_527 = __builtin_shufflevector(__p0_527, __p0_527, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 53833 | int32x4_t __ret_527; | |
| 53834 | int16x4_t __a1_527 = __noswap_vget_high_s16(__rev0_527); | |
| 53835 | __ret_527 = (int32x4_t)(__noswap_vshll_n_s16(__a1_527, 0)); | |
| 53836 | __ret_527 = __builtin_shufflevector(__ret_527, __ret_527, 3, 2, 1, 0); | |
| 53837 | return __ret_527; | |
| 55501 | __ai int32x4_t vmovl_high_s16(int16x8_t __p0_619) { | |
| 55502 | int16x8_t __rev0_619; __rev0_619 = __builtin_shufflevector(__p0_619, __p0_619, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 55503 | int32x4_t __ret_619; | |
| 55504 | int16x4_t __a1_619 = __noswap_vget_high_s16(__rev0_619); | |
| 55505 | __ret_619 = (int32x4_t)(__noswap_vshll_n_s16(__a1_619, 0)); | |
| 55506 | __ret_619 = __builtin_shufflevector(__ret_619, __ret_619, 3, 2, 1, 0); | |
| 55507 | return __ret_619; | |
| 53838 | 55508 | } |
| 53839 | __ai int32x4_t __noswap_vmovl_high_s16(int16x8_t __p0_528) { | |
| 53840 | int32x4_t __ret_528; | |
| 53841 | int16x4_t __a1_528 = __noswap_vget_high_s16(__p0_528); | |
| 53842 | __ret_528 = (int32x4_t)(__noswap_vshll_n_s16(__a1_528, 0)); | |
| 53843 | return __ret_528; | |
| 55509 | __ai int32x4_t __noswap_vmovl_high_s16(int16x8_t __p0_620) { | |
| 55510 | int32x4_t __ret_620; | |
| 55511 | int16x4_t __a1_620 = __noswap_vget_high_s16(__p0_620); | |
| 55512 | __ret_620 = (int32x4_t)(__noswap_vshll_n_s16(__a1_620, 0)); | |
| 55513 | return __ret_620; | |
| 53844 | 55514 | } |
| 53845 | 55515 | #endif |
| 53846 | 55516 | |
| ... | ... | @@ -53968,29 +55638,29 @@ __ai float64x1_t vmul_f64(float64x1_t __p0, float64x1_t __p1) { |
| 53968 | 55638 | __ret = __p0 * __p1; |
| 53969 | 55639 | return __ret; |
| 53970 | 55640 | } |
| 53971 | #define vmuld_lane_f64(__p0_529, __p1_529, __p2_529) __extension__ ({ \ | |
| 53972 | float64_t __s0_529 = __p0_529; \ | |
| 53973 | float64x1_t __s1_529 = __p1_529; \ | |
| 53974 | float64_t __ret_529; \ | |
| 53975 | __ret_529 = __s0_529 * vget_lane_f64(__s1_529, __p2_529); \ | |
| 53976 | __ret_529; \ | |
| 55641 | #define vmuld_lane_f64(__p0_621, __p1_621, __p2_621) __extension__ ({ \ | |
| 55642 | float64_t __s0_621 = __p0_621; \ | |
| 55643 | float64x1_t __s1_621 = __p1_621; \ | |
| 55644 | float64_t __ret_621; \ | |
| 55645 | __ret_621 = __s0_621 * vget_lane_f64(__s1_621, __p2_621); \ | |
| 55646 | __ret_621; \ | |
| 53977 | 55647 | }) |
| 53978 | 55648 | #ifdef __LITTLE_ENDIAN__ |
| 53979 | #define vmuls_lane_f32(__p0_530, __p1_530, __p2_530) __extension__ ({ \ | |
| 53980 | float32_t __s0_530 = __p0_530; \ | |
| 53981 | float32x2_t __s1_530 = __p1_530; \ | |
| 53982 | float32_t __ret_530; \ | |
| 53983 | __ret_530 = __s0_530 * vget_lane_f32(__s1_530, __p2_530); \ | |
| 53984 | __ret_530; \ | |
| 55649 | #define vmuls_lane_f32(__p0_622, __p1_622, __p2_622) __extension__ ({ \ | |
| 55650 | float32_t __s0_622 = __p0_622; \ | |
| 55651 | float32x2_t __s1_622 = __p1_622; \ | |
| 55652 | float32_t __ret_622; \ | |
| 55653 | __ret_622 = __s0_622 * vget_lane_f32(__s1_622, __p2_622); \ | |
| 55654 | __ret_622; \ | |
| 53985 | 55655 | }) |
| 53986 | 55656 | #else |
| 53987 | #define vmuls_lane_f32(__p0_531, __p1_531, __p2_531) __extension__ ({ \ | |
| 53988 | float32_t __s0_531 = __p0_531; \ | |
| 53989 | float32x2_t __s1_531 = __p1_531; \ | |
| 53990 | float32x2_t __rev1_531; __rev1_531 = __builtin_shufflevector(__s1_531, __s1_531, 1, 0); \ | |
| 53991 | float32_t __ret_531; \ | |
| 53992 | __ret_531 = __s0_531 * __noswap_vget_lane_f32(__rev1_531, __p2_531); \ | |
| 53993 | __ret_531; \ | |
| 55657 | #define vmuls_lane_f32(__p0_623, __p1_623, __p2_623) __extension__ ({ \ | |
| 55658 | float32_t __s0_623 = __p0_623; \ | |
| 55659 | float32x2_t __s1_623 = __p1_623; \ | |
| 55660 | float32x2_t __rev1_623; __rev1_623 = __builtin_shufflevector(__s1_623, __s1_623, 1, 0); \ | |
| 55661 | float32_t __ret_623; \ | |
| 55662 | __ret_623 = __s0_623 * __noswap_vget_lane_f32(__rev1_623, __p2_623); \ | |
| 55663 | __ret_623; \ | |
| 53994 | 55664 | }) |
| 53995 | 55665 | #endif |
| 53996 | 55666 | |
| ... | ... | @@ -54002,60 +55672,60 @@ __ai float64x1_t vmul_f64(float64x1_t __p0, float64x1_t __p1) { |
| 54002 | 55672 | __ret; \ |
| 54003 | 55673 | }) |
| 54004 | 55674 | #ifdef __LITTLE_ENDIAN__ |
| 54005 | #define vmulq_lane_f64(__p0_532, __p1_532, __p2_532) __extension__ ({ \ | |
| 54006 | float64x2_t __s0_532 = __p0_532; \ | |
| 54007 | float64x1_t __s1_532 = __p1_532; \ | |
| 54008 | float64x2_t __ret_532; \ | |
| 54009 | __ret_532 = __s0_532 * splatq_lane_f64(__s1_532, __p2_532); \ | |
| 54010 | __ret_532; \ | |
| 55675 | #define vmulq_lane_f64(__p0_624, __p1_624, __p2_624) __extension__ ({ \ | |
| 55676 | float64x2_t __s0_624 = __p0_624; \ | |
| 55677 | float64x1_t __s1_624 = __p1_624; \ | |
| 55678 | float64x2_t __ret_624; \ | |
| 55679 | __ret_624 = __s0_624 * splatq_lane_f64(__s1_624, __p2_624); \ | |
| 55680 | __ret_624; \ | |
| 54011 | 55681 | }) |
| 54012 | 55682 | #else |
| 54013 | #define vmulq_lane_f64(__p0_533, __p1_533, __p2_533) __extension__ ({ \ | |
| 54014 | float64x2_t __s0_533 = __p0_533; \ | |
| 54015 | float64x1_t __s1_533 = __p1_533; \ | |
| 54016 | float64x2_t __rev0_533; __rev0_533 = __builtin_shufflevector(__s0_533, __s0_533, 1, 0); \ | |
| 54017 | float64x2_t __ret_533; \ | |
| 54018 | __ret_533 = __rev0_533 * __noswap_splatq_lane_f64(__s1_533, __p2_533); \ | |
| 54019 | __ret_533 = __builtin_shufflevector(__ret_533, __ret_533, 1, 0); \ | |
| 54020 | __ret_533; \ | |
| 55683 | #define vmulq_lane_f64(__p0_625, __p1_625, __p2_625) __extension__ ({ \ | |
| 55684 | float64x2_t __s0_625 = __p0_625; \ | |
| 55685 | float64x1_t __s1_625 = __p1_625; \ | |
| 55686 | float64x2_t __rev0_625; __rev0_625 = __builtin_shufflevector(__s0_625, __s0_625, 1, 0); \ | |
| 55687 | float64x2_t __ret_625; \ | |
| 55688 | __ret_625 = __rev0_625 * __noswap_splatq_lane_f64(__s1_625, __p2_625); \ | |
| 55689 | __ret_625 = __builtin_shufflevector(__ret_625, __ret_625, 1, 0); \ | |
| 55690 | __ret_625; \ | |
| 54021 | 55691 | }) |
| 54022 | 55692 | #endif |
| 54023 | 55693 | |
| 54024 | 55694 | #ifdef __LITTLE_ENDIAN__ |
| 54025 | #define vmuld_laneq_f64(__p0_534, __p1_534, __p2_534) __extension__ ({ \ | |
| 54026 | float64_t __s0_534 = __p0_534; \ | |
| 54027 | float64x2_t __s1_534 = __p1_534; \ | |
| 54028 | float64_t __ret_534; \ | |
| 54029 | __ret_534 = __s0_534 * vgetq_lane_f64(__s1_534, __p2_534); \ | |
| 54030 | __ret_534; \ | |
| 55695 | #define vmuld_laneq_f64(__p0_626, __p1_626, __p2_626) __extension__ ({ \ | |
| 55696 | float64_t __s0_626 = __p0_626; \ | |
| 55697 | float64x2_t __s1_626 = __p1_626; \ | |
| 55698 | float64_t __ret_626; \ | |
| 55699 | __ret_626 = __s0_626 * vgetq_lane_f64(__s1_626, __p2_626); \ | |
| 55700 | __ret_626; \ | |
| 54031 | 55701 | }) |
| 54032 | 55702 | #else |
| 54033 | #define vmuld_laneq_f64(__p0_535, __p1_535, __p2_535) __extension__ ({ \ | |
| 54034 | float64_t __s0_535 = __p0_535; \ | |
| 54035 | float64x2_t __s1_535 = __p1_535; \ | |
| 54036 | float64x2_t __rev1_535; __rev1_535 = __builtin_shufflevector(__s1_535, __s1_535, 1, 0); \ | |
| 54037 | float64_t __ret_535; \ | |
| 54038 | __ret_535 = __s0_535 * __noswap_vgetq_lane_f64(__rev1_535, __p2_535); \ | |
| 54039 | __ret_535; \ | |
| 55703 | #define vmuld_laneq_f64(__p0_627, __p1_627, __p2_627) __extension__ ({ \ | |
| 55704 | float64_t __s0_627 = __p0_627; \ | |
| 55705 | float64x2_t __s1_627 = __p1_627; \ | |
| 55706 | float64x2_t __rev1_627; __rev1_627 = __builtin_shufflevector(__s1_627, __s1_627, 1, 0); \ | |
| 55707 | float64_t __ret_627; \ | |
| 55708 | __ret_627 = __s0_627 * __noswap_vgetq_lane_f64(__rev1_627, __p2_627); \ | |
| 55709 | __ret_627; \ | |
| 54040 | 55710 | }) |
| 54041 | 55711 | #endif |
| 54042 | 55712 | |
| 54043 | 55713 | #ifdef __LITTLE_ENDIAN__ |
| 54044 | #define vmuls_laneq_f32(__p0_536, __p1_536, __p2_536) __extension__ ({ \ | |
| 54045 | float32_t __s0_536 = __p0_536; \ | |
| 54046 | float32x4_t __s1_536 = __p1_536; \ | |
| 54047 | float32_t __ret_536; \ | |
| 54048 | __ret_536 = __s0_536 * vgetq_lane_f32(__s1_536, __p2_536); \ | |
| 54049 | __ret_536; \ | |
| 55714 | #define vmuls_laneq_f32(__p0_628, __p1_628, __p2_628) __extension__ ({ \ | |
| 55715 | float32_t __s0_628 = __p0_628; \ | |
| 55716 | float32x4_t __s1_628 = __p1_628; \ | |
| 55717 | float32_t __ret_628; \ | |
| 55718 | __ret_628 = __s0_628 * vgetq_lane_f32(__s1_628, __p2_628); \ | |
| 55719 | __ret_628; \ | |
| 54050 | 55720 | }) |
| 54051 | 55721 | #else |
| 54052 | #define vmuls_laneq_f32(__p0_537, __p1_537, __p2_537) __extension__ ({ \ | |
| 54053 | float32_t __s0_537 = __p0_537; \ | |
| 54054 | float32x4_t __s1_537 = __p1_537; \ | |
| 54055 | float32x4_t __rev1_537; __rev1_537 = __builtin_shufflevector(__s1_537, __s1_537, 3, 2, 1, 0); \ | |
| 54056 | float32_t __ret_537; \ | |
| 54057 | __ret_537 = __s0_537 * __noswap_vgetq_lane_f32(__rev1_537, __p2_537); \ | |
| 54058 | __ret_537; \ | |
| 55722 | #define vmuls_laneq_f32(__p0_629, __p1_629, __p2_629) __extension__ ({ \ | |
| 55723 | float32_t __s0_629 = __p0_629; \ | |
| 55724 | float32x4_t __s1_629 = __p1_629; \ | |
| 55725 | float32x4_t __rev1_629; __rev1_629 = __builtin_shufflevector(__s1_629, __s1_629, 3, 2, 1, 0); \ | |
| 55726 | float32_t __ret_629; \ | |
| 55727 | __ret_629 = __s0_629 * __noswap_vgetq_lane_f32(__rev1_629, __p2_629); \ | |
| 55728 | __ret_629; \ | |
| 54059 | 55729 | }) |
| 54060 | 55730 | #endif |
| 54061 | 55731 | |
| ... | ... | @@ -54079,233 +55749,233 @@ __ai float64x1_t vmul_f64(float64x1_t __p0, float64x1_t __p1) { |
| 54079 | 55749 | #endif |
| 54080 | 55750 | |
| 54081 | 55751 | #ifdef __LITTLE_ENDIAN__ |
| 54082 | #define vmulq_laneq_u32(__p0_538, __p1_538, __p2_538) __extension__ ({ \ | |
| 54083 | uint32x4_t __s0_538 = __p0_538; \ | |
| 54084 | uint32x4_t __s1_538 = __p1_538; \ | |
| 54085 | uint32x4_t __ret_538; \ | |
| 54086 | __ret_538 = __s0_538 * splatq_laneq_u32(__s1_538, __p2_538); \ | |
| 54087 | __ret_538; \ | |
| 55752 | #define vmulq_laneq_u32(__p0_630, __p1_630, __p2_630) __extension__ ({ \ | |
| 55753 | uint32x4_t __s0_630 = __p0_630; \ | |
| 55754 | uint32x4_t __s1_630 = __p1_630; \ | |
| 55755 | uint32x4_t __ret_630; \ | |
| 55756 | __ret_630 = __s0_630 * splatq_laneq_u32(__s1_630, __p2_630); \ | |
| 55757 | __ret_630; \ | |
| 54088 | 55758 | }) |
| 54089 | 55759 | #else |
| 54090 | #define vmulq_laneq_u32(__p0_539, __p1_539, __p2_539) __extension__ ({ \ | |
| 54091 | uint32x4_t __s0_539 = __p0_539; \ | |
| 54092 | uint32x4_t __s1_539 = __p1_539; \ | |
| 54093 | uint32x4_t __rev0_539; __rev0_539 = __builtin_shufflevector(__s0_539, __s0_539, 3, 2, 1, 0); \ | |
| 54094 | uint32x4_t __rev1_539; __rev1_539 = __builtin_shufflevector(__s1_539, __s1_539, 3, 2, 1, 0); \ | |
| 54095 | uint32x4_t __ret_539; \ | |
| 54096 | __ret_539 = __rev0_539 * __noswap_splatq_laneq_u32(__rev1_539, __p2_539); \ | |
| 54097 | __ret_539 = __builtin_shufflevector(__ret_539, __ret_539, 3, 2, 1, 0); \ | |
| 54098 | __ret_539; \ | |
| 55760 | #define vmulq_laneq_u32(__p0_631, __p1_631, __p2_631) __extension__ ({ \ | |
| 55761 | uint32x4_t __s0_631 = __p0_631; \ | |
| 55762 | uint32x4_t __s1_631 = __p1_631; \ | |
| 55763 | uint32x4_t __rev0_631; __rev0_631 = __builtin_shufflevector(__s0_631, __s0_631, 3, 2, 1, 0); \ | |
| 55764 | uint32x4_t __rev1_631; __rev1_631 = __builtin_shufflevector(__s1_631, __s1_631, 3, 2, 1, 0); \ | |
| 55765 | uint32x4_t __ret_631; \ | |
| 55766 | __ret_631 = __rev0_631 * __noswap_splatq_laneq_u32(__rev1_631, __p2_631); \ | |
| 55767 | __ret_631 = __builtin_shufflevector(__ret_631, __ret_631, 3, 2, 1, 0); \ | |
| 55768 | __ret_631; \ | |
| 54099 | 55769 | }) |
| 54100 | 55770 | #endif |
| 54101 | 55771 | |
| 54102 | 55772 | #ifdef __LITTLE_ENDIAN__ |
| 54103 | #define vmulq_laneq_u16(__p0_540, __p1_540, __p2_540) __extension__ ({ \ | |
| 54104 | uint16x8_t __s0_540 = __p0_540; \ | |
| 54105 | uint16x8_t __s1_540 = __p1_540; \ | |
| 54106 | uint16x8_t __ret_540; \ | |
| 54107 | __ret_540 = __s0_540 * splatq_laneq_u16(__s1_540, __p2_540); \ | |
| 54108 | __ret_540; \ | |
| 55773 | #define vmulq_laneq_u16(__p0_632, __p1_632, __p2_632) __extension__ ({ \ | |
| 55774 | uint16x8_t __s0_632 = __p0_632; \ | |
| 55775 | uint16x8_t __s1_632 = __p1_632; \ | |
| 55776 | uint16x8_t __ret_632; \ | |
| 55777 | __ret_632 = __s0_632 * splatq_laneq_u16(__s1_632, __p2_632); \ | |
| 55778 | __ret_632; \ | |
| 54109 | 55779 | }) |
| 54110 | 55780 | #else |
| 54111 | #define vmulq_laneq_u16(__p0_541, __p1_541, __p2_541) __extension__ ({ \ | |
| 54112 | uint16x8_t __s0_541 = __p0_541; \ | |
| 54113 | uint16x8_t __s1_541 = __p1_541; \ | |
| 54114 | uint16x8_t __rev0_541; __rev0_541 = __builtin_shufflevector(__s0_541, __s0_541, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54115 | uint16x8_t __rev1_541; __rev1_541 = __builtin_shufflevector(__s1_541, __s1_541, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54116 | uint16x8_t __ret_541; \ | |
| 54117 | __ret_541 = __rev0_541 * __noswap_splatq_laneq_u16(__rev1_541, __p2_541); \ | |
| 54118 | __ret_541 = __builtin_shufflevector(__ret_541, __ret_541, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54119 | __ret_541; \ | |
| 55781 | #define vmulq_laneq_u16(__p0_633, __p1_633, __p2_633) __extension__ ({ \ | |
| 55782 | uint16x8_t __s0_633 = __p0_633; \ | |
| 55783 | uint16x8_t __s1_633 = __p1_633; \ | |
| 55784 | uint16x8_t __rev0_633; __rev0_633 = __builtin_shufflevector(__s0_633, __s0_633, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55785 | uint16x8_t __rev1_633; __rev1_633 = __builtin_shufflevector(__s1_633, __s1_633, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55786 | uint16x8_t __ret_633; \ | |
| 55787 | __ret_633 = __rev0_633 * __noswap_splatq_laneq_u16(__rev1_633, __p2_633); \ | |
| 55788 | __ret_633 = __builtin_shufflevector(__ret_633, __ret_633, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55789 | __ret_633; \ | |
| 54120 | 55790 | }) |
| 54121 | 55791 | #endif |
| 54122 | 55792 | |
| 54123 | 55793 | #ifdef __LITTLE_ENDIAN__ |
| 54124 | #define vmulq_laneq_f64(__p0_542, __p1_542, __p2_542) __extension__ ({ \ | |
| 54125 | float64x2_t __s0_542 = __p0_542; \ | |
| 54126 | float64x2_t __s1_542 = __p1_542; \ | |
| 54127 | float64x2_t __ret_542; \ | |
| 54128 | __ret_542 = __s0_542 * splatq_laneq_f64(__s1_542, __p2_542); \ | |
| 54129 | __ret_542; \ | |
| 55794 | #define vmulq_laneq_f64(__p0_634, __p1_634, __p2_634) __extension__ ({ \ | |
| 55795 | float64x2_t __s0_634 = __p0_634; \ | |
| 55796 | float64x2_t __s1_634 = __p1_634; \ | |
| 55797 | float64x2_t __ret_634; \ | |
| 55798 | __ret_634 = __s0_634 * splatq_laneq_f64(__s1_634, __p2_634); \ | |
| 55799 | __ret_634; \ | |
| 54130 | 55800 | }) |
| 54131 | 55801 | #else |
| 54132 | #define vmulq_laneq_f64(__p0_543, __p1_543, __p2_543) __extension__ ({ \ | |
| 54133 | float64x2_t __s0_543 = __p0_543; \ | |
| 54134 | float64x2_t __s1_543 = __p1_543; \ | |
| 54135 | float64x2_t __rev0_543; __rev0_543 = __builtin_shufflevector(__s0_543, __s0_543, 1, 0); \ | |
| 54136 | float64x2_t __rev1_543; __rev1_543 = __builtin_shufflevector(__s1_543, __s1_543, 1, 0); \ | |
| 54137 | float64x2_t __ret_543; \ | |
| 54138 | __ret_543 = __rev0_543 * __noswap_splatq_laneq_f64(__rev1_543, __p2_543); \ | |
| 54139 | __ret_543 = __builtin_shufflevector(__ret_543, __ret_543, 1, 0); \ | |
| 54140 | __ret_543; \ | |
| 55802 | #define vmulq_laneq_f64(__p0_635, __p1_635, __p2_635) __extension__ ({ \ | |
| 55803 | float64x2_t __s0_635 = __p0_635; \ | |
| 55804 | float64x2_t __s1_635 = __p1_635; \ | |
| 55805 | float64x2_t __rev0_635; __rev0_635 = __builtin_shufflevector(__s0_635, __s0_635, 1, 0); \ | |
| 55806 | float64x2_t __rev1_635; __rev1_635 = __builtin_shufflevector(__s1_635, __s1_635, 1, 0); \ | |
| 55807 | float64x2_t __ret_635; \ | |
| 55808 | __ret_635 = __rev0_635 * __noswap_splatq_laneq_f64(__rev1_635, __p2_635); \ | |
| 55809 | __ret_635 = __builtin_shufflevector(__ret_635, __ret_635, 1, 0); \ | |
| 55810 | __ret_635; \ | |
| 54141 | 55811 | }) |
| 54142 | 55812 | #endif |
| 54143 | 55813 | |
| 54144 | 55814 | #ifdef __LITTLE_ENDIAN__ |
| 54145 | #define vmulq_laneq_f32(__p0_544, __p1_544, __p2_544) __extension__ ({ \ | |
| 54146 | float32x4_t __s0_544 = __p0_544; \ | |
| 54147 | float32x4_t __s1_544 = __p1_544; \ | |
| 54148 | float32x4_t __ret_544; \ | |
| 54149 | __ret_544 = __s0_544 * splatq_laneq_f32(__s1_544, __p2_544); \ | |
| 54150 | __ret_544; \ | |
| 55815 | #define vmulq_laneq_f32(__p0_636, __p1_636, __p2_636) __extension__ ({ \ | |
| 55816 | float32x4_t __s0_636 = __p0_636; \ | |
| 55817 | float32x4_t __s1_636 = __p1_636; \ | |
| 55818 | float32x4_t __ret_636; \ | |
| 55819 | __ret_636 = __s0_636 * splatq_laneq_f32(__s1_636, __p2_636); \ | |
| 55820 | __ret_636; \ | |
| 54151 | 55821 | }) |
| 54152 | 55822 | #else |
| 54153 | #define vmulq_laneq_f32(__p0_545, __p1_545, __p2_545) __extension__ ({ \ | |
| 54154 | float32x4_t __s0_545 = __p0_545; \ | |
| 54155 | float32x4_t __s1_545 = __p1_545; \ | |
| 54156 | float32x4_t __rev0_545; __rev0_545 = __builtin_shufflevector(__s0_545, __s0_545, 3, 2, 1, 0); \ | |
| 54157 | float32x4_t __rev1_545; __rev1_545 = __builtin_shufflevector(__s1_545, __s1_545, 3, 2, 1, 0); \ | |
| 54158 | float32x4_t __ret_545; \ | |
| 54159 | __ret_545 = __rev0_545 * __noswap_splatq_laneq_f32(__rev1_545, __p2_545); \ | |
| 54160 | __ret_545 = __builtin_shufflevector(__ret_545, __ret_545, 3, 2, 1, 0); \ | |
| 54161 | __ret_545; \ | |
| 55823 | #define vmulq_laneq_f32(__p0_637, __p1_637, __p2_637) __extension__ ({ \ | |
| 55824 | float32x4_t __s0_637 = __p0_637; \ | |
| 55825 | float32x4_t __s1_637 = __p1_637; \ | |
| 55826 | float32x4_t __rev0_637; __rev0_637 = __builtin_shufflevector(__s0_637, __s0_637, 3, 2, 1, 0); \ | |
| 55827 | float32x4_t __rev1_637; __rev1_637 = __builtin_shufflevector(__s1_637, __s1_637, 3, 2, 1, 0); \ | |
| 55828 | float32x4_t __ret_637; \ | |
| 55829 | __ret_637 = __rev0_637 * __noswap_splatq_laneq_f32(__rev1_637, __p2_637); \ | |
| 55830 | __ret_637 = __builtin_shufflevector(__ret_637, __ret_637, 3, 2, 1, 0); \ | |
| 55831 | __ret_637; \ | |
| 54162 | 55832 | }) |
| 54163 | 55833 | #endif |
| 54164 | 55834 | |
| 54165 | 55835 | #ifdef __LITTLE_ENDIAN__ |
| 54166 | #define vmulq_laneq_s32(__p0_546, __p1_546, __p2_546) __extension__ ({ \ | |
| 54167 | int32x4_t __s0_546 = __p0_546; \ | |
| 54168 | int32x4_t __s1_546 = __p1_546; \ | |
| 54169 | int32x4_t __ret_546; \ | |
| 54170 | __ret_546 = __s0_546 * splatq_laneq_s32(__s1_546, __p2_546); \ | |
| 54171 | __ret_546; \ | |
| 55836 | #define vmulq_laneq_s32(__p0_638, __p1_638, __p2_638) __extension__ ({ \ | |
| 55837 | int32x4_t __s0_638 = __p0_638; \ | |
| 55838 | int32x4_t __s1_638 = __p1_638; \ | |
| 55839 | int32x4_t __ret_638; \ | |
| 55840 | __ret_638 = __s0_638 * splatq_laneq_s32(__s1_638, __p2_638); \ | |
| 55841 | __ret_638; \ | |
| 54172 | 55842 | }) |
| 54173 | 55843 | #else |
| 54174 | #define vmulq_laneq_s32(__p0_547, __p1_547, __p2_547) __extension__ ({ \ | |
| 54175 | int32x4_t __s0_547 = __p0_547; \ | |
| 54176 | int32x4_t __s1_547 = __p1_547; \ | |
| 54177 | int32x4_t __rev0_547; __rev0_547 = __builtin_shufflevector(__s0_547, __s0_547, 3, 2, 1, 0); \ | |
| 54178 | int32x4_t __rev1_547; __rev1_547 = __builtin_shufflevector(__s1_547, __s1_547, 3, 2, 1, 0); \ | |
| 54179 | int32x4_t __ret_547; \ | |
| 54180 | __ret_547 = __rev0_547 * __noswap_splatq_laneq_s32(__rev1_547, __p2_547); \ | |
| 54181 | __ret_547 = __builtin_shufflevector(__ret_547, __ret_547, 3, 2, 1, 0); \ | |
| 54182 | __ret_547; \ | |
| 55844 | #define vmulq_laneq_s32(__p0_639, __p1_639, __p2_639) __extension__ ({ \ | |
| 55845 | int32x4_t __s0_639 = __p0_639; \ | |
| 55846 | int32x4_t __s1_639 = __p1_639; \ | |
| 55847 | int32x4_t __rev0_639; __rev0_639 = __builtin_shufflevector(__s0_639, __s0_639, 3, 2, 1, 0); \ | |
| 55848 | int32x4_t __rev1_639; __rev1_639 = __builtin_shufflevector(__s1_639, __s1_639, 3, 2, 1, 0); \ | |
| 55849 | int32x4_t __ret_639; \ | |
| 55850 | __ret_639 = __rev0_639 * __noswap_splatq_laneq_s32(__rev1_639, __p2_639); \ | |
| 55851 | __ret_639 = __builtin_shufflevector(__ret_639, __ret_639, 3, 2, 1, 0); \ | |
| 55852 | __ret_639; \ | |
| 54183 | 55853 | }) |
| 54184 | 55854 | #endif |
| 54185 | 55855 | |
| 54186 | 55856 | #ifdef __LITTLE_ENDIAN__ |
| 54187 | #define vmulq_laneq_s16(__p0_548, __p1_548, __p2_548) __extension__ ({ \ | |
| 54188 | int16x8_t __s0_548 = __p0_548; \ | |
| 54189 | int16x8_t __s1_548 = __p1_548; \ | |
| 54190 | int16x8_t __ret_548; \ | |
| 54191 | __ret_548 = __s0_548 * splatq_laneq_s16(__s1_548, __p2_548); \ | |
| 54192 | __ret_548; \ | |
| 55857 | #define vmulq_laneq_s16(__p0_640, __p1_640, __p2_640) __extension__ ({ \ | |
| 55858 | int16x8_t __s0_640 = __p0_640; \ | |
| 55859 | int16x8_t __s1_640 = __p1_640; \ | |
| 55860 | int16x8_t __ret_640; \ | |
| 55861 | __ret_640 = __s0_640 * splatq_laneq_s16(__s1_640, __p2_640); \ | |
| 55862 | __ret_640; \ | |
| 54193 | 55863 | }) |
| 54194 | 55864 | #else |
| 54195 | #define vmulq_laneq_s16(__p0_549, __p1_549, __p2_549) __extension__ ({ \ | |
| 54196 | int16x8_t __s0_549 = __p0_549; \ | |
| 54197 | int16x8_t __s1_549 = __p1_549; \ | |
| 54198 | int16x8_t __rev0_549; __rev0_549 = __builtin_shufflevector(__s0_549, __s0_549, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54199 | int16x8_t __rev1_549; __rev1_549 = __builtin_shufflevector(__s1_549, __s1_549, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54200 | int16x8_t __ret_549; \ | |
| 54201 | __ret_549 = __rev0_549 * __noswap_splatq_laneq_s16(__rev1_549, __p2_549); \ | |
| 54202 | __ret_549 = __builtin_shufflevector(__ret_549, __ret_549, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54203 | __ret_549; \ | |
| 55865 | #define vmulq_laneq_s16(__p0_641, __p1_641, __p2_641) __extension__ ({ \ | |
| 55866 | int16x8_t __s0_641 = __p0_641; \ | |
| 55867 | int16x8_t __s1_641 = __p1_641; \ | |
| 55868 | int16x8_t __rev0_641; __rev0_641 = __builtin_shufflevector(__s0_641, __s0_641, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55869 | int16x8_t __rev1_641; __rev1_641 = __builtin_shufflevector(__s1_641, __s1_641, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55870 | int16x8_t __ret_641; \ | |
| 55871 | __ret_641 = __rev0_641 * __noswap_splatq_laneq_s16(__rev1_641, __p2_641); \ | |
| 55872 | __ret_641 = __builtin_shufflevector(__ret_641, __ret_641, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55873 | __ret_641; \ | |
| 54204 | 55874 | }) |
| 54205 | 55875 | #endif |
| 54206 | 55876 | |
| 54207 | 55877 | #ifdef __LITTLE_ENDIAN__ |
| 54208 | #define vmul_laneq_u32(__p0_550, __p1_550, __p2_550) __extension__ ({ \ | |
| 54209 | uint32x2_t __s0_550 = __p0_550; \ | |
| 54210 | uint32x4_t __s1_550 = __p1_550; \ | |
| 54211 | uint32x2_t __ret_550; \ | |
| 54212 | __ret_550 = __s0_550 * splat_laneq_u32(__s1_550, __p2_550); \ | |
| 54213 | __ret_550; \ | |
| 55878 | #define vmul_laneq_u32(__p0_642, __p1_642, __p2_642) __extension__ ({ \ | |
| 55879 | uint32x2_t __s0_642 = __p0_642; \ | |
| 55880 | uint32x4_t __s1_642 = __p1_642; \ | |
| 55881 | uint32x2_t __ret_642; \ | |
| 55882 | __ret_642 = __s0_642 * splat_laneq_u32(__s1_642, __p2_642); \ | |
| 55883 | __ret_642; \ | |
| 54214 | 55884 | }) |
| 54215 | 55885 | #else |
| 54216 | #define vmul_laneq_u32(__p0_551, __p1_551, __p2_551) __extension__ ({ \ | |
| 54217 | uint32x2_t __s0_551 = __p0_551; \ | |
| 54218 | uint32x4_t __s1_551 = __p1_551; \ | |
| 54219 | uint32x2_t __rev0_551; __rev0_551 = __builtin_shufflevector(__s0_551, __s0_551, 1, 0); \ | |
| 54220 | uint32x4_t __rev1_551; __rev1_551 = __builtin_shufflevector(__s1_551, __s1_551, 3, 2, 1, 0); \ | |
| 54221 | uint32x2_t __ret_551; \ | |
| 54222 | __ret_551 = __rev0_551 * __noswap_splat_laneq_u32(__rev1_551, __p2_551); \ | |
| 54223 | __ret_551 = __builtin_shufflevector(__ret_551, __ret_551, 1, 0); \ | |
| 54224 | __ret_551; \ | |
| 55886 | #define vmul_laneq_u32(__p0_643, __p1_643, __p2_643) __extension__ ({ \ | |
| 55887 | uint32x2_t __s0_643 = __p0_643; \ | |
| 55888 | uint32x4_t __s1_643 = __p1_643; \ | |
| 55889 | uint32x2_t __rev0_643; __rev0_643 = __builtin_shufflevector(__s0_643, __s0_643, 1, 0); \ | |
| 55890 | uint32x4_t __rev1_643; __rev1_643 = __builtin_shufflevector(__s1_643, __s1_643, 3, 2, 1, 0); \ | |
| 55891 | uint32x2_t __ret_643; \ | |
| 55892 | __ret_643 = __rev0_643 * __noswap_splat_laneq_u32(__rev1_643, __p2_643); \ | |
| 55893 | __ret_643 = __builtin_shufflevector(__ret_643, __ret_643, 1, 0); \ | |
| 55894 | __ret_643; \ | |
| 54225 | 55895 | }) |
| 54226 | 55896 | #endif |
| 54227 | 55897 | |
| 54228 | 55898 | #ifdef __LITTLE_ENDIAN__ |
| 54229 | #define vmul_laneq_u16(__p0_552, __p1_552, __p2_552) __extension__ ({ \ | |
| 54230 | uint16x4_t __s0_552 = __p0_552; \ | |
| 54231 | uint16x8_t __s1_552 = __p1_552; \ | |
| 54232 | uint16x4_t __ret_552; \ | |
| 54233 | __ret_552 = __s0_552 * splat_laneq_u16(__s1_552, __p2_552); \ | |
| 54234 | __ret_552; \ | |
| 55899 | #define vmul_laneq_u16(__p0_644, __p1_644, __p2_644) __extension__ ({ \ | |
| 55900 | uint16x4_t __s0_644 = __p0_644; \ | |
| 55901 | uint16x8_t __s1_644 = __p1_644; \ | |
| 55902 | uint16x4_t __ret_644; \ | |
| 55903 | __ret_644 = __s0_644 * splat_laneq_u16(__s1_644, __p2_644); \ | |
| 55904 | __ret_644; \ | |
| 54235 | 55905 | }) |
| 54236 | 55906 | #else |
| 54237 | #define vmul_laneq_u16(__p0_553, __p1_553, __p2_553) __extension__ ({ \ | |
| 54238 | uint16x4_t __s0_553 = __p0_553; \ | |
| 54239 | uint16x8_t __s1_553 = __p1_553; \ | |
| 54240 | uint16x4_t __rev0_553; __rev0_553 = __builtin_shufflevector(__s0_553, __s0_553, 3, 2, 1, 0); \ | |
| 54241 | uint16x8_t __rev1_553; __rev1_553 = __builtin_shufflevector(__s1_553, __s1_553, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54242 | uint16x4_t __ret_553; \ | |
| 54243 | __ret_553 = __rev0_553 * __noswap_splat_laneq_u16(__rev1_553, __p2_553); \ | |
| 54244 | __ret_553 = __builtin_shufflevector(__ret_553, __ret_553, 3, 2, 1, 0); \ | |
| 54245 | __ret_553; \ | |
| 55907 | #define vmul_laneq_u16(__p0_645, __p1_645, __p2_645) __extension__ ({ \ | |
| 55908 | uint16x4_t __s0_645 = __p0_645; \ | |
| 55909 | uint16x8_t __s1_645 = __p1_645; \ | |
| 55910 | uint16x4_t __rev0_645; __rev0_645 = __builtin_shufflevector(__s0_645, __s0_645, 3, 2, 1, 0); \ | |
| 55911 | uint16x8_t __rev1_645; __rev1_645 = __builtin_shufflevector(__s1_645, __s1_645, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55912 | uint16x4_t __ret_645; \ | |
| 55913 | __ret_645 = __rev0_645 * __noswap_splat_laneq_u16(__rev1_645, __p2_645); \ | |
| 55914 | __ret_645 = __builtin_shufflevector(__ret_645, __ret_645, 3, 2, 1, 0); \ | |
| 55915 | __ret_645; \ | |
| 54246 | 55916 | }) |
| 54247 | 55917 | #endif |
| 54248 | 55918 | |
| 54249 | 55919 | #ifdef __LITTLE_ENDIAN__ |
| 54250 | #define vmul_laneq_f32(__p0_554, __p1_554, __p2_554) __extension__ ({ \ | |
| 54251 | float32x2_t __s0_554 = __p0_554; \ | |
| 54252 | float32x4_t __s1_554 = __p1_554; \ | |
| 54253 | float32x2_t __ret_554; \ | |
| 54254 | __ret_554 = __s0_554 * splat_laneq_f32(__s1_554, __p2_554); \ | |
| 54255 | __ret_554; \ | |
| 55920 | #define vmul_laneq_f32(__p0_646, __p1_646, __p2_646) __extension__ ({ \ | |
| 55921 | float32x2_t __s0_646 = __p0_646; \ | |
| 55922 | float32x4_t __s1_646 = __p1_646; \ | |
| 55923 | float32x2_t __ret_646; \ | |
| 55924 | __ret_646 = __s0_646 * splat_laneq_f32(__s1_646, __p2_646); \ | |
| 55925 | __ret_646; \ | |
| 54256 | 55926 | }) |
| 54257 | 55927 | #else |
| 54258 | #define vmul_laneq_f32(__p0_555, __p1_555, __p2_555) __extension__ ({ \ | |
| 54259 | float32x2_t __s0_555 = __p0_555; \ | |
| 54260 | float32x4_t __s1_555 = __p1_555; \ | |
| 54261 | float32x2_t __rev0_555; __rev0_555 = __builtin_shufflevector(__s0_555, __s0_555, 1, 0); \ | |
| 54262 | float32x4_t __rev1_555; __rev1_555 = __builtin_shufflevector(__s1_555, __s1_555, 3, 2, 1, 0); \ | |
| 54263 | float32x2_t __ret_555; \ | |
| 54264 | __ret_555 = __rev0_555 * __noswap_splat_laneq_f32(__rev1_555, __p2_555); \ | |
| 54265 | __ret_555 = __builtin_shufflevector(__ret_555, __ret_555, 1, 0); \ | |
| 54266 | __ret_555; \ | |
| 55928 | #define vmul_laneq_f32(__p0_647, __p1_647, __p2_647) __extension__ ({ \ | |
| 55929 | float32x2_t __s0_647 = __p0_647; \ | |
| 55930 | float32x4_t __s1_647 = __p1_647; \ | |
| 55931 | float32x2_t __rev0_647; __rev0_647 = __builtin_shufflevector(__s0_647, __s0_647, 1, 0); \ | |
| 55932 | float32x4_t __rev1_647; __rev1_647 = __builtin_shufflevector(__s1_647, __s1_647, 3, 2, 1, 0); \ | |
| 55933 | float32x2_t __ret_647; \ | |
| 55934 | __ret_647 = __rev0_647 * __noswap_splat_laneq_f32(__rev1_647, __p2_647); \ | |
| 55935 | __ret_647 = __builtin_shufflevector(__ret_647, __ret_647, 1, 0); \ | |
| 55936 | __ret_647; \ | |
| 54267 | 55937 | }) |
| 54268 | 55938 | #endif |
| 54269 | 55939 | |
| 54270 | 55940 | #ifdef __LITTLE_ENDIAN__ |
| 54271 | #define vmul_laneq_s32(__p0_556, __p1_556, __p2_556) __extension__ ({ \ | |
| 54272 | int32x2_t __s0_556 = __p0_556; \ | |
| 54273 | int32x4_t __s1_556 = __p1_556; \ | |
| 54274 | int32x2_t __ret_556; \ | |
| 54275 | __ret_556 = __s0_556 * splat_laneq_s32(__s1_556, __p2_556); \ | |
| 54276 | __ret_556; \ | |
| 55941 | #define vmul_laneq_s32(__p0_648, __p1_648, __p2_648) __extension__ ({ \ | |
| 55942 | int32x2_t __s0_648 = __p0_648; \ | |
| 55943 | int32x4_t __s1_648 = __p1_648; \ | |
| 55944 | int32x2_t __ret_648; \ | |
| 55945 | __ret_648 = __s0_648 * splat_laneq_s32(__s1_648, __p2_648); \ | |
| 55946 | __ret_648; \ | |
| 54277 | 55947 | }) |
| 54278 | 55948 | #else |
| 54279 | #define vmul_laneq_s32(__p0_557, __p1_557, __p2_557) __extension__ ({ \ | |
| 54280 | int32x2_t __s0_557 = __p0_557; \ | |
| 54281 | int32x4_t __s1_557 = __p1_557; \ | |
| 54282 | int32x2_t __rev0_557; __rev0_557 = __builtin_shufflevector(__s0_557, __s0_557, 1, 0); \ | |
| 54283 | int32x4_t __rev1_557; __rev1_557 = __builtin_shufflevector(__s1_557, __s1_557, 3, 2, 1, 0); \ | |
| 54284 | int32x2_t __ret_557; \ | |
| 54285 | __ret_557 = __rev0_557 * __noswap_splat_laneq_s32(__rev1_557, __p2_557); \ | |
| 54286 | __ret_557 = __builtin_shufflevector(__ret_557, __ret_557, 1, 0); \ | |
| 54287 | __ret_557; \ | |
| 55949 | #define vmul_laneq_s32(__p0_649, __p1_649, __p2_649) __extension__ ({ \ | |
| 55950 | int32x2_t __s0_649 = __p0_649; \ | |
| 55951 | int32x4_t __s1_649 = __p1_649; \ | |
| 55952 | int32x2_t __rev0_649; __rev0_649 = __builtin_shufflevector(__s0_649, __s0_649, 1, 0); \ | |
| 55953 | int32x4_t __rev1_649; __rev1_649 = __builtin_shufflevector(__s1_649, __s1_649, 3, 2, 1, 0); \ | |
| 55954 | int32x2_t __ret_649; \ | |
| 55955 | __ret_649 = __rev0_649 * __noswap_splat_laneq_s32(__rev1_649, __p2_649); \ | |
| 55956 | __ret_649 = __builtin_shufflevector(__ret_649, __ret_649, 1, 0); \ | |
| 55957 | __ret_649; \ | |
| 54288 | 55958 | }) |
| 54289 | 55959 | #endif |
| 54290 | 55960 | |
| 54291 | 55961 | #ifdef __LITTLE_ENDIAN__ |
| 54292 | #define vmul_laneq_s16(__p0_558, __p1_558, __p2_558) __extension__ ({ \ | |
| 54293 | int16x4_t __s0_558 = __p0_558; \ | |
| 54294 | int16x8_t __s1_558 = __p1_558; \ | |
| 54295 | int16x4_t __ret_558; \ | |
| 54296 | __ret_558 = __s0_558 * splat_laneq_s16(__s1_558, __p2_558); \ | |
| 54297 | __ret_558; \ | |
| 55962 | #define vmul_laneq_s16(__p0_650, __p1_650, __p2_650) __extension__ ({ \ | |
| 55963 | int16x4_t __s0_650 = __p0_650; \ | |
| 55964 | int16x8_t __s1_650 = __p1_650; \ | |
| 55965 | int16x4_t __ret_650; \ | |
| 55966 | __ret_650 = __s0_650 * splat_laneq_s16(__s1_650, __p2_650); \ | |
| 55967 | __ret_650; \ | |
| 54298 | 55968 | }) |
| 54299 | 55969 | #else |
| 54300 | #define vmul_laneq_s16(__p0_559, __p1_559, __p2_559) __extension__ ({ \ | |
| 54301 | int16x4_t __s0_559 = __p0_559; \ | |
| 54302 | int16x8_t __s1_559 = __p1_559; \ | |
| 54303 | int16x4_t __rev0_559; __rev0_559 = __builtin_shufflevector(__s0_559, __s0_559, 3, 2, 1, 0); \ | |
| 54304 | int16x8_t __rev1_559; __rev1_559 = __builtin_shufflevector(__s1_559, __s1_559, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54305 | int16x4_t __ret_559; \ | |
| 54306 | __ret_559 = __rev0_559 * __noswap_splat_laneq_s16(__rev1_559, __p2_559); \ | |
| 54307 | __ret_559 = __builtin_shufflevector(__ret_559, __ret_559, 3, 2, 1, 0); \ | |
| 54308 | __ret_559; \ | |
| 55970 | #define vmul_laneq_s16(__p0_651, __p1_651, __p2_651) __extension__ ({ \ | |
| 55971 | int16x4_t __s0_651 = __p0_651; \ | |
| 55972 | int16x8_t __s1_651 = __p1_651; \ | |
| 55973 | int16x4_t __rev0_651; __rev0_651 = __builtin_shufflevector(__s0_651, __s0_651, 3, 2, 1, 0); \ | |
| 55974 | int16x8_t __rev1_651; __rev1_651 = __builtin_shufflevector(__s1_651, __s1_651, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55975 | int16x4_t __ret_651; \ | |
| 55976 | __ret_651 = __rev0_651 * __noswap_splat_laneq_s16(__rev1_651, __p2_651); \ | |
| 55977 | __ret_651 = __builtin_shufflevector(__ret_651, __ret_651, 3, 2, 1, 0); \ | |
| 55978 | __ret_651; \ | |
| 54309 | 55979 | }) |
| 54310 | 55980 | #endif |
| 54311 | 55981 | |
| ... | ... | @@ -54471,170 +56141,170 @@ __ai poly128_t vmull_high_p64(poly64x2_t __p0, poly64x2_t __p1) { |
| 54471 | 56141 | #endif |
| 54472 | 56142 | |
| 54473 | 56143 | #ifdef __LITTLE_ENDIAN__ |
| 54474 | #define vmull_high_lane_u32(__p0_560, __p1_560, __p2_560) __extension__ ({ \ | |
| 54475 | uint32x4_t __s0_560 = __p0_560; \ | |
| 54476 | uint32x2_t __s1_560 = __p1_560; \ | |
| 54477 | uint64x2_t __ret_560; \ | |
| 54478 | __ret_560 = vmull_u32(vget_high_u32(__s0_560), splat_lane_u32(__s1_560, __p2_560)); \ | |
| 54479 | __ret_560; \ | |
| 56144 | #define vmull_high_lane_u32(__p0_652, __p1_652, __p2_652) __extension__ ({ \ | |
| 56145 | uint32x4_t __s0_652 = __p0_652; \ | |
| 56146 | uint32x2_t __s1_652 = __p1_652; \ | |
| 56147 | uint64x2_t __ret_652; \ | |
| 56148 | __ret_652 = vmull_u32(vget_high_u32(__s0_652), splat_lane_u32(__s1_652, __p2_652)); \ | |
| 56149 | __ret_652; \ | |
| 54480 | 56150 | }) |
| 54481 | 56151 | #else |
| 54482 | #define vmull_high_lane_u32(__p0_561, __p1_561, __p2_561) __extension__ ({ \ | |
| 54483 | uint32x4_t __s0_561 = __p0_561; \ | |
| 54484 | uint32x2_t __s1_561 = __p1_561; \ | |
| 54485 | uint32x4_t __rev0_561; __rev0_561 = __builtin_shufflevector(__s0_561, __s0_561, 3, 2, 1, 0); \ | |
| 54486 | uint32x2_t __rev1_561; __rev1_561 = __builtin_shufflevector(__s1_561, __s1_561, 1, 0); \ | |
| 54487 | uint64x2_t __ret_561; \ | |
| 54488 | __ret_561 = __noswap_vmull_u32(__noswap_vget_high_u32(__rev0_561), __noswap_splat_lane_u32(__rev1_561, __p2_561)); \ | |
| 54489 | __ret_561 = __builtin_shufflevector(__ret_561, __ret_561, 1, 0); \ | |
| 54490 | __ret_561; \ | |
| 56152 | #define vmull_high_lane_u32(__p0_653, __p1_653, __p2_653) __extension__ ({ \ | |
| 56153 | uint32x4_t __s0_653 = __p0_653; \ | |
| 56154 | uint32x2_t __s1_653 = __p1_653; \ | |
| 56155 | uint32x4_t __rev0_653; __rev0_653 = __builtin_shufflevector(__s0_653, __s0_653, 3, 2, 1, 0); \ | |
| 56156 | uint32x2_t __rev1_653; __rev1_653 = __builtin_shufflevector(__s1_653, __s1_653, 1, 0); \ | |
| 56157 | uint64x2_t __ret_653; \ | |
| 56158 | __ret_653 = __noswap_vmull_u32(__noswap_vget_high_u32(__rev0_653), __noswap_splat_lane_u32(__rev1_653, __p2_653)); \ | |
| 56159 | __ret_653 = __builtin_shufflevector(__ret_653, __ret_653, 1, 0); \ | |
| 56160 | __ret_653; \ | |
| 54491 | 56161 | }) |
| 54492 | 56162 | #endif |
| 54493 | 56163 | |
| 54494 | 56164 | #ifdef __LITTLE_ENDIAN__ |
| 54495 | #define vmull_high_lane_u16(__p0_562, __p1_562, __p2_562) __extension__ ({ \ | |
| 54496 | uint16x8_t __s0_562 = __p0_562; \ | |
| 54497 | uint16x4_t __s1_562 = __p1_562; \ | |
| 54498 | uint32x4_t __ret_562; \ | |
| 54499 | __ret_562 = vmull_u16(vget_high_u16(__s0_562), splat_lane_u16(__s1_562, __p2_562)); \ | |
| 54500 | __ret_562; \ | |
| 56165 | #define vmull_high_lane_u16(__p0_654, __p1_654, __p2_654) __extension__ ({ \ | |
| 56166 | uint16x8_t __s0_654 = __p0_654; \ | |
| 56167 | uint16x4_t __s1_654 = __p1_654; \ | |
| 56168 | uint32x4_t __ret_654; \ | |
| 56169 | __ret_654 = vmull_u16(vget_high_u16(__s0_654), splat_lane_u16(__s1_654, __p2_654)); \ | |
| 56170 | __ret_654; \ | |
| 54501 | 56171 | }) |
| 54502 | 56172 | #else |
| 54503 | #define vmull_high_lane_u16(__p0_563, __p1_563, __p2_563) __extension__ ({ \ | |
| 54504 | uint16x8_t __s0_563 = __p0_563; \ | |
| 54505 | uint16x4_t __s1_563 = __p1_563; \ | |
| 54506 | uint16x8_t __rev0_563; __rev0_563 = __builtin_shufflevector(__s0_563, __s0_563, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54507 | uint16x4_t __rev1_563; __rev1_563 = __builtin_shufflevector(__s1_563, __s1_563, 3, 2, 1, 0); \ | |
| 54508 | uint32x4_t __ret_563; \ | |
| 54509 | __ret_563 = __noswap_vmull_u16(__noswap_vget_high_u16(__rev0_563), __noswap_splat_lane_u16(__rev1_563, __p2_563)); \ | |
| 54510 | __ret_563 = __builtin_shufflevector(__ret_563, __ret_563, 3, 2, 1, 0); \ | |
| 54511 | __ret_563; \ | |
| 56173 | #define vmull_high_lane_u16(__p0_655, __p1_655, __p2_655) __extension__ ({ \ | |
| 56174 | uint16x8_t __s0_655 = __p0_655; \ | |
| 56175 | uint16x4_t __s1_655 = __p1_655; \ | |
| 56176 | uint16x8_t __rev0_655; __rev0_655 = __builtin_shufflevector(__s0_655, __s0_655, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56177 | uint16x4_t __rev1_655; __rev1_655 = __builtin_shufflevector(__s1_655, __s1_655, 3, 2, 1, 0); \ | |
| 56178 | uint32x4_t __ret_655; \ | |
| 56179 | __ret_655 = __noswap_vmull_u16(__noswap_vget_high_u16(__rev0_655), __noswap_splat_lane_u16(__rev1_655, __p2_655)); \ | |
| 56180 | __ret_655 = __builtin_shufflevector(__ret_655, __ret_655, 3, 2, 1, 0); \ | |
| 56181 | __ret_655; \ | |
| 54512 | 56182 | }) |
| 54513 | 56183 | #endif |
| 54514 | 56184 | |
| 54515 | 56185 | #ifdef __LITTLE_ENDIAN__ |
| 54516 | #define vmull_high_lane_s32(__p0_564, __p1_564, __p2_564) __extension__ ({ \ | |
| 54517 | int32x4_t __s0_564 = __p0_564; \ | |
| 54518 | int32x2_t __s1_564 = __p1_564; \ | |
| 54519 | int64x2_t __ret_564; \ | |
| 54520 | __ret_564 = vmull_s32(vget_high_s32(__s0_564), splat_lane_s32(__s1_564, __p2_564)); \ | |
| 54521 | __ret_564; \ | |
| 56186 | #define vmull_high_lane_s32(__p0_656, __p1_656, __p2_656) __extension__ ({ \ | |
| 56187 | int32x4_t __s0_656 = __p0_656; \ | |
| 56188 | int32x2_t __s1_656 = __p1_656; \ | |
| 56189 | int64x2_t __ret_656; \ | |
| 56190 | __ret_656 = vmull_s32(vget_high_s32(__s0_656), splat_lane_s32(__s1_656, __p2_656)); \ | |
| 56191 | __ret_656; \ | |
| 54522 | 56192 | }) |
| 54523 | 56193 | #else |
| 54524 | #define vmull_high_lane_s32(__p0_565, __p1_565, __p2_565) __extension__ ({ \ | |
| 54525 | int32x4_t __s0_565 = __p0_565; \ | |
| 54526 | int32x2_t __s1_565 = __p1_565; \ | |
| 54527 | int32x4_t __rev0_565; __rev0_565 = __builtin_shufflevector(__s0_565, __s0_565, 3, 2, 1, 0); \ | |
| 54528 | int32x2_t __rev1_565; __rev1_565 = __builtin_shufflevector(__s1_565, __s1_565, 1, 0); \ | |
| 54529 | int64x2_t __ret_565; \ | |
| 54530 | __ret_565 = __noswap_vmull_s32(__noswap_vget_high_s32(__rev0_565), __noswap_splat_lane_s32(__rev1_565, __p2_565)); \ | |
| 54531 | __ret_565 = __builtin_shufflevector(__ret_565, __ret_565, 1, 0); \ | |
| 54532 | __ret_565; \ | |
| 56194 | #define vmull_high_lane_s32(__p0_657, __p1_657, __p2_657) __extension__ ({ \ | |
| 56195 | int32x4_t __s0_657 = __p0_657; \ | |
| 56196 | int32x2_t __s1_657 = __p1_657; \ | |
| 56197 | int32x4_t __rev0_657; __rev0_657 = __builtin_shufflevector(__s0_657, __s0_657, 3, 2, 1, 0); \ | |
| 56198 | int32x2_t __rev1_657; __rev1_657 = __builtin_shufflevector(__s1_657, __s1_657, 1, 0); \ | |
| 56199 | int64x2_t __ret_657; \ | |
| 56200 | __ret_657 = __noswap_vmull_s32(__noswap_vget_high_s32(__rev0_657), __noswap_splat_lane_s32(__rev1_657, __p2_657)); \ | |
| 56201 | __ret_657 = __builtin_shufflevector(__ret_657, __ret_657, 1, 0); \ | |
| 56202 | __ret_657; \ | |
| 54533 | 56203 | }) |
| 54534 | 56204 | #endif |
| 54535 | 56205 | |
| 54536 | 56206 | #ifdef __LITTLE_ENDIAN__ |
| 54537 | #define vmull_high_lane_s16(__p0_566, __p1_566, __p2_566) __extension__ ({ \ | |
| 54538 | int16x8_t __s0_566 = __p0_566; \ | |
| 54539 | int16x4_t __s1_566 = __p1_566; \ | |
| 54540 | int32x4_t __ret_566; \ | |
| 54541 | __ret_566 = vmull_s16(vget_high_s16(__s0_566), splat_lane_s16(__s1_566, __p2_566)); \ | |
| 54542 | __ret_566; \ | |
| 56207 | #define vmull_high_lane_s16(__p0_658, __p1_658, __p2_658) __extension__ ({ \ | |
| 56208 | int16x8_t __s0_658 = __p0_658; \ | |
| 56209 | int16x4_t __s1_658 = __p1_658; \ | |
| 56210 | int32x4_t __ret_658; \ | |
| 56211 | __ret_658 = vmull_s16(vget_high_s16(__s0_658), splat_lane_s16(__s1_658, __p2_658)); \ | |
| 56212 | __ret_658; \ | |
| 54543 | 56213 | }) |
| 54544 | 56214 | #else |
| 54545 | #define vmull_high_lane_s16(__p0_567, __p1_567, __p2_567) __extension__ ({ \ | |
| 54546 | int16x8_t __s0_567 = __p0_567; \ | |
| 54547 | int16x4_t __s1_567 = __p1_567; \ | |
| 54548 | int16x8_t __rev0_567; __rev0_567 = __builtin_shufflevector(__s0_567, __s0_567, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54549 | int16x4_t __rev1_567; __rev1_567 = __builtin_shufflevector(__s1_567, __s1_567, 3, 2, 1, 0); \ | |
| 54550 | int32x4_t __ret_567; \ | |
| 54551 | __ret_567 = __noswap_vmull_s16(__noswap_vget_high_s16(__rev0_567), __noswap_splat_lane_s16(__rev1_567, __p2_567)); \ | |
| 54552 | __ret_567 = __builtin_shufflevector(__ret_567, __ret_567, 3, 2, 1, 0); \ | |
| 54553 | __ret_567; \ | |
| 56215 | #define vmull_high_lane_s16(__p0_659, __p1_659, __p2_659) __extension__ ({ \ | |
| 56216 | int16x8_t __s0_659 = __p0_659; \ | |
| 56217 | int16x4_t __s1_659 = __p1_659; \ | |
| 56218 | int16x8_t __rev0_659; __rev0_659 = __builtin_shufflevector(__s0_659, __s0_659, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56219 | int16x4_t __rev1_659; __rev1_659 = __builtin_shufflevector(__s1_659, __s1_659, 3, 2, 1, 0); \ | |
| 56220 | int32x4_t __ret_659; \ | |
| 56221 | __ret_659 = __noswap_vmull_s16(__noswap_vget_high_s16(__rev0_659), __noswap_splat_lane_s16(__rev1_659, __p2_659)); \ | |
| 56222 | __ret_659 = __builtin_shufflevector(__ret_659, __ret_659, 3, 2, 1, 0); \ | |
| 56223 | __ret_659; \ | |
| 54554 | 56224 | }) |
| 54555 | 56225 | #endif |
| 54556 | 56226 | |
| 54557 | 56227 | #ifdef __LITTLE_ENDIAN__ |
| 54558 | #define vmull_high_laneq_u32(__p0_568, __p1_568, __p2_568) __extension__ ({ \ | |
| 54559 | uint32x4_t __s0_568 = __p0_568; \ | |
| 54560 | uint32x4_t __s1_568 = __p1_568; \ | |
| 54561 | uint64x2_t __ret_568; \ | |
| 54562 | __ret_568 = vmull_u32(vget_high_u32(__s0_568), splat_laneq_u32(__s1_568, __p2_568)); \ | |
| 54563 | __ret_568; \ | |
| 56228 | #define vmull_high_laneq_u32(__p0_660, __p1_660, __p2_660) __extension__ ({ \ | |
| 56229 | uint32x4_t __s0_660 = __p0_660; \ | |
| 56230 | uint32x4_t __s1_660 = __p1_660; \ | |
| 56231 | uint64x2_t __ret_660; \ | |
| 56232 | __ret_660 = vmull_u32(vget_high_u32(__s0_660), splat_laneq_u32(__s1_660, __p2_660)); \ | |
| 56233 | __ret_660; \ | |
| 54564 | 56234 | }) |
| 54565 | 56235 | #else |
| 54566 | #define vmull_high_laneq_u32(__p0_569, __p1_569, __p2_569) __extension__ ({ \ | |
| 54567 | uint32x4_t __s0_569 = __p0_569; \ | |
| 54568 | uint32x4_t __s1_569 = __p1_569; \ | |
| 54569 | uint32x4_t __rev0_569; __rev0_569 = __builtin_shufflevector(__s0_569, __s0_569, 3, 2, 1, 0); \ | |
| 54570 | uint32x4_t __rev1_569; __rev1_569 = __builtin_shufflevector(__s1_569, __s1_569, 3, 2, 1, 0); \ | |
| 54571 | uint64x2_t __ret_569; \ | |
| 54572 | __ret_569 = __noswap_vmull_u32(__noswap_vget_high_u32(__rev0_569), __noswap_splat_laneq_u32(__rev1_569, __p2_569)); \ | |
| 54573 | __ret_569 = __builtin_shufflevector(__ret_569, __ret_569, 1, 0); \ | |
| 54574 | __ret_569; \ | |
| 56236 | #define vmull_high_laneq_u32(__p0_661, __p1_661, __p2_661) __extension__ ({ \ | |
| 56237 | uint32x4_t __s0_661 = __p0_661; \ | |
| 56238 | uint32x4_t __s1_661 = __p1_661; \ | |
| 56239 | uint32x4_t __rev0_661; __rev0_661 = __builtin_shufflevector(__s0_661, __s0_661, 3, 2, 1, 0); \ | |
| 56240 | uint32x4_t __rev1_661; __rev1_661 = __builtin_shufflevector(__s1_661, __s1_661, 3, 2, 1, 0); \ | |
| 56241 | uint64x2_t __ret_661; \ | |
| 56242 | __ret_661 = __noswap_vmull_u32(__noswap_vget_high_u32(__rev0_661), __noswap_splat_laneq_u32(__rev1_661, __p2_661)); \ | |
| 56243 | __ret_661 = __builtin_shufflevector(__ret_661, __ret_661, 1, 0); \ | |
| 56244 | __ret_661; \ | |
| 54575 | 56245 | }) |
| 54576 | 56246 | #endif |
| 54577 | 56247 | |
| 54578 | 56248 | #ifdef __LITTLE_ENDIAN__ |
| 54579 | #define vmull_high_laneq_u16(__p0_570, __p1_570, __p2_570) __extension__ ({ \ | |
| 54580 | uint16x8_t __s0_570 = __p0_570; \ | |
| 54581 | uint16x8_t __s1_570 = __p1_570; \ | |
| 54582 | uint32x4_t __ret_570; \ | |
| 54583 | __ret_570 = vmull_u16(vget_high_u16(__s0_570), splat_laneq_u16(__s1_570, __p2_570)); \ | |
| 54584 | __ret_570; \ | |
| 56249 | #define vmull_high_laneq_u16(__p0_662, __p1_662, __p2_662) __extension__ ({ \ | |
| 56250 | uint16x8_t __s0_662 = __p0_662; \ | |
| 56251 | uint16x8_t __s1_662 = __p1_662; \ | |
| 56252 | uint32x4_t __ret_662; \ | |
| 56253 | __ret_662 = vmull_u16(vget_high_u16(__s0_662), splat_laneq_u16(__s1_662, __p2_662)); \ | |
| 56254 | __ret_662; \ | |
| 54585 | 56255 | }) |
| 54586 | 56256 | #else |
| 54587 | #define vmull_high_laneq_u16(__p0_571, __p1_571, __p2_571) __extension__ ({ \ | |
| 54588 | uint16x8_t __s0_571 = __p0_571; \ | |
| 54589 | uint16x8_t __s1_571 = __p1_571; \ | |
| 54590 | uint16x8_t __rev0_571; __rev0_571 = __builtin_shufflevector(__s0_571, __s0_571, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54591 | uint16x8_t __rev1_571; __rev1_571 = __builtin_shufflevector(__s1_571, __s1_571, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54592 | uint32x4_t __ret_571; \ | |
| 54593 | __ret_571 = __noswap_vmull_u16(__noswap_vget_high_u16(__rev0_571), __noswap_splat_laneq_u16(__rev1_571, __p2_571)); \ | |
| 54594 | __ret_571 = __builtin_shufflevector(__ret_571, __ret_571, 3, 2, 1, 0); \ | |
| 54595 | __ret_571; \ | |
| 56257 | #define vmull_high_laneq_u16(__p0_663, __p1_663, __p2_663) __extension__ ({ \ | |
| 56258 | uint16x8_t __s0_663 = __p0_663; \ | |
| 56259 | uint16x8_t __s1_663 = __p1_663; \ | |
| 56260 | uint16x8_t __rev0_663; __rev0_663 = __builtin_shufflevector(__s0_663, __s0_663, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56261 | uint16x8_t __rev1_663; __rev1_663 = __builtin_shufflevector(__s1_663, __s1_663, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56262 | uint32x4_t __ret_663; \ | |
| 56263 | __ret_663 = __noswap_vmull_u16(__noswap_vget_high_u16(__rev0_663), __noswap_splat_laneq_u16(__rev1_663, __p2_663)); \ | |
| 56264 | __ret_663 = __builtin_shufflevector(__ret_663, __ret_663, 3, 2, 1, 0); \ | |
| 56265 | __ret_663; \ | |
| 54596 | 56266 | }) |
| 54597 | 56267 | #endif |
| 54598 | 56268 | |
| 54599 | 56269 | #ifdef __LITTLE_ENDIAN__ |
| 54600 | #define vmull_high_laneq_s32(__p0_572, __p1_572, __p2_572) __extension__ ({ \ | |
| 54601 | int32x4_t __s0_572 = __p0_572; \ | |
| 54602 | int32x4_t __s1_572 = __p1_572; \ | |
| 54603 | int64x2_t __ret_572; \ | |
| 54604 | __ret_572 = vmull_s32(vget_high_s32(__s0_572), splat_laneq_s32(__s1_572, __p2_572)); \ | |
| 54605 | __ret_572; \ | |
| 56270 | #define vmull_high_laneq_s32(__p0_664, __p1_664, __p2_664) __extension__ ({ \ | |
| 56271 | int32x4_t __s0_664 = __p0_664; \ | |
| 56272 | int32x4_t __s1_664 = __p1_664; \ | |
| 56273 | int64x2_t __ret_664; \ | |
| 56274 | __ret_664 = vmull_s32(vget_high_s32(__s0_664), splat_laneq_s32(__s1_664, __p2_664)); \ | |
| 56275 | __ret_664; \ | |
| 54606 | 56276 | }) |
| 54607 | 56277 | #else |
| 54608 | #define vmull_high_laneq_s32(__p0_573, __p1_573, __p2_573) __extension__ ({ \ | |
| 54609 | int32x4_t __s0_573 = __p0_573; \ | |
| 54610 | int32x4_t __s1_573 = __p1_573; \ | |
| 54611 | int32x4_t __rev0_573; __rev0_573 = __builtin_shufflevector(__s0_573, __s0_573, 3, 2, 1, 0); \ | |
| 54612 | int32x4_t __rev1_573; __rev1_573 = __builtin_shufflevector(__s1_573, __s1_573, 3, 2, 1, 0); \ | |
| 54613 | int64x2_t __ret_573; \ | |
| 54614 | __ret_573 = __noswap_vmull_s32(__noswap_vget_high_s32(__rev0_573), __noswap_splat_laneq_s32(__rev1_573, __p2_573)); \ | |
| 54615 | __ret_573 = __builtin_shufflevector(__ret_573, __ret_573, 1, 0); \ | |
| 54616 | __ret_573; \ | |
| 56278 | #define vmull_high_laneq_s32(__p0_665, __p1_665, __p2_665) __extension__ ({ \ | |
| 56279 | int32x4_t __s0_665 = __p0_665; \ | |
| 56280 | int32x4_t __s1_665 = __p1_665; \ | |
| 56281 | int32x4_t __rev0_665; __rev0_665 = __builtin_shufflevector(__s0_665, __s0_665, 3, 2, 1, 0); \ | |
| 56282 | int32x4_t __rev1_665; __rev1_665 = __builtin_shufflevector(__s1_665, __s1_665, 3, 2, 1, 0); \ | |
| 56283 | int64x2_t __ret_665; \ | |
| 56284 | __ret_665 = __noswap_vmull_s32(__noswap_vget_high_s32(__rev0_665), __noswap_splat_laneq_s32(__rev1_665, __p2_665)); \ | |
| 56285 | __ret_665 = __builtin_shufflevector(__ret_665, __ret_665, 1, 0); \ | |
| 56286 | __ret_665; \ | |
| 54617 | 56287 | }) |
| 54618 | 56288 | #endif |
| 54619 | 56289 | |
| 54620 | 56290 | #ifdef __LITTLE_ENDIAN__ |
| 54621 | #define vmull_high_laneq_s16(__p0_574, __p1_574, __p2_574) __extension__ ({ \ | |
| 54622 | int16x8_t __s0_574 = __p0_574; \ | |
| 54623 | int16x8_t __s1_574 = __p1_574; \ | |
| 54624 | int32x4_t __ret_574; \ | |
| 54625 | __ret_574 = vmull_s16(vget_high_s16(__s0_574), splat_laneq_s16(__s1_574, __p2_574)); \ | |
| 54626 | __ret_574; \ | |
| 56291 | #define vmull_high_laneq_s16(__p0_666, __p1_666, __p2_666) __extension__ ({ \ | |
| 56292 | int16x8_t __s0_666 = __p0_666; \ | |
| 56293 | int16x8_t __s1_666 = __p1_666; \ | |
| 56294 | int32x4_t __ret_666; \ | |
| 56295 | __ret_666 = vmull_s16(vget_high_s16(__s0_666), splat_laneq_s16(__s1_666, __p2_666)); \ | |
| 56296 | __ret_666; \ | |
| 54627 | 56297 | }) |
| 54628 | 56298 | #else |
| 54629 | #define vmull_high_laneq_s16(__p0_575, __p1_575, __p2_575) __extension__ ({ \ | |
| 54630 | int16x8_t __s0_575 = __p0_575; \ | |
| 54631 | int16x8_t __s1_575 = __p1_575; \ | |
| 54632 | int16x8_t __rev0_575; __rev0_575 = __builtin_shufflevector(__s0_575, __s0_575, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54633 | int16x8_t __rev1_575; __rev1_575 = __builtin_shufflevector(__s1_575, __s1_575, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54634 | int32x4_t __ret_575; \ | |
| 54635 | __ret_575 = __noswap_vmull_s16(__noswap_vget_high_s16(__rev0_575), __noswap_splat_laneq_s16(__rev1_575, __p2_575)); \ | |
| 54636 | __ret_575 = __builtin_shufflevector(__ret_575, __ret_575, 3, 2, 1, 0); \ | |
| 54637 | __ret_575; \ | |
| 56299 | #define vmull_high_laneq_s16(__p0_667, __p1_667, __p2_667) __extension__ ({ \ | |
| 56300 | int16x8_t __s0_667 = __p0_667; \ | |
| 56301 | int16x8_t __s1_667 = __p1_667; \ | |
| 56302 | int16x8_t __rev0_667; __rev0_667 = __builtin_shufflevector(__s0_667, __s0_667, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56303 | int16x8_t __rev1_667; __rev1_667 = __builtin_shufflevector(__s1_667, __s1_667, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56304 | int32x4_t __ret_667; \ | |
| 56305 | __ret_667 = __noswap_vmull_s16(__noswap_vget_high_s16(__rev0_667), __noswap_splat_laneq_s16(__rev1_667, __p2_667)); \ | |
| 56306 | __ret_667 = __builtin_shufflevector(__ret_667, __ret_667, 3, 2, 1, 0); \ | |
| 56307 | __ret_667; \ | |
| 54638 | 56308 | }) |
| 54639 | 56309 | #endif |
| 54640 | 56310 | |
| ... | ... | @@ -54703,86 +56373,86 @@ __ai int32x4_t vmull_high_n_s16(int16x8_t __p0, int16_t __p1) { |
| 54703 | 56373 | #endif |
| 54704 | 56374 | |
| 54705 | 56375 | #ifdef __LITTLE_ENDIAN__ |
| 54706 | #define vmull_laneq_u32(__p0_576, __p1_576, __p2_576) __extension__ ({ \ | |
| 54707 | uint32x2_t __s0_576 = __p0_576; \ | |
| 54708 | uint32x4_t __s1_576 = __p1_576; \ | |
| 54709 | uint64x2_t __ret_576; \ | |
| 54710 | __ret_576 = vmull_u32(__s0_576, splat_laneq_u32(__s1_576, __p2_576)); \ | |
| 54711 | __ret_576; \ | |
| 56376 | #define vmull_laneq_u32(__p0_668, __p1_668, __p2_668) __extension__ ({ \ | |
| 56377 | uint32x2_t __s0_668 = __p0_668; \ | |
| 56378 | uint32x4_t __s1_668 = __p1_668; \ | |
| 56379 | uint64x2_t __ret_668; \ | |
| 56380 | __ret_668 = vmull_u32(__s0_668, splat_laneq_u32(__s1_668, __p2_668)); \ | |
| 56381 | __ret_668; \ | |
| 54712 | 56382 | }) |
| 54713 | 56383 | #else |
| 54714 | #define vmull_laneq_u32(__p0_577, __p1_577, __p2_577) __extension__ ({ \ | |
| 54715 | uint32x2_t __s0_577 = __p0_577; \ | |
| 54716 | uint32x4_t __s1_577 = __p1_577; \ | |
| 54717 | uint32x2_t __rev0_577; __rev0_577 = __builtin_shufflevector(__s0_577, __s0_577, 1, 0); \ | |
| 54718 | uint32x4_t __rev1_577; __rev1_577 = __builtin_shufflevector(__s1_577, __s1_577, 3, 2, 1, 0); \ | |
| 54719 | uint64x2_t __ret_577; \ | |
| 54720 | __ret_577 = __noswap_vmull_u32(__rev0_577, __noswap_splat_laneq_u32(__rev1_577, __p2_577)); \ | |
| 54721 | __ret_577 = __builtin_shufflevector(__ret_577, __ret_577, 1, 0); \ | |
| 54722 | __ret_577; \ | |
| 56384 | #define vmull_laneq_u32(__p0_669, __p1_669, __p2_669) __extension__ ({ \ | |
| 56385 | uint32x2_t __s0_669 = __p0_669; \ | |
| 56386 | uint32x4_t __s1_669 = __p1_669; \ | |
| 56387 | uint32x2_t __rev0_669; __rev0_669 = __builtin_shufflevector(__s0_669, __s0_669, 1, 0); \ | |
| 56388 | uint32x4_t __rev1_669; __rev1_669 = __builtin_shufflevector(__s1_669, __s1_669, 3, 2, 1, 0); \ | |
| 56389 | uint64x2_t __ret_669; \ | |
| 56390 | __ret_669 = __noswap_vmull_u32(__rev0_669, __noswap_splat_laneq_u32(__rev1_669, __p2_669)); \ | |
| 56391 | __ret_669 = __builtin_shufflevector(__ret_669, __ret_669, 1, 0); \ | |
| 56392 | __ret_669; \ | |
| 54723 | 56393 | }) |
| 54724 | 56394 | #endif |
| 54725 | 56395 | |
| 54726 | 56396 | #ifdef __LITTLE_ENDIAN__ |
| 54727 | #define vmull_laneq_u16(__p0_578, __p1_578, __p2_578) __extension__ ({ \ | |
| 54728 | uint16x4_t __s0_578 = __p0_578; \ | |
| 54729 | uint16x8_t __s1_578 = __p1_578; \ | |
| 54730 | uint32x4_t __ret_578; \ | |
| 54731 | __ret_578 = vmull_u16(__s0_578, splat_laneq_u16(__s1_578, __p2_578)); \ | |
| 54732 | __ret_578; \ | |
| 56397 | #define vmull_laneq_u16(__p0_670, __p1_670, __p2_670) __extension__ ({ \ | |
| 56398 | uint16x4_t __s0_670 = __p0_670; \ | |
| 56399 | uint16x8_t __s1_670 = __p1_670; \ | |
| 56400 | uint32x4_t __ret_670; \ | |
| 56401 | __ret_670 = vmull_u16(__s0_670, splat_laneq_u16(__s1_670, __p2_670)); \ | |
| 56402 | __ret_670; \ | |
| 54733 | 56403 | }) |
| 54734 | 56404 | #else |
| 54735 | #define vmull_laneq_u16(__p0_579, __p1_579, __p2_579) __extension__ ({ \ | |
| 54736 | uint16x4_t __s0_579 = __p0_579; \ | |
| 54737 | uint16x8_t __s1_579 = __p1_579; \ | |
| 54738 | uint16x4_t __rev0_579; __rev0_579 = __builtin_shufflevector(__s0_579, __s0_579, 3, 2, 1, 0); \ | |
| 54739 | uint16x8_t __rev1_579; __rev1_579 = __builtin_shufflevector(__s1_579, __s1_579, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54740 | uint32x4_t __ret_579; \ | |
| 54741 | __ret_579 = __noswap_vmull_u16(__rev0_579, __noswap_splat_laneq_u16(__rev1_579, __p2_579)); \ | |
| 54742 | __ret_579 = __builtin_shufflevector(__ret_579, __ret_579, 3, 2, 1, 0); \ | |
| 54743 | __ret_579; \ | |
| 56405 | #define vmull_laneq_u16(__p0_671, __p1_671, __p2_671) __extension__ ({ \ | |
| 56406 | uint16x4_t __s0_671 = __p0_671; \ | |
| 56407 | uint16x8_t __s1_671 = __p1_671; \ | |
| 56408 | uint16x4_t __rev0_671; __rev0_671 = __builtin_shufflevector(__s0_671, __s0_671, 3, 2, 1, 0); \ | |
| 56409 | uint16x8_t __rev1_671; __rev1_671 = __builtin_shufflevector(__s1_671, __s1_671, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56410 | uint32x4_t __ret_671; \ | |
| 56411 | __ret_671 = __noswap_vmull_u16(__rev0_671, __noswap_splat_laneq_u16(__rev1_671, __p2_671)); \ | |
| 56412 | __ret_671 = __builtin_shufflevector(__ret_671, __ret_671, 3, 2, 1, 0); \ | |
| 56413 | __ret_671; \ | |
| 54744 | 56414 | }) |
| 54745 | 56415 | #endif |
| 54746 | 56416 | |
| 54747 | 56417 | #ifdef __LITTLE_ENDIAN__ |
| 54748 | #define vmull_laneq_s32(__p0_580, __p1_580, __p2_580) __extension__ ({ \ | |
| 54749 | int32x2_t __s0_580 = __p0_580; \ | |
| 54750 | int32x4_t __s1_580 = __p1_580; \ | |
| 54751 | int64x2_t __ret_580; \ | |
| 54752 | __ret_580 = vmull_s32(__s0_580, splat_laneq_s32(__s1_580, __p2_580)); \ | |
| 54753 | __ret_580; \ | |
| 56418 | #define vmull_laneq_s32(__p0_672, __p1_672, __p2_672) __extension__ ({ \ | |
| 56419 | int32x2_t __s0_672 = __p0_672; \ | |
| 56420 | int32x4_t __s1_672 = __p1_672; \ | |
| 56421 | int64x2_t __ret_672; \ | |
| 56422 | __ret_672 = vmull_s32(__s0_672, splat_laneq_s32(__s1_672, __p2_672)); \ | |
| 56423 | __ret_672; \ | |
| 54754 | 56424 | }) |
| 54755 | 56425 | #else |
| 54756 | #define vmull_laneq_s32(__p0_581, __p1_581, __p2_581) __extension__ ({ \ | |
| 54757 | int32x2_t __s0_581 = __p0_581; \ | |
| 54758 | int32x4_t __s1_581 = __p1_581; \ | |
| 54759 | int32x2_t __rev0_581; __rev0_581 = __builtin_shufflevector(__s0_581, __s0_581, 1, 0); \ | |
| 54760 | int32x4_t __rev1_581; __rev1_581 = __builtin_shufflevector(__s1_581, __s1_581, 3, 2, 1, 0); \ | |
| 54761 | int64x2_t __ret_581; \ | |
| 54762 | __ret_581 = __noswap_vmull_s32(__rev0_581, __noswap_splat_laneq_s32(__rev1_581, __p2_581)); \ | |
| 54763 | __ret_581 = __builtin_shufflevector(__ret_581, __ret_581, 1, 0); \ | |
| 54764 | __ret_581; \ | |
| 56426 | #define vmull_laneq_s32(__p0_673, __p1_673, __p2_673) __extension__ ({ \ | |
| 56427 | int32x2_t __s0_673 = __p0_673; \ | |
| 56428 | int32x4_t __s1_673 = __p1_673; \ | |
| 56429 | int32x2_t __rev0_673; __rev0_673 = __builtin_shufflevector(__s0_673, __s0_673, 1, 0); \ | |
| 56430 | int32x4_t __rev1_673; __rev1_673 = __builtin_shufflevector(__s1_673, __s1_673, 3, 2, 1, 0); \ | |
| 56431 | int64x2_t __ret_673; \ | |
| 56432 | __ret_673 = __noswap_vmull_s32(__rev0_673, __noswap_splat_laneq_s32(__rev1_673, __p2_673)); \ | |
| 56433 | __ret_673 = __builtin_shufflevector(__ret_673, __ret_673, 1, 0); \ | |
| 56434 | __ret_673; \ | |
| 54765 | 56435 | }) |
| 54766 | 56436 | #endif |
| 54767 | 56437 | |
| 54768 | 56438 | #ifdef __LITTLE_ENDIAN__ |
| 54769 | #define vmull_laneq_s16(__p0_582, __p1_582, __p2_582) __extension__ ({ \ | |
| 54770 | int16x4_t __s0_582 = __p0_582; \ | |
| 54771 | int16x8_t __s1_582 = __p1_582; \ | |
| 54772 | int32x4_t __ret_582; \ | |
| 54773 | __ret_582 = vmull_s16(__s0_582, splat_laneq_s16(__s1_582, __p2_582)); \ | |
| 54774 | __ret_582; \ | |
| 56439 | #define vmull_laneq_s16(__p0_674, __p1_674, __p2_674) __extension__ ({ \ | |
| 56440 | int16x4_t __s0_674 = __p0_674; \ | |
| 56441 | int16x8_t __s1_674 = __p1_674; \ | |
| 56442 | int32x4_t __ret_674; \ | |
| 56443 | __ret_674 = vmull_s16(__s0_674, splat_laneq_s16(__s1_674, __p2_674)); \ | |
| 56444 | __ret_674; \ | |
| 54775 | 56445 | }) |
| 54776 | 56446 | #else |
| 54777 | #define vmull_laneq_s16(__p0_583, __p1_583, __p2_583) __extension__ ({ \ | |
| 54778 | int16x4_t __s0_583 = __p0_583; \ | |
| 54779 | int16x8_t __s1_583 = __p1_583; \ | |
| 54780 | int16x4_t __rev0_583; __rev0_583 = __builtin_shufflevector(__s0_583, __s0_583, 3, 2, 1, 0); \ | |
| 54781 | int16x8_t __rev1_583; __rev1_583 = __builtin_shufflevector(__s1_583, __s1_583, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 54782 | int32x4_t __ret_583; \ | |
| 54783 | __ret_583 = __noswap_vmull_s16(__rev0_583, __noswap_splat_laneq_s16(__rev1_583, __p2_583)); \ | |
| 54784 | __ret_583 = __builtin_shufflevector(__ret_583, __ret_583, 3, 2, 1, 0); \ | |
| 54785 | __ret_583; \ | |
| 56447 | #define vmull_laneq_s16(__p0_675, __p1_675, __p2_675) __extension__ ({ \ | |
| 56448 | int16x4_t __s0_675 = __p0_675; \ | |
| 56449 | int16x8_t __s1_675 = __p1_675; \ | |
| 56450 | int16x4_t __rev0_675; __rev0_675 = __builtin_shufflevector(__s0_675, __s0_675, 3, 2, 1, 0); \ | |
| 56451 | int16x8_t __rev1_675; __rev1_675 = __builtin_shufflevector(__s1_675, __s1_675, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56452 | int32x4_t __ret_675; \ | |
| 56453 | __ret_675 = __noswap_vmull_s16(__rev0_675, __noswap_splat_laneq_s16(__rev1_675, __p2_675)); \ | |
| 56454 | __ret_675 = __builtin_shufflevector(__ret_675, __ret_675, 3, 2, 1, 0); \ | |
| 56455 | __ret_675; \ | |
| 54786 | 56456 | }) |
| 54787 | 56457 | #endif |
| 54788 | 56458 | |
| ... | ... | @@ -54867,192 +56537,192 @@ __ai float32_t vmulxs_f32(float32_t __p0, float32_t __p1) { |
| 54867 | 56537 | __ret = (float32_t) __builtin_neon_vmulxs_f32(__p0, __p1); |
| 54868 | 56538 | return __ret; |
| 54869 | 56539 | } |
| 54870 | #define vmulxd_lane_f64(__p0_584, __p1_584, __p2_584) __extension__ ({ \ | |
| 54871 | float64_t __s0_584 = __p0_584; \ | |
| 54872 | float64x1_t __s1_584 = __p1_584; \ | |
| 54873 | float64_t __ret_584; \ | |
| 54874 | __ret_584 = vmulxd_f64(__s0_584, vget_lane_f64(__s1_584, __p2_584)); \ | |
| 54875 | __ret_584; \ | |
| 56540 | #define vmulxd_lane_f64(__p0_676, __p1_676, __p2_676) __extension__ ({ \ | |
| 56541 | float64_t __s0_676 = __p0_676; \ | |
| 56542 | float64x1_t __s1_676 = __p1_676; \ | |
| 56543 | float64_t __ret_676; \ | |
| 56544 | __ret_676 = vmulxd_f64(__s0_676, vget_lane_f64(__s1_676, __p2_676)); \ | |
| 56545 | __ret_676; \ | |
| 54876 | 56546 | }) |
| 54877 | 56547 | #ifdef __LITTLE_ENDIAN__ |
| 54878 | #define vmulxs_lane_f32(__p0_585, __p1_585, __p2_585) __extension__ ({ \ | |
| 54879 | float32_t __s0_585 = __p0_585; \ | |
| 54880 | float32x2_t __s1_585 = __p1_585; \ | |
| 54881 | float32_t __ret_585; \ | |
| 54882 | __ret_585 = vmulxs_f32(__s0_585, vget_lane_f32(__s1_585, __p2_585)); \ | |
| 54883 | __ret_585; \ | |
| 56548 | #define vmulxs_lane_f32(__p0_677, __p1_677, __p2_677) __extension__ ({ \ | |
| 56549 | float32_t __s0_677 = __p0_677; \ | |
| 56550 | float32x2_t __s1_677 = __p1_677; \ | |
| 56551 | float32_t __ret_677; \ | |
| 56552 | __ret_677 = vmulxs_f32(__s0_677, vget_lane_f32(__s1_677, __p2_677)); \ | |
| 56553 | __ret_677; \ | |
| 54884 | 56554 | }) |
| 54885 | 56555 | #else |
| 54886 | #define vmulxs_lane_f32(__p0_586, __p1_586, __p2_586) __extension__ ({ \ | |
| 54887 | float32_t __s0_586 = __p0_586; \ | |
| 54888 | float32x2_t __s1_586 = __p1_586; \ | |
| 54889 | float32x2_t __rev1_586; __rev1_586 = __builtin_shufflevector(__s1_586, __s1_586, 1, 0); \ | |
| 54890 | float32_t __ret_586; \ | |
| 54891 | __ret_586 = vmulxs_f32(__s0_586, __noswap_vget_lane_f32(__rev1_586, __p2_586)); \ | |
| 54892 | __ret_586; \ | |
| 56556 | #define vmulxs_lane_f32(__p0_678, __p1_678, __p2_678) __extension__ ({ \ | |
| 56557 | float32_t __s0_678 = __p0_678; \ | |
| 56558 | float32x2_t __s1_678 = __p1_678; \ | |
| 56559 | float32x2_t __rev1_678; __rev1_678 = __builtin_shufflevector(__s1_678, __s1_678, 1, 0); \ | |
| 56560 | float32_t __ret_678; \ | |
| 56561 | __ret_678 = vmulxs_f32(__s0_678, __noswap_vget_lane_f32(__rev1_678, __p2_678)); \ | |
| 56562 | __ret_678; \ | |
| 54893 | 56563 | }) |
| 54894 | 56564 | #endif |
| 54895 | 56565 | |
| 54896 | 56566 | #ifdef __LITTLE_ENDIAN__ |
| 54897 | #define vmulxq_lane_f64(__p0_587, __p1_587, __p2_587) __extension__ ({ \ | |
| 54898 | float64x2_t __s0_587 = __p0_587; \ | |
| 54899 | float64x1_t __s1_587 = __p1_587; \ | |
| 54900 | float64x2_t __ret_587; \ | |
| 54901 | __ret_587 = vmulxq_f64(__s0_587, splatq_lane_f64(__s1_587, __p2_587)); \ | |
| 54902 | __ret_587; \ | |
| 56567 | #define vmulxq_lane_f64(__p0_679, __p1_679, __p2_679) __extension__ ({ \ | |
| 56568 | float64x2_t __s0_679 = __p0_679; \ | |
| 56569 | float64x1_t __s1_679 = __p1_679; \ | |
| 56570 | float64x2_t __ret_679; \ | |
| 56571 | __ret_679 = vmulxq_f64(__s0_679, splatq_lane_f64(__s1_679, __p2_679)); \ | |
| 56572 | __ret_679; \ | |
| 54903 | 56573 | }) |
| 54904 | 56574 | #else |
| 54905 | #define vmulxq_lane_f64(__p0_588, __p1_588, __p2_588) __extension__ ({ \ | |
| 54906 | float64x2_t __s0_588 = __p0_588; \ | |
| 54907 | float64x1_t __s1_588 = __p1_588; \ | |
| 54908 | float64x2_t __rev0_588; __rev0_588 = __builtin_shufflevector(__s0_588, __s0_588, 1, 0); \ | |
| 54909 | float64x2_t __ret_588; \ | |
| 54910 | __ret_588 = __noswap_vmulxq_f64(__rev0_588, __noswap_splatq_lane_f64(__s1_588, __p2_588)); \ | |
| 54911 | __ret_588 = __builtin_shufflevector(__ret_588, __ret_588, 1, 0); \ | |
| 54912 | __ret_588; \ | |
| 56575 | #define vmulxq_lane_f64(__p0_680, __p1_680, __p2_680) __extension__ ({ \ | |
| 56576 | float64x2_t __s0_680 = __p0_680; \ | |
| 56577 | float64x1_t __s1_680 = __p1_680; \ | |
| 56578 | float64x2_t __rev0_680; __rev0_680 = __builtin_shufflevector(__s0_680, __s0_680, 1, 0); \ | |
| 56579 | float64x2_t __ret_680; \ | |
| 56580 | __ret_680 = __noswap_vmulxq_f64(__rev0_680, __noswap_splatq_lane_f64(__s1_680, __p2_680)); \ | |
| 56581 | __ret_680 = __builtin_shufflevector(__ret_680, __ret_680, 1, 0); \ | |
| 56582 | __ret_680; \ | |
| 54913 | 56583 | }) |
| 54914 | 56584 | #endif |
| 54915 | 56585 | |
| 54916 | 56586 | #ifdef __LITTLE_ENDIAN__ |
| 54917 | #define vmulxq_lane_f32(__p0_589, __p1_589, __p2_589) __extension__ ({ \ | |
| 54918 | float32x4_t __s0_589 = __p0_589; \ | |
| 54919 | float32x2_t __s1_589 = __p1_589; \ | |
| 54920 | float32x4_t __ret_589; \ | |
| 54921 | __ret_589 = vmulxq_f32(__s0_589, splatq_lane_f32(__s1_589, __p2_589)); \ | |
| 54922 | __ret_589; \ | |
| 56587 | #define vmulxq_lane_f32(__p0_681, __p1_681, __p2_681) __extension__ ({ \ | |
| 56588 | float32x4_t __s0_681 = __p0_681; \ | |
| 56589 | float32x2_t __s1_681 = __p1_681; \ | |
| 56590 | float32x4_t __ret_681; \ | |
| 56591 | __ret_681 = vmulxq_f32(__s0_681, splatq_lane_f32(__s1_681, __p2_681)); \ | |
| 56592 | __ret_681; \ | |
| 54923 | 56593 | }) |
| 54924 | 56594 | #else |
| 54925 | #define vmulxq_lane_f32(__p0_590, __p1_590, __p2_590) __extension__ ({ \ | |
| 54926 | float32x4_t __s0_590 = __p0_590; \ | |
| 54927 | float32x2_t __s1_590 = __p1_590; \ | |
| 54928 | float32x4_t __rev0_590; __rev0_590 = __builtin_shufflevector(__s0_590, __s0_590, 3, 2, 1, 0); \ | |
| 54929 | float32x2_t __rev1_590; __rev1_590 = __builtin_shufflevector(__s1_590, __s1_590, 1, 0); \ | |
| 54930 | float32x4_t __ret_590; \ | |
| 54931 | __ret_590 = __noswap_vmulxq_f32(__rev0_590, __noswap_splatq_lane_f32(__rev1_590, __p2_590)); \ | |
| 54932 | __ret_590 = __builtin_shufflevector(__ret_590, __ret_590, 3, 2, 1, 0); \ | |
| 54933 | __ret_590; \ | |
| 56595 | #define vmulxq_lane_f32(__p0_682, __p1_682, __p2_682) __extension__ ({ \ | |
| 56596 | float32x4_t __s0_682 = __p0_682; \ | |
| 56597 | float32x2_t __s1_682 = __p1_682; \ | |
| 56598 | float32x4_t __rev0_682; __rev0_682 = __builtin_shufflevector(__s0_682, __s0_682, 3, 2, 1, 0); \ | |
| 56599 | float32x2_t __rev1_682; __rev1_682 = __builtin_shufflevector(__s1_682, __s1_682, 1, 0); \ | |
| 56600 | float32x4_t __ret_682; \ | |
| 56601 | __ret_682 = __noswap_vmulxq_f32(__rev0_682, __noswap_splatq_lane_f32(__rev1_682, __p2_682)); \ | |
| 56602 | __ret_682 = __builtin_shufflevector(__ret_682, __ret_682, 3, 2, 1, 0); \ | |
| 56603 | __ret_682; \ | |
| 54934 | 56604 | }) |
| 54935 | 56605 | #endif |
| 54936 | 56606 | |
| 54937 | 56607 | #ifdef __LITTLE_ENDIAN__ |
| 54938 | #define vmulx_lane_f32(__p0_591, __p1_591, __p2_591) __extension__ ({ \ | |
| 54939 | float32x2_t __s0_591 = __p0_591; \ | |
| 54940 | float32x2_t __s1_591 = __p1_591; \ | |
| 54941 | float32x2_t __ret_591; \ | |
| 54942 | __ret_591 = vmulx_f32(__s0_591, splat_lane_f32(__s1_591, __p2_591)); \ | |
| 54943 | __ret_591; \ | |
| 56608 | #define vmulx_lane_f32(__p0_683, __p1_683, __p2_683) __extension__ ({ \ | |
| 56609 | float32x2_t __s0_683 = __p0_683; \ | |
| 56610 | float32x2_t __s1_683 = __p1_683; \ | |
| 56611 | float32x2_t __ret_683; \ | |
| 56612 | __ret_683 = vmulx_f32(__s0_683, splat_lane_f32(__s1_683, __p2_683)); \ | |
| 56613 | __ret_683; \ | |
| 54944 | 56614 | }) |
| 54945 | 56615 | #else |
| 54946 | #define vmulx_lane_f32(__p0_592, __p1_592, __p2_592) __extension__ ({ \ | |
| 54947 | float32x2_t __s0_592 = __p0_592; \ | |
| 54948 | float32x2_t __s1_592 = __p1_592; \ | |
| 54949 | float32x2_t __rev0_592; __rev0_592 = __builtin_shufflevector(__s0_592, __s0_592, 1, 0); \ | |
| 54950 | float32x2_t __rev1_592; __rev1_592 = __builtin_shufflevector(__s1_592, __s1_592, 1, 0); \ | |
| 54951 | float32x2_t __ret_592; \ | |
| 54952 | __ret_592 = __noswap_vmulx_f32(__rev0_592, __noswap_splat_lane_f32(__rev1_592, __p2_592)); \ | |
| 54953 | __ret_592 = __builtin_shufflevector(__ret_592, __ret_592, 1, 0); \ | |
| 54954 | __ret_592; \ | |
| 56616 | #define vmulx_lane_f32(__p0_684, __p1_684, __p2_684) __extension__ ({ \ | |
| 56617 | float32x2_t __s0_684 = __p0_684; \ | |
| 56618 | float32x2_t __s1_684 = __p1_684; \ | |
| 56619 | float32x2_t __rev0_684; __rev0_684 = __builtin_shufflevector(__s0_684, __s0_684, 1, 0); \ | |
| 56620 | float32x2_t __rev1_684; __rev1_684 = __builtin_shufflevector(__s1_684, __s1_684, 1, 0); \ | |
| 56621 | float32x2_t __ret_684; \ | |
| 56622 | __ret_684 = __noswap_vmulx_f32(__rev0_684, __noswap_splat_lane_f32(__rev1_684, __p2_684)); \ | |
| 56623 | __ret_684 = __builtin_shufflevector(__ret_684, __ret_684, 1, 0); \ | |
| 56624 | __ret_684; \ | |
| 54955 | 56625 | }) |
| 54956 | 56626 | #endif |
| 54957 | 56627 | |
| 54958 | 56628 | #ifdef __LITTLE_ENDIAN__ |
| 54959 | #define vmulxd_laneq_f64(__p0_593, __p1_593, __p2_593) __extension__ ({ \ | |
| 54960 | float64_t __s0_593 = __p0_593; \ | |
| 54961 | float64x2_t __s1_593 = __p1_593; \ | |
| 54962 | float64_t __ret_593; \ | |
| 54963 | __ret_593 = vmulxd_f64(__s0_593, vgetq_lane_f64(__s1_593, __p2_593)); \ | |
| 54964 | __ret_593; \ | |
| 56629 | #define vmulxd_laneq_f64(__p0_685, __p1_685, __p2_685) __extension__ ({ \ | |
| 56630 | float64_t __s0_685 = __p0_685; \ | |
| 56631 | float64x2_t __s1_685 = __p1_685; \ | |
| 56632 | float64_t __ret_685; \ | |
| 56633 | __ret_685 = vmulxd_f64(__s0_685, vgetq_lane_f64(__s1_685, __p2_685)); \ | |
| 56634 | __ret_685; \ | |
| 54965 | 56635 | }) |
| 54966 | 56636 | #else |
| 54967 | #define vmulxd_laneq_f64(__p0_594, __p1_594, __p2_594) __extension__ ({ \ | |
| 54968 | float64_t __s0_594 = __p0_594; \ | |
| 54969 | float64x2_t __s1_594 = __p1_594; \ | |
| 54970 | float64x2_t __rev1_594; __rev1_594 = __builtin_shufflevector(__s1_594, __s1_594, 1, 0); \ | |
| 54971 | float64_t __ret_594; \ | |
| 54972 | __ret_594 = vmulxd_f64(__s0_594, __noswap_vgetq_lane_f64(__rev1_594, __p2_594)); \ | |
| 54973 | __ret_594; \ | |
| 56637 | #define vmulxd_laneq_f64(__p0_686, __p1_686, __p2_686) __extension__ ({ \ | |
| 56638 | float64_t __s0_686 = __p0_686; \ | |
| 56639 | float64x2_t __s1_686 = __p1_686; \ | |
| 56640 | float64x2_t __rev1_686; __rev1_686 = __builtin_shufflevector(__s1_686, __s1_686, 1, 0); \ | |
| 56641 | float64_t __ret_686; \ | |
| 56642 | __ret_686 = vmulxd_f64(__s0_686, __noswap_vgetq_lane_f64(__rev1_686, __p2_686)); \ | |
| 56643 | __ret_686; \ | |
| 54974 | 56644 | }) |
| 54975 | 56645 | #endif |
| 54976 | 56646 | |
| 54977 | 56647 | #ifdef __LITTLE_ENDIAN__ |
| 54978 | #define vmulxs_laneq_f32(__p0_595, __p1_595, __p2_595) __extension__ ({ \ | |
| 54979 | float32_t __s0_595 = __p0_595; \ | |
| 54980 | float32x4_t __s1_595 = __p1_595; \ | |
| 54981 | float32_t __ret_595; \ | |
| 54982 | __ret_595 = vmulxs_f32(__s0_595, vgetq_lane_f32(__s1_595, __p2_595)); \ | |
| 54983 | __ret_595; \ | |
| 56648 | #define vmulxs_laneq_f32(__p0_687, __p1_687, __p2_687) __extension__ ({ \ | |
| 56649 | float32_t __s0_687 = __p0_687; \ | |
| 56650 | float32x4_t __s1_687 = __p1_687; \ | |
| 56651 | float32_t __ret_687; \ | |
| 56652 | __ret_687 = vmulxs_f32(__s0_687, vgetq_lane_f32(__s1_687, __p2_687)); \ | |
| 56653 | __ret_687; \ | |
| 54984 | 56654 | }) |
| 54985 | 56655 | #else |
| 54986 | #define vmulxs_laneq_f32(__p0_596, __p1_596, __p2_596) __extension__ ({ \ | |
| 54987 | float32_t __s0_596 = __p0_596; \ | |
| 54988 | float32x4_t __s1_596 = __p1_596; \ | |
| 54989 | float32x4_t __rev1_596; __rev1_596 = __builtin_shufflevector(__s1_596, __s1_596, 3, 2, 1, 0); \ | |
| 54990 | float32_t __ret_596; \ | |
| 54991 | __ret_596 = vmulxs_f32(__s0_596, __noswap_vgetq_lane_f32(__rev1_596, __p2_596)); \ | |
| 54992 | __ret_596; \ | |
| 56656 | #define vmulxs_laneq_f32(__p0_688, __p1_688, __p2_688) __extension__ ({ \ | |
| 56657 | float32_t __s0_688 = __p0_688; \ | |
| 56658 | float32x4_t __s1_688 = __p1_688; \ | |
| 56659 | float32x4_t __rev1_688; __rev1_688 = __builtin_shufflevector(__s1_688, __s1_688, 3, 2, 1, 0); \ | |
| 56660 | float32_t __ret_688; \ | |
| 56661 | __ret_688 = vmulxs_f32(__s0_688, __noswap_vgetq_lane_f32(__rev1_688, __p2_688)); \ | |
| 56662 | __ret_688; \ | |
| 54993 | 56663 | }) |
| 54994 | 56664 | #endif |
| 54995 | 56665 | |
| 54996 | 56666 | #ifdef __LITTLE_ENDIAN__ |
| 54997 | #define vmulxq_laneq_f64(__p0_597, __p1_597, __p2_597) __extension__ ({ \ | |
| 54998 | float64x2_t __s0_597 = __p0_597; \ | |
| 54999 | float64x2_t __s1_597 = __p1_597; \ | |
| 55000 | float64x2_t __ret_597; \ | |
| 55001 | __ret_597 = vmulxq_f64(__s0_597, splatq_laneq_f64(__s1_597, __p2_597)); \ | |
| 55002 | __ret_597; \ | |
| 56667 | #define vmulxq_laneq_f64(__p0_689, __p1_689, __p2_689) __extension__ ({ \ | |
| 56668 | float64x2_t __s0_689 = __p0_689; \ | |
| 56669 | float64x2_t __s1_689 = __p1_689; \ | |
| 56670 | float64x2_t __ret_689; \ | |
| 56671 | __ret_689 = vmulxq_f64(__s0_689, splatq_laneq_f64(__s1_689, __p2_689)); \ | |
| 56672 | __ret_689; \ | |
| 55003 | 56673 | }) |
| 55004 | 56674 | #else |
| 55005 | #define vmulxq_laneq_f64(__p0_598, __p1_598, __p2_598) __extension__ ({ \ | |
| 55006 | float64x2_t __s0_598 = __p0_598; \ | |
| 55007 | float64x2_t __s1_598 = __p1_598; \ | |
| 55008 | float64x2_t __rev0_598; __rev0_598 = __builtin_shufflevector(__s0_598, __s0_598, 1, 0); \ | |
| 55009 | float64x2_t __rev1_598; __rev1_598 = __builtin_shufflevector(__s1_598, __s1_598, 1, 0); \ | |
| 55010 | float64x2_t __ret_598; \ | |
| 55011 | __ret_598 = __noswap_vmulxq_f64(__rev0_598, __noswap_splatq_laneq_f64(__rev1_598, __p2_598)); \ | |
| 55012 | __ret_598 = __builtin_shufflevector(__ret_598, __ret_598, 1, 0); \ | |
| 55013 | __ret_598; \ | |
| 56675 | #define vmulxq_laneq_f64(__p0_690, __p1_690, __p2_690) __extension__ ({ \ | |
| 56676 | float64x2_t __s0_690 = __p0_690; \ | |
| 56677 | float64x2_t __s1_690 = __p1_690; \ | |
| 56678 | float64x2_t __rev0_690; __rev0_690 = __builtin_shufflevector(__s0_690, __s0_690, 1, 0); \ | |
| 56679 | float64x2_t __rev1_690; __rev1_690 = __builtin_shufflevector(__s1_690, __s1_690, 1, 0); \ | |
| 56680 | float64x2_t __ret_690; \ | |
| 56681 | __ret_690 = __noswap_vmulxq_f64(__rev0_690, __noswap_splatq_laneq_f64(__rev1_690, __p2_690)); \ | |
| 56682 | __ret_690 = __builtin_shufflevector(__ret_690, __ret_690, 1, 0); \ | |
| 56683 | __ret_690; \ | |
| 55014 | 56684 | }) |
| 55015 | 56685 | #endif |
| 55016 | 56686 | |
| 55017 | 56687 | #ifdef __LITTLE_ENDIAN__ |
| 55018 | #define vmulxq_laneq_f32(__p0_599, __p1_599, __p2_599) __extension__ ({ \ | |
| 55019 | float32x4_t __s0_599 = __p0_599; \ | |
| 55020 | float32x4_t __s1_599 = __p1_599; \ | |
| 55021 | float32x4_t __ret_599; \ | |
| 55022 | __ret_599 = vmulxq_f32(__s0_599, splatq_laneq_f32(__s1_599, __p2_599)); \ | |
| 55023 | __ret_599; \ | |
| 56688 | #define vmulxq_laneq_f32(__p0_691, __p1_691, __p2_691) __extension__ ({ \ | |
| 56689 | float32x4_t __s0_691 = __p0_691; \ | |
| 56690 | float32x4_t __s1_691 = __p1_691; \ | |
| 56691 | float32x4_t __ret_691; \ | |
| 56692 | __ret_691 = vmulxq_f32(__s0_691, splatq_laneq_f32(__s1_691, __p2_691)); \ | |
| 56693 | __ret_691; \ | |
| 55024 | 56694 | }) |
| 55025 | 56695 | #else |
| 55026 | #define vmulxq_laneq_f32(__p0_600, __p1_600, __p2_600) __extension__ ({ \ | |
| 55027 | float32x4_t __s0_600 = __p0_600; \ | |
| 55028 | float32x4_t __s1_600 = __p1_600; \ | |
| 55029 | float32x4_t __rev0_600; __rev0_600 = __builtin_shufflevector(__s0_600, __s0_600, 3, 2, 1, 0); \ | |
| 55030 | float32x4_t __rev1_600; __rev1_600 = __builtin_shufflevector(__s1_600, __s1_600, 3, 2, 1, 0); \ | |
| 55031 | float32x4_t __ret_600; \ | |
| 55032 | __ret_600 = __noswap_vmulxq_f32(__rev0_600, __noswap_splatq_laneq_f32(__rev1_600, __p2_600)); \ | |
| 55033 | __ret_600 = __builtin_shufflevector(__ret_600, __ret_600, 3, 2, 1, 0); \ | |
| 55034 | __ret_600; \ | |
| 56696 | #define vmulxq_laneq_f32(__p0_692, __p1_692, __p2_692) __extension__ ({ \ | |
| 56697 | float32x4_t __s0_692 = __p0_692; \ | |
| 56698 | float32x4_t __s1_692 = __p1_692; \ | |
| 56699 | float32x4_t __rev0_692; __rev0_692 = __builtin_shufflevector(__s0_692, __s0_692, 3, 2, 1, 0); \ | |
| 56700 | float32x4_t __rev1_692; __rev1_692 = __builtin_shufflevector(__s1_692, __s1_692, 3, 2, 1, 0); \ | |
| 56701 | float32x4_t __ret_692; \ | |
| 56702 | __ret_692 = __noswap_vmulxq_f32(__rev0_692, __noswap_splatq_laneq_f32(__rev1_692, __p2_692)); \ | |
| 56703 | __ret_692 = __builtin_shufflevector(__ret_692, __ret_692, 3, 2, 1, 0); \ | |
| 56704 | __ret_692; \ | |
| 55035 | 56705 | }) |
| 55036 | 56706 | #endif |
| 55037 | 56707 | |
| 55038 | 56708 | #ifdef __LITTLE_ENDIAN__ |
| 55039 | #define vmulx_laneq_f32(__p0_601, __p1_601, __p2_601) __extension__ ({ \ | |
| 55040 | float32x2_t __s0_601 = __p0_601; \ | |
| 55041 | float32x4_t __s1_601 = __p1_601; \ | |
| 55042 | float32x2_t __ret_601; \ | |
| 55043 | __ret_601 = vmulx_f32(__s0_601, splat_laneq_f32(__s1_601, __p2_601)); \ | |
| 55044 | __ret_601; \ | |
| 56709 | #define vmulx_laneq_f32(__p0_693, __p1_693, __p2_693) __extension__ ({ \ | |
| 56710 | float32x2_t __s0_693 = __p0_693; \ | |
| 56711 | float32x4_t __s1_693 = __p1_693; \ | |
| 56712 | float32x2_t __ret_693; \ | |
| 56713 | __ret_693 = vmulx_f32(__s0_693, splat_laneq_f32(__s1_693, __p2_693)); \ | |
| 56714 | __ret_693; \ | |
| 55045 | 56715 | }) |
| 55046 | 56716 | #else |
| 55047 | #define vmulx_laneq_f32(__p0_602, __p1_602, __p2_602) __extension__ ({ \ | |
| 55048 | float32x2_t __s0_602 = __p0_602; \ | |
| 55049 | float32x4_t __s1_602 = __p1_602; \ | |
| 55050 | float32x2_t __rev0_602; __rev0_602 = __builtin_shufflevector(__s0_602, __s0_602, 1, 0); \ | |
| 55051 | float32x4_t __rev1_602; __rev1_602 = __builtin_shufflevector(__s1_602, __s1_602, 3, 2, 1, 0); \ | |
| 55052 | float32x2_t __ret_602; \ | |
| 55053 | __ret_602 = __noswap_vmulx_f32(__rev0_602, __noswap_splat_laneq_f32(__rev1_602, __p2_602)); \ | |
| 55054 | __ret_602 = __builtin_shufflevector(__ret_602, __ret_602, 1, 0); \ | |
| 55055 | __ret_602; \ | |
| 56717 | #define vmulx_laneq_f32(__p0_694, __p1_694, __p2_694) __extension__ ({ \ | |
| 56718 | float32x2_t __s0_694 = __p0_694; \ | |
| 56719 | float32x4_t __s1_694 = __p1_694; \ | |
| 56720 | float32x2_t __rev0_694; __rev0_694 = __builtin_shufflevector(__s0_694, __s0_694, 1, 0); \ | |
| 56721 | float32x4_t __rev1_694; __rev1_694 = __builtin_shufflevector(__s1_694, __s1_694, 3, 2, 1, 0); \ | |
| 56722 | float32x2_t __ret_694; \ | |
| 56723 | __ret_694 = __noswap_vmulx_f32(__rev0_694, __noswap_splat_laneq_f32(__rev1_694, __p2_694)); \ | |
| 56724 | __ret_694 = __builtin_shufflevector(__ret_694, __ret_694, 1, 0); \ | |
| 56725 | __ret_694; \ | |
| 55056 | 56726 | }) |
| 55057 | 56727 | #endif |
| 55058 | 56728 | |
| ... | ... | @@ -55955,98 +57625,98 @@ __ai int32x4_t vqdmlal_high_s16(int32x4_t __p0, int16x8_t __p1, int16x8_t __p2) |
| 55955 | 57625 | #endif |
| 55956 | 57626 | |
| 55957 | 57627 | #ifdef __LITTLE_ENDIAN__ |
| 55958 | #define vqdmlal_high_lane_s32(__p0_603, __p1_603, __p2_603, __p3_603) __extension__ ({ \ | |
| 55959 | int64x2_t __s0_603 = __p0_603; \ | |
| 55960 | int32x4_t __s1_603 = __p1_603; \ | |
| 55961 | int32x2_t __s2_603 = __p2_603; \ | |
| 55962 | int64x2_t __ret_603; \ | |
| 55963 | __ret_603 = vqdmlal_s32(__s0_603, vget_high_s32(__s1_603), splat_lane_s32(__s2_603, __p3_603)); \ | |
| 55964 | __ret_603; \ | |
| 57628 | #define vqdmlal_high_lane_s32(__p0_695, __p1_695, __p2_695, __p3_695) __extension__ ({ \ | |
| 57629 | int64x2_t __s0_695 = __p0_695; \ | |
| 57630 | int32x4_t __s1_695 = __p1_695; \ | |
| 57631 | int32x2_t __s2_695 = __p2_695; \ | |
| 57632 | int64x2_t __ret_695; \ | |
| 57633 | __ret_695 = vqdmlal_s32(__s0_695, vget_high_s32(__s1_695), splat_lane_s32(__s2_695, __p3_695)); \ | |
| 57634 | __ret_695; \ | |
| 55965 | 57635 | }) |
| 55966 | 57636 | #else |
| 55967 | #define vqdmlal_high_lane_s32(__p0_604, __p1_604, __p2_604, __p3_604) __extension__ ({ \ | |
| 55968 | int64x2_t __s0_604 = __p0_604; \ | |
| 55969 | int32x4_t __s1_604 = __p1_604; \ | |
| 55970 | int32x2_t __s2_604 = __p2_604; \ | |
| 55971 | int64x2_t __rev0_604; __rev0_604 = __builtin_shufflevector(__s0_604, __s0_604, 1, 0); \ | |
| 55972 | int32x4_t __rev1_604; __rev1_604 = __builtin_shufflevector(__s1_604, __s1_604, 3, 2, 1, 0); \ | |
| 55973 | int32x2_t __rev2_604; __rev2_604 = __builtin_shufflevector(__s2_604, __s2_604, 1, 0); \ | |
| 55974 | int64x2_t __ret_604; \ | |
| 55975 | __ret_604 = __noswap_vqdmlal_s32(__rev0_604, __noswap_vget_high_s32(__rev1_604), __noswap_splat_lane_s32(__rev2_604, __p3_604)); \ | |
| 55976 | __ret_604 = __builtin_shufflevector(__ret_604, __ret_604, 1, 0); \ | |
| 55977 | __ret_604; \ | |
| 57637 | #define vqdmlal_high_lane_s32(__p0_696, __p1_696, __p2_696, __p3_696) __extension__ ({ \ | |
| 57638 | int64x2_t __s0_696 = __p0_696; \ | |
| 57639 | int32x4_t __s1_696 = __p1_696; \ | |
| 57640 | int32x2_t __s2_696 = __p2_696; \ | |
| 57641 | int64x2_t __rev0_696; __rev0_696 = __builtin_shufflevector(__s0_696, __s0_696, 1, 0); \ | |
| 57642 | int32x4_t __rev1_696; __rev1_696 = __builtin_shufflevector(__s1_696, __s1_696, 3, 2, 1, 0); \ | |
| 57643 | int32x2_t __rev2_696; __rev2_696 = __builtin_shufflevector(__s2_696, __s2_696, 1, 0); \ | |
| 57644 | int64x2_t __ret_696; \ | |
| 57645 | __ret_696 = __noswap_vqdmlal_s32(__rev0_696, __noswap_vget_high_s32(__rev1_696), __noswap_splat_lane_s32(__rev2_696, __p3_696)); \ | |
| 57646 | __ret_696 = __builtin_shufflevector(__ret_696, __ret_696, 1, 0); \ | |
| 57647 | __ret_696; \ | |
| 55978 | 57648 | }) |
| 55979 | 57649 | #endif |
| 55980 | 57650 | |
| 55981 | 57651 | #ifdef __LITTLE_ENDIAN__ |
| 55982 | #define vqdmlal_high_lane_s16(__p0_605, __p1_605, __p2_605, __p3_605) __extension__ ({ \ | |
| 55983 | int32x4_t __s0_605 = __p0_605; \ | |
| 55984 | int16x8_t __s1_605 = __p1_605; \ | |
| 55985 | int16x4_t __s2_605 = __p2_605; \ | |
| 55986 | int32x4_t __ret_605; \ | |
| 55987 | __ret_605 = vqdmlal_s16(__s0_605, vget_high_s16(__s1_605), splat_lane_s16(__s2_605, __p3_605)); \ | |
| 55988 | __ret_605; \ | |
| 57652 | #define vqdmlal_high_lane_s16(__p0_697, __p1_697, __p2_697, __p3_697) __extension__ ({ \ | |
| 57653 | int32x4_t __s0_697 = __p0_697; \ | |
| 57654 | int16x8_t __s1_697 = __p1_697; \ | |
| 57655 | int16x4_t __s2_697 = __p2_697; \ | |
| 57656 | int32x4_t __ret_697; \ | |
| 57657 | __ret_697 = vqdmlal_s16(__s0_697, vget_high_s16(__s1_697), splat_lane_s16(__s2_697, __p3_697)); \ | |
| 57658 | __ret_697; \ | |
| 55989 | 57659 | }) |
| 55990 | 57660 | #else |
| 55991 | #define vqdmlal_high_lane_s16(__p0_606, __p1_606, __p2_606, __p3_606) __extension__ ({ \ | |
| 55992 | int32x4_t __s0_606 = __p0_606; \ | |
| 55993 | int16x8_t __s1_606 = __p1_606; \ | |
| 55994 | int16x4_t __s2_606 = __p2_606; \ | |
| 55995 | int32x4_t __rev0_606; __rev0_606 = __builtin_shufflevector(__s0_606, __s0_606, 3, 2, 1, 0); \ | |
| 55996 | int16x8_t __rev1_606; __rev1_606 = __builtin_shufflevector(__s1_606, __s1_606, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 55997 | int16x4_t __rev2_606; __rev2_606 = __builtin_shufflevector(__s2_606, __s2_606, 3, 2, 1, 0); \ | |
| 55998 | int32x4_t __ret_606; \ | |
| 55999 | __ret_606 = __noswap_vqdmlal_s16(__rev0_606, __noswap_vget_high_s16(__rev1_606), __noswap_splat_lane_s16(__rev2_606, __p3_606)); \ | |
| 56000 | __ret_606 = __builtin_shufflevector(__ret_606, __ret_606, 3, 2, 1, 0); \ | |
| 56001 | __ret_606; \ | |
| 57661 | #define vqdmlal_high_lane_s16(__p0_698, __p1_698, __p2_698, __p3_698) __extension__ ({ \ | |
| 57662 | int32x4_t __s0_698 = __p0_698; \ | |
| 57663 | int16x8_t __s1_698 = __p1_698; \ | |
| 57664 | int16x4_t __s2_698 = __p2_698; \ | |
| 57665 | int32x4_t __rev0_698; __rev0_698 = __builtin_shufflevector(__s0_698, __s0_698, 3, 2, 1, 0); \ | |
| 57666 | int16x8_t __rev1_698; __rev1_698 = __builtin_shufflevector(__s1_698, __s1_698, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57667 | int16x4_t __rev2_698; __rev2_698 = __builtin_shufflevector(__s2_698, __s2_698, 3, 2, 1, 0); \ | |
| 57668 | int32x4_t __ret_698; \ | |
| 57669 | __ret_698 = __noswap_vqdmlal_s16(__rev0_698, __noswap_vget_high_s16(__rev1_698), __noswap_splat_lane_s16(__rev2_698, __p3_698)); \ | |
| 57670 | __ret_698 = __builtin_shufflevector(__ret_698, __ret_698, 3, 2, 1, 0); \ | |
| 57671 | __ret_698; \ | |
| 56002 | 57672 | }) |
| 56003 | 57673 | #endif |
| 56004 | 57674 | |
| 56005 | 57675 | #ifdef __LITTLE_ENDIAN__ |
| 56006 | #define vqdmlal_high_laneq_s32(__p0_607, __p1_607, __p2_607, __p3_607) __extension__ ({ \ | |
| 56007 | int64x2_t __s0_607 = __p0_607; \ | |
| 56008 | int32x4_t __s1_607 = __p1_607; \ | |
| 56009 | int32x4_t __s2_607 = __p2_607; \ | |
| 56010 | int64x2_t __ret_607; \ | |
| 56011 | __ret_607 = vqdmlal_s32(__s0_607, vget_high_s32(__s1_607), splat_laneq_s32(__s2_607, __p3_607)); \ | |
| 56012 | __ret_607; \ | |
| 57676 | #define vqdmlal_high_laneq_s32(__p0_699, __p1_699, __p2_699, __p3_699) __extension__ ({ \ | |
| 57677 | int64x2_t __s0_699 = __p0_699; \ | |
| 57678 | int32x4_t __s1_699 = __p1_699; \ | |
| 57679 | int32x4_t __s2_699 = __p2_699; \ | |
| 57680 | int64x2_t __ret_699; \ | |
| 57681 | __ret_699 = vqdmlal_s32(__s0_699, vget_high_s32(__s1_699), splat_laneq_s32(__s2_699, __p3_699)); \ | |
| 57682 | __ret_699; \ | |
| 56013 | 57683 | }) |
| 56014 | 57684 | #else |
| 56015 | #define vqdmlal_high_laneq_s32(__p0_608, __p1_608, __p2_608, __p3_608) __extension__ ({ \ | |
| 56016 | int64x2_t __s0_608 = __p0_608; \ | |
| 56017 | int32x4_t __s1_608 = __p1_608; \ | |
| 56018 | int32x4_t __s2_608 = __p2_608; \ | |
| 56019 | int64x2_t __rev0_608; __rev0_608 = __builtin_shufflevector(__s0_608, __s0_608, 1, 0); \ | |
| 56020 | int32x4_t __rev1_608; __rev1_608 = __builtin_shufflevector(__s1_608, __s1_608, 3, 2, 1, 0); \ | |
| 56021 | int32x4_t __rev2_608; __rev2_608 = __builtin_shufflevector(__s2_608, __s2_608, 3, 2, 1, 0); \ | |
| 56022 | int64x2_t __ret_608; \ | |
| 56023 | __ret_608 = __noswap_vqdmlal_s32(__rev0_608, __noswap_vget_high_s32(__rev1_608), __noswap_splat_laneq_s32(__rev2_608, __p3_608)); \ | |
| 56024 | __ret_608 = __builtin_shufflevector(__ret_608, __ret_608, 1, 0); \ | |
| 56025 | __ret_608; \ | |
| 57685 | #define vqdmlal_high_laneq_s32(__p0_700, __p1_700, __p2_700, __p3_700) __extension__ ({ \ | |
| 57686 | int64x2_t __s0_700 = __p0_700; \ | |
| 57687 | int32x4_t __s1_700 = __p1_700; \ | |
| 57688 | int32x4_t __s2_700 = __p2_700; \ | |
| 57689 | int64x2_t __rev0_700; __rev0_700 = __builtin_shufflevector(__s0_700, __s0_700, 1, 0); \ | |
| 57690 | int32x4_t __rev1_700; __rev1_700 = __builtin_shufflevector(__s1_700, __s1_700, 3, 2, 1, 0); \ | |
| 57691 | int32x4_t __rev2_700; __rev2_700 = __builtin_shufflevector(__s2_700, __s2_700, 3, 2, 1, 0); \ | |
| 57692 | int64x2_t __ret_700; \ | |
| 57693 | __ret_700 = __noswap_vqdmlal_s32(__rev0_700, __noswap_vget_high_s32(__rev1_700), __noswap_splat_laneq_s32(__rev2_700, __p3_700)); \ | |
| 57694 | __ret_700 = __builtin_shufflevector(__ret_700, __ret_700, 1, 0); \ | |
| 57695 | __ret_700; \ | |
| 56026 | 57696 | }) |
| 56027 | 57697 | #endif |
| 56028 | 57698 | |
| 56029 | 57699 | #ifdef __LITTLE_ENDIAN__ |
| 56030 | #define vqdmlal_high_laneq_s16(__p0_609, __p1_609, __p2_609, __p3_609) __extension__ ({ \ | |
| 56031 | int32x4_t __s0_609 = __p0_609; \ | |
| 56032 | int16x8_t __s1_609 = __p1_609; \ | |
| 56033 | int16x8_t __s2_609 = __p2_609; \ | |
| 56034 | int32x4_t __ret_609; \ | |
| 56035 | __ret_609 = vqdmlal_s16(__s0_609, vget_high_s16(__s1_609), splat_laneq_s16(__s2_609, __p3_609)); \ | |
| 56036 | __ret_609; \ | |
| 57700 | #define vqdmlal_high_laneq_s16(__p0_701, __p1_701, __p2_701, __p3_701) __extension__ ({ \ | |
| 57701 | int32x4_t __s0_701 = __p0_701; \ | |
| 57702 | int16x8_t __s1_701 = __p1_701; \ | |
| 57703 | int16x8_t __s2_701 = __p2_701; \ | |
| 57704 | int32x4_t __ret_701; \ | |
| 57705 | __ret_701 = vqdmlal_s16(__s0_701, vget_high_s16(__s1_701), splat_laneq_s16(__s2_701, __p3_701)); \ | |
| 57706 | __ret_701; \ | |
| 56037 | 57707 | }) |
| 56038 | 57708 | #else |
| 56039 | #define vqdmlal_high_laneq_s16(__p0_610, __p1_610, __p2_610, __p3_610) __extension__ ({ \ | |
| 56040 | int32x4_t __s0_610 = __p0_610; \ | |
| 56041 | int16x8_t __s1_610 = __p1_610; \ | |
| 56042 | int16x8_t __s2_610 = __p2_610; \ | |
| 56043 | int32x4_t __rev0_610; __rev0_610 = __builtin_shufflevector(__s0_610, __s0_610, 3, 2, 1, 0); \ | |
| 56044 | int16x8_t __rev1_610; __rev1_610 = __builtin_shufflevector(__s1_610, __s1_610, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56045 | int16x8_t __rev2_610; __rev2_610 = __builtin_shufflevector(__s2_610, __s2_610, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56046 | int32x4_t __ret_610; \ | |
| 56047 | __ret_610 = __noswap_vqdmlal_s16(__rev0_610, __noswap_vget_high_s16(__rev1_610), __noswap_splat_laneq_s16(__rev2_610, __p3_610)); \ | |
| 56048 | __ret_610 = __builtin_shufflevector(__ret_610, __ret_610, 3, 2, 1, 0); \ | |
| 56049 | __ret_610; \ | |
| 57709 | #define vqdmlal_high_laneq_s16(__p0_702, __p1_702, __p2_702, __p3_702) __extension__ ({ \ | |
| 57710 | int32x4_t __s0_702 = __p0_702; \ | |
| 57711 | int16x8_t __s1_702 = __p1_702; \ | |
| 57712 | int16x8_t __s2_702 = __p2_702; \ | |
| 57713 | int32x4_t __rev0_702; __rev0_702 = __builtin_shufflevector(__s0_702, __s0_702, 3, 2, 1, 0); \ | |
| 57714 | int16x8_t __rev1_702; __rev1_702 = __builtin_shufflevector(__s1_702, __s1_702, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57715 | int16x8_t __rev2_702; __rev2_702 = __builtin_shufflevector(__s2_702, __s2_702, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57716 | int32x4_t __ret_702; \ | |
| 57717 | __ret_702 = __noswap_vqdmlal_s16(__rev0_702, __noswap_vget_high_s16(__rev1_702), __noswap_splat_laneq_s16(__rev2_702, __p3_702)); \ | |
| 57718 | __ret_702 = __builtin_shufflevector(__ret_702, __ret_702, 3, 2, 1, 0); \ | |
| 57719 | __ret_702; \ | |
| 56050 | 57720 | }) |
| 56051 | 57721 | #endif |
| 56052 | 57722 | |
| ... | ... | @@ -56169,50 +57839,50 @@ __ai int32x4_t vqdmlal_high_n_s16(int32x4_t __p0, int16x8_t __p1, int16_t __p2) |
| 56169 | 57839 | #endif |
| 56170 | 57840 | |
| 56171 | 57841 | #ifdef __LITTLE_ENDIAN__ |
| 56172 | #define vqdmlal_laneq_s32(__p0_611, __p1_611, __p2_611, __p3_611) __extension__ ({ \ | |
| 56173 | int64x2_t __s0_611 = __p0_611; \ | |
| 56174 | int32x2_t __s1_611 = __p1_611; \ | |
| 56175 | int32x4_t __s2_611 = __p2_611; \ | |
| 56176 | int64x2_t __ret_611; \ | |
| 56177 | __ret_611 = vqdmlal_s32(__s0_611, __s1_611, splat_laneq_s32(__s2_611, __p3_611)); \ | |
| 56178 | __ret_611; \ | |
| 57842 | #define vqdmlal_laneq_s32(__p0_703, __p1_703, __p2_703, __p3_703) __extension__ ({ \ | |
| 57843 | int64x2_t __s0_703 = __p0_703; \ | |
| 57844 | int32x2_t __s1_703 = __p1_703; \ | |
| 57845 | int32x4_t __s2_703 = __p2_703; \ | |
| 57846 | int64x2_t __ret_703; \ | |
| 57847 | __ret_703 = vqdmlal_s32(__s0_703, __s1_703, splat_laneq_s32(__s2_703, __p3_703)); \ | |
| 57848 | __ret_703; \ | |
| 56179 | 57849 | }) |
| 56180 | 57850 | #else |
| 56181 | #define vqdmlal_laneq_s32(__p0_612, __p1_612, __p2_612, __p3_612) __extension__ ({ \ | |
| 56182 | int64x2_t __s0_612 = __p0_612; \ | |
| 56183 | int32x2_t __s1_612 = __p1_612; \ | |
| 56184 | int32x4_t __s2_612 = __p2_612; \ | |
| 56185 | int64x2_t __rev0_612; __rev0_612 = __builtin_shufflevector(__s0_612, __s0_612, 1, 0); \ | |
| 56186 | int32x2_t __rev1_612; __rev1_612 = __builtin_shufflevector(__s1_612, __s1_612, 1, 0); \ | |
| 56187 | int32x4_t __rev2_612; __rev2_612 = __builtin_shufflevector(__s2_612, __s2_612, 3, 2, 1, 0); \ | |
| 56188 | int64x2_t __ret_612; \ | |
| 56189 | __ret_612 = __noswap_vqdmlal_s32(__rev0_612, __rev1_612, __noswap_splat_laneq_s32(__rev2_612, __p3_612)); \ | |
| 56190 | __ret_612 = __builtin_shufflevector(__ret_612, __ret_612, 1, 0); \ | |
| 56191 | __ret_612; \ | |
| 57851 | #define vqdmlal_laneq_s32(__p0_704, __p1_704, __p2_704, __p3_704) __extension__ ({ \ | |
| 57852 | int64x2_t __s0_704 = __p0_704; \ | |
| 57853 | int32x2_t __s1_704 = __p1_704; \ | |
| 57854 | int32x4_t __s2_704 = __p2_704; \ | |
| 57855 | int64x2_t __rev0_704; __rev0_704 = __builtin_shufflevector(__s0_704, __s0_704, 1, 0); \ | |
| 57856 | int32x2_t __rev1_704; __rev1_704 = __builtin_shufflevector(__s1_704, __s1_704, 1, 0); \ | |
| 57857 | int32x4_t __rev2_704; __rev2_704 = __builtin_shufflevector(__s2_704, __s2_704, 3, 2, 1, 0); \ | |
| 57858 | int64x2_t __ret_704; \ | |
| 57859 | __ret_704 = __noswap_vqdmlal_s32(__rev0_704, __rev1_704, __noswap_splat_laneq_s32(__rev2_704, __p3_704)); \ | |
| 57860 | __ret_704 = __builtin_shufflevector(__ret_704, __ret_704, 1, 0); \ | |
| 57861 | __ret_704; \ | |
| 56192 | 57862 | }) |
| 56193 | 57863 | #endif |
| 56194 | 57864 | |
| 56195 | 57865 | #ifdef __LITTLE_ENDIAN__ |
| 56196 | #define vqdmlal_laneq_s16(__p0_613, __p1_613, __p2_613, __p3_613) __extension__ ({ \ | |
| 56197 | int32x4_t __s0_613 = __p0_613; \ | |
| 56198 | int16x4_t __s1_613 = __p1_613; \ | |
| 56199 | int16x8_t __s2_613 = __p2_613; \ | |
| 56200 | int32x4_t __ret_613; \ | |
| 56201 | __ret_613 = vqdmlal_s16(__s0_613, __s1_613, splat_laneq_s16(__s2_613, __p3_613)); \ | |
| 56202 | __ret_613; \ | |
| 57866 | #define vqdmlal_laneq_s16(__p0_705, __p1_705, __p2_705, __p3_705) __extension__ ({ \ | |
| 57867 | int32x4_t __s0_705 = __p0_705; \ | |
| 57868 | int16x4_t __s1_705 = __p1_705; \ | |
| 57869 | int16x8_t __s2_705 = __p2_705; \ | |
| 57870 | int32x4_t __ret_705; \ | |
| 57871 | __ret_705 = vqdmlal_s16(__s0_705, __s1_705, splat_laneq_s16(__s2_705, __p3_705)); \ | |
| 57872 | __ret_705; \ | |
| 56203 | 57873 | }) |
| 56204 | 57874 | #else |
| 56205 | #define vqdmlal_laneq_s16(__p0_614, __p1_614, __p2_614, __p3_614) __extension__ ({ \ | |
| 56206 | int32x4_t __s0_614 = __p0_614; \ | |
| 56207 | int16x4_t __s1_614 = __p1_614; \ | |
| 56208 | int16x8_t __s2_614 = __p2_614; \ | |
| 56209 | int32x4_t __rev0_614; __rev0_614 = __builtin_shufflevector(__s0_614, __s0_614, 3, 2, 1, 0); \ | |
| 56210 | int16x4_t __rev1_614; __rev1_614 = __builtin_shufflevector(__s1_614, __s1_614, 3, 2, 1, 0); \ | |
| 56211 | int16x8_t __rev2_614; __rev2_614 = __builtin_shufflevector(__s2_614, __s2_614, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56212 | int32x4_t __ret_614; \ | |
| 56213 | __ret_614 = __noswap_vqdmlal_s16(__rev0_614, __rev1_614, __noswap_splat_laneq_s16(__rev2_614, __p3_614)); \ | |
| 56214 | __ret_614 = __builtin_shufflevector(__ret_614, __ret_614, 3, 2, 1, 0); \ | |
| 56215 | __ret_614; \ | |
| 57875 | #define vqdmlal_laneq_s16(__p0_706, __p1_706, __p2_706, __p3_706) __extension__ ({ \ | |
| 57876 | int32x4_t __s0_706 = __p0_706; \ | |
| 57877 | int16x4_t __s1_706 = __p1_706; \ | |
| 57878 | int16x8_t __s2_706 = __p2_706; \ | |
| 57879 | int32x4_t __rev0_706; __rev0_706 = __builtin_shufflevector(__s0_706, __s0_706, 3, 2, 1, 0); \ | |
| 57880 | int16x4_t __rev1_706; __rev1_706 = __builtin_shufflevector(__s1_706, __s1_706, 3, 2, 1, 0); \ | |
| 57881 | int16x8_t __rev2_706; __rev2_706 = __builtin_shufflevector(__s2_706, __s2_706, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57882 | int32x4_t __ret_706; \ | |
| 57883 | __ret_706 = __noswap_vqdmlal_s16(__rev0_706, __rev1_706, __noswap_splat_laneq_s16(__rev2_706, __p3_706)); \ | |
| 57884 | __ret_706 = __builtin_shufflevector(__ret_706, __ret_706, 3, 2, 1, 0); \ | |
| 57885 | __ret_706; \ | |
| 56216 | 57886 | }) |
| 56217 | 57887 | #endif |
| 56218 | 57888 | |
| ... | ... | @@ -56263,98 +57933,98 @@ __ai int32x4_t vqdmlsl_high_s16(int32x4_t __p0, int16x8_t __p1, int16x8_t __p2) |
| 56263 | 57933 | #endif |
| 56264 | 57934 | |
| 56265 | 57935 | #ifdef __LITTLE_ENDIAN__ |
| 56266 | #define vqdmlsl_high_lane_s32(__p0_615, __p1_615, __p2_615, __p3_615) __extension__ ({ \ | |
| 56267 | int64x2_t __s0_615 = __p0_615; \ | |
| 56268 | int32x4_t __s1_615 = __p1_615; \ | |
| 56269 | int32x2_t __s2_615 = __p2_615; \ | |
| 56270 | int64x2_t __ret_615; \ | |
| 56271 | __ret_615 = vqdmlsl_s32(__s0_615, vget_high_s32(__s1_615), splat_lane_s32(__s2_615, __p3_615)); \ | |
| 56272 | __ret_615; \ | |
| 57936 | #define vqdmlsl_high_lane_s32(__p0_707, __p1_707, __p2_707, __p3_707) __extension__ ({ \ | |
| 57937 | int64x2_t __s0_707 = __p0_707; \ | |
| 57938 | int32x4_t __s1_707 = __p1_707; \ | |
| 57939 | int32x2_t __s2_707 = __p2_707; \ | |
| 57940 | int64x2_t __ret_707; \ | |
| 57941 | __ret_707 = vqdmlsl_s32(__s0_707, vget_high_s32(__s1_707), splat_lane_s32(__s2_707, __p3_707)); \ | |
| 57942 | __ret_707; \ | |
| 56273 | 57943 | }) |
| 56274 | 57944 | #else |
| 56275 | #define vqdmlsl_high_lane_s32(__p0_616, __p1_616, __p2_616, __p3_616) __extension__ ({ \ | |
| 56276 | int64x2_t __s0_616 = __p0_616; \ | |
| 56277 | int32x4_t __s1_616 = __p1_616; \ | |
| 56278 | int32x2_t __s2_616 = __p2_616; \ | |
| 56279 | int64x2_t __rev0_616; __rev0_616 = __builtin_shufflevector(__s0_616, __s0_616, 1, 0); \ | |
| 56280 | int32x4_t __rev1_616; __rev1_616 = __builtin_shufflevector(__s1_616, __s1_616, 3, 2, 1, 0); \ | |
| 56281 | int32x2_t __rev2_616; __rev2_616 = __builtin_shufflevector(__s2_616, __s2_616, 1, 0); \ | |
| 56282 | int64x2_t __ret_616; \ | |
| 56283 | __ret_616 = __noswap_vqdmlsl_s32(__rev0_616, __noswap_vget_high_s32(__rev1_616), __noswap_splat_lane_s32(__rev2_616, __p3_616)); \ | |
| 56284 | __ret_616 = __builtin_shufflevector(__ret_616, __ret_616, 1, 0); \ | |
| 56285 | __ret_616; \ | |
| 57945 | #define vqdmlsl_high_lane_s32(__p0_708, __p1_708, __p2_708, __p3_708) __extension__ ({ \ | |
| 57946 | int64x2_t __s0_708 = __p0_708; \ | |
| 57947 | int32x4_t __s1_708 = __p1_708; \ | |
| 57948 | int32x2_t __s2_708 = __p2_708; \ | |
| 57949 | int64x2_t __rev0_708; __rev0_708 = __builtin_shufflevector(__s0_708, __s0_708, 1, 0); \ | |
| 57950 | int32x4_t __rev1_708; __rev1_708 = __builtin_shufflevector(__s1_708, __s1_708, 3, 2, 1, 0); \ | |
| 57951 | int32x2_t __rev2_708; __rev2_708 = __builtin_shufflevector(__s2_708, __s2_708, 1, 0); \ | |
| 57952 | int64x2_t __ret_708; \ | |
| 57953 | __ret_708 = __noswap_vqdmlsl_s32(__rev0_708, __noswap_vget_high_s32(__rev1_708), __noswap_splat_lane_s32(__rev2_708, __p3_708)); \ | |
| 57954 | __ret_708 = __builtin_shufflevector(__ret_708, __ret_708, 1, 0); \ | |
| 57955 | __ret_708; \ | |
| 56286 | 57956 | }) |
| 56287 | 57957 | #endif |
| 56288 | 57958 | |
| 56289 | 57959 | #ifdef __LITTLE_ENDIAN__ |
| 56290 | #define vqdmlsl_high_lane_s16(__p0_617, __p1_617, __p2_617, __p3_617) __extension__ ({ \ | |
| 56291 | int32x4_t __s0_617 = __p0_617; \ | |
| 56292 | int16x8_t __s1_617 = __p1_617; \ | |
| 56293 | int16x4_t __s2_617 = __p2_617; \ | |
| 56294 | int32x4_t __ret_617; \ | |
| 56295 | __ret_617 = vqdmlsl_s16(__s0_617, vget_high_s16(__s1_617), splat_lane_s16(__s2_617, __p3_617)); \ | |
| 56296 | __ret_617; \ | |
| 57960 | #define vqdmlsl_high_lane_s16(__p0_709, __p1_709, __p2_709, __p3_709) __extension__ ({ \ | |
| 57961 | int32x4_t __s0_709 = __p0_709; \ | |
| 57962 | int16x8_t __s1_709 = __p1_709; \ | |
| 57963 | int16x4_t __s2_709 = __p2_709; \ | |
| 57964 | int32x4_t __ret_709; \ | |
| 57965 | __ret_709 = vqdmlsl_s16(__s0_709, vget_high_s16(__s1_709), splat_lane_s16(__s2_709, __p3_709)); \ | |
| 57966 | __ret_709; \ | |
| 56297 | 57967 | }) |
| 56298 | 57968 | #else |
| 56299 | #define vqdmlsl_high_lane_s16(__p0_618, __p1_618, __p2_618, __p3_618) __extension__ ({ \ | |
| 56300 | int32x4_t __s0_618 = __p0_618; \ | |
| 56301 | int16x8_t __s1_618 = __p1_618; \ | |
| 56302 | int16x4_t __s2_618 = __p2_618; \ | |
| 56303 | int32x4_t __rev0_618; __rev0_618 = __builtin_shufflevector(__s0_618, __s0_618, 3, 2, 1, 0); \ | |
| 56304 | int16x8_t __rev1_618; __rev1_618 = __builtin_shufflevector(__s1_618, __s1_618, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56305 | int16x4_t __rev2_618; __rev2_618 = __builtin_shufflevector(__s2_618, __s2_618, 3, 2, 1, 0); \ | |
| 56306 | int32x4_t __ret_618; \ | |
| 56307 | __ret_618 = __noswap_vqdmlsl_s16(__rev0_618, __noswap_vget_high_s16(__rev1_618), __noswap_splat_lane_s16(__rev2_618, __p3_618)); \ | |
| 56308 | __ret_618 = __builtin_shufflevector(__ret_618, __ret_618, 3, 2, 1, 0); \ | |
| 56309 | __ret_618; \ | |
| 57969 | #define vqdmlsl_high_lane_s16(__p0_710, __p1_710, __p2_710, __p3_710) __extension__ ({ \ | |
| 57970 | int32x4_t __s0_710 = __p0_710; \ | |
| 57971 | int16x8_t __s1_710 = __p1_710; \ | |
| 57972 | int16x4_t __s2_710 = __p2_710; \ | |
| 57973 | int32x4_t __rev0_710; __rev0_710 = __builtin_shufflevector(__s0_710, __s0_710, 3, 2, 1, 0); \ | |
| 57974 | int16x8_t __rev1_710; __rev1_710 = __builtin_shufflevector(__s1_710, __s1_710, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57975 | int16x4_t __rev2_710; __rev2_710 = __builtin_shufflevector(__s2_710, __s2_710, 3, 2, 1, 0); \ | |
| 57976 | int32x4_t __ret_710; \ | |
| 57977 | __ret_710 = __noswap_vqdmlsl_s16(__rev0_710, __noswap_vget_high_s16(__rev1_710), __noswap_splat_lane_s16(__rev2_710, __p3_710)); \ | |
| 57978 | __ret_710 = __builtin_shufflevector(__ret_710, __ret_710, 3, 2, 1, 0); \ | |
| 57979 | __ret_710; \ | |
| 56310 | 57980 | }) |
| 56311 | 57981 | #endif |
| 56312 | 57982 | |
| 56313 | 57983 | #ifdef __LITTLE_ENDIAN__ |
| 56314 | #define vqdmlsl_high_laneq_s32(__p0_619, __p1_619, __p2_619, __p3_619) __extension__ ({ \ | |
| 56315 | int64x2_t __s0_619 = __p0_619; \ | |
| 56316 | int32x4_t __s1_619 = __p1_619; \ | |
| 56317 | int32x4_t __s2_619 = __p2_619; \ | |
| 56318 | int64x2_t __ret_619; \ | |
| 56319 | __ret_619 = vqdmlsl_s32(__s0_619, vget_high_s32(__s1_619), splat_laneq_s32(__s2_619, __p3_619)); \ | |
| 56320 | __ret_619; \ | |
| 57984 | #define vqdmlsl_high_laneq_s32(__p0_711, __p1_711, __p2_711, __p3_711) __extension__ ({ \ | |
| 57985 | int64x2_t __s0_711 = __p0_711; \ | |
| 57986 | int32x4_t __s1_711 = __p1_711; \ | |
| 57987 | int32x4_t __s2_711 = __p2_711; \ | |
| 57988 | int64x2_t __ret_711; \ | |
| 57989 | __ret_711 = vqdmlsl_s32(__s0_711, vget_high_s32(__s1_711), splat_laneq_s32(__s2_711, __p3_711)); \ | |
| 57990 | __ret_711; \ | |
| 56321 | 57991 | }) |
| 56322 | 57992 | #else |
| 56323 | #define vqdmlsl_high_laneq_s32(__p0_620, __p1_620, __p2_620, __p3_620) __extension__ ({ \ | |
| 56324 | int64x2_t __s0_620 = __p0_620; \ | |
| 56325 | int32x4_t __s1_620 = __p1_620; \ | |
| 56326 | int32x4_t __s2_620 = __p2_620; \ | |
| 56327 | int64x2_t __rev0_620; __rev0_620 = __builtin_shufflevector(__s0_620, __s0_620, 1, 0); \ | |
| 56328 | int32x4_t __rev1_620; __rev1_620 = __builtin_shufflevector(__s1_620, __s1_620, 3, 2, 1, 0); \ | |
| 56329 | int32x4_t __rev2_620; __rev2_620 = __builtin_shufflevector(__s2_620, __s2_620, 3, 2, 1, 0); \ | |
| 56330 | int64x2_t __ret_620; \ | |
| 56331 | __ret_620 = __noswap_vqdmlsl_s32(__rev0_620, __noswap_vget_high_s32(__rev1_620), __noswap_splat_laneq_s32(__rev2_620, __p3_620)); \ | |
| 56332 | __ret_620 = __builtin_shufflevector(__ret_620, __ret_620, 1, 0); \ | |
| 56333 | __ret_620; \ | |
| 57993 | #define vqdmlsl_high_laneq_s32(__p0_712, __p1_712, __p2_712, __p3_712) __extension__ ({ \ | |
| 57994 | int64x2_t __s0_712 = __p0_712; \ | |
| 57995 | int32x4_t __s1_712 = __p1_712; \ | |
| 57996 | int32x4_t __s2_712 = __p2_712; \ | |
| 57997 | int64x2_t __rev0_712; __rev0_712 = __builtin_shufflevector(__s0_712, __s0_712, 1, 0); \ | |
| 57998 | int32x4_t __rev1_712; __rev1_712 = __builtin_shufflevector(__s1_712, __s1_712, 3, 2, 1, 0); \ | |
| 57999 | int32x4_t __rev2_712; __rev2_712 = __builtin_shufflevector(__s2_712, __s2_712, 3, 2, 1, 0); \ | |
| 58000 | int64x2_t __ret_712; \ | |
| 58001 | __ret_712 = __noswap_vqdmlsl_s32(__rev0_712, __noswap_vget_high_s32(__rev1_712), __noswap_splat_laneq_s32(__rev2_712, __p3_712)); \ | |
| 58002 | __ret_712 = __builtin_shufflevector(__ret_712, __ret_712, 1, 0); \ | |
| 58003 | __ret_712; \ | |
| 56334 | 58004 | }) |
| 56335 | 58005 | #endif |
| 56336 | 58006 | |
| 56337 | 58007 | #ifdef __LITTLE_ENDIAN__ |
| 56338 | #define vqdmlsl_high_laneq_s16(__p0_621, __p1_621, __p2_621, __p3_621) __extension__ ({ \ | |
| 56339 | int32x4_t __s0_621 = __p0_621; \ | |
| 56340 | int16x8_t __s1_621 = __p1_621; \ | |
| 56341 | int16x8_t __s2_621 = __p2_621; \ | |
| 56342 | int32x4_t __ret_621; \ | |
| 56343 | __ret_621 = vqdmlsl_s16(__s0_621, vget_high_s16(__s1_621), splat_laneq_s16(__s2_621, __p3_621)); \ | |
| 56344 | __ret_621; \ | |
| 58008 | #define vqdmlsl_high_laneq_s16(__p0_713, __p1_713, __p2_713, __p3_713) __extension__ ({ \ | |
| 58009 | int32x4_t __s0_713 = __p0_713; \ | |
| 58010 | int16x8_t __s1_713 = __p1_713; \ | |
| 58011 | int16x8_t __s2_713 = __p2_713; \ | |
| 58012 | int32x4_t __ret_713; \ | |
| 58013 | __ret_713 = vqdmlsl_s16(__s0_713, vget_high_s16(__s1_713), splat_laneq_s16(__s2_713, __p3_713)); \ | |
| 58014 | __ret_713; \ | |
| 56345 | 58015 | }) |
| 56346 | 58016 | #else |
| 56347 | #define vqdmlsl_high_laneq_s16(__p0_622, __p1_622, __p2_622, __p3_622) __extension__ ({ \ | |
| 56348 | int32x4_t __s0_622 = __p0_622; \ | |
| 56349 | int16x8_t __s1_622 = __p1_622; \ | |
| 56350 | int16x8_t __s2_622 = __p2_622; \ | |
| 56351 | int32x4_t __rev0_622; __rev0_622 = __builtin_shufflevector(__s0_622, __s0_622, 3, 2, 1, 0); \ | |
| 56352 | int16x8_t __rev1_622; __rev1_622 = __builtin_shufflevector(__s1_622, __s1_622, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56353 | int16x8_t __rev2_622; __rev2_622 = __builtin_shufflevector(__s2_622, __s2_622, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56354 | int32x4_t __ret_622; \ | |
| 56355 | __ret_622 = __noswap_vqdmlsl_s16(__rev0_622, __noswap_vget_high_s16(__rev1_622), __noswap_splat_laneq_s16(__rev2_622, __p3_622)); \ | |
| 56356 | __ret_622 = __builtin_shufflevector(__ret_622, __ret_622, 3, 2, 1, 0); \ | |
| 56357 | __ret_622; \ | |
| 58017 | #define vqdmlsl_high_laneq_s16(__p0_714, __p1_714, __p2_714, __p3_714) __extension__ ({ \ | |
| 58018 | int32x4_t __s0_714 = __p0_714; \ | |
| 58019 | int16x8_t __s1_714 = __p1_714; \ | |
| 58020 | int16x8_t __s2_714 = __p2_714; \ | |
| 58021 | int32x4_t __rev0_714; __rev0_714 = __builtin_shufflevector(__s0_714, __s0_714, 3, 2, 1, 0); \ | |
| 58022 | int16x8_t __rev1_714; __rev1_714 = __builtin_shufflevector(__s1_714, __s1_714, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58023 | int16x8_t __rev2_714; __rev2_714 = __builtin_shufflevector(__s2_714, __s2_714, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58024 | int32x4_t __ret_714; \ | |
| 58025 | __ret_714 = __noswap_vqdmlsl_s16(__rev0_714, __noswap_vget_high_s16(__rev1_714), __noswap_splat_laneq_s16(__rev2_714, __p3_714)); \ | |
| 58026 | __ret_714 = __builtin_shufflevector(__ret_714, __ret_714, 3, 2, 1, 0); \ | |
| 58027 | __ret_714; \ | |
| 56358 | 58028 | }) |
| 56359 | 58029 | #endif |
| 56360 | 58030 | |
| ... | ... | @@ -56477,50 +58147,50 @@ __ai int32x4_t vqdmlsl_high_n_s16(int32x4_t __p0, int16x8_t __p1, int16_t __p2) |
| 56477 | 58147 | #endif |
| 56478 | 58148 | |
| 56479 | 58149 | #ifdef __LITTLE_ENDIAN__ |
| 56480 | #define vqdmlsl_laneq_s32(__p0_623, __p1_623, __p2_623, __p3_623) __extension__ ({ \ | |
| 56481 | int64x2_t __s0_623 = __p0_623; \ | |
| 56482 | int32x2_t __s1_623 = __p1_623; \ | |
| 56483 | int32x4_t __s2_623 = __p2_623; \ | |
| 56484 | int64x2_t __ret_623; \ | |
| 56485 | __ret_623 = vqdmlsl_s32(__s0_623, __s1_623, splat_laneq_s32(__s2_623, __p3_623)); \ | |
| 56486 | __ret_623; \ | |
| 58150 | #define vqdmlsl_laneq_s32(__p0_715, __p1_715, __p2_715, __p3_715) __extension__ ({ \ | |
| 58151 | int64x2_t __s0_715 = __p0_715; \ | |
| 58152 | int32x2_t __s1_715 = __p1_715; \ | |
| 58153 | int32x4_t __s2_715 = __p2_715; \ | |
| 58154 | int64x2_t __ret_715; \ | |
| 58155 | __ret_715 = vqdmlsl_s32(__s0_715, __s1_715, splat_laneq_s32(__s2_715, __p3_715)); \ | |
| 58156 | __ret_715; \ | |
| 56487 | 58157 | }) |
| 56488 | 58158 | #else |
| 56489 | #define vqdmlsl_laneq_s32(__p0_624, __p1_624, __p2_624, __p3_624) __extension__ ({ \ | |
| 56490 | int64x2_t __s0_624 = __p0_624; \ | |
| 56491 | int32x2_t __s1_624 = __p1_624; \ | |
| 56492 | int32x4_t __s2_624 = __p2_624; \ | |
| 56493 | int64x2_t __rev0_624; __rev0_624 = __builtin_shufflevector(__s0_624, __s0_624, 1, 0); \ | |
| 56494 | int32x2_t __rev1_624; __rev1_624 = __builtin_shufflevector(__s1_624, __s1_624, 1, 0); \ | |
| 56495 | int32x4_t __rev2_624; __rev2_624 = __builtin_shufflevector(__s2_624, __s2_624, 3, 2, 1, 0); \ | |
| 56496 | int64x2_t __ret_624; \ | |
| 56497 | __ret_624 = __noswap_vqdmlsl_s32(__rev0_624, __rev1_624, __noswap_splat_laneq_s32(__rev2_624, __p3_624)); \ | |
| 56498 | __ret_624 = __builtin_shufflevector(__ret_624, __ret_624, 1, 0); \ | |
| 56499 | __ret_624; \ | |
| 58159 | #define vqdmlsl_laneq_s32(__p0_716, __p1_716, __p2_716, __p3_716) __extension__ ({ \ | |
| 58160 | int64x2_t __s0_716 = __p0_716; \ | |
| 58161 | int32x2_t __s1_716 = __p1_716; \ | |
| 58162 | int32x4_t __s2_716 = __p2_716; \ | |
| 58163 | int64x2_t __rev0_716; __rev0_716 = __builtin_shufflevector(__s0_716, __s0_716, 1, 0); \ | |
| 58164 | int32x2_t __rev1_716; __rev1_716 = __builtin_shufflevector(__s1_716, __s1_716, 1, 0); \ | |
| 58165 | int32x4_t __rev2_716; __rev2_716 = __builtin_shufflevector(__s2_716, __s2_716, 3, 2, 1, 0); \ | |
| 58166 | int64x2_t __ret_716; \ | |
| 58167 | __ret_716 = __noswap_vqdmlsl_s32(__rev0_716, __rev1_716, __noswap_splat_laneq_s32(__rev2_716, __p3_716)); \ | |
| 58168 | __ret_716 = __builtin_shufflevector(__ret_716, __ret_716, 1, 0); \ | |
| 58169 | __ret_716; \ | |
| 56500 | 58170 | }) |
| 56501 | 58171 | #endif |
| 56502 | 58172 | |
| 56503 | 58173 | #ifdef __LITTLE_ENDIAN__ |
| 56504 | #define vqdmlsl_laneq_s16(__p0_625, __p1_625, __p2_625, __p3_625) __extension__ ({ \ | |
| 56505 | int32x4_t __s0_625 = __p0_625; \ | |
| 56506 | int16x4_t __s1_625 = __p1_625; \ | |
| 56507 | int16x8_t __s2_625 = __p2_625; \ | |
| 56508 | int32x4_t __ret_625; \ | |
| 56509 | __ret_625 = vqdmlsl_s16(__s0_625, __s1_625, splat_laneq_s16(__s2_625, __p3_625)); \ | |
| 56510 | __ret_625; \ | |
| 58174 | #define vqdmlsl_laneq_s16(__p0_717, __p1_717, __p2_717, __p3_717) __extension__ ({ \ | |
| 58175 | int32x4_t __s0_717 = __p0_717; \ | |
| 58176 | int16x4_t __s1_717 = __p1_717; \ | |
| 58177 | int16x8_t __s2_717 = __p2_717; \ | |
| 58178 | int32x4_t __ret_717; \ | |
| 58179 | __ret_717 = vqdmlsl_s16(__s0_717, __s1_717, splat_laneq_s16(__s2_717, __p3_717)); \ | |
| 58180 | __ret_717; \ | |
| 56511 | 58181 | }) |
| 56512 | 58182 | #else |
| 56513 | #define vqdmlsl_laneq_s16(__p0_626, __p1_626, __p2_626, __p3_626) __extension__ ({ \ | |
| 56514 | int32x4_t __s0_626 = __p0_626; \ | |
| 56515 | int16x4_t __s1_626 = __p1_626; \ | |
| 56516 | int16x8_t __s2_626 = __p2_626; \ | |
| 56517 | int32x4_t __rev0_626; __rev0_626 = __builtin_shufflevector(__s0_626, __s0_626, 3, 2, 1, 0); \ | |
| 56518 | int16x4_t __rev1_626; __rev1_626 = __builtin_shufflevector(__s1_626, __s1_626, 3, 2, 1, 0); \ | |
| 56519 | int16x8_t __rev2_626; __rev2_626 = __builtin_shufflevector(__s2_626, __s2_626, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56520 | int32x4_t __ret_626; \ | |
| 56521 | __ret_626 = __noswap_vqdmlsl_s16(__rev0_626, __rev1_626, __noswap_splat_laneq_s16(__rev2_626, __p3_626)); \ | |
| 56522 | __ret_626 = __builtin_shufflevector(__ret_626, __ret_626, 3, 2, 1, 0); \ | |
| 56523 | __ret_626; \ | |
| 58183 | #define vqdmlsl_laneq_s16(__p0_718, __p1_718, __p2_718, __p3_718) __extension__ ({ \ | |
| 58184 | int32x4_t __s0_718 = __p0_718; \ | |
| 58185 | int16x4_t __s1_718 = __p1_718; \ | |
| 58186 | int16x8_t __s2_718 = __p2_718; \ | |
| 58187 | int32x4_t __rev0_718; __rev0_718 = __builtin_shufflevector(__s0_718, __s0_718, 3, 2, 1, 0); \ | |
| 58188 | int16x4_t __rev1_718; __rev1_718 = __builtin_shufflevector(__s1_718, __s1_718, 3, 2, 1, 0); \ | |
| 58189 | int16x8_t __rev2_718; __rev2_718 = __builtin_shufflevector(__s2_718, __s2_718, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58190 | int32x4_t __ret_718; \ | |
| 58191 | __ret_718 = __noswap_vqdmlsl_s16(__rev0_718, __rev1_718, __noswap_splat_laneq_s16(__rev2_718, __p3_718)); \ | |
| 58192 | __ret_718 = __builtin_shufflevector(__ret_718, __ret_718, 3, 2, 1, 0); \ | |
| 58193 | __ret_718; \ | |
| 56524 | 58194 | }) |
| 56525 | 58195 | #endif |
| 56526 | 58196 | |
| ... | ... | @@ -56619,78 +58289,78 @@ __ai int16_t vqdmulhh_s16(int16_t __p0, int16_t __p1) { |
| 56619 | 58289 | #endif |
| 56620 | 58290 | |
| 56621 | 58291 | #ifdef __LITTLE_ENDIAN__ |
| 56622 | #define vqdmulhs_lane_s32(__p0_627, __p1_627, __p2_627) __extension__ ({ \ | |
| 56623 | int32_t __s0_627 = __p0_627; \ | |
| 56624 | int32x2_t __s1_627 = __p1_627; \ | |
| 56625 | int32_t __ret_627; \ | |
| 56626 | __ret_627 = vqdmulhs_s32(__s0_627, vget_lane_s32(__s1_627, __p2_627)); \ | |
| 56627 | __ret_627; \ | |
| 58292 | #define vqdmulhs_lane_s32(__p0_719, __p1_719, __p2_719) __extension__ ({ \ | |
| 58293 | int32_t __s0_719 = __p0_719; \ | |
| 58294 | int32x2_t __s1_719 = __p1_719; \ | |
| 58295 | int32_t __ret_719; \ | |
| 58296 | __ret_719 = vqdmulhs_s32(__s0_719, vget_lane_s32(__s1_719, __p2_719)); \ | |
| 58297 | __ret_719; \ | |
| 56628 | 58298 | }) |
| 56629 | 58299 | #else |
| 56630 | #define vqdmulhs_lane_s32(__p0_628, __p1_628, __p2_628) __extension__ ({ \ | |
| 56631 | int32_t __s0_628 = __p0_628; \ | |
| 56632 | int32x2_t __s1_628 = __p1_628; \ | |
| 56633 | int32x2_t __rev1_628; __rev1_628 = __builtin_shufflevector(__s1_628, __s1_628, 1, 0); \ | |
| 56634 | int32_t __ret_628; \ | |
| 56635 | __ret_628 = vqdmulhs_s32(__s0_628, __noswap_vget_lane_s32(__rev1_628, __p2_628)); \ | |
| 56636 | __ret_628; \ | |
| 58300 | #define vqdmulhs_lane_s32(__p0_720, __p1_720, __p2_720) __extension__ ({ \ | |
| 58301 | int32_t __s0_720 = __p0_720; \ | |
| 58302 | int32x2_t __s1_720 = __p1_720; \ | |
| 58303 | int32x2_t __rev1_720; __rev1_720 = __builtin_shufflevector(__s1_720, __s1_720, 1, 0); \ | |
| 58304 | int32_t __ret_720; \ | |
| 58305 | __ret_720 = vqdmulhs_s32(__s0_720, __noswap_vget_lane_s32(__rev1_720, __p2_720)); \ | |
| 58306 | __ret_720; \ | |
| 56637 | 58307 | }) |
| 56638 | 58308 | #endif |
| 56639 | 58309 | |
| 56640 | 58310 | #ifdef __LITTLE_ENDIAN__ |
| 56641 | #define vqdmulhh_lane_s16(__p0_629, __p1_629, __p2_629) __extension__ ({ \ | |
| 56642 | int16_t __s0_629 = __p0_629; \ | |
| 56643 | int16x4_t __s1_629 = __p1_629; \ | |
| 56644 | int16_t __ret_629; \ | |
| 56645 | __ret_629 = vqdmulhh_s16(__s0_629, vget_lane_s16(__s1_629, __p2_629)); \ | |
| 56646 | __ret_629; \ | |
| 58311 | #define vqdmulhh_lane_s16(__p0_721, __p1_721, __p2_721) __extension__ ({ \ | |
| 58312 | int16_t __s0_721 = __p0_721; \ | |
| 58313 | int16x4_t __s1_721 = __p1_721; \ | |
| 58314 | int16_t __ret_721; \ | |
| 58315 | __ret_721 = vqdmulhh_s16(__s0_721, vget_lane_s16(__s1_721, __p2_721)); \ | |
| 58316 | __ret_721; \ | |
| 56647 | 58317 | }) |
| 56648 | 58318 | #else |
| 56649 | #define vqdmulhh_lane_s16(__p0_630, __p1_630, __p2_630) __extension__ ({ \ | |
| 56650 | int16_t __s0_630 = __p0_630; \ | |
| 56651 | int16x4_t __s1_630 = __p1_630; \ | |
| 56652 | int16x4_t __rev1_630; __rev1_630 = __builtin_shufflevector(__s1_630, __s1_630, 3, 2, 1, 0); \ | |
| 56653 | int16_t __ret_630; \ | |
| 56654 | __ret_630 = vqdmulhh_s16(__s0_630, __noswap_vget_lane_s16(__rev1_630, __p2_630)); \ | |
| 56655 | __ret_630; \ | |
| 58319 | #define vqdmulhh_lane_s16(__p0_722, __p1_722, __p2_722) __extension__ ({ \ | |
| 58320 | int16_t __s0_722 = __p0_722; \ | |
| 58321 | int16x4_t __s1_722 = __p1_722; \ | |
| 58322 | int16x4_t __rev1_722; __rev1_722 = __builtin_shufflevector(__s1_722, __s1_722, 3, 2, 1, 0); \ | |
| 58323 | int16_t __ret_722; \ | |
| 58324 | __ret_722 = vqdmulhh_s16(__s0_722, __noswap_vget_lane_s16(__rev1_722, __p2_722)); \ | |
| 58325 | __ret_722; \ | |
| 56656 | 58326 | }) |
| 56657 | 58327 | #endif |
| 56658 | 58328 | |
| 56659 | 58329 | #ifdef __LITTLE_ENDIAN__ |
| 56660 | #define vqdmulhs_laneq_s32(__p0_631, __p1_631, __p2_631) __extension__ ({ \ | |
| 56661 | int32_t __s0_631 = __p0_631; \ | |
| 56662 | int32x4_t __s1_631 = __p1_631; \ | |
| 56663 | int32_t __ret_631; \ | |
| 56664 | __ret_631 = vqdmulhs_s32(__s0_631, vgetq_lane_s32(__s1_631, __p2_631)); \ | |
| 56665 | __ret_631; \ | |
| 58330 | #define vqdmulhs_laneq_s32(__p0_723, __p1_723, __p2_723) __extension__ ({ \ | |
| 58331 | int32_t __s0_723 = __p0_723; \ | |
| 58332 | int32x4_t __s1_723 = __p1_723; \ | |
| 58333 | int32_t __ret_723; \ | |
| 58334 | __ret_723 = vqdmulhs_s32(__s0_723, vgetq_lane_s32(__s1_723, __p2_723)); \ | |
| 58335 | __ret_723; \ | |
| 56666 | 58336 | }) |
| 56667 | 58337 | #else |
| 56668 | #define vqdmulhs_laneq_s32(__p0_632, __p1_632, __p2_632) __extension__ ({ \ | |
| 56669 | int32_t __s0_632 = __p0_632; \ | |
| 56670 | int32x4_t __s1_632 = __p1_632; \ | |
| 56671 | int32x4_t __rev1_632; __rev1_632 = __builtin_shufflevector(__s1_632, __s1_632, 3, 2, 1, 0); \ | |
| 56672 | int32_t __ret_632; \ | |
| 56673 | __ret_632 = vqdmulhs_s32(__s0_632, __noswap_vgetq_lane_s32(__rev1_632, __p2_632)); \ | |
| 56674 | __ret_632; \ | |
| 58338 | #define vqdmulhs_laneq_s32(__p0_724, __p1_724, __p2_724) __extension__ ({ \ | |
| 58339 | int32_t __s0_724 = __p0_724; \ | |
| 58340 | int32x4_t __s1_724 = __p1_724; \ | |
| 58341 | int32x4_t __rev1_724; __rev1_724 = __builtin_shufflevector(__s1_724, __s1_724, 3, 2, 1, 0); \ | |
| 58342 | int32_t __ret_724; \ | |
| 58343 | __ret_724 = vqdmulhs_s32(__s0_724, __noswap_vgetq_lane_s32(__rev1_724, __p2_724)); \ | |
| 58344 | __ret_724; \ | |
| 56675 | 58345 | }) |
| 56676 | 58346 | #endif |
| 56677 | 58347 | |
| 56678 | 58348 | #ifdef __LITTLE_ENDIAN__ |
| 56679 | #define vqdmulhh_laneq_s16(__p0_633, __p1_633, __p2_633) __extension__ ({ \ | |
| 56680 | int16_t __s0_633 = __p0_633; \ | |
| 56681 | int16x8_t __s1_633 = __p1_633; \ | |
| 56682 | int16_t __ret_633; \ | |
| 56683 | __ret_633 = vqdmulhh_s16(__s0_633, vgetq_lane_s16(__s1_633, __p2_633)); \ | |
| 56684 | __ret_633; \ | |
| 58349 | #define vqdmulhh_laneq_s16(__p0_725, __p1_725, __p2_725) __extension__ ({ \ | |
| 58350 | int16_t __s0_725 = __p0_725; \ | |
| 58351 | int16x8_t __s1_725 = __p1_725; \ | |
| 58352 | int16_t __ret_725; \ | |
| 58353 | __ret_725 = vqdmulhh_s16(__s0_725, vgetq_lane_s16(__s1_725, __p2_725)); \ | |
| 58354 | __ret_725; \ | |
| 56685 | 58355 | }) |
| 56686 | 58356 | #else |
| 56687 | #define vqdmulhh_laneq_s16(__p0_634, __p1_634, __p2_634) __extension__ ({ \ | |
| 56688 | int16_t __s0_634 = __p0_634; \ | |
| 56689 | int16x8_t __s1_634 = __p1_634; \ | |
| 56690 | int16x8_t __rev1_634; __rev1_634 = __builtin_shufflevector(__s1_634, __s1_634, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56691 | int16_t __ret_634; \ | |
| 56692 | __ret_634 = vqdmulhh_s16(__s0_634, __noswap_vgetq_lane_s16(__rev1_634, __p2_634)); \ | |
| 56693 | __ret_634; \ | |
| 58357 | #define vqdmulhh_laneq_s16(__p0_726, __p1_726, __p2_726) __extension__ ({ \ | |
| 58358 | int16_t __s0_726 = __p0_726; \ | |
| 58359 | int16x8_t __s1_726 = __p1_726; \ | |
| 58360 | int16x8_t __rev1_726; __rev1_726 = __builtin_shufflevector(__s1_726, __s1_726, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58361 | int16_t __ret_726; \ | |
| 58362 | __ret_726 = vqdmulhh_s16(__s0_726, __noswap_vgetq_lane_s16(__rev1_726, __p2_726)); \ | |
| 58363 | __ret_726; \ | |
| 56694 | 58364 | }) |
| 56695 | 58365 | #endif |
| 56696 | 58366 | |
| ... | ... | @@ -56823,86 +58493,86 @@ __ai int32x4_t vqdmull_high_s16(int16x8_t __p0, int16x8_t __p1) { |
| 56823 | 58493 | #endif |
| 56824 | 58494 | |
| 56825 | 58495 | #ifdef __LITTLE_ENDIAN__ |
| 56826 | #define vqdmull_high_lane_s32(__p0_635, __p1_635, __p2_635) __extension__ ({ \ | |
| 56827 | int32x4_t __s0_635 = __p0_635; \ | |
| 56828 | int32x2_t __s1_635 = __p1_635; \ | |
| 56829 | int64x2_t __ret_635; \ | |
| 56830 | __ret_635 = vqdmull_s32(vget_high_s32(__s0_635), splat_lane_s32(__s1_635, __p2_635)); \ | |
| 56831 | __ret_635; \ | |
| 58496 | #define vqdmull_high_lane_s32(__p0_727, __p1_727, __p2_727) __extension__ ({ \ | |
| 58497 | int32x4_t __s0_727 = __p0_727; \ | |
| 58498 | int32x2_t __s1_727 = __p1_727; \ | |
| 58499 | int64x2_t __ret_727; \ | |
| 58500 | __ret_727 = vqdmull_s32(vget_high_s32(__s0_727), splat_lane_s32(__s1_727, __p2_727)); \ | |
| 58501 | __ret_727; \ | |
| 56832 | 58502 | }) |
| 56833 | 58503 | #else |
| 56834 | #define vqdmull_high_lane_s32(__p0_636, __p1_636, __p2_636) __extension__ ({ \ | |
| 56835 | int32x4_t __s0_636 = __p0_636; \ | |
| 56836 | int32x2_t __s1_636 = __p1_636; \ | |
| 56837 | int32x4_t __rev0_636; __rev0_636 = __builtin_shufflevector(__s0_636, __s0_636, 3, 2, 1, 0); \ | |
| 56838 | int32x2_t __rev1_636; __rev1_636 = __builtin_shufflevector(__s1_636, __s1_636, 1, 0); \ | |
| 56839 | int64x2_t __ret_636; \ | |
| 56840 | __ret_636 = __noswap_vqdmull_s32(__noswap_vget_high_s32(__rev0_636), __noswap_splat_lane_s32(__rev1_636, __p2_636)); \ | |
| 56841 | __ret_636 = __builtin_shufflevector(__ret_636, __ret_636, 1, 0); \ | |
| 56842 | __ret_636; \ | |
| 58504 | #define vqdmull_high_lane_s32(__p0_728, __p1_728, __p2_728) __extension__ ({ \ | |
| 58505 | int32x4_t __s0_728 = __p0_728; \ | |
| 58506 | int32x2_t __s1_728 = __p1_728; \ | |
| 58507 | int32x4_t __rev0_728; __rev0_728 = __builtin_shufflevector(__s0_728, __s0_728, 3, 2, 1, 0); \ | |
| 58508 | int32x2_t __rev1_728; __rev1_728 = __builtin_shufflevector(__s1_728, __s1_728, 1, 0); \ | |
| 58509 | int64x2_t __ret_728; \ | |
| 58510 | __ret_728 = __noswap_vqdmull_s32(__noswap_vget_high_s32(__rev0_728), __noswap_splat_lane_s32(__rev1_728, __p2_728)); \ | |
| 58511 | __ret_728 = __builtin_shufflevector(__ret_728, __ret_728, 1, 0); \ | |
| 58512 | __ret_728; \ | |
| 56843 | 58513 | }) |
| 56844 | 58514 | #endif |
| 56845 | 58515 | |
| 56846 | 58516 | #ifdef __LITTLE_ENDIAN__ |
| 56847 | #define vqdmull_high_lane_s16(__p0_637, __p1_637, __p2_637) __extension__ ({ \ | |
| 56848 | int16x8_t __s0_637 = __p0_637; \ | |
| 56849 | int16x4_t __s1_637 = __p1_637; \ | |
| 56850 | int32x4_t __ret_637; \ | |
| 56851 | __ret_637 = vqdmull_s16(vget_high_s16(__s0_637), splat_lane_s16(__s1_637, __p2_637)); \ | |
| 56852 | __ret_637; \ | |
| 58517 | #define vqdmull_high_lane_s16(__p0_729, __p1_729, __p2_729) __extension__ ({ \ | |
| 58518 | int16x8_t __s0_729 = __p0_729; \ | |
| 58519 | int16x4_t __s1_729 = __p1_729; \ | |
| 58520 | int32x4_t __ret_729; \ | |
| 58521 | __ret_729 = vqdmull_s16(vget_high_s16(__s0_729), splat_lane_s16(__s1_729, __p2_729)); \ | |
| 58522 | __ret_729; \ | |
| 56853 | 58523 | }) |
| 56854 | 58524 | #else |
| 56855 | #define vqdmull_high_lane_s16(__p0_638, __p1_638, __p2_638) __extension__ ({ \ | |
| 56856 | int16x8_t __s0_638 = __p0_638; \ | |
| 56857 | int16x4_t __s1_638 = __p1_638; \ | |
| 56858 | int16x8_t __rev0_638; __rev0_638 = __builtin_shufflevector(__s0_638, __s0_638, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56859 | int16x4_t __rev1_638; __rev1_638 = __builtin_shufflevector(__s1_638, __s1_638, 3, 2, 1, 0); \ | |
| 56860 | int32x4_t __ret_638; \ | |
| 56861 | __ret_638 = __noswap_vqdmull_s16(__noswap_vget_high_s16(__rev0_638), __noswap_splat_lane_s16(__rev1_638, __p2_638)); \ | |
| 56862 | __ret_638 = __builtin_shufflevector(__ret_638, __ret_638, 3, 2, 1, 0); \ | |
| 56863 | __ret_638; \ | |
| 58525 | #define vqdmull_high_lane_s16(__p0_730, __p1_730, __p2_730) __extension__ ({ \ | |
| 58526 | int16x8_t __s0_730 = __p0_730; \ | |
| 58527 | int16x4_t __s1_730 = __p1_730; \ | |
| 58528 | int16x8_t __rev0_730; __rev0_730 = __builtin_shufflevector(__s0_730, __s0_730, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58529 | int16x4_t __rev1_730; __rev1_730 = __builtin_shufflevector(__s1_730, __s1_730, 3, 2, 1, 0); \ | |
| 58530 | int32x4_t __ret_730; \ | |
| 58531 | __ret_730 = __noswap_vqdmull_s16(__noswap_vget_high_s16(__rev0_730), __noswap_splat_lane_s16(__rev1_730, __p2_730)); \ | |
| 58532 | __ret_730 = __builtin_shufflevector(__ret_730, __ret_730, 3, 2, 1, 0); \ | |
| 58533 | __ret_730; \ | |
| 56864 | 58534 | }) |
| 56865 | 58535 | #endif |
| 56866 | 58536 | |
| 56867 | 58537 | #ifdef __LITTLE_ENDIAN__ |
| 56868 | #define vqdmull_high_laneq_s32(__p0_639, __p1_639, __p2_639) __extension__ ({ \ | |
| 56869 | int32x4_t __s0_639 = __p0_639; \ | |
| 56870 | int32x4_t __s1_639 = __p1_639; \ | |
| 56871 | int64x2_t __ret_639; \ | |
| 56872 | __ret_639 = vqdmull_s32(vget_high_s32(__s0_639), splat_laneq_s32(__s1_639, __p2_639)); \ | |
| 56873 | __ret_639; \ | |
| 58538 | #define vqdmull_high_laneq_s32(__p0_731, __p1_731, __p2_731) __extension__ ({ \ | |
| 58539 | int32x4_t __s0_731 = __p0_731; \ | |
| 58540 | int32x4_t __s1_731 = __p1_731; \ | |
| 58541 | int64x2_t __ret_731; \ | |
| 58542 | __ret_731 = vqdmull_s32(vget_high_s32(__s0_731), splat_laneq_s32(__s1_731, __p2_731)); \ | |
| 58543 | __ret_731; \ | |
| 56874 | 58544 | }) |
| 56875 | 58545 | #else |
| 56876 | #define vqdmull_high_laneq_s32(__p0_640, __p1_640, __p2_640) __extension__ ({ \ | |
| 56877 | int32x4_t __s0_640 = __p0_640; \ | |
| 56878 | int32x4_t __s1_640 = __p1_640; \ | |
| 56879 | int32x4_t __rev0_640; __rev0_640 = __builtin_shufflevector(__s0_640, __s0_640, 3, 2, 1, 0); \ | |
| 56880 | int32x4_t __rev1_640; __rev1_640 = __builtin_shufflevector(__s1_640, __s1_640, 3, 2, 1, 0); \ | |
| 56881 | int64x2_t __ret_640; \ | |
| 56882 | __ret_640 = __noswap_vqdmull_s32(__noswap_vget_high_s32(__rev0_640), __noswap_splat_laneq_s32(__rev1_640, __p2_640)); \ | |
| 56883 | __ret_640 = __builtin_shufflevector(__ret_640, __ret_640, 1, 0); \ | |
| 56884 | __ret_640; \ | |
| 58546 | #define vqdmull_high_laneq_s32(__p0_732, __p1_732, __p2_732) __extension__ ({ \ | |
| 58547 | int32x4_t __s0_732 = __p0_732; \ | |
| 58548 | int32x4_t __s1_732 = __p1_732; \ | |
| 58549 | int32x4_t __rev0_732; __rev0_732 = __builtin_shufflevector(__s0_732, __s0_732, 3, 2, 1, 0); \ | |
| 58550 | int32x4_t __rev1_732; __rev1_732 = __builtin_shufflevector(__s1_732, __s1_732, 3, 2, 1, 0); \ | |
| 58551 | int64x2_t __ret_732; \ | |
| 58552 | __ret_732 = __noswap_vqdmull_s32(__noswap_vget_high_s32(__rev0_732), __noswap_splat_laneq_s32(__rev1_732, __p2_732)); \ | |
| 58553 | __ret_732 = __builtin_shufflevector(__ret_732, __ret_732, 1, 0); \ | |
| 58554 | __ret_732; \ | |
| 56885 | 58555 | }) |
| 56886 | 58556 | #endif |
| 56887 | 58557 | |
| 56888 | 58558 | #ifdef __LITTLE_ENDIAN__ |
| 56889 | #define vqdmull_high_laneq_s16(__p0_641, __p1_641, __p2_641) __extension__ ({ \ | |
| 56890 | int16x8_t __s0_641 = __p0_641; \ | |
| 56891 | int16x8_t __s1_641 = __p1_641; \ | |
| 56892 | int32x4_t __ret_641; \ | |
| 56893 | __ret_641 = vqdmull_s16(vget_high_s16(__s0_641), splat_laneq_s16(__s1_641, __p2_641)); \ | |
| 56894 | __ret_641; \ | |
| 58559 | #define vqdmull_high_laneq_s16(__p0_733, __p1_733, __p2_733) __extension__ ({ \ | |
| 58560 | int16x8_t __s0_733 = __p0_733; \ | |
| 58561 | int16x8_t __s1_733 = __p1_733; \ | |
| 58562 | int32x4_t __ret_733; \ | |
| 58563 | __ret_733 = vqdmull_s16(vget_high_s16(__s0_733), splat_laneq_s16(__s1_733, __p2_733)); \ | |
| 58564 | __ret_733; \ | |
| 56895 | 58565 | }) |
| 56896 | 58566 | #else |
| 56897 | #define vqdmull_high_laneq_s16(__p0_642, __p1_642, __p2_642) __extension__ ({ \ | |
| 56898 | int16x8_t __s0_642 = __p0_642; \ | |
| 56899 | int16x8_t __s1_642 = __p1_642; \ | |
| 56900 | int16x8_t __rev0_642; __rev0_642 = __builtin_shufflevector(__s0_642, __s0_642, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56901 | int16x8_t __rev1_642; __rev1_642 = __builtin_shufflevector(__s1_642, __s1_642, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 56902 | int32x4_t __ret_642; \ | |
| 56903 | __ret_642 = __noswap_vqdmull_s16(__noswap_vget_high_s16(__rev0_642), __noswap_splat_laneq_s16(__rev1_642, __p2_642)); \ | |
| 56904 | __ret_642 = __builtin_shufflevector(__ret_642, __ret_642, 3, 2, 1, 0); \ | |
| 56905 | __ret_642; \ | |
| 58567 | #define vqdmull_high_laneq_s16(__p0_734, __p1_734, __p2_734) __extension__ ({ \ | |
| 58568 | int16x8_t __s0_734 = __p0_734; \ | |
| 58569 | int16x8_t __s1_734 = __p1_734; \ | |
| 58570 | int16x8_t __rev0_734; __rev0_734 = __builtin_shufflevector(__s0_734, __s0_734, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58571 | int16x8_t __rev1_734; __rev1_734 = __builtin_shufflevector(__s1_734, __s1_734, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58572 | int32x4_t __ret_734; \ | |
| 58573 | __ret_734 = __noswap_vqdmull_s16(__noswap_vget_high_s16(__rev0_734), __noswap_splat_laneq_s16(__rev1_734, __p2_734)); \ | |
| 58574 | __ret_734 = __builtin_shufflevector(__ret_734, __ret_734, 3, 2, 1, 0); \ | |
| 58575 | __ret_734; \ | |
| 56906 | 58576 | }) |
| 56907 | 58577 | #endif |
| 56908 | 58578 | |
| ... | ... | @@ -56939,120 +58609,120 @@ __ai int32x4_t vqdmull_high_n_s16(int16x8_t __p0, int16_t __p1) { |
| 56939 | 58609 | #endif |
| 56940 | 58610 | |
| 56941 | 58611 | #ifdef __LITTLE_ENDIAN__ |
| 56942 | #define vqdmulls_lane_s32(__p0_643, __p1_643, __p2_643) __extension__ ({ \ | |
| 56943 | int32_t __s0_643 = __p0_643; \ | |
| 56944 | int32x2_t __s1_643 = __p1_643; \ | |
| 56945 | int64_t __ret_643; \ | |
| 56946 | __ret_643 = vqdmulls_s32(__s0_643, vget_lane_s32(__s1_643, __p2_643)); \ | |
| 56947 | __ret_643; \ | |
| 58612 | #define vqdmulls_lane_s32(__p0_735, __p1_735, __p2_735) __extension__ ({ \ | |
| 58613 | int32_t __s0_735 = __p0_735; \ | |
| 58614 | int32x2_t __s1_735 = __p1_735; \ | |
| 58615 | int64_t __ret_735; \ | |
| 58616 | __ret_735 = vqdmulls_s32(__s0_735, vget_lane_s32(__s1_735, __p2_735)); \ | |
| 58617 | __ret_735; \ | |
| 56948 | 58618 | }) |
| 56949 | 58619 | #else |
| 56950 | #define vqdmulls_lane_s32(__p0_644, __p1_644, __p2_644) __extension__ ({ \ | |
| 56951 | int32_t __s0_644 = __p0_644; \ | |
| 56952 | int32x2_t __s1_644 = __p1_644; \ | |
| 56953 | int32x2_t __rev1_644; __rev1_644 = __builtin_shufflevector(__s1_644, __s1_644, 1, 0); \ | |
| 56954 | int64_t __ret_644; \ | |
| 56955 | __ret_644 = vqdmulls_s32(__s0_644, __noswap_vget_lane_s32(__rev1_644, __p2_644)); \ | |
| 56956 | __ret_644; \ | |
| 58620 | #define vqdmulls_lane_s32(__p0_736, __p1_736, __p2_736) __extension__ ({ \ | |
| 58621 | int32_t __s0_736 = __p0_736; \ | |
| 58622 | int32x2_t __s1_736 = __p1_736; \ | |
| 58623 | int32x2_t __rev1_736; __rev1_736 = __builtin_shufflevector(__s1_736, __s1_736, 1, 0); \ | |
| 58624 | int64_t __ret_736; \ | |
| 58625 | __ret_736 = vqdmulls_s32(__s0_736, __noswap_vget_lane_s32(__rev1_736, __p2_736)); \ | |
| 58626 | __ret_736; \ | |
| 56957 | 58627 | }) |
| 56958 | 58628 | #endif |
| 56959 | 58629 | |
| 56960 | 58630 | #ifdef __LITTLE_ENDIAN__ |
| 56961 | #define vqdmullh_lane_s16(__p0_645, __p1_645, __p2_645) __extension__ ({ \ | |
| 56962 | int16_t __s0_645 = __p0_645; \ | |
| 56963 | int16x4_t __s1_645 = __p1_645; \ | |
| 56964 | int32_t __ret_645; \ | |
| 56965 | __ret_645 = vqdmullh_s16(__s0_645, vget_lane_s16(__s1_645, __p2_645)); \ | |
| 56966 | __ret_645; \ | |
| 58631 | #define vqdmullh_lane_s16(__p0_737, __p1_737, __p2_737) __extension__ ({ \ | |
| 58632 | int16_t __s0_737 = __p0_737; \ | |
| 58633 | int16x4_t __s1_737 = __p1_737; \ | |
| 58634 | int32_t __ret_737; \ | |
| 58635 | __ret_737 = vqdmullh_s16(__s0_737, vget_lane_s16(__s1_737, __p2_737)); \ | |
| 58636 | __ret_737; \ | |
| 56967 | 58637 | }) |
| 56968 | 58638 | #else |
| 56969 | #define vqdmullh_lane_s16(__p0_646, __p1_646, __p2_646) __extension__ ({ \ | |
| 56970 | int16_t __s0_646 = __p0_646; \ | |
| 56971 | int16x4_t __s1_646 = __p1_646; \ | |
| 56972 | int16x4_t __rev1_646; __rev1_646 = __builtin_shufflevector(__s1_646, __s1_646, 3, 2, 1, 0); \ | |
| 56973 | int32_t __ret_646; \ | |
| 56974 | __ret_646 = vqdmullh_s16(__s0_646, __noswap_vget_lane_s16(__rev1_646, __p2_646)); \ | |
| 56975 | __ret_646; \ | |
| 58639 | #define vqdmullh_lane_s16(__p0_738, __p1_738, __p2_738) __extension__ ({ \ | |
| 58640 | int16_t __s0_738 = __p0_738; \ | |
| 58641 | int16x4_t __s1_738 = __p1_738; \ | |
| 58642 | int16x4_t __rev1_738; __rev1_738 = __builtin_shufflevector(__s1_738, __s1_738, 3, 2, 1, 0); \ | |
| 58643 | int32_t __ret_738; \ | |
| 58644 | __ret_738 = vqdmullh_s16(__s0_738, __noswap_vget_lane_s16(__rev1_738, __p2_738)); \ | |
| 58645 | __ret_738; \ | |
| 56976 | 58646 | }) |
| 56977 | 58647 | #endif |
| 56978 | 58648 | |
| 56979 | 58649 | #ifdef __LITTLE_ENDIAN__ |
| 56980 | #define vqdmulls_laneq_s32(__p0_647, __p1_647, __p2_647) __extension__ ({ \ | |
| 56981 | int32_t __s0_647 = __p0_647; \ | |
| 56982 | int32x4_t __s1_647 = __p1_647; \ | |
| 56983 | int64_t __ret_647; \ | |
| 56984 | __ret_647 = vqdmulls_s32(__s0_647, vgetq_lane_s32(__s1_647, __p2_647)); \ | |
| 56985 | __ret_647; \ | |
| 58650 | #define vqdmulls_laneq_s32(__p0_739, __p1_739, __p2_739) __extension__ ({ \ | |
| 58651 | int32_t __s0_739 = __p0_739; \ | |
| 58652 | int32x4_t __s1_739 = __p1_739; \ | |
| 58653 | int64_t __ret_739; \ | |
| 58654 | __ret_739 = vqdmulls_s32(__s0_739, vgetq_lane_s32(__s1_739, __p2_739)); \ | |
| 58655 | __ret_739; \ | |
| 56986 | 58656 | }) |
| 56987 | 58657 | #else |
| 56988 | #define vqdmulls_laneq_s32(__p0_648, __p1_648, __p2_648) __extension__ ({ \ | |
| 56989 | int32_t __s0_648 = __p0_648; \ | |
| 56990 | int32x4_t __s1_648 = __p1_648; \ | |
| 56991 | int32x4_t __rev1_648; __rev1_648 = __builtin_shufflevector(__s1_648, __s1_648, 3, 2, 1, 0); \ | |
| 56992 | int64_t __ret_648; \ | |
| 56993 | __ret_648 = vqdmulls_s32(__s0_648, __noswap_vgetq_lane_s32(__rev1_648, __p2_648)); \ | |
| 56994 | __ret_648; \ | |
| 58658 | #define vqdmulls_laneq_s32(__p0_740, __p1_740, __p2_740) __extension__ ({ \ | |
| 58659 | int32_t __s0_740 = __p0_740; \ | |
| 58660 | int32x4_t __s1_740 = __p1_740; \ | |
| 58661 | int32x4_t __rev1_740; __rev1_740 = __builtin_shufflevector(__s1_740, __s1_740, 3, 2, 1, 0); \ | |
| 58662 | int64_t __ret_740; \ | |
| 58663 | __ret_740 = vqdmulls_s32(__s0_740, __noswap_vgetq_lane_s32(__rev1_740, __p2_740)); \ | |
| 58664 | __ret_740; \ | |
| 56995 | 58665 | }) |
| 56996 | 58666 | #endif |
| 56997 | 58667 | |
| 56998 | 58668 | #ifdef __LITTLE_ENDIAN__ |
| 56999 | #define vqdmullh_laneq_s16(__p0_649, __p1_649, __p2_649) __extension__ ({ \ | |
| 57000 | int16_t __s0_649 = __p0_649; \ | |
| 57001 | int16x8_t __s1_649 = __p1_649; \ | |
| 57002 | int32_t __ret_649; \ | |
| 57003 | __ret_649 = vqdmullh_s16(__s0_649, vgetq_lane_s16(__s1_649, __p2_649)); \ | |
| 57004 | __ret_649; \ | |
| 58669 | #define vqdmullh_laneq_s16(__p0_741, __p1_741, __p2_741) __extension__ ({ \ | |
| 58670 | int16_t __s0_741 = __p0_741; \ | |
| 58671 | int16x8_t __s1_741 = __p1_741; \ | |
| 58672 | int32_t __ret_741; \ | |
| 58673 | __ret_741 = vqdmullh_s16(__s0_741, vgetq_lane_s16(__s1_741, __p2_741)); \ | |
| 58674 | __ret_741; \ | |
| 57005 | 58675 | }) |
| 57006 | 58676 | #else |
| 57007 | #define vqdmullh_laneq_s16(__p0_650, __p1_650, __p2_650) __extension__ ({ \ | |
| 57008 | int16_t __s0_650 = __p0_650; \ | |
| 57009 | int16x8_t __s1_650 = __p1_650; \ | |
| 57010 | int16x8_t __rev1_650; __rev1_650 = __builtin_shufflevector(__s1_650, __s1_650, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57011 | int32_t __ret_650; \ | |
| 57012 | __ret_650 = vqdmullh_s16(__s0_650, __noswap_vgetq_lane_s16(__rev1_650, __p2_650)); \ | |
| 57013 | __ret_650; \ | |
| 58677 | #define vqdmullh_laneq_s16(__p0_742, __p1_742, __p2_742) __extension__ ({ \ | |
| 58678 | int16_t __s0_742 = __p0_742; \ | |
| 58679 | int16x8_t __s1_742 = __p1_742; \ | |
| 58680 | int16x8_t __rev1_742; __rev1_742 = __builtin_shufflevector(__s1_742, __s1_742, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58681 | int32_t __ret_742; \ | |
| 58682 | __ret_742 = vqdmullh_s16(__s0_742, __noswap_vgetq_lane_s16(__rev1_742, __p2_742)); \ | |
| 58683 | __ret_742; \ | |
| 57014 | 58684 | }) |
| 57015 | 58685 | #endif |
| 57016 | 58686 | |
| 57017 | 58687 | #ifdef __LITTLE_ENDIAN__ |
| 57018 | #define vqdmull_laneq_s32(__p0_651, __p1_651, __p2_651) __extension__ ({ \ | |
| 57019 | int32x2_t __s0_651 = __p0_651; \ | |
| 57020 | int32x4_t __s1_651 = __p1_651; \ | |
| 57021 | int64x2_t __ret_651; \ | |
| 57022 | __ret_651 = vqdmull_s32(__s0_651, splat_laneq_s32(__s1_651, __p2_651)); \ | |
| 57023 | __ret_651; \ | |
| 58688 | #define vqdmull_laneq_s32(__p0_743, __p1_743, __p2_743) __extension__ ({ \ | |
| 58689 | int32x2_t __s0_743 = __p0_743; \ | |
| 58690 | int32x4_t __s1_743 = __p1_743; \ | |
| 58691 | int64x2_t __ret_743; \ | |
| 58692 | __ret_743 = vqdmull_s32(__s0_743, splat_laneq_s32(__s1_743, __p2_743)); \ | |
| 58693 | __ret_743; \ | |
| 57024 | 58694 | }) |
| 57025 | 58695 | #else |
| 57026 | #define vqdmull_laneq_s32(__p0_652, __p1_652, __p2_652) __extension__ ({ \ | |
| 57027 | int32x2_t __s0_652 = __p0_652; \ | |
| 57028 | int32x4_t __s1_652 = __p1_652; \ | |
| 57029 | int32x2_t __rev0_652; __rev0_652 = __builtin_shufflevector(__s0_652, __s0_652, 1, 0); \ | |
| 57030 | int32x4_t __rev1_652; __rev1_652 = __builtin_shufflevector(__s1_652, __s1_652, 3, 2, 1, 0); \ | |
| 57031 | int64x2_t __ret_652; \ | |
| 57032 | __ret_652 = __noswap_vqdmull_s32(__rev0_652, __noswap_splat_laneq_s32(__rev1_652, __p2_652)); \ | |
| 57033 | __ret_652 = __builtin_shufflevector(__ret_652, __ret_652, 1, 0); \ | |
| 57034 | __ret_652; \ | |
| 58696 | #define vqdmull_laneq_s32(__p0_744, __p1_744, __p2_744) __extension__ ({ \ | |
| 58697 | int32x2_t __s0_744 = __p0_744; \ | |
| 58698 | int32x4_t __s1_744 = __p1_744; \ | |
| 58699 | int32x2_t __rev0_744; __rev0_744 = __builtin_shufflevector(__s0_744, __s0_744, 1, 0); \ | |
| 58700 | int32x4_t __rev1_744; __rev1_744 = __builtin_shufflevector(__s1_744, __s1_744, 3, 2, 1, 0); \ | |
| 58701 | int64x2_t __ret_744; \ | |
| 58702 | __ret_744 = __noswap_vqdmull_s32(__rev0_744, __noswap_splat_laneq_s32(__rev1_744, __p2_744)); \ | |
| 58703 | __ret_744 = __builtin_shufflevector(__ret_744, __ret_744, 1, 0); \ | |
| 58704 | __ret_744; \ | |
| 57035 | 58705 | }) |
| 57036 | 58706 | #endif |
| 57037 | 58707 | |
| 57038 | 58708 | #ifdef __LITTLE_ENDIAN__ |
| 57039 | #define vqdmull_laneq_s16(__p0_653, __p1_653, __p2_653) __extension__ ({ \ | |
| 57040 | int16x4_t __s0_653 = __p0_653; \ | |
| 57041 | int16x8_t __s1_653 = __p1_653; \ | |
| 57042 | int32x4_t __ret_653; \ | |
| 57043 | __ret_653 = vqdmull_s16(__s0_653, splat_laneq_s16(__s1_653, __p2_653)); \ | |
| 57044 | __ret_653; \ | |
| 58709 | #define vqdmull_laneq_s16(__p0_745, __p1_745, __p2_745) __extension__ ({ \ | |
| 58710 | int16x4_t __s0_745 = __p0_745; \ | |
| 58711 | int16x8_t __s1_745 = __p1_745; \ | |
| 58712 | int32x4_t __ret_745; \ | |
| 58713 | __ret_745 = vqdmull_s16(__s0_745, splat_laneq_s16(__s1_745, __p2_745)); \ | |
| 58714 | __ret_745; \ | |
| 57045 | 58715 | }) |
| 57046 | 58716 | #else |
| 57047 | #define vqdmull_laneq_s16(__p0_654, __p1_654, __p2_654) __extension__ ({ \ | |
| 57048 | int16x4_t __s0_654 = __p0_654; \ | |
| 57049 | int16x8_t __s1_654 = __p1_654; \ | |
| 57050 | int16x4_t __rev0_654; __rev0_654 = __builtin_shufflevector(__s0_654, __s0_654, 3, 2, 1, 0); \ | |
| 57051 | int16x8_t __rev1_654; __rev1_654 = __builtin_shufflevector(__s1_654, __s1_654, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57052 | int32x4_t __ret_654; \ | |
| 57053 | __ret_654 = __noswap_vqdmull_s16(__rev0_654, __noswap_splat_laneq_s16(__rev1_654, __p2_654)); \ | |
| 57054 | __ret_654 = __builtin_shufflevector(__ret_654, __ret_654, 3, 2, 1, 0); \ | |
| 57055 | __ret_654; \ | |
| 58717 | #define vqdmull_laneq_s16(__p0_746, __p1_746, __p2_746) __extension__ ({ \ | |
| 58718 | int16x4_t __s0_746 = __p0_746; \ | |
| 58719 | int16x8_t __s1_746 = __p1_746; \ | |
| 58720 | int16x4_t __rev0_746; __rev0_746 = __builtin_shufflevector(__s0_746, __s0_746, 3, 2, 1, 0); \ | |
| 58721 | int16x8_t __rev1_746; __rev1_746 = __builtin_shufflevector(__s1_746, __s1_746, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58722 | int32x4_t __ret_746; \ | |
| 58723 | __ret_746 = __noswap_vqdmull_s16(__rev0_746, __noswap_splat_laneq_s16(__rev1_746, __p2_746)); \ | |
| 58724 | __ret_746 = __builtin_shufflevector(__ret_746, __ret_746, 3, 2, 1, 0); \ | |
| 58725 | __ret_746; \ | |
| 57056 | 58726 | }) |
| 57057 | 58727 | #endif |
| 57058 | 58728 | |
| ... | ... | @@ -57188,30 +58858,30 @@ __ai int8x16_t vqmovn_high_s16(int8x8_t __p0, int16x8_t __p1) { |
| 57188 | 58858 | } |
| 57189 | 58859 | #endif |
| 57190 | 58860 | |
| 57191 | __ai int16_t vqmovuns_s32(int32_t __p0) { | |
| 57192 | int16_t __ret; | |
| 57193 | __ret = (int16_t) __builtin_neon_vqmovuns_s32(__p0); | |
| 58861 | __ai uint16_t vqmovuns_s32(int32_t __p0) { | |
| 58862 | uint16_t __ret; | |
| 58863 | __ret = (uint16_t) __builtin_neon_vqmovuns_s32(__p0); | |
| 57194 | 58864 | return __ret; |
| 57195 | 58865 | } |
| 57196 | __ai int32_t vqmovund_s64(int64_t __p0) { | |
| 57197 | int32_t __ret; | |
| 57198 | __ret = (int32_t) __builtin_neon_vqmovund_s64(__p0); | |
| 58866 | __ai uint32_t vqmovund_s64(int64_t __p0) { | |
| 58867 | uint32_t __ret; | |
| 58868 | __ret = (uint32_t) __builtin_neon_vqmovund_s64(__p0); | |
| 57199 | 58869 | return __ret; |
| 57200 | 58870 | } |
| 57201 | __ai int8_t vqmovunh_s16(int16_t __p0) { | |
| 57202 | int8_t __ret; | |
| 57203 | __ret = (int8_t) __builtin_neon_vqmovunh_s16(__p0); | |
| 58871 | __ai uint8_t vqmovunh_s16(int16_t __p0) { | |
| 58872 | uint8_t __ret; | |
| 58873 | __ret = (uint8_t) __builtin_neon_vqmovunh_s16(__p0); | |
| 57204 | 58874 | return __ret; |
| 57205 | 58875 | } |
| 57206 | 58876 | #ifdef __LITTLE_ENDIAN__ |
| 57207 | __ai uint16x8_t vqmovun_high_s32(int16x4_t __p0, int32x4_t __p1) { | |
| 58877 | __ai uint16x8_t vqmovun_high_s32(uint16x4_t __p0, int32x4_t __p1) { | |
| 57208 | 58878 | uint16x8_t __ret; |
| 57209 | 58879 | __ret = vcombine_u16((uint16x4_t)(__p0), vqmovun_s32(__p1)); |
| 57210 | 58880 | return __ret; |
| 57211 | 58881 | } |
| 57212 | 58882 | #else |
| 57213 | __ai uint16x8_t vqmovun_high_s32(int16x4_t __p0, int32x4_t __p1) { | |
| 57214 | int16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 58883 | __ai uint16x8_t vqmovun_high_s32(uint16x4_t __p0, int32x4_t __p1) { | |
| 58884 | uint16x4_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 3, 2, 1, 0); | |
| 57215 | 58885 | int32x4_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 3, 2, 1, 0); |
| 57216 | 58886 | uint16x8_t __ret; |
| 57217 | 58887 | __ret = __noswap_vcombine_u16((uint16x4_t)(__rev0), __noswap_vqmovun_s32(__rev1)); |
| ... | ... | @@ -57221,14 +58891,14 @@ __ai uint16x8_t vqmovun_high_s32(int16x4_t __p0, int32x4_t __p1) { |
| 57221 | 58891 | #endif |
| 57222 | 58892 | |
| 57223 | 58893 | #ifdef __LITTLE_ENDIAN__ |
| 57224 | __ai uint32x4_t vqmovun_high_s64(int32x2_t __p0, int64x2_t __p1) { | |
| 58894 | __ai uint32x4_t vqmovun_high_s64(uint32x2_t __p0, int64x2_t __p1) { | |
| 57225 | 58895 | uint32x4_t __ret; |
| 57226 | 58896 | __ret = vcombine_u32((uint32x2_t)(__p0), vqmovun_s64(__p1)); |
| 57227 | 58897 | return __ret; |
| 57228 | 58898 | } |
| 57229 | 58899 | #else |
| 57230 | __ai uint32x4_t vqmovun_high_s64(int32x2_t __p0, int64x2_t __p1) { | |
| 57231 | int32x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 58900 | __ai uint32x4_t vqmovun_high_s64(uint32x2_t __p0, int64x2_t __p1) { | |
| 58901 | uint32x2_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 1, 0); | |
| 57232 | 58902 | int64x2_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 1, 0); |
| 57233 | 58903 | uint32x4_t __ret; |
| 57234 | 58904 | __ret = __noswap_vcombine_u32((uint32x2_t)(__rev0), __noswap_vqmovun_s64(__rev1)); |
| ... | ... | @@ -57238,14 +58908,14 @@ __ai uint32x4_t vqmovun_high_s64(int32x2_t __p0, int64x2_t __p1) { |
| 57238 | 58908 | #endif |
| 57239 | 58909 | |
| 57240 | 58910 | #ifdef __LITTLE_ENDIAN__ |
| 57241 | __ai uint8x16_t vqmovun_high_s16(int8x8_t __p0, int16x8_t __p1) { | |
| 58911 | __ai uint8x16_t vqmovun_high_s16(uint8x8_t __p0, int16x8_t __p1) { | |
| 57242 | 58912 | uint8x16_t __ret; |
| 57243 | 58913 | __ret = vcombine_u8((uint8x8_t)(__p0), vqmovun_s16(__p1)); |
| 57244 | 58914 | return __ret; |
| 57245 | 58915 | } |
| 57246 | 58916 | #else |
| 57247 | __ai uint8x16_t vqmovun_high_s16(int8x8_t __p0, int16x8_t __p1) { | |
| 57248 | int8x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 58917 | __ai uint8x16_t vqmovun_high_s16(uint8x8_t __p0, int16x8_t __p1) { | |
| 58918 | uint8x8_t __rev0; __rev0 = __builtin_shufflevector(__p0, __p0, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 57249 | 58919 | int16x8_t __rev1; __rev1 = __builtin_shufflevector(__p1, __p1, 7, 6, 5, 4, 3, 2, 1, 0); |
| 57250 | 58920 | uint8x16_t __ret; |
| 57251 | 58921 | __ret = __noswap_vcombine_u8((uint8x8_t)(__rev0), __noswap_vqmovun_s16(__rev1)); |
| ... | ... | @@ -57390,78 +59060,78 @@ __ai int16_t vqrdmulhh_s16(int16_t __p0, int16_t __p1) { |
| 57390 | 59060 | #endif |
| 57391 | 59061 | |
| 57392 | 59062 | #ifdef __LITTLE_ENDIAN__ |
| 57393 | #define vqrdmulhs_lane_s32(__p0_655, __p1_655, __p2_655) __extension__ ({ \ | |
| 57394 | int32_t __s0_655 = __p0_655; \ | |
| 57395 | int32x2_t __s1_655 = __p1_655; \ | |
| 57396 | int32_t __ret_655; \ | |
| 57397 | __ret_655 = vqrdmulhs_s32(__s0_655, vget_lane_s32(__s1_655, __p2_655)); \ | |
| 57398 | __ret_655; \ | |
| 59063 | #define vqrdmulhs_lane_s32(__p0_747, __p1_747, __p2_747) __extension__ ({ \ | |
| 59064 | int32_t __s0_747 = __p0_747; \ | |
| 59065 | int32x2_t __s1_747 = __p1_747; \ | |
| 59066 | int32_t __ret_747; \ | |
| 59067 | __ret_747 = vqrdmulhs_s32(__s0_747, vget_lane_s32(__s1_747, __p2_747)); \ | |
| 59068 | __ret_747; \ | |
| 57399 | 59069 | }) |
| 57400 | 59070 | #else |
| 57401 | #define vqrdmulhs_lane_s32(__p0_656, __p1_656, __p2_656) __extension__ ({ \ | |
| 57402 | int32_t __s0_656 = __p0_656; \ | |
| 57403 | int32x2_t __s1_656 = __p1_656; \ | |
| 57404 | int32x2_t __rev1_656; __rev1_656 = __builtin_shufflevector(__s1_656, __s1_656, 1, 0); \ | |
| 57405 | int32_t __ret_656; \ | |
| 57406 | __ret_656 = vqrdmulhs_s32(__s0_656, __noswap_vget_lane_s32(__rev1_656, __p2_656)); \ | |
| 57407 | __ret_656; \ | |
| 59071 | #define vqrdmulhs_lane_s32(__p0_748, __p1_748, __p2_748) __extension__ ({ \ | |
| 59072 | int32_t __s0_748 = __p0_748; \ | |
| 59073 | int32x2_t __s1_748 = __p1_748; \ | |
| 59074 | int32x2_t __rev1_748; __rev1_748 = __builtin_shufflevector(__s1_748, __s1_748, 1, 0); \ | |
| 59075 | int32_t __ret_748; \ | |
| 59076 | __ret_748 = vqrdmulhs_s32(__s0_748, __noswap_vget_lane_s32(__rev1_748, __p2_748)); \ | |
| 59077 | __ret_748; \ | |
| 57408 | 59078 | }) |
| 57409 | 59079 | #endif |
| 57410 | 59080 | |
| 57411 | 59081 | #ifdef __LITTLE_ENDIAN__ |
| 57412 | #define vqrdmulhh_lane_s16(__p0_657, __p1_657, __p2_657) __extension__ ({ \ | |
| 57413 | int16_t __s0_657 = __p0_657; \ | |
| 57414 | int16x4_t __s1_657 = __p1_657; \ | |
| 57415 | int16_t __ret_657; \ | |
| 57416 | __ret_657 = vqrdmulhh_s16(__s0_657, vget_lane_s16(__s1_657, __p2_657)); \ | |
| 57417 | __ret_657; \ | |
| 59082 | #define vqrdmulhh_lane_s16(__p0_749, __p1_749, __p2_749) __extension__ ({ \ | |
| 59083 | int16_t __s0_749 = __p0_749; \ | |
| 59084 | int16x4_t __s1_749 = __p1_749; \ | |
| 59085 | int16_t __ret_749; \ | |
| 59086 | __ret_749 = vqrdmulhh_s16(__s0_749, vget_lane_s16(__s1_749, __p2_749)); \ | |
| 59087 | __ret_749; \ | |
| 57418 | 59088 | }) |
| 57419 | 59089 | #else |
| 57420 | #define vqrdmulhh_lane_s16(__p0_658, __p1_658, __p2_658) __extension__ ({ \ | |
| 57421 | int16_t __s0_658 = __p0_658; \ | |
| 57422 | int16x4_t __s1_658 = __p1_658; \ | |
| 57423 | int16x4_t __rev1_658; __rev1_658 = __builtin_shufflevector(__s1_658, __s1_658, 3, 2, 1, 0); \ | |
| 57424 | int16_t __ret_658; \ | |
| 57425 | __ret_658 = vqrdmulhh_s16(__s0_658, __noswap_vget_lane_s16(__rev1_658, __p2_658)); \ | |
| 57426 | __ret_658; \ | |
| 59090 | #define vqrdmulhh_lane_s16(__p0_750, __p1_750, __p2_750) __extension__ ({ \ | |
| 59091 | int16_t __s0_750 = __p0_750; \ | |
| 59092 | int16x4_t __s1_750 = __p1_750; \ | |
| 59093 | int16x4_t __rev1_750; __rev1_750 = __builtin_shufflevector(__s1_750, __s1_750, 3, 2, 1, 0); \ | |
| 59094 | int16_t __ret_750; \ | |
| 59095 | __ret_750 = vqrdmulhh_s16(__s0_750, __noswap_vget_lane_s16(__rev1_750, __p2_750)); \ | |
| 59096 | __ret_750; \ | |
| 57427 | 59097 | }) |
| 57428 | 59098 | #endif |
| 57429 | 59099 | |
| 57430 | 59100 | #ifdef __LITTLE_ENDIAN__ |
| 57431 | #define vqrdmulhs_laneq_s32(__p0_659, __p1_659, __p2_659) __extension__ ({ \ | |
| 57432 | int32_t __s0_659 = __p0_659; \ | |
| 57433 | int32x4_t __s1_659 = __p1_659; \ | |
| 57434 | int32_t __ret_659; \ | |
| 57435 | __ret_659 = vqrdmulhs_s32(__s0_659, vgetq_lane_s32(__s1_659, __p2_659)); \ | |
| 57436 | __ret_659; \ | |
| 59101 | #define vqrdmulhs_laneq_s32(__p0_751, __p1_751, __p2_751) __extension__ ({ \ | |
| 59102 | int32_t __s0_751 = __p0_751; \ | |
| 59103 | int32x4_t __s1_751 = __p1_751; \ | |
| 59104 | int32_t __ret_751; \ | |
| 59105 | __ret_751 = vqrdmulhs_s32(__s0_751, vgetq_lane_s32(__s1_751, __p2_751)); \ | |
| 59106 | __ret_751; \ | |
| 57437 | 59107 | }) |
| 57438 | 59108 | #else |
| 57439 | #define vqrdmulhs_laneq_s32(__p0_660, __p1_660, __p2_660) __extension__ ({ \ | |
| 57440 | int32_t __s0_660 = __p0_660; \ | |
| 57441 | int32x4_t __s1_660 = __p1_660; \ | |
| 57442 | int32x4_t __rev1_660; __rev1_660 = __builtin_shufflevector(__s1_660, __s1_660, 3, 2, 1, 0); \ | |
| 57443 | int32_t __ret_660; \ | |
| 57444 | __ret_660 = vqrdmulhs_s32(__s0_660, __noswap_vgetq_lane_s32(__rev1_660, __p2_660)); \ | |
| 57445 | __ret_660; \ | |
| 59109 | #define vqrdmulhs_laneq_s32(__p0_752, __p1_752, __p2_752) __extension__ ({ \ | |
| 59110 | int32_t __s0_752 = __p0_752; \ | |
| 59111 | int32x4_t __s1_752 = __p1_752; \ | |
| 59112 | int32x4_t __rev1_752; __rev1_752 = __builtin_shufflevector(__s1_752, __s1_752, 3, 2, 1, 0); \ | |
| 59113 | int32_t __ret_752; \ | |
| 59114 | __ret_752 = vqrdmulhs_s32(__s0_752, __noswap_vgetq_lane_s32(__rev1_752, __p2_752)); \ | |
| 59115 | __ret_752; \ | |
| 57446 | 59116 | }) |
| 57447 | 59117 | #endif |
| 57448 | 59118 | |
| 57449 | 59119 | #ifdef __LITTLE_ENDIAN__ |
| 57450 | #define vqrdmulhh_laneq_s16(__p0_661, __p1_661, __p2_661) __extension__ ({ \ | |
| 57451 | int16_t __s0_661 = __p0_661; \ | |
| 57452 | int16x8_t __s1_661 = __p1_661; \ | |
| 57453 | int16_t __ret_661; \ | |
| 57454 | __ret_661 = vqrdmulhh_s16(__s0_661, vgetq_lane_s16(__s1_661, __p2_661)); \ | |
| 57455 | __ret_661; \ | |
| 59120 | #define vqrdmulhh_laneq_s16(__p0_753, __p1_753, __p2_753) __extension__ ({ \ | |
| 59121 | int16_t __s0_753 = __p0_753; \ | |
| 59122 | int16x8_t __s1_753 = __p1_753; \ | |
| 59123 | int16_t __ret_753; \ | |
| 59124 | __ret_753 = vqrdmulhh_s16(__s0_753, vgetq_lane_s16(__s1_753, __p2_753)); \ | |
| 59125 | __ret_753; \ | |
| 57456 | 59126 | }) |
| 57457 | 59127 | #else |
| 57458 | #define vqrdmulhh_laneq_s16(__p0_662, __p1_662, __p2_662) __extension__ ({ \ | |
| 57459 | int16_t __s0_662 = __p0_662; \ | |
| 57460 | int16x8_t __s1_662 = __p1_662; \ | |
| 57461 | int16x8_t __rev1_662; __rev1_662 = __builtin_shufflevector(__s1_662, __s1_662, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57462 | int16_t __ret_662; \ | |
| 57463 | __ret_662 = vqrdmulhh_s16(__s0_662, __noswap_vgetq_lane_s16(__rev1_662, __p2_662)); \ | |
| 57464 | __ret_662; \ | |
| 59128 | #define vqrdmulhh_laneq_s16(__p0_754, __p1_754, __p2_754) __extension__ ({ \ | |
| 59129 | int16_t __s0_754 = __p0_754; \ | |
| 59130 | int16x8_t __s1_754 = __p1_754; \ | |
| 59131 | int16x8_t __rev1_754; __rev1_754 = __builtin_shufflevector(__s1_754, __s1_754, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59132 | int16_t __ret_754; \ | |
| 59133 | __ret_754 = vqrdmulhh_s16(__s0_754, __noswap_vgetq_lane_s16(__rev1_754, __p2_754)); \ | |
| 59134 | __ret_754; \ | |
| 57465 | 59135 | }) |
| 57466 | 59136 | #endif |
| 57467 | 59137 | |
| ... | ... | @@ -57549,22 +59219,22 @@ __ai int16_t vqrdmulhh_s16(int16_t __p0, int16_t __p1) { |
| 57549 | 59219 | }) |
| 57550 | 59220 | #endif |
| 57551 | 59221 | |
| 57552 | __ai uint8_t vqrshlb_u8(uint8_t __p0, uint8_t __p1) { | |
| 59222 | __ai uint8_t vqrshlb_u8(uint8_t __p0, int8_t __p1) { | |
| 57553 | 59223 | uint8_t __ret; |
| 57554 | 59224 | __ret = (uint8_t) __builtin_neon_vqrshlb_u8(__p0, __p1); |
| 57555 | 59225 | return __ret; |
| 57556 | 59226 | } |
| 57557 | __ai uint32_t vqrshls_u32(uint32_t __p0, uint32_t __p1) { | |
| 59227 | __ai uint32_t vqrshls_u32(uint32_t __p0, int32_t __p1) { | |
| 57558 | 59228 | uint32_t __ret; |
| 57559 | 59229 | __ret = (uint32_t) __builtin_neon_vqrshls_u32(__p0, __p1); |
| 57560 | 59230 | return __ret; |
| 57561 | 59231 | } |
| 57562 | __ai uint64_t vqrshld_u64(uint64_t __p0, uint64_t __p1) { | |
| 59232 | __ai uint64_t vqrshld_u64(uint64_t __p0, int64_t __p1) { | |
| 57563 | 59233 | uint64_t __ret; |
| 57564 | 59234 | __ret = (uint64_t) __builtin_neon_vqrshld_u64(__p0, __p1); |
| 57565 | 59235 | return __ret; |
| 57566 | 59236 | } |
| 57567 | __ai uint16_t vqrshlh_u16(uint16_t __p0, uint16_t __p1) { | |
| 59237 | __ai uint16_t vqrshlh_u16(uint16_t __p0, int16_t __p1) { | |
| 57568 | 59238 | uint16_t __ret; |
| 57569 | 59239 | __ret = (uint16_t) __builtin_neon_vqrshlh_u16(__p0, __p1); |
| 57570 | 59240 | return __ret; |
| ... | ... | @@ -57590,128 +59260,128 @@ __ai int16_t vqrshlh_s16(int16_t __p0, int16_t __p1) { |
| 57590 | 59260 | return __ret; |
| 57591 | 59261 | } |
| 57592 | 59262 | #ifdef __LITTLE_ENDIAN__ |
| 57593 | #define vqrshrn_high_n_u32(__p0_663, __p1_663, __p2_663) __extension__ ({ \ | |
| 57594 | uint16x4_t __s0_663 = __p0_663; \ | |
| 57595 | uint32x4_t __s1_663 = __p1_663; \ | |
| 57596 | uint16x8_t __ret_663; \ | |
| 57597 | __ret_663 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_663), (uint16x4_t)(vqrshrn_n_u32(__s1_663, __p2_663)))); \ | |
| 57598 | __ret_663; \ | |
| 59263 | #define vqrshrn_high_n_u32(__p0_755, __p1_755, __p2_755) __extension__ ({ \ | |
| 59264 | uint16x4_t __s0_755 = __p0_755; \ | |
| 59265 | uint32x4_t __s1_755 = __p1_755; \ | |
| 59266 | uint16x8_t __ret_755; \ | |
| 59267 | __ret_755 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_755), (uint16x4_t)(vqrshrn_n_u32(__s1_755, __p2_755)))); \ | |
| 59268 | __ret_755; \ | |
| 57599 | 59269 | }) |
| 57600 | 59270 | #else |
| 57601 | #define vqrshrn_high_n_u32(__p0_664, __p1_664, __p2_664) __extension__ ({ \ | |
| 57602 | uint16x4_t __s0_664 = __p0_664; \ | |
| 57603 | uint32x4_t __s1_664 = __p1_664; \ | |
| 57604 | uint16x4_t __rev0_664; __rev0_664 = __builtin_shufflevector(__s0_664, __s0_664, 3, 2, 1, 0); \ | |
| 57605 | uint32x4_t __rev1_664; __rev1_664 = __builtin_shufflevector(__s1_664, __s1_664, 3, 2, 1, 0); \ | |
| 57606 | uint16x8_t __ret_664; \ | |
| 57607 | __ret_664 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_664), (uint16x4_t)(__noswap_vqrshrn_n_u32(__rev1_664, __p2_664)))); \ | |
| 57608 | __ret_664 = __builtin_shufflevector(__ret_664, __ret_664, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57609 | __ret_664; \ | |
| 59271 | #define vqrshrn_high_n_u32(__p0_756, __p1_756, __p2_756) __extension__ ({ \ | |
| 59272 | uint16x4_t __s0_756 = __p0_756; \ | |
| 59273 | uint32x4_t __s1_756 = __p1_756; \ | |
| 59274 | uint16x4_t __rev0_756; __rev0_756 = __builtin_shufflevector(__s0_756, __s0_756, 3, 2, 1, 0); \ | |
| 59275 | uint32x4_t __rev1_756; __rev1_756 = __builtin_shufflevector(__s1_756, __s1_756, 3, 2, 1, 0); \ | |
| 59276 | uint16x8_t __ret_756; \ | |
| 59277 | __ret_756 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_756), (uint16x4_t)(__noswap_vqrshrn_n_u32(__rev1_756, __p2_756)))); \ | |
| 59278 | __ret_756 = __builtin_shufflevector(__ret_756, __ret_756, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59279 | __ret_756; \ | |
| 57610 | 59280 | }) |
| 57611 | 59281 | #endif |
| 57612 | 59282 | |
| 57613 | 59283 | #ifdef __LITTLE_ENDIAN__ |
| 57614 | #define vqrshrn_high_n_u64(__p0_665, __p1_665, __p2_665) __extension__ ({ \ | |
| 57615 | uint32x2_t __s0_665 = __p0_665; \ | |
| 57616 | uint64x2_t __s1_665 = __p1_665; \ | |
| 57617 | uint32x4_t __ret_665; \ | |
| 57618 | __ret_665 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_665), (uint32x2_t)(vqrshrn_n_u64(__s1_665, __p2_665)))); \ | |
| 57619 | __ret_665; \ | |
| 59284 | #define vqrshrn_high_n_u64(__p0_757, __p1_757, __p2_757) __extension__ ({ \ | |
| 59285 | uint32x2_t __s0_757 = __p0_757; \ | |
| 59286 | uint64x2_t __s1_757 = __p1_757; \ | |
| 59287 | uint32x4_t __ret_757; \ | |
| 59288 | __ret_757 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_757), (uint32x2_t)(vqrshrn_n_u64(__s1_757, __p2_757)))); \ | |
| 59289 | __ret_757; \ | |
| 57620 | 59290 | }) |
| 57621 | 59291 | #else |
| 57622 | #define vqrshrn_high_n_u64(__p0_666, __p1_666, __p2_666) __extension__ ({ \ | |
| 57623 | uint32x2_t __s0_666 = __p0_666; \ | |
| 57624 | uint64x2_t __s1_666 = __p1_666; \ | |
| 57625 | uint32x2_t __rev0_666; __rev0_666 = __builtin_shufflevector(__s0_666, __s0_666, 1, 0); \ | |
| 57626 | uint64x2_t __rev1_666; __rev1_666 = __builtin_shufflevector(__s1_666, __s1_666, 1, 0); \ | |
| 57627 | uint32x4_t __ret_666; \ | |
| 57628 | __ret_666 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_666), (uint32x2_t)(__noswap_vqrshrn_n_u64(__rev1_666, __p2_666)))); \ | |
| 57629 | __ret_666 = __builtin_shufflevector(__ret_666, __ret_666, 3, 2, 1, 0); \ | |
| 57630 | __ret_666; \ | |
| 59292 | #define vqrshrn_high_n_u64(__p0_758, __p1_758, __p2_758) __extension__ ({ \ | |
| 59293 | uint32x2_t __s0_758 = __p0_758; \ | |
| 59294 | uint64x2_t __s1_758 = __p1_758; \ | |
| 59295 | uint32x2_t __rev0_758; __rev0_758 = __builtin_shufflevector(__s0_758, __s0_758, 1, 0); \ | |
| 59296 | uint64x2_t __rev1_758; __rev1_758 = __builtin_shufflevector(__s1_758, __s1_758, 1, 0); \ | |
| 59297 | uint32x4_t __ret_758; \ | |
| 59298 | __ret_758 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_758), (uint32x2_t)(__noswap_vqrshrn_n_u64(__rev1_758, __p2_758)))); \ | |
| 59299 | __ret_758 = __builtin_shufflevector(__ret_758, __ret_758, 3, 2, 1, 0); \ | |
| 59300 | __ret_758; \ | |
| 57631 | 59301 | }) |
| 57632 | 59302 | #endif |
| 57633 | 59303 | |
| 57634 | 59304 | #ifdef __LITTLE_ENDIAN__ |
| 57635 | #define vqrshrn_high_n_u16(__p0_667, __p1_667, __p2_667) __extension__ ({ \ | |
| 57636 | uint8x8_t __s0_667 = __p0_667; \ | |
| 57637 | uint16x8_t __s1_667 = __p1_667; \ | |
| 57638 | uint8x16_t __ret_667; \ | |
| 57639 | __ret_667 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_667), (uint8x8_t)(vqrshrn_n_u16(__s1_667, __p2_667)))); \ | |
| 57640 | __ret_667; \ | |
| 59305 | #define vqrshrn_high_n_u16(__p0_759, __p1_759, __p2_759) __extension__ ({ \ | |
| 59306 | uint8x8_t __s0_759 = __p0_759; \ | |
| 59307 | uint16x8_t __s1_759 = __p1_759; \ | |
| 59308 | uint8x16_t __ret_759; \ | |
| 59309 | __ret_759 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_759), (uint8x8_t)(vqrshrn_n_u16(__s1_759, __p2_759)))); \ | |
| 59310 | __ret_759; \ | |
| 57641 | 59311 | }) |
| 57642 | 59312 | #else |
| 57643 | #define vqrshrn_high_n_u16(__p0_668, __p1_668, __p2_668) __extension__ ({ \ | |
| 57644 | uint8x8_t __s0_668 = __p0_668; \ | |
| 57645 | uint16x8_t __s1_668 = __p1_668; \ | |
| 57646 | uint8x8_t __rev0_668; __rev0_668 = __builtin_shufflevector(__s0_668, __s0_668, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57647 | uint16x8_t __rev1_668; __rev1_668 = __builtin_shufflevector(__s1_668, __s1_668, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57648 | uint8x16_t __ret_668; \ | |
| 57649 | __ret_668 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_668), (uint8x8_t)(__noswap_vqrshrn_n_u16(__rev1_668, __p2_668)))); \ | |
| 57650 | __ret_668 = __builtin_shufflevector(__ret_668, __ret_668, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57651 | __ret_668; \ | |
| 59313 | #define vqrshrn_high_n_u16(__p0_760, __p1_760, __p2_760) __extension__ ({ \ | |
| 59314 | uint8x8_t __s0_760 = __p0_760; \ | |
| 59315 | uint16x8_t __s1_760 = __p1_760; \ | |
| 59316 | uint8x8_t __rev0_760; __rev0_760 = __builtin_shufflevector(__s0_760, __s0_760, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59317 | uint16x8_t __rev1_760; __rev1_760 = __builtin_shufflevector(__s1_760, __s1_760, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59318 | uint8x16_t __ret_760; \ | |
| 59319 | __ret_760 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_760), (uint8x8_t)(__noswap_vqrshrn_n_u16(__rev1_760, __p2_760)))); \ | |
| 59320 | __ret_760 = __builtin_shufflevector(__ret_760, __ret_760, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59321 | __ret_760; \ | |
| 57652 | 59322 | }) |
| 57653 | 59323 | #endif |
| 57654 | 59324 | |
| 57655 | 59325 | #ifdef __LITTLE_ENDIAN__ |
| 57656 | #define vqrshrn_high_n_s32(__p0_669, __p1_669, __p2_669) __extension__ ({ \ | |
| 57657 | int16x4_t __s0_669 = __p0_669; \ | |
| 57658 | int32x4_t __s1_669 = __p1_669; \ | |
| 57659 | int16x8_t __ret_669; \ | |
| 57660 | __ret_669 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_669), (int16x4_t)(vqrshrn_n_s32(__s1_669, __p2_669)))); \ | |
| 57661 | __ret_669; \ | |
| 59326 | #define vqrshrn_high_n_s32(__p0_761, __p1_761, __p2_761) __extension__ ({ \ | |
| 59327 | int16x4_t __s0_761 = __p0_761; \ | |
| 59328 | int32x4_t __s1_761 = __p1_761; \ | |
| 59329 | int16x8_t __ret_761; \ | |
| 59330 | __ret_761 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_761), (int16x4_t)(vqrshrn_n_s32(__s1_761, __p2_761)))); \ | |
| 59331 | __ret_761; \ | |
| 57662 | 59332 | }) |
| 57663 | 59333 | #else |
| 57664 | #define vqrshrn_high_n_s32(__p0_670, __p1_670, __p2_670) __extension__ ({ \ | |
| 57665 | int16x4_t __s0_670 = __p0_670; \ | |
| 57666 | int32x4_t __s1_670 = __p1_670; \ | |
| 57667 | int16x4_t __rev0_670; __rev0_670 = __builtin_shufflevector(__s0_670, __s0_670, 3, 2, 1, 0); \ | |
| 57668 | int32x4_t __rev1_670; __rev1_670 = __builtin_shufflevector(__s1_670, __s1_670, 3, 2, 1, 0); \ | |
| 57669 | int16x8_t __ret_670; \ | |
| 57670 | __ret_670 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_670), (int16x4_t)(__noswap_vqrshrn_n_s32(__rev1_670, __p2_670)))); \ | |
| 57671 | __ret_670 = __builtin_shufflevector(__ret_670, __ret_670, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57672 | __ret_670; \ | |
| 59334 | #define vqrshrn_high_n_s32(__p0_762, __p1_762, __p2_762) __extension__ ({ \ | |
| 59335 | int16x4_t __s0_762 = __p0_762; \ | |
| 59336 | int32x4_t __s1_762 = __p1_762; \ | |
| 59337 | int16x4_t __rev0_762; __rev0_762 = __builtin_shufflevector(__s0_762, __s0_762, 3, 2, 1, 0); \ | |
| 59338 | int32x4_t __rev1_762; __rev1_762 = __builtin_shufflevector(__s1_762, __s1_762, 3, 2, 1, 0); \ | |
| 59339 | int16x8_t __ret_762; \ | |
| 59340 | __ret_762 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_762), (int16x4_t)(__noswap_vqrshrn_n_s32(__rev1_762, __p2_762)))); \ | |
| 59341 | __ret_762 = __builtin_shufflevector(__ret_762, __ret_762, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59342 | __ret_762; \ | |
| 57673 | 59343 | }) |
| 57674 | 59344 | #endif |
| 57675 | 59345 | |
| 57676 | 59346 | #ifdef __LITTLE_ENDIAN__ |
| 57677 | #define vqrshrn_high_n_s64(__p0_671, __p1_671, __p2_671) __extension__ ({ \ | |
| 57678 | int32x2_t __s0_671 = __p0_671; \ | |
| 57679 | int64x2_t __s1_671 = __p1_671; \ | |
| 57680 | int32x4_t __ret_671; \ | |
| 57681 | __ret_671 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_671), (int32x2_t)(vqrshrn_n_s64(__s1_671, __p2_671)))); \ | |
| 57682 | __ret_671; \ | |
| 59347 | #define vqrshrn_high_n_s64(__p0_763, __p1_763, __p2_763) __extension__ ({ \ | |
| 59348 | int32x2_t __s0_763 = __p0_763; \ | |
| 59349 | int64x2_t __s1_763 = __p1_763; \ | |
| 59350 | int32x4_t __ret_763; \ | |
| 59351 | __ret_763 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_763), (int32x2_t)(vqrshrn_n_s64(__s1_763, __p2_763)))); \ | |
| 59352 | __ret_763; \ | |
| 57683 | 59353 | }) |
| 57684 | 59354 | #else |
| 57685 | #define vqrshrn_high_n_s64(__p0_672, __p1_672, __p2_672) __extension__ ({ \ | |
| 57686 | int32x2_t __s0_672 = __p0_672; \ | |
| 57687 | int64x2_t __s1_672 = __p1_672; \ | |
| 57688 | int32x2_t __rev0_672; __rev0_672 = __builtin_shufflevector(__s0_672, __s0_672, 1, 0); \ | |
| 57689 | int64x2_t __rev1_672; __rev1_672 = __builtin_shufflevector(__s1_672, __s1_672, 1, 0); \ | |
| 57690 | int32x4_t __ret_672; \ | |
| 57691 | __ret_672 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_672), (int32x2_t)(__noswap_vqrshrn_n_s64(__rev1_672, __p2_672)))); \ | |
| 57692 | __ret_672 = __builtin_shufflevector(__ret_672, __ret_672, 3, 2, 1, 0); \ | |
| 57693 | __ret_672; \ | |
| 59355 | #define vqrshrn_high_n_s64(__p0_764, __p1_764, __p2_764) __extension__ ({ \ | |
| 59356 | int32x2_t __s0_764 = __p0_764; \ | |
| 59357 | int64x2_t __s1_764 = __p1_764; \ | |
| 59358 | int32x2_t __rev0_764; __rev0_764 = __builtin_shufflevector(__s0_764, __s0_764, 1, 0); \ | |
| 59359 | int64x2_t __rev1_764; __rev1_764 = __builtin_shufflevector(__s1_764, __s1_764, 1, 0); \ | |
| 59360 | int32x4_t __ret_764; \ | |
| 59361 | __ret_764 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_764), (int32x2_t)(__noswap_vqrshrn_n_s64(__rev1_764, __p2_764)))); \ | |
| 59362 | __ret_764 = __builtin_shufflevector(__ret_764, __ret_764, 3, 2, 1, 0); \ | |
| 59363 | __ret_764; \ | |
| 57694 | 59364 | }) |
| 57695 | 59365 | #endif |
| 57696 | 59366 | |
| 57697 | 59367 | #ifdef __LITTLE_ENDIAN__ |
| 57698 | #define vqrshrn_high_n_s16(__p0_673, __p1_673, __p2_673) __extension__ ({ \ | |
| 57699 | int8x8_t __s0_673 = __p0_673; \ | |
| 57700 | int16x8_t __s1_673 = __p1_673; \ | |
| 57701 | int8x16_t __ret_673; \ | |
| 57702 | __ret_673 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_673), (int8x8_t)(vqrshrn_n_s16(__s1_673, __p2_673)))); \ | |
| 57703 | __ret_673; \ | |
| 59368 | #define vqrshrn_high_n_s16(__p0_765, __p1_765, __p2_765) __extension__ ({ \ | |
| 59369 | int8x8_t __s0_765 = __p0_765; \ | |
| 59370 | int16x8_t __s1_765 = __p1_765; \ | |
| 59371 | int8x16_t __ret_765; \ | |
| 59372 | __ret_765 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_765), (int8x8_t)(vqrshrn_n_s16(__s1_765, __p2_765)))); \ | |
| 59373 | __ret_765; \ | |
| 57704 | 59374 | }) |
| 57705 | 59375 | #else |
| 57706 | #define vqrshrn_high_n_s16(__p0_674, __p1_674, __p2_674) __extension__ ({ \ | |
| 57707 | int8x8_t __s0_674 = __p0_674; \ | |
| 57708 | int16x8_t __s1_674 = __p1_674; \ | |
| 57709 | int8x8_t __rev0_674; __rev0_674 = __builtin_shufflevector(__s0_674, __s0_674, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57710 | int16x8_t __rev1_674; __rev1_674 = __builtin_shufflevector(__s1_674, __s1_674, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57711 | int8x16_t __ret_674; \ | |
| 57712 | __ret_674 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_674), (int8x8_t)(__noswap_vqrshrn_n_s16(__rev1_674, __p2_674)))); \ | |
| 57713 | __ret_674 = __builtin_shufflevector(__ret_674, __ret_674, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57714 | __ret_674; \ | |
| 59376 | #define vqrshrn_high_n_s16(__p0_766, __p1_766, __p2_766) __extension__ ({ \ | |
| 59377 | int8x8_t __s0_766 = __p0_766; \ | |
| 59378 | int16x8_t __s1_766 = __p1_766; \ | |
| 59379 | int8x8_t __rev0_766; __rev0_766 = __builtin_shufflevector(__s0_766, __s0_766, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59380 | int16x8_t __rev1_766; __rev1_766 = __builtin_shufflevector(__s1_766, __s1_766, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59381 | int8x16_t __ret_766; \ | |
| 59382 | __ret_766 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_766), (int8x8_t)(__noswap_vqrshrn_n_s16(__rev1_766, __p2_766)))); \ | |
| 59383 | __ret_766 = __builtin_shufflevector(__ret_766, __ret_766, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59384 | __ret_766; \ | |
| 57715 | 59385 | }) |
| 57716 | 59386 | #endif |
| 57717 | 59387 | |
| ... | ... | @@ -57752,65 +59422,65 @@ __ai int16_t vqrshlh_s16(int16_t __p0, int16_t __p1) { |
| 57752 | 59422 | __ret; \ |
| 57753 | 59423 | }) |
| 57754 | 59424 | #ifdef __LITTLE_ENDIAN__ |
| 57755 | #define vqrshrun_high_n_s32(__p0_675, __p1_675, __p2_675) __extension__ ({ \ | |
| 57756 | int16x4_t __s0_675 = __p0_675; \ | |
| 57757 | int32x4_t __s1_675 = __p1_675; \ | |
| 57758 | int16x8_t __ret_675; \ | |
| 57759 | __ret_675 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_675), (int16x4_t)(vqrshrun_n_s32(__s1_675, __p2_675)))); \ | |
| 57760 | __ret_675; \ | |
| 59425 | #define vqrshrun_high_n_s32(__p0_767, __p1_767, __p2_767) __extension__ ({ \ | |
| 59426 | int16x4_t __s0_767 = __p0_767; \ | |
| 59427 | int32x4_t __s1_767 = __p1_767; \ | |
| 59428 | int16x8_t __ret_767; \ | |
| 59429 | __ret_767 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_767), (int16x4_t)(vqrshrun_n_s32(__s1_767, __p2_767)))); \ | |
| 59430 | __ret_767; \ | |
| 57761 | 59431 | }) |
| 57762 | 59432 | #else |
| 57763 | #define vqrshrun_high_n_s32(__p0_676, __p1_676, __p2_676) __extension__ ({ \ | |
| 57764 | int16x4_t __s0_676 = __p0_676; \ | |
| 57765 | int32x4_t __s1_676 = __p1_676; \ | |
| 57766 | int16x4_t __rev0_676; __rev0_676 = __builtin_shufflevector(__s0_676, __s0_676, 3, 2, 1, 0); \ | |
| 57767 | int32x4_t __rev1_676; __rev1_676 = __builtin_shufflevector(__s1_676, __s1_676, 3, 2, 1, 0); \ | |
| 57768 | int16x8_t __ret_676; \ | |
| 57769 | __ret_676 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_676), (int16x4_t)(__noswap_vqrshrun_n_s32(__rev1_676, __p2_676)))); \ | |
| 57770 | __ret_676 = __builtin_shufflevector(__ret_676, __ret_676, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57771 | __ret_676; \ | |
| 59433 | #define vqrshrun_high_n_s32(__p0_768, __p1_768, __p2_768) __extension__ ({ \ | |
| 59434 | int16x4_t __s0_768 = __p0_768; \ | |
| 59435 | int32x4_t __s1_768 = __p1_768; \ | |
| 59436 | int16x4_t __rev0_768; __rev0_768 = __builtin_shufflevector(__s0_768, __s0_768, 3, 2, 1, 0); \ | |
| 59437 | int32x4_t __rev1_768; __rev1_768 = __builtin_shufflevector(__s1_768, __s1_768, 3, 2, 1, 0); \ | |
| 59438 | int16x8_t __ret_768; \ | |
| 59439 | __ret_768 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_768), (int16x4_t)(__noswap_vqrshrun_n_s32(__rev1_768, __p2_768)))); \ | |
| 59440 | __ret_768 = __builtin_shufflevector(__ret_768, __ret_768, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59441 | __ret_768; \ | |
| 57772 | 59442 | }) |
| 57773 | 59443 | #endif |
| 57774 | 59444 | |
| 57775 | 59445 | #ifdef __LITTLE_ENDIAN__ |
| 57776 | #define vqrshrun_high_n_s64(__p0_677, __p1_677, __p2_677) __extension__ ({ \ | |
| 57777 | int32x2_t __s0_677 = __p0_677; \ | |
| 57778 | int64x2_t __s1_677 = __p1_677; \ | |
| 57779 | int32x4_t __ret_677; \ | |
| 57780 | __ret_677 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_677), (int32x2_t)(vqrshrun_n_s64(__s1_677, __p2_677)))); \ | |
| 57781 | __ret_677; \ | |
| 59446 | #define vqrshrun_high_n_s64(__p0_769, __p1_769, __p2_769) __extension__ ({ \ | |
| 59447 | int32x2_t __s0_769 = __p0_769; \ | |
| 59448 | int64x2_t __s1_769 = __p1_769; \ | |
| 59449 | int32x4_t __ret_769; \ | |
| 59450 | __ret_769 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_769), (int32x2_t)(vqrshrun_n_s64(__s1_769, __p2_769)))); \ | |
| 59451 | __ret_769; \ | |
| 57782 | 59452 | }) |
| 57783 | 59453 | #else |
| 57784 | #define vqrshrun_high_n_s64(__p0_678, __p1_678, __p2_678) __extension__ ({ \ | |
| 57785 | int32x2_t __s0_678 = __p0_678; \ | |
| 57786 | int64x2_t __s1_678 = __p1_678; \ | |
| 57787 | int32x2_t __rev0_678; __rev0_678 = __builtin_shufflevector(__s0_678, __s0_678, 1, 0); \ | |
| 57788 | int64x2_t __rev1_678; __rev1_678 = __builtin_shufflevector(__s1_678, __s1_678, 1, 0); \ | |
| 57789 | int32x4_t __ret_678; \ | |
| 57790 | __ret_678 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_678), (int32x2_t)(__noswap_vqrshrun_n_s64(__rev1_678, __p2_678)))); \ | |
| 57791 | __ret_678 = __builtin_shufflevector(__ret_678, __ret_678, 3, 2, 1, 0); \ | |
| 57792 | __ret_678; \ | |
| 59454 | #define vqrshrun_high_n_s64(__p0_770, __p1_770, __p2_770) __extension__ ({ \ | |
| 59455 | int32x2_t __s0_770 = __p0_770; \ | |
| 59456 | int64x2_t __s1_770 = __p1_770; \ | |
| 59457 | int32x2_t __rev0_770; __rev0_770 = __builtin_shufflevector(__s0_770, __s0_770, 1, 0); \ | |
| 59458 | int64x2_t __rev1_770; __rev1_770 = __builtin_shufflevector(__s1_770, __s1_770, 1, 0); \ | |
| 59459 | int32x4_t __ret_770; \ | |
| 59460 | __ret_770 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_770), (int32x2_t)(__noswap_vqrshrun_n_s64(__rev1_770, __p2_770)))); \ | |
| 59461 | __ret_770 = __builtin_shufflevector(__ret_770, __ret_770, 3, 2, 1, 0); \ | |
| 59462 | __ret_770; \ | |
| 57793 | 59463 | }) |
| 57794 | 59464 | #endif |
| 57795 | 59465 | |
| 57796 | 59466 | #ifdef __LITTLE_ENDIAN__ |
| 57797 | #define vqrshrun_high_n_s16(__p0_679, __p1_679, __p2_679) __extension__ ({ \ | |
| 57798 | int8x8_t __s0_679 = __p0_679; \ | |
| 57799 | int16x8_t __s1_679 = __p1_679; \ | |
| 57800 | int8x16_t __ret_679; \ | |
| 57801 | __ret_679 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_679), (int8x8_t)(vqrshrun_n_s16(__s1_679, __p2_679)))); \ | |
| 57802 | __ret_679; \ | |
| 59467 | #define vqrshrun_high_n_s16(__p0_771, __p1_771, __p2_771) __extension__ ({ \ | |
| 59468 | int8x8_t __s0_771 = __p0_771; \ | |
| 59469 | int16x8_t __s1_771 = __p1_771; \ | |
| 59470 | int8x16_t __ret_771; \ | |
| 59471 | __ret_771 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_771), (int8x8_t)(vqrshrun_n_s16(__s1_771, __p2_771)))); \ | |
| 59472 | __ret_771; \ | |
| 57803 | 59473 | }) |
| 57804 | 59474 | #else |
| 57805 | #define vqrshrun_high_n_s16(__p0_680, __p1_680, __p2_680) __extension__ ({ \ | |
| 57806 | int8x8_t __s0_680 = __p0_680; \ | |
| 57807 | int16x8_t __s1_680 = __p1_680; \ | |
| 57808 | int8x8_t __rev0_680; __rev0_680 = __builtin_shufflevector(__s0_680, __s0_680, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57809 | int16x8_t __rev1_680; __rev1_680 = __builtin_shufflevector(__s1_680, __s1_680, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57810 | int8x16_t __ret_680; \ | |
| 57811 | __ret_680 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_680), (int8x8_t)(__noswap_vqrshrun_n_s16(__rev1_680, __p2_680)))); \ | |
| 57812 | __ret_680 = __builtin_shufflevector(__ret_680, __ret_680, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57813 | __ret_680; \ | |
| 59475 | #define vqrshrun_high_n_s16(__p0_772, __p1_772, __p2_772) __extension__ ({ \ | |
| 59476 | int8x8_t __s0_772 = __p0_772; \ | |
| 59477 | int16x8_t __s1_772 = __p1_772; \ | |
| 59478 | int8x8_t __rev0_772; __rev0_772 = __builtin_shufflevector(__s0_772, __s0_772, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59479 | int16x8_t __rev1_772; __rev1_772 = __builtin_shufflevector(__s1_772, __s1_772, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59480 | int8x16_t __ret_772; \ | |
| 59481 | __ret_772 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_772), (int8x8_t)(__noswap_vqrshrun_n_s16(__rev1_772, __p2_772)))); \ | |
| 59482 | __ret_772 = __builtin_shufflevector(__ret_772, __ret_772, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59483 | __ret_772; \ | |
| 57814 | 59484 | }) |
| 57815 | 59485 | #endif |
| 57816 | 59486 | |
| ... | ... | @@ -57832,22 +59502,22 @@ __ai int16_t vqrshlh_s16(int16_t __p0, int16_t __p1) { |
| 57832 | 59502 | __ret = (int8_t) __builtin_neon_vqrshrunh_n_s16(__s0, __p1); \ |
| 57833 | 59503 | __ret; \ |
| 57834 | 59504 | }) |
| 57835 | __ai uint8_t vqshlb_u8(uint8_t __p0, uint8_t __p1) { | |
| 59505 | __ai uint8_t vqshlb_u8(uint8_t __p0, int8_t __p1) { | |
| 57836 | 59506 | uint8_t __ret; |
| 57837 | 59507 | __ret = (uint8_t) __builtin_neon_vqshlb_u8(__p0, __p1); |
| 57838 | 59508 | return __ret; |
| 57839 | 59509 | } |
| 57840 | __ai uint32_t vqshls_u32(uint32_t __p0, uint32_t __p1) { | |
| 59510 | __ai uint32_t vqshls_u32(uint32_t __p0, int32_t __p1) { | |
| 57841 | 59511 | uint32_t __ret; |
| 57842 | 59512 | __ret = (uint32_t) __builtin_neon_vqshls_u32(__p0, __p1); |
| 57843 | 59513 | return __ret; |
| 57844 | 59514 | } |
| 57845 | __ai uint64_t vqshld_u64(uint64_t __p0, uint64_t __p1) { | |
| 59515 | __ai uint64_t vqshld_u64(uint64_t __p0, int64_t __p1) { | |
| 57846 | 59516 | uint64_t __ret; |
| 57847 | 59517 | __ret = (uint64_t) __builtin_neon_vqshld_u64(__p0, __p1); |
| 57848 | 59518 | return __ret; |
| 57849 | 59519 | } |
| 57850 | __ai uint16_t vqshlh_u16(uint16_t __p0, uint16_t __p1) { | |
| 59520 | __ai uint16_t vqshlh_u16(uint16_t __p0, int16_t __p1) { | |
| 57851 | 59521 | uint16_t __ret; |
| 57852 | 59522 | __ret = (uint16_t) __builtin_neon_vqshlh_u16(__p0, __p1); |
| 57853 | 59523 | return __ret; |
| ... | ... | @@ -57945,128 +59615,128 @@ __ai int16_t vqshlh_s16(int16_t __p0, int16_t __p1) { |
| 57945 | 59615 | __ret; \ |
| 57946 | 59616 | }) |
| 57947 | 59617 | #ifdef __LITTLE_ENDIAN__ |
| 57948 | #define vqshrn_high_n_u32(__p0_681, __p1_681, __p2_681) __extension__ ({ \ | |
| 57949 | uint16x4_t __s0_681 = __p0_681; \ | |
| 57950 | uint32x4_t __s1_681 = __p1_681; \ | |
| 57951 | uint16x8_t __ret_681; \ | |
| 57952 | __ret_681 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_681), (uint16x4_t)(vqshrn_n_u32(__s1_681, __p2_681)))); \ | |
| 57953 | __ret_681; \ | |
| 59618 | #define vqshrn_high_n_u32(__p0_773, __p1_773, __p2_773) __extension__ ({ \ | |
| 59619 | uint16x4_t __s0_773 = __p0_773; \ | |
| 59620 | uint32x4_t __s1_773 = __p1_773; \ | |
| 59621 | uint16x8_t __ret_773; \ | |
| 59622 | __ret_773 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_773), (uint16x4_t)(vqshrn_n_u32(__s1_773, __p2_773)))); \ | |
| 59623 | __ret_773; \ | |
| 57954 | 59624 | }) |
| 57955 | 59625 | #else |
| 57956 | #define vqshrn_high_n_u32(__p0_682, __p1_682, __p2_682) __extension__ ({ \ | |
| 57957 | uint16x4_t __s0_682 = __p0_682; \ | |
| 57958 | uint32x4_t __s1_682 = __p1_682; \ | |
| 57959 | uint16x4_t __rev0_682; __rev0_682 = __builtin_shufflevector(__s0_682, __s0_682, 3, 2, 1, 0); \ | |
| 57960 | uint32x4_t __rev1_682; __rev1_682 = __builtin_shufflevector(__s1_682, __s1_682, 3, 2, 1, 0); \ | |
| 57961 | uint16x8_t __ret_682; \ | |
| 57962 | __ret_682 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_682), (uint16x4_t)(__noswap_vqshrn_n_u32(__rev1_682, __p2_682)))); \ | |
| 57963 | __ret_682 = __builtin_shufflevector(__ret_682, __ret_682, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 57964 | __ret_682; \ | |
| 59626 | #define vqshrn_high_n_u32(__p0_774, __p1_774, __p2_774) __extension__ ({ \ | |
| 59627 | uint16x4_t __s0_774 = __p0_774; \ | |
| 59628 | uint32x4_t __s1_774 = __p1_774; \ | |
| 59629 | uint16x4_t __rev0_774; __rev0_774 = __builtin_shufflevector(__s0_774, __s0_774, 3, 2, 1, 0); \ | |
| 59630 | uint32x4_t __rev1_774; __rev1_774 = __builtin_shufflevector(__s1_774, __s1_774, 3, 2, 1, 0); \ | |
| 59631 | uint16x8_t __ret_774; \ | |
| 59632 | __ret_774 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_774), (uint16x4_t)(__noswap_vqshrn_n_u32(__rev1_774, __p2_774)))); \ | |
| 59633 | __ret_774 = __builtin_shufflevector(__ret_774, __ret_774, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59634 | __ret_774; \ | |
| 57965 | 59635 | }) |
| 57966 | 59636 | #endif |
| 57967 | 59637 | |
| 57968 | 59638 | #ifdef __LITTLE_ENDIAN__ |
| 57969 | #define vqshrn_high_n_u64(__p0_683, __p1_683, __p2_683) __extension__ ({ \ | |
| 57970 | uint32x2_t __s0_683 = __p0_683; \ | |
| 57971 | uint64x2_t __s1_683 = __p1_683; \ | |
| 57972 | uint32x4_t __ret_683; \ | |
| 57973 | __ret_683 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_683), (uint32x2_t)(vqshrn_n_u64(__s1_683, __p2_683)))); \ | |
| 57974 | __ret_683; \ | |
| 59639 | #define vqshrn_high_n_u64(__p0_775, __p1_775, __p2_775) __extension__ ({ \ | |
| 59640 | uint32x2_t __s0_775 = __p0_775; \ | |
| 59641 | uint64x2_t __s1_775 = __p1_775; \ | |
| 59642 | uint32x4_t __ret_775; \ | |
| 59643 | __ret_775 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_775), (uint32x2_t)(vqshrn_n_u64(__s1_775, __p2_775)))); \ | |
| 59644 | __ret_775; \ | |
| 57975 | 59645 | }) |
| 57976 | 59646 | #else |
| 57977 | #define vqshrn_high_n_u64(__p0_684, __p1_684, __p2_684) __extension__ ({ \ | |
| 57978 | uint32x2_t __s0_684 = __p0_684; \ | |
| 57979 | uint64x2_t __s1_684 = __p1_684; \ | |
| 57980 | uint32x2_t __rev0_684; __rev0_684 = __builtin_shufflevector(__s0_684, __s0_684, 1, 0); \ | |
| 57981 | uint64x2_t __rev1_684; __rev1_684 = __builtin_shufflevector(__s1_684, __s1_684, 1, 0); \ | |
| 57982 | uint32x4_t __ret_684; \ | |
| 57983 | __ret_684 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_684), (uint32x2_t)(__noswap_vqshrn_n_u64(__rev1_684, __p2_684)))); \ | |
| 57984 | __ret_684 = __builtin_shufflevector(__ret_684, __ret_684, 3, 2, 1, 0); \ | |
| 57985 | __ret_684; \ | |
| 59647 | #define vqshrn_high_n_u64(__p0_776, __p1_776, __p2_776) __extension__ ({ \ | |
| 59648 | uint32x2_t __s0_776 = __p0_776; \ | |
| 59649 | uint64x2_t __s1_776 = __p1_776; \ | |
| 59650 | uint32x2_t __rev0_776; __rev0_776 = __builtin_shufflevector(__s0_776, __s0_776, 1, 0); \ | |
| 59651 | uint64x2_t __rev1_776; __rev1_776 = __builtin_shufflevector(__s1_776, __s1_776, 1, 0); \ | |
| 59652 | uint32x4_t __ret_776; \ | |
| 59653 | __ret_776 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_776), (uint32x2_t)(__noswap_vqshrn_n_u64(__rev1_776, __p2_776)))); \ | |
| 59654 | __ret_776 = __builtin_shufflevector(__ret_776, __ret_776, 3, 2, 1, 0); \ | |
| 59655 | __ret_776; \ | |
| 57986 | 59656 | }) |
| 57987 | 59657 | #endif |
| 57988 | 59658 | |
| 57989 | 59659 | #ifdef __LITTLE_ENDIAN__ |
| 57990 | #define vqshrn_high_n_u16(__p0_685, __p1_685, __p2_685) __extension__ ({ \ | |
| 57991 | uint8x8_t __s0_685 = __p0_685; \ | |
| 57992 | uint16x8_t __s1_685 = __p1_685; \ | |
| 57993 | uint8x16_t __ret_685; \ | |
| 57994 | __ret_685 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_685), (uint8x8_t)(vqshrn_n_u16(__s1_685, __p2_685)))); \ | |
| 57995 | __ret_685; \ | |
| 59660 | #define vqshrn_high_n_u16(__p0_777, __p1_777, __p2_777) __extension__ ({ \ | |
| 59661 | uint8x8_t __s0_777 = __p0_777; \ | |
| 59662 | uint16x8_t __s1_777 = __p1_777; \ | |
| 59663 | uint8x16_t __ret_777; \ | |
| 59664 | __ret_777 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_777), (uint8x8_t)(vqshrn_n_u16(__s1_777, __p2_777)))); \ | |
| 59665 | __ret_777; \ | |
| 57996 | 59666 | }) |
| 57997 | 59667 | #else |
| 57998 | #define vqshrn_high_n_u16(__p0_686, __p1_686, __p2_686) __extension__ ({ \ | |
| 57999 | uint8x8_t __s0_686 = __p0_686; \ | |
| 58000 | uint16x8_t __s1_686 = __p1_686; \ | |
| 58001 | uint8x8_t __rev0_686; __rev0_686 = __builtin_shufflevector(__s0_686, __s0_686, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58002 | uint16x8_t __rev1_686; __rev1_686 = __builtin_shufflevector(__s1_686, __s1_686, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58003 | uint8x16_t __ret_686; \ | |
| 58004 | __ret_686 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_686), (uint8x8_t)(__noswap_vqshrn_n_u16(__rev1_686, __p2_686)))); \ | |
| 58005 | __ret_686 = __builtin_shufflevector(__ret_686, __ret_686, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58006 | __ret_686; \ | |
| 59668 | #define vqshrn_high_n_u16(__p0_778, __p1_778, __p2_778) __extension__ ({ \ | |
| 59669 | uint8x8_t __s0_778 = __p0_778; \ | |
| 59670 | uint16x8_t __s1_778 = __p1_778; \ | |
| 59671 | uint8x8_t __rev0_778; __rev0_778 = __builtin_shufflevector(__s0_778, __s0_778, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59672 | uint16x8_t __rev1_778; __rev1_778 = __builtin_shufflevector(__s1_778, __s1_778, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59673 | uint8x16_t __ret_778; \ | |
| 59674 | __ret_778 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_778), (uint8x8_t)(__noswap_vqshrn_n_u16(__rev1_778, __p2_778)))); \ | |
| 59675 | __ret_778 = __builtin_shufflevector(__ret_778, __ret_778, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59676 | __ret_778; \ | |
| 58007 | 59677 | }) |
| 58008 | 59678 | #endif |
| 58009 | 59679 | |
| 58010 | 59680 | #ifdef __LITTLE_ENDIAN__ |
| 58011 | #define vqshrn_high_n_s32(__p0_687, __p1_687, __p2_687) __extension__ ({ \ | |
| 58012 | int16x4_t __s0_687 = __p0_687; \ | |
| 58013 | int32x4_t __s1_687 = __p1_687; \ | |
| 58014 | int16x8_t __ret_687; \ | |
| 58015 | __ret_687 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_687), (int16x4_t)(vqshrn_n_s32(__s1_687, __p2_687)))); \ | |
| 58016 | __ret_687; \ | |
| 59681 | #define vqshrn_high_n_s32(__p0_779, __p1_779, __p2_779) __extension__ ({ \ | |
| 59682 | int16x4_t __s0_779 = __p0_779; \ | |
| 59683 | int32x4_t __s1_779 = __p1_779; \ | |
| 59684 | int16x8_t __ret_779; \ | |
| 59685 | __ret_779 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_779), (int16x4_t)(vqshrn_n_s32(__s1_779, __p2_779)))); \ | |
| 59686 | __ret_779; \ | |
| 58017 | 59687 | }) |
| 58018 | 59688 | #else |
| 58019 | #define vqshrn_high_n_s32(__p0_688, __p1_688, __p2_688) __extension__ ({ \ | |
| 58020 | int16x4_t __s0_688 = __p0_688; \ | |
| 58021 | int32x4_t __s1_688 = __p1_688; \ | |
| 58022 | int16x4_t __rev0_688; __rev0_688 = __builtin_shufflevector(__s0_688, __s0_688, 3, 2, 1, 0); \ | |
| 58023 | int32x4_t __rev1_688; __rev1_688 = __builtin_shufflevector(__s1_688, __s1_688, 3, 2, 1, 0); \ | |
| 58024 | int16x8_t __ret_688; \ | |
| 58025 | __ret_688 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_688), (int16x4_t)(__noswap_vqshrn_n_s32(__rev1_688, __p2_688)))); \ | |
| 58026 | __ret_688 = __builtin_shufflevector(__ret_688, __ret_688, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58027 | __ret_688; \ | |
| 59689 | #define vqshrn_high_n_s32(__p0_780, __p1_780, __p2_780) __extension__ ({ \ | |
| 59690 | int16x4_t __s0_780 = __p0_780; \ | |
| 59691 | int32x4_t __s1_780 = __p1_780; \ | |
| 59692 | int16x4_t __rev0_780; __rev0_780 = __builtin_shufflevector(__s0_780, __s0_780, 3, 2, 1, 0); \ | |
| 59693 | int32x4_t __rev1_780; __rev1_780 = __builtin_shufflevector(__s1_780, __s1_780, 3, 2, 1, 0); \ | |
| 59694 | int16x8_t __ret_780; \ | |
| 59695 | __ret_780 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_780), (int16x4_t)(__noswap_vqshrn_n_s32(__rev1_780, __p2_780)))); \ | |
| 59696 | __ret_780 = __builtin_shufflevector(__ret_780, __ret_780, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59697 | __ret_780; \ | |
| 58028 | 59698 | }) |
| 58029 | 59699 | #endif |
| 58030 | 59700 | |
| 58031 | 59701 | #ifdef __LITTLE_ENDIAN__ |
| 58032 | #define vqshrn_high_n_s64(__p0_689, __p1_689, __p2_689) __extension__ ({ \ | |
| 58033 | int32x2_t __s0_689 = __p0_689; \ | |
| 58034 | int64x2_t __s1_689 = __p1_689; \ | |
| 58035 | int32x4_t __ret_689; \ | |
| 58036 | __ret_689 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_689), (int32x2_t)(vqshrn_n_s64(__s1_689, __p2_689)))); \ | |
| 58037 | __ret_689; \ | |
| 59702 | #define vqshrn_high_n_s64(__p0_781, __p1_781, __p2_781) __extension__ ({ \ | |
| 59703 | int32x2_t __s0_781 = __p0_781; \ | |
| 59704 | int64x2_t __s1_781 = __p1_781; \ | |
| 59705 | int32x4_t __ret_781; \ | |
| 59706 | __ret_781 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_781), (int32x2_t)(vqshrn_n_s64(__s1_781, __p2_781)))); \ | |
| 59707 | __ret_781; \ | |
| 58038 | 59708 | }) |
| 58039 | 59709 | #else |
| 58040 | #define vqshrn_high_n_s64(__p0_690, __p1_690, __p2_690) __extension__ ({ \ | |
| 58041 | int32x2_t __s0_690 = __p0_690; \ | |
| 58042 | int64x2_t __s1_690 = __p1_690; \ | |
| 58043 | int32x2_t __rev0_690; __rev0_690 = __builtin_shufflevector(__s0_690, __s0_690, 1, 0); \ | |
| 58044 | int64x2_t __rev1_690; __rev1_690 = __builtin_shufflevector(__s1_690, __s1_690, 1, 0); \ | |
| 58045 | int32x4_t __ret_690; \ | |
| 58046 | __ret_690 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_690), (int32x2_t)(__noswap_vqshrn_n_s64(__rev1_690, __p2_690)))); \ | |
| 58047 | __ret_690 = __builtin_shufflevector(__ret_690, __ret_690, 3, 2, 1, 0); \ | |
| 58048 | __ret_690; \ | |
| 59710 | #define vqshrn_high_n_s64(__p0_782, __p1_782, __p2_782) __extension__ ({ \ | |
| 59711 | int32x2_t __s0_782 = __p0_782; \ | |
| 59712 | int64x2_t __s1_782 = __p1_782; \ | |
| 59713 | int32x2_t __rev0_782; __rev0_782 = __builtin_shufflevector(__s0_782, __s0_782, 1, 0); \ | |
| 59714 | int64x2_t __rev1_782; __rev1_782 = __builtin_shufflevector(__s1_782, __s1_782, 1, 0); \ | |
| 59715 | int32x4_t __ret_782; \ | |
| 59716 | __ret_782 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_782), (int32x2_t)(__noswap_vqshrn_n_s64(__rev1_782, __p2_782)))); \ | |
| 59717 | __ret_782 = __builtin_shufflevector(__ret_782, __ret_782, 3, 2, 1, 0); \ | |
| 59718 | __ret_782; \ | |
| 58049 | 59719 | }) |
| 58050 | 59720 | #endif |
| 58051 | 59721 | |
| 58052 | 59722 | #ifdef __LITTLE_ENDIAN__ |
| 58053 | #define vqshrn_high_n_s16(__p0_691, __p1_691, __p2_691) __extension__ ({ \ | |
| 58054 | int8x8_t __s0_691 = __p0_691; \ | |
| 58055 | int16x8_t __s1_691 = __p1_691; \ | |
| 58056 | int8x16_t __ret_691; \ | |
| 58057 | __ret_691 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_691), (int8x8_t)(vqshrn_n_s16(__s1_691, __p2_691)))); \ | |
| 58058 | __ret_691; \ | |
| 59723 | #define vqshrn_high_n_s16(__p0_783, __p1_783, __p2_783) __extension__ ({ \ | |
| 59724 | int8x8_t __s0_783 = __p0_783; \ | |
| 59725 | int16x8_t __s1_783 = __p1_783; \ | |
| 59726 | int8x16_t __ret_783; \ | |
| 59727 | __ret_783 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_783), (int8x8_t)(vqshrn_n_s16(__s1_783, __p2_783)))); \ | |
| 59728 | __ret_783; \ | |
| 58059 | 59729 | }) |
| 58060 | 59730 | #else |
| 58061 | #define vqshrn_high_n_s16(__p0_692, __p1_692, __p2_692) __extension__ ({ \ | |
| 58062 | int8x8_t __s0_692 = __p0_692; \ | |
| 58063 | int16x8_t __s1_692 = __p1_692; \ | |
| 58064 | int8x8_t __rev0_692; __rev0_692 = __builtin_shufflevector(__s0_692, __s0_692, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58065 | int16x8_t __rev1_692; __rev1_692 = __builtin_shufflevector(__s1_692, __s1_692, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58066 | int8x16_t __ret_692; \ | |
| 58067 | __ret_692 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_692), (int8x8_t)(__noswap_vqshrn_n_s16(__rev1_692, __p2_692)))); \ | |
| 58068 | __ret_692 = __builtin_shufflevector(__ret_692, __ret_692, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58069 | __ret_692; \ | |
| 59731 | #define vqshrn_high_n_s16(__p0_784, __p1_784, __p2_784) __extension__ ({ \ | |
| 59732 | int8x8_t __s0_784 = __p0_784; \ | |
| 59733 | int16x8_t __s1_784 = __p1_784; \ | |
| 59734 | int8x8_t __rev0_784; __rev0_784 = __builtin_shufflevector(__s0_784, __s0_784, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59735 | int16x8_t __rev1_784; __rev1_784 = __builtin_shufflevector(__s1_784, __s1_784, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59736 | int8x16_t __ret_784; \ | |
| 59737 | __ret_784 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_784), (int8x8_t)(__noswap_vqshrn_n_s16(__rev1_784, __p2_784)))); \ | |
| 59738 | __ret_784 = __builtin_shufflevector(__ret_784, __ret_784, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59739 | __ret_784; \ | |
| 58070 | 59740 | }) |
| 58071 | 59741 | #endif |
| 58072 | 59742 | |
| ... | ... | @@ -58107,65 +59777,65 @@ __ai int16_t vqshlh_s16(int16_t __p0, int16_t __p1) { |
| 58107 | 59777 | __ret; \ |
| 58108 | 59778 | }) |
| 58109 | 59779 | #ifdef __LITTLE_ENDIAN__ |
| 58110 | #define vqshrun_high_n_s32(__p0_693, __p1_693, __p2_693) __extension__ ({ \ | |
| 58111 | int16x4_t __s0_693 = __p0_693; \ | |
| 58112 | int32x4_t __s1_693 = __p1_693; \ | |
| 58113 | int16x8_t __ret_693; \ | |
| 58114 | __ret_693 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_693), (int16x4_t)(vqshrun_n_s32(__s1_693, __p2_693)))); \ | |
| 58115 | __ret_693; \ | |
| 59780 | #define vqshrun_high_n_s32(__p0_785, __p1_785, __p2_785) __extension__ ({ \ | |
| 59781 | int16x4_t __s0_785 = __p0_785; \ | |
| 59782 | int32x4_t __s1_785 = __p1_785; \ | |
| 59783 | int16x8_t __ret_785; \ | |
| 59784 | __ret_785 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_785), (int16x4_t)(vqshrun_n_s32(__s1_785, __p2_785)))); \ | |
| 59785 | __ret_785; \ | |
| 58116 | 59786 | }) |
| 58117 | 59787 | #else |
| 58118 | #define vqshrun_high_n_s32(__p0_694, __p1_694, __p2_694) __extension__ ({ \ | |
| 58119 | int16x4_t __s0_694 = __p0_694; \ | |
| 58120 | int32x4_t __s1_694 = __p1_694; \ | |
| 58121 | int16x4_t __rev0_694; __rev0_694 = __builtin_shufflevector(__s0_694, __s0_694, 3, 2, 1, 0); \ | |
| 58122 | int32x4_t __rev1_694; __rev1_694 = __builtin_shufflevector(__s1_694, __s1_694, 3, 2, 1, 0); \ | |
| 58123 | int16x8_t __ret_694; \ | |
| 58124 | __ret_694 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_694), (int16x4_t)(__noswap_vqshrun_n_s32(__rev1_694, __p2_694)))); \ | |
| 58125 | __ret_694 = __builtin_shufflevector(__ret_694, __ret_694, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58126 | __ret_694; \ | |
| 59788 | #define vqshrun_high_n_s32(__p0_786, __p1_786, __p2_786) __extension__ ({ \ | |
| 59789 | int16x4_t __s0_786 = __p0_786; \ | |
| 59790 | int32x4_t __s1_786 = __p1_786; \ | |
| 59791 | int16x4_t __rev0_786; __rev0_786 = __builtin_shufflevector(__s0_786, __s0_786, 3, 2, 1, 0); \ | |
| 59792 | int32x4_t __rev1_786; __rev1_786 = __builtin_shufflevector(__s1_786, __s1_786, 3, 2, 1, 0); \ | |
| 59793 | int16x8_t __ret_786; \ | |
| 59794 | __ret_786 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_786), (int16x4_t)(__noswap_vqshrun_n_s32(__rev1_786, __p2_786)))); \ | |
| 59795 | __ret_786 = __builtin_shufflevector(__ret_786, __ret_786, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59796 | __ret_786; \ | |
| 58127 | 59797 | }) |
| 58128 | 59798 | #endif |
| 58129 | 59799 | |
| 58130 | 59800 | #ifdef __LITTLE_ENDIAN__ |
| 58131 | #define vqshrun_high_n_s64(__p0_695, __p1_695, __p2_695) __extension__ ({ \ | |
| 58132 | int32x2_t __s0_695 = __p0_695; \ | |
| 58133 | int64x2_t __s1_695 = __p1_695; \ | |
| 58134 | int32x4_t __ret_695; \ | |
| 58135 | __ret_695 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_695), (int32x2_t)(vqshrun_n_s64(__s1_695, __p2_695)))); \ | |
| 58136 | __ret_695; \ | |
| 59801 | #define vqshrun_high_n_s64(__p0_787, __p1_787, __p2_787) __extension__ ({ \ | |
| 59802 | int32x2_t __s0_787 = __p0_787; \ | |
| 59803 | int64x2_t __s1_787 = __p1_787; \ | |
| 59804 | int32x4_t __ret_787; \ | |
| 59805 | __ret_787 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_787), (int32x2_t)(vqshrun_n_s64(__s1_787, __p2_787)))); \ | |
| 59806 | __ret_787; \ | |
| 58137 | 59807 | }) |
| 58138 | 59808 | #else |
| 58139 | #define vqshrun_high_n_s64(__p0_696, __p1_696, __p2_696) __extension__ ({ \ | |
| 58140 | int32x2_t __s0_696 = __p0_696; \ | |
| 58141 | int64x2_t __s1_696 = __p1_696; \ | |
| 58142 | int32x2_t __rev0_696; __rev0_696 = __builtin_shufflevector(__s0_696, __s0_696, 1, 0); \ | |
| 58143 | int64x2_t __rev1_696; __rev1_696 = __builtin_shufflevector(__s1_696, __s1_696, 1, 0); \ | |
| 58144 | int32x4_t __ret_696; \ | |
| 58145 | __ret_696 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_696), (int32x2_t)(__noswap_vqshrun_n_s64(__rev1_696, __p2_696)))); \ | |
| 58146 | __ret_696 = __builtin_shufflevector(__ret_696, __ret_696, 3, 2, 1, 0); \ | |
| 58147 | __ret_696; \ | |
| 59809 | #define vqshrun_high_n_s64(__p0_788, __p1_788, __p2_788) __extension__ ({ \ | |
| 59810 | int32x2_t __s0_788 = __p0_788; \ | |
| 59811 | int64x2_t __s1_788 = __p1_788; \ | |
| 59812 | int32x2_t __rev0_788; __rev0_788 = __builtin_shufflevector(__s0_788, __s0_788, 1, 0); \ | |
| 59813 | int64x2_t __rev1_788; __rev1_788 = __builtin_shufflevector(__s1_788, __s1_788, 1, 0); \ | |
| 59814 | int32x4_t __ret_788; \ | |
| 59815 | __ret_788 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_788), (int32x2_t)(__noswap_vqshrun_n_s64(__rev1_788, __p2_788)))); \ | |
| 59816 | __ret_788 = __builtin_shufflevector(__ret_788, __ret_788, 3, 2, 1, 0); \ | |
| 59817 | __ret_788; \ | |
| 58148 | 59818 | }) |
| 58149 | 59819 | #endif |
| 58150 | 59820 | |
| 58151 | 59821 | #ifdef __LITTLE_ENDIAN__ |
| 58152 | #define vqshrun_high_n_s16(__p0_697, __p1_697, __p2_697) __extension__ ({ \ | |
| 58153 | int8x8_t __s0_697 = __p0_697; \ | |
| 58154 | int16x8_t __s1_697 = __p1_697; \ | |
| 58155 | int8x16_t __ret_697; \ | |
| 58156 | __ret_697 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_697), (int8x8_t)(vqshrun_n_s16(__s1_697, __p2_697)))); \ | |
| 58157 | __ret_697; \ | |
| 59822 | #define vqshrun_high_n_s16(__p0_789, __p1_789, __p2_789) __extension__ ({ \ | |
| 59823 | int8x8_t __s0_789 = __p0_789; \ | |
| 59824 | int16x8_t __s1_789 = __p1_789; \ | |
| 59825 | int8x16_t __ret_789; \ | |
| 59826 | __ret_789 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_789), (int8x8_t)(vqshrun_n_s16(__s1_789, __p2_789)))); \ | |
| 59827 | __ret_789; \ | |
| 58158 | 59828 | }) |
| 58159 | 59829 | #else |
| 58160 | #define vqshrun_high_n_s16(__p0_698, __p1_698, __p2_698) __extension__ ({ \ | |
| 58161 | int8x8_t __s0_698 = __p0_698; \ | |
| 58162 | int16x8_t __s1_698 = __p1_698; \ | |
| 58163 | int8x8_t __rev0_698; __rev0_698 = __builtin_shufflevector(__s0_698, __s0_698, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58164 | int16x8_t __rev1_698; __rev1_698 = __builtin_shufflevector(__s1_698, __s1_698, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58165 | int8x16_t __ret_698; \ | |
| 58166 | __ret_698 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_698), (int8x8_t)(__noswap_vqshrun_n_s16(__rev1_698, __p2_698)))); \ | |
| 58167 | __ret_698 = __builtin_shufflevector(__ret_698, __ret_698, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 58168 | __ret_698; \ | |
| 59830 | #define vqshrun_high_n_s16(__p0_790, __p1_790, __p2_790) __extension__ ({ \ | |
| 59831 | int8x8_t __s0_790 = __p0_790; \ | |
| 59832 | int16x8_t __s1_790 = __p1_790; \ | |
| 59833 | int8x8_t __rev0_790; __rev0_790 = __builtin_shufflevector(__s0_790, __s0_790, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59834 | int16x8_t __rev1_790; __rev1_790 = __builtin_shufflevector(__s1_790, __s1_790, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59835 | int8x16_t __ret_790; \ | |
| 59836 | __ret_790 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_790), (int8x8_t)(__noswap_vqshrun_n_s16(__rev1_790, __p2_790)))); \ | |
| 59837 | __ret_790 = __builtin_shufflevector(__ret_790, __ret_790, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59838 | __ret_790; \ | |
| 58169 | 59839 | }) |
| 58170 | 59840 | #endif |
| 58171 | 59841 | |
| ... | ... | @@ -59452,7 +61122,7 @@ __ai float32_t vrecpxs_f32(float32_t __p0) { |
| 59452 | 61122 | __ret = (float32_t) __builtin_neon_vrecpxs_f32(__p0); |
| 59453 | 61123 | return __ret; |
| 59454 | 61124 | } |
| 59455 | __ai uint64_t vrshld_u64(uint64_t __p0, uint64_t __p1) { | |
| 61125 | __ai uint64_t vrshld_u64(uint64_t __p0, int64_t __p1) { | |
| 59456 | 61126 | uint64_t __ret; |
| 59457 | 61127 | __ret = (uint64_t) __builtin_neon_vrshld_u64(__p0, __p1); |
| 59458 | 61128 | return __ret; |
| ... | ... | @@ -59475,128 +61145,128 @@ __ai int64_t vrshld_s64(int64_t __p0, int64_t __p1) { |
| 59475 | 61145 | __ret; \ |
| 59476 | 61146 | }) |
| 59477 | 61147 | #ifdef __LITTLE_ENDIAN__ |
| 59478 | #define vrshrn_high_n_u32(__p0_699, __p1_699, __p2_699) __extension__ ({ \ | |
| 59479 | uint16x4_t __s0_699 = __p0_699; \ | |
| 59480 | uint32x4_t __s1_699 = __p1_699; \ | |
| 59481 | uint16x8_t __ret_699; \ | |
| 59482 | __ret_699 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_699), (uint16x4_t)(vrshrn_n_u32(__s1_699, __p2_699)))); \ | |
| 59483 | __ret_699; \ | |
| 61148 | #define vrshrn_high_n_u32(__p0_791, __p1_791, __p2_791) __extension__ ({ \ | |
| 61149 | uint16x4_t __s0_791 = __p0_791; \ | |
| 61150 | uint32x4_t __s1_791 = __p1_791; \ | |
| 61151 | uint16x8_t __ret_791; \ | |
| 61152 | __ret_791 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_791), (uint16x4_t)(vrshrn_n_u32(__s1_791, __p2_791)))); \ | |
| 61153 | __ret_791; \ | |
| 59484 | 61154 | }) |
| 59485 | 61155 | #else |
| 59486 | #define vrshrn_high_n_u32(__p0_700, __p1_700, __p2_700) __extension__ ({ \ | |
| 59487 | uint16x4_t __s0_700 = __p0_700; \ | |
| 59488 | uint32x4_t __s1_700 = __p1_700; \ | |
| 59489 | uint16x4_t __rev0_700; __rev0_700 = __builtin_shufflevector(__s0_700, __s0_700, 3, 2, 1, 0); \ | |
| 59490 | uint32x4_t __rev1_700; __rev1_700 = __builtin_shufflevector(__s1_700, __s1_700, 3, 2, 1, 0); \ | |
| 59491 | uint16x8_t __ret_700; \ | |
| 59492 | __ret_700 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_700), (uint16x4_t)(__noswap_vrshrn_n_u32(__rev1_700, __p2_700)))); \ | |
| 59493 | __ret_700 = __builtin_shufflevector(__ret_700, __ret_700, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59494 | __ret_700; \ | |
| 61156 | #define vrshrn_high_n_u32(__p0_792, __p1_792, __p2_792) __extension__ ({ \ | |
| 61157 | uint16x4_t __s0_792 = __p0_792; \ | |
| 61158 | uint32x4_t __s1_792 = __p1_792; \ | |
| 61159 | uint16x4_t __rev0_792; __rev0_792 = __builtin_shufflevector(__s0_792, __s0_792, 3, 2, 1, 0); \ | |
| 61160 | uint32x4_t __rev1_792; __rev1_792 = __builtin_shufflevector(__s1_792, __s1_792, 3, 2, 1, 0); \ | |
| 61161 | uint16x8_t __ret_792; \ | |
| 61162 | __ret_792 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_792), (uint16x4_t)(__noswap_vrshrn_n_u32(__rev1_792, __p2_792)))); \ | |
| 61163 | __ret_792 = __builtin_shufflevector(__ret_792, __ret_792, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61164 | __ret_792; \ | |
| 59495 | 61165 | }) |
| 59496 | 61166 | #endif |
| 59497 | 61167 | |
| 59498 | 61168 | #ifdef __LITTLE_ENDIAN__ |
| 59499 | #define vrshrn_high_n_u64(__p0_701, __p1_701, __p2_701) __extension__ ({ \ | |
| 59500 | uint32x2_t __s0_701 = __p0_701; \ | |
| 59501 | uint64x2_t __s1_701 = __p1_701; \ | |
| 59502 | uint32x4_t __ret_701; \ | |
| 59503 | __ret_701 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_701), (uint32x2_t)(vrshrn_n_u64(__s1_701, __p2_701)))); \ | |
| 59504 | __ret_701; \ | |
| 61169 | #define vrshrn_high_n_u64(__p0_793, __p1_793, __p2_793) __extension__ ({ \ | |
| 61170 | uint32x2_t __s0_793 = __p0_793; \ | |
| 61171 | uint64x2_t __s1_793 = __p1_793; \ | |
| 61172 | uint32x4_t __ret_793; \ | |
| 61173 | __ret_793 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_793), (uint32x2_t)(vrshrn_n_u64(__s1_793, __p2_793)))); \ | |
| 61174 | __ret_793; \ | |
| 59505 | 61175 | }) |
| 59506 | 61176 | #else |
| 59507 | #define vrshrn_high_n_u64(__p0_702, __p1_702, __p2_702) __extension__ ({ \ | |
| 59508 | uint32x2_t __s0_702 = __p0_702; \ | |
| 59509 | uint64x2_t __s1_702 = __p1_702; \ | |
| 59510 | uint32x2_t __rev0_702; __rev0_702 = __builtin_shufflevector(__s0_702, __s0_702, 1, 0); \ | |
| 59511 | uint64x2_t __rev1_702; __rev1_702 = __builtin_shufflevector(__s1_702, __s1_702, 1, 0); \ | |
| 59512 | uint32x4_t __ret_702; \ | |
| 59513 | __ret_702 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_702), (uint32x2_t)(__noswap_vrshrn_n_u64(__rev1_702, __p2_702)))); \ | |
| 59514 | __ret_702 = __builtin_shufflevector(__ret_702, __ret_702, 3, 2, 1, 0); \ | |
| 59515 | __ret_702; \ | |
| 61177 | #define vrshrn_high_n_u64(__p0_794, __p1_794, __p2_794) __extension__ ({ \ | |
| 61178 | uint32x2_t __s0_794 = __p0_794; \ | |
| 61179 | uint64x2_t __s1_794 = __p1_794; \ | |
| 61180 | uint32x2_t __rev0_794; __rev0_794 = __builtin_shufflevector(__s0_794, __s0_794, 1, 0); \ | |
| 61181 | uint64x2_t __rev1_794; __rev1_794 = __builtin_shufflevector(__s1_794, __s1_794, 1, 0); \ | |
| 61182 | uint32x4_t __ret_794; \ | |
| 61183 | __ret_794 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_794), (uint32x2_t)(__noswap_vrshrn_n_u64(__rev1_794, __p2_794)))); \ | |
| 61184 | __ret_794 = __builtin_shufflevector(__ret_794, __ret_794, 3, 2, 1, 0); \ | |
| 61185 | __ret_794; \ | |
| 59516 | 61186 | }) |
| 59517 | 61187 | #endif |
| 59518 | 61188 | |
| 59519 | 61189 | #ifdef __LITTLE_ENDIAN__ |
| 59520 | #define vrshrn_high_n_u16(__p0_703, __p1_703, __p2_703) __extension__ ({ \ | |
| 59521 | uint8x8_t __s0_703 = __p0_703; \ | |
| 59522 | uint16x8_t __s1_703 = __p1_703; \ | |
| 59523 | uint8x16_t __ret_703; \ | |
| 59524 | __ret_703 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_703), (uint8x8_t)(vrshrn_n_u16(__s1_703, __p2_703)))); \ | |
| 59525 | __ret_703; \ | |
| 61190 | #define vrshrn_high_n_u16(__p0_795, __p1_795, __p2_795) __extension__ ({ \ | |
| 61191 | uint8x8_t __s0_795 = __p0_795; \ | |
| 61192 | uint16x8_t __s1_795 = __p1_795; \ | |
| 61193 | uint8x16_t __ret_795; \ | |
| 61194 | __ret_795 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_795), (uint8x8_t)(vrshrn_n_u16(__s1_795, __p2_795)))); \ | |
| 61195 | __ret_795; \ | |
| 59526 | 61196 | }) |
| 59527 | 61197 | #else |
| 59528 | #define vrshrn_high_n_u16(__p0_704, __p1_704, __p2_704) __extension__ ({ \ | |
| 59529 | uint8x8_t __s0_704 = __p0_704; \ | |
| 59530 | uint16x8_t __s1_704 = __p1_704; \ | |
| 59531 | uint8x8_t __rev0_704; __rev0_704 = __builtin_shufflevector(__s0_704, __s0_704, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59532 | uint16x8_t __rev1_704; __rev1_704 = __builtin_shufflevector(__s1_704, __s1_704, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59533 | uint8x16_t __ret_704; \ | |
| 59534 | __ret_704 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_704), (uint8x8_t)(__noswap_vrshrn_n_u16(__rev1_704, __p2_704)))); \ | |
| 59535 | __ret_704 = __builtin_shufflevector(__ret_704, __ret_704, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59536 | __ret_704; \ | |
| 61198 | #define vrshrn_high_n_u16(__p0_796, __p1_796, __p2_796) __extension__ ({ \ | |
| 61199 | uint8x8_t __s0_796 = __p0_796; \ | |
| 61200 | uint16x8_t __s1_796 = __p1_796; \ | |
| 61201 | uint8x8_t __rev0_796; __rev0_796 = __builtin_shufflevector(__s0_796, __s0_796, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61202 | uint16x8_t __rev1_796; __rev1_796 = __builtin_shufflevector(__s1_796, __s1_796, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61203 | uint8x16_t __ret_796; \ | |
| 61204 | __ret_796 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_796), (uint8x8_t)(__noswap_vrshrn_n_u16(__rev1_796, __p2_796)))); \ | |
| 61205 | __ret_796 = __builtin_shufflevector(__ret_796, __ret_796, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61206 | __ret_796; \ | |
| 59537 | 61207 | }) |
| 59538 | 61208 | #endif |
| 59539 | 61209 | |
| 59540 | 61210 | #ifdef __LITTLE_ENDIAN__ |
| 59541 | #define vrshrn_high_n_s32(__p0_705, __p1_705, __p2_705) __extension__ ({ \ | |
| 59542 | int16x4_t __s0_705 = __p0_705; \ | |
| 59543 | int32x4_t __s1_705 = __p1_705; \ | |
| 59544 | int16x8_t __ret_705; \ | |
| 59545 | __ret_705 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_705), (int16x4_t)(vrshrn_n_s32(__s1_705, __p2_705)))); \ | |
| 59546 | __ret_705; \ | |
| 61211 | #define vrshrn_high_n_s32(__p0_797, __p1_797, __p2_797) __extension__ ({ \ | |
| 61212 | int16x4_t __s0_797 = __p0_797; \ | |
| 61213 | int32x4_t __s1_797 = __p1_797; \ | |
| 61214 | int16x8_t __ret_797; \ | |
| 61215 | __ret_797 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_797), (int16x4_t)(vrshrn_n_s32(__s1_797, __p2_797)))); \ | |
| 61216 | __ret_797; \ | |
| 59547 | 61217 | }) |
| 59548 | 61218 | #else |
| 59549 | #define vrshrn_high_n_s32(__p0_706, __p1_706, __p2_706) __extension__ ({ \ | |
| 59550 | int16x4_t __s0_706 = __p0_706; \ | |
| 59551 | int32x4_t __s1_706 = __p1_706; \ | |
| 59552 | int16x4_t __rev0_706; __rev0_706 = __builtin_shufflevector(__s0_706, __s0_706, 3, 2, 1, 0); \ | |
| 59553 | int32x4_t __rev1_706; __rev1_706 = __builtin_shufflevector(__s1_706, __s1_706, 3, 2, 1, 0); \ | |
| 59554 | int16x8_t __ret_706; \ | |
| 59555 | __ret_706 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_706), (int16x4_t)(__noswap_vrshrn_n_s32(__rev1_706, __p2_706)))); \ | |
| 59556 | __ret_706 = __builtin_shufflevector(__ret_706, __ret_706, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59557 | __ret_706; \ | |
| 61219 | #define vrshrn_high_n_s32(__p0_798, __p1_798, __p2_798) __extension__ ({ \ | |
| 61220 | int16x4_t __s0_798 = __p0_798; \ | |
| 61221 | int32x4_t __s1_798 = __p1_798; \ | |
| 61222 | int16x4_t __rev0_798; __rev0_798 = __builtin_shufflevector(__s0_798, __s0_798, 3, 2, 1, 0); \ | |
| 61223 | int32x4_t __rev1_798; __rev1_798 = __builtin_shufflevector(__s1_798, __s1_798, 3, 2, 1, 0); \ | |
| 61224 | int16x8_t __ret_798; \ | |
| 61225 | __ret_798 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_798), (int16x4_t)(__noswap_vrshrn_n_s32(__rev1_798, __p2_798)))); \ | |
| 61226 | __ret_798 = __builtin_shufflevector(__ret_798, __ret_798, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61227 | __ret_798; \ | |
| 59558 | 61228 | }) |
| 59559 | 61229 | #endif |
| 59560 | 61230 | |
| 59561 | 61231 | #ifdef __LITTLE_ENDIAN__ |
| 59562 | #define vrshrn_high_n_s64(__p0_707, __p1_707, __p2_707) __extension__ ({ \ | |
| 59563 | int32x2_t __s0_707 = __p0_707; \ | |
| 59564 | int64x2_t __s1_707 = __p1_707; \ | |
| 59565 | int32x4_t __ret_707; \ | |
| 59566 | __ret_707 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_707), (int32x2_t)(vrshrn_n_s64(__s1_707, __p2_707)))); \ | |
| 59567 | __ret_707; \ | |
| 61232 | #define vrshrn_high_n_s64(__p0_799, __p1_799, __p2_799) __extension__ ({ \ | |
| 61233 | int32x2_t __s0_799 = __p0_799; \ | |
| 61234 | int64x2_t __s1_799 = __p1_799; \ | |
| 61235 | int32x4_t __ret_799; \ | |
| 61236 | __ret_799 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_799), (int32x2_t)(vrshrn_n_s64(__s1_799, __p2_799)))); \ | |
| 61237 | __ret_799; \ | |
| 59568 | 61238 | }) |
| 59569 | 61239 | #else |
| 59570 | #define vrshrn_high_n_s64(__p0_708, __p1_708, __p2_708) __extension__ ({ \ | |
| 59571 | int32x2_t __s0_708 = __p0_708; \ | |
| 59572 | int64x2_t __s1_708 = __p1_708; \ | |
| 59573 | int32x2_t __rev0_708; __rev0_708 = __builtin_shufflevector(__s0_708, __s0_708, 1, 0); \ | |
| 59574 | int64x2_t __rev1_708; __rev1_708 = __builtin_shufflevector(__s1_708, __s1_708, 1, 0); \ | |
| 59575 | int32x4_t __ret_708; \ | |
| 59576 | __ret_708 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_708), (int32x2_t)(__noswap_vrshrn_n_s64(__rev1_708, __p2_708)))); \ | |
| 59577 | __ret_708 = __builtin_shufflevector(__ret_708, __ret_708, 3, 2, 1, 0); \ | |
| 59578 | __ret_708; \ | |
| 61240 | #define vrshrn_high_n_s64(__p0_800, __p1_800, __p2_800) __extension__ ({ \ | |
| 61241 | int32x2_t __s0_800 = __p0_800; \ | |
| 61242 | int64x2_t __s1_800 = __p1_800; \ | |
| 61243 | int32x2_t __rev0_800; __rev0_800 = __builtin_shufflevector(__s0_800, __s0_800, 1, 0); \ | |
| 61244 | int64x2_t __rev1_800; __rev1_800 = __builtin_shufflevector(__s1_800, __s1_800, 1, 0); \ | |
| 61245 | int32x4_t __ret_800; \ | |
| 61246 | __ret_800 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_800), (int32x2_t)(__noswap_vrshrn_n_s64(__rev1_800, __p2_800)))); \ | |
| 61247 | __ret_800 = __builtin_shufflevector(__ret_800, __ret_800, 3, 2, 1, 0); \ | |
| 61248 | __ret_800; \ | |
| 59579 | 61249 | }) |
| 59580 | 61250 | #endif |
| 59581 | 61251 | |
| 59582 | 61252 | #ifdef __LITTLE_ENDIAN__ |
| 59583 | #define vrshrn_high_n_s16(__p0_709, __p1_709, __p2_709) __extension__ ({ \ | |
| 59584 | int8x8_t __s0_709 = __p0_709; \ | |
| 59585 | int16x8_t __s1_709 = __p1_709; \ | |
| 59586 | int8x16_t __ret_709; \ | |
| 59587 | __ret_709 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_709), (int8x8_t)(vrshrn_n_s16(__s1_709, __p2_709)))); \ | |
| 59588 | __ret_709; \ | |
| 61253 | #define vrshrn_high_n_s16(__p0_801, __p1_801, __p2_801) __extension__ ({ \ | |
| 61254 | int8x8_t __s0_801 = __p0_801; \ | |
| 61255 | int16x8_t __s1_801 = __p1_801; \ | |
| 61256 | int8x16_t __ret_801; \ | |
| 61257 | __ret_801 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_801), (int8x8_t)(vrshrn_n_s16(__s1_801, __p2_801)))); \ | |
| 61258 | __ret_801; \ | |
| 59589 | 61259 | }) |
| 59590 | 61260 | #else |
| 59591 | #define vrshrn_high_n_s16(__p0_710, __p1_710, __p2_710) __extension__ ({ \ | |
| 59592 | int8x8_t __s0_710 = __p0_710; \ | |
| 59593 | int16x8_t __s1_710 = __p1_710; \ | |
| 59594 | int8x8_t __rev0_710; __rev0_710 = __builtin_shufflevector(__s0_710, __s0_710, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59595 | int16x8_t __rev1_710; __rev1_710 = __builtin_shufflevector(__s1_710, __s1_710, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59596 | int8x16_t __ret_710; \ | |
| 59597 | __ret_710 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_710), (int8x8_t)(__noswap_vrshrn_n_s16(__rev1_710, __p2_710)))); \ | |
| 59598 | __ret_710 = __builtin_shufflevector(__ret_710, __ret_710, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59599 | __ret_710; \ | |
| 61261 | #define vrshrn_high_n_s16(__p0_802, __p1_802, __p2_802) __extension__ ({ \ | |
| 61262 | int8x8_t __s0_802 = __p0_802; \ | |
| 61263 | int16x8_t __s1_802 = __p1_802; \ | |
| 61264 | int8x8_t __rev0_802; __rev0_802 = __builtin_shufflevector(__s0_802, __s0_802, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61265 | int16x8_t __rev1_802; __rev1_802 = __builtin_shufflevector(__s1_802, __s1_802, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61266 | int8x16_t __ret_802; \ | |
| 61267 | __ret_802 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_802), (int8x8_t)(__noswap_vrshrn_n_s16(__rev1_802, __p2_802)))); \ | |
| 61268 | __ret_802 = __builtin_shufflevector(__ret_802, __ret_802, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61269 | __ret_802; \ | |
| 59600 | 61270 | }) |
| 59601 | 61271 | #endif |
| 59602 | 61272 | |
| ... | ... | @@ -59853,7 +61523,7 @@ __ai int8x16_t vrsubhn_high_s16(int8x8_t __p0, int16x8_t __p1, int16x8_t __p2) { |
| 59853 | 61523 | __ret = (float64x1_t) __builtin_neon_vset_lane_f64(__s0, (float64x1_t)__s1, __p2); \ |
| 59854 | 61524 | __ret; \ |
| 59855 | 61525 | }) |
| 59856 | __ai uint64_t vshld_u64(uint64_t __p0, uint64_t __p1) { | |
| 61526 | __ai uint64_t vshld_u64(uint64_t __p0, int64_t __p1) { | |
| 59857 | 61527 | uint64_t __ret; |
| 59858 | 61528 | __ret = (uint64_t) __builtin_neon_vshld_u64(__p0, __p1); |
| 59859 | 61529 | return __ret; |
| ... | ... | @@ -59876,110 +61546,110 @@ __ai int64_t vshld_s64(int64_t __p0, int64_t __p1) { |
| 59876 | 61546 | __ret; \ |
| 59877 | 61547 | }) |
| 59878 | 61548 | #ifdef __LITTLE_ENDIAN__ |
| 59879 | #define vshll_high_n_u8(__p0_711, __p1_711) __extension__ ({ \ | |
| 59880 | uint8x16_t __s0_711 = __p0_711; \ | |
| 59881 | uint16x8_t __ret_711; \ | |
| 59882 | __ret_711 = (uint16x8_t)(vshll_n_u8(vget_high_u8(__s0_711), __p1_711)); \ | |
| 59883 | __ret_711; \ | |
| 61549 | #define vshll_high_n_u8(__p0_803, __p1_803) __extension__ ({ \ | |
| 61550 | uint8x16_t __s0_803 = __p0_803; \ | |
| 61551 | uint16x8_t __ret_803; \ | |
| 61552 | __ret_803 = (uint16x8_t)(vshll_n_u8(vget_high_u8(__s0_803), __p1_803)); \ | |
| 61553 | __ret_803; \ | |
| 59884 | 61554 | }) |
| 59885 | 61555 | #else |
| 59886 | #define vshll_high_n_u8(__p0_712, __p1_712) __extension__ ({ \ | |
| 59887 | uint8x16_t __s0_712 = __p0_712; \ | |
| 59888 | uint8x16_t __rev0_712; __rev0_712 = __builtin_shufflevector(__s0_712, __s0_712, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59889 | uint16x8_t __ret_712; \ | |
| 59890 | __ret_712 = (uint16x8_t)(__noswap_vshll_n_u8(__noswap_vget_high_u8(__rev0_712), __p1_712)); \ | |
| 59891 | __ret_712 = __builtin_shufflevector(__ret_712, __ret_712, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59892 | __ret_712; \ | |
| 61556 | #define vshll_high_n_u8(__p0_804, __p1_804) __extension__ ({ \ | |
| 61557 | uint8x16_t __s0_804 = __p0_804; \ | |
| 61558 | uint8x16_t __rev0_804; __rev0_804 = __builtin_shufflevector(__s0_804, __s0_804, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61559 | uint16x8_t __ret_804; \ | |
| 61560 | __ret_804 = (uint16x8_t)(__noswap_vshll_n_u8(__noswap_vget_high_u8(__rev0_804), __p1_804)); \ | |
| 61561 | __ret_804 = __builtin_shufflevector(__ret_804, __ret_804, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61562 | __ret_804; \ | |
| 59893 | 61563 | }) |
| 59894 | 61564 | #endif |
| 59895 | 61565 | |
| 59896 | 61566 | #ifdef __LITTLE_ENDIAN__ |
| 59897 | #define vshll_high_n_u32(__p0_713, __p1_713) __extension__ ({ \ | |
| 59898 | uint32x4_t __s0_713 = __p0_713; \ | |
| 59899 | uint64x2_t __ret_713; \ | |
| 59900 | __ret_713 = (uint64x2_t)(vshll_n_u32(vget_high_u32(__s0_713), __p1_713)); \ | |
| 59901 | __ret_713; \ | |
| 61567 | #define vshll_high_n_u32(__p0_805, __p1_805) __extension__ ({ \ | |
| 61568 | uint32x4_t __s0_805 = __p0_805; \ | |
| 61569 | uint64x2_t __ret_805; \ | |
| 61570 | __ret_805 = (uint64x2_t)(vshll_n_u32(vget_high_u32(__s0_805), __p1_805)); \ | |
| 61571 | __ret_805; \ | |
| 59902 | 61572 | }) |
| 59903 | 61573 | #else |
| 59904 | #define vshll_high_n_u32(__p0_714, __p1_714) __extension__ ({ \ | |
| 59905 | uint32x4_t __s0_714 = __p0_714; \ | |
| 59906 | uint32x4_t __rev0_714; __rev0_714 = __builtin_shufflevector(__s0_714, __s0_714, 3, 2, 1, 0); \ | |
| 59907 | uint64x2_t __ret_714; \ | |
| 59908 | __ret_714 = (uint64x2_t)(__noswap_vshll_n_u32(__noswap_vget_high_u32(__rev0_714), __p1_714)); \ | |
| 59909 | __ret_714 = __builtin_shufflevector(__ret_714, __ret_714, 1, 0); \ | |
| 59910 | __ret_714; \ | |
| 61574 | #define vshll_high_n_u32(__p0_806, __p1_806) __extension__ ({ \ | |
| 61575 | uint32x4_t __s0_806 = __p0_806; \ | |
| 61576 | uint32x4_t __rev0_806; __rev0_806 = __builtin_shufflevector(__s0_806, __s0_806, 3, 2, 1, 0); \ | |
| 61577 | uint64x2_t __ret_806; \ | |
| 61578 | __ret_806 = (uint64x2_t)(__noswap_vshll_n_u32(__noswap_vget_high_u32(__rev0_806), __p1_806)); \ | |
| 61579 | __ret_806 = __builtin_shufflevector(__ret_806, __ret_806, 1, 0); \ | |
| 61580 | __ret_806; \ | |
| 59911 | 61581 | }) |
| 59912 | 61582 | #endif |
| 59913 | 61583 | |
| 59914 | 61584 | #ifdef __LITTLE_ENDIAN__ |
| 59915 | #define vshll_high_n_u16(__p0_715, __p1_715) __extension__ ({ \ | |
| 59916 | uint16x8_t __s0_715 = __p0_715; \ | |
| 59917 | uint32x4_t __ret_715; \ | |
| 59918 | __ret_715 = (uint32x4_t)(vshll_n_u16(vget_high_u16(__s0_715), __p1_715)); \ | |
| 59919 | __ret_715; \ | |
| 61585 | #define vshll_high_n_u16(__p0_807, __p1_807) __extension__ ({ \ | |
| 61586 | uint16x8_t __s0_807 = __p0_807; \ | |
| 61587 | uint32x4_t __ret_807; \ | |
| 61588 | __ret_807 = (uint32x4_t)(vshll_n_u16(vget_high_u16(__s0_807), __p1_807)); \ | |
| 61589 | __ret_807; \ | |
| 59920 | 61590 | }) |
| 59921 | 61591 | #else |
| 59922 | #define vshll_high_n_u16(__p0_716, __p1_716) __extension__ ({ \ | |
| 59923 | uint16x8_t __s0_716 = __p0_716; \ | |
| 59924 | uint16x8_t __rev0_716; __rev0_716 = __builtin_shufflevector(__s0_716, __s0_716, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59925 | uint32x4_t __ret_716; \ | |
| 59926 | __ret_716 = (uint32x4_t)(__noswap_vshll_n_u16(__noswap_vget_high_u16(__rev0_716), __p1_716)); \ | |
| 59927 | __ret_716 = __builtin_shufflevector(__ret_716, __ret_716, 3, 2, 1, 0); \ | |
| 59928 | __ret_716; \ | |
| 61592 | #define vshll_high_n_u16(__p0_808, __p1_808) __extension__ ({ \ | |
| 61593 | uint16x8_t __s0_808 = __p0_808; \ | |
| 61594 | uint16x8_t __rev0_808; __rev0_808 = __builtin_shufflevector(__s0_808, __s0_808, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61595 | uint32x4_t __ret_808; \ | |
| 61596 | __ret_808 = (uint32x4_t)(__noswap_vshll_n_u16(__noswap_vget_high_u16(__rev0_808), __p1_808)); \ | |
| 61597 | __ret_808 = __builtin_shufflevector(__ret_808, __ret_808, 3, 2, 1, 0); \ | |
| 61598 | __ret_808; \ | |
| 59929 | 61599 | }) |
| 59930 | 61600 | #endif |
| 59931 | 61601 | |
| 59932 | 61602 | #ifdef __LITTLE_ENDIAN__ |
| 59933 | #define vshll_high_n_s8(__p0_717, __p1_717) __extension__ ({ \ | |
| 59934 | int8x16_t __s0_717 = __p0_717; \ | |
| 59935 | int16x8_t __ret_717; \ | |
| 59936 | __ret_717 = (int16x8_t)(vshll_n_s8(vget_high_s8(__s0_717), __p1_717)); \ | |
| 59937 | __ret_717; \ | |
| 61603 | #define vshll_high_n_s8(__p0_809, __p1_809) __extension__ ({ \ | |
| 61604 | int8x16_t __s0_809 = __p0_809; \ | |
| 61605 | int16x8_t __ret_809; \ | |
| 61606 | __ret_809 = (int16x8_t)(vshll_n_s8(vget_high_s8(__s0_809), __p1_809)); \ | |
| 61607 | __ret_809; \ | |
| 59938 | 61608 | }) |
| 59939 | 61609 | #else |
| 59940 | #define vshll_high_n_s8(__p0_718, __p1_718) __extension__ ({ \ | |
| 59941 | int8x16_t __s0_718 = __p0_718; \ | |
| 59942 | int8x16_t __rev0_718; __rev0_718 = __builtin_shufflevector(__s0_718, __s0_718, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59943 | int16x8_t __ret_718; \ | |
| 59944 | __ret_718 = (int16x8_t)(__noswap_vshll_n_s8(__noswap_vget_high_s8(__rev0_718), __p1_718)); \ | |
| 59945 | __ret_718 = __builtin_shufflevector(__ret_718, __ret_718, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59946 | __ret_718; \ | |
| 61610 | #define vshll_high_n_s8(__p0_810, __p1_810) __extension__ ({ \ | |
| 61611 | int8x16_t __s0_810 = __p0_810; \ | |
| 61612 | int8x16_t __rev0_810; __rev0_810 = __builtin_shufflevector(__s0_810, __s0_810, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61613 | int16x8_t __ret_810; \ | |
| 61614 | __ret_810 = (int16x8_t)(__noswap_vshll_n_s8(__noswap_vget_high_s8(__rev0_810), __p1_810)); \ | |
| 61615 | __ret_810 = __builtin_shufflevector(__ret_810, __ret_810, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61616 | __ret_810; \ | |
| 59947 | 61617 | }) |
| 59948 | 61618 | #endif |
| 59949 | 61619 | |
| 59950 | 61620 | #ifdef __LITTLE_ENDIAN__ |
| 59951 | #define vshll_high_n_s32(__p0_719, __p1_719) __extension__ ({ \ | |
| 59952 | int32x4_t __s0_719 = __p0_719; \ | |
| 59953 | int64x2_t __ret_719; \ | |
| 59954 | __ret_719 = (int64x2_t)(vshll_n_s32(vget_high_s32(__s0_719), __p1_719)); \ | |
| 59955 | __ret_719; \ | |
| 61621 | #define vshll_high_n_s32(__p0_811, __p1_811) __extension__ ({ \ | |
| 61622 | int32x4_t __s0_811 = __p0_811; \ | |
| 61623 | int64x2_t __ret_811; \ | |
| 61624 | __ret_811 = (int64x2_t)(vshll_n_s32(vget_high_s32(__s0_811), __p1_811)); \ | |
| 61625 | __ret_811; \ | |
| 59956 | 61626 | }) |
| 59957 | 61627 | #else |
| 59958 | #define vshll_high_n_s32(__p0_720, __p1_720) __extension__ ({ \ | |
| 59959 | int32x4_t __s0_720 = __p0_720; \ | |
| 59960 | int32x4_t __rev0_720; __rev0_720 = __builtin_shufflevector(__s0_720, __s0_720, 3, 2, 1, 0); \ | |
| 59961 | int64x2_t __ret_720; \ | |
| 59962 | __ret_720 = (int64x2_t)(__noswap_vshll_n_s32(__noswap_vget_high_s32(__rev0_720), __p1_720)); \ | |
| 59963 | __ret_720 = __builtin_shufflevector(__ret_720, __ret_720, 1, 0); \ | |
| 59964 | __ret_720; \ | |
| 61628 | #define vshll_high_n_s32(__p0_812, __p1_812) __extension__ ({ \ | |
| 61629 | int32x4_t __s0_812 = __p0_812; \ | |
| 61630 | int32x4_t __rev0_812; __rev0_812 = __builtin_shufflevector(__s0_812, __s0_812, 3, 2, 1, 0); \ | |
| 61631 | int64x2_t __ret_812; \ | |
| 61632 | __ret_812 = (int64x2_t)(__noswap_vshll_n_s32(__noswap_vget_high_s32(__rev0_812), __p1_812)); \ | |
| 61633 | __ret_812 = __builtin_shufflevector(__ret_812, __ret_812, 1, 0); \ | |
| 61634 | __ret_812; \ | |
| 59965 | 61635 | }) |
| 59966 | 61636 | #endif |
| 59967 | 61637 | |
| 59968 | 61638 | #ifdef __LITTLE_ENDIAN__ |
| 59969 | #define vshll_high_n_s16(__p0_721, __p1_721) __extension__ ({ \ | |
| 59970 | int16x8_t __s0_721 = __p0_721; \ | |
| 59971 | int32x4_t __ret_721; \ | |
| 59972 | __ret_721 = (int32x4_t)(vshll_n_s16(vget_high_s16(__s0_721), __p1_721)); \ | |
| 59973 | __ret_721; \ | |
| 61639 | #define vshll_high_n_s16(__p0_813, __p1_813) __extension__ ({ \ | |
| 61640 | int16x8_t __s0_813 = __p0_813; \ | |
| 61641 | int32x4_t __ret_813; \ | |
| 61642 | __ret_813 = (int32x4_t)(vshll_n_s16(vget_high_s16(__s0_813), __p1_813)); \ | |
| 61643 | __ret_813; \ | |
| 59974 | 61644 | }) |
| 59975 | 61645 | #else |
| 59976 | #define vshll_high_n_s16(__p0_722, __p1_722) __extension__ ({ \ | |
| 59977 | int16x8_t __s0_722 = __p0_722; \ | |
| 59978 | int16x8_t __rev0_722; __rev0_722 = __builtin_shufflevector(__s0_722, __s0_722, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 59979 | int32x4_t __ret_722; \ | |
| 59980 | __ret_722 = (int32x4_t)(__noswap_vshll_n_s16(__noswap_vget_high_s16(__rev0_722), __p1_722)); \ | |
| 59981 | __ret_722 = __builtin_shufflevector(__ret_722, __ret_722, 3, 2, 1, 0); \ | |
| 59982 | __ret_722; \ | |
| 61646 | #define vshll_high_n_s16(__p0_814, __p1_814) __extension__ ({ \ | |
| 61647 | int16x8_t __s0_814 = __p0_814; \ | |
| 61648 | int16x8_t __rev0_814; __rev0_814 = __builtin_shufflevector(__s0_814, __s0_814, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61649 | int32x4_t __ret_814; \ | |
| 61650 | __ret_814 = (int32x4_t)(__noswap_vshll_n_s16(__noswap_vget_high_s16(__rev0_814), __p1_814)); \ | |
| 61651 | __ret_814 = __builtin_shufflevector(__ret_814, __ret_814, 3, 2, 1, 0); \ | |
| 61652 | __ret_814; \ | |
| 59983 | 61653 | }) |
| 59984 | 61654 | #endif |
| 59985 | 61655 | |
| ... | ... | @@ -59996,128 +61666,128 @@ __ai int64_t vshld_s64(int64_t __p0, int64_t __p1) { |
| 59996 | 61666 | __ret; \ |
| 59997 | 61667 | }) |
| 59998 | 61668 | #ifdef __LITTLE_ENDIAN__ |
| 59999 | #define vshrn_high_n_u32(__p0_723, __p1_723, __p2_723) __extension__ ({ \ | |
| 60000 | uint16x4_t __s0_723 = __p0_723; \ | |
| 60001 | uint32x4_t __s1_723 = __p1_723; \ | |
| 60002 | uint16x8_t __ret_723; \ | |
| 60003 | __ret_723 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_723), (uint16x4_t)(vshrn_n_u32(__s1_723, __p2_723)))); \ | |
| 60004 | __ret_723; \ | |
| 61669 | #define vshrn_high_n_u32(__p0_815, __p1_815, __p2_815) __extension__ ({ \ | |
| 61670 | uint16x4_t __s0_815 = __p0_815; \ | |
| 61671 | uint32x4_t __s1_815 = __p1_815; \ | |
| 61672 | uint16x8_t __ret_815; \ | |
| 61673 | __ret_815 = (uint16x8_t)(vcombine_u16((uint16x4_t)(__s0_815), (uint16x4_t)(vshrn_n_u32(__s1_815, __p2_815)))); \ | |
| 61674 | __ret_815; \ | |
| 60005 | 61675 | }) |
| 60006 | 61676 | #else |
| 60007 | #define vshrn_high_n_u32(__p0_724, __p1_724, __p2_724) __extension__ ({ \ | |
| 60008 | uint16x4_t __s0_724 = __p0_724; \ | |
| 60009 | uint32x4_t __s1_724 = __p1_724; \ | |
| 60010 | uint16x4_t __rev0_724; __rev0_724 = __builtin_shufflevector(__s0_724, __s0_724, 3, 2, 1, 0); \ | |
| 60011 | uint32x4_t __rev1_724; __rev1_724 = __builtin_shufflevector(__s1_724, __s1_724, 3, 2, 1, 0); \ | |
| 60012 | uint16x8_t __ret_724; \ | |
| 60013 | __ret_724 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_724), (uint16x4_t)(__noswap_vshrn_n_u32(__rev1_724, __p2_724)))); \ | |
| 60014 | __ret_724 = __builtin_shufflevector(__ret_724, __ret_724, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60015 | __ret_724; \ | |
| 61677 | #define vshrn_high_n_u32(__p0_816, __p1_816, __p2_816) __extension__ ({ \ | |
| 61678 | uint16x4_t __s0_816 = __p0_816; \ | |
| 61679 | uint32x4_t __s1_816 = __p1_816; \ | |
| 61680 | uint16x4_t __rev0_816; __rev0_816 = __builtin_shufflevector(__s0_816, __s0_816, 3, 2, 1, 0); \ | |
| 61681 | uint32x4_t __rev1_816; __rev1_816 = __builtin_shufflevector(__s1_816, __s1_816, 3, 2, 1, 0); \ | |
| 61682 | uint16x8_t __ret_816; \ | |
| 61683 | __ret_816 = (uint16x8_t)(__noswap_vcombine_u16((uint16x4_t)(__rev0_816), (uint16x4_t)(__noswap_vshrn_n_u32(__rev1_816, __p2_816)))); \ | |
| 61684 | __ret_816 = __builtin_shufflevector(__ret_816, __ret_816, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61685 | __ret_816; \ | |
| 60016 | 61686 | }) |
| 60017 | 61687 | #endif |
| 60018 | 61688 | |
| 60019 | 61689 | #ifdef __LITTLE_ENDIAN__ |
| 60020 | #define vshrn_high_n_u64(__p0_725, __p1_725, __p2_725) __extension__ ({ \ | |
| 60021 | uint32x2_t __s0_725 = __p0_725; \ | |
| 60022 | uint64x2_t __s1_725 = __p1_725; \ | |
| 60023 | uint32x4_t __ret_725; \ | |
| 60024 | __ret_725 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_725), (uint32x2_t)(vshrn_n_u64(__s1_725, __p2_725)))); \ | |
| 60025 | __ret_725; \ | |
| 61690 | #define vshrn_high_n_u64(__p0_817, __p1_817, __p2_817) __extension__ ({ \ | |
| 61691 | uint32x2_t __s0_817 = __p0_817; \ | |
| 61692 | uint64x2_t __s1_817 = __p1_817; \ | |
| 61693 | uint32x4_t __ret_817; \ | |
| 61694 | __ret_817 = (uint32x4_t)(vcombine_u32((uint32x2_t)(__s0_817), (uint32x2_t)(vshrn_n_u64(__s1_817, __p2_817)))); \ | |
| 61695 | __ret_817; \ | |
| 60026 | 61696 | }) |
| 60027 | 61697 | #else |
| 60028 | #define vshrn_high_n_u64(__p0_726, __p1_726, __p2_726) __extension__ ({ \ | |
| 60029 | uint32x2_t __s0_726 = __p0_726; \ | |
| 60030 | uint64x2_t __s1_726 = __p1_726; \ | |
| 60031 | uint32x2_t __rev0_726; __rev0_726 = __builtin_shufflevector(__s0_726, __s0_726, 1, 0); \ | |
| 60032 | uint64x2_t __rev1_726; __rev1_726 = __builtin_shufflevector(__s1_726, __s1_726, 1, 0); \ | |
| 60033 | uint32x4_t __ret_726; \ | |
| 60034 | __ret_726 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_726), (uint32x2_t)(__noswap_vshrn_n_u64(__rev1_726, __p2_726)))); \ | |
| 60035 | __ret_726 = __builtin_shufflevector(__ret_726, __ret_726, 3, 2, 1, 0); \ | |
| 60036 | __ret_726; \ | |
| 61698 | #define vshrn_high_n_u64(__p0_818, __p1_818, __p2_818) __extension__ ({ \ | |
| 61699 | uint32x2_t __s0_818 = __p0_818; \ | |
| 61700 | uint64x2_t __s1_818 = __p1_818; \ | |
| 61701 | uint32x2_t __rev0_818; __rev0_818 = __builtin_shufflevector(__s0_818, __s0_818, 1, 0); \ | |
| 61702 | uint64x2_t __rev1_818; __rev1_818 = __builtin_shufflevector(__s1_818, __s1_818, 1, 0); \ | |
| 61703 | uint32x4_t __ret_818; \ | |
| 61704 | __ret_818 = (uint32x4_t)(__noswap_vcombine_u32((uint32x2_t)(__rev0_818), (uint32x2_t)(__noswap_vshrn_n_u64(__rev1_818, __p2_818)))); \ | |
| 61705 | __ret_818 = __builtin_shufflevector(__ret_818, __ret_818, 3, 2, 1, 0); \ | |
| 61706 | __ret_818; \ | |
| 60037 | 61707 | }) |
| 60038 | 61708 | #endif |
| 60039 | 61709 | |
| 60040 | 61710 | #ifdef __LITTLE_ENDIAN__ |
| 60041 | #define vshrn_high_n_u16(__p0_727, __p1_727, __p2_727) __extension__ ({ \ | |
| 60042 | uint8x8_t __s0_727 = __p0_727; \ | |
| 60043 | uint16x8_t __s1_727 = __p1_727; \ | |
| 60044 | uint8x16_t __ret_727; \ | |
| 60045 | __ret_727 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_727), (uint8x8_t)(vshrn_n_u16(__s1_727, __p2_727)))); \ | |
| 60046 | __ret_727; \ | |
| 61711 | #define vshrn_high_n_u16(__p0_819, __p1_819, __p2_819) __extension__ ({ \ | |
| 61712 | uint8x8_t __s0_819 = __p0_819; \ | |
| 61713 | uint16x8_t __s1_819 = __p1_819; \ | |
| 61714 | uint8x16_t __ret_819; \ | |
| 61715 | __ret_819 = (uint8x16_t)(vcombine_u8((uint8x8_t)(__s0_819), (uint8x8_t)(vshrn_n_u16(__s1_819, __p2_819)))); \ | |
| 61716 | __ret_819; \ | |
| 60047 | 61717 | }) |
| 60048 | 61718 | #else |
| 60049 | #define vshrn_high_n_u16(__p0_728, __p1_728, __p2_728) __extension__ ({ \ | |
| 60050 | uint8x8_t __s0_728 = __p0_728; \ | |
| 60051 | uint16x8_t __s1_728 = __p1_728; \ | |
| 60052 | uint8x8_t __rev0_728; __rev0_728 = __builtin_shufflevector(__s0_728, __s0_728, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60053 | uint16x8_t __rev1_728; __rev1_728 = __builtin_shufflevector(__s1_728, __s1_728, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60054 | uint8x16_t __ret_728; \ | |
| 60055 | __ret_728 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_728), (uint8x8_t)(__noswap_vshrn_n_u16(__rev1_728, __p2_728)))); \ | |
| 60056 | __ret_728 = __builtin_shufflevector(__ret_728, __ret_728, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60057 | __ret_728; \ | |
| 61719 | #define vshrn_high_n_u16(__p0_820, __p1_820, __p2_820) __extension__ ({ \ | |
| 61720 | uint8x8_t __s0_820 = __p0_820; \ | |
| 61721 | uint16x8_t __s1_820 = __p1_820; \ | |
| 61722 | uint8x8_t __rev0_820; __rev0_820 = __builtin_shufflevector(__s0_820, __s0_820, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61723 | uint16x8_t __rev1_820; __rev1_820 = __builtin_shufflevector(__s1_820, __s1_820, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61724 | uint8x16_t __ret_820; \ | |
| 61725 | __ret_820 = (uint8x16_t)(__noswap_vcombine_u8((uint8x8_t)(__rev0_820), (uint8x8_t)(__noswap_vshrn_n_u16(__rev1_820, __p2_820)))); \ | |
| 61726 | __ret_820 = __builtin_shufflevector(__ret_820, __ret_820, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61727 | __ret_820; \ | |
| 60058 | 61728 | }) |
| 60059 | 61729 | #endif |
| 60060 | 61730 | |
| 60061 | 61731 | #ifdef __LITTLE_ENDIAN__ |
| 60062 | #define vshrn_high_n_s32(__p0_729, __p1_729, __p2_729) __extension__ ({ \ | |
| 60063 | int16x4_t __s0_729 = __p0_729; \ | |
| 60064 | int32x4_t __s1_729 = __p1_729; \ | |
| 60065 | int16x8_t __ret_729; \ | |
| 60066 | __ret_729 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_729), (int16x4_t)(vshrn_n_s32(__s1_729, __p2_729)))); \ | |
| 60067 | __ret_729; \ | |
| 61732 | #define vshrn_high_n_s32(__p0_821, __p1_821, __p2_821) __extension__ ({ \ | |
| 61733 | int16x4_t __s0_821 = __p0_821; \ | |
| 61734 | int32x4_t __s1_821 = __p1_821; \ | |
| 61735 | int16x8_t __ret_821; \ | |
| 61736 | __ret_821 = (int16x8_t)(vcombine_s16((int16x4_t)(__s0_821), (int16x4_t)(vshrn_n_s32(__s1_821, __p2_821)))); \ | |
| 61737 | __ret_821; \ | |
| 60068 | 61738 | }) |
| 60069 | 61739 | #else |
| 60070 | #define vshrn_high_n_s32(__p0_730, __p1_730, __p2_730) __extension__ ({ \ | |
| 60071 | int16x4_t __s0_730 = __p0_730; \ | |
| 60072 | int32x4_t __s1_730 = __p1_730; \ | |
| 60073 | int16x4_t __rev0_730; __rev0_730 = __builtin_shufflevector(__s0_730, __s0_730, 3, 2, 1, 0); \ | |
| 60074 | int32x4_t __rev1_730; __rev1_730 = __builtin_shufflevector(__s1_730, __s1_730, 3, 2, 1, 0); \ | |
| 60075 | int16x8_t __ret_730; \ | |
| 60076 | __ret_730 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_730), (int16x4_t)(__noswap_vshrn_n_s32(__rev1_730, __p2_730)))); \ | |
| 60077 | __ret_730 = __builtin_shufflevector(__ret_730, __ret_730, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60078 | __ret_730; \ | |
| 61740 | #define vshrn_high_n_s32(__p0_822, __p1_822, __p2_822) __extension__ ({ \ | |
| 61741 | int16x4_t __s0_822 = __p0_822; \ | |
| 61742 | int32x4_t __s1_822 = __p1_822; \ | |
| 61743 | int16x4_t __rev0_822; __rev0_822 = __builtin_shufflevector(__s0_822, __s0_822, 3, 2, 1, 0); \ | |
| 61744 | int32x4_t __rev1_822; __rev1_822 = __builtin_shufflevector(__s1_822, __s1_822, 3, 2, 1, 0); \ | |
| 61745 | int16x8_t __ret_822; \ | |
| 61746 | __ret_822 = (int16x8_t)(__noswap_vcombine_s16((int16x4_t)(__rev0_822), (int16x4_t)(__noswap_vshrn_n_s32(__rev1_822, __p2_822)))); \ | |
| 61747 | __ret_822 = __builtin_shufflevector(__ret_822, __ret_822, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61748 | __ret_822; \ | |
| 60079 | 61749 | }) |
| 60080 | 61750 | #endif |
| 60081 | 61751 | |
| 60082 | 61752 | #ifdef __LITTLE_ENDIAN__ |
| 60083 | #define vshrn_high_n_s64(__p0_731, __p1_731, __p2_731) __extension__ ({ \ | |
| 60084 | int32x2_t __s0_731 = __p0_731; \ | |
| 60085 | int64x2_t __s1_731 = __p1_731; \ | |
| 60086 | int32x4_t __ret_731; \ | |
| 60087 | __ret_731 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_731), (int32x2_t)(vshrn_n_s64(__s1_731, __p2_731)))); \ | |
| 60088 | __ret_731; \ | |
| 61753 | #define vshrn_high_n_s64(__p0_823, __p1_823, __p2_823) __extension__ ({ \ | |
| 61754 | int32x2_t __s0_823 = __p0_823; \ | |
| 61755 | int64x2_t __s1_823 = __p1_823; \ | |
| 61756 | int32x4_t __ret_823; \ | |
| 61757 | __ret_823 = (int32x4_t)(vcombine_s32((int32x2_t)(__s0_823), (int32x2_t)(vshrn_n_s64(__s1_823, __p2_823)))); \ | |
| 61758 | __ret_823; \ | |
| 60089 | 61759 | }) |
| 60090 | 61760 | #else |
| 60091 | #define vshrn_high_n_s64(__p0_732, __p1_732, __p2_732) __extension__ ({ \ | |
| 60092 | int32x2_t __s0_732 = __p0_732; \ | |
| 60093 | int64x2_t __s1_732 = __p1_732; \ | |
| 60094 | int32x2_t __rev0_732; __rev0_732 = __builtin_shufflevector(__s0_732, __s0_732, 1, 0); \ | |
| 60095 | int64x2_t __rev1_732; __rev1_732 = __builtin_shufflevector(__s1_732, __s1_732, 1, 0); \ | |
| 60096 | int32x4_t __ret_732; \ | |
| 60097 | __ret_732 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_732), (int32x2_t)(__noswap_vshrn_n_s64(__rev1_732, __p2_732)))); \ | |
| 60098 | __ret_732 = __builtin_shufflevector(__ret_732, __ret_732, 3, 2, 1, 0); \ | |
| 60099 | __ret_732; \ | |
| 61761 | #define vshrn_high_n_s64(__p0_824, __p1_824, __p2_824) __extension__ ({ \ | |
| 61762 | int32x2_t __s0_824 = __p0_824; \ | |
| 61763 | int64x2_t __s1_824 = __p1_824; \ | |
| 61764 | int32x2_t __rev0_824; __rev0_824 = __builtin_shufflevector(__s0_824, __s0_824, 1, 0); \ | |
| 61765 | int64x2_t __rev1_824; __rev1_824 = __builtin_shufflevector(__s1_824, __s1_824, 1, 0); \ | |
| 61766 | int32x4_t __ret_824; \ | |
| 61767 | __ret_824 = (int32x4_t)(__noswap_vcombine_s32((int32x2_t)(__rev0_824), (int32x2_t)(__noswap_vshrn_n_s64(__rev1_824, __p2_824)))); \ | |
| 61768 | __ret_824 = __builtin_shufflevector(__ret_824, __ret_824, 3, 2, 1, 0); \ | |
| 61769 | __ret_824; \ | |
| 60100 | 61770 | }) |
| 60101 | 61771 | #endif |
| 60102 | 61772 | |
| 60103 | 61773 | #ifdef __LITTLE_ENDIAN__ |
| 60104 | #define vshrn_high_n_s16(__p0_733, __p1_733, __p2_733) __extension__ ({ \ | |
| 60105 | int8x8_t __s0_733 = __p0_733; \ | |
| 60106 | int16x8_t __s1_733 = __p1_733; \ | |
| 60107 | int8x16_t __ret_733; \ | |
| 60108 | __ret_733 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_733), (int8x8_t)(vshrn_n_s16(__s1_733, __p2_733)))); \ | |
| 60109 | __ret_733; \ | |
| 61774 | #define vshrn_high_n_s16(__p0_825, __p1_825, __p2_825) __extension__ ({ \ | |
| 61775 | int8x8_t __s0_825 = __p0_825; \ | |
| 61776 | int16x8_t __s1_825 = __p1_825; \ | |
| 61777 | int8x16_t __ret_825; \ | |
| 61778 | __ret_825 = (int8x16_t)(vcombine_s8((int8x8_t)(__s0_825), (int8x8_t)(vshrn_n_s16(__s1_825, __p2_825)))); \ | |
| 61779 | __ret_825; \ | |
| 60110 | 61780 | }) |
| 60111 | 61781 | #else |
| 60112 | #define vshrn_high_n_s16(__p0_734, __p1_734, __p2_734) __extension__ ({ \ | |
| 60113 | int8x8_t __s0_734 = __p0_734; \ | |
| 60114 | int16x8_t __s1_734 = __p1_734; \ | |
| 60115 | int8x8_t __rev0_734; __rev0_734 = __builtin_shufflevector(__s0_734, __s0_734, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60116 | int16x8_t __rev1_734; __rev1_734 = __builtin_shufflevector(__s1_734, __s1_734, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60117 | int8x16_t __ret_734; \ | |
| 60118 | __ret_734 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_734), (int8x8_t)(__noswap_vshrn_n_s16(__rev1_734, __p2_734)))); \ | |
| 60119 | __ret_734 = __builtin_shufflevector(__ret_734, __ret_734, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 60120 | __ret_734; \ | |
| 61782 | #define vshrn_high_n_s16(__p0_826, __p1_826, __p2_826) __extension__ ({ \ | |
| 61783 | int8x8_t __s0_826 = __p0_826; \ | |
| 61784 | int16x8_t __s1_826 = __p1_826; \ | |
| 61785 | int8x8_t __rev0_826; __rev0_826 = __builtin_shufflevector(__s0_826, __s0_826, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61786 | int16x8_t __rev1_826; __rev1_826 = __builtin_shufflevector(__s1_826, __s1_826, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61787 | int8x16_t __ret_826; \ | |
| 61788 | __ret_826 = (int8x16_t)(__noswap_vcombine_s8((int8x8_t)(__rev0_826), (int8x8_t)(__noswap_vshrn_n_s16(__rev1_826, __p2_826)))); \ | |
| 61789 | __ret_826 = __builtin_shufflevector(__ret_826, __ret_826, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61790 | __ret_826; \ | |
| 60121 | 61791 | }) |
| 60122 | 61792 | #endif |
| 60123 | 61793 | |
| ... | ... | @@ -61553,54 +63223,54 @@ __ai int32x4_t vsubw_high_s16(int32x4_t __p0, int16x8_t __p1) { |
| 61553 | 63223 | #endif |
| 61554 | 63224 | |
| 61555 | 63225 | #ifdef __LITTLE_ENDIAN__ |
| 61556 | #define vsudotq_laneq_s32(__p0_735, __p1_735, __p2_735, __p3_735) __extension__ ({ \ | |
| 61557 | int32x4_t __s0_735 = __p0_735; \ | |
| 61558 | int8x16_t __s1_735 = __p1_735; \ | |
| 61559 | uint8x16_t __s2_735 = __p2_735; \ | |
| 61560 | int32x4_t __ret_735; \ | |
| 61561 | uint8x16_t __reint_735 = __s2_735; \ | |
| 61562 | __ret_735 = vusdotq_s32(__s0_735, (uint8x16_t)(splatq_laneq_s32(*(int32x4_t *) &__reint_735, __p3_735)), __s1_735); \ | |
| 61563 | __ret_735; \ | |
| 63226 | #define vsudotq_laneq_s32(__p0_827, __p1_827, __p2_827, __p3_827) __extension__ ({ \ | |
| 63227 | int32x4_t __s0_827 = __p0_827; \ | |
| 63228 | int8x16_t __s1_827 = __p1_827; \ | |
| 63229 | uint8x16_t __s2_827 = __p2_827; \ | |
| 63230 | int32x4_t __ret_827; \ | |
| 63231 | uint8x16_t __reint_827 = __s2_827; \ | |
| 63232 | __ret_827 = vusdotq_s32(__s0_827, (uint8x16_t)(splatq_laneq_s32(*(int32x4_t *) &__reint_827, __p3_827)), __s1_827); \ | |
| 63233 | __ret_827; \ | |
| 61564 | 63234 | }) |
| 61565 | 63235 | #else |
| 61566 | #define vsudotq_laneq_s32(__p0_736, __p1_736, __p2_736, __p3_736) __extension__ ({ \ | |
| 61567 | int32x4_t __s0_736 = __p0_736; \ | |
| 61568 | int8x16_t __s1_736 = __p1_736; \ | |
| 61569 | uint8x16_t __s2_736 = __p2_736; \ | |
| 61570 | int32x4_t __rev0_736; __rev0_736 = __builtin_shufflevector(__s0_736, __s0_736, 3, 2, 1, 0); \ | |
| 61571 | int8x16_t __rev1_736; __rev1_736 = __builtin_shufflevector(__s1_736, __s1_736, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61572 | uint8x16_t __rev2_736; __rev2_736 = __builtin_shufflevector(__s2_736, __s2_736, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61573 | int32x4_t __ret_736; \ | |
| 61574 | uint8x16_t __reint_736 = __rev2_736; \ | |
| 61575 | __ret_736 = __noswap_vusdotq_s32(__rev0_736, (uint8x16_t)(__noswap_splatq_laneq_s32(*(int32x4_t *) &__reint_736, __p3_736)), __rev1_736); \ | |
| 61576 | __ret_736 = __builtin_shufflevector(__ret_736, __ret_736, 3, 2, 1, 0); \ | |
| 61577 | __ret_736; \ | |
| 63236 | #define vsudotq_laneq_s32(__p0_828, __p1_828, __p2_828, __p3_828) __extension__ ({ \ | |
| 63237 | int32x4_t __s0_828 = __p0_828; \ | |
| 63238 | int8x16_t __s1_828 = __p1_828; \ | |
| 63239 | uint8x16_t __s2_828 = __p2_828; \ | |
| 63240 | int32x4_t __rev0_828; __rev0_828 = __builtin_shufflevector(__s0_828, __s0_828, 3, 2, 1, 0); \ | |
| 63241 | int8x16_t __rev1_828; __rev1_828 = __builtin_shufflevector(__s1_828, __s1_828, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 63242 | uint8x16_t __rev2_828; __rev2_828 = __builtin_shufflevector(__s2_828, __s2_828, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 63243 | int32x4_t __ret_828; \ | |
| 63244 | uint8x16_t __reint_828 = __rev2_828; \ | |
| 63245 | __ret_828 = __noswap_vusdotq_s32(__rev0_828, (uint8x16_t)(__noswap_splatq_laneq_s32(*(int32x4_t *) &__reint_828, __p3_828)), __rev1_828); \ | |
| 63246 | __ret_828 = __builtin_shufflevector(__ret_828, __ret_828, 3, 2, 1, 0); \ | |
| 63247 | __ret_828; \ | |
| 61578 | 63248 | }) |
| 61579 | 63249 | #endif |
| 61580 | 63250 | |
| 61581 | 63251 | #ifdef __LITTLE_ENDIAN__ |
| 61582 | #define vsudot_laneq_s32(__p0_737, __p1_737, __p2_737, __p3_737) __extension__ ({ \ | |
| 61583 | int32x2_t __s0_737 = __p0_737; \ | |
| 61584 | int8x8_t __s1_737 = __p1_737; \ | |
| 61585 | uint8x16_t __s2_737 = __p2_737; \ | |
| 61586 | int32x2_t __ret_737; \ | |
| 61587 | uint8x16_t __reint_737 = __s2_737; \ | |
| 61588 | __ret_737 = vusdot_s32(__s0_737, (uint8x8_t)(splat_laneq_s32(*(int32x4_t *) &__reint_737, __p3_737)), __s1_737); \ | |
| 61589 | __ret_737; \ | |
| 63252 | #define vsudot_laneq_s32(__p0_829, __p1_829, __p2_829, __p3_829) __extension__ ({ \ | |
| 63253 | int32x2_t __s0_829 = __p0_829; \ | |
| 63254 | int8x8_t __s1_829 = __p1_829; \ | |
| 63255 | uint8x16_t __s2_829 = __p2_829; \ | |
| 63256 | int32x2_t __ret_829; \ | |
| 63257 | uint8x16_t __reint_829 = __s2_829; \ | |
| 63258 | __ret_829 = vusdot_s32(__s0_829, (uint8x8_t)(splat_laneq_s32(*(int32x4_t *) &__reint_829, __p3_829)), __s1_829); \ | |
| 63259 | __ret_829; \ | |
| 61590 | 63260 | }) |
| 61591 | 63261 | #else |
| 61592 | #define vsudot_laneq_s32(__p0_738, __p1_738, __p2_738, __p3_738) __extension__ ({ \ | |
| 61593 | int32x2_t __s0_738 = __p0_738; \ | |
| 61594 | int8x8_t __s1_738 = __p1_738; \ | |
| 61595 | uint8x16_t __s2_738 = __p2_738; \ | |
| 61596 | int32x2_t __rev0_738; __rev0_738 = __builtin_shufflevector(__s0_738, __s0_738, 1, 0); \ | |
| 61597 | int8x8_t __rev1_738; __rev1_738 = __builtin_shufflevector(__s1_738, __s1_738, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61598 | uint8x16_t __rev2_738; __rev2_738 = __builtin_shufflevector(__s2_738, __s2_738, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 61599 | int32x2_t __ret_738; \ | |
| 61600 | uint8x16_t __reint_738 = __rev2_738; \ | |
| 61601 | __ret_738 = __noswap_vusdot_s32(__rev0_738, (uint8x8_t)(__noswap_splat_laneq_s32(*(int32x4_t *) &__reint_738, __p3_738)), __rev1_738); \ | |
| 61602 | __ret_738 = __builtin_shufflevector(__ret_738, __ret_738, 1, 0); \ | |
| 61603 | __ret_738; \ | |
| 63262 | #define vsudot_laneq_s32(__p0_830, __p1_830, __p2_830, __p3_830) __extension__ ({ \ | |
| 63263 | int32x2_t __s0_830 = __p0_830; \ | |
| 63264 | int8x8_t __s1_830 = __p1_830; \ | |
| 63265 | uint8x16_t __s2_830 = __p2_830; \ | |
| 63266 | int32x2_t __rev0_830; __rev0_830 = __builtin_shufflevector(__s0_830, __s0_830, 1, 0); \ | |
| 63267 | int8x8_t __rev1_830; __rev1_830 = __builtin_shufflevector(__s1_830, __s1_830, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 63268 | uint8x16_t __rev2_830; __rev2_830 = __builtin_shufflevector(__s2_830, __s2_830, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 63269 | int32x2_t __ret_830; \ | |
| 63270 | uint8x16_t __reint_830 = __rev2_830; \ | |
| 63271 | __ret_830 = __noswap_vusdot_s32(__rev0_830, (uint8x8_t)(__noswap_splat_laneq_s32(*(int32x4_t *) &__reint_830, __p3_830)), __rev1_830); \ | |
| 63272 | __ret_830 = __builtin_shufflevector(__ret_830, __ret_830, 1, 0); \ | |
| 63273 | __ret_830; \ | |
| 61604 | 63274 | }) |
| 61605 | 63275 | #endif |
| 61606 | 63276 | |
| ... | ... | @@ -62423,9 +64093,9 @@ __ai uint64_t vtstd_u64(uint64_t __p0, uint64_t __p1) { |
| 62423 | 64093 | __ret = (uint64_t) __builtin_neon_vtstd_u64(__p0, __p1); |
| 62424 | 64094 | return __ret; |
| 62425 | 64095 | } |
| 62426 | __ai int64_t vtstd_s64(int64_t __p0, int64_t __p1) { | |
| 62427 | int64_t __ret; | |
| 62428 | __ret = (int64_t) __builtin_neon_vtstd_s64(__p0, __p1); | |
| 64096 | __ai uint64_t vtstd_s64(int64_t __p0, int64_t __p1) { | |
| 64097 | uint64_t __ret; | |
| 64098 | __ret = (uint64_t) __builtin_neon_vtstd_s64(__p0, __p1); | |
| 62429 | 64099 | return __ret; |
| 62430 | 64100 | } |
| 62431 | 64101 | __ai int8_t vuqaddb_s8(int8_t __p0, uint8_t __p1) { |
| ... | ... | @@ -62573,54 +64243,54 @@ __ai int16x4_t vuqadd_s16(int16x4_t __p0, uint16x4_t __p1) { |
| 62573 | 64243 | #endif |
| 62574 | 64244 | |
| 62575 | 64245 | #ifdef __LITTLE_ENDIAN__ |
| 62576 | #define vusdotq_laneq_s32(__p0_739, __p1_739, __p2_739, __p3_739) __extension__ ({ \ | |
| 62577 | int32x4_t __s0_739 = __p0_739; \ | |
| 62578 | uint8x16_t __s1_739 = __p1_739; \ | |
| 62579 | int8x16_t __s2_739 = __p2_739; \ | |
| 62580 | int32x4_t __ret_739; \ | |
| 62581 | int8x16_t __reint_739 = __s2_739; \ | |
| 62582 | __ret_739 = vusdotq_s32(__s0_739, __s1_739, (int8x16_t)(splatq_laneq_s32(*(int32x4_t *) &__reint_739, __p3_739))); \ | |
| 62583 | __ret_739; \ | |
| 64246 | #define vusdotq_laneq_s32(__p0_831, __p1_831, __p2_831, __p3_831) __extension__ ({ \ | |
| 64247 | int32x4_t __s0_831 = __p0_831; \ | |
| 64248 | uint8x16_t __s1_831 = __p1_831; \ | |
| 64249 | int8x16_t __s2_831 = __p2_831; \ | |
| 64250 | int32x4_t __ret_831; \ | |
| 64251 | int8x16_t __reint_831 = __s2_831; \ | |
| 64252 | __ret_831 = vusdotq_s32(__s0_831, __s1_831, (int8x16_t)(splatq_laneq_s32(*(int32x4_t *) &__reint_831, __p3_831))); \ | |
| 64253 | __ret_831; \ | |
| 62584 | 64254 | }) |
| 62585 | 64255 | #else |
| 62586 | #define vusdotq_laneq_s32(__p0_740, __p1_740, __p2_740, __p3_740) __extension__ ({ \ | |
| 62587 | int32x4_t __s0_740 = __p0_740; \ | |
| 62588 | uint8x16_t __s1_740 = __p1_740; \ | |
| 62589 | int8x16_t __s2_740 = __p2_740; \ | |
| 62590 | int32x4_t __rev0_740; __rev0_740 = __builtin_shufflevector(__s0_740, __s0_740, 3, 2, 1, 0); \ | |
| 62591 | uint8x16_t __rev1_740; __rev1_740 = __builtin_shufflevector(__s1_740, __s1_740, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 62592 | int8x16_t __rev2_740; __rev2_740 = __builtin_shufflevector(__s2_740, __s2_740, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 62593 | int32x4_t __ret_740; \ | |
| 62594 | int8x16_t __reint_740 = __rev2_740; \ | |
| 62595 | __ret_740 = __noswap_vusdotq_s32(__rev0_740, __rev1_740, (int8x16_t)(__noswap_splatq_laneq_s32(*(int32x4_t *) &__reint_740, __p3_740))); \ | |
| 62596 | __ret_740 = __builtin_shufflevector(__ret_740, __ret_740, 3, 2, 1, 0); \ | |
| 62597 | __ret_740; \ | |
| 64256 | #define vusdotq_laneq_s32(__p0_832, __p1_832, __p2_832, __p3_832) __extension__ ({ \ | |
| 64257 | int32x4_t __s0_832 = __p0_832; \ | |
| 64258 | uint8x16_t __s1_832 = __p1_832; \ | |
| 64259 | int8x16_t __s2_832 = __p2_832; \ | |
| 64260 | int32x4_t __rev0_832; __rev0_832 = __builtin_shufflevector(__s0_832, __s0_832, 3, 2, 1, 0); \ | |
| 64261 | uint8x16_t __rev1_832; __rev1_832 = __builtin_shufflevector(__s1_832, __s1_832, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 64262 | int8x16_t __rev2_832; __rev2_832 = __builtin_shufflevector(__s2_832, __s2_832, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 64263 | int32x4_t __ret_832; \ | |
| 64264 | int8x16_t __reint_832 = __rev2_832; \ | |
| 64265 | __ret_832 = __noswap_vusdotq_s32(__rev0_832, __rev1_832, (int8x16_t)(__noswap_splatq_laneq_s32(*(int32x4_t *) &__reint_832, __p3_832))); \ | |
| 64266 | __ret_832 = __builtin_shufflevector(__ret_832, __ret_832, 3, 2, 1, 0); \ | |
| 64267 | __ret_832; \ | |
| 62598 | 64268 | }) |
| 62599 | 64269 | #endif |
| 62600 | 64270 | |
| 62601 | 64271 | #ifdef __LITTLE_ENDIAN__ |
| 62602 | #define vusdot_laneq_s32(__p0_741, __p1_741, __p2_741, __p3_741) __extension__ ({ \ | |
| 62603 | int32x2_t __s0_741 = __p0_741; \ | |
| 62604 | uint8x8_t __s1_741 = __p1_741; \ | |
| 62605 | int8x16_t __s2_741 = __p2_741; \ | |
| 62606 | int32x2_t __ret_741; \ | |
| 62607 | int8x16_t __reint_741 = __s2_741; \ | |
| 62608 | __ret_741 = vusdot_s32(__s0_741, __s1_741, (int8x8_t)(splat_laneq_s32(*(int32x4_t *) &__reint_741, __p3_741))); \ | |
| 62609 | __ret_741; \ | |
| 64272 | #define vusdot_laneq_s32(__p0_833, __p1_833, __p2_833, __p3_833) __extension__ ({ \ | |
| 64273 | int32x2_t __s0_833 = __p0_833; \ | |
| 64274 | uint8x8_t __s1_833 = __p1_833; \ | |
| 64275 | int8x16_t __s2_833 = __p2_833; \ | |
| 64276 | int32x2_t __ret_833; \ | |
| 64277 | int8x16_t __reint_833 = __s2_833; \ | |
| 64278 | __ret_833 = vusdot_s32(__s0_833, __s1_833, (int8x8_t)(splat_laneq_s32(*(int32x4_t *) &__reint_833, __p3_833))); \ | |
| 64279 | __ret_833; \ | |
| 62610 | 64280 | }) |
| 62611 | 64281 | #else |
| 62612 | #define vusdot_laneq_s32(__p0_742, __p1_742, __p2_742, __p3_742) __extension__ ({ \ | |
| 62613 | int32x2_t __s0_742 = __p0_742; \ | |
| 62614 | uint8x8_t __s1_742 = __p1_742; \ | |
| 62615 | int8x16_t __s2_742 = __p2_742; \ | |
| 62616 | int32x2_t __rev0_742; __rev0_742 = __builtin_shufflevector(__s0_742, __s0_742, 1, 0); \ | |
| 62617 | uint8x8_t __rev1_742; __rev1_742 = __builtin_shufflevector(__s1_742, __s1_742, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 62618 | int8x16_t __rev2_742; __rev2_742 = __builtin_shufflevector(__s2_742, __s2_742, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 62619 | int32x2_t __ret_742; \ | |
| 62620 | int8x16_t __reint_742 = __rev2_742; \ | |
| 62621 | __ret_742 = __noswap_vusdot_s32(__rev0_742, __rev1_742, (int8x8_t)(__noswap_splat_laneq_s32(*(int32x4_t *) &__reint_742, __p3_742))); \ | |
| 62622 | __ret_742 = __builtin_shufflevector(__ret_742, __ret_742, 1, 0); \ | |
| 62623 | __ret_742; \ | |
| 64282 | #define vusdot_laneq_s32(__p0_834, __p1_834, __p2_834, __p3_834) __extension__ ({ \ | |
| 64283 | int32x2_t __s0_834 = __p0_834; \ | |
| 64284 | uint8x8_t __s1_834 = __p1_834; \ | |
| 64285 | int8x16_t __s2_834 = __p2_834; \ | |
| 64286 | int32x2_t __rev0_834; __rev0_834 = __builtin_shufflevector(__s0_834, __s0_834, 1, 0); \ | |
| 64287 | uint8x8_t __rev1_834; __rev1_834 = __builtin_shufflevector(__s1_834, __s1_834, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 64288 | int8x16_t __rev2_834; __rev2_834 = __builtin_shufflevector(__s2_834, __s2_834, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 64289 | int32x2_t __ret_834; \ | |
| 64290 | int8x16_t __reint_834 = __rev2_834; \ | |
| 64291 | __ret_834 = __noswap_vusdot_s32(__rev0_834, __rev1_834, (int8x8_t)(__noswap_splat_laneq_s32(*(int32x4_t *) &__reint_834, __p3_834))); \ | |
| 64292 | __ret_834 = __builtin_shufflevector(__ret_834, __ret_834, 1, 0); \ | |
| 64293 | __ret_834; \ | |
| 62624 | 64294 | }) |
| 62625 | 64295 | #endif |
| 62626 | 64296 | |
| ... | ... | @@ -64674,60 +66344,60 @@ __ai int32x4_t vaddw_s16(int32x4_t __p0, int16x4_t __p1) { |
| 64674 | 66344 | #endif |
| 64675 | 66345 | |
| 64676 | 66346 | #ifdef __LITTLE_ENDIAN__ |
| 64677 | #define vget_lane_f16(__p0_743, __p1_743) __extension__ ({ \ | |
| 64678 | float16x4_t __s0_743 = __p0_743; \ | |
| 64679 | float16_t __ret_743; \ | |
| 64680 | float16x4_t __reint_743 = __s0_743; \ | |
| 64681 | int16_t __reint1_743 = vget_lane_s16(*(int16x4_t *) &__reint_743, __p1_743); \ | |
| 64682 | __ret_743 = *(float16_t *) &__reint1_743; \ | |
| 64683 | __ret_743; \ | |
| 66347 | #define vget_lane_f16(__p0_835, __p1_835) __extension__ ({ \ | |
| 66348 | float16x4_t __s0_835 = __p0_835; \ | |
| 66349 | float16_t __ret_835; \ | |
| 66350 | float16x4_t __reint_835 = __s0_835; \ | |
| 66351 | int16_t __reint1_835 = vget_lane_s16(*(int16x4_t *) &__reint_835, __p1_835); \ | |
| 66352 | __ret_835 = *(float16_t *) &__reint1_835; \ | |
| 66353 | __ret_835; \ | |
| 64684 | 66354 | }) |
| 64685 | 66355 | #else |
| 64686 | #define vget_lane_f16(__p0_744, __p1_744) __extension__ ({ \ | |
| 64687 | float16x4_t __s0_744 = __p0_744; \ | |
| 64688 | float16x4_t __rev0_744; __rev0_744 = __builtin_shufflevector(__s0_744, __s0_744, 3, 2, 1, 0); \ | |
| 64689 | float16_t __ret_744; \ | |
| 64690 | float16x4_t __reint_744 = __rev0_744; \ | |
| 64691 | int16_t __reint1_744 = __noswap_vget_lane_s16(*(int16x4_t *) &__reint_744, __p1_744); \ | |
| 64692 | __ret_744 = *(float16_t *) &__reint1_744; \ | |
| 64693 | __ret_744; \ | |
| 66356 | #define vget_lane_f16(__p0_836, __p1_836) __extension__ ({ \ | |
| 66357 | float16x4_t __s0_836 = __p0_836; \ | |
| 66358 | float16x4_t __rev0_836; __rev0_836 = __builtin_shufflevector(__s0_836, __s0_836, 3, 2, 1, 0); \ | |
| 66359 | float16_t __ret_836; \ | |
| 66360 | float16x4_t __reint_836 = __rev0_836; \ | |
| 66361 | int16_t __reint1_836 = __noswap_vget_lane_s16(*(int16x4_t *) &__reint_836, __p1_836); \ | |
| 66362 | __ret_836 = *(float16_t *) &__reint1_836; \ | |
| 66363 | __ret_836; \ | |
| 64694 | 66364 | }) |
| 64695 | #define __noswap_vget_lane_f16(__p0_745, __p1_745) __extension__ ({ \ | |
| 64696 | float16x4_t __s0_745 = __p0_745; \ | |
| 64697 | float16_t __ret_745; \ | |
| 64698 | float16x4_t __reint_745 = __s0_745; \ | |
| 64699 | int16_t __reint1_745 = __noswap_vget_lane_s16(*(int16x4_t *) &__reint_745, __p1_745); \ | |
| 64700 | __ret_745 = *(float16_t *) &__reint1_745; \ | |
| 64701 | __ret_745; \ | |
| 66365 | #define __noswap_vget_lane_f16(__p0_837, __p1_837) __extension__ ({ \ | |
| 66366 | float16x4_t __s0_837 = __p0_837; \ | |
| 66367 | float16_t __ret_837; \ | |
| 66368 | float16x4_t __reint_837 = __s0_837; \ | |
| 66369 | int16_t __reint1_837 = __noswap_vget_lane_s16(*(int16x4_t *) &__reint_837, __p1_837); \ | |
| 66370 | __ret_837 = *(float16_t *) &__reint1_837; \ | |
| 66371 | __ret_837; \ | |
| 64702 | 66372 | }) |
| 64703 | 66373 | #endif |
| 64704 | 66374 | |
| 64705 | 66375 | #ifdef __LITTLE_ENDIAN__ |
| 64706 | #define vgetq_lane_f16(__p0_746, __p1_746) __extension__ ({ \ | |
| 64707 | float16x8_t __s0_746 = __p0_746; \ | |
| 64708 | float16_t __ret_746; \ | |
| 64709 | float16x8_t __reint_746 = __s0_746; \ | |
| 64710 | int16_t __reint1_746 = vgetq_lane_s16(*(int16x8_t *) &__reint_746, __p1_746); \ | |
| 64711 | __ret_746 = *(float16_t *) &__reint1_746; \ | |
| 64712 | __ret_746; \ | |
| 66376 | #define vgetq_lane_f16(__p0_838, __p1_838) __extension__ ({ \ | |
| 66377 | float16x8_t __s0_838 = __p0_838; \ | |
| 66378 | float16_t __ret_838; \ | |
| 66379 | float16x8_t __reint_838 = __s0_838; \ | |
| 66380 | int16_t __reint1_838 = vgetq_lane_s16(*(int16x8_t *) &__reint_838, __p1_838); \ | |
| 66381 | __ret_838 = *(float16_t *) &__reint1_838; \ | |
| 66382 | __ret_838; \ | |
| 64713 | 66383 | }) |
| 64714 | 66384 | #else |
| 64715 | #define vgetq_lane_f16(__p0_747, __p1_747) __extension__ ({ \ | |
| 64716 | float16x8_t __s0_747 = __p0_747; \ | |
| 64717 | float16x8_t __rev0_747; __rev0_747 = __builtin_shufflevector(__s0_747, __s0_747, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 64718 | float16_t __ret_747; \ | |
| 64719 | float16x8_t __reint_747 = __rev0_747; \ | |
| 64720 | int16_t __reint1_747 = __noswap_vgetq_lane_s16(*(int16x8_t *) &__reint_747, __p1_747); \ | |
| 64721 | __ret_747 = *(float16_t *) &__reint1_747; \ | |
| 64722 | __ret_747; \ | |
| 66385 | #define vgetq_lane_f16(__p0_839, __p1_839) __extension__ ({ \ | |
| 66386 | float16x8_t __s0_839 = __p0_839; \ | |
| 66387 | float16x8_t __rev0_839; __rev0_839 = __builtin_shufflevector(__s0_839, __s0_839, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66388 | float16_t __ret_839; \ | |
| 66389 | float16x8_t __reint_839 = __rev0_839; \ | |
| 66390 | int16_t __reint1_839 = __noswap_vgetq_lane_s16(*(int16x8_t *) &__reint_839, __p1_839); \ | |
| 66391 | __ret_839 = *(float16_t *) &__reint1_839; \ | |
| 66392 | __ret_839; \ | |
| 64723 | 66393 | }) |
| 64724 | #define __noswap_vgetq_lane_f16(__p0_748, __p1_748) __extension__ ({ \ | |
| 64725 | float16x8_t __s0_748 = __p0_748; \ | |
| 64726 | float16_t __ret_748; \ | |
| 64727 | float16x8_t __reint_748 = __s0_748; \ | |
| 64728 | int16_t __reint1_748 = __noswap_vgetq_lane_s16(*(int16x8_t *) &__reint_748, __p1_748); \ | |
| 64729 | __ret_748 = *(float16_t *) &__reint1_748; \ | |
| 64730 | __ret_748; \ | |
| 66394 | #define __noswap_vgetq_lane_f16(__p0_840, __p1_840) __extension__ ({ \ | |
| 66395 | float16x8_t __s0_840 = __p0_840; \ | |
| 66396 | float16_t __ret_840; \ | |
| 66397 | float16x8_t __reint_840 = __s0_840; \ | |
| 66398 | int16_t __reint1_840 = __noswap_vgetq_lane_s16(*(int16x8_t *) &__reint_840, __p1_840); \ | |
| 66399 | __ret_840 = *(float16_t *) &__reint1_840; \ | |
| 66400 | __ret_840; \ | |
| 64731 | 66401 | }) |
| 64732 | 66402 | #endif |
| 64733 | 66403 | |
| ... | ... | @@ -64870,98 +66540,98 @@ __ai int32x4_t __noswap_vmlal_s16(int32x4_t __p0, int16x4_t __p1, int16x4_t __p2 |
| 64870 | 66540 | #endif |
| 64871 | 66541 | |
| 64872 | 66542 | #ifdef __LITTLE_ENDIAN__ |
| 64873 | #define vmlal_lane_u32(__p0_749, __p1_749, __p2_749, __p3_749) __extension__ ({ \ | |
| 64874 | uint64x2_t __s0_749 = __p0_749; \ | |
| 64875 | uint32x2_t __s1_749 = __p1_749; \ | |
| 64876 | uint32x2_t __s2_749 = __p2_749; \ | |
| 64877 | uint64x2_t __ret_749; \ | |
| 64878 | __ret_749 = __s0_749 + vmull_u32(__s1_749, splat_lane_u32(__s2_749, __p3_749)); \ | |
| 64879 | __ret_749; \ | |
| 66543 | #define vmlal_lane_u32(__p0_841, __p1_841, __p2_841, __p3_841) __extension__ ({ \ | |
| 66544 | uint64x2_t __s0_841 = __p0_841; \ | |
| 66545 | uint32x2_t __s1_841 = __p1_841; \ | |
| 66546 | uint32x2_t __s2_841 = __p2_841; \ | |
| 66547 | uint64x2_t __ret_841; \ | |
| 66548 | __ret_841 = __s0_841 + vmull_u32(__s1_841, splat_lane_u32(__s2_841, __p3_841)); \ | |
| 66549 | __ret_841; \ | |
| 64880 | 66550 | }) |
| 64881 | 66551 | #else |
| 64882 | #define vmlal_lane_u32(__p0_750, __p1_750, __p2_750, __p3_750) __extension__ ({ \ | |
| 64883 | uint64x2_t __s0_750 = __p0_750; \ | |
| 64884 | uint32x2_t __s1_750 = __p1_750; \ | |
| 64885 | uint32x2_t __s2_750 = __p2_750; \ | |
| 64886 | uint64x2_t __rev0_750; __rev0_750 = __builtin_shufflevector(__s0_750, __s0_750, 1, 0); \ | |
| 64887 | uint32x2_t __rev1_750; __rev1_750 = __builtin_shufflevector(__s1_750, __s1_750, 1, 0); \ | |
| 64888 | uint32x2_t __rev2_750; __rev2_750 = __builtin_shufflevector(__s2_750, __s2_750, 1, 0); \ | |
| 64889 | uint64x2_t __ret_750; \ | |
| 64890 | __ret_750 = __rev0_750 + __noswap_vmull_u32(__rev1_750, __noswap_splat_lane_u32(__rev2_750, __p3_750)); \ | |
| 64891 | __ret_750 = __builtin_shufflevector(__ret_750, __ret_750, 1, 0); \ | |
| 64892 | __ret_750; \ | |
| 66552 | #define vmlal_lane_u32(__p0_842, __p1_842, __p2_842, __p3_842) __extension__ ({ \ | |
| 66553 | uint64x2_t __s0_842 = __p0_842; \ | |
| 66554 | uint32x2_t __s1_842 = __p1_842; \ | |
| 66555 | uint32x2_t __s2_842 = __p2_842; \ | |
| 66556 | uint64x2_t __rev0_842; __rev0_842 = __builtin_shufflevector(__s0_842, __s0_842, 1, 0); \ | |
| 66557 | uint32x2_t __rev1_842; __rev1_842 = __builtin_shufflevector(__s1_842, __s1_842, 1, 0); \ | |
| 66558 | uint32x2_t __rev2_842; __rev2_842 = __builtin_shufflevector(__s2_842, __s2_842, 1, 0); \ | |
| 66559 | uint64x2_t __ret_842; \ | |
| 66560 | __ret_842 = __rev0_842 + __noswap_vmull_u32(__rev1_842, __noswap_splat_lane_u32(__rev2_842, __p3_842)); \ | |
| 66561 | __ret_842 = __builtin_shufflevector(__ret_842, __ret_842, 1, 0); \ | |
| 66562 | __ret_842; \ | |
| 64893 | 66563 | }) |
| 64894 | 66564 | #endif |
| 64895 | 66565 | |
| 64896 | 66566 | #ifdef __LITTLE_ENDIAN__ |
| 64897 | #define vmlal_lane_u16(__p0_751, __p1_751, __p2_751, __p3_751) __extension__ ({ \ | |
| 64898 | uint32x4_t __s0_751 = __p0_751; \ | |
| 64899 | uint16x4_t __s1_751 = __p1_751; \ | |
| 64900 | uint16x4_t __s2_751 = __p2_751; \ | |
| 64901 | uint32x4_t __ret_751; \ | |
| 64902 | __ret_751 = __s0_751 + vmull_u16(__s1_751, splat_lane_u16(__s2_751, __p3_751)); \ | |
| 64903 | __ret_751; \ | |
| 66567 | #define vmlal_lane_u16(__p0_843, __p1_843, __p2_843, __p3_843) __extension__ ({ \ | |
| 66568 | uint32x4_t __s0_843 = __p0_843; \ | |
| 66569 | uint16x4_t __s1_843 = __p1_843; \ | |
| 66570 | uint16x4_t __s2_843 = __p2_843; \ | |
| 66571 | uint32x4_t __ret_843; \ | |
| 66572 | __ret_843 = __s0_843 + vmull_u16(__s1_843, splat_lane_u16(__s2_843, __p3_843)); \ | |
| 66573 | __ret_843; \ | |
| 64904 | 66574 | }) |
| 64905 | 66575 | #else |
| 64906 | #define vmlal_lane_u16(__p0_752, __p1_752, __p2_752, __p3_752) __extension__ ({ \ | |
| 64907 | uint32x4_t __s0_752 = __p0_752; \ | |
| 64908 | uint16x4_t __s1_752 = __p1_752; \ | |
| 64909 | uint16x4_t __s2_752 = __p2_752; \ | |
| 64910 | uint32x4_t __rev0_752; __rev0_752 = __builtin_shufflevector(__s0_752, __s0_752, 3, 2, 1, 0); \ | |
| 64911 | uint16x4_t __rev1_752; __rev1_752 = __builtin_shufflevector(__s1_752, __s1_752, 3, 2, 1, 0); \ | |
| 64912 | uint16x4_t __rev2_752; __rev2_752 = __builtin_shufflevector(__s2_752, __s2_752, 3, 2, 1, 0); \ | |
| 64913 | uint32x4_t __ret_752; \ | |
| 64914 | __ret_752 = __rev0_752 + __noswap_vmull_u16(__rev1_752, __noswap_splat_lane_u16(__rev2_752, __p3_752)); \ | |
| 64915 | __ret_752 = __builtin_shufflevector(__ret_752, __ret_752, 3, 2, 1, 0); \ | |
| 64916 | __ret_752; \ | |
| 66576 | #define vmlal_lane_u16(__p0_844, __p1_844, __p2_844, __p3_844) __extension__ ({ \ | |
| 66577 | uint32x4_t __s0_844 = __p0_844; \ | |
| 66578 | uint16x4_t __s1_844 = __p1_844; \ | |
| 66579 | uint16x4_t __s2_844 = __p2_844; \ | |
| 66580 | uint32x4_t __rev0_844; __rev0_844 = __builtin_shufflevector(__s0_844, __s0_844, 3, 2, 1, 0); \ | |
| 66581 | uint16x4_t __rev1_844; __rev1_844 = __builtin_shufflevector(__s1_844, __s1_844, 3, 2, 1, 0); \ | |
| 66582 | uint16x4_t __rev2_844; __rev2_844 = __builtin_shufflevector(__s2_844, __s2_844, 3, 2, 1, 0); \ | |
| 66583 | uint32x4_t __ret_844; \ | |
| 66584 | __ret_844 = __rev0_844 + __noswap_vmull_u16(__rev1_844, __noswap_splat_lane_u16(__rev2_844, __p3_844)); \ | |
| 66585 | __ret_844 = __builtin_shufflevector(__ret_844, __ret_844, 3, 2, 1, 0); \ | |
| 66586 | __ret_844; \ | |
| 64917 | 66587 | }) |
| 64918 | 66588 | #endif |
| 64919 | 66589 | |
| 64920 | 66590 | #ifdef __LITTLE_ENDIAN__ |
| 64921 | #define vmlal_lane_s32(__p0_753, __p1_753, __p2_753, __p3_753) __extension__ ({ \ | |
| 64922 | int64x2_t __s0_753 = __p0_753; \ | |
| 64923 | int32x2_t __s1_753 = __p1_753; \ | |
| 64924 | int32x2_t __s2_753 = __p2_753; \ | |
| 64925 | int64x2_t __ret_753; \ | |
| 64926 | __ret_753 = __s0_753 + vmull_s32(__s1_753, splat_lane_s32(__s2_753, __p3_753)); \ | |
| 64927 | __ret_753; \ | |
| 66591 | #define vmlal_lane_s32(__p0_845, __p1_845, __p2_845, __p3_845) __extension__ ({ \ | |
| 66592 | int64x2_t __s0_845 = __p0_845; \ | |
| 66593 | int32x2_t __s1_845 = __p1_845; \ | |
| 66594 | int32x2_t __s2_845 = __p2_845; \ | |
| 66595 | int64x2_t __ret_845; \ | |
| 66596 | __ret_845 = __s0_845 + vmull_s32(__s1_845, splat_lane_s32(__s2_845, __p3_845)); \ | |
| 66597 | __ret_845; \ | |
| 64928 | 66598 | }) |
| 64929 | 66599 | #else |
| 64930 | #define vmlal_lane_s32(__p0_754, __p1_754, __p2_754, __p3_754) __extension__ ({ \ | |
| 64931 | int64x2_t __s0_754 = __p0_754; \ | |
| 64932 | int32x2_t __s1_754 = __p1_754; \ | |
| 64933 | int32x2_t __s2_754 = __p2_754; \ | |
| 64934 | int64x2_t __rev0_754; __rev0_754 = __builtin_shufflevector(__s0_754, __s0_754, 1, 0); \ | |
| 64935 | int32x2_t __rev1_754; __rev1_754 = __builtin_shufflevector(__s1_754, __s1_754, 1, 0); \ | |
| 64936 | int32x2_t __rev2_754; __rev2_754 = __builtin_shufflevector(__s2_754, __s2_754, 1, 0); \ | |
| 64937 | int64x2_t __ret_754; \ | |
| 64938 | __ret_754 = __rev0_754 + __noswap_vmull_s32(__rev1_754, __noswap_splat_lane_s32(__rev2_754, __p3_754)); \ | |
| 64939 | __ret_754 = __builtin_shufflevector(__ret_754, __ret_754, 1, 0); \ | |
| 64940 | __ret_754; \ | |
| 66600 | #define vmlal_lane_s32(__p0_846, __p1_846, __p2_846, __p3_846) __extension__ ({ \ | |
| 66601 | int64x2_t __s0_846 = __p0_846; \ | |
| 66602 | int32x2_t __s1_846 = __p1_846; \ | |
| 66603 | int32x2_t __s2_846 = __p2_846; \ | |
| 66604 | int64x2_t __rev0_846; __rev0_846 = __builtin_shufflevector(__s0_846, __s0_846, 1, 0); \ | |
| 66605 | int32x2_t __rev1_846; __rev1_846 = __builtin_shufflevector(__s1_846, __s1_846, 1, 0); \ | |
| 66606 | int32x2_t __rev2_846; __rev2_846 = __builtin_shufflevector(__s2_846, __s2_846, 1, 0); \ | |
| 66607 | int64x2_t __ret_846; \ | |
| 66608 | __ret_846 = __rev0_846 + __noswap_vmull_s32(__rev1_846, __noswap_splat_lane_s32(__rev2_846, __p3_846)); \ | |
| 66609 | __ret_846 = __builtin_shufflevector(__ret_846, __ret_846, 1, 0); \ | |
| 66610 | __ret_846; \ | |
| 64941 | 66611 | }) |
| 64942 | 66612 | #endif |
| 64943 | 66613 | |
| 64944 | 66614 | #ifdef __LITTLE_ENDIAN__ |
| 64945 | #define vmlal_lane_s16(__p0_755, __p1_755, __p2_755, __p3_755) __extension__ ({ \ | |
| 64946 | int32x4_t __s0_755 = __p0_755; \ | |
| 64947 | int16x4_t __s1_755 = __p1_755; \ | |
| 64948 | int16x4_t __s2_755 = __p2_755; \ | |
| 64949 | int32x4_t __ret_755; \ | |
| 64950 | __ret_755 = __s0_755 + vmull_s16(__s1_755, splat_lane_s16(__s2_755, __p3_755)); \ | |
| 64951 | __ret_755; \ | |
| 66615 | #define vmlal_lane_s16(__p0_847, __p1_847, __p2_847, __p3_847) __extension__ ({ \ | |
| 66616 | int32x4_t __s0_847 = __p0_847; \ | |
| 66617 | int16x4_t __s1_847 = __p1_847; \ | |
| 66618 | int16x4_t __s2_847 = __p2_847; \ | |
| 66619 | int32x4_t __ret_847; \ | |
| 66620 | __ret_847 = __s0_847 + vmull_s16(__s1_847, splat_lane_s16(__s2_847, __p3_847)); \ | |
| 66621 | __ret_847; \ | |
| 64952 | 66622 | }) |
| 64953 | 66623 | #else |
| 64954 | #define vmlal_lane_s16(__p0_756, __p1_756, __p2_756, __p3_756) __extension__ ({ \ | |
| 64955 | int32x4_t __s0_756 = __p0_756; \ | |
| 64956 | int16x4_t __s1_756 = __p1_756; \ | |
| 64957 | int16x4_t __s2_756 = __p2_756; \ | |
| 64958 | int32x4_t __rev0_756; __rev0_756 = __builtin_shufflevector(__s0_756, __s0_756, 3, 2, 1, 0); \ | |
| 64959 | int16x4_t __rev1_756; __rev1_756 = __builtin_shufflevector(__s1_756, __s1_756, 3, 2, 1, 0); \ | |
| 64960 | int16x4_t __rev2_756; __rev2_756 = __builtin_shufflevector(__s2_756, __s2_756, 3, 2, 1, 0); \ | |
| 64961 | int32x4_t __ret_756; \ | |
| 64962 | __ret_756 = __rev0_756 + __noswap_vmull_s16(__rev1_756, __noswap_splat_lane_s16(__rev2_756, __p3_756)); \ | |
| 64963 | __ret_756 = __builtin_shufflevector(__ret_756, __ret_756, 3, 2, 1, 0); \ | |
| 64964 | __ret_756; \ | |
| 66624 | #define vmlal_lane_s16(__p0_848, __p1_848, __p2_848, __p3_848) __extension__ ({ \ | |
| 66625 | int32x4_t __s0_848 = __p0_848; \ | |
| 66626 | int16x4_t __s1_848 = __p1_848; \ | |
| 66627 | int16x4_t __s2_848 = __p2_848; \ | |
| 66628 | int32x4_t __rev0_848; __rev0_848 = __builtin_shufflevector(__s0_848, __s0_848, 3, 2, 1, 0); \ | |
| 66629 | int16x4_t __rev1_848; __rev1_848 = __builtin_shufflevector(__s1_848, __s1_848, 3, 2, 1, 0); \ | |
| 66630 | int16x4_t __rev2_848; __rev2_848 = __builtin_shufflevector(__s2_848, __s2_848, 3, 2, 1, 0); \ | |
| 66631 | int32x4_t __ret_848; \ | |
| 66632 | __ret_848 = __rev0_848 + __noswap_vmull_s16(__rev1_848, __noswap_splat_lane_s16(__rev2_848, __p3_848)); \ | |
| 66633 | __ret_848 = __builtin_shufflevector(__ret_848, __ret_848, 3, 2, 1, 0); \ | |
| 66634 | __ret_848; \ | |
| 64965 | 66635 | }) |
| 64966 | 66636 | #endif |
| 64967 | 66637 | |
| ... | ... | @@ -65192,98 +66862,98 @@ __ai int32x4_t __noswap_vmlsl_s16(int32x4_t __p0, int16x4_t __p1, int16x4_t __p2 |
| 65192 | 66862 | #endif |
| 65193 | 66863 | |
| 65194 | 66864 | #ifdef __LITTLE_ENDIAN__ |
| 65195 | #define vmlsl_lane_u32(__p0_757, __p1_757, __p2_757, __p3_757) __extension__ ({ \ | |
| 65196 | uint64x2_t __s0_757 = __p0_757; \ | |
| 65197 | uint32x2_t __s1_757 = __p1_757; \ | |
| 65198 | uint32x2_t __s2_757 = __p2_757; \ | |
| 65199 | uint64x2_t __ret_757; \ | |
| 65200 | __ret_757 = __s0_757 - vmull_u32(__s1_757, splat_lane_u32(__s2_757, __p3_757)); \ | |
| 65201 | __ret_757; \ | |
| 66865 | #define vmlsl_lane_u32(__p0_849, __p1_849, __p2_849, __p3_849) __extension__ ({ \ | |
| 66866 | uint64x2_t __s0_849 = __p0_849; \ | |
| 66867 | uint32x2_t __s1_849 = __p1_849; \ | |
| 66868 | uint32x2_t __s2_849 = __p2_849; \ | |
| 66869 | uint64x2_t __ret_849; \ | |
| 66870 | __ret_849 = __s0_849 - vmull_u32(__s1_849, splat_lane_u32(__s2_849, __p3_849)); \ | |
| 66871 | __ret_849; \ | |
| 65202 | 66872 | }) |
| 65203 | 66873 | #else |
| 65204 | #define vmlsl_lane_u32(__p0_758, __p1_758, __p2_758, __p3_758) __extension__ ({ \ | |
| 65205 | uint64x2_t __s0_758 = __p0_758; \ | |
| 65206 | uint32x2_t __s1_758 = __p1_758; \ | |
| 65207 | uint32x2_t __s2_758 = __p2_758; \ | |
| 65208 | uint64x2_t __rev0_758; __rev0_758 = __builtin_shufflevector(__s0_758, __s0_758, 1, 0); \ | |
| 65209 | uint32x2_t __rev1_758; __rev1_758 = __builtin_shufflevector(__s1_758, __s1_758, 1, 0); \ | |
| 65210 | uint32x2_t __rev2_758; __rev2_758 = __builtin_shufflevector(__s2_758, __s2_758, 1, 0); \ | |
| 65211 | uint64x2_t __ret_758; \ | |
| 65212 | __ret_758 = __rev0_758 - __noswap_vmull_u32(__rev1_758, __noswap_splat_lane_u32(__rev2_758, __p3_758)); \ | |
| 65213 | __ret_758 = __builtin_shufflevector(__ret_758, __ret_758, 1, 0); \ | |
| 65214 | __ret_758; \ | |
| 66874 | #define vmlsl_lane_u32(__p0_850, __p1_850, __p2_850, __p3_850) __extension__ ({ \ | |
| 66875 | uint64x2_t __s0_850 = __p0_850; \ | |
| 66876 | uint32x2_t __s1_850 = __p1_850; \ | |
| 66877 | uint32x2_t __s2_850 = __p2_850; \ | |
| 66878 | uint64x2_t __rev0_850; __rev0_850 = __builtin_shufflevector(__s0_850, __s0_850, 1, 0); \ | |
| 66879 | uint32x2_t __rev1_850; __rev1_850 = __builtin_shufflevector(__s1_850, __s1_850, 1, 0); \ | |
| 66880 | uint32x2_t __rev2_850; __rev2_850 = __builtin_shufflevector(__s2_850, __s2_850, 1, 0); \ | |
| 66881 | uint64x2_t __ret_850; \ | |
| 66882 | __ret_850 = __rev0_850 - __noswap_vmull_u32(__rev1_850, __noswap_splat_lane_u32(__rev2_850, __p3_850)); \ | |
| 66883 | __ret_850 = __builtin_shufflevector(__ret_850, __ret_850, 1, 0); \ | |
| 66884 | __ret_850; \ | |
| 65215 | 66885 | }) |
| 65216 | 66886 | #endif |
| 65217 | 66887 | |
| 65218 | 66888 | #ifdef __LITTLE_ENDIAN__ |
| 65219 | #define vmlsl_lane_u16(__p0_759, __p1_759, __p2_759, __p3_759) __extension__ ({ \ | |
| 65220 | uint32x4_t __s0_759 = __p0_759; \ | |
| 65221 | uint16x4_t __s1_759 = __p1_759; \ | |
| 65222 | uint16x4_t __s2_759 = __p2_759; \ | |
| 65223 | uint32x4_t __ret_759; \ | |
| 65224 | __ret_759 = __s0_759 - vmull_u16(__s1_759, splat_lane_u16(__s2_759, __p3_759)); \ | |
| 65225 | __ret_759; \ | |
| 66889 | #define vmlsl_lane_u16(__p0_851, __p1_851, __p2_851, __p3_851) __extension__ ({ \ | |
| 66890 | uint32x4_t __s0_851 = __p0_851; \ | |
| 66891 | uint16x4_t __s1_851 = __p1_851; \ | |
| 66892 | uint16x4_t __s2_851 = __p2_851; \ | |
| 66893 | uint32x4_t __ret_851; \ | |
| 66894 | __ret_851 = __s0_851 - vmull_u16(__s1_851, splat_lane_u16(__s2_851, __p3_851)); \ | |
| 66895 | __ret_851; \ | |
| 65226 | 66896 | }) |
| 65227 | 66897 | #else |
| 65228 | #define vmlsl_lane_u16(__p0_760, __p1_760, __p2_760, __p3_760) __extension__ ({ \ | |
| 65229 | uint32x4_t __s0_760 = __p0_760; \ | |
| 65230 | uint16x4_t __s1_760 = __p1_760; \ | |
| 65231 | uint16x4_t __s2_760 = __p2_760; \ | |
| 65232 | uint32x4_t __rev0_760; __rev0_760 = __builtin_shufflevector(__s0_760, __s0_760, 3, 2, 1, 0); \ | |
| 65233 | uint16x4_t __rev1_760; __rev1_760 = __builtin_shufflevector(__s1_760, __s1_760, 3, 2, 1, 0); \ | |
| 65234 | uint16x4_t __rev2_760; __rev2_760 = __builtin_shufflevector(__s2_760, __s2_760, 3, 2, 1, 0); \ | |
| 65235 | uint32x4_t __ret_760; \ | |
| 65236 | __ret_760 = __rev0_760 - __noswap_vmull_u16(__rev1_760, __noswap_splat_lane_u16(__rev2_760, __p3_760)); \ | |
| 65237 | __ret_760 = __builtin_shufflevector(__ret_760, __ret_760, 3, 2, 1, 0); \ | |
| 65238 | __ret_760; \ | |
| 66898 | #define vmlsl_lane_u16(__p0_852, __p1_852, __p2_852, __p3_852) __extension__ ({ \ | |
| 66899 | uint32x4_t __s0_852 = __p0_852; \ | |
| 66900 | uint16x4_t __s1_852 = __p1_852; \ | |
| 66901 | uint16x4_t __s2_852 = __p2_852; \ | |
| 66902 | uint32x4_t __rev0_852; __rev0_852 = __builtin_shufflevector(__s0_852, __s0_852, 3, 2, 1, 0); \ | |
| 66903 | uint16x4_t __rev1_852; __rev1_852 = __builtin_shufflevector(__s1_852, __s1_852, 3, 2, 1, 0); \ | |
| 66904 | uint16x4_t __rev2_852; __rev2_852 = __builtin_shufflevector(__s2_852, __s2_852, 3, 2, 1, 0); \ | |
| 66905 | uint32x4_t __ret_852; \ | |
| 66906 | __ret_852 = __rev0_852 - __noswap_vmull_u16(__rev1_852, __noswap_splat_lane_u16(__rev2_852, __p3_852)); \ | |
| 66907 | __ret_852 = __builtin_shufflevector(__ret_852, __ret_852, 3, 2, 1, 0); \ | |
| 66908 | __ret_852; \ | |
| 65239 | 66909 | }) |
| 65240 | 66910 | #endif |
| 65241 | 66911 | |
| 65242 | 66912 | #ifdef __LITTLE_ENDIAN__ |
| 65243 | #define vmlsl_lane_s32(__p0_761, __p1_761, __p2_761, __p3_761) __extension__ ({ \ | |
| 65244 | int64x2_t __s0_761 = __p0_761; \ | |
| 65245 | int32x2_t __s1_761 = __p1_761; \ | |
| 65246 | int32x2_t __s2_761 = __p2_761; \ | |
| 65247 | int64x2_t __ret_761; \ | |
| 65248 | __ret_761 = __s0_761 - vmull_s32(__s1_761, splat_lane_s32(__s2_761, __p3_761)); \ | |
| 65249 | __ret_761; \ | |
| 66913 | #define vmlsl_lane_s32(__p0_853, __p1_853, __p2_853, __p3_853) __extension__ ({ \ | |
| 66914 | int64x2_t __s0_853 = __p0_853; \ | |
| 66915 | int32x2_t __s1_853 = __p1_853; \ | |
| 66916 | int32x2_t __s2_853 = __p2_853; \ | |
| 66917 | int64x2_t __ret_853; \ | |
| 66918 | __ret_853 = __s0_853 - vmull_s32(__s1_853, splat_lane_s32(__s2_853, __p3_853)); \ | |
| 66919 | __ret_853; \ | |
| 65250 | 66920 | }) |
| 65251 | 66921 | #else |
| 65252 | #define vmlsl_lane_s32(__p0_762, __p1_762, __p2_762, __p3_762) __extension__ ({ \ | |
| 65253 | int64x2_t __s0_762 = __p0_762; \ | |
| 65254 | int32x2_t __s1_762 = __p1_762; \ | |
| 65255 | int32x2_t __s2_762 = __p2_762; \ | |
| 65256 | int64x2_t __rev0_762; __rev0_762 = __builtin_shufflevector(__s0_762, __s0_762, 1, 0); \ | |
| 65257 | int32x2_t __rev1_762; __rev1_762 = __builtin_shufflevector(__s1_762, __s1_762, 1, 0); \ | |
| 65258 | int32x2_t __rev2_762; __rev2_762 = __builtin_shufflevector(__s2_762, __s2_762, 1, 0); \ | |
| 65259 | int64x2_t __ret_762; \ | |
| 65260 | __ret_762 = __rev0_762 - __noswap_vmull_s32(__rev1_762, __noswap_splat_lane_s32(__rev2_762, __p3_762)); \ | |
| 65261 | __ret_762 = __builtin_shufflevector(__ret_762, __ret_762, 1, 0); \ | |
| 65262 | __ret_762; \ | |
| 66922 | #define vmlsl_lane_s32(__p0_854, __p1_854, __p2_854, __p3_854) __extension__ ({ \ | |
| 66923 | int64x2_t __s0_854 = __p0_854; \ | |
| 66924 | int32x2_t __s1_854 = __p1_854; \ | |
| 66925 | int32x2_t __s2_854 = __p2_854; \ | |
| 66926 | int64x2_t __rev0_854; __rev0_854 = __builtin_shufflevector(__s0_854, __s0_854, 1, 0); \ | |
| 66927 | int32x2_t __rev1_854; __rev1_854 = __builtin_shufflevector(__s1_854, __s1_854, 1, 0); \ | |
| 66928 | int32x2_t __rev2_854; __rev2_854 = __builtin_shufflevector(__s2_854, __s2_854, 1, 0); \ | |
| 66929 | int64x2_t __ret_854; \ | |
| 66930 | __ret_854 = __rev0_854 - __noswap_vmull_s32(__rev1_854, __noswap_splat_lane_s32(__rev2_854, __p3_854)); \ | |
| 66931 | __ret_854 = __builtin_shufflevector(__ret_854, __ret_854, 1, 0); \ | |
| 66932 | __ret_854; \ | |
| 65263 | 66933 | }) |
| 65264 | 66934 | #endif |
| 65265 | 66935 | |
| 65266 | 66936 | #ifdef __LITTLE_ENDIAN__ |
| 65267 | #define vmlsl_lane_s16(__p0_763, __p1_763, __p2_763, __p3_763) __extension__ ({ \ | |
| 65268 | int32x4_t __s0_763 = __p0_763; \ | |
| 65269 | int16x4_t __s1_763 = __p1_763; \ | |
| 65270 | int16x4_t __s2_763 = __p2_763; \ | |
| 65271 | int32x4_t __ret_763; \ | |
| 65272 | __ret_763 = __s0_763 - vmull_s16(__s1_763, splat_lane_s16(__s2_763, __p3_763)); \ | |
| 65273 | __ret_763; \ | |
| 66937 | #define vmlsl_lane_s16(__p0_855, __p1_855, __p2_855, __p3_855) __extension__ ({ \ | |
| 66938 | int32x4_t __s0_855 = __p0_855; \ | |
| 66939 | int16x4_t __s1_855 = __p1_855; \ | |
| 66940 | int16x4_t __s2_855 = __p2_855; \ | |
| 66941 | int32x4_t __ret_855; \ | |
| 66942 | __ret_855 = __s0_855 - vmull_s16(__s1_855, splat_lane_s16(__s2_855, __p3_855)); \ | |
| 66943 | __ret_855; \ | |
| 65274 | 66944 | }) |
| 65275 | 66945 | #else |
| 65276 | #define vmlsl_lane_s16(__p0_764, __p1_764, __p2_764, __p3_764) __extension__ ({ \ | |
| 65277 | int32x4_t __s0_764 = __p0_764; \ | |
| 65278 | int16x4_t __s1_764 = __p1_764; \ | |
| 65279 | int16x4_t __s2_764 = __p2_764; \ | |
| 65280 | int32x4_t __rev0_764; __rev0_764 = __builtin_shufflevector(__s0_764, __s0_764, 3, 2, 1, 0); \ | |
| 65281 | int16x4_t __rev1_764; __rev1_764 = __builtin_shufflevector(__s1_764, __s1_764, 3, 2, 1, 0); \ | |
| 65282 | int16x4_t __rev2_764; __rev2_764 = __builtin_shufflevector(__s2_764, __s2_764, 3, 2, 1, 0); \ | |
| 65283 | int32x4_t __ret_764; \ | |
| 65284 | __ret_764 = __rev0_764 - __noswap_vmull_s16(__rev1_764, __noswap_splat_lane_s16(__rev2_764, __p3_764)); \ | |
| 65285 | __ret_764 = __builtin_shufflevector(__ret_764, __ret_764, 3, 2, 1, 0); \ | |
| 65286 | __ret_764; \ | |
| 66946 | #define vmlsl_lane_s16(__p0_856, __p1_856, __p2_856, __p3_856) __extension__ ({ \ | |
| 66947 | int32x4_t __s0_856 = __p0_856; \ | |
| 66948 | int16x4_t __s1_856 = __p1_856; \ | |
| 66949 | int16x4_t __s2_856 = __p2_856; \ | |
| 66950 | int32x4_t __rev0_856; __rev0_856 = __builtin_shufflevector(__s0_856, __s0_856, 3, 2, 1, 0); \ | |
| 66951 | int16x4_t __rev1_856; __rev1_856 = __builtin_shufflevector(__s1_856, __s1_856, 3, 2, 1, 0); \ | |
| 66952 | int16x4_t __rev2_856; __rev2_856 = __builtin_shufflevector(__s2_856, __s2_856, 3, 2, 1, 0); \ | |
| 66953 | int32x4_t __ret_856; \ | |
| 66954 | __ret_856 = __rev0_856 - __noswap_vmull_s16(__rev1_856, __noswap_splat_lane_s16(__rev2_856, __p3_856)); \ | |
| 66955 | __ret_856 = __builtin_shufflevector(__ret_856, __ret_856, 3, 2, 1, 0); \ | |
| 66956 | __ret_856; \ | |
| 65287 | 66957 | }) |
| 65288 | 66958 | #endif |
| 65289 | 66959 | |
| ... | ... | @@ -65376,151 +67046,151 @@ __ai int32x4_t __noswap_vmlsl_n_s16(int32x4_t __p0, int16x4_t __p1, int16_t __p2 |
| 65376 | 67046 | #endif |
| 65377 | 67047 | |
| 65378 | 67048 | #ifdef __LITTLE_ENDIAN__ |
| 65379 | #define vset_lane_f16(__p0_765, __p1_765, __p2_765) __extension__ ({ \ | |
| 65380 | float16_t __s0_765 = __p0_765; \ | |
| 65381 | float16x4_t __s1_765 = __p1_765; \ | |
| 65382 | float16x4_t __ret_765; \ | |
| 65383 | float16_t __reint_765 = __s0_765; \ | |
| 65384 | float16x4_t __reint1_765 = __s1_765; \ | |
| 65385 | int16x4_t __reint2_765 = vset_lane_s16(*(int16_t *) &__reint_765, *(int16x4_t *) &__reint1_765, __p2_765); \ | |
| 65386 | __ret_765 = *(float16x4_t *) &__reint2_765; \ | |
| 65387 | __ret_765; \ | |
| 67049 | #define vset_lane_f16(__p0_857, __p1_857, __p2_857) __extension__ ({ \ | |
| 67050 | float16_t __s0_857 = __p0_857; \ | |
| 67051 | float16x4_t __s1_857 = __p1_857; \ | |
| 67052 | float16x4_t __ret_857; \ | |
| 67053 | float16_t __reint_857 = __s0_857; \ | |
| 67054 | float16x4_t __reint1_857 = __s1_857; \ | |
| 67055 | int16x4_t __reint2_857 = vset_lane_s16(*(int16_t *) &__reint_857, *(int16x4_t *) &__reint1_857, __p2_857); \ | |
| 67056 | __ret_857 = *(float16x4_t *) &__reint2_857; \ | |
| 67057 | __ret_857; \ | |
| 65388 | 67058 | }) |
| 65389 | 67059 | #else |
| 65390 | #define vset_lane_f16(__p0_766, __p1_766, __p2_766) __extension__ ({ \ | |
| 65391 | float16_t __s0_766 = __p0_766; \ | |
| 65392 | float16x4_t __s1_766 = __p1_766; \ | |
| 65393 | float16x4_t __rev1_766; __rev1_766 = __builtin_shufflevector(__s1_766, __s1_766, 3, 2, 1, 0); \ | |
| 65394 | float16x4_t __ret_766; \ | |
| 65395 | float16_t __reint_766 = __s0_766; \ | |
| 65396 | float16x4_t __reint1_766 = __rev1_766; \ | |
| 65397 | int16x4_t __reint2_766 = __noswap_vset_lane_s16(*(int16_t *) &__reint_766, *(int16x4_t *) &__reint1_766, __p2_766); \ | |
| 65398 | __ret_766 = *(float16x4_t *) &__reint2_766; \ | |
| 65399 | __ret_766 = __builtin_shufflevector(__ret_766, __ret_766, 3, 2, 1, 0); \ | |
| 65400 | __ret_766; \ | |
| 67060 | #define vset_lane_f16(__p0_858, __p1_858, __p2_858) __extension__ ({ \ | |
| 67061 | float16_t __s0_858 = __p0_858; \ | |
| 67062 | float16x4_t __s1_858 = __p1_858; \ | |
| 67063 | float16x4_t __rev1_858; __rev1_858 = __builtin_shufflevector(__s1_858, __s1_858, 3, 2, 1, 0); \ | |
| 67064 | float16x4_t __ret_858; \ | |
| 67065 | float16_t __reint_858 = __s0_858; \ | |
| 67066 | float16x4_t __reint1_858 = __rev1_858; \ | |
| 67067 | int16x4_t __reint2_858 = __noswap_vset_lane_s16(*(int16_t *) &__reint_858, *(int16x4_t *) &__reint1_858, __p2_858); \ | |
| 67068 | __ret_858 = *(float16x4_t *) &__reint2_858; \ | |
| 67069 | __ret_858 = __builtin_shufflevector(__ret_858, __ret_858, 3, 2, 1, 0); \ | |
| 67070 | __ret_858; \ | |
| 65401 | 67071 | }) |
| 65402 | 67072 | #endif |
| 65403 | 67073 | |
| 65404 | 67074 | #ifdef __LITTLE_ENDIAN__ |
| 65405 | #define vsetq_lane_f16(__p0_767, __p1_767, __p2_767) __extension__ ({ \ | |
| 65406 | float16_t __s0_767 = __p0_767; \ | |
| 65407 | float16x8_t __s1_767 = __p1_767; \ | |
| 65408 | float16x8_t __ret_767; \ | |
| 65409 | float16_t __reint_767 = __s0_767; \ | |
| 65410 | float16x8_t __reint1_767 = __s1_767; \ | |
| 65411 | int16x8_t __reint2_767 = vsetq_lane_s16(*(int16_t *) &__reint_767, *(int16x8_t *) &__reint1_767, __p2_767); \ | |
| 65412 | __ret_767 = *(float16x8_t *) &__reint2_767; \ | |
| 65413 | __ret_767; \ | |
| 67075 | #define vsetq_lane_f16(__p0_859, __p1_859, __p2_859) __extension__ ({ \ | |
| 67076 | float16_t __s0_859 = __p0_859; \ | |
| 67077 | float16x8_t __s1_859 = __p1_859; \ | |
| 67078 | float16x8_t __ret_859; \ | |
| 67079 | float16_t __reint_859 = __s0_859; \ | |
| 67080 | float16x8_t __reint1_859 = __s1_859; \ | |
| 67081 | int16x8_t __reint2_859 = vsetq_lane_s16(*(int16_t *) &__reint_859, *(int16x8_t *) &__reint1_859, __p2_859); \ | |
| 67082 | __ret_859 = *(float16x8_t *) &__reint2_859; \ | |
| 67083 | __ret_859; \ | |
| 65414 | 67084 | }) |
| 65415 | 67085 | #else |
| 65416 | #define vsetq_lane_f16(__p0_768, __p1_768, __p2_768) __extension__ ({ \ | |
| 65417 | float16_t __s0_768 = __p0_768; \ | |
| 65418 | float16x8_t __s1_768 = __p1_768; \ | |
| 65419 | float16x8_t __rev1_768; __rev1_768 = __builtin_shufflevector(__s1_768, __s1_768, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65420 | float16x8_t __ret_768; \ | |
| 65421 | float16_t __reint_768 = __s0_768; \ | |
| 65422 | float16x8_t __reint1_768 = __rev1_768; \ | |
| 65423 | int16x8_t __reint2_768 = __noswap_vsetq_lane_s16(*(int16_t *) &__reint_768, *(int16x8_t *) &__reint1_768, __p2_768); \ | |
| 65424 | __ret_768 = *(float16x8_t *) &__reint2_768; \ | |
| 65425 | __ret_768 = __builtin_shufflevector(__ret_768, __ret_768, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65426 | __ret_768; \ | |
| 67086 | #define vsetq_lane_f16(__p0_860, __p1_860, __p2_860) __extension__ ({ \ | |
| 67087 | float16_t __s0_860 = __p0_860; \ | |
| 67088 | float16x8_t __s1_860 = __p1_860; \ | |
| 67089 | float16x8_t __rev1_860; __rev1_860 = __builtin_shufflevector(__s1_860, __s1_860, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67090 | float16x8_t __ret_860; \ | |
| 67091 | float16_t __reint_860 = __s0_860; \ | |
| 67092 | float16x8_t __reint1_860 = __rev1_860; \ | |
| 67093 | int16x8_t __reint2_860 = __noswap_vsetq_lane_s16(*(int16_t *) &__reint_860, *(int16x8_t *) &__reint1_860, __p2_860); \ | |
| 67094 | __ret_860 = *(float16x8_t *) &__reint2_860; \ | |
| 67095 | __ret_860 = __builtin_shufflevector(__ret_860, __ret_860, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67096 | __ret_860; \ | |
| 65427 | 67097 | }) |
| 65428 | 67098 | #endif |
| 65429 | 67099 | |
| 65430 | 67100 | #if defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) |
| 65431 | 67101 | #ifdef __LITTLE_ENDIAN__ |
| 65432 | #define vbfmlalbq_lane_f32(__p0_769, __p1_769, __p2_769, __p3_769) __extension__ ({ \ | |
| 65433 | float32x4_t __s0_769 = __p0_769; \ | |
| 65434 | bfloat16x8_t __s1_769 = __p1_769; \ | |
| 65435 | bfloat16x4_t __s2_769 = __p2_769; \ | |
| 65436 | float32x4_t __ret_769; \ | |
| 65437 | __ret_769 = vbfmlalbq_f32(__s0_769, __s1_769, (bfloat16x8_t) {vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769), vget_lane_bf16(__s2_769, __p3_769)}); \ | |
| 65438 | __ret_769; \ | |
| 67102 | #define vbfmlalbq_lane_f32(__p0_861, __p1_861, __p2_861, __p3_861) __extension__ ({ \ | |
| 67103 | float32x4_t __s0_861 = __p0_861; \ | |
| 67104 | bfloat16x8_t __s1_861 = __p1_861; \ | |
| 67105 | bfloat16x4_t __s2_861 = __p2_861; \ | |
| 67106 | float32x4_t __ret_861; \ | |
| 67107 | __ret_861 = vbfmlalbq_f32(__s0_861, __s1_861, (bfloat16x8_t) {vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861), vget_lane_bf16(__s2_861, __p3_861)}); \ | |
| 67108 | __ret_861; \ | |
| 65439 | 67109 | }) |
| 65440 | 67110 | #else |
| 65441 | #define vbfmlalbq_lane_f32(__p0_770, __p1_770, __p2_770, __p3_770) __extension__ ({ \ | |
| 65442 | float32x4_t __s0_770 = __p0_770; \ | |
| 65443 | bfloat16x8_t __s1_770 = __p1_770; \ | |
| 65444 | bfloat16x4_t __s2_770 = __p2_770; \ | |
| 65445 | float32x4_t __rev0_770; __rev0_770 = __builtin_shufflevector(__s0_770, __s0_770, 3, 2, 1, 0); \ | |
| 65446 | bfloat16x8_t __rev1_770; __rev1_770 = __builtin_shufflevector(__s1_770, __s1_770, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65447 | bfloat16x4_t __rev2_770; __rev2_770 = __builtin_shufflevector(__s2_770, __s2_770, 3, 2, 1, 0); \ | |
| 65448 | float32x4_t __ret_770; \ | |
| 65449 | __ret_770 = __noswap_vbfmlalbq_f32(__rev0_770, __rev1_770, (bfloat16x8_t) {__noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770), __noswap_vget_lane_bf16(__rev2_770, __p3_770)}); \ | |
| 65450 | __ret_770 = __builtin_shufflevector(__ret_770, __ret_770, 3, 2, 1, 0); \ | |
| 65451 | __ret_770; \ | |
| 67111 | #define vbfmlalbq_lane_f32(__p0_862, __p1_862, __p2_862, __p3_862) __extension__ ({ \ | |
| 67112 | float32x4_t __s0_862 = __p0_862; \ | |
| 67113 | bfloat16x8_t __s1_862 = __p1_862; \ | |
| 67114 | bfloat16x4_t __s2_862 = __p2_862; \ | |
| 67115 | float32x4_t __rev0_862; __rev0_862 = __builtin_shufflevector(__s0_862, __s0_862, 3, 2, 1, 0); \ | |
| 67116 | bfloat16x8_t __rev1_862; __rev1_862 = __builtin_shufflevector(__s1_862, __s1_862, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67117 | bfloat16x4_t __rev2_862; __rev2_862 = __builtin_shufflevector(__s2_862, __s2_862, 3, 2, 1, 0); \ | |
| 67118 | float32x4_t __ret_862; \ | |
| 67119 | __ret_862 = __noswap_vbfmlalbq_f32(__rev0_862, __rev1_862, (bfloat16x8_t) {__noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862), __noswap_vget_lane_bf16(__rev2_862, __p3_862)}); \ | |
| 67120 | __ret_862 = __builtin_shufflevector(__ret_862, __ret_862, 3, 2, 1, 0); \ | |
| 67121 | __ret_862; \ | |
| 65452 | 67122 | }) |
| 65453 | 67123 | #endif |
| 65454 | 67124 | |
| 65455 | 67125 | #ifdef __LITTLE_ENDIAN__ |
| 65456 | #define vbfmlalbq_laneq_f32(__p0_771, __p1_771, __p2_771, __p3_771) __extension__ ({ \ | |
| 65457 | float32x4_t __s0_771 = __p0_771; \ | |
| 65458 | bfloat16x8_t __s1_771 = __p1_771; \ | |
| 65459 | bfloat16x8_t __s2_771 = __p2_771; \ | |
| 65460 | float32x4_t __ret_771; \ | |
| 65461 | __ret_771 = vbfmlalbq_f32(__s0_771, __s1_771, (bfloat16x8_t) {vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771), vgetq_lane_bf16(__s2_771, __p3_771)}); \ | |
| 65462 | __ret_771; \ | |
| 67126 | #define vbfmlalbq_laneq_f32(__p0_863, __p1_863, __p2_863, __p3_863) __extension__ ({ \ | |
| 67127 | float32x4_t __s0_863 = __p0_863; \ | |
| 67128 | bfloat16x8_t __s1_863 = __p1_863; \ | |
| 67129 | bfloat16x8_t __s2_863 = __p2_863; \ | |
| 67130 | float32x4_t __ret_863; \ | |
| 67131 | __ret_863 = vbfmlalbq_f32(__s0_863, __s1_863, (bfloat16x8_t) {vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863), vgetq_lane_bf16(__s2_863, __p3_863)}); \ | |
| 67132 | __ret_863; \ | |
| 65463 | 67133 | }) |
| 65464 | 67134 | #else |
| 65465 | #define vbfmlalbq_laneq_f32(__p0_772, __p1_772, __p2_772, __p3_772) __extension__ ({ \ | |
| 65466 | float32x4_t __s0_772 = __p0_772; \ | |
| 65467 | bfloat16x8_t __s1_772 = __p1_772; \ | |
| 65468 | bfloat16x8_t __s2_772 = __p2_772; \ | |
| 65469 | float32x4_t __rev0_772; __rev0_772 = __builtin_shufflevector(__s0_772, __s0_772, 3, 2, 1, 0); \ | |
| 65470 | bfloat16x8_t __rev1_772; __rev1_772 = __builtin_shufflevector(__s1_772, __s1_772, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65471 | bfloat16x8_t __rev2_772; __rev2_772 = __builtin_shufflevector(__s2_772, __s2_772, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65472 | float32x4_t __ret_772; \ | |
| 65473 | __ret_772 = __noswap_vbfmlalbq_f32(__rev0_772, __rev1_772, (bfloat16x8_t) {__noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772), __noswap_vgetq_lane_bf16(__rev2_772, __p3_772)}); \ | |
| 65474 | __ret_772 = __builtin_shufflevector(__ret_772, __ret_772, 3, 2, 1, 0); \ | |
| 65475 | __ret_772; \ | |
| 67135 | #define vbfmlalbq_laneq_f32(__p0_864, __p1_864, __p2_864, __p3_864) __extension__ ({ \ | |
| 67136 | float32x4_t __s0_864 = __p0_864; \ | |
| 67137 | bfloat16x8_t __s1_864 = __p1_864; \ | |
| 67138 | bfloat16x8_t __s2_864 = __p2_864; \ | |
| 67139 | float32x4_t __rev0_864; __rev0_864 = __builtin_shufflevector(__s0_864, __s0_864, 3, 2, 1, 0); \ | |
| 67140 | bfloat16x8_t __rev1_864; __rev1_864 = __builtin_shufflevector(__s1_864, __s1_864, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67141 | bfloat16x8_t __rev2_864; __rev2_864 = __builtin_shufflevector(__s2_864, __s2_864, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67142 | float32x4_t __ret_864; \ | |
| 67143 | __ret_864 = __noswap_vbfmlalbq_f32(__rev0_864, __rev1_864, (bfloat16x8_t) {__noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864), __noswap_vgetq_lane_bf16(__rev2_864, __p3_864)}); \ | |
| 67144 | __ret_864 = __builtin_shufflevector(__ret_864, __ret_864, 3, 2, 1, 0); \ | |
| 67145 | __ret_864; \ | |
| 65476 | 67146 | }) |
| 65477 | 67147 | #endif |
| 65478 | 67148 | |
| 65479 | 67149 | #ifdef __LITTLE_ENDIAN__ |
| 65480 | #define vbfmlaltq_lane_f32(__p0_773, __p1_773, __p2_773, __p3_773) __extension__ ({ \ | |
| 65481 | float32x4_t __s0_773 = __p0_773; \ | |
| 65482 | bfloat16x8_t __s1_773 = __p1_773; \ | |
| 65483 | bfloat16x4_t __s2_773 = __p2_773; \ | |
| 65484 | float32x4_t __ret_773; \ | |
| 65485 | __ret_773 = vbfmlaltq_f32(__s0_773, __s1_773, (bfloat16x8_t) {vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773), vget_lane_bf16(__s2_773, __p3_773)}); \ | |
| 65486 | __ret_773; \ | |
| 67150 | #define vbfmlaltq_lane_f32(__p0_865, __p1_865, __p2_865, __p3_865) __extension__ ({ \ | |
| 67151 | float32x4_t __s0_865 = __p0_865; \ | |
| 67152 | bfloat16x8_t __s1_865 = __p1_865; \ | |
| 67153 | bfloat16x4_t __s2_865 = __p2_865; \ | |
| 67154 | float32x4_t __ret_865; \ | |
| 67155 | __ret_865 = vbfmlaltq_f32(__s0_865, __s1_865, (bfloat16x8_t) {vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865), vget_lane_bf16(__s2_865, __p3_865)}); \ | |
| 67156 | __ret_865; \ | |
| 65487 | 67157 | }) |
| 65488 | 67158 | #else |
| 65489 | #define vbfmlaltq_lane_f32(__p0_774, __p1_774, __p2_774, __p3_774) __extension__ ({ \ | |
| 65490 | float32x4_t __s0_774 = __p0_774; \ | |
| 65491 | bfloat16x8_t __s1_774 = __p1_774; \ | |
| 65492 | bfloat16x4_t __s2_774 = __p2_774; \ | |
| 65493 | float32x4_t __rev0_774; __rev0_774 = __builtin_shufflevector(__s0_774, __s0_774, 3, 2, 1, 0); \ | |
| 65494 | bfloat16x8_t __rev1_774; __rev1_774 = __builtin_shufflevector(__s1_774, __s1_774, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65495 | bfloat16x4_t __rev2_774; __rev2_774 = __builtin_shufflevector(__s2_774, __s2_774, 3, 2, 1, 0); \ | |
| 65496 | float32x4_t __ret_774; \ | |
| 65497 | __ret_774 = __noswap_vbfmlaltq_f32(__rev0_774, __rev1_774, (bfloat16x8_t) {__noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774), __noswap_vget_lane_bf16(__rev2_774, __p3_774)}); \ | |
| 65498 | __ret_774 = __builtin_shufflevector(__ret_774, __ret_774, 3, 2, 1, 0); \ | |
| 65499 | __ret_774; \ | |
| 67159 | #define vbfmlaltq_lane_f32(__p0_866, __p1_866, __p2_866, __p3_866) __extension__ ({ \ | |
| 67160 | float32x4_t __s0_866 = __p0_866; \ | |
| 67161 | bfloat16x8_t __s1_866 = __p1_866; \ | |
| 67162 | bfloat16x4_t __s2_866 = __p2_866; \ | |
| 67163 | float32x4_t __rev0_866; __rev0_866 = __builtin_shufflevector(__s0_866, __s0_866, 3, 2, 1, 0); \ | |
| 67164 | bfloat16x8_t __rev1_866; __rev1_866 = __builtin_shufflevector(__s1_866, __s1_866, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67165 | bfloat16x4_t __rev2_866; __rev2_866 = __builtin_shufflevector(__s2_866, __s2_866, 3, 2, 1, 0); \ | |
| 67166 | float32x4_t __ret_866; \ | |
| 67167 | __ret_866 = __noswap_vbfmlaltq_f32(__rev0_866, __rev1_866, (bfloat16x8_t) {__noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866), __noswap_vget_lane_bf16(__rev2_866, __p3_866)}); \ | |
| 67168 | __ret_866 = __builtin_shufflevector(__ret_866, __ret_866, 3, 2, 1, 0); \ | |
| 67169 | __ret_866; \ | |
| 65500 | 67170 | }) |
| 65501 | 67171 | #endif |
| 65502 | 67172 | |
| 65503 | 67173 | #ifdef __LITTLE_ENDIAN__ |
| 65504 | #define vbfmlaltq_laneq_f32(__p0_775, __p1_775, __p2_775, __p3_775) __extension__ ({ \ | |
| 65505 | float32x4_t __s0_775 = __p0_775; \ | |
| 65506 | bfloat16x8_t __s1_775 = __p1_775; \ | |
| 65507 | bfloat16x8_t __s2_775 = __p2_775; \ | |
| 65508 | float32x4_t __ret_775; \ | |
| 65509 | __ret_775 = vbfmlaltq_f32(__s0_775, __s1_775, (bfloat16x8_t) {vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775), vgetq_lane_bf16(__s2_775, __p3_775)}); \ | |
| 65510 | __ret_775; \ | |
| 67174 | #define vbfmlaltq_laneq_f32(__p0_867, __p1_867, __p2_867, __p3_867) __extension__ ({ \ | |
| 67175 | float32x4_t __s0_867 = __p0_867; \ | |
| 67176 | bfloat16x8_t __s1_867 = __p1_867; \ | |
| 67177 | bfloat16x8_t __s2_867 = __p2_867; \ | |
| 67178 | float32x4_t __ret_867; \ | |
| 67179 | __ret_867 = vbfmlaltq_f32(__s0_867, __s1_867, (bfloat16x8_t) {vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867), vgetq_lane_bf16(__s2_867, __p3_867)}); \ | |
| 67180 | __ret_867; \ | |
| 65511 | 67181 | }) |
| 65512 | 67182 | #else |
| 65513 | #define vbfmlaltq_laneq_f32(__p0_776, __p1_776, __p2_776, __p3_776) __extension__ ({ \ | |
| 65514 | float32x4_t __s0_776 = __p0_776; \ | |
| 65515 | bfloat16x8_t __s1_776 = __p1_776; \ | |
| 65516 | bfloat16x8_t __s2_776 = __p2_776; \ | |
| 65517 | float32x4_t __rev0_776; __rev0_776 = __builtin_shufflevector(__s0_776, __s0_776, 3, 2, 1, 0); \ | |
| 65518 | bfloat16x8_t __rev1_776; __rev1_776 = __builtin_shufflevector(__s1_776, __s1_776, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65519 | bfloat16x8_t __rev2_776; __rev2_776 = __builtin_shufflevector(__s2_776, __s2_776, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65520 | float32x4_t __ret_776; \ | |
| 65521 | __ret_776 = __noswap_vbfmlaltq_f32(__rev0_776, __rev1_776, (bfloat16x8_t) {__noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776), __noswap_vgetq_lane_bf16(__rev2_776, __p3_776)}); \ | |
| 65522 | __ret_776 = __builtin_shufflevector(__ret_776, __ret_776, 3, 2, 1, 0); \ | |
| 65523 | __ret_776; \ | |
| 67183 | #define vbfmlaltq_laneq_f32(__p0_868, __p1_868, __p2_868, __p3_868) __extension__ ({ \ | |
| 67184 | float32x4_t __s0_868 = __p0_868; \ | |
| 67185 | bfloat16x8_t __s1_868 = __p1_868; \ | |
| 67186 | bfloat16x8_t __s2_868 = __p2_868; \ | |
| 67187 | float32x4_t __rev0_868; __rev0_868 = __builtin_shufflevector(__s0_868, __s0_868, 3, 2, 1, 0); \ | |
| 67188 | bfloat16x8_t __rev1_868; __rev1_868 = __builtin_shufflevector(__s1_868, __s1_868, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67189 | bfloat16x8_t __rev2_868; __rev2_868 = __builtin_shufflevector(__s2_868, __s2_868, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67190 | float32x4_t __ret_868; \ | |
| 67191 | __ret_868 = __noswap_vbfmlaltq_f32(__rev0_868, __rev1_868, (bfloat16x8_t) {__noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868), __noswap_vgetq_lane_bf16(__rev2_868, __p3_868)}); \ | |
| 67192 | __ret_868 = __builtin_shufflevector(__ret_868, __ret_868, 3, 2, 1, 0); \ | |
| 67193 | __ret_868; \ | |
| 65524 | 67194 | }) |
| 65525 | 67195 | #endif |
| 65526 | 67196 | |
| ... | ... | @@ -65559,480 +67229,480 @@ __ai float32x4_t vcvtq_low_f32_bf16(bfloat16x8_t __p0) { |
| 65559 | 67229 | #endif |
| 65560 | 67230 | #if defined(__ARM_FEATURE_FP16FML) && defined(__aarch64__) |
| 65561 | 67231 | #ifdef __LITTLE_ENDIAN__ |
| 65562 | #define vfmlalq_lane_high_f16(__p0_777, __p1_777, __p2_777, __p3_777) __extension__ ({ \ | |
| 65563 | float32x4_t __s0_777 = __p0_777; \ | |
| 65564 | float16x8_t __s1_777 = __p1_777; \ | |
| 65565 | float16x4_t __s2_777 = __p2_777; \ | |
| 65566 | float32x4_t __ret_777; \ | |
| 65567 | __ret_777 = vfmlalq_high_f16(__s0_777, __s1_777, (float16x8_t) {vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777), vget_lane_f16(__s2_777, __p3_777)}); \ | |
| 65568 | __ret_777; \ | |
| 67232 | #define vfmlalq_lane_high_f16(__p0_869, __p1_869, __p2_869, __p3_869) __extension__ ({ \ | |
| 67233 | float32x4_t __s0_869 = __p0_869; \ | |
| 67234 | float16x8_t __s1_869 = __p1_869; \ | |
| 67235 | float16x4_t __s2_869 = __p2_869; \ | |
| 67236 | float32x4_t __ret_869; \ | |
| 67237 | __ret_869 = vfmlalq_high_f16(__s0_869, __s1_869, (float16x8_t) {vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869), vget_lane_f16(__s2_869, __p3_869)}); \ | |
| 67238 | __ret_869; \ | |
| 65569 | 67239 | }) |
| 65570 | 67240 | #else |
| 65571 | #define vfmlalq_lane_high_f16(__p0_778, __p1_778, __p2_778, __p3_778) __extension__ ({ \ | |
| 65572 | float32x4_t __s0_778 = __p0_778; \ | |
| 65573 | float16x8_t __s1_778 = __p1_778; \ | |
| 65574 | float16x4_t __s2_778 = __p2_778; \ | |
| 65575 | float32x4_t __rev0_778; __rev0_778 = __builtin_shufflevector(__s0_778, __s0_778, 3, 2, 1, 0); \ | |
| 65576 | float16x8_t __rev1_778; __rev1_778 = __builtin_shufflevector(__s1_778, __s1_778, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65577 | float16x4_t __rev2_778; __rev2_778 = __builtin_shufflevector(__s2_778, __s2_778, 3, 2, 1, 0); \ | |
| 65578 | float32x4_t __ret_778; \ | |
| 65579 | __ret_778 = __noswap_vfmlalq_high_f16(__rev0_778, __rev1_778, (float16x8_t) {__noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778), __noswap_vget_lane_f16(__rev2_778, __p3_778)}); \ | |
| 65580 | __ret_778 = __builtin_shufflevector(__ret_778, __ret_778, 3, 2, 1, 0); \ | |
| 65581 | __ret_778; \ | |
| 67241 | #define vfmlalq_lane_high_f16(__p0_870, __p1_870, __p2_870, __p3_870) __extension__ ({ \ | |
| 67242 | float32x4_t __s0_870 = __p0_870; \ | |
| 67243 | float16x8_t __s1_870 = __p1_870; \ | |
| 67244 | float16x4_t __s2_870 = __p2_870; \ | |
| 67245 | float32x4_t __rev0_870; __rev0_870 = __builtin_shufflevector(__s0_870, __s0_870, 3, 2, 1, 0); \ | |
| 67246 | float16x8_t __rev1_870; __rev1_870 = __builtin_shufflevector(__s1_870, __s1_870, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67247 | float16x4_t __rev2_870; __rev2_870 = __builtin_shufflevector(__s2_870, __s2_870, 3, 2, 1, 0); \ | |
| 67248 | float32x4_t __ret_870; \ | |
| 67249 | __ret_870 = __noswap_vfmlalq_high_f16(__rev0_870, __rev1_870, (float16x8_t) {__noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870), __noswap_vget_lane_f16(__rev2_870, __p3_870)}); \ | |
| 67250 | __ret_870 = __builtin_shufflevector(__ret_870, __ret_870, 3, 2, 1, 0); \ | |
| 67251 | __ret_870; \ | |
| 65582 | 67252 | }) |
| 65583 | 67253 | #endif |
| 65584 | 67254 | |
| 65585 | 67255 | #ifdef __LITTLE_ENDIAN__ |
| 65586 | #define vfmlal_lane_high_f16(__p0_779, __p1_779, __p2_779, __p3_779) __extension__ ({ \ | |
| 65587 | float32x2_t __s0_779 = __p0_779; \ | |
| 65588 | float16x4_t __s1_779 = __p1_779; \ | |
| 65589 | float16x4_t __s2_779 = __p2_779; \ | |
| 65590 | float32x2_t __ret_779; \ | |
| 65591 | __ret_779 = vfmlal_high_f16(__s0_779, __s1_779, (float16x4_t) {vget_lane_f16(__s2_779, __p3_779), vget_lane_f16(__s2_779, __p3_779), vget_lane_f16(__s2_779, __p3_779), vget_lane_f16(__s2_779, __p3_779)}); \ | |
| 65592 | __ret_779; \ | |
| 67256 | #define vfmlal_lane_high_f16(__p0_871, __p1_871, __p2_871, __p3_871) __extension__ ({ \ | |
| 67257 | float32x2_t __s0_871 = __p0_871; \ | |
| 67258 | float16x4_t __s1_871 = __p1_871; \ | |
| 67259 | float16x4_t __s2_871 = __p2_871; \ | |
| 67260 | float32x2_t __ret_871; \ | |
| 67261 | __ret_871 = vfmlal_high_f16(__s0_871, __s1_871, (float16x4_t) {vget_lane_f16(__s2_871, __p3_871), vget_lane_f16(__s2_871, __p3_871), vget_lane_f16(__s2_871, __p3_871), vget_lane_f16(__s2_871, __p3_871)}); \ | |
| 67262 | __ret_871; \ | |
| 65593 | 67263 | }) |
| 65594 | 67264 | #else |
| 65595 | #define vfmlal_lane_high_f16(__p0_780, __p1_780, __p2_780, __p3_780) __extension__ ({ \ | |
| 65596 | float32x2_t __s0_780 = __p0_780; \ | |
| 65597 | float16x4_t __s1_780 = __p1_780; \ | |
| 65598 | float16x4_t __s2_780 = __p2_780; \ | |
| 65599 | float32x2_t __rev0_780; __rev0_780 = __builtin_shufflevector(__s0_780, __s0_780, 1, 0); \ | |
| 65600 | float16x4_t __rev1_780; __rev1_780 = __builtin_shufflevector(__s1_780, __s1_780, 3, 2, 1, 0); \ | |
| 65601 | float16x4_t __rev2_780; __rev2_780 = __builtin_shufflevector(__s2_780, __s2_780, 3, 2, 1, 0); \ | |
| 65602 | float32x2_t __ret_780; \ | |
| 65603 | __ret_780 = __noswap_vfmlal_high_f16(__rev0_780, __rev1_780, (float16x4_t) {__noswap_vget_lane_f16(__rev2_780, __p3_780), __noswap_vget_lane_f16(__rev2_780, __p3_780), __noswap_vget_lane_f16(__rev2_780, __p3_780), __noswap_vget_lane_f16(__rev2_780, __p3_780)}); \ | |
| 65604 | __ret_780 = __builtin_shufflevector(__ret_780, __ret_780, 1, 0); \ | |
| 65605 | __ret_780; \ | |
| 67265 | #define vfmlal_lane_high_f16(__p0_872, __p1_872, __p2_872, __p3_872) __extension__ ({ \ | |
| 67266 | float32x2_t __s0_872 = __p0_872; \ | |
| 67267 | float16x4_t __s1_872 = __p1_872; \ | |
| 67268 | float16x4_t __s2_872 = __p2_872; \ | |
| 67269 | float32x2_t __rev0_872; __rev0_872 = __builtin_shufflevector(__s0_872, __s0_872, 1, 0); \ | |
| 67270 | float16x4_t __rev1_872; __rev1_872 = __builtin_shufflevector(__s1_872, __s1_872, 3, 2, 1, 0); \ | |
| 67271 | float16x4_t __rev2_872; __rev2_872 = __builtin_shufflevector(__s2_872, __s2_872, 3, 2, 1, 0); \ | |
| 67272 | float32x2_t __ret_872; \ | |
| 67273 | __ret_872 = __noswap_vfmlal_high_f16(__rev0_872, __rev1_872, (float16x4_t) {__noswap_vget_lane_f16(__rev2_872, __p3_872), __noswap_vget_lane_f16(__rev2_872, __p3_872), __noswap_vget_lane_f16(__rev2_872, __p3_872), __noswap_vget_lane_f16(__rev2_872, __p3_872)}); \ | |
| 67274 | __ret_872 = __builtin_shufflevector(__ret_872, __ret_872, 1, 0); \ | |
| 67275 | __ret_872; \ | |
| 65606 | 67276 | }) |
| 65607 | 67277 | #endif |
| 65608 | 67278 | |
| 65609 | 67279 | #ifdef __LITTLE_ENDIAN__ |
| 65610 | #define vfmlalq_lane_low_f16(__p0_781, __p1_781, __p2_781, __p3_781) __extension__ ({ \ | |
| 65611 | float32x4_t __s0_781 = __p0_781; \ | |
| 65612 | float16x8_t __s1_781 = __p1_781; \ | |
| 65613 | float16x4_t __s2_781 = __p2_781; \ | |
| 65614 | float32x4_t __ret_781; \ | |
| 65615 | __ret_781 = vfmlalq_low_f16(__s0_781, __s1_781, (float16x8_t) {vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781), vget_lane_f16(__s2_781, __p3_781)}); \ | |
| 65616 | __ret_781; \ | |
| 67280 | #define vfmlalq_lane_low_f16(__p0_873, __p1_873, __p2_873, __p3_873) __extension__ ({ \ | |
| 67281 | float32x4_t __s0_873 = __p0_873; \ | |
| 67282 | float16x8_t __s1_873 = __p1_873; \ | |
| 67283 | float16x4_t __s2_873 = __p2_873; \ | |
| 67284 | float32x4_t __ret_873; \ | |
| 67285 | __ret_873 = vfmlalq_low_f16(__s0_873, __s1_873, (float16x8_t) {vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873), vget_lane_f16(__s2_873, __p3_873)}); \ | |
| 67286 | __ret_873; \ | |
| 65617 | 67287 | }) |
| 65618 | 67288 | #else |
| 65619 | #define vfmlalq_lane_low_f16(__p0_782, __p1_782, __p2_782, __p3_782) __extension__ ({ \ | |
| 65620 | float32x4_t __s0_782 = __p0_782; \ | |
| 65621 | float16x8_t __s1_782 = __p1_782; \ | |
| 65622 | float16x4_t __s2_782 = __p2_782; \ | |
| 65623 | float32x4_t __rev0_782; __rev0_782 = __builtin_shufflevector(__s0_782, __s0_782, 3, 2, 1, 0); \ | |
| 65624 | float16x8_t __rev1_782; __rev1_782 = __builtin_shufflevector(__s1_782, __s1_782, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65625 | float16x4_t __rev2_782; __rev2_782 = __builtin_shufflevector(__s2_782, __s2_782, 3, 2, 1, 0); \ | |
| 65626 | float32x4_t __ret_782; \ | |
| 65627 | __ret_782 = __noswap_vfmlalq_low_f16(__rev0_782, __rev1_782, (float16x8_t) {__noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782), __noswap_vget_lane_f16(__rev2_782, __p3_782)}); \ | |
| 65628 | __ret_782 = __builtin_shufflevector(__ret_782, __ret_782, 3, 2, 1, 0); \ | |
| 65629 | __ret_782; \ | |
| 67289 | #define vfmlalq_lane_low_f16(__p0_874, __p1_874, __p2_874, __p3_874) __extension__ ({ \ | |
| 67290 | float32x4_t __s0_874 = __p0_874; \ | |
| 67291 | float16x8_t __s1_874 = __p1_874; \ | |
| 67292 | float16x4_t __s2_874 = __p2_874; \ | |
| 67293 | float32x4_t __rev0_874; __rev0_874 = __builtin_shufflevector(__s0_874, __s0_874, 3, 2, 1, 0); \ | |
| 67294 | float16x8_t __rev1_874; __rev1_874 = __builtin_shufflevector(__s1_874, __s1_874, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67295 | float16x4_t __rev2_874; __rev2_874 = __builtin_shufflevector(__s2_874, __s2_874, 3, 2, 1, 0); \ | |
| 67296 | float32x4_t __ret_874; \ | |
| 67297 | __ret_874 = __noswap_vfmlalq_low_f16(__rev0_874, __rev1_874, (float16x8_t) {__noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874), __noswap_vget_lane_f16(__rev2_874, __p3_874)}); \ | |
| 67298 | __ret_874 = __builtin_shufflevector(__ret_874, __ret_874, 3, 2, 1, 0); \ | |
| 67299 | __ret_874; \ | |
| 65630 | 67300 | }) |
| 65631 | 67301 | #endif |
| 65632 | 67302 | |
| 65633 | 67303 | #ifdef __LITTLE_ENDIAN__ |
| 65634 | #define vfmlal_lane_low_f16(__p0_783, __p1_783, __p2_783, __p3_783) __extension__ ({ \ | |
| 65635 | float32x2_t __s0_783 = __p0_783; \ | |
| 65636 | float16x4_t __s1_783 = __p1_783; \ | |
| 65637 | float16x4_t __s2_783 = __p2_783; \ | |
| 65638 | float32x2_t __ret_783; \ | |
| 65639 | __ret_783 = vfmlal_low_f16(__s0_783, __s1_783, (float16x4_t) {vget_lane_f16(__s2_783, __p3_783), vget_lane_f16(__s2_783, __p3_783), vget_lane_f16(__s2_783, __p3_783), vget_lane_f16(__s2_783, __p3_783)}); \ | |
| 65640 | __ret_783; \ | |
| 67304 | #define vfmlal_lane_low_f16(__p0_875, __p1_875, __p2_875, __p3_875) __extension__ ({ \ | |
| 67305 | float32x2_t __s0_875 = __p0_875; \ | |
| 67306 | float16x4_t __s1_875 = __p1_875; \ | |
| 67307 | float16x4_t __s2_875 = __p2_875; \ | |
| 67308 | float32x2_t __ret_875; \ | |
| 67309 | __ret_875 = vfmlal_low_f16(__s0_875, __s1_875, (float16x4_t) {vget_lane_f16(__s2_875, __p3_875), vget_lane_f16(__s2_875, __p3_875), vget_lane_f16(__s2_875, __p3_875), vget_lane_f16(__s2_875, __p3_875)}); \ | |
| 67310 | __ret_875; \ | |
| 65641 | 67311 | }) |
| 65642 | 67312 | #else |
| 65643 | #define vfmlal_lane_low_f16(__p0_784, __p1_784, __p2_784, __p3_784) __extension__ ({ \ | |
| 65644 | float32x2_t __s0_784 = __p0_784; \ | |
| 65645 | float16x4_t __s1_784 = __p1_784; \ | |
| 65646 | float16x4_t __s2_784 = __p2_784; \ | |
| 65647 | float32x2_t __rev0_784; __rev0_784 = __builtin_shufflevector(__s0_784, __s0_784, 1, 0); \ | |
| 65648 | float16x4_t __rev1_784; __rev1_784 = __builtin_shufflevector(__s1_784, __s1_784, 3, 2, 1, 0); \ | |
| 65649 | float16x4_t __rev2_784; __rev2_784 = __builtin_shufflevector(__s2_784, __s2_784, 3, 2, 1, 0); \ | |
| 65650 | float32x2_t __ret_784; \ | |
| 65651 | __ret_784 = __noswap_vfmlal_low_f16(__rev0_784, __rev1_784, (float16x4_t) {__noswap_vget_lane_f16(__rev2_784, __p3_784), __noswap_vget_lane_f16(__rev2_784, __p3_784), __noswap_vget_lane_f16(__rev2_784, __p3_784), __noswap_vget_lane_f16(__rev2_784, __p3_784)}); \ | |
| 65652 | __ret_784 = __builtin_shufflevector(__ret_784, __ret_784, 1, 0); \ | |
| 65653 | __ret_784; \ | |
| 67313 | #define vfmlal_lane_low_f16(__p0_876, __p1_876, __p2_876, __p3_876) __extension__ ({ \ | |
| 67314 | float32x2_t __s0_876 = __p0_876; \ | |
| 67315 | float16x4_t __s1_876 = __p1_876; \ | |
| 67316 | float16x4_t __s2_876 = __p2_876; \ | |
| 67317 | float32x2_t __rev0_876; __rev0_876 = __builtin_shufflevector(__s0_876, __s0_876, 1, 0); \ | |
| 67318 | float16x4_t __rev1_876; __rev1_876 = __builtin_shufflevector(__s1_876, __s1_876, 3, 2, 1, 0); \ | |
| 67319 | float16x4_t __rev2_876; __rev2_876 = __builtin_shufflevector(__s2_876, __s2_876, 3, 2, 1, 0); \ | |
| 67320 | float32x2_t __ret_876; \ | |
| 67321 | __ret_876 = __noswap_vfmlal_low_f16(__rev0_876, __rev1_876, (float16x4_t) {__noswap_vget_lane_f16(__rev2_876, __p3_876), __noswap_vget_lane_f16(__rev2_876, __p3_876), __noswap_vget_lane_f16(__rev2_876, __p3_876), __noswap_vget_lane_f16(__rev2_876, __p3_876)}); \ | |
| 67322 | __ret_876 = __builtin_shufflevector(__ret_876, __ret_876, 1, 0); \ | |
| 67323 | __ret_876; \ | |
| 65654 | 67324 | }) |
| 65655 | 67325 | #endif |
| 65656 | 67326 | |
| 65657 | 67327 | #ifdef __LITTLE_ENDIAN__ |
| 65658 | #define vfmlalq_laneq_high_f16(__p0_785, __p1_785, __p2_785, __p3_785) __extension__ ({ \ | |
| 65659 | float32x4_t __s0_785 = __p0_785; \ | |
| 65660 | float16x8_t __s1_785 = __p1_785; \ | |
| 65661 | float16x8_t __s2_785 = __p2_785; \ | |
| 65662 | float32x4_t __ret_785; \ | |
| 65663 | __ret_785 = vfmlalq_high_f16(__s0_785, __s1_785, (float16x8_t) {vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785), vgetq_lane_f16(__s2_785, __p3_785)}); \ | |
| 65664 | __ret_785; \ | |
| 67328 | #define vfmlalq_laneq_high_f16(__p0_877, __p1_877, __p2_877, __p3_877) __extension__ ({ \ | |
| 67329 | float32x4_t __s0_877 = __p0_877; \ | |
| 67330 | float16x8_t __s1_877 = __p1_877; \ | |
| 67331 | float16x8_t __s2_877 = __p2_877; \ | |
| 67332 | float32x4_t __ret_877; \ | |
| 67333 | __ret_877 = vfmlalq_high_f16(__s0_877, __s1_877, (float16x8_t) {vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877), vgetq_lane_f16(__s2_877, __p3_877)}); \ | |
| 67334 | __ret_877; \ | |
| 65665 | 67335 | }) |
| 65666 | 67336 | #else |
| 65667 | #define vfmlalq_laneq_high_f16(__p0_786, __p1_786, __p2_786, __p3_786) __extension__ ({ \ | |
| 65668 | float32x4_t __s0_786 = __p0_786; \ | |
| 65669 | float16x8_t __s1_786 = __p1_786; \ | |
| 65670 | float16x8_t __s2_786 = __p2_786; \ | |
| 65671 | float32x4_t __rev0_786; __rev0_786 = __builtin_shufflevector(__s0_786, __s0_786, 3, 2, 1, 0); \ | |
| 65672 | float16x8_t __rev1_786; __rev1_786 = __builtin_shufflevector(__s1_786, __s1_786, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65673 | float16x8_t __rev2_786; __rev2_786 = __builtin_shufflevector(__s2_786, __s2_786, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65674 | float32x4_t __ret_786; \ | |
| 65675 | __ret_786 = __noswap_vfmlalq_high_f16(__rev0_786, __rev1_786, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786), __noswap_vgetq_lane_f16(__rev2_786, __p3_786)}); \ | |
| 65676 | __ret_786 = __builtin_shufflevector(__ret_786, __ret_786, 3, 2, 1, 0); \ | |
| 65677 | __ret_786; \ | |
| 67337 | #define vfmlalq_laneq_high_f16(__p0_878, __p1_878, __p2_878, __p3_878) __extension__ ({ \ | |
| 67338 | float32x4_t __s0_878 = __p0_878; \ | |
| 67339 | float16x8_t __s1_878 = __p1_878; \ | |
| 67340 | float16x8_t __s2_878 = __p2_878; \ | |
| 67341 | float32x4_t __rev0_878; __rev0_878 = __builtin_shufflevector(__s0_878, __s0_878, 3, 2, 1, 0); \ | |
| 67342 | float16x8_t __rev1_878; __rev1_878 = __builtin_shufflevector(__s1_878, __s1_878, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67343 | float16x8_t __rev2_878; __rev2_878 = __builtin_shufflevector(__s2_878, __s2_878, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67344 | float32x4_t __ret_878; \ | |
| 67345 | __ret_878 = __noswap_vfmlalq_high_f16(__rev0_878, __rev1_878, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878), __noswap_vgetq_lane_f16(__rev2_878, __p3_878)}); \ | |
| 67346 | __ret_878 = __builtin_shufflevector(__ret_878, __ret_878, 3, 2, 1, 0); \ | |
| 67347 | __ret_878; \ | |
| 65678 | 67348 | }) |
| 65679 | 67349 | #endif |
| 65680 | 67350 | |
| 65681 | 67351 | #ifdef __LITTLE_ENDIAN__ |
| 65682 | #define vfmlal_laneq_high_f16(__p0_787, __p1_787, __p2_787, __p3_787) __extension__ ({ \ | |
| 65683 | float32x2_t __s0_787 = __p0_787; \ | |
| 65684 | float16x4_t __s1_787 = __p1_787; \ | |
| 65685 | float16x8_t __s2_787 = __p2_787; \ | |
| 65686 | float32x2_t __ret_787; \ | |
| 65687 | __ret_787 = vfmlal_high_f16(__s0_787, __s1_787, (float16x4_t) {vgetq_lane_f16(__s2_787, __p3_787), vgetq_lane_f16(__s2_787, __p3_787), vgetq_lane_f16(__s2_787, __p3_787), vgetq_lane_f16(__s2_787, __p3_787)}); \ | |
| 65688 | __ret_787; \ | |
| 67352 | #define vfmlal_laneq_high_f16(__p0_879, __p1_879, __p2_879, __p3_879) __extension__ ({ \ | |
| 67353 | float32x2_t __s0_879 = __p0_879; \ | |
| 67354 | float16x4_t __s1_879 = __p1_879; \ | |
| 67355 | float16x8_t __s2_879 = __p2_879; \ | |
| 67356 | float32x2_t __ret_879; \ | |
| 67357 | __ret_879 = vfmlal_high_f16(__s0_879, __s1_879, (float16x4_t) {vgetq_lane_f16(__s2_879, __p3_879), vgetq_lane_f16(__s2_879, __p3_879), vgetq_lane_f16(__s2_879, __p3_879), vgetq_lane_f16(__s2_879, __p3_879)}); \ | |
| 67358 | __ret_879; \ | |
| 65689 | 67359 | }) |
| 65690 | 67360 | #else |
| 65691 | #define vfmlal_laneq_high_f16(__p0_788, __p1_788, __p2_788, __p3_788) __extension__ ({ \ | |
| 65692 | float32x2_t __s0_788 = __p0_788; \ | |
| 65693 | float16x4_t __s1_788 = __p1_788; \ | |
| 65694 | float16x8_t __s2_788 = __p2_788; \ | |
| 65695 | float32x2_t __rev0_788; __rev0_788 = __builtin_shufflevector(__s0_788, __s0_788, 1, 0); \ | |
| 65696 | float16x4_t __rev1_788; __rev1_788 = __builtin_shufflevector(__s1_788, __s1_788, 3, 2, 1, 0); \ | |
| 65697 | float16x8_t __rev2_788; __rev2_788 = __builtin_shufflevector(__s2_788, __s2_788, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65698 | float32x2_t __ret_788; \ | |
| 65699 | __ret_788 = __noswap_vfmlal_high_f16(__rev0_788, __rev1_788, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_788, __p3_788), __noswap_vgetq_lane_f16(__rev2_788, __p3_788), __noswap_vgetq_lane_f16(__rev2_788, __p3_788), __noswap_vgetq_lane_f16(__rev2_788, __p3_788)}); \ | |
| 65700 | __ret_788 = __builtin_shufflevector(__ret_788, __ret_788, 1, 0); \ | |
| 65701 | __ret_788; \ | |
| 67361 | #define vfmlal_laneq_high_f16(__p0_880, __p1_880, __p2_880, __p3_880) __extension__ ({ \ | |
| 67362 | float32x2_t __s0_880 = __p0_880; \ | |
| 67363 | float16x4_t __s1_880 = __p1_880; \ | |
| 67364 | float16x8_t __s2_880 = __p2_880; \ | |
| 67365 | float32x2_t __rev0_880; __rev0_880 = __builtin_shufflevector(__s0_880, __s0_880, 1, 0); \ | |
| 67366 | float16x4_t __rev1_880; __rev1_880 = __builtin_shufflevector(__s1_880, __s1_880, 3, 2, 1, 0); \ | |
| 67367 | float16x8_t __rev2_880; __rev2_880 = __builtin_shufflevector(__s2_880, __s2_880, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67368 | float32x2_t __ret_880; \ | |
| 67369 | __ret_880 = __noswap_vfmlal_high_f16(__rev0_880, __rev1_880, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_880, __p3_880), __noswap_vgetq_lane_f16(__rev2_880, __p3_880), __noswap_vgetq_lane_f16(__rev2_880, __p3_880), __noswap_vgetq_lane_f16(__rev2_880, __p3_880)}); \ | |
| 67370 | __ret_880 = __builtin_shufflevector(__ret_880, __ret_880, 1, 0); \ | |
| 67371 | __ret_880; \ | |
| 65702 | 67372 | }) |
| 65703 | 67373 | #endif |
| 65704 | 67374 | |
| 65705 | 67375 | #ifdef __LITTLE_ENDIAN__ |
| 65706 | #define vfmlalq_laneq_low_f16(__p0_789, __p1_789, __p2_789, __p3_789) __extension__ ({ \ | |
| 65707 | float32x4_t __s0_789 = __p0_789; \ | |
| 65708 | float16x8_t __s1_789 = __p1_789; \ | |
| 65709 | float16x8_t __s2_789 = __p2_789; \ | |
| 65710 | float32x4_t __ret_789; \ | |
| 65711 | __ret_789 = vfmlalq_low_f16(__s0_789, __s1_789, (float16x8_t) {vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789), vgetq_lane_f16(__s2_789, __p3_789)}); \ | |
| 65712 | __ret_789; \ | |
| 67376 | #define vfmlalq_laneq_low_f16(__p0_881, __p1_881, __p2_881, __p3_881) __extension__ ({ \ | |
| 67377 | float32x4_t __s0_881 = __p0_881; \ | |
| 67378 | float16x8_t __s1_881 = __p1_881; \ | |
| 67379 | float16x8_t __s2_881 = __p2_881; \ | |
| 67380 | float32x4_t __ret_881; \ | |
| 67381 | __ret_881 = vfmlalq_low_f16(__s0_881, __s1_881, (float16x8_t) {vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881), vgetq_lane_f16(__s2_881, __p3_881)}); \ | |
| 67382 | __ret_881; \ | |
| 65713 | 67383 | }) |
| 65714 | 67384 | #else |
| 65715 | #define vfmlalq_laneq_low_f16(__p0_790, __p1_790, __p2_790, __p3_790) __extension__ ({ \ | |
| 65716 | float32x4_t __s0_790 = __p0_790; \ | |
| 65717 | float16x8_t __s1_790 = __p1_790; \ | |
| 65718 | float16x8_t __s2_790 = __p2_790; \ | |
| 65719 | float32x4_t __rev0_790; __rev0_790 = __builtin_shufflevector(__s0_790, __s0_790, 3, 2, 1, 0); \ | |
| 65720 | float16x8_t __rev1_790; __rev1_790 = __builtin_shufflevector(__s1_790, __s1_790, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65721 | float16x8_t __rev2_790; __rev2_790 = __builtin_shufflevector(__s2_790, __s2_790, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65722 | float32x4_t __ret_790; \ | |
| 65723 | __ret_790 = __noswap_vfmlalq_low_f16(__rev0_790, __rev1_790, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790), __noswap_vgetq_lane_f16(__rev2_790, __p3_790)}); \ | |
| 65724 | __ret_790 = __builtin_shufflevector(__ret_790, __ret_790, 3, 2, 1, 0); \ | |
| 65725 | __ret_790; \ | |
| 67385 | #define vfmlalq_laneq_low_f16(__p0_882, __p1_882, __p2_882, __p3_882) __extension__ ({ \ | |
| 67386 | float32x4_t __s0_882 = __p0_882; \ | |
| 67387 | float16x8_t __s1_882 = __p1_882; \ | |
| 67388 | float16x8_t __s2_882 = __p2_882; \ | |
| 67389 | float32x4_t __rev0_882; __rev0_882 = __builtin_shufflevector(__s0_882, __s0_882, 3, 2, 1, 0); \ | |
| 67390 | float16x8_t __rev1_882; __rev1_882 = __builtin_shufflevector(__s1_882, __s1_882, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67391 | float16x8_t __rev2_882; __rev2_882 = __builtin_shufflevector(__s2_882, __s2_882, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67392 | float32x4_t __ret_882; \ | |
| 67393 | __ret_882 = __noswap_vfmlalq_low_f16(__rev0_882, __rev1_882, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882), __noswap_vgetq_lane_f16(__rev2_882, __p3_882)}); \ | |
| 67394 | __ret_882 = __builtin_shufflevector(__ret_882, __ret_882, 3, 2, 1, 0); \ | |
| 67395 | __ret_882; \ | |
| 65726 | 67396 | }) |
| 65727 | 67397 | #endif |
| 65728 | 67398 | |
| 65729 | 67399 | #ifdef __LITTLE_ENDIAN__ |
| 65730 | #define vfmlal_laneq_low_f16(__p0_791, __p1_791, __p2_791, __p3_791) __extension__ ({ \ | |
| 65731 | float32x2_t __s0_791 = __p0_791; \ | |
| 65732 | float16x4_t __s1_791 = __p1_791; \ | |
| 65733 | float16x8_t __s2_791 = __p2_791; \ | |
| 65734 | float32x2_t __ret_791; \ | |
| 65735 | __ret_791 = vfmlal_low_f16(__s0_791, __s1_791, (float16x4_t) {vgetq_lane_f16(__s2_791, __p3_791), vgetq_lane_f16(__s2_791, __p3_791), vgetq_lane_f16(__s2_791, __p3_791), vgetq_lane_f16(__s2_791, __p3_791)}); \ | |
| 65736 | __ret_791; \ | |
| 67400 | #define vfmlal_laneq_low_f16(__p0_883, __p1_883, __p2_883, __p3_883) __extension__ ({ \ | |
| 67401 | float32x2_t __s0_883 = __p0_883; \ | |
| 67402 | float16x4_t __s1_883 = __p1_883; \ | |
| 67403 | float16x8_t __s2_883 = __p2_883; \ | |
| 67404 | float32x2_t __ret_883; \ | |
| 67405 | __ret_883 = vfmlal_low_f16(__s0_883, __s1_883, (float16x4_t) {vgetq_lane_f16(__s2_883, __p3_883), vgetq_lane_f16(__s2_883, __p3_883), vgetq_lane_f16(__s2_883, __p3_883), vgetq_lane_f16(__s2_883, __p3_883)}); \ | |
| 67406 | __ret_883; \ | |
| 65737 | 67407 | }) |
| 65738 | 67408 | #else |
| 65739 | #define vfmlal_laneq_low_f16(__p0_792, __p1_792, __p2_792, __p3_792) __extension__ ({ \ | |
| 65740 | float32x2_t __s0_792 = __p0_792; \ | |
| 65741 | float16x4_t __s1_792 = __p1_792; \ | |
| 65742 | float16x8_t __s2_792 = __p2_792; \ | |
| 65743 | float32x2_t __rev0_792; __rev0_792 = __builtin_shufflevector(__s0_792, __s0_792, 1, 0); \ | |
| 65744 | float16x4_t __rev1_792; __rev1_792 = __builtin_shufflevector(__s1_792, __s1_792, 3, 2, 1, 0); \ | |
| 65745 | float16x8_t __rev2_792; __rev2_792 = __builtin_shufflevector(__s2_792, __s2_792, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65746 | float32x2_t __ret_792; \ | |
| 65747 | __ret_792 = __noswap_vfmlal_low_f16(__rev0_792, __rev1_792, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_792, __p3_792), __noswap_vgetq_lane_f16(__rev2_792, __p3_792), __noswap_vgetq_lane_f16(__rev2_792, __p3_792), __noswap_vgetq_lane_f16(__rev2_792, __p3_792)}); \ | |
| 65748 | __ret_792 = __builtin_shufflevector(__ret_792, __ret_792, 1, 0); \ | |
| 65749 | __ret_792; \ | |
| 67409 | #define vfmlal_laneq_low_f16(__p0_884, __p1_884, __p2_884, __p3_884) __extension__ ({ \ | |
| 67410 | float32x2_t __s0_884 = __p0_884; \ | |
| 67411 | float16x4_t __s1_884 = __p1_884; \ | |
| 67412 | float16x8_t __s2_884 = __p2_884; \ | |
| 67413 | float32x2_t __rev0_884; __rev0_884 = __builtin_shufflevector(__s0_884, __s0_884, 1, 0); \ | |
| 67414 | float16x4_t __rev1_884; __rev1_884 = __builtin_shufflevector(__s1_884, __s1_884, 3, 2, 1, 0); \ | |
| 67415 | float16x8_t __rev2_884; __rev2_884 = __builtin_shufflevector(__s2_884, __s2_884, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67416 | float32x2_t __ret_884; \ | |
| 67417 | __ret_884 = __noswap_vfmlal_low_f16(__rev0_884, __rev1_884, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_884, __p3_884), __noswap_vgetq_lane_f16(__rev2_884, __p3_884), __noswap_vgetq_lane_f16(__rev2_884, __p3_884), __noswap_vgetq_lane_f16(__rev2_884, __p3_884)}); \ | |
| 67418 | __ret_884 = __builtin_shufflevector(__ret_884, __ret_884, 1, 0); \ | |
| 67419 | __ret_884; \ | |
| 65750 | 67420 | }) |
| 65751 | 67421 | #endif |
| 65752 | 67422 | |
| 65753 | 67423 | #ifdef __LITTLE_ENDIAN__ |
| 65754 | #define vfmlslq_lane_high_f16(__p0_793, __p1_793, __p2_793, __p3_793) __extension__ ({ \ | |
| 65755 | float32x4_t __s0_793 = __p0_793; \ | |
| 65756 | float16x8_t __s1_793 = __p1_793; \ | |
| 65757 | float16x4_t __s2_793 = __p2_793; \ | |
| 65758 | float32x4_t __ret_793; \ | |
| 65759 | __ret_793 = vfmlslq_high_f16(__s0_793, __s1_793, (float16x8_t) {vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793), vget_lane_f16(__s2_793, __p3_793)}); \ | |
| 65760 | __ret_793; \ | |
| 67424 | #define vfmlslq_lane_high_f16(__p0_885, __p1_885, __p2_885, __p3_885) __extension__ ({ \ | |
| 67425 | float32x4_t __s0_885 = __p0_885; \ | |
| 67426 | float16x8_t __s1_885 = __p1_885; \ | |
| 67427 | float16x4_t __s2_885 = __p2_885; \ | |
| 67428 | float32x4_t __ret_885; \ | |
| 67429 | __ret_885 = vfmlslq_high_f16(__s0_885, __s1_885, (float16x8_t) {vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885), vget_lane_f16(__s2_885, __p3_885)}); \ | |
| 67430 | __ret_885; \ | |
| 65761 | 67431 | }) |
| 65762 | 67432 | #else |
| 65763 | #define vfmlslq_lane_high_f16(__p0_794, __p1_794, __p2_794, __p3_794) __extension__ ({ \ | |
| 65764 | float32x4_t __s0_794 = __p0_794; \ | |
| 65765 | float16x8_t __s1_794 = __p1_794; \ | |
| 65766 | float16x4_t __s2_794 = __p2_794; \ | |
| 65767 | float32x4_t __rev0_794; __rev0_794 = __builtin_shufflevector(__s0_794, __s0_794, 3, 2, 1, 0); \ | |
| 65768 | float16x8_t __rev1_794; __rev1_794 = __builtin_shufflevector(__s1_794, __s1_794, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65769 | float16x4_t __rev2_794; __rev2_794 = __builtin_shufflevector(__s2_794, __s2_794, 3, 2, 1, 0); \ | |
| 65770 | float32x4_t __ret_794; \ | |
| 65771 | __ret_794 = __noswap_vfmlslq_high_f16(__rev0_794, __rev1_794, (float16x8_t) {__noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794), __noswap_vget_lane_f16(__rev2_794, __p3_794)}); \ | |
| 65772 | __ret_794 = __builtin_shufflevector(__ret_794, __ret_794, 3, 2, 1, 0); \ | |
| 65773 | __ret_794; \ | |
| 67433 | #define vfmlslq_lane_high_f16(__p0_886, __p1_886, __p2_886, __p3_886) __extension__ ({ \ | |
| 67434 | float32x4_t __s0_886 = __p0_886; \ | |
| 67435 | float16x8_t __s1_886 = __p1_886; \ | |
| 67436 | float16x4_t __s2_886 = __p2_886; \ | |
| 67437 | float32x4_t __rev0_886; __rev0_886 = __builtin_shufflevector(__s0_886, __s0_886, 3, 2, 1, 0); \ | |
| 67438 | float16x8_t __rev1_886; __rev1_886 = __builtin_shufflevector(__s1_886, __s1_886, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67439 | float16x4_t __rev2_886; __rev2_886 = __builtin_shufflevector(__s2_886, __s2_886, 3, 2, 1, 0); \ | |
| 67440 | float32x4_t __ret_886; \ | |
| 67441 | __ret_886 = __noswap_vfmlslq_high_f16(__rev0_886, __rev1_886, (float16x8_t) {__noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886), __noswap_vget_lane_f16(__rev2_886, __p3_886)}); \ | |
| 67442 | __ret_886 = __builtin_shufflevector(__ret_886, __ret_886, 3, 2, 1, 0); \ | |
| 67443 | __ret_886; \ | |
| 65774 | 67444 | }) |
| 65775 | 67445 | #endif |
| 65776 | 67446 | |
| 65777 | 67447 | #ifdef __LITTLE_ENDIAN__ |
| 65778 | #define vfmlsl_lane_high_f16(__p0_795, __p1_795, __p2_795, __p3_795) __extension__ ({ \ | |
| 65779 | float32x2_t __s0_795 = __p0_795; \ | |
| 65780 | float16x4_t __s1_795 = __p1_795; \ | |
| 65781 | float16x4_t __s2_795 = __p2_795; \ | |
| 65782 | float32x2_t __ret_795; \ | |
| 65783 | __ret_795 = vfmlsl_high_f16(__s0_795, __s1_795, (float16x4_t) {vget_lane_f16(__s2_795, __p3_795), vget_lane_f16(__s2_795, __p3_795), vget_lane_f16(__s2_795, __p3_795), vget_lane_f16(__s2_795, __p3_795)}); \ | |
| 65784 | __ret_795; \ | |
| 67448 | #define vfmlsl_lane_high_f16(__p0_887, __p1_887, __p2_887, __p3_887) __extension__ ({ \ | |
| 67449 | float32x2_t __s0_887 = __p0_887; \ | |
| 67450 | float16x4_t __s1_887 = __p1_887; \ | |
| 67451 | float16x4_t __s2_887 = __p2_887; \ | |
| 67452 | float32x2_t __ret_887; \ | |
| 67453 | __ret_887 = vfmlsl_high_f16(__s0_887, __s1_887, (float16x4_t) {vget_lane_f16(__s2_887, __p3_887), vget_lane_f16(__s2_887, __p3_887), vget_lane_f16(__s2_887, __p3_887), vget_lane_f16(__s2_887, __p3_887)}); \ | |
| 67454 | __ret_887; \ | |
| 65785 | 67455 | }) |
| 65786 | 67456 | #else |
| 65787 | #define vfmlsl_lane_high_f16(__p0_796, __p1_796, __p2_796, __p3_796) __extension__ ({ \ | |
| 65788 | float32x2_t __s0_796 = __p0_796; \ | |
| 65789 | float16x4_t __s1_796 = __p1_796; \ | |
| 65790 | float16x4_t __s2_796 = __p2_796; \ | |
| 65791 | float32x2_t __rev0_796; __rev0_796 = __builtin_shufflevector(__s0_796, __s0_796, 1, 0); \ | |
| 65792 | float16x4_t __rev1_796; __rev1_796 = __builtin_shufflevector(__s1_796, __s1_796, 3, 2, 1, 0); \ | |
| 65793 | float16x4_t __rev2_796; __rev2_796 = __builtin_shufflevector(__s2_796, __s2_796, 3, 2, 1, 0); \ | |
| 65794 | float32x2_t __ret_796; \ | |
| 65795 | __ret_796 = __noswap_vfmlsl_high_f16(__rev0_796, __rev1_796, (float16x4_t) {__noswap_vget_lane_f16(__rev2_796, __p3_796), __noswap_vget_lane_f16(__rev2_796, __p3_796), __noswap_vget_lane_f16(__rev2_796, __p3_796), __noswap_vget_lane_f16(__rev2_796, __p3_796)}); \ | |
| 65796 | __ret_796 = __builtin_shufflevector(__ret_796, __ret_796, 1, 0); \ | |
| 65797 | __ret_796; \ | |
| 67457 | #define vfmlsl_lane_high_f16(__p0_888, __p1_888, __p2_888, __p3_888) __extension__ ({ \ | |
| 67458 | float32x2_t __s0_888 = __p0_888; \ | |
| 67459 | float16x4_t __s1_888 = __p1_888; \ | |
| 67460 | float16x4_t __s2_888 = __p2_888; \ | |
| 67461 | float32x2_t __rev0_888; __rev0_888 = __builtin_shufflevector(__s0_888, __s0_888, 1, 0); \ | |
| 67462 | float16x4_t __rev1_888; __rev1_888 = __builtin_shufflevector(__s1_888, __s1_888, 3, 2, 1, 0); \ | |
| 67463 | float16x4_t __rev2_888; __rev2_888 = __builtin_shufflevector(__s2_888, __s2_888, 3, 2, 1, 0); \ | |
| 67464 | float32x2_t __ret_888; \ | |
| 67465 | __ret_888 = __noswap_vfmlsl_high_f16(__rev0_888, __rev1_888, (float16x4_t) {__noswap_vget_lane_f16(__rev2_888, __p3_888), __noswap_vget_lane_f16(__rev2_888, __p3_888), __noswap_vget_lane_f16(__rev2_888, __p3_888), __noswap_vget_lane_f16(__rev2_888, __p3_888)}); \ | |
| 67466 | __ret_888 = __builtin_shufflevector(__ret_888, __ret_888, 1, 0); \ | |
| 67467 | __ret_888; \ | |
| 65798 | 67468 | }) |
| 65799 | 67469 | #endif |
| 65800 | 67470 | |
| 65801 | 67471 | #ifdef __LITTLE_ENDIAN__ |
| 65802 | #define vfmlslq_lane_low_f16(__p0_797, __p1_797, __p2_797, __p3_797) __extension__ ({ \ | |
| 65803 | float32x4_t __s0_797 = __p0_797; \ | |
| 65804 | float16x8_t __s1_797 = __p1_797; \ | |
| 65805 | float16x4_t __s2_797 = __p2_797; \ | |
| 65806 | float32x4_t __ret_797; \ | |
| 65807 | __ret_797 = vfmlslq_low_f16(__s0_797, __s1_797, (float16x8_t) {vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797), vget_lane_f16(__s2_797, __p3_797)}); \ | |
| 65808 | __ret_797; \ | |
| 67472 | #define vfmlslq_lane_low_f16(__p0_889, __p1_889, __p2_889, __p3_889) __extension__ ({ \ | |
| 67473 | float32x4_t __s0_889 = __p0_889; \ | |
| 67474 | float16x8_t __s1_889 = __p1_889; \ | |
| 67475 | float16x4_t __s2_889 = __p2_889; \ | |
| 67476 | float32x4_t __ret_889; \ | |
| 67477 | __ret_889 = vfmlslq_low_f16(__s0_889, __s1_889, (float16x8_t) {vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889), vget_lane_f16(__s2_889, __p3_889)}); \ | |
| 67478 | __ret_889; \ | |
| 65809 | 67479 | }) |
| 65810 | 67480 | #else |
| 65811 | #define vfmlslq_lane_low_f16(__p0_798, __p1_798, __p2_798, __p3_798) __extension__ ({ \ | |
| 65812 | float32x4_t __s0_798 = __p0_798; \ | |
| 65813 | float16x8_t __s1_798 = __p1_798; \ | |
| 65814 | float16x4_t __s2_798 = __p2_798; \ | |
| 65815 | float32x4_t __rev0_798; __rev0_798 = __builtin_shufflevector(__s0_798, __s0_798, 3, 2, 1, 0); \ | |
| 65816 | float16x8_t __rev1_798; __rev1_798 = __builtin_shufflevector(__s1_798, __s1_798, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65817 | float16x4_t __rev2_798; __rev2_798 = __builtin_shufflevector(__s2_798, __s2_798, 3, 2, 1, 0); \ | |
| 65818 | float32x4_t __ret_798; \ | |
| 65819 | __ret_798 = __noswap_vfmlslq_low_f16(__rev0_798, __rev1_798, (float16x8_t) {__noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798), __noswap_vget_lane_f16(__rev2_798, __p3_798)}); \ | |
| 65820 | __ret_798 = __builtin_shufflevector(__ret_798, __ret_798, 3, 2, 1, 0); \ | |
| 65821 | __ret_798; \ | |
| 67481 | #define vfmlslq_lane_low_f16(__p0_890, __p1_890, __p2_890, __p3_890) __extension__ ({ \ | |
| 67482 | float32x4_t __s0_890 = __p0_890; \ | |
| 67483 | float16x8_t __s1_890 = __p1_890; \ | |
| 67484 | float16x4_t __s2_890 = __p2_890; \ | |
| 67485 | float32x4_t __rev0_890; __rev0_890 = __builtin_shufflevector(__s0_890, __s0_890, 3, 2, 1, 0); \ | |
| 67486 | float16x8_t __rev1_890; __rev1_890 = __builtin_shufflevector(__s1_890, __s1_890, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67487 | float16x4_t __rev2_890; __rev2_890 = __builtin_shufflevector(__s2_890, __s2_890, 3, 2, 1, 0); \ | |
| 67488 | float32x4_t __ret_890; \ | |
| 67489 | __ret_890 = __noswap_vfmlslq_low_f16(__rev0_890, __rev1_890, (float16x8_t) {__noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890), __noswap_vget_lane_f16(__rev2_890, __p3_890)}); \ | |
| 67490 | __ret_890 = __builtin_shufflevector(__ret_890, __ret_890, 3, 2, 1, 0); \ | |
| 67491 | __ret_890; \ | |
| 65822 | 67492 | }) |
| 65823 | 67493 | #endif |
| 65824 | 67494 | |
| 65825 | 67495 | #ifdef __LITTLE_ENDIAN__ |
| 65826 | #define vfmlsl_lane_low_f16(__p0_799, __p1_799, __p2_799, __p3_799) __extension__ ({ \ | |
| 65827 | float32x2_t __s0_799 = __p0_799; \ | |
| 65828 | float16x4_t __s1_799 = __p1_799; \ | |
| 65829 | float16x4_t __s2_799 = __p2_799; \ | |
| 65830 | float32x2_t __ret_799; \ | |
| 65831 | __ret_799 = vfmlsl_low_f16(__s0_799, __s1_799, (float16x4_t) {vget_lane_f16(__s2_799, __p3_799), vget_lane_f16(__s2_799, __p3_799), vget_lane_f16(__s2_799, __p3_799), vget_lane_f16(__s2_799, __p3_799)}); \ | |
| 65832 | __ret_799; \ | |
| 67496 | #define vfmlsl_lane_low_f16(__p0_891, __p1_891, __p2_891, __p3_891) __extension__ ({ \ | |
| 67497 | float32x2_t __s0_891 = __p0_891; \ | |
| 67498 | float16x4_t __s1_891 = __p1_891; \ | |
| 67499 | float16x4_t __s2_891 = __p2_891; \ | |
| 67500 | float32x2_t __ret_891; \ | |
| 67501 | __ret_891 = vfmlsl_low_f16(__s0_891, __s1_891, (float16x4_t) {vget_lane_f16(__s2_891, __p3_891), vget_lane_f16(__s2_891, __p3_891), vget_lane_f16(__s2_891, __p3_891), vget_lane_f16(__s2_891, __p3_891)}); \ | |
| 67502 | __ret_891; \ | |
| 65833 | 67503 | }) |
| 65834 | 67504 | #else |
| 65835 | #define vfmlsl_lane_low_f16(__p0_800, __p1_800, __p2_800, __p3_800) __extension__ ({ \ | |
| 65836 | float32x2_t __s0_800 = __p0_800; \ | |
| 65837 | float16x4_t __s1_800 = __p1_800; \ | |
| 65838 | float16x4_t __s2_800 = __p2_800; \ | |
| 65839 | float32x2_t __rev0_800; __rev0_800 = __builtin_shufflevector(__s0_800, __s0_800, 1, 0); \ | |
| 65840 | float16x4_t __rev1_800; __rev1_800 = __builtin_shufflevector(__s1_800, __s1_800, 3, 2, 1, 0); \ | |
| 65841 | float16x4_t __rev2_800; __rev2_800 = __builtin_shufflevector(__s2_800, __s2_800, 3, 2, 1, 0); \ | |
| 65842 | float32x2_t __ret_800; \ | |
| 65843 | __ret_800 = __noswap_vfmlsl_low_f16(__rev0_800, __rev1_800, (float16x4_t) {__noswap_vget_lane_f16(__rev2_800, __p3_800), __noswap_vget_lane_f16(__rev2_800, __p3_800), __noswap_vget_lane_f16(__rev2_800, __p3_800), __noswap_vget_lane_f16(__rev2_800, __p3_800)}); \ | |
| 65844 | __ret_800 = __builtin_shufflevector(__ret_800, __ret_800, 1, 0); \ | |
| 65845 | __ret_800; \ | |
| 67505 | #define vfmlsl_lane_low_f16(__p0_892, __p1_892, __p2_892, __p3_892) __extension__ ({ \ | |
| 67506 | float32x2_t __s0_892 = __p0_892; \ | |
| 67507 | float16x4_t __s1_892 = __p1_892; \ | |
| 67508 | float16x4_t __s2_892 = __p2_892; \ | |
| 67509 | float32x2_t __rev0_892; __rev0_892 = __builtin_shufflevector(__s0_892, __s0_892, 1, 0); \ | |
| 67510 | float16x4_t __rev1_892; __rev1_892 = __builtin_shufflevector(__s1_892, __s1_892, 3, 2, 1, 0); \ | |
| 67511 | float16x4_t __rev2_892; __rev2_892 = __builtin_shufflevector(__s2_892, __s2_892, 3, 2, 1, 0); \ | |
| 67512 | float32x2_t __ret_892; \ | |
| 67513 | __ret_892 = __noswap_vfmlsl_low_f16(__rev0_892, __rev1_892, (float16x4_t) {__noswap_vget_lane_f16(__rev2_892, __p3_892), __noswap_vget_lane_f16(__rev2_892, __p3_892), __noswap_vget_lane_f16(__rev2_892, __p3_892), __noswap_vget_lane_f16(__rev2_892, __p3_892)}); \ | |
| 67514 | __ret_892 = __builtin_shufflevector(__ret_892, __ret_892, 1, 0); \ | |
| 67515 | __ret_892; \ | |
| 65846 | 67516 | }) |
| 65847 | 67517 | #endif |
| 65848 | 67518 | |
| 65849 | 67519 | #ifdef __LITTLE_ENDIAN__ |
| 65850 | #define vfmlslq_laneq_high_f16(__p0_801, __p1_801, __p2_801, __p3_801) __extension__ ({ \ | |
| 65851 | float32x4_t __s0_801 = __p0_801; \ | |
| 65852 | float16x8_t __s1_801 = __p1_801; \ | |
| 65853 | float16x8_t __s2_801 = __p2_801; \ | |
| 65854 | float32x4_t __ret_801; \ | |
| 65855 | __ret_801 = vfmlslq_high_f16(__s0_801, __s1_801, (float16x8_t) {vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801), vgetq_lane_f16(__s2_801, __p3_801)}); \ | |
| 65856 | __ret_801; \ | |
| 67520 | #define vfmlslq_laneq_high_f16(__p0_893, __p1_893, __p2_893, __p3_893) __extension__ ({ \ | |
| 67521 | float32x4_t __s0_893 = __p0_893; \ | |
| 67522 | float16x8_t __s1_893 = __p1_893; \ | |
| 67523 | float16x8_t __s2_893 = __p2_893; \ | |
| 67524 | float32x4_t __ret_893; \ | |
| 67525 | __ret_893 = vfmlslq_high_f16(__s0_893, __s1_893, (float16x8_t) {vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893), vgetq_lane_f16(__s2_893, __p3_893)}); \ | |
| 67526 | __ret_893; \ | |
| 65857 | 67527 | }) |
| 65858 | 67528 | #else |
| 65859 | #define vfmlslq_laneq_high_f16(__p0_802, __p1_802, __p2_802, __p3_802) __extension__ ({ \ | |
| 65860 | float32x4_t __s0_802 = __p0_802; \ | |
| 65861 | float16x8_t __s1_802 = __p1_802; \ | |
| 65862 | float16x8_t __s2_802 = __p2_802; \ | |
| 65863 | float32x4_t __rev0_802; __rev0_802 = __builtin_shufflevector(__s0_802, __s0_802, 3, 2, 1, 0); \ | |
| 65864 | float16x8_t __rev1_802; __rev1_802 = __builtin_shufflevector(__s1_802, __s1_802, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65865 | float16x8_t __rev2_802; __rev2_802 = __builtin_shufflevector(__s2_802, __s2_802, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65866 | float32x4_t __ret_802; \ | |
| 65867 | __ret_802 = __noswap_vfmlslq_high_f16(__rev0_802, __rev1_802, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802), __noswap_vgetq_lane_f16(__rev2_802, __p3_802)}); \ | |
| 65868 | __ret_802 = __builtin_shufflevector(__ret_802, __ret_802, 3, 2, 1, 0); \ | |
| 65869 | __ret_802; \ | |
| 67529 | #define vfmlslq_laneq_high_f16(__p0_894, __p1_894, __p2_894, __p3_894) __extension__ ({ \ | |
| 67530 | float32x4_t __s0_894 = __p0_894; \ | |
| 67531 | float16x8_t __s1_894 = __p1_894; \ | |
| 67532 | float16x8_t __s2_894 = __p2_894; \ | |
| 67533 | float32x4_t __rev0_894; __rev0_894 = __builtin_shufflevector(__s0_894, __s0_894, 3, 2, 1, 0); \ | |
| 67534 | float16x8_t __rev1_894; __rev1_894 = __builtin_shufflevector(__s1_894, __s1_894, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67535 | float16x8_t __rev2_894; __rev2_894 = __builtin_shufflevector(__s2_894, __s2_894, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67536 | float32x4_t __ret_894; \ | |
| 67537 | __ret_894 = __noswap_vfmlslq_high_f16(__rev0_894, __rev1_894, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894), __noswap_vgetq_lane_f16(__rev2_894, __p3_894)}); \ | |
| 67538 | __ret_894 = __builtin_shufflevector(__ret_894, __ret_894, 3, 2, 1, 0); \ | |
| 67539 | __ret_894; \ | |
| 65870 | 67540 | }) |
| 65871 | 67541 | #endif |
| 65872 | 67542 | |
| 65873 | 67543 | #ifdef __LITTLE_ENDIAN__ |
| 65874 | #define vfmlsl_laneq_high_f16(__p0_803, __p1_803, __p2_803, __p3_803) __extension__ ({ \ | |
| 65875 | float32x2_t __s0_803 = __p0_803; \ | |
| 65876 | float16x4_t __s1_803 = __p1_803; \ | |
| 65877 | float16x8_t __s2_803 = __p2_803; \ | |
| 65878 | float32x2_t __ret_803; \ | |
| 65879 | __ret_803 = vfmlsl_high_f16(__s0_803, __s1_803, (float16x4_t) {vgetq_lane_f16(__s2_803, __p3_803), vgetq_lane_f16(__s2_803, __p3_803), vgetq_lane_f16(__s2_803, __p3_803), vgetq_lane_f16(__s2_803, __p3_803)}); \ | |
| 65880 | __ret_803; \ | |
| 67544 | #define vfmlsl_laneq_high_f16(__p0_895, __p1_895, __p2_895, __p3_895) __extension__ ({ \ | |
| 67545 | float32x2_t __s0_895 = __p0_895; \ | |
| 67546 | float16x4_t __s1_895 = __p1_895; \ | |
| 67547 | float16x8_t __s2_895 = __p2_895; \ | |
| 67548 | float32x2_t __ret_895; \ | |
| 67549 | __ret_895 = vfmlsl_high_f16(__s0_895, __s1_895, (float16x4_t) {vgetq_lane_f16(__s2_895, __p3_895), vgetq_lane_f16(__s2_895, __p3_895), vgetq_lane_f16(__s2_895, __p3_895), vgetq_lane_f16(__s2_895, __p3_895)}); \ | |
| 67550 | __ret_895; \ | |
| 65881 | 67551 | }) |
| 65882 | 67552 | #else |
| 65883 | #define vfmlsl_laneq_high_f16(__p0_804, __p1_804, __p2_804, __p3_804) __extension__ ({ \ | |
| 65884 | float32x2_t __s0_804 = __p0_804; \ | |
| 65885 | float16x4_t __s1_804 = __p1_804; \ | |
| 65886 | float16x8_t __s2_804 = __p2_804; \ | |
| 65887 | float32x2_t __rev0_804; __rev0_804 = __builtin_shufflevector(__s0_804, __s0_804, 1, 0); \ | |
| 65888 | float16x4_t __rev1_804; __rev1_804 = __builtin_shufflevector(__s1_804, __s1_804, 3, 2, 1, 0); \ | |
| 65889 | float16x8_t __rev2_804; __rev2_804 = __builtin_shufflevector(__s2_804, __s2_804, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65890 | float32x2_t __ret_804; \ | |
| 65891 | __ret_804 = __noswap_vfmlsl_high_f16(__rev0_804, __rev1_804, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_804, __p3_804), __noswap_vgetq_lane_f16(__rev2_804, __p3_804), __noswap_vgetq_lane_f16(__rev2_804, __p3_804), __noswap_vgetq_lane_f16(__rev2_804, __p3_804)}); \ | |
| 65892 | __ret_804 = __builtin_shufflevector(__ret_804, __ret_804, 1, 0); \ | |
| 65893 | __ret_804; \ | |
| 67553 | #define vfmlsl_laneq_high_f16(__p0_896, __p1_896, __p2_896, __p3_896) __extension__ ({ \ | |
| 67554 | float32x2_t __s0_896 = __p0_896; \ | |
| 67555 | float16x4_t __s1_896 = __p1_896; \ | |
| 67556 | float16x8_t __s2_896 = __p2_896; \ | |
| 67557 | float32x2_t __rev0_896; __rev0_896 = __builtin_shufflevector(__s0_896, __s0_896, 1, 0); \ | |
| 67558 | float16x4_t __rev1_896; __rev1_896 = __builtin_shufflevector(__s1_896, __s1_896, 3, 2, 1, 0); \ | |
| 67559 | float16x8_t __rev2_896; __rev2_896 = __builtin_shufflevector(__s2_896, __s2_896, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67560 | float32x2_t __ret_896; \ | |
| 67561 | __ret_896 = __noswap_vfmlsl_high_f16(__rev0_896, __rev1_896, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_896, __p3_896), __noswap_vgetq_lane_f16(__rev2_896, __p3_896), __noswap_vgetq_lane_f16(__rev2_896, __p3_896), __noswap_vgetq_lane_f16(__rev2_896, __p3_896)}); \ | |
| 67562 | __ret_896 = __builtin_shufflevector(__ret_896, __ret_896, 1, 0); \ | |
| 67563 | __ret_896; \ | |
| 65894 | 67564 | }) |
| 65895 | 67565 | #endif |
| 65896 | 67566 | |
| 65897 | 67567 | #ifdef __LITTLE_ENDIAN__ |
| 65898 | #define vfmlslq_laneq_low_f16(__p0_805, __p1_805, __p2_805, __p3_805) __extension__ ({ \ | |
| 65899 | float32x4_t __s0_805 = __p0_805; \ | |
| 65900 | float16x8_t __s1_805 = __p1_805; \ | |
| 65901 | float16x8_t __s2_805 = __p2_805; \ | |
| 65902 | float32x4_t __ret_805; \ | |
| 65903 | __ret_805 = vfmlslq_low_f16(__s0_805, __s1_805, (float16x8_t) {vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805), vgetq_lane_f16(__s2_805, __p3_805)}); \ | |
| 65904 | __ret_805; \ | |
| 67568 | #define vfmlslq_laneq_low_f16(__p0_897, __p1_897, __p2_897, __p3_897) __extension__ ({ \ | |
| 67569 | float32x4_t __s0_897 = __p0_897; \ | |
| 67570 | float16x8_t __s1_897 = __p1_897; \ | |
| 67571 | float16x8_t __s2_897 = __p2_897; \ | |
| 67572 | float32x4_t __ret_897; \ | |
| 67573 | __ret_897 = vfmlslq_low_f16(__s0_897, __s1_897, (float16x8_t) {vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897), vgetq_lane_f16(__s2_897, __p3_897)}); \ | |
| 67574 | __ret_897; \ | |
| 65905 | 67575 | }) |
| 65906 | 67576 | #else |
| 65907 | #define vfmlslq_laneq_low_f16(__p0_806, __p1_806, __p2_806, __p3_806) __extension__ ({ \ | |
| 65908 | float32x4_t __s0_806 = __p0_806; \ | |
| 65909 | float16x8_t __s1_806 = __p1_806; \ | |
| 65910 | float16x8_t __s2_806 = __p2_806; \ | |
| 65911 | float32x4_t __rev0_806; __rev0_806 = __builtin_shufflevector(__s0_806, __s0_806, 3, 2, 1, 0); \ | |
| 65912 | float16x8_t __rev1_806; __rev1_806 = __builtin_shufflevector(__s1_806, __s1_806, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65913 | float16x8_t __rev2_806; __rev2_806 = __builtin_shufflevector(__s2_806, __s2_806, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65914 | float32x4_t __ret_806; \ | |
| 65915 | __ret_806 = __noswap_vfmlslq_low_f16(__rev0_806, __rev1_806, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806), __noswap_vgetq_lane_f16(__rev2_806, __p3_806)}); \ | |
| 65916 | __ret_806 = __builtin_shufflevector(__ret_806, __ret_806, 3, 2, 1, 0); \ | |
| 65917 | __ret_806; \ | |
| 67577 | #define vfmlslq_laneq_low_f16(__p0_898, __p1_898, __p2_898, __p3_898) __extension__ ({ \ | |
| 67578 | float32x4_t __s0_898 = __p0_898; \ | |
| 67579 | float16x8_t __s1_898 = __p1_898; \ | |
| 67580 | float16x8_t __s2_898 = __p2_898; \ | |
| 67581 | float32x4_t __rev0_898; __rev0_898 = __builtin_shufflevector(__s0_898, __s0_898, 3, 2, 1, 0); \ | |
| 67582 | float16x8_t __rev1_898; __rev1_898 = __builtin_shufflevector(__s1_898, __s1_898, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67583 | float16x8_t __rev2_898; __rev2_898 = __builtin_shufflevector(__s2_898, __s2_898, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67584 | float32x4_t __ret_898; \ | |
| 67585 | __ret_898 = __noswap_vfmlslq_low_f16(__rev0_898, __rev1_898, (float16x8_t) {__noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898), __noswap_vgetq_lane_f16(__rev2_898, __p3_898)}); \ | |
| 67586 | __ret_898 = __builtin_shufflevector(__ret_898, __ret_898, 3, 2, 1, 0); \ | |
| 67587 | __ret_898; \ | |
| 65918 | 67588 | }) |
| 65919 | 67589 | #endif |
| 65920 | 67590 | |
| 65921 | 67591 | #ifdef __LITTLE_ENDIAN__ |
| 65922 | #define vfmlsl_laneq_low_f16(__p0_807, __p1_807, __p2_807, __p3_807) __extension__ ({ \ | |
| 65923 | float32x2_t __s0_807 = __p0_807; \ | |
| 65924 | float16x4_t __s1_807 = __p1_807; \ | |
| 65925 | float16x8_t __s2_807 = __p2_807; \ | |
| 65926 | float32x2_t __ret_807; \ | |
| 65927 | __ret_807 = vfmlsl_low_f16(__s0_807, __s1_807, (float16x4_t) {vgetq_lane_f16(__s2_807, __p3_807), vgetq_lane_f16(__s2_807, __p3_807), vgetq_lane_f16(__s2_807, __p3_807), vgetq_lane_f16(__s2_807, __p3_807)}); \ | |
| 65928 | __ret_807; \ | |
| 67592 | #define vfmlsl_laneq_low_f16(__p0_899, __p1_899, __p2_899, __p3_899) __extension__ ({ \ | |
| 67593 | float32x2_t __s0_899 = __p0_899; \ | |
| 67594 | float16x4_t __s1_899 = __p1_899; \ | |
| 67595 | float16x8_t __s2_899 = __p2_899; \ | |
| 67596 | float32x2_t __ret_899; \ | |
| 67597 | __ret_899 = vfmlsl_low_f16(__s0_899, __s1_899, (float16x4_t) {vgetq_lane_f16(__s2_899, __p3_899), vgetq_lane_f16(__s2_899, __p3_899), vgetq_lane_f16(__s2_899, __p3_899), vgetq_lane_f16(__s2_899, __p3_899)}); \ | |
| 67598 | __ret_899; \ | |
| 65929 | 67599 | }) |
| 65930 | 67600 | #else |
| 65931 | #define vfmlsl_laneq_low_f16(__p0_808, __p1_808, __p2_808, __p3_808) __extension__ ({ \ | |
| 65932 | float32x2_t __s0_808 = __p0_808; \ | |
| 65933 | float16x4_t __s1_808 = __p1_808; \ | |
| 65934 | float16x8_t __s2_808 = __p2_808; \ | |
| 65935 | float32x2_t __rev0_808; __rev0_808 = __builtin_shufflevector(__s0_808, __s0_808, 1, 0); \ | |
| 65936 | float16x4_t __rev1_808; __rev1_808 = __builtin_shufflevector(__s1_808, __s1_808, 3, 2, 1, 0); \ | |
| 65937 | float16x8_t __rev2_808; __rev2_808 = __builtin_shufflevector(__s2_808, __s2_808, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65938 | float32x2_t __ret_808; \ | |
| 65939 | __ret_808 = __noswap_vfmlsl_low_f16(__rev0_808, __rev1_808, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_808, __p3_808), __noswap_vgetq_lane_f16(__rev2_808, __p3_808), __noswap_vgetq_lane_f16(__rev2_808, __p3_808), __noswap_vgetq_lane_f16(__rev2_808, __p3_808)}); \ | |
| 65940 | __ret_808 = __builtin_shufflevector(__ret_808, __ret_808, 1, 0); \ | |
| 65941 | __ret_808; \ | |
| 67601 | #define vfmlsl_laneq_low_f16(__p0_900, __p1_900, __p2_900, __p3_900) __extension__ ({ \ | |
| 67602 | float32x2_t __s0_900 = __p0_900; \ | |
| 67603 | float16x4_t __s1_900 = __p1_900; \ | |
| 67604 | float16x8_t __s2_900 = __p2_900; \ | |
| 67605 | float32x2_t __rev0_900; __rev0_900 = __builtin_shufflevector(__s0_900, __s0_900, 1, 0); \ | |
| 67606 | float16x4_t __rev1_900; __rev1_900 = __builtin_shufflevector(__s1_900, __s1_900, 3, 2, 1, 0); \ | |
| 67607 | float16x8_t __rev2_900; __rev2_900 = __builtin_shufflevector(__s2_900, __s2_900, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67608 | float32x2_t __ret_900; \ | |
| 67609 | __ret_900 = __noswap_vfmlsl_low_f16(__rev0_900, __rev1_900, (float16x4_t) {__noswap_vgetq_lane_f16(__rev2_900, __p3_900), __noswap_vgetq_lane_f16(__rev2_900, __p3_900), __noswap_vgetq_lane_f16(__rev2_900, __p3_900), __noswap_vgetq_lane_f16(__rev2_900, __p3_900)}); \ | |
| 67610 | __ret_900 = __builtin_shufflevector(__ret_900, __ret_900, 1, 0); \ | |
| 67611 | __ret_900; \ | |
| 65942 | 67612 | }) |
| 65943 | 67613 | #endif |
| 65944 | 67614 | |
| 65945 | 67615 | #endif |
| 65946 | 67616 | #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(__aarch64__) |
| 65947 | 67617 | #ifdef __LITTLE_ENDIAN__ |
| 65948 | #define vmulh_lane_f16(__p0_809, __p1_809, __p2_809) __extension__ ({ \ | |
| 65949 | float16_t __s0_809 = __p0_809; \ | |
| 65950 | float16x4_t __s1_809 = __p1_809; \ | |
| 65951 | float16_t __ret_809; \ | |
| 65952 | __ret_809 = __s0_809 * vget_lane_f16(__s1_809, __p2_809); \ | |
| 65953 | __ret_809; \ | |
| 67618 | #define vmulh_lane_f16(__p0_901, __p1_901, __p2_901) __extension__ ({ \ | |
| 67619 | float16_t __s0_901 = __p0_901; \ | |
| 67620 | float16x4_t __s1_901 = __p1_901; \ | |
| 67621 | float16_t __ret_901; \ | |
| 67622 | __ret_901 = __s0_901 * vget_lane_f16(__s1_901, __p2_901); \ | |
| 67623 | __ret_901; \ | |
| 65954 | 67624 | }) |
| 65955 | 67625 | #else |
| 65956 | #define vmulh_lane_f16(__p0_810, __p1_810, __p2_810) __extension__ ({ \ | |
| 65957 | float16_t __s0_810 = __p0_810; \ | |
| 65958 | float16x4_t __s1_810 = __p1_810; \ | |
| 65959 | float16x4_t __rev1_810; __rev1_810 = __builtin_shufflevector(__s1_810, __s1_810, 3, 2, 1, 0); \ | |
| 65960 | float16_t __ret_810; \ | |
| 65961 | __ret_810 = __s0_810 * __noswap_vget_lane_f16(__rev1_810, __p2_810); \ | |
| 65962 | __ret_810; \ | |
| 67626 | #define vmulh_lane_f16(__p0_902, __p1_902, __p2_902) __extension__ ({ \ | |
| 67627 | float16_t __s0_902 = __p0_902; \ | |
| 67628 | float16x4_t __s1_902 = __p1_902; \ | |
| 67629 | float16x4_t __rev1_902; __rev1_902 = __builtin_shufflevector(__s1_902, __s1_902, 3, 2, 1, 0); \ | |
| 67630 | float16_t __ret_902; \ | |
| 67631 | __ret_902 = __s0_902 * __noswap_vget_lane_f16(__rev1_902, __p2_902); \ | |
| 67632 | __ret_902; \ | |
| 65963 | 67633 | }) |
| 65964 | 67634 | #endif |
| 65965 | 67635 | |
| 65966 | 67636 | #ifdef __LITTLE_ENDIAN__ |
| 65967 | #define vmulh_laneq_f16(__p0_811, __p1_811, __p2_811) __extension__ ({ \ | |
| 65968 | float16_t __s0_811 = __p0_811; \ | |
| 65969 | float16x8_t __s1_811 = __p1_811; \ | |
| 65970 | float16_t __ret_811; \ | |
| 65971 | __ret_811 = __s0_811 * vgetq_lane_f16(__s1_811, __p2_811); \ | |
| 65972 | __ret_811; \ | |
| 67637 | #define vmulh_laneq_f16(__p0_903, __p1_903, __p2_903) __extension__ ({ \ | |
| 67638 | float16_t __s0_903 = __p0_903; \ | |
| 67639 | float16x8_t __s1_903 = __p1_903; \ | |
| 67640 | float16_t __ret_903; \ | |
| 67641 | __ret_903 = __s0_903 * vgetq_lane_f16(__s1_903, __p2_903); \ | |
| 67642 | __ret_903; \ | |
| 65973 | 67643 | }) |
| 65974 | 67644 | #else |
| 65975 | #define vmulh_laneq_f16(__p0_812, __p1_812, __p2_812) __extension__ ({ \ | |
| 65976 | float16_t __s0_812 = __p0_812; \ | |
| 65977 | float16x8_t __s1_812 = __p1_812; \ | |
| 65978 | float16x8_t __rev1_812; __rev1_812 = __builtin_shufflevector(__s1_812, __s1_812, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 65979 | float16_t __ret_812; \ | |
| 65980 | __ret_812 = __s0_812 * __noswap_vgetq_lane_f16(__rev1_812, __p2_812); \ | |
| 65981 | __ret_812; \ | |
| 67645 | #define vmulh_laneq_f16(__p0_904, __p1_904, __p2_904) __extension__ ({ \ | |
| 67646 | float16_t __s0_904 = __p0_904; \ | |
| 67647 | float16x8_t __s1_904 = __p1_904; \ | |
| 67648 | float16x8_t __rev1_904; __rev1_904 = __builtin_shufflevector(__s1_904, __s1_904, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67649 | float16_t __ret_904; \ | |
| 67650 | __ret_904 = __s0_904 * __noswap_vgetq_lane_f16(__rev1_904, __p2_904); \ | |
| 67651 | __ret_904; \ | |
| 65982 | 67652 | }) |
| 65983 | 67653 | #endif |
| 65984 | 67654 | |
| 65985 | 67655 | #endif |
| 65986 | 67656 | #if defined(__ARM_FEATURE_MATMUL_INT8) |
| 65987 | 67657 | #ifdef __LITTLE_ENDIAN__ |
| 65988 | #define vsudotq_lane_s32(__p0_813, __p1_813, __p2_813, __p3_813) __extension__ ({ \ | |
| 65989 | int32x4_t __s0_813 = __p0_813; \ | |
| 65990 | int8x16_t __s1_813 = __p1_813; \ | |
| 65991 | uint8x8_t __s2_813 = __p2_813; \ | |
| 65992 | int32x4_t __ret_813; \ | |
| 65993 | uint8x8_t __reint_813 = __s2_813; \ | |
| 65994 | __ret_813 = vusdotq_s32(__s0_813, (uint8x16_t)(splatq_lane_s32(*(int32x2_t *) &__reint_813, __p3_813)), __s1_813); \ | |
| 65995 | __ret_813; \ | |
| 67658 | #define vsudotq_lane_s32(__p0_905, __p1_905, __p2_905, __p3_905) __extension__ ({ \ | |
| 67659 | int32x4_t __s0_905 = __p0_905; \ | |
| 67660 | int8x16_t __s1_905 = __p1_905; \ | |
| 67661 | uint8x8_t __s2_905 = __p2_905; \ | |
| 67662 | int32x4_t __ret_905; \ | |
| 67663 | uint8x8_t __reint_905 = __s2_905; \ | |
| 67664 | __ret_905 = vusdotq_s32(__s0_905, (uint8x16_t)(splatq_lane_s32(*(int32x2_t *) &__reint_905, __p3_905)), __s1_905); \ | |
| 67665 | __ret_905; \ | |
| 65996 | 67666 | }) |
| 65997 | 67667 | #else |
| 65998 | #define vsudotq_lane_s32(__p0_814, __p1_814, __p2_814, __p3_814) __extension__ ({ \ | |
| 65999 | int32x4_t __s0_814 = __p0_814; \ | |
| 66000 | int8x16_t __s1_814 = __p1_814; \ | |
| 66001 | uint8x8_t __s2_814 = __p2_814; \ | |
| 66002 | int32x4_t __rev0_814; __rev0_814 = __builtin_shufflevector(__s0_814, __s0_814, 3, 2, 1, 0); \ | |
| 66003 | int8x16_t __rev1_814; __rev1_814 = __builtin_shufflevector(__s1_814, __s1_814, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66004 | uint8x8_t __rev2_814; __rev2_814 = __builtin_shufflevector(__s2_814, __s2_814, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66005 | int32x4_t __ret_814; \ | |
| 66006 | uint8x8_t __reint_814 = __rev2_814; \ | |
| 66007 | __ret_814 = __noswap_vusdotq_s32(__rev0_814, (uint8x16_t)(__noswap_splatq_lane_s32(*(int32x2_t *) &__reint_814, __p3_814)), __rev1_814); \ | |
| 66008 | __ret_814 = __builtin_shufflevector(__ret_814, __ret_814, 3, 2, 1, 0); \ | |
| 66009 | __ret_814; \ | |
| 67668 | #define vsudotq_lane_s32(__p0_906, __p1_906, __p2_906, __p3_906) __extension__ ({ \ | |
| 67669 | int32x4_t __s0_906 = __p0_906; \ | |
| 67670 | int8x16_t __s1_906 = __p1_906; \ | |
| 67671 | uint8x8_t __s2_906 = __p2_906; \ | |
| 67672 | int32x4_t __rev0_906; __rev0_906 = __builtin_shufflevector(__s0_906, __s0_906, 3, 2, 1, 0); \ | |
| 67673 | int8x16_t __rev1_906; __rev1_906 = __builtin_shufflevector(__s1_906, __s1_906, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67674 | uint8x8_t __rev2_906; __rev2_906 = __builtin_shufflevector(__s2_906, __s2_906, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67675 | int32x4_t __ret_906; \ | |
| 67676 | uint8x8_t __reint_906 = __rev2_906; \ | |
| 67677 | __ret_906 = __noswap_vusdotq_s32(__rev0_906, (uint8x16_t)(__noswap_splatq_lane_s32(*(int32x2_t *) &__reint_906, __p3_906)), __rev1_906); \ | |
| 67678 | __ret_906 = __builtin_shufflevector(__ret_906, __ret_906, 3, 2, 1, 0); \ | |
| 67679 | __ret_906; \ | |
| 66010 | 67680 | }) |
| 66011 | 67681 | #endif |
| 66012 | 67682 | |
| 66013 | 67683 | #ifdef __LITTLE_ENDIAN__ |
| 66014 | #define vsudot_lane_s32(__p0_815, __p1_815, __p2_815, __p3_815) __extension__ ({ \ | |
| 66015 | int32x2_t __s0_815 = __p0_815; \ | |
| 66016 | int8x8_t __s1_815 = __p1_815; \ | |
| 66017 | uint8x8_t __s2_815 = __p2_815; \ | |
| 66018 | int32x2_t __ret_815; \ | |
| 66019 | uint8x8_t __reint_815 = __s2_815; \ | |
| 66020 | __ret_815 = vusdot_s32(__s0_815, (uint8x8_t)(splat_lane_s32(*(int32x2_t *) &__reint_815, __p3_815)), __s1_815); \ | |
| 66021 | __ret_815; \ | |
| 67684 | #define vsudot_lane_s32(__p0_907, __p1_907, __p2_907, __p3_907) __extension__ ({ \ | |
| 67685 | int32x2_t __s0_907 = __p0_907; \ | |
| 67686 | int8x8_t __s1_907 = __p1_907; \ | |
| 67687 | uint8x8_t __s2_907 = __p2_907; \ | |
| 67688 | int32x2_t __ret_907; \ | |
| 67689 | uint8x8_t __reint_907 = __s2_907; \ | |
| 67690 | __ret_907 = vusdot_s32(__s0_907, (uint8x8_t)(splat_lane_s32(*(int32x2_t *) &__reint_907, __p3_907)), __s1_907); \ | |
| 67691 | __ret_907; \ | |
| 66022 | 67692 | }) |
| 66023 | 67693 | #else |
| 66024 | #define vsudot_lane_s32(__p0_816, __p1_816, __p2_816, __p3_816) __extension__ ({ \ | |
| 66025 | int32x2_t __s0_816 = __p0_816; \ | |
| 66026 | int8x8_t __s1_816 = __p1_816; \ | |
| 66027 | uint8x8_t __s2_816 = __p2_816; \ | |
| 66028 | int32x2_t __rev0_816; __rev0_816 = __builtin_shufflevector(__s0_816, __s0_816, 1, 0); \ | |
| 66029 | int8x8_t __rev1_816; __rev1_816 = __builtin_shufflevector(__s1_816, __s1_816, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66030 | uint8x8_t __rev2_816; __rev2_816 = __builtin_shufflevector(__s2_816, __s2_816, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66031 | int32x2_t __ret_816; \ | |
| 66032 | uint8x8_t __reint_816 = __rev2_816; \ | |
| 66033 | __ret_816 = __noswap_vusdot_s32(__rev0_816, (uint8x8_t)(__noswap_splat_lane_s32(*(int32x2_t *) &__reint_816, __p3_816)), __rev1_816); \ | |
| 66034 | __ret_816 = __builtin_shufflevector(__ret_816, __ret_816, 1, 0); \ | |
| 66035 | __ret_816; \ | |
| 67694 | #define vsudot_lane_s32(__p0_908, __p1_908, __p2_908, __p3_908) __extension__ ({ \ | |
| 67695 | int32x2_t __s0_908 = __p0_908; \ | |
| 67696 | int8x8_t __s1_908 = __p1_908; \ | |
| 67697 | uint8x8_t __s2_908 = __p2_908; \ | |
| 67698 | int32x2_t __rev0_908; __rev0_908 = __builtin_shufflevector(__s0_908, __s0_908, 1, 0); \ | |
| 67699 | int8x8_t __rev1_908; __rev1_908 = __builtin_shufflevector(__s1_908, __s1_908, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67700 | uint8x8_t __rev2_908; __rev2_908 = __builtin_shufflevector(__s2_908, __s2_908, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67701 | int32x2_t __ret_908; \ | |
| 67702 | uint8x8_t __reint_908 = __rev2_908; \ | |
| 67703 | __ret_908 = __noswap_vusdot_s32(__rev0_908, (uint8x8_t)(__noswap_splat_lane_s32(*(int32x2_t *) &__reint_908, __p3_908)), __rev1_908); \ | |
| 67704 | __ret_908 = __builtin_shufflevector(__ret_908, __ret_908, 1, 0); \ | |
| 67705 | __ret_908; \ | |
| 66036 | 67706 | }) |
| 66037 | 67707 | #endif |
| 66038 | 67708 | |
| ... | ... | @@ -66049,86 +67719,86 @@ __ai int16_t vqrdmlahh_s16(int16_t __p0, int16_t __p1, int16_t __p2) { |
| 66049 | 67719 | return __ret; |
| 66050 | 67720 | } |
| 66051 | 67721 | #ifdef __LITTLE_ENDIAN__ |
| 66052 | #define vqrdmlahs_lane_s32(__p0_817, __p1_817, __p2_817, __p3_817) __extension__ ({ \ | |
| 66053 | int32_t __s0_817 = __p0_817; \ | |
| 66054 | int32_t __s1_817 = __p1_817; \ | |
| 66055 | int32x2_t __s2_817 = __p2_817; \ | |
| 66056 | int32_t __ret_817; \ | |
| 66057 | __ret_817 = vqadds_s32(__s0_817, vqrdmulhs_s32(__s1_817, vget_lane_s32(__s2_817, __p3_817))); \ | |
| 66058 | __ret_817; \ | |
| 67722 | #define vqrdmlahs_lane_s32(__p0_909, __p1_909, __p2_909, __p3_909) __extension__ ({ \ | |
| 67723 | int32_t __s0_909 = __p0_909; \ | |
| 67724 | int32_t __s1_909 = __p1_909; \ | |
| 67725 | int32x2_t __s2_909 = __p2_909; \ | |
| 67726 | int32_t __ret_909; \ | |
| 67727 | __ret_909 = vqadds_s32(__s0_909, vqrdmulhs_s32(__s1_909, vget_lane_s32(__s2_909, __p3_909))); \ | |
| 67728 | __ret_909; \ | |
| 66059 | 67729 | }) |
| 66060 | 67730 | #else |
| 66061 | #define vqrdmlahs_lane_s32(__p0_818, __p1_818, __p2_818, __p3_818) __extension__ ({ \ | |
| 66062 | int32_t __s0_818 = __p0_818; \ | |
| 66063 | int32_t __s1_818 = __p1_818; \ | |
| 66064 | int32x2_t __s2_818 = __p2_818; \ | |
| 66065 | int32x2_t __rev2_818; __rev2_818 = __builtin_shufflevector(__s2_818, __s2_818, 1, 0); \ | |
| 66066 | int32_t __ret_818; \ | |
| 66067 | __ret_818 = vqadds_s32(__s0_818, vqrdmulhs_s32(__s1_818, __noswap_vget_lane_s32(__rev2_818, __p3_818))); \ | |
| 66068 | __ret_818; \ | |
| 67731 | #define vqrdmlahs_lane_s32(__p0_910, __p1_910, __p2_910, __p3_910) __extension__ ({ \ | |
| 67732 | int32_t __s0_910 = __p0_910; \ | |
| 67733 | int32_t __s1_910 = __p1_910; \ | |
| 67734 | int32x2_t __s2_910 = __p2_910; \ | |
| 67735 | int32x2_t __rev2_910; __rev2_910 = __builtin_shufflevector(__s2_910, __s2_910, 1, 0); \ | |
| 67736 | int32_t __ret_910; \ | |
| 67737 | __ret_910 = vqadds_s32(__s0_910, vqrdmulhs_s32(__s1_910, __noswap_vget_lane_s32(__rev2_910, __p3_910))); \ | |
| 67738 | __ret_910; \ | |
| 66069 | 67739 | }) |
| 66070 | 67740 | #endif |
| 66071 | 67741 | |
| 66072 | 67742 | #ifdef __LITTLE_ENDIAN__ |
| 66073 | #define vqrdmlahh_lane_s16(__p0_819, __p1_819, __p2_819, __p3_819) __extension__ ({ \ | |
| 66074 | int16_t __s0_819 = __p0_819; \ | |
| 66075 | int16_t __s1_819 = __p1_819; \ | |
| 66076 | int16x4_t __s2_819 = __p2_819; \ | |
| 66077 | int16_t __ret_819; \ | |
| 66078 | __ret_819 = vqaddh_s16(__s0_819, vqrdmulhh_s16(__s1_819, vget_lane_s16(__s2_819, __p3_819))); \ | |
| 66079 | __ret_819; \ | |
| 67743 | #define vqrdmlahh_lane_s16(__p0_911, __p1_911, __p2_911, __p3_911) __extension__ ({ \ | |
| 67744 | int16_t __s0_911 = __p0_911; \ | |
| 67745 | int16_t __s1_911 = __p1_911; \ | |
| 67746 | int16x4_t __s2_911 = __p2_911; \ | |
| 67747 | int16_t __ret_911; \ | |
| 67748 | __ret_911 = vqaddh_s16(__s0_911, vqrdmulhh_s16(__s1_911, vget_lane_s16(__s2_911, __p3_911))); \ | |
| 67749 | __ret_911; \ | |
| 66080 | 67750 | }) |
| 66081 | 67751 | #else |
| 66082 | #define vqrdmlahh_lane_s16(__p0_820, __p1_820, __p2_820, __p3_820) __extension__ ({ \ | |
| 66083 | int16_t __s0_820 = __p0_820; \ | |
| 66084 | int16_t __s1_820 = __p1_820; \ | |
| 66085 | int16x4_t __s2_820 = __p2_820; \ | |
| 66086 | int16x4_t __rev2_820; __rev2_820 = __builtin_shufflevector(__s2_820, __s2_820, 3, 2, 1, 0); \ | |
| 66087 | int16_t __ret_820; \ | |
| 66088 | __ret_820 = vqaddh_s16(__s0_820, vqrdmulhh_s16(__s1_820, __noswap_vget_lane_s16(__rev2_820, __p3_820))); \ | |
| 66089 | __ret_820; \ | |
| 67752 | #define vqrdmlahh_lane_s16(__p0_912, __p1_912, __p2_912, __p3_912) __extension__ ({ \ | |
| 67753 | int16_t __s0_912 = __p0_912; \ | |
| 67754 | int16_t __s1_912 = __p1_912; \ | |
| 67755 | int16x4_t __s2_912 = __p2_912; \ | |
| 67756 | int16x4_t __rev2_912; __rev2_912 = __builtin_shufflevector(__s2_912, __s2_912, 3, 2, 1, 0); \ | |
| 67757 | int16_t __ret_912; \ | |
| 67758 | __ret_912 = vqaddh_s16(__s0_912, vqrdmulhh_s16(__s1_912, __noswap_vget_lane_s16(__rev2_912, __p3_912))); \ | |
| 67759 | __ret_912; \ | |
| 66090 | 67760 | }) |
| 66091 | 67761 | #endif |
| 66092 | 67762 | |
| 66093 | 67763 | #ifdef __LITTLE_ENDIAN__ |
| 66094 | #define vqrdmlahs_laneq_s32(__p0_821, __p1_821, __p2_821, __p3_821) __extension__ ({ \ | |
| 66095 | int32_t __s0_821 = __p0_821; \ | |
| 66096 | int32_t __s1_821 = __p1_821; \ | |
| 66097 | int32x4_t __s2_821 = __p2_821; \ | |
| 66098 | int32_t __ret_821; \ | |
| 66099 | __ret_821 = vqadds_s32(__s0_821, vqrdmulhs_s32(__s1_821, vgetq_lane_s32(__s2_821, __p3_821))); \ | |
| 66100 | __ret_821; \ | |
| 67764 | #define vqrdmlahs_laneq_s32(__p0_913, __p1_913, __p2_913, __p3_913) __extension__ ({ \ | |
| 67765 | int32_t __s0_913 = __p0_913; \ | |
| 67766 | int32_t __s1_913 = __p1_913; \ | |
| 67767 | int32x4_t __s2_913 = __p2_913; \ | |
| 67768 | int32_t __ret_913; \ | |
| 67769 | __ret_913 = vqadds_s32(__s0_913, vqrdmulhs_s32(__s1_913, vgetq_lane_s32(__s2_913, __p3_913))); \ | |
| 67770 | __ret_913; \ | |
| 66101 | 67771 | }) |
| 66102 | 67772 | #else |
| 66103 | #define vqrdmlahs_laneq_s32(__p0_822, __p1_822, __p2_822, __p3_822) __extension__ ({ \ | |
| 66104 | int32_t __s0_822 = __p0_822; \ | |
| 66105 | int32_t __s1_822 = __p1_822; \ | |
| 66106 | int32x4_t __s2_822 = __p2_822; \ | |
| 66107 | int32x4_t __rev2_822; __rev2_822 = __builtin_shufflevector(__s2_822, __s2_822, 3, 2, 1, 0); \ | |
| 66108 | int32_t __ret_822; \ | |
| 66109 | __ret_822 = vqadds_s32(__s0_822, vqrdmulhs_s32(__s1_822, __noswap_vgetq_lane_s32(__rev2_822, __p3_822))); \ | |
| 66110 | __ret_822; \ | |
| 67773 | #define vqrdmlahs_laneq_s32(__p0_914, __p1_914, __p2_914, __p3_914) __extension__ ({ \ | |
| 67774 | int32_t __s0_914 = __p0_914; \ | |
| 67775 | int32_t __s1_914 = __p1_914; \ | |
| 67776 | int32x4_t __s2_914 = __p2_914; \ | |
| 67777 | int32x4_t __rev2_914; __rev2_914 = __builtin_shufflevector(__s2_914, __s2_914, 3, 2, 1, 0); \ | |
| 67778 | int32_t __ret_914; \ | |
| 67779 | __ret_914 = vqadds_s32(__s0_914, vqrdmulhs_s32(__s1_914, __noswap_vgetq_lane_s32(__rev2_914, __p3_914))); \ | |
| 67780 | __ret_914; \ | |
| 66111 | 67781 | }) |
| 66112 | 67782 | #endif |
| 66113 | 67783 | |
| 66114 | 67784 | #ifdef __LITTLE_ENDIAN__ |
| 66115 | #define vqrdmlahh_laneq_s16(__p0_823, __p1_823, __p2_823, __p3_823) __extension__ ({ \ | |
| 66116 | int16_t __s0_823 = __p0_823; \ | |
| 66117 | int16_t __s1_823 = __p1_823; \ | |
| 66118 | int16x8_t __s2_823 = __p2_823; \ | |
| 66119 | int16_t __ret_823; \ | |
| 66120 | __ret_823 = vqaddh_s16(__s0_823, vqrdmulhh_s16(__s1_823, vgetq_lane_s16(__s2_823, __p3_823))); \ | |
| 66121 | __ret_823; \ | |
| 67785 | #define vqrdmlahh_laneq_s16(__p0_915, __p1_915, __p2_915, __p3_915) __extension__ ({ \ | |
| 67786 | int16_t __s0_915 = __p0_915; \ | |
| 67787 | int16_t __s1_915 = __p1_915; \ | |
| 67788 | int16x8_t __s2_915 = __p2_915; \ | |
| 67789 | int16_t __ret_915; \ | |
| 67790 | __ret_915 = vqaddh_s16(__s0_915, vqrdmulhh_s16(__s1_915, vgetq_lane_s16(__s2_915, __p3_915))); \ | |
| 67791 | __ret_915; \ | |
| 66122 | 67792 | }) |
| 66123 | 67793 | #else |
| 66124 | #define vqrdmlahh_laneq_s16(__p0_824, __p1_824, __p2_824, __p3_824) __extension__ ({ \ | |
| 66125 | int16_t __s0_824 = __p0_824; \ | |
| 66126 | int16_t __s1_824 = __p1_824; \ | |
| 66127 | int16x8_t __s2_824 = __p2_824; \ | |
| 66128 | int16x8_t __rev2_824; __rev2_824 = __builtin_shufflevector(__s2_824, __s2_824, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66129 | int16_t __ret_824; \ | |
| 66130 | __ret_824 = vqaddh_s16(__s0_824, vqrdmulhh_s16(__s1_824, __noswap_vgetq_lane_s16(__rev2_824, __p3_824))); \ | |
| 66131 | __ret_824; \ | |
| 67794 | #define vqrdmlahh_laneq_s16(__p0_916, __p1_916, __p2_916, __p3_916) __extension__ ({ \ | |
| 67795 | int16_t __s0_916 = __p0_916; \ | |
| 67796 | int16_t __s1_916 = __p1_916; \ | |
| 67797 | int16x8_t __s2_916 = __p2_916; \ | |
| 67798 | int16x8_t __rev2_916; __rev2_916 = __builtin_shufflevector(__s2_916, __s2_916, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67799 | int16_t __ret_916; \ | |
| 67800 | __ret_916 = vqaddh_s16(__s0_916, vqrdmulhh_s16(__s1_916, __noswap_vgetq_lane_s16(__rev2_916, __p3_916))); \ | |
| 67801 | __ret_916; \ | |
| 66132 | 67802 | }) |
| 66133 | 67803 | #endif |
| 66134 | 67804 | |
| ... | ... | @@ -66143,86 +67813,86 @@ __ai int16_t vqrdmlshh_s16(int16_t __p0, int16_t __p1, int16_t __p2) { |
| 66143 | 67813 | return __ret; |
| 66144 | 67814 | } |
| 66145 | 67815 | #ifdef __LITTLE_ENDIAN__ |
| 66146 | #define vqrdmlshs_lane_s32(__p0_825, __p1_825, __p2_825, __p3_825) __extension__ ({ \ | |
| 66147 | int32_t __s0_825 = __p0_825; \ | |
| 66148 | int32_t __s1_825 = __p1_825; \ | |
| 66149 | int32x2_t __s2_825 = __p2_825; \ | |
| 66150 | int32_t __ret_825; \ | |
| 66151 | __ret_825 = vqsubs_s32(__s0_825, vqrdmulhs_s32(__s1_825, vget_lane_s32(__s2_825, __p3_825))); \ | |
| 66152 | __ret_825; \ | |
| 67816 | #define vqrdmlshs_lane_s32(__p0_917, __p1_917, __p2_917, __p3_917) __extension__ ({ \ | |
| 67817 | int32_t __s0_917 = __p0_917; \ | |
| 67818 | int32_t __s1_917 = __p1_917; \ | |
| 67819 | int32x2_t __s2_917 = __p2_917; \ | |
| 67820 | int32_t __ret_917; \ | |
| 67821 | __ret_917 = vqsubs_s32(__s0_917, vqrdmulhs_s32(__s1_917, vget_lane_s32(__s2_917, __p3_917))); \ | |
| 67822 | __ret_917; \ | |
| 66153 | 67823 | }) |
| 66154 | 67824 | #else |
| 66155 | #define vqrdmlshs_lane_s32(__p0_826, __p1_826, __p2_826, __p3_826) __extension__ ({ \ | |
| 66156 | int32_t __s0_826 = __p0_826; \ | |
| 66157 | int32_t __s1_826 = __p1_826; \ | |
| 66158 | int32x2_t __s2_826 = __p2_826; \ | |
| 66159 | int32x2_t __rev2_826; __rev2_826 = __builtin_shufflevector(__s2_826, __s2_826, 1, 0); \ | |
| 66160 | int32_t __ret_826; \ | |
| 66161 | __ret_826 = vqsubs_s32(__s0_826, vqrdmulhs_s32(__s1_826, __noswap_vget_lane_s32(__rev2_826, __p3_826))); \ | |
| 66162 | __ret_826; \ | |
| 67825 | #define vqrdmlshs_lane_s32(__p0_918, __p1_918, __p2_918, __p3_918) __extension__ ({ \ | |
| 67826 | int32_t __s0_918 = __p0_918; \ | |
| 67827 | int32_t __s1_918 = __p1_918; \ | |
| 67828 | int32x2_t __s2_918 = __p2_918; \ | |
| 67829 | int32x2_t __rev2_918; __rev2_918 = __builtin_shufflevector(__s2_918, __s2_918, 1, 0); \ | |
| 67830 | int32_t __ret_918; \ | |
| 67831 | __ret_918 = vqsubs_s32(__s0_918, vqrdmulhs_s32(__s1_918, __noswap_vget_lane_s32(__rev2_918, __p3_918))); \ | |
| 67832 | __ret_918; \ | |
| 66163 | 67833 | }) |
| 66164 | 67834 | #endif |
| 66165 | 67835 | |
| 66166 | 67836 | #ifdef __LITTLE_ENDIAN__ |
| 66167 | #define vqrdmlshh_lane_s16(__p0_827, __p1_827, __p2_827, __p3_827) __extension__ ({ \ | |
| 66168 | int16_t __s0_827 = __p0_827; \ | |
| 66169 | int16_t __s1_827 = __p1_827; \ | |
| 66170 | int16x4_t __s2_827 = __p2_827; \ | |
| 66171 | int16_t __ret_827; \ | |
| 66172 | __ret_827 = vqsubh_s16(__s0_827, vqrdmulhh_s16(__s1_827, vget_lane_s16(__s2_827, __p3_827))); \ | |
| 66173 | __ret_827; \ | |
| 67837 | #define vqrdmlshh_lane_s16(__p0_919, __p1_919, __p2_919, __p3_919) __extension__ ({ \ | |
| 67838 | int16_t __s0_919 = __p0_919; \ | |
| 67839 | int16_t __s1_919 = __p1_919; \ | |
| 67840 | int16x4_t __s2_919 = __p2_919; \ | |
| 67841 | int16_t __ret_919; \ | |
| 67842 | __ret_919 = vqsubh_s16(__s0_919, vqrdmulhh_s16(__s1_919, vget_lane_s16(__s2_919, __p3_919))); \ | |
| 67843 | __ret_919; \ | |
| 66174 | 67844 | }) |
| 66175 | 67845 | #else |
| 66176 | #define vqrdmlshh_lane_s16(__p0_828, __p1_828, __p2_828, __p3_828) __extension__ ({ \ | |
| 66177 | int16_t __s0_828 = __p0_828; \ | |
| 66178 | int16_t __s1_828 = __p1_828; \ | |
| 66179 | int16x4_t __s2_828 = __p2_828; \ | |
| 66180 | int16x4_t __rev2_828; __rev2_828 = __builtin_shufflevector(__s2_828, __s2_828, 3, 2, 1, 0); \ | |
| 66181 | int16_t __ret_828; \ | |
| 66182 | __ret_828 = vqsubh_s16(__s0_828, vqrdmulhh_s16(__s1_828, __noswap_vget_lane_s16(__rev2_828, __p3_828))); \ | |
| 66183 | __ret_828; \ | |
| 67846 | #define vqrdmlshh_lane_s16(__p0_920, __p1_920, __p2_920, __p3_920) __extension__ ({ \ | |
| 67847 | int16_t __s0_920 = __p0_920; \ | |
| 67848 | int16_t __s1_920 = __p1_920; \ | |
| 67849 | int16x4_t __s2_920 = __p2_920; \ | |
| 67850 | int16x4_t __rev2_920; __rev2_920 = __builtin_shufflevector(__s2_920, __s2_920, 3, 2, 1, 0); \ | |
| 67851 | int16_t __ret_920; \ | |
| 67852 | __ret_920 = vqsubh_s16(__s0_920, vqrdmulhh_s16(__s1_920, __noswap_vget_lane_s16(__rev2_920, __p3_920))); \ | |
| 67853 | __ret_920; \ | |
| 66184 | 67854 | }) |
| 66185 | 67855 | #endif |
| 66186 | 67856 | |
| 66187 | 67857 | #ifdef __LITTLE_ENDIAN__ |
| 66188 | #define vqrdmlshs_laneq_s32(__p0_829, __p1_829, __p2_829, __p3_829) __extension__ ({ \ | |
| 66189 | int32_t __s0_829 = __p0_829; \ | |
| 66190 | int32_t __s1_829 = __p1_829; \ | |
| 66191 | int32x4_t __s2_829 = __p2_829; \ | |
| 66192 | int32_t __ret_829; \ | |
| 66193 | __ret_829 = vqsubs_s32(__s0_829, vqrdmulhs_s32(__s1_829, vgetq_lane_s32(__s2_829, __p3_829))); \ | |
| 66194 | __ret_829; \ | |
| 67858 | #define vqrdmlshs_laneq_s32(__p0_921, __p1_921, __p2_921, __p3_921) __extension__ ({ \ | |
| 67859 | int32_t __s0_921 = __p0_921; \ | |
| 67860 | int32_t __s1_921 = __p1_921; \ | |
| 67861 | int32x4_t __s2_921 = __p2_921; \ | |
| 67862 | int32_t __ret_921; \ | |
| 67863 | __ret_921 = vqsubs_s32(__s0_921, vqrdmulhs_s32(__s1_921, vgetq_lane_s32(__s2_921, __p3_921))); \ | |
| 67864 | __ret_921; \ | |
| 66195 | 67865 | }) |
| 66196 | 67866 | #else |
| 66197 | #define vqrdmlshs_laneq_s32(__p0_830, __p1_830, __p2_830, __p3_830) __extension__ ({ \ | |
| 66198 | int32_t __s0_830 = __p0_830; \ | |
| 66199 | int32_t __s1_830 = __p1_830; \ | |
| 66200 | int32x4_t __s2_830 = __p2_830; \ | |
| 66201 | int32x4_t __rev2_830; __rev2_830 = __builtin_shufflevector(__s2_830, __s2_830, 3, 2, 1, 0); \ | |
| 66202 | int32_t __ret_830; \ | |
| 66203 | __ret_830 = vqsubs_s32(__s0_830, vqrdmulhs_s32(__s1_830, __noswap_vgetq_lane_s32(__rev2_830, __p3_830))); \ | |
| 66204 | __ret_830; \ | |
| 67867 | #define vqrdmlshs_laneq_s32(__p0_922, __p1_922, __p2_922, __p3_922) __extension__ ({ \ | |
| 67868 | int32_t __s0_922 = __p0_922; \ | |
| 67869 | int32_t __s1_922 = __p1_922; \ | |
| 67870 | int32x4_t __s2_922 = __p2_922; \ | |
| 67871 | int32x4_t __rev2_922; __rev2_922 = __builtin_shufflevector(__s2_922, __s2_922, 3, 2, 1, 0); \ | |
| 67872 | int32_t __ret_922; \ | |
| 67873 | __ret_922 = vqsubs_s32(__s0_922, vqrdmulhs_s32(__s1_922, __noswap_vgetq_lane_s32(__rev2_922, __p3_922))); \ | |
| 67874 | __ret_922; \ | |
| 66205 | 67875 | }) |
| 66206 | 67876 | #endif |
| 66207 | 67877 | |
| 66208 | 67878 | #ifdef __LITTLE_ENDIAN__ |
| 66209 | #define vqrdmlshh_laneq_s16(__p0_831, __p1_831, __p2_831, __p3_831) __extension__ ({ \ | |
| 66210 | int16_t __s0_831 = __p0_831; \ | |
| 66211 | int16_t __s1_831 = __p1_831; \ | |
| 66212 | int16x8_t __s2_831 = __p2_831; \ | |
| 66213 | int16_t __ret_831; \ | |
| 66214 | __ret_831 = vqsubh_s16(__s0_831, vqrdmulhh_s16(__s1_831, vgetq_lane_s16(__s2_831, __p3_831))); \ | |
| 66215 | __ret_831; \ | |
| 67879 | #define vqrdmlshh_laneq_s16(__p0_923, __p1_923, __p2_923, __p3_923) __extension__ ({ \ | |
| 67880 | int16_t __s0_923 = __p0_923; \ | |
| 67881 | int16_t __s1_923 = __p1_923; \ | |
| 67882 | int16x8_t __s2_923 = __p2_923; \ | |
| 67883 | int16_t __ret_923; \ | |
| 67884 | __ret_923 = vqsubh_s16(__s0_923, vqrdmulhh_s16(__s1_923, vgetq_lane_s16(__s2_923, __p3_923))); \ | |
| 67885 | __ret_923; \ | |
| 66216 | 67886 | }) |
| 66217 | 67887 | #else |
| 66218 | #define vqrdmlshh_laneq_s16(__p0_832, __p1_832, __p2_832, __p3_832) __extension__ ({ \ | |
| 66219 | int16_t __s0_832 = __p0_832; \ | |
| 66220 | int16_t __s1_832 = __p1_832; \ | |
| 66221 | int16x8_t __s2_832 = __p2_832; \ | |
| 66222 | int16x8_t __rev2_832; __rev2_832 = __builtin_shufflevector(__s2_832, __s2_832, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 66223 | int16_t __ret_832; \ | |
| 66224 | __ret_832 = vqsubh_s16(__s0_832, vqrdmulhh_s16(__s1_832, __noswap_vgetq_lane_s16(__rev2_832, __p3_832))); \ | |
| 66225 | __ret_832; \ | |
| 67888 | #define vqrdmlshh_laneq_s16(__p0_924, __p1_924, __p2_924, __p3_924) __extension__ ({ \ | |
| 67889 | int16_t __s0_924 = __p0_924; \ | |
| 67890 | int16_t __s1_924 = __p1_924; \ | |
| 67891 | int16x8_t __s2_924 = __p2_924; \ | |
| 67892 | int16x8_t __rev2_924; __rev2_924 = __builtin_shufflevector(__s2_924, __s2_924, 7, 6, 5, 4, 3, 2, 1, 0); \ | |
| 67893 | int16_t __ret_924; \ | |
| 67894 | __ret_924 = vqsubh_s16(__s0_924, vqrdmulhh_s16(__s1_924, __noswap_vgetq_lane_s16(__rev2_924, __p3_924))); \ | |
| 67895 | __ret_924; \ | |
| 66226 | 67896 | }) |
| 66227 | 67897 | #endif |
| 66228 | 67898 | |
| ... | ... | @@ -66535,136 +68205,136 @@ __ai int32x4_t vaddw_high_s16(int32x4_t __p0, int16x8_t __p1) { |
| 66535 | 68205 | #endif |
| 66536 | 68206 | |
| 66537 | 68207 | #ifdef __LITTLE_ENDIAN__ |
| 66538 | #define vcopyq_lane_p64(__p0_833, __p1_833, __p2_833, __p3_833) __extension__ ({ \ | |
| 66539 | poly64x2_t __s0_833 = __p0_833; \ | |
| 66540 | poly64x1_t __s2_833 = __p2_833; \ | |
| 66541 | poly64x2_t __ret_833; \ | |
| 66542 | __ret_833 = vsetq_lane_p64(vget_lane_p64(__s2_833, __p3_833), __s0_833, __p1_833); \ | |
| 66543 | __ret_833; \ | |
| 68208 | #define vcopyq_lane_p64(__p0_925, __p1_925, __p2_925, __p3_925) __extension__ ({ \ | |
| 68209 | poly64x2_t __s0_925 = __p0_925; \ | |
| 68210 | poly64x1_t __s2_925 = __p2_925; \ | |
| 68211 | poly64x2_t __ret_925; \ | |
| 68212 | __ret_925 = vsetq_lane_p64(vget_lane_p64(__s2_925, __p3_925), __s0_925, __p1_925); \ | |
| 68213 | __ret_925; \ | |
| 66544 | 68214 | }) |
| 66545 | 68215 | #else |
| 66546 | #define vcopyq_lane_p64(__p0_834, __p1_834, __p2_834, __p3_834) __extension__ ({ \ | |
| 66547 | poly64x2_t __s0_834 = __p0_834; \ | |
| 66548 | poly64x1_t __s2_834 = __p2_834; \ | |
| 66549 | poly64x2_t __rev0_834; __rev0_834 = __builtin_shufflevector(__s0_834, __s0_834, 1, 0); \ | |
| 66550 | poly64x2_t __ret_834; \ | |
| 66551 | __ret_834 = __noswap_vsetq_lane_p64(vget_lane_p64(__s2_834, __p3_834), __rev0_834, __p1_834); \ | |
| 66552 | __ret_834 = __builtin_shufflevector(__ret_834, __ret_834, 1, 0); \ | |
| 66553 | __ret_834; \ | |
| 68216 | #define vcopyq_lane_p64(__p0_926, __p1_926, __p2_926, __p3_926) __extension__ ({ \ | |
| 68217 | poly64x2_t __s0_926 = __p0_926; \ | |
| 68218 | poly64x1_t __s2_926 = __p2_926; \ | |
| 68219 | poly64x2_t __rev0_926; __rev0_926 = __builtin_shufflevector(__s0_926, __s0_926, 1, 0); \ | |
| 68220 | poly64x2_t __ret_926; \ | |
| 68221 | __ret_926 = __noswap_vsetq_lane_p64(vget_lane_p64(__s2_926, __p3_926), __rev0_926, __p1_926); \ | |
| 68222 | __ret_926 = __builtin_shufflevector(__ret_926, __ret_926, 1, 0); \ | |
| 68223 | __ret_926; \ | |
| 66554 | 68224 | }) |
| 66555 | 68225 | #endif |
| 66556 | 68226 | |
| 66557 | 68227 | #ifdef __LITTLE_ENDIAN__ |
| 66558 | #define vcopyq_lane_f64(__p0_835, __p1_835, __p2_835, __p3_835) __extension__ ({ \ | |
| 66559 | float64x2_t __s0_835 = __p0_835; \ | |
| 66560 | float64x1_t __s2_835 = __p2_835; \ | |
| 66561 | float64x2_t __ret_835; \ | |
| 66562 | __ret_835 = vsetq_lane_f64(vget_lane_f64(__s2_835, __p3_835), __s0_835, __p1_835); \ | |
| 66563 | __ret_835; \ | |
| 68228 | #define vcopyq_lane_f64(__p0_927, __p1_927, __p2_927, __p3_927) __extension__ ({ \ | |
| 68229 | float64x2_t __s0_927 = __p0_927; \ | |
| 68230 | float64x1_t __s2_927 = __p2_927; \ | |
| 68231 | float64x2_t __ret_927; \ | |
| 68232 | __ret_927 = vsetq_lane_f64(vget_lane_f64(__s2_927, __p3_927), __s0_927, __p1_927); \ | |
| 68233 | __ret_927; \ | |
| 66564 | 68234 | }) |
| 66565 | 68235 | #else |
| 66566 | #define vcopyq_lane_f64(__p0_836, __p1_836, __p2_836, __p3_836) __extension__ ({ \ | |
| 66567 | float64x2_t __s0_836 = __p0_836; \ | |
| 66568 | float64x1_t __s2_836 = __p2_836; \ | |
| 66569 | float64x2_t __rev0_836; __rev0_836 = __builtin_shufflevector(__s0_836, __s0_836, 1, 0); \ | |
| 66570 | float64x2_t __ret_836; \ | |
| 66571 | __ret_836 = __noswap_vsetq_lane_f64(vget_lane_f64(__s2_836, __p3_836), __rev0_836, __p1_836); \ | |
| 66572 | __ret_836 = __builtin_shufflevector(__ret_836, __ret_836, 1, 0); \ | |
| 66573 | __ret_836; \ | |
| 68236 | #define vcopyq_lane_f64(__p0_928, __p1_928, __p2_928, __p3_928) __extension__ ({ \ | |
| 68237 | float64x2_t __s0_928 = __p0_928; \ | |
| 68238 | float64x1_t __s2_928 = __p2_928; \ | |
| 68239 | float64x2_t __rev0_928; __rev0_928 = __builtin_shufflevector(__s0_928, __s0_928, 1, 0); \ | |
| 68240 | float64x2_t __ret_928; \ | |
| 68241 | __ret_928 = __noswap_vsetq_lane_f64(vget_lane_f64(__s2_928, __p3_928), __rev0_928, __p1_928); \ | |
| 68242 | __ret_928 = __builtin_shufflevector(__ret_928, __ret_928, 1, 0); \ | |
| 68243 | __ret_928; \ | |
| 66574 | 68244 | }) |
| 66575 | 68245 | #endif |
| 66576 | 68246 | |
| 66577 | #define vcopy_lane_p64(__p0_837, __p1_837, __p2_837, __p3_837) __extension__ ({ \ | |
| 66578 | poly64x1_t __s0_837 = __p0_837; \ | |
| 66579 | poly64x1_t __s2_837 = __p2_837; \ | |
| 66580 | poly64x1_t __ret_837; \ | |
| 66581 | __ret_837 = vset_lane_p64(vget_lane_p64(__s2_837, __p3_837), __s0_837, __p1_837); \ | |
| 66582 | __ret_837; \ | |
| 68247 | #define vcopy_lane_p64(__p0_929, __p1_929, __p2_929, __p3_929) __extension__ ({ \ | |
| 68248 | poly64x1_t __s0_929 = __p0_929; \ | |
| 68249 | poly64x1_t __s2_929 = __p2_929; \ | |
| 68250 | poly64x1_t __ret_929; \ | |
| 68251 | __ret_929 = vset_lane_p64(vget_lane_p64(__s2_929, __p3_929), __s0_929, __p1_929); \ | |
| 68252 | __ret_929; \ | |
| 66583 | 68253 | }) |
| 66584 | #define vcopy_lane_f64(__p0_838, __p1_838, __p2_838, __p3_838) __extension__ ({ \ | |
| 66585 | float64x1_t __s0_838 = __p0_838; \ | |
| 66586 | float64x1_t __s2_838 = __p2_838; \ | |
| 66587 | float64x1_t __ret_838; \ | |
| 66588 | __ret_838 = vset_lane_f64(vget_lane_f64(__s2_838, __p3_838), __s0_838, __p1_838); \ | |
| 66589 | __ret_838; \ | |
| 68254 | #define vcopy_lane_f64(__p0_930, __p1_930, __p2_930, __p3_930) __extension__ ({ \ | |
| 68255 | float64x1_t __s0_930 = __p0_930; \ | |
| 68256 | float64x1_t __s2_930 = __p2_930; \ | |
| 68257 | float64x1_t __ret_930; \ | |
| 68258 | __ret_930 = vset_lane_f64(vget_lane_f64(__s2_930, __p3_930), __s0_930, __p1_930); \ | |
| 68259 | __ret_930; \ | |
| 66590 | 68260 | }) |
| 66591 | 68261 | #ifdef __LITTLE_ENDIAN__ |
| 66592 | #define vcopyq_laneq_p64(__p0_839, __p1_839, __p2_839, __p3_839) __extension__ ({ \ | |
| 66593 | poly64x2_t __s0_839 = __p0_839; \ | |
| 66594 | poly64x2_t __s2_839 = __p2_839; \ | |
| 66595 | poly64x2_t __ret_839; \ | |
| 66596 | __ret_839 = vsetq_lane_p64(vgetq_lane_p64(__s2_839, __p3_839), __s0_839, __p1_839); \ | |
| 66597 | __ret_839; \ | |
| 68262 | #define vcopyq_laneq_p64(__p0_931, __p1_931, __p2_931, __p3_931) __extension__ ({ \ | |
| 68263 | poly64x2_t __s0_931 = __p0_931; \ | |
| 68264 | poly64x2_t __s2_931 = __p2_931; \ | |
| 68265 | poly64x2_t __ret_931; \ | |
| 68266 | __ret_931 = vsetq_lane_p64(vgetq_lane_p64(__s2_931, __p3_931), __s0_931, __p1_931); \ | |
| 68267 | __ret_931; \ | |
| 66598 | 68268 | }) |
| 66599 | 68269 | #else |
| 66600 | #define vcopyq_laneq_p64(__p0_840, __p1_840, __p2_840, __p3_840) __extension__ ({ \ | |
| 66601 | poly64x2_t __s0_840 = __p0_840; \ | |
| 66602 | poly64x2_t __s2_840 = __p2_840; \ | |
| 66603 | poly64x2_t __rev0_840; __rev0_840 = __builtin_shufflevector(__s0_840, __s0_840, 1, 0); \ | |
| 66604 | poly64x2_t __rev2_840; __rev2_840 = __builtin_shufflevector(__s2_840, __s2_840, 1, 0); \ | |
| 66605 | poly64x2_t __ret_840; \ | |
| 66606 | __ret_840 = __noswap_vsetq_lane_p64(__noswap_vgetq_lane_p64(__rev2_840, __p3_840), __rev0_840, __p1_840); \ | |
| 66607 | __ret_840 = __builtin_shufflevector(__ret_840, __ret_840, 1, 0); \ | |
| 66608 | __ret_840; \ | |
| 68270 | #define vcopyq_laneq_p64(__p0_932, __p1_932, __p2_932, __p3_932) __extension__ ({ \ | |
| 68271 | poly64x2_t __s0_932 = __p0_932; \ | |
| 68272 | poly64x2_t __s2_932 = __p2_932; \ | |
| 68273 | poly64x2_t __rev0_932; __rev0_932 = __builtin_shufflevector(__s0_932, __s0_932, 1, 0); \ | |
| 68274 | poly64x2_t __rev2_932; __rev2_932 = __builtin_shufflevector(__s2_932, __s2_932, 1, 0); \ | |
| 68275 | poly64x2_t __ret_932; \ | |
| 68276 | __ret_932 = __noswap_vsetq_lane_p64(__noswap_vgetq_lane_p64(__rev2_932, __p3_932), __rev0_932, __p1_932); \ | |
| 68277 | __ret_932 = __builtin_shufflevector(__ret_932, __ret_932, 1, 0); \ | |
| 68278 | __ret_932; \ | |
| 66609 | 68279 | }) |
| 66610 | 68280 | #endif |
| 66611 | 68281 | |
| 66612 | 68282 | #ifdef __LITTLE_ENDIAN__ |
| 66613 | #define vcopyq_laneq_f64(__p0_841, __p1_841, __p2_841, __p3_841) __extension__ ({ \ | |
| 66614 | float64x2_t __s0_841 = __p0_841; \ | |
| 66615 | float64x2_t __s2_841 = __p2_841; \ | |
| 66616 | float64x2_t __ret_841; \ | |
| 66617 | __ret_841 = vsetq_lane_f64(vgetq_lane_f64(__s2_841, __p3_841), __s0_841, __p1_841); \ | |
| 66618 | __ret_841; \ | |
| 68283 | #define vcopyq_laneq_f64(__p0_933, __p1_933, __p2_933, __p3_933) __extension__ ({ \ | |
| 68284 | float64x2_t __s0_933 = __p0_933; \ | |
| 68285 | float64x2_t __s2_933 = __p2_933; \ | |
| 68286 | float64x2_t __ret_933; \ | |
| 68287 | __ret_933 = vsetq_lane_f64(vgetq_lane_f64(__s2_933, __p3_933), __s0_933, __p1_933); \ | |
| 68288 | __ret_933; \ | |
| 66619 | 68289 | }) |
| 66620 | 68290 | #else |
| 66621 | #define vcopyq_laneq_f64(__p0_842, __p1_842, __p2_842, __p3_842) __extension__ ({ \ | |
| 66622 | float64x2_t __s0_842 = __p0_842; \ | |
| 66623 | float64x2_t __s2_842 = __p2_842; \ | |
| 66624 | float64x2_t __rev0_842; __rev0_842 = __builtin_shufflevector(__s0_842, __s0_842, 1, 0); \ | |
| 66625 | float64x2_t __rev2_842; __rev2_842 = __builtin_shufflevector(__s2_842, __s2_842, 1, 0); \ | |
| 66626 | float64x2_t __ret_842; \ | |
| 66627 | __ret_842 = __noswap_vsetq_lane_f64(__noswap_vgetq_lane_f64(__rev2_842, __p3_842), __rev0_842, __p1_842); \ | |
| 66628 | __ret_842 = __builtin_shufflevector(__ret_842, __ret_842, 1, 0); \ | |
| 66629 | __ret_842; \ | |
| 68291 | #define vcopyq_laneq_f64(__p0_934, __p1_934, __p2_934, __p3_934) __extension__ ({ \ | |
| 68292 | float64x2_t __s0_934 = __p0_934; \ | |
| 68293 | float64x2_t __s2_934 = __p2_934; \ | |
| 68294 | float64x2_t __rev0_934; __rev0_934 = __builtin_shufflevector(__s0_934, __s0_934, 1, 0); \ | |
| 68295 | float64x2_t __rev2_934; __rev2_934 = __builtin_shufflevector(__s2_934, __s2_934, 1, 0); \ | |
| 68296 | float64x2_t __ret_934; \ | |
| 68297 | __ret_934 = __noswap_vsetq_lane_f64(__noswap_vgetq_lane_f64(__rev2_934, __p3_934), __rev0_934, __p1_934); \ | |
| 68298 | __ret_934 = __builtin_shufflevector(__ret_934, __ret_934, 1, 0); \ | |
| 68299 | __ret_934; \ | |
| 66630 | 68300 | }) |
| 66631 | 68301 | #endif |
| 66632 | 68302 | |
| 66633 | 68303 | #ifdef __LITTLE_ENDIAN__ |
| 66634 | #define vcopy_laneq_p64(__p0_843, __p1_843, __p2_843, __p3_843) __extension__ ({ \ | |
| 66635 | poly64x1_t __s0_843 = __p0_843; \ | |
| 66636 | poly64x2_t __s2_843 = __p2_843; \ | |
| 66637 | poly64x1_t __ret_843; \ | |
| 66638 | __ret_843 = vset_lane_p64(vgetq_lane_p64(__s2_843, __p3_843), __s0_843, __p1_843); \ | |
| 66639 | __ret_843; \ | |
| 68304 | #define vcopy_laneq_p64(__p0_935, __p1_935, __p2_935, __p3_935) __extension__ ({ \ | |
| 68305 | poly64x1_t __s0_935 = __p0_935; \ | |
| 68306 | poly64x2_t __s2_935 = __p2_935; \ | |
| 68307 | poly64x1_t __ret_935; \ | |
| 68308 | __ret_935 = vset_lane_p64(vgetq_lane_p64(__s2_935, __p3_935), __s0_935, __p1_935); \ | |
| 68309 | __ret_935; \ | |
| 66640 | 68310 | }) |
| 66641 | 68311 | #else |
| 66642 | #define vcopy_laneq_p64(__p0_844, __p1_844, __p2_844, __p3_844) __extension__ ({ \ | |
| 66643 | poly64x1_t __s0_844 = __p0_844; \ | |
| 66644 | poly64x2_t __s2_844 = __p2_844; \ | |
| 66645 | poly64x2_t __rev2_844; __rev2_844 = __builtin_shufflevector(__s2_844, __s2_844, 1, 0); \ | |
| 66646 | poly64x1_t __ret_844; \ | |
| 66647 | __ret_844 = vset_lane_p64(__noswap_vgetq_lane_p64(__rev2_844, __p3_844), __s0_844, __p1_844); \ | |
| 66648 | __ret_844; \ | |
| 68312 | #define vcopy_laneq_p64(__p0_936, __p1_936, __p2_936, __p3_936) __extension__ ({ \ | |
| 68313 | poly64x1_t __s0_936 = __p0_936; \ | |
| 68314 | poly64x2_t __s2_936 = __p2_936; \ | |
| 68315 | poly64x2_t __rev2_936; __rev2_936 = __builtin_shufflevector(__s2_936, __s2_936, 1, 0); \ | |
| 68316 | poly64x1_t __ret_936; \ | |
| 68317 | __ret_936 = vset_lane_p64(__noswap_vgetq_lane_p64(__rev2_936, __p3_936), __s0_936, __p1_936); \ | |
| 68318 | __ret_936; \ | |
| 66649 | 68319 | }) |
| 66650 | 68320 | #endif |
| 66651 | 68321 | |
| 66652 | 68322 | #ifdef __LITTLE_ENDIAN__ |
| 66653 | #define vcopy_laneq_f64(__p0_845, __p1_845, __p2_845, __p3_845) __extension__ ({ \ | |
| 66654 | float64x1_t __s0_845 = __p0_845; \ | |
| 66655 | float64x2_t __s2_845 = __p2_845; \ | |
| 66656 | float64x1_t __ret_845; \ | |
| 66657 | __ret_845 = vset_lane_f64(vgetq_lane_f64(__s2_845, __p3_845), __s0_845, __p1_845); \ | |
| 66658 | __ret_845; \ | |
| 68323 | #define vcopy_laneq_f64(__p0_937, __p1_937, __p2_937, __p3_937) __extension__ ({ \ | |
| 68324 | float64x1_t __s0_937 = __p0_937; \ | |
| 68325 | float64x2_t __s2_937 = __p2_937; \ | |
| 68326 | float64x1_t __ret_937; \ | |
| 68327 | __ret_937 = vset_lane_f64(vgetq_lane_f64(__s2_937, __p3_937), __s0_937, __p1_937); \ | |
| 68328 | __ret_937; \ | |
| 66659 | 68329 | }) |
| 66660 | 68330 | #else |
| 66661 | #define vcopy_laneq_f64(__p0_846, __p1_846, __p2_846, __p3_846) __extension__ ({ \ | |
| 66662 | float64x1_t __s0_846 = __p0_846; \ | |
| 66663 | float64x2_t __s2_846 = __p2_846; \ | |
| 66664 | float64x2_t __rev2_846; __rev2_846 = __builtin_shufflevector(__s2_846, __s2_846, 1, 0); \ | |
| 66665 | float64x1_t __ret_846; \ | |
| 66666 | __ret_846 = vset_lane_f64(__noswap_vgetq_lane_f64(__rev2_846, __p3_846), __s0_846, __p1_846); \ | |
| 66667 | __ret_846; \ | |
| 68331 | #define vcopy_laneq_f64(__p0_938, __p1_938, __p2_938, __p3_938) __extension__ ({ \ | |
| 68332 | float64x1_t __s0_938 = __p0_938; \ | |
| 68333 | float64x2_t __s2_938 = __p2_938; \ | |
| 68334 | float64x2_t __rev2_938; __rev2_938 = __builtin_shufflevector(__s2_938, __s2_938, 1, 0); \ | |
| 68335 | float64x1_t __ret_938; \ | |
| 68336 | __ret_938 = vset_lane_f64(__noswap_vgetq_lane_f64(__rev2_938, __p3_938), __s0_938, __p1_938); \ | |
| 68337 | __ret_938; \ | |
| 66668 | 68338 | }) |
| 66669 | 68339 | #endif |
| 66670 | 68340 | |
| ... | ... | @@ -67020,38 +68690,38 @@ __ai int32x4_t vmlsl_high_n_s16(int32x4_t __p0, int16x8_t __p1, int16_t __p2) { |
| 67020 | 68690 | } |
| 67021 | 68691 | #endif |
| 67022 | 68692 | |
| 67023 | #define vmulx_lane_f64(__p0_847, __p1_847, __p2_847) __extension__ ({ \ | |
| 67024 | float64x1_t __s0_847 = __p0_847; \ | |
| 67025 | float64x1_t __s1_847 = __p1_847; \ | |
| 67026 | float64x1_t __ret_847; \ | |
| 67027 | float64_t __x_847 = vget_lane_f64(__s0_847, 0); \ | |
| 67028 | float64_t __y_847 = vget_lane_f64(__s1_847, __p2_847); \ | |
| 67029 | float64_t __z_847 = vmulxd_f64(__x_847, __y_847); \ | |
| 67030 | __ret_847 = vset_lane_f64(__z_847, __s0_847, __p2_847); \ | |
| 67031 | __ret_847; \ | |
| 68693 | #define vmulx_lane_f64(__p0_939, __p1_939, __p2_939) __extension__ ({ \ | |
| 68694 | float64x1_t __s0_939 = __p0_939; \ | |
| 68695 | float64x1_t __s1_939 = __p1_939; \ | |
| 68696 | float64x1_t __ret_939; \ | |
| 68697 | float64_t __x_939 = vget_lane_f64(__s0_939, 0); \ | |
| 68698 | float64_t __y_939 = vget_lane_f64(__s1_939, __p2_939); \ | |
| 68699 | float64_t __z_939 = vmulxd_f64(__x_939, __y_939); \ | |
| 68700 | __ret_939 = vset_lane_f64(__z_939, __s0_939, __p2_939); \ | |
| 68701 | __ret_939; \ | |
| 67032 | 68702 | }) |
| 67033 | 68703 | #ifdef __LITTLE_ENDIAN__ |
| 67034 | #define vmulx_laneq_f64(__p0_848, __p1_848, __p2_848) __extension__ ({ \ | |
| 67035 | float64x1_t __s0_848 = __p0_848; \ | |
| 67036 | float64x2_t __s1_848 = __p1_848; \ | |
| 67037 | float64x1_t __ret_848; \ | |
| 67038 | float64_t __x_848 = vget_lane_f64(__s0_848, 0); \ | |
| 67039 | float64_t __y_848 = vgetq_lane_f64(__s1_848, __p2_848); \ | |
| 67040 | float64_t __z_848 = vmulxd_f64(__x_848, __y_848); \ | |
| 67041 | __ret_848 = vset_lane_f64(__z_848, __s0_848, 0); \ | |
| 67042 | __ret_848; \ | |
| 68704 | #define vmulx_laneq_f64(__p0_940, __p1_940, __p2_940) __extension__ ({ \ | |
| 68705 | float64x1_t __s0_940 = __p0_940; \ | |
| 68706 | float64x2_t __s1_940 = __p1_940; \ | |
| 68707 | float64x1_t __ret_940; \ | |
| 68708 | float64_t __x_940 = vget_lane_f64(__s0_940, 0); \ | |
| 68709 | float64_t __y_940 = vgetq_lane_f64(__s1_940, __p2_940); \ | |
| 68710 | float64_t __z_940 = vmulxd_f64(__x_940, __y_940); \ | |
| 68711 | __ret_940 = vset_lane_f64(__z_940, __s0_940, 0); \ | |
| 68712 | __ret_940; \ | |
| 67043 | 68713 | }) |
| 67044 | 68714 | #else |
| 67045 | #define vmulx_laneq_f64(__p0_849, __p1_849, __p2_849) __extension__ ({ \ | |
| 67046 | float64x1_t __s0_849 = __p0_849; \ | |
| 67047 | float64x2_t __s1_849 = __p1_849; \ | |
| 67048 | float64x2_t __rev1_849; __rev1_849 = __builtin_shufflevector(__s1_849, __s1_849, 1, 0); \ | |
| 67049 | float64x1_t __ret_849; \ | |
| 67050 | float64_t __x_849 = vget_lane_f64(__s0_849, 0); \ | |
| 67051 | float64_t __y_849 = __noswap_vgetq_lane_f64(__rev1_849, __p2_849); \ | |
| 67052 | float64_t __z_849 = vmulxd_f64(__x_849, __y_849); \ | |
| 67053 | __ret_849 = vset_lane_f64(__z_849, __s0_849, 0); \ | |
| 67054 | __ret_849; \ | |
| 68715 | #define vmulx_laneq_f64(__p0_941, __p1_941, __p2_941) __extension__ ({ \ | |
| 68716 | float64x1_t __s0_941 = __p0_941; \ | |
| 68717 | float64x2_t __s1_941 = __p1_941; \ | |
| 68718 | float64x2_t __rev1_941; __rev1_941 = __builtin_shufflevector(__s1_941, __s1_941, 1, 0); \ | |
| 68719 | float64x1_t __ret_941; \ | |
| 68720 | float64_t __x_941 = vget_lane_f64(__s0_941, 0); \ | |
| 68721 | float64_t __y_941 = __noswap_vgetq_lane_f64(__rev1_941, __p2_941); \ | |
| 68722 | float64_t __z_941 = vmulxd_f64(__x_941, __y_941); \ | |
| 68723 | __ret_941 = vset_lane_f64(__z_941, __s0_941, 0); \ | |
| 68724 | __ret_941; \ | |
| 67055 | 68725 | }) |
| 67056 | 68726 | #endif |
| 67057 | 68727 |
lib/include/arm_sve.h+80-80| ... | ... | @@ -94,7 +94,7 @@ typedef __clang_svbfloat16x2_t svbfloat16x2_t; |
| 94 | 94 | typedef __clang_svbfloat16x3_t svbfloat16x3_t; |
| 95 | 95 | typedef __clang_svbfloat16x4_t svbfloat16x4_t; |
| 96 | 96 | #endif |
| 97 | typedef enum | |
| 97 | enum svpattern | |
| 98 | 98 | { |
| 99 | 99 | SV_POW2 = 0, |
| 100 | 100 | SV_VL1 = 1, |
| ... | ... | @@ -113,9 +113,9 @@ typedef enum |
| 113 | 113 | SV_MUL4 = 29, |
| 114 | 114 | SV_MUL3 = 30, |
| 115 | 115 | SV_ALL = 31 |
| 116 | } sv_pattern; | |
| 116 | }; | |
| 117 | 117 | |
| 118 | typedef enum | |
| 118 | enum svprfop | |
| 119 | 119 | { |
| 120 | 120 | SV_PLDL1KEEP = 0, |
| 121 | 121 | SV_PLDL1STRM = 1, |
| ... | ... | @@ -129,7 +129,7 @@ typedef enum |
| 129 | 129 | SV_PSTL2STRM = 11, |
| 130 | 130 | SV_PSTL3KEEP = 12, |
| 131 | 131 | SV_PSTL3STRM = 13 |
| 132 | } sv_prfop; | |
| 132 | }; | |
| 133 | 133 | |
| 134 | 134 | /* Function attributes */ |
| 135 | 135 | #define __aio static inline __attribute__((__always_inline__, __nodebug__, __overloadable__)) |
| ... | ... | @@ -10013,69 +10013,69 @@ int16_t svorv(svbool_t, svint16_t); |
| 10013 | 10013 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svpfirst_b))) |
| 10014 | 10014 | svbool_t svpfirst(svbool_t, svbool_t); |
| 10015 | 10015 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_u32base))) |
| 10016 | void svprfb_gather(svbool_t, svuint32_t, sv_prfop); | |
| 10016 | void svprfb_gather(svbool_t, svuint32_t, enum svprfop); | |
| 10017 | 10017 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_u64base))) |
| 10018 | void svprfb_gather(svbool_t, svuint64_t, sv_prfop); | |
| 10018 | void svprfb_gather(svbool_t, svuint64_t, enum svprfop); | |
| 10019 | 10019 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_u32base_offset))) |
| 10020 | void svprfb_gather_offset(svbool_t, svuint32_t, int64_t, sv_prfop); | |
| 10020 | void svprfb_gather_offset(svbool_t, svuint32_t, int64_t, enum svprfop); | |
| 10021 | 10021 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_u64base_offset))) |
| 10022 | void svprfb_gather_offset(svbool_t, svuint64_t, int64_t, sv_prfop); | |
| 10022 | void svprfb_gather_offset(svbool_t, svuint64_t, int64_t, enum svprfop); | |
| 10023 | 10023 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_s32offset))) |
| 10024 | void svprfb_gather_offset(svbool_t, void const *, svint32_t, sv_prfop); | |
| 10024 | void svprfb_gather_offset(svbool_t, void const *, svint32_t, enum svprfop); | |
| 10025 | 10025 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_u32offset))) |
| 10026 | void svprfb_gather_offset(svbool_t, void const *, svuint32_t, sv_prfop); | |
| 10026 | void svprfb_gather_offset(svbool_t, void const *, svuint32_t, enum svprfop); | |
| 10027 | 10027 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_s64offset))) |
| 10028 | void svprfb_gather_offset(svbool_t, void const *, svint64_t, sv_prfop); | |
| 10028 | void svprfb_gather_offset(svbool_t, void const *, svint64_t, enum svprfop); | |
| 10029 | 10029 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfb_gather_u64offset))) |
| 10030 | void svprfb_gather_offset(svbool_t, void const *, svuint64_t, sv_prfop); | |
| 10030 | void svprfb_gather_offset(svbool_t, void const *, svuint64_t, enum svprfop); | |
| 10031 | 10031 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_u32base))) |
| 10032 | void svprfd_gather(svbool_t, svuint32_t, sv_prfop); | |
| 10032 | void svprfd_gather(svbool_t, svuint32_t, enum svprfop); | |
| 10033 | 10033 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_u64base))) |
| 10034 | void svprfd_gather(svbool_t, svuint64_t, sv_prfop); | |
| 10034 | void svprfd_gather(svbool_t, svuint64_t, enum svprfop); | |
| 10035 | 10035 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_u32base_index))) |
| 10036 | void svprfd_gather_index(svbool_t, svuint32_t, int64_t, sv_prfop); | |
| 10036 | void svprfd_gather_index(svbool_t, svuint32_t, int64_t, enum svprfop); | |
| 10037 | 10037 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_u64base_index))) |
| 10038 | void svprfd_gather_index(svbool_t, svuint64_t, int64_t, sv_prfop); | |
| 10038 | void svprfd_gather_index(svbool_t, svuint64_t, int64_t, enum svprfop); | |
| 10039 | 10039 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_s32index))) |
| 10040 | void svprfd_gather_index(svbool_t, void const *, svint32_t, sv_prfop); | |
| 10040 | void svprfd_gather_index(svbool_t, void const *, svint32_t, enum svprfop); | |
| 10041 | 10041 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_u32index))) |
| 10042 | void svprfd_gather_index(svbool_t, void const *, svuint32_t, sv_prfop); | |
| 10042 | void svprfd_gather_index(svbool_t, void const *, svuint32_t, enum svprfop); | |
| 10043 | 10043 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_s64index))) |
| 10044 | void svprfd_gather_index(svbool_t, void const *, svint64_t, sv_prfop); | |
| 10044 | void svprfd_gather_index(svbool_t, void const *, svint64_t, enum svprfop); | |
| 10045 | 10045 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfd_gather_u64index))) |
| 10046 | void svprfd_gather_index(svbool_t, void const *, svuint64_t, sv_prfop); | |
| 10046 | void svprfd_gather_index(svbool_t, void const *, svuint64_t, enum svprfop); | |
| 10047 | 10047 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_u32base))) |
| 10048 | void svprfh_gather(svbool_t, svuint32_t, sv_prfop); | |
| 10048 | void svprfh_gather(svbool_t, svuint32_t, enum svprfop); | |
| 10049 | 10049 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_u64base))) |
| 10050 | void svprfh_gather(svbool_t, svuint64_t, sv_prfop); | |
| 10050 | void svprfh_gather(svbool_t, svuint64_t, enum svprfop); | |
| 10051 | 10051 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_u32base_index))) |
| 10052 | void svprfh_gather_index(svbool_t, svuint32_t, int64_t, sv_prfop); | |
| 10052 | void svprfh_gather_index(svbool_t, svuint32_t, int64_t, enum svprfop); | |
| 10053 | 10053 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_u64base_index))) |
| 10054 | void svprfh_gather_index(svbool_t, svuint64_t, int64_t, sv_prfop); | |
| 10054 | void svprfh_gather_index(svbool_t, svuint64_t, int64_t, enum svprfop); | |
| 10055 | 10055 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_s32index))) |
| 10056 | void svprfh_gather_index(svbool_t, void const *, svint32_t, sv_prfop); | |
| 10056 | void svprfh_gather_index(svbool_t, void const *, svint32_t, enum svprfop); | |
| 10057 | 10057 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_u32index))) |
| 10058 | void svprfh_gather_index(svbool_t, void const *, svuint32_t, sv_prfop); | |
| 10058 | void svprfh_gather_index(svbool_t, void const *, svuint32_t, enum svprfop); | |
| 10059 | 10059 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_s64index))) |
| 10060 | void svprfh_gather_index(svbool_t, void const *, svint64_t, sv_prfop); | |
| 10060 | void svprfh_gather_index(svbool_t, void const *, svint64_t, enum svprfop); | |
| 10061 | 10061 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfh_gather_u64index))) |
| 10062 | void svprfh_gather_index(svbool_t, void const *, svuint64_t, sv_prfop); | |
| 10062 | void svprfh_gather_index(svbool_t, void const *, svuint64_t, enum svprfop); | |
| 10063 | 10063 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_u32base))) |
| 10064 | void svprfw_gather(svbool_t, svuint32_t, sv_prfop); | |
| 10064 | void svprfw_gather(svbool_t, svuint32_t, enum svprfop); | |
| 10065 | 10065 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_u64base))) |
| 10066 | void svprfw_gather(svbool_t, svuint64_t, sv_prfop); | |
| 10066 | void svprfw_gather(svbool_t, svuint64_t, enum svprfop); | |
| 10067 | 10067 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_u32base_index))) |
| 10068 | void svprfw_gather_index(svbool_t, svuint32_t, int64_t, sv_prfop); | |
| 10068 | void svprfw_gather_index(svbool_t, svuint32_t, int64_t, enum svprfop); | |
| 10069 | 10069 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_u64base_index))) |
| 10070 | void svprfw_gather_index(svbool_t, svuint64_t, int64_t, sv_prfop); | |
| 10070 | void svprfw_gather_index(svbool_t, svuint64_t, int64_t, enum svprfop); | |
| 10071 | 10071 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_s32index))) |
| 10072 | void svprfw_gather_index(svbool_t, void const *, svint32_t, sv_prfop); | |
| 10072 | void svprfw_gather_index(svbool_t, void const *, svint32_t, enum svprfop); | |
| 10073 | 10073 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_u32index))) |
| 10074 | void svprfw_gather_index(svbool_t, void const *, svuint32_t, sv_prfop); | |
| 10074 | void svprfw_gather_index(svbool_t, void const *, svuint32_t, enum svprfop); | |
| 10075 | 10075 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_s64index))) |
| 10076 | void svprfw_gather_index(svbool_t, void const *, svint64_t, sv_prfop); | |
| 10076 | void svprfw_gather_index(svbool_t, void const *, svint64_t, enum svprfop); | |
| 10077 | 10077 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svprfw_gather_u64index))) |
| 10078 | void svprfw_gather_index(svbool_t, void const *, svuint64_t, sv_prfop); | |
| 10078 | void svprfw_gather_index(svbool_t, void const *, svuint64_t, enum svprfop); | |
| 10079 | 10079 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqadd_n_s8))) |
| 10080 | 10080 | svint8_t svqadd(svint8_t, int8_t); |
| 10081 | 10081 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqadd_n_s32))) |
| ... | ... | @@ -10117,13 +10117,13 @@ uint32_t svqdecb(uint32_t, uint64_t); |
| 10117 | 10117 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecb_n_u64))) |
| 10118 | 10118 | uint64_t svqdecb(uint64_t, uint64_t); |
| 10119 | 10119 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecb_pat_n_s32))) |
| 10120 | int32_t svqdecb_pat(int32_t, sv_pattern, uint64_t); | |
| 10120 | int32_t svqdecb_pat(int32_t, enum svpattern, uint64_t); | |
| 10121 | 10121 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecb_pat_n_s64))) |
| 10122 | int64_t svqdecb_pat(int64_t, sv_pattern, uint64_t); | |
| 10122 | int64_t svqdecb_pat(int64_t, enum svpattern, uint64_t); | |
| 10123 | 10123 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecb_pat_n_u32))) |
| 10124 | uint32_t svqdecb_pat(uint32_t, sv_pattern, uint64_t); | |
| 10124 | uint32_t svqdecb_pat(uint32_t, enum svpattern, uint64_t); | |
| 10125 | 10125 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecb_pat_n_u64))) |
| 10126 | uint64_t svqdecb_pat(uint64_t, sv_pattern, uint64_t); | |
| 10126 | uint64_t svqdecb_pat(uint64_t, enum svpattern, uint64_t); | |
| 10127 | 10127 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_n_s32))) |
| 10128 | 10128 | int32_t svqdecd(int32_t, uint64_t); |
| 10129 | 10129 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_n_s64))) |
| ... | ... | @@ -10137,17 +10137,17 @@ svint64_t svqdecd(svint64_t, uint64_t); |
| 10137 | 10137 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_u64))) |
| 10138 | 10138 | svuint64_t svqdecd(svuint64_t, uint64_t); |
| 10139 | 10139 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_pat_n_s32))) |
| 10140 | int32_t svqdecd_pat(int32_t, sv_pattern, uint64_t); | |
| 10140 | int32_t svqdecd_pat(int32_t, enum svpattern, uint64_t); | |
| 10141 | 10141 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_pat_n_s64))) |
| 10142 | int64_t svqdecd_pat(int64_t, sv_pattern, uint64_t); | |
| 10142 | int64_t svqdecd_pat(int64_t, enum svpattern, uint64_t); | |
| 10143 | 10143 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_pat_n_u32))) |
| 10144 | uint32_t svqdecd_pat(uint32_t, sv_pattern, uint64_t); | |
| 10144 | uint32_t svqdecd_pat(uint32_t, enum svpattern, uint64_t); | |
| 10145 | 10145 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_pat_n_u64))) |
| 10146 | uint64_t svqdecd_pat(uint64_t, sv_pattern, uint64_t); | |
| 10146 | uint64_t svqdecd_pat(uint64_t, enum svpattern, uint64_t); | |
| 10147 | 10147 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_pat_s64))) |
| 10148 | svint64_t svqdecd_pat(svint64_t, sv_pattern, uint64_t); | |
| 10148 | svint64_t svqdecd_pat(svint64_t, enum svpattern, uint64_t); | |
| 10149 | 10149 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecd_pat_u64))) |
| 10150 | svuint64_t svqdecd_pat(svuint64_t, sv_pattern, uint64_t); | |
| 10150 | svuint64_t svqdecd_pat(svuint64_t, enum svpattern, uint64_t); | |
| 10151 | 10151 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_n_s32))) |
| 10152 | 10152 | int32_t svqdech(int32_t, uint64_t); |
| 10153 | 10153 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_n_s64))) |
| ... | ... | @@ -10161,17 +10161,17 @@ svint16_t svqdech(svint16_t, uint64_t); |
| 10161 | 10161 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_u16))) |
| 10162 | 10162 | svuint16_t svqdech(svuint16_t, uint64_t); |
| 10163 | 10163 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_pat_n_s32))) |
| 10164 | int32_t svqdech_pat(int32_t, sv_pattern, uint64_t); | |
| 10164 | int32_t svqdech_pat(int32_t, enum svpattern, uint64_t); | |
| 10165 | 10165 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_pat_n_s64))) |
| 10166 | int64_t svqdech_pat(int64_t, sv_pattern, uint64_t); | |
| 10166 | int64_t svqdech_pat(int64_t, enum svpattern, uint64_t); | |
| 10167 | 10167 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_pat_n_u32))) |
| 10168 | uint32_t svqdech_pat(uint32_t, sv_pattern, uint64_t); | |
| 10168 | uint32_t svqdech_pat(uint32_t, enum svpattern, uint64_t); | |
| 10169 | 10169 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_pat_n_u64))) |
| 10170 | uint64_t svqdech_pat(uint64_t, sv_pattern, uint64_t); | |
| 10170 | uint64_t svqdech_pat(uint64_t, enum svpattern, uint64_t); | |
| 10171 | 10171 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_pat_s16))) |
| 10172 | svint16_t svqdech_pat(svint16_t, sv_pattern, uint64_t); | |
| 10172 | svint16_t svqdech_pat(svint16_t, enum svpattern, uint64_t); | |
| 10173 | 10173 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdech_pat_u16))) |
| 10174 | svuint16_t svqdech_pat(svuint16_t, sv_pattern, uint64_t); | |
| 10174 | svuint16_t svqdech_pat(svuint16_t, enum svpattern, uint64_t); | |
| 10175 | 10175 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecp_n_s32_b8))) |
| 10176 | 10176 | int32_t svqdecp_b8(int32_t, svbool_t); |
| 10177 | 10177 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecp_n_s32_b32))) |
| ... | ... | @@ -10229,17 +10229,17 @@ svint32_t svqdecw(svint32_t, uint64_t); |
| 10229 | 10229 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_u32))) |
| 10230 | 10230 | svuint32_t svqdecw(svuint32_t, uint64_t); |
| 10231 | 10231 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_pat_n_s32))) |
| 10232 | int32_t svqdecw_pat(int32_t, sv_pattern, uint64_t); | |
| 10232 | int32_t svqdecw_pat(int32_t, enum svpattern, uint64_t); | |
| 10233 | 10233 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_pat_n_s64))) |
| 10234 | int64_t svqdecw_pat(int64_t, sv_pattern, uint64_t); | |
| 10234 | int64_t svqdecw_pat(int64_t, enum svpattern, uint64_t); | |
| 10235 | 10235 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_pat_n_u32))) |
| 10236 | uint32_t svqdecw_pat(uint32_t, sv_pattern, uint64_t); | |
| 10236 | uint32_t svqdecw_pat(uint32_t, enum svpattern, uint64_t); | |
| 10237 | 10237 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_pat_n_u64))) |
| 10238 | uint64_t svqdecw_pat(uint64_t, sv_pattern, uint64_t); | |
| 10238 | uint64_t svqdecw_pat(uint64_t, enum svpattern, uint64_t); | |
| 10239 | 10239 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_pat_s32))) |
| 10240 | svint32_t svqdecw_pat(svint32_t, sv_pattern, uint64_t); | |
| 10240 | svint32_t svqdecw_pat(svint32_t, enum svpattern, uint64_t); | |
| 10241 | 10241 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqdecw_pat_u32))) |
| 10242 | svuint32_t svqdecw_pat(svuint32_t, sv_pattern, uint64_t); | |
| 10242 | svuint32_t svqdecw_pat(svuint32_t, enum svpattern, uint64_t); | |
| 10243 | 10243 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_n_s32))) |
| 10244 | 10244 | int32_t svqincb(int32_t, uint64_t); |
| 10245 | 10245 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_n_s64))) |
| ... | ... | @@ -10249,13 +10249,13 @@ uint32_t svqincb(uint32_t, uint64_t); |
| 10249 | 10249 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_n_u64))) |
| 10250 | 10250 | uint64_t svqincb(uint64_t, uint64_t); |
| 10251 | 10251 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_pat_n_s32))) |
| 10252 | int32_t svqincb_pat(int32_t, sv_pattern, uint64_t); | |
| 10252 | int32_t svqincb_pat(int32_t, enum svpattern, uint64_t); | |
| 10253 | 10253 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_pat_n_s64))) |
| 10254 | int64_t svqincb_pat(int64_t, sv_pattern, uint64_t); | |
| 10254 | int64_t svqincb_pat(int64_t, enum svpattern, uint64_t); | |
| 10255 | 10255 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_pat_n_u32))) |
| 10256 | uint32_t svqincb_pat(uint32_t, sv_pattern, uint64_t); | |
| 10256 | uint32_t svqincb_pat(uint32_t, enum svpattern, uint64_t); | |
| 10257 | 10257 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincb_pat_n_u64))) |
| 10258 | uint64_t svqincb_pat(uint64_t, sv_pattern, uint64_t); | |
| 10258 | uint64_t svqincb_pat(uint64_t, enum svpattern, uint64_t); | |
| 10259 | 10259 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_n_s32))) |
| 10260 | 10260 | int32_t svqincd(int32_t, uint64_t); |
| 10261 | 10261 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_n_s64))) |
| ... | ... | @@ -10269,17 +10269,17 @@ svint64_t svqincd(svint64_t, uint64_t); |
| 10269 | 10269 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_u64))) |
| 10270 | 10270 | svuint64_t svqincd(svuint64_t, uint64_t); |
| 10271 | 10271 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_pat_n_s32))) |
| 10272 | int32_t svqincd_pat(int32_t, sv_pattern, uint64_t); | |
| 10272 | int32_t svqincd_pat(int32_t, enum svpattern, uint64_t); | |
| 10273 | 10273 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_pat_n_s64))) |
| 10274 | int64_t svqincd_pat(int64_t, sv_pattern, uint64_t); | |
| 10274 | int64_t svqincd_pat(int64_t, enum svpattern, uint64_t); | |
| 10275 | 10275 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_pat_n_u32))) |
| 10276 | uint32_t svqincd_pat(uint32_t, sv_pattern, uint64_t); | |
| 10276 | uint32_t svqincd_pat(uint32_t, enum svpattern, uint64_t); | |
| 10277 | 10277 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_pat_n_u64))) |
| 10278 | uint64_t svqincd_pat(uint64_t, sv_pattern, uint64_t); | |
| 10278 | uint64_t svqincd_pat(uint64_t, enum svpattern, uint64_t); | |
| 10279 | 10279 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_pat_s64))) |
| 10280 | svint64_t svqincd_pat(svint64_t, sv_pattern, uint64_t); | |
| 10280 | svint64_t svqincd_pat(svint64_t, enum svpattern, uint64_t); | |
| 10281 | 10281 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincd_pat_u64))) |
| 10282 | svuint64_t svqincd_pat(svuint64_t, sv_pattern, uint64_t); | |
| 10282 | svuint64_t svqincd_pat(svuint64_t, enum svpattern, uint64_t); | |
| 10283 | 10283 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_n_s32))) |
| 10284 | 10284 | int32_t svqinch(int32_t, uint64_t); |
| 10285 | 10285 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_n_s64))) |
| ... | ... | @@ -10293,17 +10293,17 @@ svint16_t svqinch(svint16_t, uint64_t); |
| 10293 | 10293 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_u16))) |
| 10294 | 10294 | svuint16_t svqinch(svuint16_t, uint64_t); |
| 10295 | 10295 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_pat_n_s32))) |
| 10296 | int32_t svqinch_pat(int32_t, sv_pattern, uint64_t); | |
| 10296 | int32_t svqinch_pat(int32_t, enum svpattern, uint64_t); | |
| 10297 | 10297 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_pat_n_s64))) |
| 10298 | int64_t svqinch_pat(int64_t, sv_pattern, uint64_t); | |
| 10298 | int64_t svqinch_pat(int64_t, enum svpattern, uint64_t); | |
| 10299 | 10299 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_pat_n_u32))) |
| 10300 | uint32_t svqinch_pat(uint32_t, sv_pattern, uint64_t); | |
| 10300 | uint32_t svqinch_pat(uint32_t, enum svpattern, uint64_t); | |
| 10301 | 10301 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_pat_n_u64))) |
| 10302 | uint64_t svqinch_pat(uint64_t, sv_pattern, uint64_t); | |
| 10302 | uint64_t svqinch_pat(uint64_t, enum svpattern, uint64_t); | |
| 10303 | 10303 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_pat_s16))) |
| 10304 | svint16_t svqinch_pat(svint16_t, sv_pattern, uint64_t); | |
| 10304 | svint16_t svqinch_pat(svint16_t, enum svpattern, uint64_t); | |
| 10305 | 10305 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqinch_pat_u16))) |
| 10306 | svuint16_t svqinch_pat(svuint16_t, sv_pattern, uint64_t); | |
| 10306 | svuint16_t svqinch_pat(svuint16_t, enum svpattern, uint64_t); | |
| 10307 | 10307 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincp_n_s32_b8))) |
| 10308 | 10308 | int32_t svqincp_b8(int32_t, svbool_t); |
| 10309 | 10309 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincp_n_s32_b32))) |
| ... | ... | @@ -10361,17 +10361,17 @@ svint32_t svqincw(svint32_t, uint64_t); |
| 10361 | 10361 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_u32))) |
| 10362 | 10362 | svuint32_t svqincw(svuint32_t, uint64_t); |
| 10363 | 10363 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_pat_n_s32))) |
| 10364 | int32_t svqincw_pat(int32_t, sv_pattern, uint64_t); | |
| 10364 | int32_t svqincw_pat(int32_t, enum svpattern, uint64_t); | |
| 10365 | 10365 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_pat_n_s64))) |
| 10366 | int64_t svqincw_pat(int64_t, sv_pattern, uint64_t); | |
| 10366 | int64_t svqincw_pat(int64_t, enum svpattern, uint64_t); | |
| 10367 | 10367 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_pat_n_u32))) |
| 10368 | uint32_t svqincw_pat(uint32_t, sv_pattern, uint64_t); | |
| 10368 | uint32_t svqincw_pat(uint32_t, enum svpattern, uint64_t); | |
| 10369 | 10369 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_pat_n_u64))) |
| 10370 | uint64_t svqincw_pat(uint64_t, sv_pattern, uint64_t); | |
| 10370 | uint64_t svqincw_pat(uint64_t, enum svpattern, uint64_t); | |
| 10371 | 10371 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_pat_s32))) |
| 10372 | svint32_t svqincw_pat(svint32_t, sv_pattern, uint64_t); | |
| 10372 | svint32_t svqincw_pat(svint32_t, enum svpattern, uint64_t); | |
| 10373 | 10373 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqincw_pat_u32))) |
| 10374 | svuint32_t svqincw_pat(svuint32_t, sv_pattern, uint64_t); | |
| 10374 | svuint32_t svqincw_pat(svuint32_t, enum svpattern, uint64_t); | |
| 10375 | 10375 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqsub_n_s8))) |
| 10376 | 10376 | svint8_t svqsub(svint8_t, int8_t); |
| 10377 | 10377 | __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svqsub_n_s32))) |
lib/include/avx512fintrin.h+47-118| ... | ... | @@ -9297,303 +9297,232 @@ _mm512_mask_abs_pd(__m512d __W, __mmask8 __K, __m512d __A) |
| 9297 | 9297 | |
| 9298 | 9298 | /* Vector-reduction arithmetic accepts vectors as inputs and produces scalars as |
| 9299 | 9299 | * outputs. This class of vector operation forms the basis of many scientific |
| 9300 | * computations. In vector-reduction arithmetic, the evaluation off is | |
| 9300 | * computations. In vector-reduction arithmetic, the evaluation order is | |
| 9301 | 9301 | * independent of the order of the input elements of V. |
| 9302 | 9302 | |
| 9303 | * For floating point types, we always assume the elements are reassociable even | |
| 9304 | * if -fast-math is off. | |
| 9305 | ||
| 9303 | 9306 | * Used bisection method. At each step, we partition the vector with previous |
| 9304 | 9307 | * step in half, and the operation is performed on its two halves. |
| 9305 | 9308 | * This takes log2(n) steps where n is the number of elements in the vector. |
| 9306 | 9309 | */ |
| 9307 | 9310 | |
| 9308 | #define _mm512_mask_reduce_operator(op) \ | |
| 9309 | __v4du __t1 = (__v4du)_mm512_extracti64x4_epi64(__W, 0); \ | |
| 9310 | __v4du __t2 = (__v4du)_mm512_extracti64x4_epi64(__W, 1); \ | |
| 9311 | __m256i __t3 = (__m256i)(__t1 op __t2); \ | |
| 9312 | __v2du __t4 = (__v2du)_mm256_extracti128_si256(__t3, 0); \ | |
| 9313 | __v2du __t5 = (__v2du)_mm256_extracti128_si256(__t3, 1); \ | |
| 9314 | __v2du __t6 = __t4 op __t5; \ | |
| 9315 | __v2du __t7 = __builtin_shufflevector(__t6, __t6, 1, 0); \ | |
| 9316 | __v2du __t8 = __t6 op __t7; \ | |
| 9317 | return __t8[0] | |
| 9318 | ||
| 9319 | 9311 | static __inline__ long long __DEFAULT_FN_ATTRS512 _mm512_reduce_add_epi64(__m512i __W) { |
| 9320 | _mm512_mask_reduce_operator(+); | |
| 9312 | return __builtin_ia32_reduce_add_q512(__W); | |
| 9321 | 9313 | } |
| 9322 | 9314 | |
| 9323 | 9315 | static __inline__ long long __DEFAULT_FN_ATTRS512 _mm512_reduce_mul_epi64(__m512i __W) { |
| 9324 | _mm512_mask_reduce_operator(*); | |
| 9316 | return __builtin_ia32_reduce_mul_q512(__W); | |
| 9325 | 9317 | } |
| 9326 | 9318 | |
| 9327 | 9319 | static __inline__ long long __DEFAULT_FN_ATTRS512 _mm512_reduce_and_epi64(__m512i __W) { |
| 9328 | _mm512_mask_reduce_operator(&); | |
| 9320 | return __builtin_ia32_reduce_and_q512(__W); | |
| 9329 | 9321 | } |
| 9330 | 9322 | |
| 9331 | 9323 | static __inline__ long long __DEFAULT_FN_ATTRS512 _mm512_reduce_or_epi64(__m512i __W) { |
| 9332 | _mm512_mask_reduce_operator(|); | |
| 9324 | return __builtin_ia32_reduce_or_q512(__W); | |
| 9333 | 9325 | } |
| 9334 | 9326 | |
| 9335 | 9327 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9336 | 9328 | _mm512_mask_reduce_add_epi64(__mmask8 __M, __m512i __W) { |
| 9337 | 9329 | __W = _mm512_maskz_mov_epi64(__M, __W); |
| 9338 | _mm512_mask_reduce_operator(+); | |
| 9330 | return __builtin_ia32_reduce_add_q512(__W); | |
| 9339 | 9331 | } |
| 9340 | 9332 | |
| 9341 | 9333 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9342 | 9334 | _mm512_mask_reduce_mul_epi64(__mmask8 __M, __m512i __W) { |
| 9343 | 9335 | __W = _mm512_mask_mov_epi64(_mm512_set1_epi64(1), __M, __W); |
| 9344 | _mm512_mask_reduce_operator(*); | |
| 9336 | return __builtin_ia32_reduce_mul_q512(__W); | |
| 9345 | 9337 | } |
| 9346 | 9338 | |
| 9347 | 9339 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9348 | 9340 | _mm512_mask_reduce_and_epi64(__mmask8 __M, __m512i __W) { |
| 9349 | 9341 | __W = _mm512_mask_mov_epi64(_mm512_set1_epi64(~0ULL), __M, __W); |
| 9350 | _mm512_mask_reduce_operator(&); | |
| 9342 | return __builtin_ia32_reduce_and_q512(__W); | |
| 9351 | 9343 | } |
| 9352 | 9344 | |
| 9353 | 9345 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9354 | 9346 | _mm512_mask_reduce_or_epi64(__mmask8 __M, __m512i __W) { |
| 9355 | 9347 | __W = _mm512_maskz_mov_epi64(__M, __W); |
| 9356 | _mm512_mask_reduce_operator(|); | |
| 9348 | return __builtin_ia32_reduce_or_q512(__W); | |
| 9357 | 9349 | } |
| 9358 | #undef _mm512_mask_reduce_operator | |
| 9359 | ||
| 9360 | #define _mm512_mask_reduce_operator(op) \ | |
| 9361 | __m256d __t1 = _mm512_extractf64x4_pd(__W, 0); \ | |
| 9362 | __m256d __t2 = _mm512_extractf64x4_pd(__W, 1); \ | |
| 9363 | __m256d __t3 = __t1 op __t2; \ | |
| 9364 | __m128d __t4 = _mm256_extractf128_pd(__t3, 0); \ | |
| 9365 | __m128d __t5 = _mm256_extractf128_pd(__t3, 1); \ | |
| 9366 | __m128d __t6 = __t4 op __t5; \ | |
| 9367 | __m128d __t7 = __builtin_shufflevector(__t6, __t6, 1, 0); \ | |
| 9368 | __m128d __t8 = __t6 op __t7; \ | |
| 9369 | return __t8[0] | |
| 9370 | 9350 | |
| 9351 | // -0.0 is used to ignore the start value since it is the neutral value of | |
| 9352 | // floating point addition. For more information, please refer to | |
| 9353 | // https://llvm.org/docs/LangRef.html#llvm-vector-reduce-fadd-intrinsic | |
| 9371 | 9354 | static __inline__ double __DEFAULT_FN_ATTRS512 _mm512_reduce_add_pd(__m512d __W) { |
| 9372 | _mm512_mask_reduce_operator(+); | |
| 9355 | return __builtin_ia32_reduce_fadd_pd512(-0.0, __W); | |
| 9373 | 9356 | } |
| 9374 | 9357 | |
| 9375 | 9358 | static __inline__ double __DEFAULT_FN_ATTRS512 _mm512_reduce_mul_pd(__m512d __W) { |
| 9376 | _mm512_mask_reduce_operator(*); | |
| 9359 | return __builtin_ia32_reduce_fmul_pd512(1.0, __W); | |
| 9377 | 9360 | } |
| 9378 | 9361 | |
| 9379 | 9362 | static __inline__ double __DEFAULT_FN_ATTRS512 |
| 9380 | 9363 | _mm512_mask_reduce_add_pd(__mmask8 __M, __m512d __W) { |
| 9381 | 9364 | __W = _mm512_maskz_mov_pd(__M, __W); |
| 9382 | _mm512_mask_reduce_operator(+); | |
| 9365 | return __builtin_ia32_reduce_fadd_pd512(-0.0, __W); | |
| 9383 | 9366 | } |
| 9384 | 9367 | |
| 9385 | 9368 | static __inline__ double __DEFAULT_FN_ATTRS512 |
| 9386 | 9369 | _mm512_mask_reduce_mul_pd(__mmask8 __M, __m512d __W) { |
| 9387 | 9370 | __W = _mm512_mask_mov_pd(_mm512_set1_pd(1.0), __M, __W); |
| 9388 | _mm512_mask_reduce_operator(*); | |
| 9371 | return __builtin_ia32_reduce_fmul_pd512(1.0, __W); | |
| 9389 | 9372 | } |
| 9390 | #undef _mm512_mask_reduce_operator | |
| 9391 | ||
| 9392 | #define _mm512_mask_reduce_operator(op) \ | |
| 9393 | __v8su __t1 = (__v8su)_mm512_extracti64x4_epi64(__W, 0); \ | |
| 9394 | __v8su __t2 = (__v8su)_mm512_extracti64x4_epi64(__W, 1); \ | |
| 9395 | __m256i __t3 = (__m256i)(__t1 op __t2); \ | |
| 9396 | __v4su __t4 = (__v4su)_mm256_extracti128_si256(__t3, 0); \ | |
| 9397 | __v4su __t5 = (__v4su)_mm256_extracti128_si256(__t3, 1); \ | |
| 9398 | __v4su __t6 = __t4 op __t5; \ | |
| 9399 | __v4su __t7 = __builtin_shufflevector(__t6, __t6, 2, 3, 0, 1); \ | |
| 9400 | __v4su __t8 = __t6 op __t7; \ | |
| 9401 | __v4su __t9 = __builtin_shufflevector(__t8, __t8, 1, 0, 3, 2); \ | |
| 9402 | __v4su __t10 = __t8 op __t9; \ | |
| 9403 | return __t10[0] | |
| 9404 | 9373 | |
| 9405 | 9374 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9406 | 9375 | _mm512_reduce_add_epi32(__m512i __W) { |
| 9407 | _mm512_mask_reduce_operator(+); | |
| 9376 | return __builtin_ia32_reduce_add_d512((__v16si)__W); | |
| 9408 | 9377 | } |
| 9409 | 9378 | |
| 9410 | 9379 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9411 | 9380 | _mm512_reduce_mul_epi32(__m512i __W) { |
| 9412 | _mm512_mask_reduce_operator(*); | |
| 9381 | return __builtin_ia32_reduce_mul_d512((__v16si)__W); | |
| 9413 | 9382 | } |
| 9414 | 9383 | |
| 9415 | 9384 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9416 | 9385 | _mm512_reduce_and_epi32(__m512i __W) { |
| 9417 | _mm512_mask_reduce_operator(&); | |
| 9386 | return __builtin_ia32_reduce_and_d512((__v16si)__W); | |
| 9418 | 9387 | } |
| 9419 | 9388 | |
| 9420 | 9389 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9421 | 9390 | _mm512_reduce_or_epi32(__m512i __W) { |
| 9422 | _mm512_mask_reduce_operator(|); | |
| 9391 | return __builtin_ia32_reduce_or_d512((__v16si)__W); | |
| 9423 | 9392 | } |
| 9424 | 9393 | |
| 9425 | 9394 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9426 | 9395 | _mm512_mask_reduce_add_epi32( __mmask16 __M, __m512i __W) { |
| 9427 | 9396 | __W = _mm512_maskz_mov_epi32(__M, __W); |
| 9428 | _mm512_mask_reduce_operator(+); | |
| 9397 | return __builtin_ia32_reduce_add_d512((__v16si)__W); | |
| 9429 | 9398 | } |
| 9430 | 9399 | |
| 9431 | 9400 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9432 | 9401 | _mm512_mask_reduce_mul_epi32( __mmask16 __M, __m512i __W) { |
| 9433 | 9402 | __W = _mm512_mask_mov_epi32(_mm512_set1_epi32(1), __M, __W); |
| 9434 | _mm512_mask_reduce_operator(*); | |
| 9403 | return __builtin_ia32_reduce_mul_d512((__v16si)__W); | |
| 9435 | 9404 | } |
| 9436 | 9405 | |
| 9437 | 9406 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9438 | 9407 | _mm512_mask_reduce_and_epi32( __mmask16 __M, __m512i __W) { |
| 9439 | 9408 | __W = _mm512_mask_mov_epi32(_mm512_set1_epi32(~0U), __M, __W); |
| 9440 | _mm512_mask_reduce_operator(&); | |
| 9409 | return __builtin_ia32_reduce_and_d512((__v16si)__W); | |
| 9441 | 9410 | } |
| 9442 | 9411 | |
| 9443 | 9412 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9444 | 9413 | _mm512_mask_reduce_or_epi32(__mmask16 __M, __m512i __W) { |
| 9445 | 9414 | __W = _mm512_maskz_mov_epi32(__M, __W); |
| 9446 | _mm512_mask_reduce_operator(|); | |
| 9415 | return __builtin_ia32_reduce_or_d512((__v16si)__W); | |
| 9447 | 9416 | } |
| 9448 | #undef _mm512_mask_reduce_operator | |
| 9449 | ||
| 9450 | #define _mm512_mask_reduce_operator(op) \ | |
| 9451 | __m256 __t1 = (__m256)_mm512_extractf64x4_pd((__m512d)__W, 0); \ | |
| 9452 | __m256 __t2 = (__m256)_mm512_extractf64x4_pd((__m512d)__W, 1); \ | |
| 9453 | __m256 __t3 = __t1 op __t2; \ | |
| 9454 | __m128 __t4 = _mm256_extractf128_ps(__t3, 0); \ | |
| 9455 | __m128 __t5 = _mm256_extractf128_ps(__t3, 1); \ | |
| 9456 | __m128 __t6 = __t4 op __t5; \ | |
| 9457 | __m128 __t7 = __builtin_shufflevector(__t6, __t6, 2, 3, 0, 1); \ | |
| 9458 | __m128 __t8 = __t6 op __t7; \ | |
| 9459 | __m128 __t9 = __builtin_shufflevector(__t8, __t8, 1, 0, 3, 2); \ | |
| 9460 | __m128 __t10 = __t8 op __t9; \ | |
| 9461 | return __t10[0] | |
| 9462 | 9417 | |
| 9463 | 9418 | static __inline__ float __DEFAULT_FN_ATTRS512 |
| 9464 | 9419 | _mm512_reduce_add_ps(__m512 __W) { |
| 9465 | _mm512_mask_reduce_operator(+); | |
| 9420 | return __builtin_ia32_reduce_fadd_ps512(-0.0f, __W); | |
| 9466 | 9421 | } |
| 9467 | 9422 | |
| 9468 | 9423 | static __inline__ float __DEFAULT_FN_ATTRS512 |
| 9469 | 9424 | _mm512_reduce_mul_ps(__m512 __W) { |
| 9470 | _mm512_mask_reduce_operator(*); | |
| 9425 | return __builtin_ia32_reduce_fmul_ps512(1.0f, __W); | |
| 9471 | 9426 | } |
| 9472 | 9427 | |
| 9473 | 9428 | static __inline__ float __DEFAULT_FN_ATTRS512 |
| 9474 | 9429 | _mm512_mask_reduce_add_ps(__mmask16 __M, __m512 __W) { |
| 9475 | 9430 | __W = _mm512_maskz_mov_ps(__M, __W); |
| 9476 | _mm512_mask_reduce_operator(+); | |
| 9431 | return __builtin_ia32_reduce_fadd_ps512(-0.0f, __W); | |
| 9477 | 9432 | } |
| 9478 | 9433 | |
| 9479 | 9434 | static __inline__ float __DEFAULT_FN_ATTRS512 |
| 9480 | 9435 | _mm512_mask_reduce_mul_ps(__mmask16 __M, __m512 __W) { |
| 9481 | 9436 | __W = _mm512_mask_mov_ps(_mm512_set1_ps(1.0f), __M, __W); |
| 9482 | _mm512_mask_reduce_operator(*); | |
| 9437 | return __builtin_ia32_reduce_fmul_ps512(1.0f, __W); | |
| 9483 | 9438 | } |
| 9484 | #undef _mm512_mask_reduce_operator | |
| 9485 | ||
| 9486 | #define _mm512_mask_reduce_operator(op) \ | |
| 9487 | __m512i __t1 = (__m512i)__builtin_shufflevector((__v8di)__V, (__v8di)__V, 4, 5, 6, 7, 0, 1, 2, 3); \ | |
| 9488 | __m512i __t2 = _mm512_##op(__V, __t1); \ | |
| 9489 | __m512i __t3 = (__m512i)__builtin_shufflevector((__v8di)__t2, (__v8di)__t2, 2, 3, 0, 1, 6, 7, 4, 5); \ | |
| 9490 | __m512i __t4 = _mm512_##op(__t2, __t3); \ | |
| 9491 | __m512i __t5 = (__m512i)__builtin_shufflevector((__v8di)__t4, (__v8di)__t4, 1, 0, 3, 2, 5, 4, 7, 6); \ | |
| 9492 | __v8di __t6 = (__v8di)_mm512_##op(__t4, __t5); \ | |
| 9493 | return __t6[0] | |
| 9494 | 9439 | |
| 9495 | 9440 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9496 | 9441 | _mm512_reduce_max_epi64(__m512i __V) { |
| 9497 | _mm512_mask_reduce_operator(max_epi64); | |
| 9442 | return __builtin_ia32_reduce_smax_q512(__V); | |
| 9498 | 9443 | } |
| 9499 | 9444 | |
| 9500 | 9445 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS512 |
| 9501 | 9446 | _mm512_reduce_max_epu64(__m512i __V) { |
| 9502 | _mm512_mask_reduce_operator(max_epu64); | |
| 9447 | return __builtin_ia32_reduce_umax_q512(__V); | |
| 9503 | 9448 | } |
| 9504 | 9449 | |
| 9505 | 9450 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9506 | 9451 | _mm512_reduce_min_epi64(__m512i __V) { |
| 9507 | _mm512_mask_reduce_operator(min_epi64); | |
| 9452 | return __builtin_ia32_reduce_smin_q512(__V); | |
| 9508 | 9453 | } |
| 9509 | 9454 | |
| 9510 | 9455 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS512 |
| 9511 | 9456 | _mm512_reduce_min_epu64(__m512i __V) { |
| 9512 | _mm512_mask_reduce_operator(min_epu64); | |
| 9457 | return __builtin_ia32_reduce_umin_q512(__V); | |
| 9513 | 9458 | } |
| 9514 | 9459 | |
| 9515 | 9460 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9516 | 9461 | _mm512_mask_reduce_max_epi64(__mmask8 __M, __m512i __V) { |
| 9517 | 9462 | __V = _mm512_mask_mov_epi64(_mm512_set1_epi64(-__LONG_LONG_MAX__ - 1LL), __M, __V); |
| 9518 | _mm512_mask_reduce_operator(max_epi64); | |
| 9463 | return __builtin_ia32_reduce_smax_q512(__V); | |
| 9519 | 9464 | } |
| 9520 | 9465 | |
| 9521 | 9466 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS512 |
| 9522 | 9467 | _mm512_mask_reduce_max_epu64(__mmask8 __M, __m512i __V) { |
| 9523 | 9468 | __V = _mm512_maskz_mov_epi64(__M, __V); |
| 9524 | _mm512_mask_reduce_operator(max_epu64); | |
| 9469 | return __builtin_ia32_reduce_umax_q512(__V); | |
| 9525 | 9470 | } |
| 9526 | 9471 | |
| 9527 | 9472 | static __inline__ long long __DEFAULT_FN_ATTRS512 |
| 9528 | 9473 | _mm512_mask_reduce_min_epi64(__mmask8 __M, __m512i __V) { |
| 9529 | 9474 | __V = _mm512_mask_mov_epi64(_mm512_set1_epi64(__LONG_LONG_MAX__), __M, __V); |
| 9530 | _mm512_mask_reduce_operator(min_epi64); | |
| 9475 | return __builtin_ia32_reduce_smin_q512(__V); | |
| 9531 | 9476 | } |
| 9532 | 9477 | |
| 9533 | 9478 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS512 |
| 9534 | 9479 | _mm512_mask_reduce_min_epu64(__mmask8 __M, __m512i __V) { |
| 9535 | 9480 | __V = _mm512_mask_mov_epi64(_mm512_set1_epi64(~0ULL), __M, __V); |
| 9536 | _mm512_mask_reduce_operator(min_epu64); | |
| 9481 | return __builtin_ia32_reduce_umin_q512(__V); | |
| 9537 | 9482 | } |
| 9538 | #undef _mm512_mask_reduce_operator | |
| 9539 | ||
| 9540 | #define _mm512_mask_reduce_operator(op) \ | |
| 9541 | __m256i __t1 = _mm512_extracti64x4_epi64(__V, 0); \ | |
| 9542 | __m256i __t2 = _mm512_extracti64x4_epi64(__V, 1); \ | |
| 9543 | __m256i __t3 = _mm256_##op(__t1, __t2); \ | |
| 9544 | __m128i __t4 = _mm256_extracti128_si256(__t3, 0); \ | |
| 9545 | __m128i __t5 = _mm256_extracti128_si256(__t3, 1); \ | |
| 9546 | __m128i __t6 = _mm_##op(__t4, __t5); \ | |
| 9547 | __m128i __t7 = (__m128i)__builtin_shufflevector((__v4si)__t6, (__v4si)__t6, 2, 3, 0, 1); \ | |
| 9548 | __m128i __t8 = _mm_##op(__t6, __t7); \ | |
| 9549 | __m128i __t9 = (__m128i)__builtin_shufflevector((__v4si)__t8, (__v4si)__t8, 1, 0, 3, 2); \ | |
| 9550 | __v4si __t10 = (__v4si)_mm_##op(__t8, __t9); \ | |
| 9551 | return __t10[0] | |
| 9552 | ||
| 9553 | 9483 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9554 | 9484 | _mm512_reduce_max_epi32(__m512i __V) { |
| 9555 | _mm512_mask_reduce_operator(max_epi32); | |
| 9485 | return __builtin_ia32_reduce_smax_d512((__v16si)__V); | |
| 9556 | 9486 | } |
| 9557 | 9487 | |
| 9558 | 9488 | static __inline__ unsigned int __DEFAULT_FN_ATTRS512 |
| 9559 | 9489 | _mm512_reduce_max_epu32(__m512i __V) { |
| 9560 | _mm512_mask_reduce_operator(max_epu32); | |
| 9490 | return __builtin_ia32_reduce_umax_d512((__v16si)__V); | |
| 9561 | 9491 | } |
| 9562 | 9492 | |
| 9563 | 9493 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9564 | 9494 | _mm512_reduce_min_epi32(__m512i __V) { |
| 9565 | _mm512_mask_reduce_operator(min_epi32); | |
| 9495 | return __builtin_ia32_reduce_smin_d512((__v16si)__V); | |
| 9566 | 9496 | } |
| 9567 | 9497 | |
| 9568 | 9498 | static __inline__ unsigned int __DEFAULT_FN_ATTRS512 |
| 9569 | 9499 | _mm512_reduce_min_epu32(__m512i __V) { |
| 9570 | _mm512_mask_reduce_operator(min_epu32); | |
| 9500 | return __builtin_ia32_reduce_umin_d512((__v16si)__V); | |
| 9571 | 9501 | } |
| 9572 | 9502 | |
| 9573 | 9503 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9574 | 9504 | _mm512_mask_reduce_max_epi32(__mmask16 __M, __m512i __V) { |
| 9575 | 9505 | __V = _mm512_mask_mov_epi32(_mm512_set1_epi32(-__INT_MAX__ - 1), __M, __V); |
| 9576 | _mm512_mask_reduce_operator(max_epi32); | |
| 9506 | return __builtin_ia32_reduce_smax_d512((__v16si)__V); | |
| 9577 | 9507 | } |
| 9578 | 9508 | |
| 9579 | 9509 | static __inline__ unsigned int __DEFAULT_FN_ATTRS512 |
| 9580 | 9510 | _mm512_mask_reduce_max_epu32(__mmask16 __M, __m512i __V) { |
| 9581 | 9511 | __V = _mm512_maskz_mov_epi32(__M, __V); |
| 9582 | _mm512_mask_reduce_operator(max_epu32); | |
| 9512 | return __builtin_ia32_reduce_umax_d512((__v16si)__V); | |
| 9583 | 9513 | } |
| 9584 | 9514 | |
| 9585 | 9515 | static __inline__ int __DEFAULT_FN_ATTRS512 |
| 9586 | 9516 | _mm512_mask_reduce_min_epi32(__mmask16 __M, __m512i __V) { |
| 9587 | 9517 | __V = _mm512_mask_mov_epi32(_mm512_set1_epi32(__INT_MAX__), __M, __V); |
| 9588 | _mm512_mask_reduce_operator(min_epi32); | |
| 9518 | return __builtin_ia32_reduce_smin_d512((__v16si)__V); | |
| 9589 | 9519 | } |
| 9590 | 9520 | |
| 9591 | 9521 | static __inline__ unsigned int __DEFAULT_FN_ATTRS512 |
| 9592 | 9522 | _mm512_mask_reduce_min_epu32(__mmask16 __M, __m512i __V) { |
| 9593 | 9523 | __V = _mm512_mask_mov_epi32(_mm512_set1_epi32(~0U), __M, __V); |
| 9594 | _mm512_mask_reduce_operator(min_epu32); | |
| 9524 | return __builtin_ia32_reduce_umin_d512((__v16si)__V); | |
| 9595 | 9525 | } |
| 9596 | #undef _mm512_mask_reduce_operator | |
| 9597 | 9526 | |
| 9598 | 9527 | #define _mm512_mask_reduce_operator(op) \ |
| 9599 | 9528 | __m256d __t1 = _mm512_extractf64x4_pd(__V, 0); \ |
lib/include/avx512vlvnniintrin.h+150-55| ... | ... | @@ -18,13 +18,157 @@ |
| 18 | 18 | #define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vnni"), __min_vector_width__(128))) |
| 19 | 19 | #define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vnni"), __min_vector_width__(256))) |
| 20 | 20 | |
| 21 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a A with | |
| 22 | /// corresponding signed 8-bit integers in \a B, producing 4 intermediate signed | |
| 23 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 24 | /// in \a S, and store the packed 32-bit results in DST. | |
| 25 | /// | |
| 26 | /// This intrinsic corresponds to the <c> VPDPBUSD </c> instructions. | |
| 27 | /// | |
| 28 | /// \operation | |
| 29 | /// FOR j := 0 to 7 | |
| 30 | /// tmp1.word := Signed(ZeroExtend16(A.byte[4*j]) * SignExtend16(B.byte[4*j])) | |
| 31 | /// tmp2.word := Signed(ZeroExtend16(A.byte[4*j+1]) * SignExtend16(B.byte[4*j+1])) | |
| 32 | /// tmp3.word := Signed(ZeroExtend16(A.byte[4*j+2]) * SignExtend16(B.byte[4*j+2])) | |
| 33 | /// tmp4.word := Signed(ZeroExtend16(A.byte[4*j+3]) * SignExtend16(B.byte[4*j+3])) | |
| 34 | /// DST.dword[j] := S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4 | |
| 35 | /// ENDFOR | |
| 36 | /// DST[MAX:256] := 0 | |
| 37 | /// \endoperation | |
| 38 | #define _mm256_dpbusd_epi32(S, A, B) \ | |
| 39 | (__m256i)__builtin_ia32_vpdpbusd256((__v8si)(S), (__v8si)(A), (__v8si)(B)) | |
| 21 | 40 | |
| 22 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 23 | _mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 24 | { | |
| 25 | return (__m256i)__builtin_ia32_vpdpbusd256((__v8si)__S, (__v8si)__A, | |
| 26 | (__v8si)__B); | |
| 27 | } | |
| 41 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a A with | |
| 42 | /// corresponding signed 8-bit integers in \a B, producing 4 intermediate signed | |
| 43 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 44 | /// in \a S using signed saturation, and store the packed 32-bit results in DST. | |
| 45 | /// | |
| 46 | /// This intrinsic corresponds to the <c> VPDPBUSDS </c> instructions. | |
| 47 | /// | |
| 48 | /// \operation | |
| 49 | /// FOR j := 0 to 7 | |
| 50 | /// tmp1.word := Signed(ZeroExtend16(A.byte[4*j]) * SignExtend16(B.byte[4*j])) | |
| 51 | /// tmp2.word := Signed(ZeroExtend16(A.byte[4*j+1]) * SignExtend16(B.byte[4*j+1])) | |
| 52 | /// tmp3.word := Signed(ZeroExtend16(A.byte[4*j+2]) * SignExtend16(B.byte[4*j+2])) | |
| 53 | /// tmp4.word := Signed(ZeroExtend16(A.byte[4*j+3]) * SignExtend16(B.byte[4*j+3])) | |
| 54 | /// DST.dword[j] := Saturate32(S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4) | |
| 55 | /// ENDFOR | |
| 56 | /// DST[MAX:256] := 0 | |
| 57 | /// \endoperation | |
| 58 | #define _mm256_dpbusds_epi32(S, A, B) \ | |
| 59 | (__m256i)__builtin_ia32_vpdpbusds256((__v8si)(S), (__v8si)(A), (__v8si)(B)) | |
| 60 | ||
| 61 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a A with | |
| 62 | /// corresponding 16-bit integers in \a B, producing 2 intermediate signed 32-bit | |
| 63 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a S, | |
| 64 | /// and store the packed 32-bit results in DST. | |
| 65 | /// | |
| 66 | /// This intrinsic corresponds to the <c> VPDPWSSD </c> instructions. | |
| 67 | /// | |
| 68 | /// \operation | |
| 69 | /// FOR j := 0 to 7 | |
| 70 | /// tmp1.dword := SignExtend32(A.word[2*j]) * SignExtend32(B.word[2*j]) | |
| 71 | /// tmp2.dword := SignExtend32(A.word[2*j+1]) * SignExtend32(B.word[2*j+1]) | |
| 72 | /// DST.dword[j] := S.dword[j] + tmp1 + tmp2 | |
| 73 | /// ENDFOR | |
| 74 | /// DST[MAX:256] := 0 | |
| 75 | /// \endoperation | |
| 76 | #define _mm256_dpwssd_epi32(S, A, B) \ | |
| 77 | (__m256i)__builtin_ia32_vpdpwssd256((__v8si)(S), (__v8si)(A), (__v8si)(B)) | |
| 78 | ||
| 79 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a A with | |
| 80 | /// corresponding 16-bit integers in \a B, producing 2 intermediate signed 32-bit | |
| 81 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a S | |
| 82 | /// using signed saturation, and store the packed 32-bit results in DST. | |
| 83 | /// | |
| 84 | /// This intrinsic corresponds to the <c> VPDPWSSDS </c> instructions. | |
| 85 | /// | |
| 86 | /// \operation | |
| 87 | /// FOR j := 0 to 7 | |
| 88 | /// tmp1.dword := SignExtend32(A.word[2*j]) * SignExtend32(B.word[2*j]) | |
| 89 | /// tmp2.dword := SignExtend32(A.word[2*j+1]) * SignExtend32(B.word[2*j+1]) | |
| 90 | /// DST.dword[j] := Saturate32(S.dword[j] + tmp1 + tmp2) | |
| 91 | /// ENDFOR | |
| 92 | /// DST[MAX:256] := 0 | |
| 93 | /// \endoperation | |
| 94 | #define _mm256_dpwssds_epi32(S, A, B) \ | |
| 95 | (__m256i)__builtin_ia32_vpdpwssds256((__v8si)(S), (__v8si)(A), (__v8si)(B)) | |
| 96 | ||
| 97 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a A with | |
| 98 | /// corresponding signed 8-bit integers in \a B, producing 4 intermediate signed | |
| 99 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 100 | /// in \a S, and store the packed 32-bit results in DST. | |
| 101 | /// | |
| 102 | /// This intrinsic corresponds to the <c> VPDPBUSD </c> instructions. | |
| 103 | /// | |
| 104 | /// \operation | |
| 105 | /// FOR j := 0 to 3 | |
| 106 | /// tmp1.word := Signed(ZeroExtend16(A.byte[4*j]) * SignExtend16(B.byte[4*j])) | |
| 107 | /// tmp2.word := Signed(ZeroExtend16(A.byte[4*j+1]) * SignExtend16(B.byte[4*j+1])) | |
| 108 | /// tmp3.word := Signed(ZeroExtend16(A.byte[4*j+2]) * SignExtend16(B.byte[4*j+2])) | |
| 109 | /// tmp4.word := Signed(ZeroExtend16(A.byte[4*j+3]) * SignExtend16(B.byte[4*j+3])) | |
| 110 | /// DST.dword[j] := S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4 | |
| 111 | /// ENDFOR | |
| 112 | /// DST[MAX:128] := 0 | |
| 113 | /// \endoperation | |
| 114 | #define _mm_dpbusd_epi32(S, A, B) \ | |
| 115 | (__m128i)__builtin_ia32_vpdpbusd128((__v4si)(S), (__v4si)(A), (__v4si)(B)) | |
| 116 | ||
| 117 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a A with | |
| 118 | /// corresponding signed 8-bit integers in \a B, producing 4 intermediate signed | |
| 119 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 120 | /// in \a S using signed saturation, and store the packed 32-bit results in DST. | |
| 121 | /// | |
| 122 | /// This intrinsic corresponds to the <c> VPDPBUSDS </c> instructions. | |
| 123 | /// | |
| 124 | /// \operation | |
| 125 | /// FOR j := 0 to 3 | |
| 126 | /// tmp1.word := Signed(ZeroExtend16(A.byte[4*j]) * SignExtend16(B.byte[4*j])) | |
| 127 | /// tmp2.word := Signed(ZeroExtend16(A.byte[4*j+1]) * SignExtend16(B.byte[4*j+1])) | |
| 128 | /// tmp3.word := Signed(ZeroExtend16(A.byte[4*j+2]) * SignExtend16(B.byte[4*j+2])) | |
| 129 | /// tmp4.word := Signed(ZeroExtend16(A.byte[4*j+3]) * SignExtend16(B.byte[4*j+3])) | |
| 130 | /// DST.dword[j] := Saturate32(S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4) | |
| 131 | /// ENDFOR | |
| 132 | /// DST[MAX:128] := 0 | |
| 133 | /// \endoperation | |
| 134 | #define _mm_dpbusds_epi32(S, A, B) \ | |
| 135 | (__m128i)__builtin_ia32_vpdpbusds128((__v4si)(S), (__v4si)(A), (__v4si)(B)) | |
| 136 | ||
| 137 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a A with | |
| 138 | /// corresponding 16-bit integers in \a B, producing 2 intermediate signed 32-bit | |
| 139 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a S, | |
| 140 | /// and store the packed 32-bit results in DST. | |
| 141 | /// | |
| 142 | /// This intrinsic corresponds to the <c> VPDPWSSD </c> instructions. | |
| 143 | /// | |
| 144 | /// \operation | |
| 145 | /// FOR j := 0 to 3 | |
| 146 | /// tmp1.dword := SignExtend32(A.word[2*j]) * SignExtend32(B.word[2*j]) | |
| 147 | /// tmp2.dword := SignExtend32(A.word[2*j+1]) * SignExtend32(B.word[2*j+1]) | |
| 148 | /// DST.dword[j] := S.dword[j] + tmp1 + tmp2 | |
| 149 | /// ENDFOR | |
| 150 | /// DST[MAX:128] := 0 | |
| 151 | /// \endoperation | |
| 152 | #define _mm_dpwssd_epi32(S, A, B) \ | |
| 153 | (__m128i)__builtin_ia32_vpdpwssd128((__v4si)(S), (__v4si)(A), (__v4si)(B)) | |
| 154 | ||
| 155 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a A with | |
| 156 | /// corresponding 16-bit integers in \a B, producing 2 intermediate signed 32-bit | |
| 157 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a S | |
| 158 | /// using signed saturation, and store the packed 32-bit results in DST. | |
| 159 | /// | |
| 160 | /// This intrinsic corresponds to the <c> VPDPWSSDS </c> instructions. | |
| 161 | /// | |
| 162 | /// \operation | |
| 163 | /// FOR j := 0 to 3 | |
| 164 | /// tmp1.dword := SignExtend32(A.word[2*j]) * SignExtend32(B.word[2*j]) | |
| 165 | /// tmp2.dword := SignExtend32(A.word[2*j+1]) * SignExtend32(B.word[2*j+1]) | |
| 166 | /// DST.dword[j] := Saturate32(S.dword[j] + tmp1 + tmp2) | |
| 167 | /// ENDFOR | |
| 168 | /// DST[MAX:128] := 0 | |
| 169 | /// \endoperation | |
| 170 | #define _mm_dpwssds_epi32(S, A, B) \ | |
| 171 | (__m128i)__builtin_ia32_vpdpwssds128((__v4si)(S), (__v4si)(A), (__v4si)(B)) | |
| 28 | 172 | |
| 29 | 173 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 |
| 30 | 174 | _mm256_mask_dpbusd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) |
| ... | ... | @@ -42,13 +186,6 @@ _mm256_maskz_dpbusd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) |
| 42 | 186 | (__v8si)_mm256_setzero_si256()); |
| 43 | 187 | } |
| 44 | 188 | |
| 45 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 46 | _mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 47 | { | |
| 48 | return (__m256i)__builtin_ia32_vpdpbusds256((__v8si)__S, (__v8si)__A, | |
| 49 | (__v8si)__B); | |
| 50 | } | |
| 51 | ||
| 52 | 189 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 |
| 53 | 190 | _mm256_mask_dpbusds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) |
| 54 | 191 | { |
| ... | ... | @@ -65,13 +202,6 @@ _mm256_maskz_dpbusds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) |
| 65 | 202 | (__v8si)_mm256_setzero_si256()); |
| 66 | 203 | } |
| 67 | 204 | |
| 68 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 69 | _mm256_dpwssd_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 70 | { | |
| 71 | return (__m256i)__builtin_ia32_vpdpwssd256((__v8si)__S, (__v8si)__A, | |
| 72 | (__v8si)__B); | |
| 73 | } | |
| 74 | ||
| 75 | 205 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 |
| 76 | 206 | _mm256_mask_dpwssd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) |
| 77 | 207 | { |
| ... | ... | @@ -88,13 +218,6 @@ _mm256_maskz_dpwssd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) |
| 88 | 218 | (__v8si)_mm256_setzero_si256()); |
| 89 | 219 | } |
| 90 | 220 | |
| 91 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 92 | _mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 93 | { | |
| 94 | return (__m256i)__builtin_ia32_vpdpwssds256((__v8si)__S, (__v8si)__A, | |
| 95 | (__v8si)__B); | |
| 96 | } | |
| 97 | ||
| 98 | 221 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 |
| 99 | 222 | _mm256_mask_dpwssds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) |
| 100 | 223 | { |
| ... | ... | @@ -111,13 +234,6 @@ _mm256_maskz_dpwssds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) |
| 111 | 234 | (__v8si)_mm256_setzero_si256()); |
| 112 | 235 | } |
| 113 | 236 | |
| 114 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 115 | _mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 116 | { | |
| 117 | return (__m128i)__builtin_ia32_vpdpbusd128((__v4si)__S, (__v4si)__A, | |
| 118 | (__v4si)__B); | |
| 119 | } | |
| 120 | ||
| 121 | 237 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 |
| 122 | 238 | _mm_mask_dpbusd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) |
| 123 | 239 | { |
| ... | ... | @@ -134,13 +250,6 @@ _mm_maskz_dpbusd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) |
| 134 | 250 | (__v4si)_mm_setzero_si128()); |
| 135 | 251 | } |
| 136 | 252 | |
| 137 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 138 | _mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 139 | { | |
| 140 | return (__m128i)__builtin_ia32_vpdpbusds128((__v4si)__S, (__v4si)__A, | |
| 141 | (__v4si)__B); | |
| 142 | } | |
| 143 | ||
| 144 | 253 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 |
| 145 | 254 | _mm_mask_dpbusds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) |
| 146 | 255 | { |
| ... | ... | @@ -157,13 +266,6 @@ _mm_maskz_dpbusds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) |
| 157 | 266 | (__v4si)_mm_setzero_si128()); |
| 158 | 267 | } |
| 159 | 268 | |
| 160 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 161 | _mm_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 162 | { | |
| 163 | return (__m128i)__builtin_ia32_vpdpwssd128((__v4si)__S, (__v4si)__A, | |
| 164 | (__v4si)__B); | |
| 165 | } | |
| 166 | ||
| 167 | 269 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 |
| 168 | 270 | _mm_mask_dpwssd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) |
| 169 | 271 | { |
| ... | ... | @@ -180,13 +282,6 @@ _mm_maskz_dpwssd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) |
| 180 | 282 | (__v4si)_mm_setzero_si128()); |
| 181 | 283 | } |
| 182 | 284 | |
| 183 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 184 | _mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 185 | { | |
| 186 | return (__m128i)__builtin_ia32_vpdpwssds128((__v4si)__S, (__v4si)__A, | |
| 187 | (__v4si)__B); | |
| 188 | } | |
| 189 | ||
| 190 | 285 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 |
| 191 | 286 | _mm_mask_dpwssds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) |
| 192 | 287 | { |
lib/include/avxintrin.h+3-3| ... | ... | @@ -2245,7 +2245,7 @@ _mm256_cvttps_epi32(__m256 __a) |
| 2245 | 2245 | |
| 2246 | 2246 | /// Returns the first element of the input vector of [4 x double]. |
| 2247 | 2247 | /// |
| 2248 | /// \headerfile <avxintrin.h> | |
| 2248 | /// \headerfile <x86intrin.h> | |
| 2249 | 2249 | /// |
| 2250 | 2250 | /// This intrinsic is a utility function and does not correspond to a specific |
| 2251 | 2251 | /// instruction. |
| ... | ... | @@ -2261,7 +2261,7 @@ _mm256_cvtsd_f64(__m256d __a) |
| 2261 | 2261 | |
| 2262 | 2262 | /// Returns the first element of the input vector of [8 x i32]. |
| 2263 | 2263 | /// |
| 2264 | /// \headerfile <avxintrin.h> | |
| 2264 | /// \headerfile <x86intrin.h> | |
| 2265 | 2265 | /// |
| 2266 | 2266 | /// This intrinsic is a utility function and does not correspond to a specific |
| 2267 | 2267 | /// instruction. |
| ... | ... | @@ -2278,7 +2278,7 @@ _mm256_cvtsi256_si32(__m256i __a) |
| 2278 | 2278 | |
| 2279 | 2279 | /// Returns the first element of the input vector of [8 x float]. |
| 2280 | 2280 | /// |
| 2281 | /// \headerfile <avxintrin.h> | |
| 2281 | /// \headerfile <x86intrin.h> | |
| 2282 | 2282 | /// |
| 2283 | 2283 | /// This intrinsic is a utility function and does not correspond to a specific |
| 2284 | 2284 | /// instruction. |
lib/include/avxvnniintrin.h created+225| ... | ... | @@ -0,0 +1,225 @@ |
| 1 | /*===--------------- avxvnniintrin.h - VNNI intrinsics --------------------=== | |
| 2 | * | |
| 3 | * | |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 5 | * of this software and associated documentation files (the "Software"), to deal | |
| 6 | * in the Software without restriction, including without limitation the rights | |
| 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 8 | * copies of the Software, and to permit persons to whom the Software is | |
| 9 | * furnished to do so, subject to the following conditions: | |
| 10 | * | |
| 11 | * The above copyright notice and this permission notice shall be included in | |
| 12 | * all copies or substantial portions of the Software. | |
| 13 | * | |
| 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 20 | * THE SOFTWARE. | |
| 21 | * | |
| 22 | *===-----------------------------------------------------------------------=== | |
| 23 | */ | |
| 24 | #ifndef __IMMINTRIN_H | |
| 25 | #error "Never use <avxvnniintrin.h> directly; include <immintrin.h> instead." | |
| 26 | #endif | |
| 27 | ||
| 28 | #ifndef __AVXVNNIINTRIN_H | |
| 29 | #define __AVXVNNIINTRIN_H | |
| 30 | ||
| 31 | /* Below intrinsics defined in avx512vlvnniintrin.h can be used for AVXVNNI */ | |
| 32 | /// \fn __m256i _mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 33 | /// \fn __m256i _mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 34 | /// \fn __m256i _mm256_dpwssd_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 35 | /// \fn __m256i _mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 36 | /// \fn __m128i _mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 37 | /// \fn __m128i _mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 38 | /// \fn __m128i _mm_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 39 | /// \fn __m128i _mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 40 | ||
| 41 | /* Intrinsics with _avx_ prefix are for compatibility with msvc. */ | |
| 42 | /* Define the default attributes for the functions in this file. */ | |
| 43 | #define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avxvnni"), __min_vector_width__(256))) | |
| 44 | #define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avxvnni"), __min_vector_width__(128))) | |
| 45 | ||
| 46 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a __A with | |
| 47 | /// corresponding signed 8-bit integers in \a __B, producing 4 intermediate signed | |
| 48 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 49 | /// in \a __S, and store the packed 32-bit results in DST. | |
| 50 | /// | |
| 51 | /// This intrinsic corresponds to the <c> VPDPBUSD </c> instructions. | |
| 52 | /// | |
| 53 | /// \operation | |
| 54 | /// FOR j := 0 to 7 | |
| 55 | /// tmp1.word := Signed(ZeroExtend16(__A.byte[4*j]) * SignExtend16(__B.byte[4*j])) | |
| 56 | /// tmp2.word := Signed(ZeroExtend16(__A.byte[4*j+1]) * SignExtend16(__B.byte[4*j+1])) | |
| 57 | /// tmp3.word := Signed(ZeroExtend16(__A.byte[4*j+2]) * SignExtend16(__B.byte[4*j+2])) | |
| 58 | /// tmp4.word := Signed(ZeroExtend16(__A.byte[4*j+3]) * SignExtend16(__B.byte[4*j+3])) | |
| 59 | /// DST.dword[j] := __S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4 | |
| 60 | /// ENDFOR | |
| 61 | /// DST[MAX:256] := 0 | |
| 62 | /// \endoperation | |
| 63 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 64 | _mm256_dpbusd_avx_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 65 | { | |
| 66 | return (__m256i)__builtin_ia32_vpdpbusd256((__v8si)__S, (__v8si)__A, (__v8si)__B); | |
| 67 | } | |
| 68 | ||
| 69 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a __A with | |
| 70 | /// corresponding signed 8-bit integers in \a __B, producing 4 intermediate signed | |
| 71 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 72 | /// in \a __S using signed saturation, and store the packed 32-bit results in DST. | |
| 73 | /// | |
| 74 | /// This intrinsic corresponds to the <c> VPDPBUSDS </c> instructions. | |
| 75 | /// | |
| 76 | /// \operation | |
| 77 | /// FOR j := 0 to 7 | |
| 78 | /// tmp1.word := Signed(ZeroExtend16(__A.byte[4*j]) * SignExtend16(__B.byte[4*j])) | |
| 79 | /// tmp2.word := Signed(ZeroExtend16(__A.byte[4*j+1]) * SignExtend16(__B.byte[4*j+1])) | |
| 80 | /// tmp3.word := Signed(ZeroExtend16(__A.byte[4*j+2]) * SignExtend16(__B.byte[4*j+2])) | |
| 81 | /// tmp4.word := Signed(ZeroExtend16(__A.byte[4*j+3]) * SignExtend16(__B.byte[4*j+3])) | |
| 82 | /// DST.dword[j] := Saturate32(__S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4) | |
| 83 | /// ENDFOR | |
| 84 | /// DST[MAX:256] := 0 | |
| 85 | /// \endoperation | |
| 86 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 87 | _mm256_dpbusds_avx_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 88 | { | |
| 89 | return (__m256i)__builtin_ia32_vpdpbusds256((__v8si)__S, (__v8si)__A, (__v8si)__B); | |
| 90 | } | |
| 91 | ||
| 92 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a __A with | |
| 93 | /// corresponding 16-bit integers in \a __B, producing 2 intermediate signed 32-bit | |
| 94 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a __S, | |
| 95 | /// and store the packed 32-bit results in DST. | |
| 96 | /// | |
| 97 | /// This intrinsic corresponds to the <c> VPDPWSSD </c> instructions. | |
| 98 | /// | |
| 99 | /// \operation | |
| 100 | /// FOR j := 0 to 7 | |
| 101 | /// tmp1.dword := SignExtend32(__A.word[2*j]) * SignExtend32(__B.word[2*j]) | |
| 102 | /// tmp2.dword := SignExtend32(__A.word[2*j+1]) * SignExtend32(__B.word[2*j+1]) | |
| 103 | /// DST.dword[j] := __S.dword[j] + tmp1 + tmp2 | |
| 104 | /// ENDFOR | |
| 105 | /// DST[MAX:256] := 0 | |
| 106 | /// \endoperation | |
| 107 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 108 | _mm256_dpwssd_avx_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 109 | { | |
| 110 | return (__m256i)__builtin_ia32_vpdpwssd256((__v8si)__S, (__v8si)__A, (__v8si)__B); | |
| 111 | } | |
| 112 | ||
| 113 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a __A with | |
| 114 | /// corresponding 16-bit integers in \a __B, producing 2 intermediate signed 32-bit | |
| 115 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a __S | |
| 116 | /// using signed saturation, and store the packed 32-bit results in DST. | |
| 117 | /// | |
| 118 | /// This intrinsic corresponds to the <c> VPDPWSSDS </c> instructions. | |
| 119 | /// | |
| 120 | /// \operation | |
| 121 | /// FOR j := 0 to 7 | |
| 122 | /// tmp1.dword := SignExtend32(__A.word[2*j]) * SignExtend32(__B.word[2*j]) | |
| 123 | /// tmp2.dword := SignExtend32(__A.word[2*j+1]) * SignExtend32(__B.word[2*j+1]) | |
| 124 | /// DST.dword[j] := Saturate32(__S.dword[j] + tmp1 + tmp2) | |
| 125 | /// ENDFOR | |
| 126 | /// DST[MAX:256] := 0 | |
| 127 | /// \endoperation | |
| 128 | static __inline__ __m256i __DEFAULT_FN_ATTRS256 | |
| 129 | _mm256_dpwssds_avx_epi32(__m256i __S, __m256i __A, __m256i __B) | |
| 130 | { | |
| 131 | return (__m256i)__builtin_ia32_vpdpwssds256((__v8si)__S, (__v8si)__A, (__v8si)__B); | |
| 132 | } | |
| 133 | ||
| 134 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a __A with | |
| 135 | /// corresponding signed 8-bit integers in \a __B, producing 4 intermediate signed | |
| 136 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 137 | /// in \a __S, and store the packed 32-bit results in DST. | |
| 138 | /// | |
| 139 | /// This intrinsic corresponds to the <c> VPDPBUSD </c> instructions. | |
| 140 | /// | |
| 141 | /// \operation | |
| 142 | /// FOR j := 0 to 3 | |
| 143 | /// tmp1.word := Signed(ZeroExtend16(__A.byte[4*j]) * SignExtend16(__B.byte[4*j])) | |
| 144 | /// tmp2.word := Signed(ZeroExtend16(__A.byte[4*j+1]) * SignExtend16(__B.byte[4*j+1])) | |
| 145 | /// tmp3.word := Signed(ZeroExtend16(__A.byte[4*j+2]) * SignExtend16(__B.byte[4*j+2])) | |
| 146 | /// tmp4.word := Signed(ZeroExtend16(__A.byte[4*j+3]) * SignExtend16(__B.byte[4*j+3])) | |
| 147 | /// DST.dword[j] := __S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4 | |
| 148 | /// ENDFOR | |
| 149 | /// DST[MAX:128] := 0 | |
| 150 | /// \endoperation | |
| 151 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 152 | _mm_dpbusd_avx_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 153 | { | |
| 154 | return (__m128i)__builtin_ia32_vpdpbusd128((__v4si)__S, (__v4si)__A, (__v4si)__B); | |
| 155 | } | |
| 156 | ||
| 157 | /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a __A with | |
| 158 | /// corresponding signed 8-bit integers in \a __B, producing 4 intermediate signed | |
| 159 | /// 16-bit results. Sum these 4 results with the corresponding 32-bit integer | |
| 160 | /// in \a __S using signed saturation, and store the packed 32-bit results in DST. | |
| 161 | /// | |
| 162 | /// This intrinsic corresponds to the <c> VPDPBUSDS </c> instructions. | |
| 163 | /// | |
| 164 | /// \operation | |
| 165 | /// FOR j := 0 to 3 | |
| 166 | /// tmp1.word := Signed(ZeroExtend16(__A.byte[4*j]) * SignExtend16(__B.byte[4*j])) | |
| 167 | /// tmp2.word := Signed(ZeroExtend16(__A.byte[4*j+1]) * SignExtend16(__B.byte[4*j+1])) | |
| 168 | /// tmp3.word := Signed(ZeroExtend16(__A.byte[4*j+2]) * SignExtend16(__B.byte[4*j+2])) | |
| 169 | /// tmp4.word := Signed(ZeroExtend16(__A.byte[4*j+3]) * SignExtend16(__B.byte[4*j+3])) | |
| 170 | /// DST.dword[j] := Saturate32(__S.dword[j] + tmp1 + tmp2 + tmp3 + tmp4) | |
| 171 | /// ENDFOR | |
| 172 | /// DST[MAX:128] := 0 | |
| 173 | /// \endoperation | |
| 174 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 175 | _mm_dpbusds_avx_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 176 | { | |
| 177 | return (__m128i)__builtin_ia32_vpdpbusds128((__v4si)__S, (__v4si)__A, (__v4si)__B); | |
| 178 | } | |
| 179 | ||
| 180 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a __A with | |
| 181 | /// corresponding 16-bit integers in \a __B, producing 2 intermediate signed 32-bit | |
| 182 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a __S, | |
| 183 | /// and store the packed 32-bit results in DST. | |
| 184 | /// | |
| 185 | /// This intrinsic corresponds to the <c> VPDPWSSD </c> instructions. | |
| 186 | /// | |
| 187 | /// \operation | |
| 188 | /// FOR j := 0 to 3 | |
| 189 | /// tmp1.dword := SignExtend32(__A.word[2*j]) * SignExtend32(__B.word[2*j]) | |
| 190 | /// tmp2.dword := SignExtend32(__A.word[2*j+1]) * SignExtend32(__B.word[2*j+1]) | |
| 191 | /// DST.dword[j] := __S.dword[j] + tmp1 + tmp2 | |
| 192 | /// ENDFOR | |
| 193 | /// DST[MAX:128] := 0 | |
| 194 | /// \endoperation | |
| 195 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 196 | _mm_dpwssd_avx_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 197 | { | |
| 198 | return (__m128i)__builtin_ia32_vpdpwssd128((__v4si)__S, (__v4si)__A, (__v4si)__B); | |
| 199 | } | |
| 200 | ||
| 201 | /// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a __A with | |
| 202 | /// corresponding 16-bit integers in \a __B, producing 2 intermediate signed 32-bit | |
| 203 | /// results. Sum these 2 results with the corresponding 32-bit integer in \a __S | |
| 204 | /// using signed saturation, and store the packed 32-bit results in DST. | |
| 205 | /// | |
| 206 | /// This intrinsic corresponds to the <c> VPDPWSSDS </c> instructions. | |
| 207 | /// | |
| 208 | /// \operation | |
| 209 | /// FOR j := 0 to 3 | |
| 210 | /// tmp1.dword := SignExtend32(__A.word[2*j]) * SignExtend32(__B.word[2*j]) | |
| 211 | /// tmp2.dword := SignExtend32(__A.word[2*j+1]) * SignExtend32(__B.word[2*j+1]) | |
| 212 | /// DST.dword[j] := Saturate32(__S.dword[j] + tmp1 + tmp2) | |
| 213 | /// ENDFOR | |
| 214 | /// DST[MAX:128] := 0 | |
| 215 | /// \endoperation | |
| 216 | static __inline__ __m128i __DEFAULT_FN_ATTRS128 | |
| 217 | _mm_dpwssds_avx_epi32(__m128i __S, __m128i __A, __m128i __B) | |
| 218 | { | |
| 219 | return (__m128i)__builtin_ia32_vpdpwssds128((__v4si)__S, (__v4si)__A, (__v4si)__B); | |
| 220 | } | |
| 221 | ||
| 222 | #undef __DEFAULT_FN_ATTRS128 | |
| 223 | #undef __DEFAULT_FN_ATTRS256 | |
| 224 | ||
| 225 | #endif // __AVXVNNIINTRIN_H |
lib/include/cpuid.h+8| ... | ... | @@ -7,6 +7,9 @@ |
| 7 | 7 | *===-----------------------------------------------------------------------=== |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | #ifndef __CPUID_H | |
| 11 | #define __CPUID_H | |
| 12 | ||
| 10 | 13 | #if !(__x86_64__ || __i386__) |
| 11 | 14 | #error this header is for x86 only |
| 12 | 15 | #endif |
| ... | ... | @@ -186,6 +189,7 @@ |
| 186 | 189 | /* Features in %edx for leaf 7 sub-leaf 0 */ |
| 187 | 190 | #define bit_AVX5124VNNIW 0x00000004 |
| 188 | 191 | #define bit_AVX5124FMAPS 0x00000008 |
| 192 | #define bit_UINTR 0x00000020 | |
| 189 | 193 | #define bit_SERIALIZE 0x00004000 |
| 190 | 194 | #define bit_TSXLDTRK 0x00010000 |
| 191 | 195 | #define bit_PCONFIG 0x00040000 |
| ... | ... | @@ -195,7 +199,9 @@ |
| 195 | 199 | #define bit_AMXINT8 0x02000000 |
| 196 | 200 | |
| 197 | 201 | /* Features in %eax for leaf 7 sub-leaf 1 */ |
| 202 | #define bit_AVXVNNI 0x00000008 | |
| 198 | 203 | #define bit_AVX512BF16 0x00000020 |
| 204 | #define bit_HRESET 0x00400000 | |
| 199 | 205 | |
| 200 | 206 | /* Features in %eax for leaf 13 sub-leaf 1 */ |
| 201 | 207 | #define bit_XSAVEOPT 0x00000001 |
| ... | ... | @@ -309,3 +315,5 @@ static __inline int __get_cpuid_count (unsigned int __leaf, |
| 309 | 315 | __cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx); |
| 310 | 316 | return 1; |
| 311 | 317 | } |
| 318 | ||
| 319 | #endif /* __CPUID_H */ |
lib/include/cuda_wrappers/algorithm+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*===---- complex - CUDA wrapper for <algorithm> ----------------------------=== | |
| 1 | /*===---- algorithm - CUDA wrapper for <algorithm> -------------------------=== | |
| 2 | 2 | * |
| 3 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | 4 | * of this software and associated documentation files (the "Software"), to deal |
lib/include/cuda_wrappers/new+9-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*===---- complex - CUDA wrapper for <new> ------------------------------=== | |
| 1 | /*===---- new - CUDA wrapper for <new> -------------------------------------=== | |
| 2 | 2 | * |
| 3 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | 4 | * of this software and associated documentation files (the "Software"), to deal |
| ... | ... | @@ -26,6 +26,13 @@ |
| 26 | 26 | |
| 27 | 27 | #include_next <new> |
| 28 | 28 | |
| 29 | #if !defined(__device__) | |
| 30 | // The header has been included too early from the standard C++ library | |
| 31 | // and CUDA-specific macros are not available yet. | |
| 32 | // Undo the include guard and try again later. | |
| 33 | #undef __CLANG_CUDA_WRAPPERS_NEW | |
| 34 | #else | |
| 35 | ||
| 29 | 36 | #pragma push_macro("CUDA_NOEXCEPT") |
| 30 | 37 | #if __cplusplus >= 201103L |
| 31 | 38 | #define CUDA_NOEXCEPT noexcept |
| ... | ... | @@ -95,4 +102,5 @@ __device__ inline void operator delete[](void *, void *) CUDA_NOEXCEPT {} |
| 95 | 102 | |
| 96 | 103 | #pragma pop_macro("CUDA_NOEXCEPT") |
| 97 | 104 | |
| 105 | #endif // __device__ | |
| 98 | 106 | #endif // include guard |
lib/include/emmintrin.h+1-1| ... | ... | @@ -4025,7 +4025,7 @@ _mm_storeu_si128(__m128i_u *__p, __m128i __b) |
| 4025 | 4025 | /// |
| 4026 | 4026 | /// \param __p |
| 4027 | 4027 | /// A pointer to a 64-bit memory location. The address of the memory |
| 4028 | /// location does not have to be algned. | |
| 4028 | /// location does not have to be aligned. | |
| 4029 | 4029 | /// \param __b |
| 4030 | 4030 | /// A 128-bit integer vector containing the value to be stored. |
| 4031 | 4031 | static __inline__ void __DEFAULT_FN_ATTRS |
lib/include/gfniintrin.h+90-91| ... | ... | @@ -14,38 +14,56 @@ |
| 14 | 14 | #ifndef __GFNIINTRIN_H |
| 15 | 15 | #define __GFNIINTRIN_H |
| 16 | 16 | |
| 17 | /* Default attributes for simple form (no masking). */ | |
| 18 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("gfni"), __min_vector_width__(128))) | |
| 19 | ||
| 20 | /* Default attributes for YMM unmasked form. */ | |
| 21 | #define __DEFAULT_FN_ATTRS_Y __attribute__((__always_inline__, __nodebug__, __target__("avx,gfni"), __min_vector_width__(256))) | |
| 22 | ||
| 23 | /* Default attributes for ZMM forms. */ | |
| 24 | #define __DEFAULT_FN_ATTRS_Z __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,gfni"), __min_vector_width__(512))) | |
| 25 | ||
| 26 | /* Default attributes for VLX forms. */ | |
| 27 | #define __DEFAULT_FN_ATTRS_VL128 __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,avx512vl,gfni"), __min_vector_width__(128))) | |
| 28 | #define __DEFAULT_FN_ATTRS_VL256 __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,avx512vl,gfni"), __min_vector_width__(256))) | |
| 17 | 29 | |
| 18 | 30 | #define _mm_gf2p8affineinv_epi64_epi8(A, B, I) \ |
| 19 | 31 | (__m128i)__builtin_ia32_vgf2p8affineinvqb_v16qi((__v16qi)(__m128i)(A), \ |
| 20 | 32 | (__v16qi)(__m128i)(B), \ |
| 21 | 33 | (char)(I)) |
| 22 | 34 | |
| 23 | #define _mm_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \ | |
| 24 | (__m128i)__builtin_ia32_selectb_128((__mmask16)(U), \ | |
| 25 | (__v16qi)_mm_gf2p8affineinv_epi64_epi8(A, B, I), \ | |
| 26 | (__v16qi)(__m128i)(S)) | |
| 27 | ||
| 28 | ||
| 29 | #define _mm_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \ | |
| 30 | (__m128i)_mm_mask_gf2p8affineinv_epi64_epi8((__m128i)_mm_setzero_si128(), \ | |
| 31 | U, A, B, I) | |
| 35 | #define _mm_gf2p8affine_epi64_epi8(A, B, I) \ | |
| 36 | (__m128i)__builtin_ia32_vgf2p8affineqb_v16qi((__v16qi)(__m128i)(A), \ | |
| 37 | (__v16qi)(__m128i)(B), \ | |
| 38 | (char)(I)) | |
| 32 | 39 | |
| 40 | static __inline__ __m128i __DEFAULT_FN_ATTRS | |
| 41 | _mm_gf2p8mul_epi8(__m128i __A, __m128i __B) | |
| 42 | { | |
| 43 | return (__m128i) __builtin_ia32_vgf2p8mulb_v16qi((__v16qi) __A, | |
| 44 | (__v16qi) __B); | |
| 45 | } | |
| 33 | 46 | |
| 47 | #ifdef __AVXINTRIN_H | |
| 34 | 48 | #define _mm256_gf2p8affineinv_epi64_epi8(A, B, I) \ |
| 35 | 49 | (__m256i)__builtin_ia32_vgf2p8affineinvqb_v32qi((__v32qi)(__m256i)(A), \ |
| 36 | 50 | (__v32qi)(__m256i)(B), \ |
| 37 | 51 | (char)(I)) |
| 38 | 52 | |
| 39 | #define _mm256_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \ | |
| 40 | (__m256i)__builtin_ia32_selectb_256((__mmask32)(U), \ | |
| 41 | (__v32qi)_mm256_gf2p8affineinv_epi64_epi8(A, B, I), \ | |
| 42 | (__v32qi)(__m256i)(S)) | |
| 43 | ||
| 44 | #define _mm256_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \ | |
| 45 | (__m256i)_mm256_mask_gf2p8affineinv_epi64_epi8((__m256i)_mm256_setzero_si256(), \ | |
| 46 | U, A, B, I) | |
| 53 | #define _mm256_gf2p8affine_epi64_epi8(A, B, I) \ | |
| 54 | (__m256i)__builtin_ia32_vgf2p8affineqb_v32qi((__v32qi)(__m256i)(A), \ | |
| 55 | (__v32qi)(__m256i)(B), \ | |
| 56 | (char)(I)) | |
| 47 | 57 | |
| 58 | static __inline__ __m256i __DEFAULT_FN_ATTRS_Y | |
| 59 | _mm256_gf2p8mul_epi8(__m256i __A, __m256i __B) | |
| 60 | { | |
| 61 | return (__m256i) __builtin_ia32_vgf2p8mulb_v32qi((__v32qi) __A, | |
| 62 | (__v32qi) __B); | |
| 63 | } | |
| 64 | #endif /* __AVXINTRIN_H */ | |
| 48 | 65 | |
| 66 | #ifdef __AVX512BWINTRIN_H | |
| 49 | 67 | #define _mm512_gf2p8affineinv_epi64_epi8(A, B, I) \ |
| 50 | 68 | (__m512i)__builtin_ia32_vgf2p8affineinvqb_v64qi((__v64qi)(__m512i)(A), \ |
| 51 | 69 | (__v64qi)(__m512i)(B), \ |
| ... | ... | @@ -60,27 +78,71 @@ |
| 60 | 78 | (__m512i)_mm512_mask_gf2p8affineinv_epi64_epi8((__m512i)_mm512_setzero_si512(), \ |
| 61 | 79 | U, A, B, I) |
| 62 | 80 | |
| 63 | #define _mm_gf2p8affine_epi64_epi8(A, B, I) \ | |
| 64 | (__m128i)__builtin_ia32_vgf2p8affineqb_v16qi((__v16qi)(__m128i)(A), \ | |
| 65 | (__v16qi)(__m128i)(B), \ | |
| 81 | #define _mm512_gf2p8affine_epi64_epi8(A, B, I) \ | |
| 82 | (__m512i)__builtin_ia32_vgf2p8affineqb_v64qi((__v64qi)(__m512i)(A), \ | |
| 83 | (__v64qi)(__m512i)(B), \ | |
| 66 | 84 | (char)(I)) |
| 67 | 85 | |
| 86 | #define _mm512_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \ | |
| 87 | (__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \ | |
| 88 | (__v64qi)_mm512_gf2p8affine_epi64_epi8(A, B, I), \ | |
| 89 | (__v64qi)(__m512i)(S)) | |
| 90 | ||
| 91 | #define _mm512_maskz_gf2p8affine_epi64_epi8(U, A, B, I) \ | |
| 92 | (__m512i)_mm512_mask_gf2p8affine_epi64_epi8((__m512i)_mm512_setzero_si512(), \ | |
| 93 | U, A, B, I) | |
| 94 | ||
| 95 | static __inline__ __m512i __DEFAULT_FN_ATTRS_Z | |
| 96 | _mm512_gf2p8mul_epi8(__m512i __A, __m512i __B) | |
| 97 | { | |
| 98 | return (__m512i) __builtin_ia32_vgf2p8mulb_v64qi((__v64qi) __A, | |
| 99 | (__v64qi) __B); | |
| 100 | } | |
| 101 | ||
| 102 | static __inline__ __m512i __DEFAULT_FN_ATTRS_Z | |
| 103 | _mm512_mask_gf2p8mul_epi8(__m512i __S, __mmask64 __U, __m512i __A, __m512i __B) | |
| 104 | { | |
| 105 | return (__m512i) __builtin_ia32_selectb_512(__U, | |
| 106 | (__v64qi) _mm512_gf2p8mul_epi8(__A, __B), | |
| 107 | (__v64qi) __S); | |
| 108 | } | |
| 109 | ||
| 110 | static __inline__ __m512i __DEFAULT_FN_ATTRS_Z | |
| 111 | _mm512_maskz_gf2p8mul_epi8(__mmask64 __U, __m512i __A, __m512i __B) | |
| 112 | { | |
| 113 | return _mm512_mask_gf2p8mul_epi8((__m512i)_mm512_setzero_si512(), | |
| 114 | __U, __A, __B); | |
| 115 | } | |
| 116 | #endif /* __AVX512BWINTRIN_H */ | |
| 117 | ||
| 118 | #ifdef __AVX512VLBWINTRIN_H | |
| 119 | #define _mm_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \ | |
| 120 | (__m128i)__builtin_ia32_selectb_128((__mmask16)(U), \ | |
| 121 | (__v16qi)_mm_gf2p8affineinv_epi64_epi8(A, B, I), \ | |
| 122 | (__v16qi)(__m128i)(S)) | |
| 123 | ||
| 124 | #define _mm_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \ | |
| 125 | (__m128i)_mm_mask_gf2p8affineinv_epi64_epi8((__m128i)_mm_setzero_si128(), \ | |
| 126 | U, A, B, I) | |
| 127 | ||
| 128 | #define _mm256_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \ | |
| 129 | (__m256i)__builtin_ia32_selectb_256((__mmask32)(U), \ | |
| 130 | (__v32qi)_mm256_gf2p8affineinv_epi64_epi8(A, B, I), \ | |
| 131 | (__v32qi)(__m256i)(S)) | |
| 132 | ||
| 133 | #define _mm256_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \ | |
| 134 | (__m256i)_mm256_mask_gf2p8affineinv_epi64_epi8((__m256i)_mm256_setzero_si256(), \ | |
| 135 | U, A, B, I) | |
| 136 | ||
| 68 | 137 | #define _mm_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \ |
| 69 | 138 | (__m128i)__builtin_ia32_selectb_128((__mmask16)(U), \ |
| 70 | 139 | (__v16qi)_mm_gf2p8affine_epi64_epi8(A, B, I), \ |
| 71 | 140 | (__v16qi)(__m128i)(S)) |
| 72 | 141 | |
| 73 | ||
| 74 | 142 | #define _mm_maskz_gf2p8affine_epi64_epi8(U, A, B, I) \ |
| 75 | 143 | (__m128i)_mm_mask_gf2p8affine_epi64_epi8((__m128i)_mm_setzero_si128(), \ |
| 76 | 144 | U, A, B, I) |
| 77 | 145 | |
| 78 | ||
| 79 | #define _mm256_gf2p8affine_epi64_epi8(A, B, I) \ | |
| 80 | (__m256i)__builtin_ia32_vgf2p8affineqb_v32qi((__v32qi)(__m256i)(A), \ | |
| 81 | (__v32qi)(__m256i)(B), \ | |
| 82 | (char)(I)) | |
| 83 | ||
| 84 | 146 | #define _mm256_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \ |
| 85 | 147 | (__m256i)__builtin_ia32_selectb_256((__mmask32)(U), \ |
| 86 | 148 | (__v32qi)_mm256_gf2p8affine_epi64_epi8(A, B, I), \ |
| ... | ... | @@ -90,41 +152,6 @@ |
| 90 | 152 | (__m256i)_mm256_mask_gf2p8affine_epi64_epi8((__m256i)_mm256_setzero_si256(), \ |
| 91 | 153 | U, A, B, I) |
| 92 | 154 | |
| 93 | ||
| 94 | #define _mm512_gf2p8affine_epi64_epi8(A, B, I) \ | |
| 95 | (__m512i)__builtin_ia32_vgf2p8affineqb_v64qi((__v64qi)(__m512i)(A), \ | |
| 96 | (__v64qi)(__m512i)(B), \ | |
| 97 | (char)(I)) | |
| 98 | ||
| 99 | #define _mm512_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \ | |
| 100 | (__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \ | |
| 101 | (__v64qi)_mm512_gf2p8affine_epi64_epi8(A, B, I), \ | |
| 102 | (__v64qi)(__m512i)(S)) | |
| 103 | ||
| 104 | #define _mm512_maskz_gf2p8affine_epi64_epi8(U, A, B, I) \ | |
| 105 | (__m512i)_mm512_mask_gf2p8affine_epi64_epi8((__m512i)_mm512_setzero_si512(), \ | |
| 106 | U, A, B, I) | |
| 107 | ||
| 108 | /* Default attributes for simple form (no masking). */ | |
| 109 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("gfni"), __min_vector_width__(128))) | |
| 110 | ||
| 111 | /* Default attributes for YMM unmasked form. */ | |
| 112 | #define __DEFAULT_FN_ATTRS_Y __attribute__((__always_inline__, __nodebug__, __target__("avx,gfni"), __min_vector_width__(256))) | |
| 113 | ||
| 114 | /* Default attributes for ZMM forms. */ | |
| 115 | #define __DEFAULT_FN_ATTRS_Z __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,gfni"), __min_vector_width__(512))) | |
| 116 | ||
| 117 | /* Default attributes for VLX forms. */ | |
| 118 | #define __DEFAULT_FN_ATTRS_VL128 __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,avx512vl,gfni"), __min_vector_width__(128))) | |
| 119 | #define __DEFAULT_FN_ATTRS_VL256 __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,avx512vl,gfni"), __min_vector_width__(256))) | |
| 120 | ||
| 121 | static __inline__ __m128i __DEFAULT_FN_ATTRS | |
| 122 | _mm_gf2p8mul_epi8(__m128i __A, __m128i __B) | |
| 123 | { | |
| 124 | return (__m128i) __builtin_ia32_vgf2p8mulb_v16qi((__v16qi) __A, | |
| 125 | (__v16qi) __B); | |
| 126 | } | |
| 127 | ||
| 128 | 155 | static __inline__ __m128i __DEFAULT_FN_ATTRS_VL128 |
| 129 | 156 | _mm_mask_gf2p8mul_epi8(__m128i __S, __mmask16 __U, __m128i __A, __m128i __B) |
| 130 | 157 | { |
| ... | ... | @@ -140,13 +167,6 @@ _mm_maskz_gf2p8mul_epi8(__mmask16 __U, __m128i __A, __m128i __B) |
| 140 | 167 | __U, __A, __B); |
| 141 | 168 | } |
| 142 | 169 | |
| 143 | static __inline__ __m256i __DEFAULT_FN_ATTRS_Y | |
| 144 | _mm256_gf2p8mul_epi8(__m256i __A, __m256i __B) | |
| 145 | { | |
| 146 | return (__m256i) __builtin_ia32_vgf2p8mulb_v32qi((__v32qi) __A, | |
| 147 | (__v32qi) __B); | |
| 148 | } | |
| 149 | ||
| 150 | 170 | static __inline__ __m256i __DEFAULT_FN_ATTRS_VL256 |
| 151 | 171 | _mm256_mask_gf2p8mul_epi8(__m256i __S, __mmask32 __U, __m256i __A, __m256i __B) |
| 152 | 172 | { |
| ... | ... | @@ -161,28 +181,7 @@ _mm256_maskz_gf2p8mul_epi8(__mmask32 __U, __m256i __A, __m256i __B) |
| 161 | 181 | return _mm256_mask_gf2p8mul_epi8((__m256i)_mm256_setzero_si256(), |
| 162 | 182 | __U, __A, __B); |
| 163 | 183 | } |
| 164 | ||
| 165 | static __inline__ __m512i __DEFAULT_FN_ATTRS_Z | |
| 166 | _mm512_gf2p8mul_epi8(__m512i __A, __m512i __B) | |
| 167 | { | |
| 168 | return (__m512i) __builtin_ia32_vgf2p8mulb_v64qi((__v64qi) __A, | |
| 169 | (__v64qi) __B); | |
| 170 | } | |
| 171 | ||
| 172 | static __inline__ __m512i __DEFAULT_FN_ATTRS_Z | |
| 173 | _mm512_mask_gf2p8mul_epi8(__m512i __S, __mmask64 __U, __m512i __A, __m512i __B) | |
| 174 | { | |
| 175 | return (__m512i) __builtin_ia32_selectb_512(__U, | |
| 176 | (__v64qi) _mm512_gf2p8mul_epi8(__A, __B), | |
| 177 | (__v64qi) __S); | |
| 178 | } | |
| 179 | ||
| 180 | static __inline__ __m512i __DEFAULT_FN_ATTRS_Z | |
| 181 | _mm512_maskz_gf2p8mul_epi8(__mmask64 __U, __m512i __A, __m512i __B) | |
| 182 | { | |
| 183 | return _mm512_mask_gf2p8mul_epi8((__m512i)_mm512_setzero_si512(), | |
| 184 | __U, __A, __B); | |
| 185 | } | |
| 184 | #endif /* __AVX512VLBWINTRIN_H */ | |
| 186 | 185 | |
| 187 | 186 | #undef __DEFAULT_FN_ATTRS |
| 188 | 187 | #undef __DEFAULT_FN_ATTRS_Y |
lib/include/hresetintrin.h created+49| ... | ... | @@ -0,0 +1,49 @@ |
| 1 | /*===---------------- hresetintrin.h - HRESET intrinsics -------------------=== | |
| 2 | * | |
| 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | * See https://llvm.org/LICENSE.txt for license information. | |
| 5 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | * | |
| 7 | *===-----------------------------------------------------------------------=== | |
| 8 | */ | |
| 9 | #ifndef __X86GPRINTRIN_H | |
| 10 | #error "Never use <hresetintrin.h> directly; include <x86gprintrin.h> instead." | |
| 11 | #endif | |
| 12 | ||
| 13 | #ifndef __HRESETINTRIN_H | |
| 14 | #define __HRESETINTRIN_H | |
| 15 | ||
| 16 | #if __has_extension(gnu_asm) | |
| 17 | ||
| 18 | /* Define the default attributes for the functions in this file. */ | |
| 19 | #define __DEFAULT_FN_ATTRS \ | |
| 20 | __attribute__((__always_inline__, __nodebug__, __target__("hreset"))) | |
| 21 | ||
| 22 | /// Provides a hint to the processor to selectively reset the prediction | |
| 23 | /// history of the current logical processor specified by a 32-bit integer | |
| 24 | /// value \a __eax. | |
| 25 | /// | |
| 26 | /// This intrinsic corresponds to the <c> HRESET </c> instruction. | |
| 27 | /// | |
| 28 | /// \operation | |
| 29 | /// IF __eax == 0 | |
| 30 | /// // nop | |
| 31 | /// ELSE | |
| 32 | /// FOR i := 0 to 31 | |
| 33 | /// IF __eax[i] | |
| 34 | /// ResetPredictionFeature(i) | |
| 35 | /// FI | |
| 36 | /// ENDFOR | |
| 37 | /// FI | |
| 38 | /// \endoperation | |
| 39 | static __inline void __DEFAULT_FN_ATTRS | |
| 40 | _hreset(int __eax) | |
| 41 | { | |
| 42 | __asm__ ("hreset $0" :: "a"(__eax)); | |
| 43 | } | |
| 44 | ||
| 45 | #undef __DEFAULT_FN_ATTRS | |
| 46 | ||
| 47 | #endif /* __has_extension(gnu_asm) */ | |
| 48 | ||
| 49 | #endif /* __HRESETINTRIN_H */ |
lib/include/ia32intrin.h+53-44| ... | ... | @@ -14,6 +14,18 @@ |
| 14 | 14 | #ifndef __IA32INTRIN_H |
| 15 | 15 | #define __IA32INTRIN_H |
| 16 | 16 | |
| 17 | /* Define the default attributes for the functions in this file. */ | |
| 18 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) | |
| 19 | #define __DEFAULT_FN_ATTRS_SSE42 __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) | |
| 20 | ||
| 21 | #if defined(__cplusplus) && (__cplusplus >= 201103L) | |
| 22 | #define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) constexpr | |
| 23 | #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS constexpr | |
| 24 | #else | |
| 25 | #define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) | |
| 26 | #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS | |
| 27 | #endif | |
| 28 | ||
| 17 | 29 | /** Find the first set bit starting from the lsb. Result is undefined if |
| 18 | 30 | * input is 0. |
| 19 | 31 | * |
| ... | ... | @@ -26,7 +38,7 @@ |
| 26 | 38 | * A 32-bit integer operand. |
| 27 | 39 | * \returns A 32-bit integer containing the bit number. |
| 28 | 40 | */ |
| 29 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 41 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 30 | 42 | __bsfd(int __A) { |
| 31 | 43 | return __builtin_ctz(__A); |
| 32 | 44 | } |
| ... | ... | @@ -43,7 +55,7 @@ __bsfd(int __A) { |
| 43 | 55 | * A 32-bit integer operand. |
| 44 | 56 | * \returns A 32-bit integer containing the bit number. |
| 45 | 57 | */ |
| 46 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 58 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 47 | 59 | __bsrd(int __A) { |
| 48 | 60 | return 31 - __builtin_clz(__A); |
| 49 | 61 | } |
| ... | ... | @@ -59,12 +71,12 @@ __bsrd(int __A) { |
| 59 | 71 | * A 32-bit integer operand. |
| 60 | 72 | * \returns A 32-bit integer containing the swapped bytes. |
| 61 | 73 | */ |
| 62 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 74 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 63 | 75 | __bswapd(int __A) { |
| 64 | 76 | return __builtin_bswap32(__A); |
| 65 | 77 | } |
| 66 | 78 | |
| 67 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 79 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 68 | 80 | _bswap(int __A) { |
| 69 | 81 | return __builtin_bswap32(__A); |
| 70 | 82 | } |
| ... | ... | @@ -85,7 +97,7 @@ _bswap(int __A) { |
| 85 | 97 | * A 64-bit integer operand. |
| 86 | 98 | * \returns A 32-bit integer containing the bit number. |
| 87 | 99 | */ |
| 88 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 100 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 89 | 101 | __bsfq(long long __A) { |
| 90 | 102 | return __builtin_ctzll(__A); |
| 91 | 103 | } |
| ... | ... | @@ -102,7 +114,7 @@ __bsfq(long long __A) { |
| 102 | 114 | * A 64-bit integer operand. |
| 103 | 115 | * \returns A 32-bit integer containing the bit number. |
| 104 | 116 | */ |
| 105 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 117 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 106 | 118 | __bsrq(long long __A) { |
| 107 | 119 | return 63 - __builtin_clzll(__A); |
| 108 | 120 | } |
| ... | ... | @@ -118,7 +130,7 @@ __bsrq(long long __A) { |
| 118 | 130 | * A 64-bit integer operand. |
| 119 | 131 | * \returns A 64-bit integer containing the swapped bytes. |
| 120 | 132 | */ |
| 121 | static __inline__ long long __attribute__((__always_inline__, __nodebug__)) | |
| 133 | static __inline__ long long __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 122 | 134 | __bswapq(long long __A) { |
| 123 | 135 | return __builtin_bswap64(__A); |
| 124 | 136 | } |
| ... | ... | @@ -138,7 +150,7 @@ __bswapq(long long __A) { |
| 138 | 150 | * \returns A 32-bit integer containing the number of bits with value 1 in the |
| 139 | 151 | * source operand. |
| 140 | 152 | */ |
| 141 | static __inline__ int __attribute__((__always_inline__, __nodebug__)) | |
| 153 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 142 | 154 | __popcntd(unsigned int __A) |
| 143 | 155 | { |
| 144 | 156 | return __builtin_popcount(__A); |
| ... | ... | @@ -159,7 +171,7 @@ __popcntd(unsigned int __A) |
| 159 | 171 | * \returns A 64-bit integer containing the number of bits with value 1 in the |
| 160 | 172 | * source operand. |
| 161 | 173 | */ |
| 162 | static __inline__ long long __attribute__((__always_inline__, __nodebug__)) | |
| 174 | static __inline__ long long __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 163 | 175 | __popcntq(unsigned long long __A) |
| 164 | 176 | { |
| 165 | 177 | return __builtin_popcountll(__A); |
| ... | ... | @@ -169,26 +181,26 @@ __popcntq(unsigned long long __A) |
| 169 | 181 | #endif /* __x86_64__ */ |
| 170 | 182 | |
| 171 | 183 | #ifdef __x86_64__ |
| 172 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) | |
| 184 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS | |
| 173 | 185 | __readeflags(void) |
| 174 | 186 | { |
| 175 | 187 | return __builtin_ia32_readeflags_u64(); |
| 176 | 188 | } |
| 177 | 189 | |
| 178 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) | |
| 190 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 179 | 191 | __writeeflags(unsigned long long __f) |
| 180 | 192 | { |
| 181 | 193 | __builtin_ia32_writeeflags_u64(__f); |
| 182 | 194 | } |
| 183 | 195 | |
| 184 | 196 | #else /* !__x86_64__ */ |
| 185 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) | |
| 197 | static __inline__ unsigned int __DEFAULT_FN_ATTRS | |
| 186 | 198 | __readeflags(void) |
| 187 | 199 | { |
| 188 | 200 | return __builtin_ia32_readeflags_u32(); |
| 189 | 201 | } |
| 190 | 202 | |
| 191 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) | |
| 203 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 192 | 204 | __writeeflags(unsigned int __f) |
| 193 | 205 | { |
| 194 | 206 | __builtin_ia32_writeeflags_u32(__f); |
| ... | ... | @@ -205,11 +217,9 @@ __writeeflags(unsigned int __f) |
| 205 | 217 | * A 32-bit float value. |
| 206 | 218 | * \returns a 32-bit unsigned integer containing the converted value. |
| 207 | 219 | */ |
| 208 | static __inline__ unsigned int __attribute__((__always_inline__)) | |
| 220 | static __inline__ unsigned int __DEFAULT_FN_ATTRS_CAST | |
| 209 | 221 | _castf32_u32(float __A) { |
| 210 | unsigned int D; | |
| 211 | __builtin_memcpy(&D, &__A, sizeof(__A)); | |
| 212 | return D; | |
| 222 | return __builtin_bit_cast(unsigned int, __A); | |
| 213 | 223 | } |
| 214 | 224 | |
| 215 | 225 | /** Cast a 64-bit float value to a 64-bit unsigned integer value |
| ... | ... | @@ -222,11 +232,9 @@ _castf32_u32(float __A) { |
| 222 | 232 | * A 64-bit float value. |
| 223 | 233 | * \returns a 64-bit unsigned integer containing the converted value. |
| 224 | 234 | */ |
| 225 | static __inline__ unsigned long long __attribute__((__always_inline__)) | |
| 235 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CAST | |
| 226 | 236 | _castf64_u64(double __A) { |
| 227 | unsigned long long D; | |
| 228 | __builtin_memcpy(&D, &__A, sizeof(__A)); | |
| 229 | return D; | |
| 237 | return __builtin_bit_cast(unsigned long long, __A); | |
| 230 | 238 | } |
| 231 | 239 | |
| 232 | 240 | /** Cast a 32-bit unsigned integer value to a 32-bit float value |
| ... | ... | @@ -239,11 +247,9 @@ _castf64_u64(double __A) { |
| 239 | 247 | * A 32-bit unsigned integer value. |
| 240 | 248 | * \returns a 32-bit float value containing the converted value. |
| 241 | 249 | */ |
| 242 | static __inline__ float __attribute__((__always_inline__)) | |
| 250 | static __inline__ float __DEFAULT_FN_ATTRS_CAST | |
| 243 | 251 | _castu32_f32(unsigned int __A) { |
| 244 | float D; | |
| 245 | __builtin_memcpy(&D, &__A, sizeof(__A)); | |
| 246 | return D; | |
| 252 | return __builtin_bit_cast(float, __A); | |
| 247 | 253 | } |
| 248 | 254 | |
| 249 | 255 | /** Cast a 64-bit unsigned integer value to a 64-bit float value |
| ... | ... | @@ -256,11 +262,9 @@ _castu32_f32(unsigned int __A) { |
| 256 | 262 | * A 64-bit unsigned integer value. |
| 257 | 263 | * \returns a 64-bit float value containing the converted value. |
| 258 | 264 | */ |
| 259 | static __inline__ double __attribute__((__always_inline__)) | |
| 265 | static __inline__ double __DEFAULT_FN_ATTRS_CAST | |
| 260 | 266 | _castu64_f64(unsigned long long __A) { |
| 261 | double D; | |
| 262 | __builtin_memcpy(&D, &__A, sizeof(__A)); | |
| 263 | return D; | |
| 267 | return __builtin_bit_cast(double, __A); | |
| 264 | 268 | } |
| 265 | 269 | |
| 266 | 270 | /** Adds the unsigned integer operand to the CRC-32C checksum of the |
| ... | ... | @@ -278,7 +282,7 @@ _castu64_f64(unsigned long long __A) { |
| 278 | 282 | * \returns The result of adding operand \a __C to the CRC-32C checksum of |
| 279 | 283 | * operand \a __D. |
| 280 | 284 | */ |
| 281 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) | |
| 285 | static __inline__ unsigned int __DEFAULT_FN_ATTRS_SSE42 | |
| 282 | 286 | __crc32b(unsigned int __C, unsigned char __D) |
| 283 | 287 | { |
| 284 | 288 | return __builtin_ia32_crc32qi(__C, __D); |
| ... | ... | @@ -299,7 +303,7 @@ __crc32b(unsigned int __C, unsigned char __D) |
| 299 | 303 | * \returns The result of adding operand \a __C to the CRC-32C checksum of |
| 300 | 304 | * operand \a __D. |
| 301 | 305 | */ |
| 302 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) | |
| 306 | static __inline__ unsigned int __DEFAULT_FN_ATTRS_SSE42 | |
| 303 | 307 | __crc32w(unsigned int __C, unsigned short __D) |
| 304 | 308 | { |
| 305 | 309 | return __builtin_ia32_crc32hi(__C, __D); |
| ... | ... | @@ -320,7 +324,7 @@ __crc32w(unsigned int __C, unsigned short __D) |
| 320 | 324 | * \returns The result of adding operand \a __C to the CRC-32C checksum of |
| 321 | 325 | * operand \a __D. |
| 322 | 326 | */ |
| 323 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) | |
| 327 | static __inline__ unsigned int __DEFAULT_FN_ATTRS_SSE42 | |
| 324 | 328 | __crc32d(unsigned int __C, unsigned int __D) |
| 325 | 329 | { |
| 326 | 330 | return __builtin_ia32_crc32si(__C, __D); |
| ... | ... | @@ -342,20 +346,20 @@ __crc32d(unsigned int __C, unsigned int __D) |
| 342 | 346 | * \returns The result of adding operand \a __C to the CRC-32C checksum of |
| 343 | 347 | * operand \a __D. |
| 344 | 348 | */ |
| 345 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) | |
| 349 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS_SSE42 | |
| 346 | 350 | __crc32q(unsigned long long __C, unsigned long long __D) |
| 347 | 351 | { |
| 348 | 352 | return __builtin_ia32_crc32di(__C, __D); |
| 349 | 353 | } |
| 350 | 354 | #endif /* __x86_64__ */ |
| 351 | 355 | |
| 352 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) | |
| 356 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS | |
| 353 | 357 | __rdpmc(int __A) { |
| 354 | 358 | return __builtin_ia32_rdpmc(__A); |
| 355 | 359 | } |
| 356 | 360 | |
| 357 | 361 | /* __rdtscp */ |
| 358 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) | |
| 362 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS | |
| 359 | 363 | __rdtscp(unsigned int *__A) { |
| 360 | 364 | return __builtin_ia32_rdtscp(__A); |
| 361 | 365 | } |
| ... | ... | @@ -364,48 +368,48 @@ __rdtscp(unsigned int *__A) { |
| 364 | 368 | |
| 365 | 369 | #define _rdpmc(A) __rdpmc(A) |
| 366 | 370 | |
| 367 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) | |
| 371 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 368 | 372 | _wbinvd(void) { |
| 369 | 373 | __builtin_ia32_wbinvd(); |
| 370 | 374 | } |
| 371 | 375 | |
| 372 | static __inline__ unsigned char __attribute__((__always_inline__, __nodebug__)) | |
| 376 | static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 373 | 377 | __rolb(unsigned char __X, int __C) { |
| 374 | 378 | return __builtin_rotateleft8(__X, __C); |
| 375 | 379 | } |
| 376 | 380 | |
| 377 | static __inline__ unsigned char __attribute__((__always_inline__, __nodebug__)) | |
| 381 | static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 378 | 382 | __rorb(unsigned char __X, int __C) { |
| 379 | 383 | return __builtin_rotateright8(__X, __C); |
| 380 | 384 | } |
| 381 | 385 | |
| 382 | static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__)) | |
| 386 | static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 383 | 387 | __rolw(unsigned short __X, int __C) { |
| 384 | 388 | return __builtin_rotateleft16(__X, __C); |
| 385 | 389 | } |
| 386 | 390 | |
| 387 | static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__)) | |
| 391 | static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 388 | 392 | __rorw(unsigned short __X, int __C) { |
| 389 | 393 | return __builtin_rotateright16(__X, __C); |
| 390 | 394 | } |
| 391 | 395 | |
| 392 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) | |
| 396 | static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 393 | 397 | __rold(unsigned int __X, int __C) { |
| 394 | 398 | return __builtin_rotateleft32(__X, __C); |
| 395 | 399 | } |
| 396 | 400 | |
| 397 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) | |
| 401 | static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 398 | 402 | __rord(unsigned int __X, int __C) { |
| 399 | 403 | return __builtin_rotateright32(__X, __C); |
| 400 | 404 | } |
| 401 | 405 | |
| 402 | 406 | #ifdef __x86_64__ |
| 403 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) | |
| 407 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 404 | 408 | __rolq(unsigned long long __X, int __C) { |
| 405 | 409 | return __builtin_rotateleft64(__X, __C); |
| 406 | 410 | } |
| 407 | 411 | |
| 408 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) | |
| 412 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 409 | 413 | __rorq(unsigned long long __X, int __C) { |
| 410 | 414 | return __builtin_rotateright64(__X, __C); |
| 411 | 415 | } |
| ... | ... | @@ -429,4 +433,9 @@ __rorq(unsigned long long __X, int __C) { |
| 429 | 433 | #define _rotwl(a,b) __rolw((a), (b)) |
| 430 | 434 | #define _rotwr(a,b) __rorw((a), (b)) |
| 431 | 435 | |
| 436 | #undef __DEFAULT_FN_ATTRS | |
| 437 | #undef __DEFAULT_FN_ATTRS_CAST | |
| 438 | #undef __DEFAULT_FN_ATTRS_SSE42 | |
| 439 | #undef __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 440 | ||
| 432 | 441 | #endif /* __IA32INTRIN_H */ |
lib/include/immintrin.h+12| ... | ... | @@ -10,6 +10,8 @@ |
| 10 | 10 | #ifndef __IMMINTRIN_H |
| 11 | 11 | #define __IMMINTRIN_H |
| 12 | 12 | |
| 13 | #include <x86gprintrin.h> | |
| 14 | ||
| 13 | 15 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 14 | 16 | defined(__MMX__) |
| 15 | 17 | #include <mmintrin.h> |
| ... | ... | @@ -143,6 +145,11 @@ |
| 143 | 145 | #include <avx512vlvnniintrin.h> |
| 144 | 146 | #endif |
| 145 | 147 | |
| 148 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ | |
| 149 | defined(__AVXVNNI__) | |
| 150 | #include <avxvnniintrin.h> | |
| 151 | #endif | |
| 152 | ||
| 146 | 153 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 147 | 154 | defined(__AVX512DQ__) |
| 148 | 155 | #include <avx512dqintrin.h> |
| ... | ... | @@ -471,6 +478,11 @@ _storebe_i64(void * __P, long long __D) { |
| 471 | 478 | #include <invpcidintrin.h> |
| 472 | 479 | #endif |
| 473 | 480 | |
| 481 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ | |
| 482 | defined(__KL__) || defined(__WIDEKL__) | |
| 483 | #include <keylockerintrin.h> | |
| 484 | #endif | |
| 485 | ||
| 474 | 486 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ |
| 475 | 487 | defined(__AMXTILE__) || defined(__AMXINT8__) || defined(__AMXBF16__) |
| 476 | 488 | #include <amxintrin.h> |
lib/include/intrin.h+78-91| ... | ... | @@ -57,16 +57,11 @@ void __addfsbyte(unsigned long, unsigned char); |
| 57 | 57 | void __addfsdword(unsigned long, unsigned long); |
| 58 | 58 | void __addfsword(unsigned long, unsigned short); |
| 59 | 59 | void __code_seg(const char *); |
| 60 | static __inline__ | |
| 61 | 60 | void __cpuid(int[4], int); |
| 62 | static __inline__ | |
| 63 | 61 | void __cpuidex(int[4], int, int); |
| 64 | static __inline__ | |
| 65 | 62 | __int64 __emul(int, int); |
| 66 | static __inline__ | |
| 67 | 63 | unsigned __int64 __emulu(unsigned int, unsigned int); |
| 68 | 64 | unsigned int __getcallerseflags(void); |
| 69 | static __inline__ | |
| 70 | 65 | void __halt(void); |
| 71 | 66 | unsigned char __inbyte(unsigned short); |
| 72 | 67 | void __inbytestring(unsigned short, unsigned char *, unsigned long); |
| ... | ... | @@ -82,13 +77,9 @@ void __inwordstring(unsigned short, unsigned short *, unsigned long); |
| 82 | 77 | void __lidt(void *); |
| 83 | 78 | unsigned __int64 __ll_lshift(unsigned __int64, int); |
| 84 | 79 | __int64 __ll_rshift(__int64, int); |
| 85 | static __inline__ | |
| 86 | 80 | void __movsb(unsigned char *, unsigned char const *, size_t); |
| 87 | static __inline__ | |
| 88 | 81 | void __movsd(unsigned long *, unsigned long const *, size_t); |
| 89 | static __inline__ | |
| 90 | 82 | void __movsw(unsigned short *, unsigned short const *, size_t); |
| 91 | static __inline__ | |
| 92 | 83 | void __nop(void); |
| 93 | 84 | void __nvreg_restore_fence(void); |
| 94 | 85 | void __nvreg_save_fence(void); |
| ... | ... | @@ -105,23 +96,16 @@ unsigned long __readcr4(void); |
| 105 | 96 | unsigned long __readcr8(void); |
| 106 | 97 | unsigned int __readdr(unsigned int); |
| 107 | 98 | #ifdef __i386__ |
| 108 | static __inline__ | |
| 109 | 99 | unsigned char __readfsbyte(unsigned long); |
| 110 | static __inline__ | |
| 111 | 100 | unsigned __int64 __readfsqword(unsigned long); |
| 112 | static __inline__ | |
| 113 | 101 | unsigned short __readfsword(unsigned long); |
| 114 | 102 | #endif |
| 115 | static __inline__ | |
| 116 | 103 | unsigned __int64 __readmsr(unsigned long); |
| 117 | 104 | unsigned __int64 __readpmc(unsigned long); |
| 118 | 105 | unsigned long __segmentlimit(unsigned long); |
| 119 | 106 | void __sidt(void *); |
| 120 | static __inline__ | |
| 121 | 107 | void __stosb(unsigned char *, unsigned char, size_t); |
| 122 | static __inline__ | |
| 123 | 108 | void __stosd(unsigned long *, unsigned long, size_t); |
| 124 | static __inline__ | |
| 125 | 109 | void __stosw(unsigned short *, unsigned short, size_t); |
| 126 | 110 | void __svm_clgi(void); |
| 127 | 111 | void __svm_invlpga(void *, int); |
| ... | ... | @@ -136,7 +120,6 @@ void __vmx_off(void); |
| 136 | 120 | void __vmx_vmptrst(unsigned __int64 *); |
| 137 | 121 | void __wbinvd(void); |
| 138 | 122 | void __writecr0(unsigned int); |
| 139 | static __inline__ | |
| 140 | 123 | void __writecr3(unsigned __INTPTR_TYPE__); |
| 141 | 124 | void __writecr4(unsigned int); |
| 142 | 125 | void __writecr8(unsigned int); |
| ... | ... | @@ -146,11 +129,8 @@ void __writefsdword(unsigned long, unsigned long); |
| 146 | 129 | void __writefsqword(unsigned long, unsigned __int64); |
| 147 | 130 | void __writefsword(unsigned long, unsigned short); |
| 148 | 131 | void __writemsr(unsigned long, unsigned __int64); |
| 149 | static __inline__ | |
| 150 | 132 | void *_AddressOfReturnAddress(void); |
| 151 | static __inline__ | |
| 152 | 133 | unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask); |
| 153 | static __inline__ | |
| 154 | 134 | unsigned char _BitScanReverse(unsigned long *_Index, unsigned long _Mask); |
| 155 | 135 | unsigned char _bittest(long const *, long); |
| 156 | 136 | unsigned char _bittestandcomplement(long *, long); |
| ... | ... | @@ -169,12 +149,10 @@ long _InterlockedExchangeAdd_HLEAcquire(long volatile *, long); |
| 169 | 149 | long _InterlockedExchangeAdd_HLERelease(long volatile *, long); |
| 170 | 150 | __int64 _InterlockedExchangeAdd64_HLEAcquire(__int64 volatile *, __int64); |
| 171 | 151 | __int64 _InterlockedExchangeAdd64_HLERelease(__int64 volatile *, __int64); |
| 172 | static __inline__ void | |
| 173 | __attribute__((__deprecated__("use other intrinsics or C++11 atomics instead"))) | |
| 174 | _ReadBarrier(void); | |
| 175 | static __inline__ void | |
| 176 | __attribute__((__deprecated__("use other intrinsics or C++11 atomics instead"))) | |
| 177 | _ReadWriteBarrier(void); | |
| 152 | void __attribute__((__deprecated__( | |
| 153 | "use other intrinsics or C++11 atomics instead"))) _ReadBarrier(void); | |
| 154 | void __attribute__((__deprecated__( | |
| 155 | "use other intrinsics or C++11 atomics instead"))) _ReadWriteBarrier(void); | |
| 178 | 156 | unsigned int _rorx_u32(unsigned int, const unsigned int); |
| 179 | 157 | int _sarx_i32(int, unsigned int); |
| 180 | 158 | #if __STDC_HOSTED__ |
| ... | ... | @@ -185,9 +163,8 @@ unsigned int _shrx_u32(unsigned int, unsigned int); |
| 185 | 163 | void _Store_HLERelease(long volatile *, long); |
| 186 | 164 | void _Store64_HLERelease(__int64 volatile *, __int64); |
| 187 | 165 | void _StorePointer_HLERelease(void *volatile *, void *); |
| 188 | static __inline__ void | |
| 189 | __attribute__((__deprecated__("use other intrinsics or C++11 atomics instead"))) | |
| 190 | _WriteBarrier(void); | |
| 166 | void __attribute__((__deprecated__( | |
| 167 | "use other intrinsics or C++11 atomics instead"))) _WriteBarrier(void); | |
| 191 | 168 | unsigned __int32 xbegin(void); |
| 192 | 169 | void _xend(void); |
| 193 | 170 | |
| ... | ... | @@ -197,19 +174,14 @@ void __addgsbyte(unsigned long, unsigned char); |
| 197 | 174 | void __addgsdword(unsigned long, unsigned long); |
| 198 | 175 | void __addgsqword(unsigned long, unsigned __int64); |
| 199 | 176 | void __addgsword(unsigned long, unsigned short); |
| 200 | static __inline__ | |
| 201 | 177 | void __faststorefence(void); |
| 202 | 178 | void __incgsbyte(unsigned long); |
| 203 | 179 | void __incgsdword(unsigned long); |
| 204 | 180 | void __incgsqword(unsigned long); |
| 205 | 181 | void __incgsword(unsigned long); |
| 206 | static __inline__ | |
| 207 | 182 | void __movsq(unsigned long long *, unsigned long long const *, size_t); |
| 208 | static __inline__ | |
| 209 | 183 | unsigned char __readgsbyte(unsigned long); |
| 210 | static __inline__ | |
| 211 | 184 | unsigned long __readgsdword(unsigned long); |
| 212 | static __inline__ | |
| 213 | 185 | unsigned __int64 __readgsqword(unsigned long); |
| 214 | 186 | unsigned short __readgsword(unsigned long); |
| 215 | 187 | unsigned __int64 __shiftleft128(unsigned __int64 _LowPart, |
| ... | ... | @@ -218,7 +190,6 @@ unsigned __int64 __shiftleft128(unsigned __int64 _LowPart, |
| 218 | 190 | unsigned __int64 __shiftright128(unsigned __int64 _LowPart, |
| 219 | 191 | unsigned __int64 _HighPart, |
| 220 | 192 | unsigned char _Shift); |
| 221 | static __inline__ | |
| 222 | 193 | void __stosq(unsigned __int64 *, unsigned __int64, size_t); |
| 223 | 194 | unsigned char __vmx_on(unsigned __int64 *); |
| 224 | 195 | unsigned char __vmx_vmclear(unsigned __int64 *); |
| ... | ... | @@ -243,10 +214,6 @@ unsigned char _interlockedbittestandreset64(__int64 volatile *, __int64); |
| 243 | 214 | unsigned char _interlockedbittestandset64(__int64 volatile *, __int64); |
| 244 | 215 | long _InterlockedCompareExchange_np(long volatile *_Destination, long _Exchange, |
| 245 | 216 | long _Comparand); |
| 246 | unsigned char _InterlockedCompareExchange128(__int64 volatile *_Destination, | |
| 247 | __int64 _ExchangeHigh, | |
| 248 | __int64 _ExchangeLow, | |
| 249 | __int64 *_CompareandResult); | |
| 250 | 217 | unsigned char _InterlockedCompareExchange128_np(__int64 volatile *_Destination, |
| 251 | 218 | __int64 _ExchangeHigh, |
| 252 | 219 | __int64 _ExchangeLow, |
| ... | ... | @@ -269,13 +236,9 @@ unsigned __int64 _rorx_u64(unsigned __int64, const unsigned int); |
| 269 | 236 | __int64 _sarx_i64(__int64, unsigned int); |
| 270 | 237 | unsigned __int64 _shlx_u64(unsigned __int64, unsigned int); |
| 271 | 238 | unsigned __int64 _shrx_u64(unsigned __int64, unsigned int); |
| 272 | static __inline__ | |
| 273 | 239 | __int64 __mulh(__int64, __int64); |
| 274 | static __inline__ | |
| 275 | 240 | unsigned __int64 __umulh(unsigned __int64, unsigned __int64); |
| 276 | static __inline__ | |
| 277 | 241 | __int64 _mul128(__int64, __int64, __int64*); |
| 278 | static __inline__ | |
| 279 | 242 | unsigned __int64 _umul128(unsigned __int64, |
| 280 | 243 | unsigned __int64, |
| 281 | 244 | unsigned __int64*); |
| ... | ... | @@ -284,29 +247,19 @@ unsigned __int64 _umul128(unsigned __int64, |
| 284 | 247 | |
| 285 | 248 | #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) |
| 286 | 249 | |
| 287 | static __inline__ | |
| 288 | 250 | unsigned char _BitScanForward64(unsigned long *_Index, unsigned __int64 _Mask); |
| 289 | static __inline__ | |
| 290 | 251 | unsigned char _BitScanReverse64(unsigned long *_Index, unsigned __int64 _Mask); |
| 291 | 252 | |
| 292 | 253 | #endif |
| 293 | 254 | |
| 294 | 255 | #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) |
| 295 | static __inline__ | |
| 296 | 256 | __int64 _InterlockedDecrement64(__int64 volatile *_Addend); |
| 297 | static __inline__ | |
| 298 | 257 | __int64 _InterlockedExchange64(__int64 volatile *_Target, __int64 _Value); |
| 299 | static __inline__ | |
| 300 | 258 | __int64 _InterlockedExchangeAdd64(__int64 volatile *_Addend, __int64 _Value); |
| 301 | static __inline__ | |
| 302 | 259 | __int64 _InterlockedExchangeSub64(__int64 volatile *_Subend, __int64 _Value); |
| 303 | static __inline__ | |
| 304 | 260 | __int64 _InterlockedIncrement64(__int64 volatile *_Addend); |
| 305 | static __inline__ | |
| 306 | 261 | __int64 _InterlockedOr64(__int64 volatile *_Value, __int64 _Mask); |
| 307 | static __inline__ | |
| 308 | 262 | __int64 _InterlockedXor64(__int64 volatile *_Value, __int64 _Mask); |
| 309 | static __inline__ | |
| 310 | 263 | __int64 _InterlockedAnd64(__int64 volatile *_Value, __int64 _Mask); |
| 311 | 264 | |
| 312 | 265 | #endif |
| ... | ... | @@ -470,45 +423,81 @@ __int64 _InterlockedCompareExchange64_nf(__int64 volatile *_Destination, |
| 470 | 423 | __int64 _InterlockedCompareExchange64_rel(__int64 volatile *_Destination, |
| 471 | 424 | __int64 _Exchange, __int64 _Comparand); |
| 472 | 425 | #endif |
| 426 | #if defined(__x86_64__) || defined(__aarch64__) | |
| 427 | unsigned char _InterlockedCompareExchange128(__int64 volatile *_Destination, | |
| 428 | __int64 _ExchangeHigh, | |
| 429 | __int64 _ExchangeLow, | |
| 430 | __int64 *_ComparandResult); | |
| 431 | #endif | |
| 432 | #if defined(__aarch64__) | |
| 433 | unsigned char _InterlockedCompareExchange128_acq(__int64 volatile *_Destination, | |
| 434 | __int64 _ExchangeHigh, | |
| 435 | __int64 _ExchangeLow, | |
| 436 | __int64 *_ComparandResult); | |
| 437 | unsigned char _InterlockedCompareExchange128_nf(__int64 volatile *_Destination, | |
| 438 | __int64 _ExchangeHigh, | |
| 439 | __int64 _ExchangeLow, | |
| 440 | __int64 *_ComparandResult); | |
| 441 | unsigned char _InterlockedCompareExchange128_rel(__int64 volatile *_Destination, | |
| 442 | __int64 _ExchangeHigh, | |
| 443 | __int64 _ExchangeLow, | |
| 444 | __int64 *_ComparandResult); | |
| 445 | #endif | |
| 473 | 446 | |
| 474 | 447 | /*----------------------------------------------------------------------------*\ |
| 475 | 448 | |* movs, stos |
| 476 | 449 | \*----------------------------------------------------------------------------*/ |
| 477 | 450 | #if defined(__i386__) || defined(__x86_64__) |
| 478 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 479 | __movsb(unsigned char *__dst, unsigned char const *__src, size_t __n) { | |
| 451 | static __inline__ void __DEFAULT_FN_ATTRS __movsb(unsigned char *__dst, | |
| 452 | unsigned char const *__src, | |
| 453 | size_t __n) { | |
| 480 | 454 | __asm__ __volatile__("rep movsb" : "+D"(__dst), "+S"(__src), "+c"(__n) |
| 481 | 455 | : : "memory"); |
| 482 | 456 | } |
| 483 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 484 | __movsd(unsigned long *__dst, unsigned long const *__src, size_t __n) { | |
| 485 | __asm__ __volatile__("rep movsl" : "+D"(__dst), "+S"(__src), "+c"(__n) | |
| 486 | : : "memory"); | |
| 457 | static __inline__ void __DEFAULT_FN_ATTRS __movsd(unsigned long *__dst, | |
| 458 | unsigned long const *__src, | |
| 459 | size_t __n) { | |
| 460 | __asm__ __volatile__("rep movsl" | |
| 461 | : "+D"(__dst), "+S"(__src), "+c"(__n) | |
| 462 | : | |
| 463 | : "memory"); | |
| 487 | 464 | } |
| 488 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 489 | __movsw(unsigned short *__dst, unsigned short const *__src, size_t __n) { | |
| 490 | __asm__ __volatile__("rep movsw" : "+D"(__dst), "+S"(__src), "+c"(__n) | |
| 491 | : : "memory"); | |
| 465 | static __inline__ void __DEFAULT_FN_ATTRS __movsw(unsigned short *__dst, | |
| 466 | unsigned short const *__src, | |
| 467 | size_t __n) { | |
| 468 | __asm__ __volatile__("rep movsw" | |
| 469 | : "+D"(__dst), "+S"(__src), "+c"(__n) | |
| 470 | : | |
| 471 | : "memory"); | |
| 492 | 472 | } |
| 493 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 494 | __stosd(unsigned long *__dst, unsigned long __x, size_t __n) { | |
| 495 | __asm__ __volatile__("rep stosl" : "+D"(__dst), "+c"(__n) : "a"(__x) | |
| 473 | static __inline__ void __DEFAULT_FN_ATTRS __stosd(unsigned long *__dst, | |
| 474 | unsigned long __x, | |
| 475 | size_t __n) { | |
| 476 | __asm__ __volatile__("rep stosl" | |
| 477 | : "+D"(__dst), "+c"(__n) | |
| 478 | : "a"(__x) | |
| 496 | 479 | : "memory"); |
| 497 | 480 | } |
| 498 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 499 | __stosw(unsigned short *__dst, unsigned short __x, size_t __n) { | |
| 500 | __asm__ __volatile__("rep stosw" : "+D"(__dst), "+c"(__n) : "a"(__x) | |
| 481 | static __inline__ void __DEFAULT_FN_ATTRS __stosw(unsigned short *__dst, | |
| 482 | unsigned short __x, | |
| 483 | size_t __n) { | |
| 484 | __asm__ __volatile__("rep stosw" | |
| 485 | : "+D"(__dst), "+c"(__n) | |
| 486 | : "a"(__x) | |
| 501 | 487 | : "memory"); |
| 502 | 488 | } |
| 503 | 489 | #endif |
| 504 | 490 | #ifdef __x86_64__ |
| 505 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 506 | __movsq(unsigned long long *__dst, unsigned long long const *__src, size_t __n) { | |
| 507 | __asm__ __volatile__("rep movsq" : "+D"(__dst), "+S"(__src), "+c"(__n) | |
| 508 | : : "memory"); | |
| 491 | static __inline__ void __DEFAULT_FN_ATTRS __movsq( | |
| 492 | unsigned long long *__dst, unsigned long long const *__src, size_t __n) { | |
| 493 | __asm__ __volatile__("rep movsq" | |
| 494 | : "+D"(__dst), "+S"(__src), "+c"(__n) | |
| 495 | : | |
| 496 | : "memory"); | |
| 509 | 497 | } |
| 510 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 511 | __stosq(unsigned __int64 *__dst, unsigned __int64 __x, size_t __n) { | |
| 498 | static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, | |
| 499 | unsigned __int64 __x, | |
| 500 | size_t __n) { | |
| 512 | 501 | __asm__ __volatile__("rep stosq" : "+D"(__dst), "+c"(__n) : "a"(__x) |
| 513 | 502 | : "memory"); |
| 514 | 503 | } |
| ... | ... | @@ -518,26 +507,25 @@ __stosq(unsigned __int64 *__dst, unsigned __int64 __x, size_t __n) { |
| 518 | 507 | |* Misc |
| 519 | 508 | \*----------------------------------------------------------------------------*/ |
| 520 | 509 | #if defined(__i386__) || defined(__x86_64__) |
| 521 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 522 | __cpuid(int __info[4], int __level) { | |
| 523 | __asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3]) | |
| 524 | : "a"(__level), "c"(0)); | |
| 510 | static __inline__ void __DEFAULT_FN_ATTRS __cpuid(int __info[4], int __level) { | |
| 511 | __asm__("cpuid" | |
| 512 | : "=a"(__info[0]), "=b"(__info[1]), "=c"(__info[2]), "=d"(__info[3]) | |
| 513 | : "a"(__level), "c"(0)); | |
| 525 | 514 | } |
| 526 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 527 | __cpuidex(int __info[4], int __level, int __ecx) { | |
| 528 | __asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3]) | |
| 529 | : "a"(__level), "c"(__ecx)); | |
| 515 | static __inline__ void __DEFAULT_FN_ATTRS __cpuidex(int __info[4], int __level, | |
| 516 | int __ecx) { | |
| 517 | __asm__("cpuid" | |
| 518 | : "=a"(__info[0]), "=b"(__info[1]), "=c"(__info[2]), "=d"(__info[3]) | |
| 519 | : "a"(__level), "c"(__ecx)); | |
| 530 | 520 | } |
| 531 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 532 | __halt(void) { | |
| 533 | __asm__ volatile ("hlt"); | |
| 521 | static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { | |
| 522 | __asm__ volatile("hlt"); | |
| 534 | 523 | } |
| 535 | 524 | #endif |
| 536 | 525 | |
| 537 | 526 | #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) |
| 538 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 539 | __nop(void) { | |
| 540 | __asm__ volatile ("nop"); | |
| 527 | static __inline__ void __DEFAULT_FN_ATTRS __nop(void) { | |
| 528 | __asm__ volatile("nop"); | |
| 541 | 529 | } |
| 542 | 530 | #endif |
| 543 | 531 | |
| ... | ... | @@ -574,8 +562,7 @@ __readmsr(unsigned long __register) { |
| 574 | 562 | } |
| 575 | 563 | #endif |
| 576 | 564 | |
| 577 | static __inline__ unsigned __LPTRINT_TYPE__ __DEFAULT_FN_ATTRS | |
| 578 | __readcr3(void) { | |
| 565 | static __inline__ unsigned __LPTRINT_TYPE__ __DEFAULT_FN_ATTRS __readcr3(void) { | |
| 579 | 566 | unsigned __LPTRINT_TYPE__ __cr3_val; |
| 580 | 567 | __asm__ __volatile__ ("mov %%cr3, %0" : "=r"(__cr3_val) : : "memory"); |
| 581 | 568 | return __cr3_val; |
lib/include/keylockerintrin.h created+506| ... | ... | @@ -0,0 +1,506 @@ |
| 1 | /*===----------------- keylockerintrin.h - KL Intrinsics -------------------=== | |
| 2 | * | |
| 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 4 | * of this software and associated documentation files (the "Software"), to deal | |
| 5 | * in the Software without restriction, including without limitation the rights | |
| 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 7 | * copies of the Software, and to permit persons to whom the Software is | |
| 8 | * furnished to do so, subject to the following conditions: | |
| 9 | * | |
| 10 | * The above copyright notice and this permission notice shall be included in | |
| 11 | * all copies or substantial portions of the Software. | |
| 12 | * | |
| 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 19 | * THE SOFTWARE. | |
| 20 | * | |
| 21 | *===-----------------------------------------------------------------------=== | |
| 22 | */ | |
| 23 | ||
| 24 | #ifndef __IMMINTRIN_H | |
| 25 | #error "Never use <keylockerintrin.h> directly; include <immintrin.h> instead." | |
| 26 | #endif | |
| 27 | ||
| 28 | #ifndef _KEYLOCKERINTRIN_H | |
| 29 | #define _KEYLOCKERINTRIN_H | |
| 30 | ||
| 31 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ | |
| 32 | defined(__KL__) | |
| 33 | ||
| 34 | /* Define the default attributes for the functions in this file. */ | |
| 35 | #define __DEFAULT_FN_ATTRS \ | |
| 36 | __attribute__((__always_inline__, __nodebug__, __target__("kl"),\ | |
| 37 | __min_vector_width__(128))) | |
| 38 | ||
| 39 | /// Load internal wrapping key from __intkey, __enkey_lo and __enkey_hi. __ctl | |
| 40 | /// will assigned to EAX, whch specifies the KeySource and whether backing up | |
| 41 | /// the key is permitted. The 256-bit encryption key is loaded from the two | |
| 42 | /// explicit operands (__enkey_lo and __enkey_hi). The 128-bit integrity key is | |
| 43 | /// loaded from the implicit operand XMM0 which assigned by __intkey. | |
| 44 | /// | |
| 45 | /// \headerfile <x86intrin.h> | |
| 46 | /// | |
| 47 | /// This intrinsic corresponds to the <c> LOADIWKEY </c> instructions. | |
| 48 | /// | |
| 49 | /// \operation | |
| 50 | /// IF CPL > 0 // LOADKWKEY only allowed at ring 0 (supervisor mode) | |
| 51 | /// GP (0) | |
| 52 | /// FI | |
| 53 | /// IF “LOADIWKEY exiting” VM execution control set | |
| 54 | /// VMexit | |
| 55 | /// FI | |
| 56 | /// IF __ctl[4:1] > 1 // Reserved KeySource encoding used | |
| 57 | /// GP (0) | |
| 58 | /// FI | |
| 59 | /// IF __ctl[31:5] != 0 // Reserved bit in __ctl is set | |
| 60 | /// GP (0) | |
| 61 | /// FI | |
| 62 | /// IF __ctl[0] AND (CPUID.19H.ECX[0] == 0) // NoBackup is not supported on this part | |
| 63 | /// GP (0) | |
| 64 | /// FI | |
| 65 | /// IF (__ctl[4:1] == 1) AND (CPUID.19H.ECX[1] == 0) // KeySource of 1 is not supported on this part | |
| 66 | /// GP (0) | |
| 67 | /// FI | |
| 68 | /// IF (__ctl[4:1] == 0) // KeySource of 0. | |
| 69 | /// IWKey.Encryption Key[127:0] := __enkey_hi[127:0]: | |
| 70 | /// IWKey.Encryption Key[255:128] := __enkey_lo[127:0] | |
| 71 | /// IWKey.IntegrityKey[127:0] := __intkey[127:0] | |
| 72 | /// IWKey.NoBackup := __ctl[0] | |
| 73 | /// IWKey.KeySource := __ctl[4:1] | |
| 74 | /// ZF := 0 | |
| 75 | /// ELSE // KeySource of 1. See RDSEED definition for details of randomness | |
| 76 | /// IF HW_NRND_GEN.ready == 1 // Full-entropy random data from RDSEED was received | |
| 77 | /// IWKey.Encryption Key[127:0] := __enkey_hi[127:0] XOR HW_NRND_GEN.data[127:0] | |
| 78 | /// IWKey.Encryption Key[255:128] := __enkey_lo[127:0] XOR HW_NRND_GEN.data[255:128] | |
| 79 | /// IWKey.Encryption Key[255:0] := __enkey_hi[127:0]:__enkey_lo[127:0] XOR HW_NRND_GEN.data[255:0] | |
| 80 | /// IWKey.IntegrityKey[127:0] := __intkey[127:0] XOR HW_NRND_GEN.data[383:256] | |
| 81 | /// IWKey.NoBackup := __ctl[0] | |
| 82 | /// IWKey.KeySource := __ctl[4:1] | |
| 83 | /// ZF := 0 | |
| 84 | /// ELSE // Random data was not returned from RDSEED. IWKey was not loaded | |
| 85 | /// ZF := 1 | |
| 86 | /// FI | |
| 87 | /// FI | |
| 88 | /// dst := ZF | |
| 89 | /// OF := 0 | |
| 90 | /// SF := 0 | |
| 91 | /// AF := 0 | |
| 92 | /// PF := 0 | |
| 93 | /// CF := 0 | |
| 94 | /// \endoperation | |
| 95 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 96 | _mm_loadiwkey (unsigned int __ctl, __m128i __intkey, | |
| 97 | __m128i __enkey_lo, __m128i __enkey_hi) { | |
| 98 | __builtin_ia32_loadiwkey (__intkey, __enkey_lo, __enkey_hi, __ctl); | |
| 99 | } | |
| 100 | ||
| 101 | /// Wrap a 128-bit AES key from __key into a key handle and output in | |
| 102 | /// ((__m128i*)__h) to ((__m128i*)__h) + 5 and a 32-bit value as return. | |
| 103 | /// The explicit source operand __htype specifies handle restrictions. | |
| 104 | /// | |
| 105 | /// \headerfile <x86intrin.h> | |
| 106 | /// | |
| 107 | /// This intrinsic corresponds to the <c> ENCODEKEY128 </c> instructions. | |
| 108 | /// | |
| 109 | /// \operation | |
| 110 | /// InputKey[127:0] := __key[127:0] | |
| 111 | /// KeyMetadata[2:0] := __htype[2:0] | |
| 112 | /// KeyMetadata[23:3] := 0 // Reserved for future usage | |
| 113 | /// KeyMetadata[27:24] := 0 // KeyType is AES-128 (value of 0) | |
| 114 | /// KeyMetadata[127:28] := 0 // Reserved for future usage | |
| 115 | /// Handle[383:0] := WrapKey128(InputKey[127:0], KeyMetadata[127:0], | |
| 116 | /// IWKey.Integrity Key[127:0], IWKey.Encryption Key[255:0]) | |
| 117 | /// dst[0] := IWKey.NoBackup | |
| 118 | /// dst[4:1] := IWKey.KeySource[3:0] | |
| 119 | /// dst[31:5] := 0 | |
| 120 | /// MEM[__h+127:__h] := Handle[127:0] // AAD | |
| 121 | /// MEM[__h+255:__h+128] := Handle[255:128] // Integrity Tag | |
| 122 | /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText | |
| 123 | /// MEM[__h+511:__h+384] := 0 // Reserved for future usage | |
| 124 | /// MEM[__h+639:__h+512] := 0 // Reserved for future usage | |
| 125 | /// MEM[__h+767:__h+640] := 0 // Reserved for future usage | |
| 126 | /// OF := 0 | |
| 127 | /// SF := 0 | |
| 128 | /// ZF := 0 | |
| 129 | /// AF := 0 | |
| 130 | /// PF := 0 | |
| 131 | /// CF := 0 | |
| 132 | /// \endoperation | |
| 133 | static __inline__ unsigned int __DEFAULT_FN_ATTRS | |
| 134 | _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) { | |
| 135 | return __builtin_ia32_encodekey128_u32(__htype, (__v2di)__key, __h); | |
| 136 | } | |
| 137 | ||
| 138 | /// Wrap a 256-bit AES key from __key_hi:__key_lo into a key handle, then | |
| 139 | /// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 6 and | |
| 140 | /// a 32-bit value as return. | |
| 141 | /// The explicit source operand __htype specifies handle restrictions. | |
| 142 | /// | |
| 143 | /// \headerfile <x86intrin.h> | |
| 144 | /// | |
| 145 | /// This intrinsic corresponds to the <c> ENCODEKEY256 </c> instructions. | |
| 146 | /// | |
| 147 | /// \operation | |
| 148 | /// InputKey[127:0] := __key_lo[127:0] | |
| 149 | /// InputKey[255:128] := __key_hi[255:128] | |
| 150 | /// KeyMetadata[2:0] := __htype[2:0] | |
| 151 | /// KeyMetadata[23:3] := 0 // Reserved for future usage | |
| 152 | /// KeyMetadata[27:24] := 1 // KeyType is AES-256 (value of 1) | |
| 153 | /// KeyMetadata[127:28] := 0 // Reserved for future usage | |
| 154 | /// Handle[511:0] := WrapKey256(InputKey[255:0], KeyMetadata[127:0], | |
| 155 | /// IWKey.Integrity Key[127:0], IWKey.Encryption Key[255:0]) | |
| 156 | /// dst[0] := IWKey.NoBackup | |
| 157 | /// dst[4:1] := IWKey.KeySource[3:0] | |
| 158 | /// dst[31:5] := 0 | |
| 159 | /// MEM[__h+127:__h] := Handle[127:0] // AAD | |
| 160 | /// MEM[__h+255:__h+128] := Handle[255:128] // Tag | |
| 161 | /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText[127:0] | |
| 162 | /// MEM[__h+511:__h+384] := Handle[511:384] // CipherText[255:128] | |
| 163 | /// MEM[__h+639:__h+512] := 0 // Reserved for future usage | |
| 164 | /// MEM[__h+767:__h+640] := 0 // Reserved for future usage | |
| 165 | /// MEM[__h+895:__h+768] := 0 Integrity// Reserved for future usage | |
| 166 | /// OF := 0 | |
| 167 | /// SF := 0 | |
| 168 | /// ZF := 0 | |
| 169 | /// AF := 0 | |
| 170 | /// PF := 0 | |
| 171 | /// CF := 0 | |
| 172 | /// \endoperation | |
| 173 | static __inline__ unsigned int __DEFAULT_FN_ATTRS | |
| 174 | _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi, | |
| 175 | void *__h) { | |
| 176 | return __builtin_ia32_encodekey256_u32(__htype, (__v2di)__key_lo, | |
| 177 | (__v2di)__key_hi, __h); | |
| 178 | } | |
| 179 | ||
| 180 | /// The AESENC128KL performs 10 rounds of AES to encrypt the __idata using | |
| 181 | /// the 128-bit key in the handle from the __h. It stores the result in the | |
| 182 | /// __odata. And return the affected ZF flag status. | |
| 183 | /// | |
| 184 | /// \headerfile <x86intrin.h> | |
| 185 | /// | |
| 186 | /// This intrinsic corresponds to the <c> AESENC128KL </c> instructions. | |
| 187 | /// | |
| 188 | /// \operation | |
| 189 | /// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic. | |
| 190 | /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) || | |
| 191 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 192 | /// Handle[383:256] || | |
| 193 | /// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128 ) | |
| 194 | /// IF (IllegalHandle) | |
| 195 | /// ZF := 1 | |
| 196 | /// ELSE | |
| 197 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey) | |
| 198 | /// IF (Authentic == 0) | |
| 199 | /// ZF := 1 | |
| 200 | /// ELSE | |
| 201 | /// MEM[__odata+127:__odata] := AES128Encrypt (__idata[127:0], UnwrappedKey) | |
| 202 | /// ZF := 0 | |
| 203 | /// FI | |
| 204 | /// FI | |
| 205 | /// dst := ZF | |
| 206 | /// OF := 0 | |
| 207 | /// SF := 0 | |
| 208 | /// AF := 0 | |
| 209 | /// PF := 0 | |
| 210 | /// CF := 0 | |
| 211 | /// \endoperation | |
| 212 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 213 | _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { | |
| 214 | return __builtin_ia32_aesenc128kl_u8((__v2di *)__odata, (__v2di)__idata, __h); | |
| 215 | } | |
| 216 | ||
| 217 | /// The AESENC256KL performs 14 rounds of AES to encrypt the __idata using | |
| 218 | /// the 256-bit key in the handle from the __h. It stores the result in the | |
| 219 | /// __odata. And return the affected ZF flag status. | |
| 220 | /// | |
| 221 | /// \headerfile <x86intrin.h> | |
| 222 | /// | |
| 223 | /// This intrinsic corresponds to the <c> AESENC256KL </c> instructions. | |
| 224 | /// | |
| 225 | /// \operation | |
| 226 | /// Handle[511:0] := MEM[__h+511:__h] // Load is not guaranteed to be atomic. | |
| 227 | /// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) || | |
| 228 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 229 | /// Handle[255:128] || | |
| 230 | /// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES256 ) | |
| 231 | /// IF (IllegalHandle) | |
| 232 | /// ZF := 1 | |
| 233 | /// ELSE | |
| 234 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey) | |
| 235 | /// IF (Authentic == 0) | |
| 236 | /// ZF := 1 | |
| 237 | /// ELSE | |
| 238 | /// MEM[__odata+127:__odata] := AES256Encrypt (__idata[127:0], UnwrappedKey) | |
| 239 | /// ZF := 0 | |
| 240 | /// FI | |
| 241 | /// FI | |
| 242 | /// dst := ZF | |
| 243 | /// OF := 0 | |
| 244 | /// SF := 0 | |
| 245 | /// AF := 0 | |
| 246 | /// PF := 0 | |
| 247 | /// CF := 0 | |
| 248 | /// \endoperation | |
| 249 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 250 | _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { | |
| 251 | return __builtin_ia32_aesenc256kl_u8((__v2di *)__odata, (__v2di)__idata, __h); | |
| 252 | } | |
| 253 | ||
| 254 | /// The AESDEC128KL performs 10 rounds of AES to decrypt the __idata using | |
| 255 | /// the 128-bit key in the handle from the __h. It stores the result in the | |
| 256 | /// __odata. And return the affected ZF flag status. | |
| 257 | /// | |
| 258 | /// \headerfile <x86intrin.h> | |
| 259 | /// | |
| 260 | /// This intrinsic corresponds to the <c> AESDEC128KL </c> instructions. | |
| 261 | /// | |
| 262 | /// \operation | |
| 263 | /// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic. | |
| 264 | /// IllegalHandle := (HandleReservedBitSet (Handle[383:0]) || | |
| 265 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 266 | /// Handle[383:256] || | |
| 267 | /// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128) | |
| 268 | /// IF (IllegalHandle) | |
| 269 | /// ZF := 1 | |
| 270 | /// ELSE | |
| 271 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey) | |
| 272 | /// IF (Authentic == 0) | |
| 273 | /// ZF := 1 | |
| 274 | /// ELSE | |
| 275 | /// MEM[__odata+127:__odata] := AES128Decrypt (__idata[127:0], UnwrappedKey) | |
| 276 | /// ZF := 0 | |
| 277 | /// FI | |
| 278 | /// FI | |
| 279 | /// dst := ZF | |
| 280 | /// OF := 0 | |
| 281 | /// SF := 0 | |
| 282 | /// AF := 0 | |
| 283 | /// PF := 0 | |
| 284 | /// CF := 0 | |
| 285 | /// \endoperation | |
| 286 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 287 | _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { | |
| 288 | return __builtin_ia32_aesdec128kl_u8((__v2di *)__odata, (__v2di)__idata, __h); | |
| 289 | } | |
| 290 | ||
| 291 | /// The AESDEC256KL performs 10 rounds of AES to decrypt the __idata using | |
| 292 | /// the 256-bit key in the handle from the __h. It stores the result in the | |
| 293 | /// __odata. And return the affected ZF flag status. | |
| 294 | /// | |
| 295 | /// \headerfile <x86intrin.h> | |
| 296 | /// | |
| 297 | /// This intrinsic corresponds to the <c> AESDEC256KL </c> instructions. | |
| 298 | /// | |
| 299 | /// \operation | |
| 300 | /// Handle[511:0] := MEM[__h+511:__h] | |
| 301 | /// IllegalHandle := (HandleReservedBitSet (Handle[511:0]) || | |
| 302 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 303 | /// Handle[383:256] || | |
| 304 | /// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES256) | |
| 305 | /// IF (IllegalHandle) | |
| 306 | /// ZF := 1 | |
| 307 | /// ELSE | |
| 308 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey) | |
| 309 | /// IF (Authentic == 0) | |
| 310 | /// ZF := 1 | |
| 311 | /// ELSE | |
| 312 | /// MEM[__odata+127:__odata] := AES256Decrypt (__idata[127:0], UnwrappedKey) | |
| 313 | /// ZF := 0 | |
| 314 | /// FI | |
| 315 | /// FI | |
| 316 | /// dst := ZF | |
| 317 | /// OF := 0 | |
| 318 | /// SF := 0 | |
| 319 | /// AF := 0 | |
| 320 | /// PF := 0 | |
| 321 | /// CF := 0 | |
| 322 | /// \endoperation | |
| 323 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 324 | _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { | |
| 325 | return __builtin_ia32_aesdec256kl_u8((__v2di *)__odata, (__v2di)__idata, __h); | |
| 326 | } | |
| 327 | ||
| 328 | #undef __DEFAULT_FN_ATTRS | |
| 329 | ||
| 330 | #endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \ | |
| 331 | || defined(__KL__) */ | |
| 332 | ||
| 333 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ | |
| 334 | defined(__WIDEKL__) | |
| 335 | ||
| 336 | /* Define the default attributes for the functions in this file. */ | |
| 337 | #define __DEFAULT_FN_ATTRS \ | |
| 338 | __attribute__((__always_inline__, __nodebug__, __target__("kl,widekl"),\ | |
| 339 | __min_vector_width__(128))) | |
| 340 | ||
| 341 | /// Encrypt __idata[0] to __idata[7] using 128-bit AES key indicated by handle | |
| 342 | /// at __h and store each resultant block back from __odata to __odata+7. And | |
| 343 | /// return the affected ZF flag status. | |
| 344 | /// | |
| 345 | /// \headerfile <x86intrin.h> | |
| 346 | /// | |
| 347 | /// This intrinsic corresponds to the <c> AESENCWIDE128KL </c> instructions. | |
| 348 | /// | |
| 349 | /// \operation | |
| 350 | /// Handle := MEM[__h+383:__h] | |
| 351 | /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) || | |
| 352 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 353 | /// Handle[255:128] || | |
| 354 | /// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128 ) | |
| 355 | /// IF (IllegalHandle) | |
| 356 | /// ZF := 1 | |
| 357 | /// ELSE | |
| 358 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey) | |
| 359 | /// IF Authentic == 0 | |
| 360 | /// ZF := 1 | |
| 361 | /// ELSE | |
| 362 | /// FOR i := 0 to 7 | |
| 363 | /// __odata[i] := AES128Encrypt (__idata[i], UnwrappedKey) | |
| 364 | /// ENDFOR | |
| 365 | /// ZF := 0 | |
| 366 | /// FI | |
| 367 | /// FI | |
| 368 | /// dst := ZF | |
| 369 | /// OF := 0 | |
| 370 | /// SF := 0 | |
| 371 | /// AF := 0 | |
| 372 | /// PF := 0 | |
| 373 | /// CF := 0 | |
| 374 | /// \endoperation | |
| 375 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 376 | _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { | |
| 377 | return __builtin_ia32_aesencwide128kl_u8((__v2di *)__odata, | |
| 378 | (const __v2di *)__idata, __h); | |
| 379 | } | |
| 380 | ||
| 381 | /// Encrypt __idata[0] to __idata[7] using 256-bit AES key indicated by handle | |
| 382 | /// at __h and store each resultant block back from __odata to __odata+7. And | |
| 383 | /// return the affected ZF flag status. | |
| 384 | /// | |
| 385 | /// \headerfile <x86intrin.h> | |
| 386 | /// | |
| 387 | /// This intrinsic corresponds to the <c> AESENCWIDE256KL </c> instructions. | |
| 388 | /// | |
| 389 | /// \operation | |
| 390 | /// Handle[511:0] := MEM[__h+511:__h] | |
| 391 | /// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) || | |
| 392 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 393 | /// Handle[255:128] || | |
| 394 | /// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES512 ) | |
| 395 | /// IF (IllegalHandle) | |
| 396 | /// ZF := 1 | |
| 397 | /// ELSE | |
| 398 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey) | |
| 399 | /// IF Authentic == 0 | |
| 400 | /// ZF := 1 | |
| 401 | /// ELSE | |
| 402 | /// FOR i := 0 to 7 | |
| 403 | /// __odata[i] := AES256Encrypt (__idata[i], UnwrappedKey) | |
| 404 | /// ENDFOR | |
| 405 | /// ZF := 0 | |
| 406 | /// FI | |
| 407 | /// FI | |
| 408 | /// dst := ZF | |
| 409 | /// OF := 0 | |
| 410 | /// SF := 0 | |
| 411 | /// AF := 0 | |
| 412 | /// PF := 0 | |
| 413 | /// CF := 0 | |
| 414 | /// \endoperation | |
| 415 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 416 | _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { | |
| 417 | return __builtin_ia32_aesencwide256kl_u8((__v2di *)__odata, | |
| 418 | (const __v2di *)__idata, __h); | |
| 419 | } | |
| 420 | ||
| 421 | /// Decrypt __idata[0] to __idata[7] using 128-bit AES key indicated by handle | |
| 422 | /// at __h and store each resultant block back from __odata to __odata+7. And | |
| 423 | /// return the affected ZF flag status. | |
| 424 | /// | |
| 425 | /// \headerfile <x86intrin.h> | |
| 426 | /// | |
| 427 | /// This intrinsic corresponds to the <c> AESDECWIDE128KL </c> instructions. | |
| 428 | /// | |
| 429 | /// \operation | |
| 430 | /// Handle[383:0] := MEM[__h+383:__h] | |
| 431 | /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) || | |
| 432 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 433 | /// Handle[255:128] || | |
| 434 | /// HandleKeyType (Handle) != HANDLE_KEY_TYPE_AES128 ) | |
| 435 | /// IF (IllegalHandle) | |
| 436 | /// ZF := 1 | |
| 437 | /// ELSE | |
| 438 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey) | |
| 439 | /// IF Authentic == 0 | |
| 440 | /// ZF := 1 | |
| 441 | /// ELSE | |
| 442 | /// FOR i := 0 to 7 | |
| 443 | /// __odata[i] := AES128Decrypt (__idata[i], UnwrappedKey) | |
| 444 | /// ENDFOR | |
| 445 | /// ZF := 0 | |
| 446 | /// FI | |
| 447 | /// FI | |
| 448 | /// dst := ZF | |
| 449 | /// OF := 0 | |
| 450 | /// SF := 0 | |
| 451 | /// AF := 0 | |
| 452 | /// PF := 0 | |
| 453 | /// CF := 0 | |
| 454 | /// \endoperation | |
| 455 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 456 | _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { | |
| 457 | return __builtin_ia32_aesdecwide128kl_u8((__v2di *)__odata, | |
| 458 | (const __v2di *)__idata, __h); | |
| 459 | } | |
| 460 | ||
| 461 | /// Decrypt __idata[0] to __idata[7] using 256-bit AES key indicated by handle | |
| 462 | /// at __h and store each resultant block back from __odata to __odata+7. And | |
| 463 | /// return the affected ZF flag status. | |
| 464 | /// | |
| 465 | /// \headerfile <x86intrin.h> | |
| 466 | /// | |
| 467 | /// This intrinsic corresponds to the <c> AESDECWIDE256KL </c> instructions. | |
| 468 | /// | |
| 469 | /// \operation | |
| 470 | /// Handle[511:0] := MEM[__h+511:__h] | |
| 471 | /// IllegalHandle = ( HandleReservedBitSet (Handle[511:0]) || | |
| 472 | /// (Handle[127:0] AND (CPL > 0)) || | |
| 473 | /// Handle[255:128] || | |
| 474 | /// HandleKeyType (Handle) != HANDLE_KEY_TYPE_AES512 ) | |
| 475 | /// If (IllegalHandle) | |
| 476 | /// ZF := 1 | |
| 477 | /// ELSE | |
| 478 | /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey) | |
| 479 | /// IF Authentic == 0 | |
| 480 | /// ZF := 1 | |
| 481 | /// ELSE | |
| 482 | /// FOR i := 0 to 7 | |
| 483 | /// __odata[i] := AES256Decrypt (__idata[i], UnwrappedKey) | |
| 484 | /// ENDFOR | |
| 485 | /// ZF := 0 | |
| 486 | /// FI | |
| 487 | /// FI | |
| 488 | /// dst := ZF | |
| 489 | /// OF := 0 | |
| 490 | /// SF := 0 | |
| 491 | /// AF := 0 | |
| 492 | /// PF := 0 | |
| 493 | /// CF := 0 | |
| 494 | /// \endoperation | |
| 495 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 496 | _mm_aesdecwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { | |
| 497 | return __builtin_ia32_aesdecwide256kl_u8((__v2di *)__odata, | |
| 498 | (const __v2di *)__idata, __h); | |
| 499 | } | |
| 500 | ||
| 501 | #undef __DEFAULT_FN_ATTRS | |
| 502 | ||
| 503 | #endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \ | |
| 504 | || defined(__WIDEKL__) */ | |
| 505 | ||
| 506 | #endif /* _KEYLOCKERINTRIN_H */ |
lib/include/mm_malloc.h+6| ... | ... | @@ -54,7 +54,13 @@ _mm_malloc(size_t __size, size_t __align) |
| 54 | 54 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) |
| 55 | 55 | _mm_free(void *__p) |
| 56 | 56 | { |
| 57 | #if defined(__MINGW32__) | |
| 58 | __mingw_aligned_free(__p); | |
| 59 | #elif defined(_WIN32) | |
| 60 | _aligned_free(__p); | |
| 61 | #else | |
| 57 | 62 | free(__p); |
| 63 | #endif | |
| 58 | 64 | } |
| 59 | 65 | #endif |
| 60 | 66 |
lib/include/opencl-c-base.h+18| ... | ... | @@ -9,6 +9,21 @@ |
| 9 | 9 | #ifndef _OPENCL_BASE_H_ |
| 10 | 10 | #define _OPENCL_BASE_H_ |
| 11 | 11 | |
| 12 | // Define extension macros | |
| 13 | ||
| 14 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | |
| 15 | // For SPIR all extensions are supported. | |
| 16 | #if defined(__SPIR__) | |
| 17 | #define cl_khr_subgroup_extended_types 1 | |
| 18 | #define cl_khr_subgroup_non_uniform_vote 1 | |
| 19 | #define cl_khr_subgroup_ballot 1 | |
| 20 | #define cl_khr_subgroup_non_uniform_arithmetic 1 | |
| 21 | #define cl_khr_subgroup_shuffle 1 | |
| 22 | #define cl_khr_subgroup_shuffle_relative 1 | |
| 23 | #define cl_khr_subgroup_clustered_reduce 1 | |
| 24 | #endif // defined(__SPIR__) | |
| 25 | #endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | |
| 26 | ||
| 12 | 27 | // built-in scalar data types: |
| 13 | 28 | |
| 14 | 29 | /** |
| ... | ... | @@ -568,4 +583,7 @@ typedef struct { |
| 568 | 583 | #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : end |
| 569 | 584 | #endif // cl_intel_device_side_avc_motion_estimation |
| 570 | 585 | |
| 586 | // Disable any extensions we may have enabled previously. | |
| 587 | #pragma OPENCL EXTENSION all : disable | |
| 588 | ||
| 571 | 589 | #endif //_OPENCL_BASE_H_ |
lib/include/opencl-c.h+2| ... | ... | @@ -4633,6 +4633,7 @@ float16 __ovld __cnfn convert_float16(float16); |
| 4633 | 4633 | // Conversions with double data type parameters or return value. |
| 4634 | 4634 | |
| 4635 | 4635 | #ifdef cl_khr_fp64 |
| 4636 | #pragma OPENCL EXTENSION cl_khr_fp64 : enable | |
| 4636 | 4637 | char __ovld __cnfn convert_char(double); |
| 4637 | 4638 | char __ovld __cnfn convert_char_rte(double); |
| 4638 | 4639 | char __ovld __cnfn convert_char_rtn(double); |
| ... | ... | @@ -5455,6 +5456,7 @@ double16 __ovld __cnfn convert_double16_rtz(ushort16); |
| 5455 | 5456 | #endif //cl_khr_fp64 |
| 5456 | 5457 | |
| 5457 | 5458 | #ifdef cl_khr_fp16 |
| 5459 | #pragma OPENCL EXTENSION cl_khr_fp16 : enable | |
| 5458 | 5460 | // Convert half types to non-double types. |
| 5459 | 5461 | uchar __ovld __cnfn convert_uchar(half); |
| 5460 | 5462 | uchar __ovld __cnfn convert_uchar_rte(half); |
lib/include/openmp_wrappers/cmath+4-1| ... | ... | @@ -24,8 +24,11 @@ |
| 24 | 24 | // which might live in cstdlib. |
| 25 | 25 | #include <cstdlib> |
| 26 | 26 | |
| 27 | // We need limits because __clang_cuda_cmath.h below uses `std::numeric_limit`. | |
| 28 | #include <limits> | |
| 29 | ||
| 27 | 30 | #pragma omp begin declare variant match( \ |
| 28 | device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) | |
| 31 | device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any, allow_templates)}) | |
| 29 | 32 | |
| 30 | 33 | #define __CUDA__ |
| 31 | 34 | #define __OPENMP_NVPTX__ |
lib/include/openmp_wrappers/complex+25| ... | ... | @@ -25,3 +25,28 @@ |
| 25 | 25 | |
| 26 | 26 | // Grab the host header too. |
| 27 | 27 | #include_next <complex> |
| 28 | ||
| 29 | ||
| 30 | #ifdef __cplusplus | |
| 31 | ||
| 32 | // If we are compiling against libc++, the macro _LIBCPP_STD_VER should be set | |
| 33 | // after including <cmath> above. Since the complex header we use is a | |
| 34 | // simplified version of the libc++, we don't need it in this case. If we | |
| 35 | // compile against libstdc++, or any other standard library, we will overload | |
| 36 | // the (hopefully template) functions in the <complex> header with the ones we | |
| 37 | // got from libc++ which decomposes math functions, like `std::sin`, into | |
| 38 | // arithmetic and calls to non-complex functions, all of which we can then | |
| 39 | // handle. | |
| 40 | #ifndef _LIBCPP_STD_VER | |
| 41 | ||
| 42 | #pragma omp begin declare variant match( \ | |
| 43 | device = {arch(nvptx, nvptx64)}, \ | |
| 44 | implementation = {extension(match_any, allow_templates)}) | |
| 45 | ||
| 46 | #include <complex_cmath.h> | |
| 47 | ||
| 48 | #pragma omp end declare variant | |
| 49 | ||
| 50 | #endif | |
| 51 | ||
| 52 | #endif |
lib/include/openmp_wrappers/complex_cmath.h created+388| ... | ... | @@ -0,0 +1,388 @@ |
| 1 | //===------------------------- __complex_cmath.h --------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | // | |
| 9 | // std::complex header copied from the libcxx source and simplified for use in | |
| 10 | // OpenMP target offload regions. | |
| 11 | // | |
| 12 | //===----------------------------------------------------------------------===// | |
| 13 | ||
| 14 | #ifndef _OPENMP | |
| 15 | #error "This file is for OpenMP compilation only." | |
| 16 | #endif | |
| 17 | ||
| 18 | #ifndef __cplusplus | |
| 19 | #error "This file is for C++ compilation only." | |
| 20 | #endif | |
| 21 | ||
| 22 | #ifndef _LIBCPP_COMPLEX | |
| 23 | #define _LIBCPP_COMPLEX | |
| 24 | ||
| 25 | #include <cmath> | |
| 26 | #include <type_traits> | |
| 27 | ||
| 28 | #define __DEVICE__ static constexpr __attribute__((nothrow)) | |
| 29 | ||
| 30 | namespace std { | |
| 31 | ||
| 32 | // abs | |
| 33 | ||
| 34 | template <class _Tp> __DEVICE__ _Tp abs(const std::complex<_Tp> &__c) { | |
| 35 | return hypot(__c.real(), __c.imag()); | |
| 36 | } | |
| 37 | ||
| 38 | // arg | |
| 39 | ||
| 40 | template <class _Tp> __DEVICE__ _Tp arg(const std::complex<_Tp> &__c) { | |
| 41 | return atan2(__c.imag(), __c.real()); | |
| 42 | } | |
| 43 | ||
| 44 | template <class _Tp> | |
| 45 | typename enable_if<is_integral<_Tp>::value || is_same<_Tp, double>::value, | |
| 46 | double>::type | |
| 47 | arg(_Tp __re) { | |
| 48 | return atan2(0., __re); | |
| 49 | } | |
| 50 | ||
| 51 | template <class _Tp> | |
| 52 | typename enable_if<is_same<_Tp, float>::value, float>::type arg(_Tp __re) { | |
| 53 | return atan2f(0.F, __re); | |
| 54 | } | |
| 55 | ||
| 56 | // norm | |
| 57 | ||
| 58 | template <class _Tp> __DEVICE__ _Tp norm(const std::complex<_Tp> &__c) { | |
| 59 | if (std::isinf(__c.real())) | |
| 60 | return abs(__c.real()); | |
| 61 | if (std::isinf(__c.imag())) | |
| 62 | return abs(__c.imag()); | |
| 63 | return __c.real() * __c.real() + __c.imag() * __c.imag(); | |
| 64 | } | |
| 65 | ||
| 66 | // conj | |
| 67 | ||
| 68 | template <class _Tp> std::complex<_Tp> conj(const std::complex<_Tp> &__c) { | |
| 69 | return std::complex<_Tp>(__c.real(), -__c.imag()); | |
| 70 | } | |
| 71 | ||
| 72 | // proj | |
| 73 | ||
| 74 | template <class _Tp> std::complex<_Tp> proj(const std::complex<_Tp> &__c) { | |
| 75 | std::complex<_Tp> __r = __c; | |
| 76 | if (std::isinf(__c.real()) || std::isinf(__c.imag())) | |
| 77 | __r = std::complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag())); | |
| 78 | return __r; | |
| 79 | } | |
| 80 | ||
| 81 | // polar | |
| 82 | ||
| 83 | template <class _Tp> | |
| 84 | complex<_Tp> polar(const _Tp &__rho, const _Tp &__theta = _Tp()) { | |
| 85 | if (std::isnan(__rho) || signbit(__rho)) | |
| 86 | return std::complex<_Tp>(_Tp(NAN), _Tp(NAN)); | |
| 87 | if (std::isnan(__theta)) { | |
| 88 | if (std::isinf(__rho)) | |
| 89 | return std::complex<_Tp>(__rho, __theta); | |
| 90 | return std::complex<_Tp>(__theta, __theta); | |
| 91 | } | |
| 92 | if (std::isinf(__theta)) { | |
| 93 | if (std::isinf(__rho)) | |
| 94 | return std::complex<_Tp>(__rho, _Tp(NAN)); | |
| 95 | return std::complex<_Tp>(_Tp(NAN), _Tp(NAN)); | |
| 96 | } | |
| 97 | _Tp __x = __rho * cos(__theta); | |
| 98 | if (std::isnan(__x)) | |
| 99 | __x = 0; | |
| 100 | _Tp __y = __rho * sin(__theta); | |
| 101 | if (std::isnan(__y)) | |
| 102 | __y = 0; | |
| 103 | return std::complex<_Tp>(__x, __y); | |
| 104 | } | |
| 105 | ||
| 106 | // log | |
| 107 | ||
| 108 | template <class _Tp> std::complex<_Tp> log(const std::complex<_Tp> &__x) { | |
| 109 | return std::complex<_Tp>(log(abs(__x)), arg(__x)); | |
| 110 | } | |
| 111 | ||
| 112 | // log10 | |
| 113 | ||
| 114 | template <class _Tp> std::complex<_Tp> log10(const std::complex<_Tp> &__x) { | |
| 115 | return log(__x) / log(_Tp(10)); | |
| 116 | } | |
| 117 | ||
| 118 | // sqrt | |
| 119 | ||
| 120 | template <class _Tp> | |
| 121 | __DEVICE__ std::complex<_Tp> sqrt(const std::complex<_Tp> &__x) { | |
| 122 | if (std::isinf(__x.imag())) | |
| 123 | return std::complex<_Tp>(_Tp(INFINITY), __x.imag()); | |
| 124 | if (std::isinf(__x.real())) { | |
| 125 | if (__x.real() > _Tp(0)) | |
| 126 | return std::complex<_Tp>(__x.real(), std::isnan(__x.imag()) | |
| 127 | ? __x.imag() | |
| 128 | : copysign(_Tp(0), __x.imag())); | |
| 129 | return std::complex<_Tp>(std::isnan(__x.imag()) ? __x.imag() : _Tp(0), | |
| 130 | copysign(__x.real(), __x.imag())); | |
| 131 | } | |
| 132 | return polar(sqrt(abs(__x)), arg(__x) / _Tp(2)); | |
| 133 | } | |
| 134 | ||
| 135 | // exp | |
| 136 | ||
| 137 | template <class _Tp> | |
| 138 | __DEVICE__ std::complex<_Tp> exp(const std::complex<_Tp> &__x) { | |
| 139 | _Tp __i = __x.imag(); | |
| 140 | if (std::isinf(__x.real())) { | |
| 141 | if (__x.real() < _Tp(0)) { | |
| 142 | if (!std::isfinite(__i)) | |
| 143 | __i = _Tp(1); | |
| 144 | } else if (__i == 0 || !std::isfinite(__i)) { | |
| 145 | if (std::isinf(__i)) | |
| 146 | __i = _Tp(NAN); | |
| 147 | return std::complex<_Tp>(__x.real(), __i); | |
| 148 | } | |
| 149 | } else if (std::isnan(__x.real()) && __x.imag() == 0) | |
| 150 | return __x; | |
| 151 | _Tp __e = exp(__x.real()); | |
| 152 | return std::complex<_Tp>(__e * cos(__i), __e * sin(__i)); | |
| 153 | } | |
| 154 | ||
| 155 | // pow | |
| 156 | ||
| 157 | template <class _Tp> | |
| 158 | std::complex<_Tp> pow(const std::complex<_Tp> &__x, | |
| 159 | const std::complex<_Tp> &__y) { | |
| 160 | return exp(__y * log(__x)); | |
| 161 | } | |
| 162 | ||
| 163 | // __sqr, computes pow(x, 2) | |
| 164 | ||
| 165 | template <class _Tp> std::complex<_Tp> __sqr(const std::complex<_Tp> &__x) { | |
| 166 | return std::complex<_Tp>((__x.real() - __x.imag()) * | |
| 167 | (__x.real() + __x.imag()), | |
| 168 | _Tp(2) * __x.real() * __x.imag()); | |
| 169 | } | |
| 170 | ||
| 171 | // asinh | |
| 172 | ||
| 173 | template <class _Tp> | |
| 174 | __DEVICE__ std::complex<_Tp> asinh(const std::complex<_Tp> &__x) { | |
| 175 | const _Tp __pi(atan2(+0., -0.)); | |
| 176 | if (std::isinf(__x.real())) { | |
| 177 | if (std::isnan(__x.imag())) | |
| 178 | return __x; | |
| 179 | if (std::isinf(__x.imag())) | |
| 180 | return std::complex<_Tp>(__x.real(), | |
| 181 | copysign(__pi * _Tp(0.25), __x.imag())); | |
| 182 | return std::complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag())); | |
| 183 | } | |
| 184 | if (std::isnan(__x.real())) { | |
| 185 | if (std::isinf(__x.imag())) | |
| 186 | return std::complex<_Tp>(__x.imag(), __x.real()); | |
| 187 | if (__x.imag() == 0) | |
| 188 | return __x; | |
| 189 | return std::complex<_Tp>(__x.real(), __x.real()); | |
| 190 | } | |
| 191 | if (std::isinf(__x.imag())) | |
| 192 | return std::complex<_Tp>(copysign(__x.imag(), __x.real()), | |
| 193 | copysign(__pi / _Tp(2), __x.imag())); | |
| 194 | std::complex<_Tp> __z = log(__x + sqrt(__sqr(__x) + _Tp(1))); | |
| 195 | return std::complex<_Tp>(copysign(__z.real(), __x.real()), | |
| 196 | copysign(__z.imag(), __x.imag())); | |
| 197 | } | |
| 198 | ||
| 199 | // acosh | |
| 200 | ||
| 201 | template <class _Tp> | |
| 202 | __DEVICE__ std::complex<_Tp> acosh(const std::complex<_Tp> &__x) { | |
| 203 | const _Tp __pi(atan2(+0., -0.)); | |
| 204 | if (std::isinf(__x.real())) { | |
| 205 | if (std::isnan(__x.imag())) | |
| 206 | return std::complex<_Tp>(abs(__x.real()), __x.imag()); | |
| 207 | if (std::isinf(__x.imag())) { | |
| 208 | if (__x.real() > 0) | |
| 209 | return std::complex<_Tp>(__x.real(), | |
| 210 | copysign(__pi * _Tp(0.25), __x.imag())); | |
| 211 | else | |
| 212 | return std::complex<_Tp>(-__x.real(), | |
| 213 | copysign(__pi * _Tp(0.75), __x.imag())); | |
| 214 | } | |
| 215 | if (__x.real() < 0) | |
| 216 | return std::complex<_Tp>(-__x.real(), copysign(__pi, __x.imag())); | |
| 217 | return std::complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag())); | |
| 218 | } | |
| 219 | if (std::isnan(__x.real())) { | |
| 220 | if (std::isinf(__x.imag())) | |
| 221 | return std::complex<_Tp>(abs(__x.imag()), __x.real()); | |
| 222 | return std::complex<_Tp>(__x.real(), __x.real()); | |
| 223 | } | |
| 224 | if (std::isinf(__x.imag())) | |
| 225 | return std::complex<_Tp>(abs(__x.imag()), | |
| 226 | copysign(__pi / _Tp(2), __x.imag())); | |
| 227 | std::complex<_Tp> __z = log(__x + sqrt(__sqr(__x) - _Tp(1))); | |
| 228 | return std::complex<_Tp>(copysign(__z.real(), _Tp(0)), | |
| 229 | copysign(__z.imag(), __x.imag())); | |
| 230 | } | |
| 231 | ||
| 232 | // atanh | |
| 233 | ||
| 234 | template <class _Tp> | |
| 235 | __DEVICE__ std::complex<_Tp> atanh(const std::complex<_Tp> &__x) { | |
| 236 | const _Tp __pi(atan2(+0., -0.)); | |
| 237 | if (std::isinf(__x.imag())) { | |
| 238 | return std::complex<_Tp>(copysign(_Tp(0), __x.real()), | |
| 239 | copysign(__pi / _Tp(2), __x.imag())); | |
| 240 | } | |
| 241 | if (std::isnan(__x.imag())) { | |
| 242 | if (std::isinf(__x.real()) || __x.real() == 0) | |
| 243 | return std::complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag()); | |
| 244 | return std::complex<_Tp>(__x.imag(), __x.imag()); | |
| 245 | } | |
| 246 | if (std::isnan(__x.real())) { | |
| 247 | return std::complex<_Tp>(__x.real(), __x.real()); | |
| 248 | } | |
| 249 | if (std::isinf(__x.real())) { | |
| 250 | return std::complex<_Tp>(copysign(_Tp(0), __x.real()), | |
| 251 | copysign(__pi / _Tp(2), __x.imag())); | |
| 252 | } | |
| 253 | if (abs(__x.real()) == _Tp(1) && __x.imag() == _Tp(0)) { | |
| 254 | return std::complex<_Tp>(copysign(_Tp(INFINITY), __x.real()), | |
| 255 | copysign(_Tp(0), __x.imag())); | |
| 256 | } | |
| 257 | std::complex<_Tp> __z = log((_Tp(1) + __x) / (_Tp(1) - __x)) / _Tp(2); | |
| 258 | return std::complex<_Tp>(copysign(__z.real(), __x.real()), | |
| 259 | copysign(__z.imag(), __x.imag())); | |
| 260 | } | |
| 261 | ||
| 262 | // sinh | |
| 263 | ||
| 264 | template <class _Tp> | |
| 265 | __DEVICE__ std::complex<_Tp> sinh(const std::complex<_Tp> &__x) { | |
| 266 | if (std::isinf(__x.real()) && !std::isfinite(__x.imag())) | |
| 267 | return std::complex<_Tp>(__x.real(), _Tp(NAN)); | |
| 268 | if (__x.real() == 0 && !std::isfinite(__x.imag())) | |
| 269 | return std::complex<_Tp>(__x.real(), _Tp(NAN)); | |
| 270 | if (__x.imag() == 0 && !std::isfinite(__x.real())) | |
| 271 | return __x; | |
| 272 | return std::complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), | |
| 273 | cosh(__x.real()) * sin(__x.imag())); | |
| 274 | } | |
| 275 | ||
| 276 | // cosh | |
| 277 | ||
| 278 | template <class _Tp> | |
| 279 | __DEVICE__ std::complex<_Tp> cosh(const std::complex<_Tp> &__x) { | |
| 280 | if (std::isinf(__x.real()) && !std::isfinite(__x.imag())) | |
| 281 | return std::complex<_Tp>(abs(__x.real()), _Tp(NAN)); | |
| 282 | if (__x.real() == 0 && !std::isfinite(__x.imag())) | |
| 283 | return std::complex<_Tp>(_Tp(NAN), __x.real()); | |
| 284 | if (__x.real() == 0 && __x.imag() == 0) | |
| 285 | return std::complex<_Tp>(_Tp(1), __x.imag()); | |
| 286 | if (__x.imag() == 0 && !std::isfinite(__x.real())) | |
| 287 | return std::complex<_Tp>(abs(__x.real()), __x.imag()); | |
| 288 | return std::complex<_Tp>(cosh(__x.real()) * cos(__x.imag()), | |
| 289 | sinh(__x.real()) * sin(__x.imag())); | |
| 290 | } | |
| 291 | ||
| 292 | // tanh | |
| 293 | ||
| 294 | template <class _Tp> | |
| 295 | __DEVICE__ std::complex<_Tp> tanh(const std::complex<_Tp> &__x) { | |
| 296 | if (std::isinf(__x.real())) { | |
| 297 | if (!std::isfinite(__x.imag())) | |
| 298 | return std::complex<_Tp>(_Tp(1), _Tp(0)); | |
| 299 | return std::complex<_Tp>(_Tp(1), | |
| 300 | copysign(_Tp(0), sin(_Tp(2) * __x.imag()))); | |
| 301 | } | |
| 302 | if (std::isnan(__x.real()) && __x.imag() == 0) | |
| 303 | return __x; | |
| 304 | _Tp __2r(_Tp(2) * __x.real()); | |
| 305 | _Tp __2i(_Tp(2) * __x.imag()); | |
| 306 | _Tp __d(cosh(__2r) + cos(__2i)); | |
| 307 | _Tp __2rsh(sinh(__2r)); | |
| 308 | if (std::isinf(__2rsh) && std::isinf(__d)) | |
| 309 | return std::complex<_Tp>(__2rsh > _Tp(0) ? _Tp(1) : _Tp(-1), | |
| 310 | __2i > _Tp(0) ? _Tp(0) : _Tp(-0.)); | |
| 311 | return std::complex<_Tp>(__2rsh / __d, sin(__2i) / __d); | |
| 312 | } | |
| 313 | ||
| 314 | // asin | |
| 315 | ||
| 316 | template <class _Tp> | |
| 317 | __DEVICE__ std::complex<_Tp> asin(const std::complex<_Tp> &__x) { | |
| 318 | std::complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real())); | |
| 319 | return std::complex<_Tp>(__z.imag(), -__z.real()); | |
| 320 | } | |
| 321 | ||
| 322 | // acos | |
| 323 | ||
| 324 | template <class _Tp> | |
| 325 | __DEVICE__ std::complex<_Tp> acos(const std::complex<_Tp> &__x) { | |
| 326 | const _Tp __pi(atan2(+0., -0.)); | |
| 327 | if (std::isinf(__x.real())) { | |
| 328 | if (std::isnan(__x.imag())) | |
| 329 | return std::complex<_Tp>(__x.imag(), __x.real()); | |
| 330 | if (std::isinf(__x.imag())) { | |
| 331 | if (__x.real() < _Tp(0)) | |
| 332 | return std::complex<_Tp>(_Tp(0.75) * __pi, -__x.imag()); | |
| 333 | return std::complex<_Tp>(_Tp(0.25) * __pi, -__x.imag()); | |
| 334 | } | |
| 335 | if (__x.real() < _Tp(0)) | |
| 336 | return std::complex<_Tp>(__pi, | |
| 337 | signbit(__x.imag()) ? -__x.real() : __x.real()); | |
| 338 | return std::complex<_Tp>(_Tp(0), | |
| 339 | signbit(__x.imag()) ? __x.real() : -__x.real()); | |
| 340 | } | |
| 341 | if (std::isnan(__x.real())) { | |
| 342 | if (std::isinf(__x.imag())) | |
| 343 | return std::complex<_Tp>(__x.real(), -__x.imag()); | |
| 344 | return std::complex<_Tp>(__x.real(), __x.real()); | |
| 345 | } | |
| 346 | if (std::isinf(__x.imag())) | |
| 347 | return std::complex<_Tp>(__pi / _Tp(2), -__x.imag()); | |
| 348 | if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag()))) | |
| 349 | return std::complex<_Tp>(__pi / _Tp(2), -__x.imag()); | |
| 350 | std::complex<_Tp> __z = log(__x + sqrt(__sqr(__x) - _Tp(1))); | |
| 351 | if (signbit(__x.imag())) | |
| 352 | return std::complex<_Tp>(abs(__z.imag()), abs(__z.real())); | |
| 353 | return std::complex<_Tp>(abs(__z.imag()), -abs(__z.real())); | |
| 354 | } | |
| 355 | ||
| 356 | // atan | |
| 357 | ||
| 358 | template <class _Tp> | |
| 359 | __DEVICE__ std::complex<_Tp> atan(const std::complex<_Tp> &__x) { | |
| 360 | std::complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real())); | |
| 361 | return std::complex<_Tp>(__z.imag(), -__z.real()); | |
| 362 | } | |
| 363 | ||
| 364 | // sin | |
| 365 | ||
| 366 | template <class _Tp> | |
| 367 | __DEVICE__ std::complex<_Tp> sin(const std::complex<_Tp> &__x) { | |
| 368 | std::complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real())); | |
| 369 | return std::complex<_Tp>(__z.imag(), -__z.real()); | |
| 370 | } | |
| 371 | ||
| 372 | // cos | |
| 373 | ||
| 374 | template <class _Tp> std::complex<_Tp> cos(const std::complex<_Tp> &__x) { | |
| 375 | return cosh(complex<_Tp>(-__x.imag(), __x.real())); | |
| 376 | } | |
| 377 | ||
| 378 | // tan | |
| 379 | ||
| 380 | template <class _Tp> | |
| 381 | __DEVICE__ std::complex<_Tp> tan(const std::complex<_Tp> &__x) { | |
| 382 | std::complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real())); | |
| 383 | return std::complex<_Tp>(__z.imag(), -__z.real()); | |
| 384 | } | |
| 385 | ||
| 386 | } // namespace std | |
| 387 | ||
| 388 | #endif |
lib/include/popcntintrin.h+9-2| ... | ... | @@ -13,6 +13,12 @@ |
| 13 | 13 | /* Define the default attributes for the functions in this file. */ |
| 14 | 14 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("popcnt"))) |
| 15 | 15 | |
| 16 | #if defined(__cplusplus) && (__cplusplus >= 201103L) | |
| 17 | #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS constexpr | |
| 18 | #else | |
| 19 | #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS | |
| 20 | #endif | |
| 21 | ||
| 16 | 22 | /// Counts the number of bits in the source operand having a value of 1. |
| 17 | 23 | /// |
| 18 | 24 | /// \headerfile <x86intrin.h> |
| ... | ... | @@ -23,7 +29,7 @@ |
| 23 | 29 | /// An unsigned 32-bit integer operand. |
| 24 | 30 | /// \returns A 32-bit integer containing the number of bits with value 1 in the |
| 25 | 31 | /// source operand. |
| 26 | static __inline__ int __DEFAULT_FN_ATTRS | |
| 32 | static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 27 | 33 | _mm_popcnt_u32(unsigned int __A) |
| 28 | 34 | { |
| 29 | 35 | return __builtin_popcount(__A); |
| ... | ... | @@ -40,7 +46,7 @@ _mm_popcnt_u32(unsigned int __A) |
| 40 | 46 | /// An unsigned 64-bit integer operand. |
| 41 | 47 | /// \returns A 64-bit integer containing the number of bits with value 1 in the |
| 42 | 48 | /// source operand. |
| 43 | static __inline__ long long __DEFAULT_FN_ATTRS | |
| 49 | static __inline__ long long __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 44 | 50 | _mm_popcnt_u64(unsigned long long __A) |
| 45 | 51 | { |
| 46 | 52 | return __builtin_popcountll(__A); |
| ... | ... | @@ -48,5 +54,6 @@ _mm_popcnt_u64(unsigned long long __A) |
| 48 | 54 | #endif /* __x86_64__ */ |
| 49 | 55 | |
| 50 | 56 | #undef __DEFAULT_FN_ATTRS |
| 57 | #undef __DEFAULT_FN_ATTRS_CONSTEXPR | |
| 51 | 58 | |
| 52 | 59 | #endif /* __POPCNTINTRIN_H */ |
lib/include/ppc_wrappers/smmintrin.h+24| ... | ... | @@ -78,6 +78,30 @@ extern __inline __m128i |
| 78 | 78 | return (__m128i)vec_sel((__v16qu)__A, (__v16qu)__B, __lmask); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | extern __inline __m128i | |
| 82 | __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
| 83 | _mm_insert_epi8(__m128i const __A, int const __D, int const __N) { | |
| 84 | __v16qi result = (__v16qi)__A; | |
| 85 | result[__N & 0xf] = __D; | |
| 86 | return (__m128i)result; | |
| 87 | } | |
| 88 | ||
| 89 | extern __inline __m128i | |
| 90 | __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
| 91 | _mm_insert_epi32(__m128i const __A, int const __D, int const __N) { | |
| 92 | __v4si result = (__v4si)__A; | |
| 93 | result[__N & 3] = __D; | |
| 94 | return (__m128i)result; | |
| 95 | } | |
| 96 | ||
| 97 | extern __inline __m128i | |
| 98 | __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
| 99 | _mm_insert_epi64(__m128i const __A, long long const __D, int const __N) { | |
| 100 | __v2di result = (__v2di)__A; | |
| 101 | result[__N & 1] = __D; | |
| 102 | return (__m128i)result; | |
| 103 | } | |
| 104 | ||
| 81 | 105 | #else |
| 82 | 106 | #include_next <smmintrin.h> |
| 83 | 107 | #endif /* defined(__linux__) && defined(__ppc64__) */ |
lib/include/uintrintrin.h created+150| ... | ... | @@ -0,0 +1,150 @@ |
| 1 | /*===------------------ uintrintrin.h - UINTR intrinsics -------------------=== | |
| 2 | * | |
| 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | * See https://llvm.org/LICENSE.txt for license information. | |
| 5 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | * | |
| 7 | *===-----------------------------------------------------------------------=== | |
| 8 | */ | |
| 9 | ||
| 10 | #ifndef __X86GPRINTRIN_H | |
| 11 | #error "Never use <uintrintrin.h> directly; include <x86gprintrin.h> instead." | |
| 12 | #endif | |
| 13 | ||
| 14 | #ifndef __UINTRINTRIN_H | |
| 15 | #define __UINTRINTRIN_H | |
| 16 | ||
| 17 | /* Define the default attributes for the functions in this file */ | |
| 18 | #define __DEFAULT_FN_ATTRS \ | |
| 19 | __attribute__((__always_inline__, __nodebug__, __target__("uintr"))) | |
| 20 | ||
| 21 | #ifdef __x86_64__ | |
| 22 | ||
| 23 | /// Clears the user interrupt flag (UIF). Its effect takes place immediately: a | |
| 24 | /// user interrupt cannot be delivered on the instruction boundary following | |
| 25 | /// CLUI. Can be executed only if CR4.UINT = 1, the logical processor is in | |
| 26 | /// 64-bit mode, and software is not executing inside an enclave; otherwise, | |
| 27 | /// each causes an invalid-opcode exception. Causes a transactional abort if | |
| 28 | /// executed inside a transactional region; the abort loads EAX as it would | |
| 29 | /// had it been due to an execution of CLI. | |
| 30 | /// | |
| 31 | /// \headerfile <x86gprintrin.h> | |
| 32 | /// | |
| 33 | /// This intrinsic corresponds to the <c> CLUI </c> instruction. | |
| 34 | /// | |
| 35 | /// \operation | |
| 36 | /// UIF := 0 | |
| 37 | /// \endoperation | |
| 38 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 39 | _clui (void) | |
| 40 | { | |
| 41 | __builtin_ia32_clui(); | |
| 42 | } | |
| 43 | ||
| 44 | /// Sets the user interrupt flag (UIF). Its effect takes place immediately; a | |
| 45 | /// user interrupt may be delivered on the instruction boundary following | |
| 46 | /// STUI. Can be executed only if CR4.UINT = 1, the logical processor is in | |
| 47 | /// 64-bit mode, and software is not executing inside an enclave; otherwise, | |
| 48 | /// each causes an invalid-opcode exception. Causes a transactional abort if | |
| 49 | /// executed inside a transactional region; the abort loads EAX as it would | |
| 50 | /// had it been due to an execution of STI. | |
| 51 | /// | |
| 52 | /// \headerfile <x86gprintrin.h> | |
| 53 | /// | |
| 54 | /// This intrinsic corresponds to the <c> STUI </c> instruction. | |
| 55 | /// | |
| 56 | /// \operation | |
| 57 | /// UIF := 1 | |
| 58 | /// \endoperation | |
| 59 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 60 | _stui (void) | |
| 61 | { | |
| 62 | __builtin_ia32_stui(); | |
| 63 | } | |
| 64 | ||
| 65 | /// Get the current value of the user interrupt flag (UIF). Can be executed | |
| 66 | /// regardless of CPL and inside a transactional region. Can be executed only | |
| 67 | /// if CR4.UINT = 1, the logical processor is in 64-bit mode, and software is | |
| 68 | /// not executing inside an enclave; otherwise, it causes an invalid-opcode | |
| 69 | /// exception. | |
| 70 | /// | |
| 71 | /// \headerfile <x86gprintrin.h> | |
| 72 | /// | |
| 73 | /// This intrinsic corresponds to the <c> TESTUI </c> instruction. | |
| 74 | /// | |
| 75 | /// \returns The current value of the user interrupt flag (UIF). | |
| 76 | /// | |
| 77 | /// \operation | |
| 78 | /// CF := UIF | |
| 79 | /// ZF := 0 | |
| 80 | /// AF := 0 | |
| 81 | /// OF := 0 | |
| 82 | /// PF := 0 | |
| 83 | /// SF := 0 | |
| 84 | /// dst := CF | |
| 85 | /// \endoperation | |
| 86 | static __inline__ unsigned char __DEFAULT_FN_ATTRS | |
| 87 | _testui (void) | |
| 88 | { | |
| 89 | return __builtin_ia32_testui(); | |
| 90 | } | |
| 91 | ||
| 92 | /// Send interprocessor user interrupt. Can be executed only if | |
| 93 | /// CR4.UINT = IA32_UINT_TT[0] = 1, the logical processor is in 64-bit mode, | |
| 94 | /// and software is not executing inside an enclave; otherwise, it causes an | |
| 95 | /// invalid-opcode exception. May be executed at any privilege level, all of | |
| 96 | /// its memory accesses are performed with supervisor privilege. | |
| 97 | /// | |
| 98 | /// \headerfile <x86gprintrin.h> | |
| 99 | /// | |
| 100 | /// This intrinsic corresponds to the <c> SENDUIPI </c> instruction | |
| 101 | /// | |
| 102 | /// \param __a | |
| 103 | /// Index of user-interrupt target table entry in user-interrupt target | |
| 104 | /// table. | |
| 105 | /// | |
| 106 | /// \operation | |
| 107 | /// IF __a > UITTSZ | |
| 108 | /// GP (0) | |
| 109 | /// FI | |
| 110 | /// tempUITTE := MEM[UITTADDR + (a<<4)] | |
| 111 | /// // tempUITTE must be valid, and can't have any reserved bit set | |
| 112 | /// IF (tempUITTE.V == 0 OR tempUITTE[7:1] != 0) | |
| 113 | /// GP (0) | |
| 114 | /// FI | |
| 115 | /// tempUPID := MEM[tempUITTE.UPIDADDR] // under lock | |
| 116 | /// // tempUPID can't have any reserved bit set | |
| 117 | /// IF (tempUPID[15:2] != 0 OR tempUPID[31:24] != 0) | |
| 118 | /// GP (0) // release lock | |
| 119 | /// FI | |
| 120 | /// tempUPID.PIR[tempUITTE.UV] := 1; | |
| 121 | /// IF (tempUPID.SN == 0 AND tempUPID.ON == 0) | |
| 122 | /// tempUPID.ON := 1 | |
| 123 | /// sendNotify := 1 | |
| 124 | /// ELSE | |
| 125 | /// sendNotify := 0 | |
| 126 | /// FI | |
| 127 | /// MEM[tempUITTE.UPIDADDR] := tempUPID // release lock | |
| 128 | /// IF sendNotify == 1 | |
| 129 | /// IF IA32_APIC_BASE[10] == 1 // local APIC is in x2APIC mode | |
| 130 | /// // send ordinary IPI with vector tempUPID.NV to 32-bit physical APIC | |
| 131 | /// // ID tempUPID.NDST | |
| 132 | /// SendOrdinaryIPI(tempUPID.NV, tempUPID.NDST) | |
| 133 | /// ELSE | |
| 134 | /// // send ordinary IPI with vector tempUPID.NV to 8-bit physical APIC | |
| 135 | /// // ID tempUPID.NDST[15:8] | |
| 136 | /// SendOrdinaryIPI(tempUPID.NV, tempUPID.NDST[15:8]) | |
| 137 | /// FI | |
| 138 | /// FI | |
| 139 | /// \endoperation | |
| 140 | static __inline__ void __DEFAULT_FN_ATTRS | |
| 141 | _senduipi (unsigned long long __a) | |
| 142 | { | |
| 143 | __builtin_ia32_senduipi(__a); | |
| 144 | } | |
| 145 | ||
| 146 | #endif /* __x86_64__ */ | |
| 147 | ||
| 148 | #undef __DEFAULT_FN_ATTRS | |
| 149 | ||
| 150 | #endif /* __UINTRINTRIN_H */ |
lib/include/wasm_simd128.h+73-39| ... | ... | @@ -18,8 +18,7 @@ typedef int32_t v128_t __attribute__((__vector_size__(16), __aligned__(16))); |
| 18 | 18 | |
| 19 | 19 | // Internal types determined by clang builtin definitions |
| 20 | 20 | typedef int32_t __v128_u __attribute__((__vector_size__(16), __aligned__(1))); |
| 21 | typedef char __i8x16 __attribute__((__vector_size__(16), __aligned__(16))); | |
| 22 | typedef signed char __s8x16 | |
| 21 | typedef signed char __i8x16 | |
| 23 | 22 | __attribute__((__vector_size__(16), __aligned__(16))); |
| 24 | 23 | typedef unsigned char __u8x16 |
| 25 | 24 | __attribute__((__vector_size__(16), __aligned__(16))); |
| ... | ... | @@ -35,6 +34,13 @@ typedef unsigned long long __u64x2 |
| 35 | 34 | typedef float __f32x4 __attribute__((__vector_size__(16), __aligned__(16))); |
| 36 | 35 | typedef double __f64x2 __attribute__((__vector_size__(16), __aligned__(16))); |
| 37 | 36 | |
| 37 | typedef signed char __i8x8 __attribute__((__vector_size__(8), __aligned__(8))); | |
| 38 | typedef unsigned char __u8x8 | |
| 39 | __attribute__((__vector_size__(8), __aligned__(8))); | |
| 40 | typedef short __i16x4 __attribute__((__vector_size__(8), __aligned__(8))); | |
| 41 | typedef unsigned short __u16x4 | |
| 42 | __attribute__((__vector_size__(8), __aligned__(8))); | |
| 43 | ||
| 38 | 44 | #define __DEFAULT_FN_ATTRS \ |
| 39 | 45 | __attribute__((__always_inline__, __nodebug__, __target__("simd128"), \ |
| 40 | 46 | __min_vector_width__(128))) |
| ... | ... | @@ -273,7 +279,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_splat(int8_t __a) { |
| 273 | 279 | (__builtin_wasm_extract_lane_s_i8x16((__i8x16)(__a), __i)) |
| 274 | 280 | |
| 275 | 281 | #define wasm_u8x16_extract_lane(__a, __i) \ |
| 276 | (__builtin_wasm_extract_lane_u_i8x16((__i8x16)(__a), __i)) | |
| 282 | (__builtin_wasm_extract_lane_u_i8x16((__u8x16)(__a), __i)) | |
| 277 | 283 | |
| 278 | 284 | #define wasm_i8x16_replace_lane(__a, __i, __b) \ |
| 279 | 285 | ((v128_t)__builtin_wasm_replace_lane_i8x16((__i8x16)(__a), __i, __b)) |
| ... | ... | @@ -286,7 +292,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_splat(int16_t __a) { |
| 286 | 292 | (__builtin_wasm_extract_lane_s_i16x8((__i16x8)(__a), __i)) |
| 287 | 293 | |
| 288 | 294 | #define wasm_u16x8_extract_lane(__a, __i) \ |
| 289 | (__builtin_wasm_extract_lane_u_i16x8((__i16x8)(__a), __i)) | |
| 295 | (__builtin_wasm_extract_lane_u_i16x8((__u16x8)(__a), __i)) | |
| 290 | 296 | |
| 291 | 297 | #define wasm_i16x8_replace_lane(__a, __i, __b) \ |
| 292 | 298 | ((v128_t)__builtin_wasm_replace_lane_i16x8((__i16x8)(__a), __i, __b)) |
| ... | ... | @@ -333,17 +339,17 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_splat(double __a) { |
| 333 | 339 | |
| 334 | 340 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_eq(v128_t __a, |
| 335 | 341 | v128_t __b) { |
| 336 | return (v128_t)((__s8x16)__a == (__s8x16)__b); | |
| 342 | return (v128_t)((__i8x16)__a == (__i8x16)__b); | |
| 337 | 343 | } |
| 338 | 344 | |
| 339 | 345 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_ne(v128_t __a, |
| 340 | 346 | v128_t __b) { |
| 341 | return (v128_t)((__s8x16)__a != (__s8x16)__b); | |
| 347 | return (v128_t)((__i8x16)__a != (__i8x16)__b); | |
| 342 | 348 | } |
| 343 | 349 | |
| 344 | 350 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_lt(v128_t __a, |
| 345 | 351 | v128_t __b) { |
| 346 | return (v128_t)((__s8x16)__a < (__s8x16)__b); | |
| 352 | return (v128_t)((__i8x16)__a < (__i8x16)__b); | |
| 347 | 353 | } |
| 348 | 354 | |
| 349 | 355 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_lt(v128_t __a, |
| ... | ... | @@ -353,7 +359,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_lt(v128_t __a, |
| 353 | 359 | |
| 354 | 360 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_gt(v128_t __a, |
| 355 | 361 | v128_t __b) { |
| 356 | return (v128_t)((__s8x16)__a > (__s8x16)__b); | |
| 362 | return (v128_t)((__i8x16)__a > (__i8x16)__b); | |
| 357 | 363 | } |
| 358 | 364 | |
| 359 | 365 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_gt(v128_t __a, |
| ... | ... | @@ -363,7 +369,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_gt(v128_t __a, |
| 363 | 369 | |
| 364 | 370 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_le(v128_t __a, |
| 365 | 371 | v128_t __b) { |
| 366 | return (v128_t)((__s8x16)__a <= (__s8x16)__b); | |
| 372 | return (v128_t)((__i8x16)__a <= (__i8x16)__b); | |
| 367 | 373 | } |
| 368 | 374 | |
| 369 | 375 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_le(v128_t __a, |
| ... | ... | @@ -373,7 +379,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_le(v128_t __a, |
| 373 | 379 | |
| 374 | 380 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_ge(v128_t __a, |
| 375 | 381 | v128_t __b) { |
| 376 | return (v128_t)((__s8x16)__a >= (__s8x16)__b); | |
| 382 | return (v128_t)((__i8x16)__a >= (__i8x16)__b); | |
| 377 | 383 | } |
| 378 | 384 | |
| 379 | 385 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_ge(v128_t __a, |
| ... | ... | @@ -595,7 +601,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_shl(v128_t __a, |
| 595 | 601 | |
| 596 | 602 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_shr(v128_t __a, |
| 597 | 603 | int32_t __b) { |
| 598 | return (v128_t)((__s8x16)__a >> __b); | |
| 604 | return (v128_t)((__i8x16)__a >> __b); | |
| 599 | 605 | } |
| 600 | 606 | |
| 601 | 607 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_shr(v128_t __a, |
| ... | ... | @@ -616,8 +622,8 @@ wasm_i8x16_add_saturate(v128_t __a, v128_t __b) { |
| 616 | 622 | |
| 617 | 623 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 618 | 624 | wasm_u8x16_add_saturate(v128_t __a, v128_t __b) { |
| 619 | return (v128_t)__builtin_wasm_add_saturate_u_i8x16((__i8x16)__a, | |
| 620 | (__i8x16)__b); | |
| 625 | return (v128_t)__builtin_wasm_add_saturate_u_i8x16((__u8x16)__a, | |
| 626 | (__u8x16)__b); | |
| 621 | 627 | } |
| 622 | 628 | |
| 623 | 629 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_sub(v128_t __a, |
| ... | ... | @@ -633,8 +639,8 @@ wasm_i8x16_sub_saturate(v128_t __a, v128_t __b) { |
| 633 | 639 | |
| 634 | 640 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 635 | 641 | wasm_u8x16_sub_saturate(v128_t __a, v128_t __b) { |
| 636 | return (v128_t)__builtin_wasm_sub_saturate_u_i8x16((__i8x16)__a, | |
| 637 | (__i8x16)__b); | |
| 642 | return (v128_t)__builtin_wasm_sub_saturate_u_i8x16((__u8x16)__a, | |
| 643 | (__u8x16)__b); | |
| 638 | 644 | } |
| 639 | 645 | |
| 640 | 646 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min(v128_t __a, |
| ... | ... | @@ -644,7 +650,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min(v128_t __a, |
| 644 | 650 | |
| 645 | 651 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_min(v128_t __a, |
| 646 | 652 | v128_t __b) { |
| 647 | return (v128_t)__builtin_wasm_min_u_i8x16((__i8x16)__a, (__i8x16)__b); | |
| 653 | return (v128_t)__builtin_wasm_min_u_i8x16((__u8x16)__a, (__u8x16)__b); | |
| 648 | 654 | } |
| 649 | 655 | |
| 650 | 656 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max(v128_t __a, |
| ... | ... | @@ -654,12 +660,12 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max(v128_t __a, |
| 654 | 660 | |
| 655 | 661 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_max(v128_t __a, |
| 656 | 662 | v128_t __b) { |
| 657 | return (v128_t)__builtin_wasm_max_u_i8x16((__i8x16)__a, (__i8x16)__b); | |
| 663 | return (v128_t)__builtin_wasm_max_u_i8x16((__u8x16)__a, (__u8x16)__b); | |
| 658 | 664 | } |
| 659 | 665 | |
| 660 | 666 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_avgr(v128_t __a, |
| 661 | 667 | v128_t __b) { |
| 662 | return (v128_t)__builtin_wasm_avgr_u_i8x16((__i8x16)__a, (__i8x16)__b); | |
| 668 | return (v128_t)__builtin_wasm_avgr_u_i8x16((__u8x16)__a, (__u8x16)__b); | |
| 663 | 669 | } |
| 664 | 670 | |
| 665 | 671 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_abs(v128_t __a) { |
| ... | ... | @@ -706,8 +712,8 @@ wasm_i16x8_add_saturate(v128_t __a, v128_t __b) { |
| 706 | 712 | |
| 707 | 713 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 708 | 714 | wasm_u16x8_add_saturate(v128_t __a, v128_t __b) { |
| 709 | return (v128_t)__builtin_wasm_add_saturate_u_i16x8((__i16x8)__a, | |
| 710 | (__i16x8)__b); | |
| 715 | return (v128_t)__builtin_wasm_add_saturate_u_i16x8((__u16x8)__a, | |
| 716 | (__u16x8)__b); | |
| 711 | 717 | } |
| 712 | 718 | |
| 713 | 719 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_sub(v128_t __a, |
| ... | ... | @@ -723,8 +729,8 @@ wasm_i16x8_sub_saturate(v128_t __a, v128_t __b) { |
| 723 | 729 | |
| 724 | 730 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 725 | 731 | wasm_u16x8_sub_saturate(v128_t __a, v128_t __b) { |
| 726 | return (v128_t)__builtin_wasm_sub_saturate_u_i16x8((__i16x8)__a, | |
| 727 | (__i16x8)__b); | |
| 732 | return (v128_t)__builtin_wasm_sub_saturate_u_i16x8((__u16x8)__a, | |
| 733 | (__u16x8)__b); | |
| 728 | 734 | } |
| 729 | 735 | |
| 730 | 736 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_mul(v128_t __a, |
| ... | ... | @@ -739,7 +745,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_min(v128_t __a, |
| 739 | 745 | |
| 740 | 746 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_min(v128_t __a, |
| 741 | 747 | v128_t __b) { |
| 742 | return (v128_t)__builtin_wasm_min_u_i16x8((__i16x8)__a, (__i16x8)__b); | |
| 748 | return (v128_t)__builtin_wasm_min_u_i16x8((__u16x8)__a, (__u16x8)__b); | |
| 743 | 749 | } |
| 744 | 750 | |
| 745 | 751 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max(v128_t __a, |
| ... | ... | @@ -749,12 +755,12 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max(v128_t __a, |
| 749 | 755 | |
| 750 | 756 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_max(v128_t __a, |
| 751 | 757 | v128_t __b) { |
| 752 | return (v128_t)__builtin_wasm_max_u_i16x8((__i16x8)__a, (__i16x8)__b); | |
| 758 | return (v128_t)__builtin_wasm_max_u_i16x8((__u16x8)__a, (__u16x8)__b); | |
| 753 | 759 | } |
| 754 | 760 | |
| 755 | 761 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_avgr(v128_t __a, |
| 756 | 762 | v128_t __b) { |
| 757 | return (v128_t)__builtin_wasm_avgr_u_i16x8((__i16x8)__a, (__i16x8)__b); | |
| 763 | return (v128_t)__builtin_wasm_avgr_u_i16x8((__u16x8)__a, (__u16x8)__b); | |
| 758 | 764 | } |
| 759 | 765 | |
| 760 | 766 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_abs(v128_t __a) { |
| ... | ... | @@ -810,7 +816,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_min(v128_t __a, |
| 810 | 816 | |
| 811 | 817 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_min(v128_t __a, |
| 812 | 818 | v128_t __b) { |
| 813 | return (v128_t)__builtin_wasm_min_u_i32x4((__i32x4)__a, (__i32x4)__b); | |
| 819 | return (v128_t)__builtin_wasm_min_u_i32x4((__u32x4)__a, (__u32x4)__b); | |
| 814 | 820 | } |
| 815 | 821 | |
| 816 | 822 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max(v128_t __a, |
| ... | ... | @@ -820,7 +826,7 @@ static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max(v128_t __a, |
| 820 | 826 | |
| 821 | 827 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_max(v128_t __a, |
| 822 | 828 | v128_t __b) { |
| 823 | return (v128_t)__builtin_wasm_max_u_i32x4((__i32x4)__a, (__i32x4)__b); | |
| 829 | return (v128_t)__builtin_wasm_max_u_i32x4((__u32x4)__a, (__u32x4)__b); | |
| 824 | 830 | } |
| 825 | 831 | |
| 826 | 832 | static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_neg(v128_t __a) { |
| ... | ... | @@ -1071,8 +1077,8 @@ wasm_i8x16_narrow_i16x8(v128_t __a, v128_t __b) { |
| 1071 | 1077 | |
| 1072 | 1078 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1073 | 1079 | wasm_u8x16_narrow_i16x8(v128_t __a, v128_t __b) { |
| 1074 | return (v128_t)__builtin_wasm_narrow_u_i8x16_i16x8((__i16x8)__a, | |
| 1075 | (__i16x8)__b); | |
| 1080 | return (v128_t)__builtin_wasm_narrow_u_i8x16_i16x8((__u16x8)__a, | |
| 1081 | (__u16x8)__b); | |
| 1076 | 1082 | } |
| 1077 | 1083 | |
| 1078 | 1084 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| ... | ... | @@ -1083,48 +1089,76 @@ wasm_i16x8_narrow_i32x4(v128_t __a, v128_t __b) { |
| 1083 | 1089 | |
| 1084 | 1090 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1085 | 1091 | wasm_u16x8_narrow_i32x4(v128_t __a, v128_t __b) { |
| 1086 | return (v128_t)__builtin_wasm_narrow_u_i16x8_i32x4((__i32x4)__a, | |
| 1087 | (__i32x4)__b); | |
| 1092 | return (v128_t)__builtin_wasm_narrow_u_i16x8_i32x4((__u32x4)__a, | |
| 1093 | (__u32x4)__b); | |
| 1088 | 1094 | } |
| 1089 | 1095 | |
| 1090 | 1096 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1091 | 1097 | wasm_i16x8_widen_low_i8x16(v128_t __a) { |
| 1092 | return (v128_t)__builtin_wasm_widen_low_s_i16x8_i8x16((__i8x16)__a); | |
| 1098 | return (v128_t) __builtin_convertvector( | |
| 1099 | (__i8x8){((__i8x16)__a)[0], ((__i8x16)__a)[1], ((__i8x16)__a)[2], | |
| 1100 | ((__i8x16)__a)[3], ((__i8x16)__a)[4], ((__i8x16)__a)[5], | |
| 1101 | ((__i8x16)__a)[6], ((__i8x16)__a)[7]}, | |
| 1102 | __i16x8); | |
| 1093 | 1103 | } |
| 1094 | 1104 | |
| 1095 | 1105 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1096 | 1106 | wasm_i16x8_widen_high_i8x16(v128_t __a) { |
| 1097 | return (v128_t)__builtin_wasm_widen_high_s_i16x8_i8x16((__i8x16)__a); | |
| 1107 | return (v128_t) __builtin_convertvector( | |
| 1108 | (__i8x8){((__i8x16)__a)[8], ((__i8x16)__a)[9], ((__i8x16)__a)[10], | |
| 1109 | ((__i8x16)__a)[11], ((__i8x16)__a)[12], ((__i8x16)__a)[13], | |
| 1110 | ((__i8x16)__a)[14], ((__i8x16)__a)[15]}, | |
| 1111 | __i16x8); | |
| 1098 | 1112 | } |
| 1099 | 1113 | |
| 1100 | 1114 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1101 | 1115 | wasm_i16x8_widen_low_u8x16(v128_t __a) { |
| 1102 | return (v128_t)__builtin_wasm_widen_low_u_i16x8_i8x16((__i8x16)__a); | |
| 1116 | return (v128_t) __builtin_convertvector( | |
| 1117 | (__u8x8){((__u8x16)__a)[0], ((__u8x16)__a)[1], ((__u8x16)__a)[2], | |
| 1118 | ((__u8x16)__a)[3], ((__u8x16)__a)[4], ((__u8x16)__a)[5], | |
| 1119 | ((__u8x16)__a)[6], ((__u8x16)__a)[7]}, | |
| 1120 | __u16x8); | |
| 1103 | 1121 | } |
| 1104 | 1122 | |
| 1105 | 1123 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1106 | 1124 | wasm_i16x8_widen_high_u8x16(v128_t __a) { |
| 1107 | return (v128_t)__builtin_wasm_widen_high_u_i16x8_i8x16((__i8x16)__a); | |
| 1125 | return (v128_t) __builtin_convertvector( | |
| 1126 | (__u8x8){((__u8x16)__a)[8], ((__u8x16)__a)[9], ((__u8x16)__a)[10], | |
| 1127 | ((__u8x16)__a)[11], ((__u8x16)__a)[12], ((__u8x16)__a)[13], | |
| 1128 | ((__u8x16)__a)[14], ((__u8x16)__a)[15]}, | |
| 1129 | __u16x8); | |
| 1108 | 1130 | } |
| 1109 | 1131 | |
| 1110 | 1132 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1111 | 1133 | wasm_i32x4_widen_low_i16x8(v128_t __a) { |
| 1112 | return (v128_t)__builtin_wasm_widen_low_s_i32x4_i16x8((__i16x8)__a); | |
| 1134 | return (v128_t) __builtin_convertvector( | |
| 1135 | (__i16x4){((__i16x8)__a)[0], ((__i16x8)__a)[1], ((__i16x8)__a)[2], | |
| 1136 | ((__i16x8)__a)[3]}, | |
| 1137 | __i32x4); | |
| 1113 | 1138 | } |
| 1114 | 1139 | |
| 1115 | 1140 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1116 | 1141 | wasm_i32x4_widen_high_i16x8(v128_t __a) { |
| 1117 | return (v128_t)__builtin_wasm_widen_high_s_i32x4_i16x8((__i16x8)__a); | |
| 1142 | return (v128_t) __builtin_convertvector( | |
| 1143 | (__i16x4){((__i16x8)__a)[4], ((__i16x8)__a)[5], ((__i16x8)__a)[6], | |
| 1144 | ((__i16x8)__a)[7]}, | |
| 1145 | __i32x4); | |
| 1118 | 1146 | } |
| 1119 | 1147 | |
| 1120 | 1148 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1121 | 1149 | wasm_i32x4_widen_low_u16x8(v128_t __a) { |
| 1122 | return (v128_t)__builtin_wasm_widen_low_u_i32x4_i16x8((__i16x8)__a); | |
| 1150 | return (v128_t) __builtin_convertvector( | |
| 1151 | (__u16x4){((__u16x8)__a)[0], ((__u16x8)__a)[1], ((__u16x8)__a)[2], | |
| 1152 | ((__u16x8)__a)[3]}, | |
| 1153 | __u32x4); | |
| 1123 | 1154 | } |
| 1124 | 1155 | |
| 1125 | 1156 | static __inline__ v128_t __DEFAULT_FN_ATTRS |
| 1126 | 1157 | wasm_i32x4_widen_high_u16x8(v128_t __a) { |
| 1127 | return (v128_t)__builtin_wasm_widen_high_u_i32x4_i16x8((__i16x8)__a); | |
| 1158 | return (v128_t) __builtin_convertvector( | |
| 1159 | (__u16x4){((__u16x8)__a)[4], ((__u16x8)__a)[5], ((__u16x8)__a)[6], | |
| 1160 | ((__u16x8)__a)[7]}, | |
| 1161 | __u32x4); | |
| 1128 | 1162 | } |
| 1129 | 1163 | |
| 1130 | 1164 | // Undefine helper macros |
lib/include/x86gprintrin.h created+23| ... | ... | @@ -0,0 +1,23 @@ |
| 1 | /*===--------------- x86gprintrin.h - X86 GPR intrinsics ------------------=== | |
| 2 | * | |
| 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | * See https://llvm.org/LICENSE.txt for license information. | |
| 5 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | * | |
| 7 | *===-----------------------------------------------------------------------=== | |
| 8 | */ | |
| 9 | ||
| 10 | #ifndef __X86GPRINTRIN_H | |
| 11 | #define __X86GPRINTRIN_H | |
| 12 | ||
| 13 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ | |
| 14 | defined(__HRESET__) | |
| 15 | #include <hresetintrin.h> | |
| 16 | #endif | |
| 17 | ||
| 18 | #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ | |
| 19 | defined(__UINTR__) | |
| 20 | #include <uintrintrin.h> | |
| 21 | #endif | |
| 22 | ||
| 23 | #endif /* __X86GPRINTRIN_H */ |
lib/libcxx/include/__availability created+206| ... | ... | @@ -0,0 +1,206 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP___AVAILABILITY | |
| 11 | #define _LIBCPP___AVAILABILITY | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | ||
| 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | |
| 16 | # pragma GCC system_header | |
| 17 | #endif | |
| 18 | ||
| 19 | // Libc++ is shipped by various vendors. In particular, it is used as a system | |
| 20 | // library on macOS, iOS and other Apple platforms. In order for users to be | |
| 21 | // able to compile a binary that is intended to be deployed to an older version | |
| 22 | // of a platform, Clang provides availability attributes [1]. These attributes | |
| 23 | // can be placed on declarations and are used to describe the life cycle of a | |
| 24 | // symbol in the library. | |
| 25 | // | |
| 26 | // The main goal is to ensure a compile-time error if a symbol that hasn't been | |
| 27 | // introduced in a previously released library is used in a program that targets | |
| 28 | // that previously released library. Normally, this would be a load-time error | |
| 29 | // when one tries to launch the program against the older library. | |
| 30 | // | |
| 31 | // For example, the filesystem library was introduced in the dylib in macOS 10.15. | |
| 32 | // If a user compiles on a macOS 10.15 host but targets macOS 10.13 with their | |
| 33 | // program, the compiler would normally not complain (because the required | |
| 34 | // declarations are in the headers), but the dynamic loader would fail to find | |
| 35 | // the symbols when actually trying to launch the program on macOS 10.13. To | |
| 36 | // turn this into a compile-time issue instead, declarations are annotated with | |
| 37 | // when they were introduced, and the compiler can produce a diagnostic if the | |
| 38 | // program references something that isn't available on the deployment target. | |
| 39 | // | |
| 40 | // This mechanism is general in nature, and any vendor can add their markup to | |
| 41 | // the library (see below). Whenever a new feature is added that requires support | |
| 42 | // in the shared library, a macro should be added below to mark this feature | |
| 43 | // as unavailable. When vendors decide to ship the feature as part of their | |
| 44 | // shared library, they can update the markup appropriately. | |
| 45 | // | |
| 46 | // Note that this mechanism is disabled by default in the "upstream" libc++. | |
| 47 | // Availability annotations are only meaningful when shipping libc++ inside | |
| 48 | // a platform (i.e. as a system library), and so vendors that want them should | |
| 49 | // turn those annotations on at CMake configuration time. | |
| 50 | // | |
| 51 | // [1]: https://clang.llvm.org/docs/AttributeReference.html#availability | |
| 52 | ||
| 53 | ||
| 54 | // For backwards compatibility, allow users to define _LIBCPP_DISABLE_AVAILABILITY | |
| 55 | // for a while. | |
| 56 | #if defined(_LIBCPP_DISABLE_AVAILABILITY) | |
| 57 | # if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) | |
| 58 | # define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS | |
| 59 | # endif | |
| 60 | #endif | |
| 61 | ||
| 62 | // Availability markup is disabled when building the library, or when the compiler | |
| 63 | // doesn't support the proper attributes. | |
| 64 | #if defined(_LIBCPP_BUILDING_LIBRARY) || \ | |
| 65 | defined(_LIBCXXABI_BUILDING_LIBRARY) || \ | |
| 66 | !__has_feature(attribute_availability_with_strict) || \ | |
| 67 | !__has_feature(attribute_availability_in_templates) || \ | |
| 68 | !__has_extension(pragma_clang_attribute_external_declaration) | |
| 69 | # if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) | |
| 70 | # define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS | |
| 71 | # endif | |
| 72 | #endif | |
| 73 | ||
| 74 | #if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) | |
| 75 | ||
| 76 | // This controls the availability of std::shared_mutex and std::shared_timed_mutex, | |
| 77 | // which were added to the dylib later. | |
| 78 | # define _LIBCPP_AVAILABILITY_SHARED_MUTEX | |
| 79 | ||
| 80 | // These macros control the availability of std::bad_optional_access and | |
| 81 | // other exception types. These were put in the shared library to prevent | |
| 82 | // code bloat from every user program defining the vtable for these exception | |
| 83 | // types. | |
| 84 | # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 85 | # define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS | |
| 86 | # define _LIBCPP_AVAILABILITY_BAD_ANY_CAST | |
| 87 | ||
| 88 | // This controls the availability of std::uncaught_exceptions(). | |
| 89 | # define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS | |
| 90 | ||
| 91 | // This controls the availability of the sized version of ::operator delete, | |
| 92 | // which was added to the dylib later. | |
| 93 | # define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE | |
| 94 | ||
| 95 | // This controls the availability of the std::future_error exception. | |
| 96 | # define _LIBCPP_AVAILABILITY_FUTURE_ERROR | |
| 97 | ||
| 98 | // This controls the availability of std::type_info's vtable. | |
| 99 | // I can't imagine how using std::type_info can work at all if | |
| 100 | // this isn't supported. | |
| 101 | # define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE | |
| 102 | ||
| 103 | // This controls the availability of std::locale::category members | |
| 104 | // (e.g. std::locale::collate), which are defined in the dylib. | |
| 105 | # define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY | |
| 106 | ||
| 107 | // This controls the availability of atomic operations on std::shared_ptr | |
| 108 | // (e.g. `std::atomic_store(std::shared_ptr)`), which require a shared | |
| 109 | // lock table located in the dylib. | |
| 110 | # define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR | |
| 111 | ||
| 112 | // These macros control the availability of all parts of <filesystem> that | |
| 113 | // depend on something in the dylib. | |
| 114 | # define _LIBCPP_AVAILABILITY_FILESYSTEM | |
| 115 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH | |
| 116 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP | |
| 117 | ||
| 118 | // This controls the availability of std::to_chars. | |
| 119 | # define _LIBCPP_AVAILABILITY_TO_CHARS | |
| 120 | ||
| 121 | // This controls the availability of the C++20 synchronization library, | |
| 122 | // which requires shared library support for various operations | |
| 123 | // (see libcxx/src/atomic.cpp). | |
| 124 | # define _LIBCPP_AVAILABILITY_SYNC | |
| 125 | ||
| 126 | #elif defined(__APPLE__) | |
| 127 | ||
| 128 | # define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ | |
| 129 | __attribute__((availability(macosx,strict,introduced=10.12))) \ | |
| 130 | __attribute__((availability(ios,strict,introduced=10.0))) \ | |
| 131 | __attribute__((availability(tvos,strict,introduced=10.0))) \ | |
| 132 | __attribute__((availability(watchos,strict,introduced=3.0))) | |
| 133 | # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \ | |
| 134 | __attribute__((availability(macosx,strict,introduced=10.13))) \ | |
| 135 | __attribute__((availability(ios,strict,introduced=11.0))) \ | |
| 136 | __attribute__((availability(tvos,strict,introduced=11.0))) \ | |
| 137 | __attribute__((availability(watchos,strict,introduced=4.0))) | |
| 138 | # define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \ | |
| 139 | _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 140 | # define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \ | |
| 141 | _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 142 | # define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ | |
| 143 | __attribute__((availability(macosx,strict,introduced=10.12))) \ | |
| 144 | __attribute__((availability(ios,strict,introduced=10.0))) \ | |
| 145 | __attribute__((availability(tvos,strict,introduced=10.0))) \ | |
| 146 | __attribute__((availability(watchos,strict,introduced=3.0))) | |
| 147 | # define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ | |
| 148 | __attribute__((availability(macosx,strict,introduced=10.12))) \ | |
| 149 | __attribute__((availability(ios,strict,introduced=10.0))) \ | |
| 150 | __attribute__((availability(tvos,strict,introduced=10.0))) \ | |
| 151 | __attribute__((availability(watchos,strict,introduced=3.0))) | |
| 152 | # define _LIBCPP_AVAILABILITY_FUTURE_ERROR \ | |
| 153 | __attribute__((availability(ios,strict,introduced=6.0))) | |
| 154 | # define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \ | |
| 155 | __attribute__((availability(macosx,strict,introduced=10.9))) \ | |
| 156 | __attribute__((availability(ios,strict,introduced=7.0))) | |
| 157 | # define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \ | |
| 158 | __attribute__((availability(macosx,strict,introduced=10.9))) \ | |
| 159 | __attribute__((availability(ios,strict,introduced=7.0))) | |
| 160 | # define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ | |
| 161 | __attribute__((availability(macosx,strict,introduced=10.9))) \ | |
| 162 | __attribute__((availability(ios,strict,introduced=7.0))) | |
| 163 | # define _LIBCPP_AVAILABILITY_FILESYSTEM \ | |
| 164 | __attribute__((availability(macosx,strict,introduced=10.15))) \ | |
| 165 | __attribute__((availability(ios,strict,introduced=13.0))) \ | |
| 166 | __attribute__((availability(tvos,strict,introduced=13.0))) \ | |
| 167 | __attribute__((availability(watchos,strict,introduced=6.0))) | |
| 168 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \ | |
| 169 | _Pragma("clang attribute push(__attribute__((availability(macosx,strict,introduced=10.15))), apply_to=any(function,record))") \ | |
| 170 | _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ | |
| 171 | _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ | |
| 172 | _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") | |
| 173 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \ | |
| 174 | _Pragma("clang attribute pop") \ | |
| 175 | _Pragma("clang attribute pop") \ | |
| 176 | _Pragma("clang attribute pop") \ | |
| 177 | _Pragma("clang attribute pop") | |
| 178 | # define _LIBCPP_AVAILABILITY_TO_CHARS \ | |
| 179 | _LIBCPP_AVAILABILITY_FILESYSTEM | |
| 180 | # define _LIBCPP_AVAILABILITY_SYNC \ | |
| 181 | __attribute__((unavailable)) | |
| 182 | ||
| 183 | #else | |
| 184 | ||
| 185 | // ...New vendors can add availability markup here... | |
| 186 | ||
| 187 | # error "It looks like you're trying to enable vendor availability markup, but you haven't defined the corresponding macros yet!" | |
| 188 | ||
| 189 | #endif | |
| 190 | ||
| 191 | // Define availability attributes that depend on _LIBCPP_NO_EXCEPTIONS. | |
| 192 | // Those are defined in terms of the availability attributes above, and | |
| 193 | // should not be vendor-specific. | |
| 194 | #if defined(_LIBCPP_NO_EXCEPTIONS) | |
| 195 | # define _LIBCPP_AVAILABILITY_FUTURE | |
| 196 | # define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST | |
| 197 | # define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS | |
| 198 | # define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS | |
| 199 | #else | |
| 200 | # define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR | |
| 201 | # define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _LIBCPP_AVAILABILITY_BAD_ANY_CAST | |
| 202 | # define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 203 | # define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS | |
| 204 | #endif | |
| 205 | ||
| 206 | #endif // _LIBCPP___AVAILABILITY |
lib/libcxx/include/__bit_reference+15-15| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | #define _LIBCPP___BIT_REFERENCE |
| 12 | 12 | |
| 13 | 13 | #include <__config> |
| 14 | #include <bit> | |
| 14 | #include <__bits> | |
| 15 | 15 | #include <algorithm> |
| 16 | 16 | |
| 17 | 17 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| ... | ... | @@ -239,8 +239,8 @@ __bit_iterator<_Cp, _IsConst> |
| 239 | 239 | find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) |
| 240 | 240 | { |
| 241 | 241 | if (static_cast<bool>(__value_)) |
| 242 | return __find_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 243 | return __find_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 242 | return _VSTD::__find_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 243 | return _VSTD::__find_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | // count |
| ... | ... | @@ -313,8 +313,8 @@ typename __bit_iterator<_Cp, _IsConst>::difference_type |
| 313 | 313 | count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) |
| 314 | 314 | { |
| 315 | 315 | if (static_cast<bool>(__value_)) |
| 316 | return __count_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 317 | return __count_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 316 | return _VSTD::__count_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 317 | return _VSTD::__count_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first)); | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | // fill_n |
| ... | ... | @@ -387,9 +387,9 @@ fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __v |
| 387 | 387 | if (__n > 0) |
| 388 | 388 | { |
| 389 | 389 | if (__value_) |
| 390 | __fill_n_true(__first, __n); | |
| 390 | _VSTD::__fill_n_true(__first, __n); | |
| 391 | 391 | else |
| 392 | __fill_n_false(__first, __n); | |
| 392 | _VSTD::__fill_n_false(__first, __n); | |
| 393 | 393 | } |
| 394 | 394 | } |
| 395 | 395 | |
| ... | ... | @@ -538,8 +538,8 @@ __bit_iterator<_Cp, false> |
| 538 | 538 | copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) |
| 539 | 539 | { |
| 540 | 540 | if (__first.__ctz_ == __result.__ctz_) |
| 541 | return __copy_aligned(__first, __last, __result); | |
| 542 | return __copy_unaligned(__first, __last, __result); | |
| 541 | return _VSTD::__copy_aligned(__first, __last, __result); | |
| 542 | return _VSTD::__copy_unaligned(__first, __last, __result); | |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | // copy_backward |
| ... | ... | @@ -685,8 +685,8 @@ __bit_iterator<_Cp, false> |
| 685 | 685 | copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) |
| 686 | 686 | { |
| 687 | 687 | if (__last.__ctz_ == __result.__ctz_) |
| 688 | return __copy_backward_aligned(__first, __last, __result); | |
| 689 | return __copy_backward_unaligned(__first, __last, __result); | |
| 688 | return _VSTD::__copy_backward_aligned(__first, __last, __result); | |
| 689 | return _VSTD::__copy_backward_unaligned(__first, __last, __result); | |
| 690 | 690 | } |
| 691 | 691 | |
| 692 | 692 | // move |
| ... | ... | @@ -868,8 +868,8 @@ swap_ranges(__bit_iterator<__C1, false> __first1, __bit_iterator<__C1, false> __ |
| 868 | 868 | __bit_iterator<__C2, false> __first2) |
| 869 | 869 | { |
| 870 | 870 | if (__first1.__ctz_ == __first2.__ctz_) |
| 871 | return __swap_ranges_aligned(__first1, __last1, __first2); | |
| 872 | return __swap_ranges_unaligned(__first1, __last1, __first2); | |
| 871 | return _VSTD::__swap_ranges_aligned(__first1, __last1, __first2); | |
| 872 | return _VSTD::__swap_ranges_unaligned(__first1, __last1, __first2); | |
| 873 | 873 | } |
| 874 | 874 | |
| 875 | 875 | // rotate |
| ... | ... | @@ -1083,8 +1083,8 @@ bool |
| 1083 | 1083 | equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) |
| 1084 | 1084 | { |
| 1085 | 1085 | if (__first1.__ctz_ == __first2.__ctz_) |
| 1086 | return __equal_aligned(__first1, __last1, __first2); | |
| 1087 | return __equal_unaligned(__first1, __last1, __first2); | |
| 1086 | return _VSTD::__equal_aligned(__first1, __last1, __first2); | |
| 1087 | return _VSTD::__equal_unaligned(__first1, __last1, __first2); | |
| 1088 | 1088 | } |
| 1089 | 1089 | |
| 1090 | 1090 | template <class _Cp, bool _IsConst, |
lib/libcxx/include/__bits created+146| ... | ... | @@ -0,0 +1,146 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP___BITS | |
| 11 | #define _LIBCPP___BITS | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | ||
| 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | |
| 16 | #pragma GCC system_header | |
| 17 | #endif | |
| 18 | ||
| 19 | _LIBCPP_PUSH_MACROS | |
| 20 | #include <__undef_macros> | |
| 21 | ||
| 22 | ||
| 23 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 24 | ||
| 25 | #ifndef _LIBCPP_COMPILER_MSVC | |
| 26 | ||
| 27 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 28 | int __libcpp_ctz(unsigned __x) _NOEXCEPT { return __builtin_ctz(__x); } | |
| 29 | ||
| 30 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 31 | int __libcpp_ctz(unsigned long __x) _NOEXCEPT { return __builtin_ctzl(__x); } | |
| 32 | ||
| 33 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 34 | int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); } | |
| 35 | ||
| 36 | ||
| 37 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 38 | int __libcpp_clz(unsigned __x) _NOEXCEPT { return __builtin_clz(__x); } | |
| 39 | ||
| 40 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 41 | int __libcpp_clz(unsigned long __x) _NOEXCEPT { return __builtin_clzl(__x); } | |
| 42 | ||
| 43 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 44 | int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); } | |
| 45 | ||
| 46 | ||
| 47 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 48 | int __libcpp_popcount(unsigned __x) _NOEXCEPT { return __builtin_popcount(__x); } | |
| 49 | ||
| 50 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 51 | int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popcountl(__x); } | |
| 52 | ||
| 53 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 54 | int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); } | |
| 55 | ||
| 56 | #else // _LIBCPP_COMPILER_MSVC | |
| 57 | ||
| 58 | // Precondition: __x != 0 | |
| 59 | inline _LIBCPP_INLINE_VISIBILITY | |
| 60 | int __libcpp_ctz(unsigned __x) { | |
| 61 | static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); | |
| 62 | static_assert(sizeof(unsigned long) == 4, ""); | |
| 63 | unsigned long __where; | |
| 64 | if (_BitScanForward(&__where, __x)) | |
| 65 | return static_cast<int>(__where); | |
| 66 | return 32; | |
| 67 | } | |
| 68 | ||
| 69 | inline _LIBCPP_INLINE_VISIBILITY | |
| 70 | int __libcpp_ctz(unsigned long __x) { | |
| 71 | static_assert(sizeof(unsigned long) == sizeof(unsigned), ""); | |
| 72 | return __ctz(static_cast<unsigned>(__x)); | |
| 73 | } | |
| 74 | ||
| 75 | inline _LIBCPP_INLINE_VISIBILITY | |
| 76 | int __libcpp_ctz(unsigned long long __x) { | |
| 77 | unsigned long __where; | |
| 78 | #if defined(_LIBCPP_HAS_BITSCAN64) | |
| 79 | (defined(_M_AMD64) || defined(__x86_64__)) | |
| 80 | if (_BitScanForward64(&__where, __x)) | |
| 81 | return static_cast<int>(__where); | |
| 82 | #else | |
| 83 | // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls. | |
| 84 | if (_BitScanForward(&__where, static_cast<unsigned long>(__x))) | |
| 85 | return static_cast<int>(__where); | |
| 86 | if (_BitScanForward(&__where, static_cast<unsigned long>(__x >> 32))) | |
| 87 | return static_cast<int>(__where + 32); | |
| 88 | #endif | |
| 89 | return 64; | |
| 90 | } | |
| 91 | ||
| 92 | // Precondition: __x != 0 | |
| 93 | inline _LIBCPP_INLINE_VISIBILITY | |
| 94 | int __libcpp_clz(unsigned __x) { | |
| 95 | static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); | |
| 96 | static_assert(sizeof(unsigned long) == 4, ""); | |
| 97 | unsigned long __where; | |
| 98 | if (_BitScanReverse(&__where, __x)) | |
| 99 | return static_cast<int>(31 - __where); | |
| 100 | return 32; // Undefined Behavior. | |
| 101 | } | |
| 102 | ||
| 103 | inline _LIBCPP_INLINE_VISIBILITY | |
| 104 | int __libcpp_clz(unsigned long __x) { | |
| 105 | static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); | |
| 106 | return __libcpp_clz(static_cast<unsigned>(__x)); | |
| 107 | } | |
| 108 | ||
| 109 | inline _LIBCPP_INLINE_VISIBILITY | |
| 110 | int __libcpp_clz(unsigned long long __x) { | |
| 111 | unsigned long __where; | |
| 112 | #if defined(_LIBCPP_HAS_BITSCAN64) | |
| 113 | if (_BitScanReverse64(&__where, __x)) | |
| 114 | return static_cast<int>(63 - __where); | |
| 115 | #else | |
| 116 | // Win32 doesn't have _BitScanReverse64 so emulate it with two 32 bit calls. | |
| 117 | if (_BitScanReverse(&__where, static_cast<unsigned long>(__x >> 32))) | |
| 118 | return static_cast<int>(63 - (__where + 32)); | |
| 119 | if (_BitScanReverse(&__where, static_cast<unsigned long>(__x))) | |
| 120 | return static_cast<int>(63 - __where); | |
| 121 | #endif | |
| 122 | return 64; // Undefined Behavior. | |
| 123 | } | |
| 124 | ||
| 125 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) { | |
| 126 | static_assert(sizeof(unsigned) == 4, ""); | |
| 127 | return __popcnt(__x); | |
| 128 | } | |
| 129 | ||
| 130 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) { | |
| 131 | static_assert(sizeof(unsigned long) == 4, ""); | |
| 132 | return __popcnt(__x); | |
| 133 | } | |
| 134 | ||
| 135 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) { | |
| 136 | static_assert(sizeof(unsigned long long) == 8, ""); | |
| 137 | return __popcnt64(__x); | |
| 138 | } | |
| 139 | ||
| 140 | #endif // _LIBCPP_COMPILER_MSVC | |
| 141 | ||
| 142 | _LIBCPP_END_NAMESPACE_STD | |
| 143 | ||
| 144 | _LIBCPP_POP_MACROS | |
| 145 | ||
| 146 | #endif // _LIBCPP__BITS |
lib/libcxx/include/__config+101-203| ... | ... | @@ -32,13 +32,13 @@ |
| 32 | 32 | # define _GNUC_VER_NEW 0 |
| 33 | 33 | #endif |
| 34 | 34 | |
| 35 | #define _LIBCPP_VERSION 11000 | |
| 35 | #define _LIBCPP_VERSION 12000 | |
| 36 | 36 | |
| 37 | 37 | #ifndef _LIBCPP_ABI_VERSION |
| 38 | 38 | # define _LIBCPP_ABI_VERSION 1 |
| 39 | 39 | #endif |
| 40 | 40 | |
| 41 | #ifndef __STDC_HOSTED__ | |
| 41 | #if __STDC_HOSTED__ == 0 | |
| 42 | 42 | # define _LIBCPP_FREESTANDING |
| 43 | 43 | #endif |
| 44 | 44 | |
| ... | ... | @@ -49,8 +49,10 @@ |
| 49 | 49 | # define _LIBCPP_STD_VER 14 |
| 50 | 50 | # elif __cplusplus <= 201703L |
| 51 | 51 | # define _LIBCPP_STD_VER 17 |
| 52 | # elif __cplusplus <= 202002L | |
| 53 | # define _LIBCPP_STD_VER 20 | |
| 52 | 54 | # else |
| 53 | # define _LIBCPP_STD_VER 18 // current year, or date of c++2a ratification | |
| 55 | # define _LIBCPP_STD_VER 21 // current year, or date of c++2b ratification | |
| 54 | 56 | # endif |
| 55 | 57 | #endif // _LIBCPP_STD_VER |
| 56 | 58 | |
| ... | ... | @@ -63,7 +65,7 @@ |
| 63 | 65 | #elif defined(__wasm__) |
| 64 | 66 | # define _LIBCPP_OBJECT_FORMAT_WASM 1 |
| 65 | 67 | #else |
| 66 | # error Unknown object file format | |
| 68 | // ... add new file formats here ... | |
| 67 | 69 | #endif |
| 68 | 70 | |
| 69 | 71 | #if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 |
| ... | ... | @@ -105,6 +107,10 @@ |
| 105 | 107 | // Re-worked external template instantiations for std::string with a focus on |
| 106 | 108 | // performance and fast-path inlining. |
| 107 | 109 | # define _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION |
| 110 | // Enable clang::trivial_abi on std::unique_ptr. | |
| 111 | # define _LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI | |
| 112 | // Enable clang::trivial_abi on std::shared_ptr and std::weak_ptr | |
| 113 | # define _LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI | |
| 108 | 114 | #elif _LIBCPP_ABI_VERSION == 1 |
| 109 | 115 | # if !defined(_LIBCPP_OBJECT_FORMAT_COFF) |
| 110 | 116 | // Enable compiling copies of now inline methods into the dylib to support |
| ... | ... | @@ -121,9 +127,11 @@ |
| 121 | 127 | # endif |
| 122 | 128 | #endif |
| 123 | 129 | |
| 124 | #ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR | |
| 125 | #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ | |
| 126 | use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead | |
| 130 | #if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 | |
| 131 | // Enable additional explicit instantiations of iostreams components. This | |
| 132 | // reduces the number of weak definitions generated in programs that use | |
| 133 | // iostreams by providing a single strong definition in the shared library. | |
| 134 | # define _LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1 | |
| 127 | 135 | #endif |
| 128 | 136 | |
| 129 | 137 | #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y |
| ... | ... | @@ -256,14 +264,14 @@ |
| 256 | 264 | # endif // __LONG_LONG_SUPPORTED |
| 257 | 265 | #endif // __FreeBSD__ |
| 258 | 266 | |
| 259 | #ifdef __NetBSD__ | |
| 267 | #if defined(__NetBSD__) || defined(__OpenBSD__) | |
| 260 | 268 | # include <sys/endian.h> |
| 261 | 269 | # if _BYTE_ORDER == _LITTLE_ENDIAN |
| 262 | 270 | # define _LIBCPP_LITTLE_ENDIAN |
| 263 | 271 | # else // _BYTE_ORDER == _LITTLE_ENDIAN |
| 264 | 272 | # define _LIBCPP_BIG_ENDIAN |
| 265 | 273 | # endif // _BYTE_ORDER == _LITTLE_ENDIAN |
| 266 | #endif // __NetBSD__ | |
| 274 | #endif // defined(__NetBSD__) || defined(__OpenBSD__) | |
| 267 | 275 | |
| 268 | 276 | #if defined(_WIN32) |
| 269 | 277 | # define _LIBCPP_WIN32API |
| ... | ... | @@ -304,7 +312,7 @@ |
| 304 | 312 | # endif |
| 305 | 313 | #endif // __sun__ |
| 306 | 314 | |
| 307 | #if defined(__CloudABI__) | |
| 315 | #if defined(__OpenBSD__) || defined(__CloudABI__) | |
| 308 | 316 | // Certain architectures provide arc4random(). Prefer using |
| 309 | 317 | // arc4random() over /dev/{u,}random to make it possible to obtain |
| 310 | 318 | // random data even when using sandboxing mechanisms such as chroots, |
| ... | ... | @@ -344,13 +352,11 @@ |
| 344 | 352 | # if defined(__FreeBSD__) |
| 345 | 353 | # define _LIBCPP_HAS_ALIGNED_ALLOC |
| 346 | 354 | # define _LIBCPP_HAS_QUICK_EXIT |
| 347 | # define _LIBCPP_HAS_C11_FEATURES | |
| 348 | 355 | # if __FreeBSD_version >= 1300064 || \ |
| 349 | 356 | (__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000) |
| 350 | 357 | # define _LIBCPP_HAS_TIMESPEC_GET |
| 351 | 358 | # endif |
| 352 | 359 | # elif defined(__BIONIC__) |
| 353 | # define _LIBCPP_HAS_C11_FEATURES | |
| 354 | 360 | # if __ANDROID_API__ >= 21 |
| 355 | 361 | # define _LIBCPP_HAS_QUICK_EXIT |
| 356 | 362 | # endif |
| ... | ... | @@ -364,7 +370,9 @@ |
| 364 | 370 | # define _LIBCPP_HAS_ALIGNED_ALLOC |
| 365 | 371 | # define _LIBCPP_HAS_QUICK_EXIT |
| 366 | 372 | # define _LIBCPP_HAS_TIMESPEC_GET |
| 367 | # define _LIBCPP_HAS_C11_FEATURES | |
| 373 | # elif defined(__OpenBSD__) | |
| 374 | # define _LIBCPP_HAS_ALIGNED_ALLOC | |
| 375 | # define _LIBCPP_HAS_TIMESPEC_GET | |
| 368 | 376 | # elif defined(__linux__) |
| 369 | 377 | # if !defined(_LIBCPP_HAS_MUSL_LIBC) |
| 370 | 378 | # if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__) |
| ... | ... | @@ -372,16 +380,24 @@ |
| 372 | 380 | # endif |
| 373 | 381 | # if _LIBCPP_GLIBC_PREREQ(2, 17) |
| 374 | 382 | # define _LIBCPP_HAS_ALIGNED_ALLOC |
| 375 | # define _LIBCPP_HAS_C11_FEATURES | |
| 376 | 383 | # define _LIBCPP_HAS_TIMESPEC_GET |
| 377 | 384 | # endif |
| 378 | 385 | # else // defined(_LIBCPP_HAS_MUSL_LIBC) |
| 379 | 386 | # define _LIBCPP_HAS_ALIGNED_ALLOC |
| 380 | 387 | # define _LIBCPP_HAS_QUICK_EXIT |
| 381 | 388 | # define _LIBCPP_HAS_TIMESPEC_GET |
| 382 | # define _LIBCPP_HAS_C11_FEATURES | |
| 383 | 389 | # endif |
| 384 | # endif // __linux__ | |
| 390 | # elif defined(__APPLE__) | |
| 391 | // timespec_get and aligned_alloc were introduced in macOS 10.15 and | |
| 392 | // aligned releases | |
| 393 | # if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500 || \ | |
| 394 | __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000 || \ | |
| 395 | __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000 || \ | |
| 396 | __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000) | |
| 397 | # define _LIBCPP_HAS_ALIGNED_ALLOC | |
| 398 | # define _LIBCPP_HAS_TIMESPEC_GET | |
| 399 | # endif | |
| 400 | # endif // __APPLE__ | |
| 385 | 401 | #endif |
| 386 | 402 | |
| 387 | 403 | #ifndef _LIBCPP_CXX03_LANG |
| ... | ... | @@ -389,9 +405,7 @@ |
| 389 | 405 | #elif defined(_LIBCPP_COMPILER_CLANG) |
| 390 | 406 | # define _LIBCPP_ALIGNOF(_Tp) _Alignof(_Tp) |
| 391 | 407 | #else |
| 392 | // This definition is potentially buggy, but it's only taken with GCC in C++03, | |
| 393 | // which we barely support anyway. See llvm.org/PR39713 | |
| 394 | # define _LIBCPP_ALIGNOF(_Tp) __alignof(_Tp) | |
| 408 | # error "We don't know a correct way to implement alignof(T) in C++03 outside of Clang" | |
| 395 | 409 | #endif |
| 396 | 410 | |
| 397 | 411 | #define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp) |
| ... | ... | @@ -433,10 +447,6 @@ typedef __char32_t char32_t; |
| 433 | 447 | # define _LIBCPP_NORETURN __attribute__ ((noreturn)) |
| 434 | 448 | #endif |
| 435 | 449 | |
| 436 | #if !(__has_feature(cxx_lambdas)) | |
| 437 | #define _LIBCPP_HAS_NO_LAMBDAS | |
| 438 | #endif | |
| 439 | ||
| 440 | 450 | #if !(__has_feature(cxx_nullptr)) |
| 441 | 451 | # if (__has_extension(cxx_nullptr) || __has_keyword(__nullptr)) && defined(_LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR) |
| 442 | 452 | # define nullptr __nullptr |
| ... | ... | @@ -445,18 +455,6 @@ typedef __char32_t char32_t; |
| 445 | 455 | # endif |
| 446 | 456 | #endif |
| 447 | 457 | |
| 448 | #if !(__has_feature(cxx_rvalue_references)) | |
| 449 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 450 | #endif | |
| 451 | ||
| 452 | #if !(__has_feature(cxx_auto_type)) | |
| 453 | #define _LIBCPP_HAS_NO_AUTO_TYPE | |
| 454 | #endif | |
| 455 | ||
| 456 | #if !(__has_feature(cxx_variadic_templates)) | |
| 457 | #define _LIBCPP_HAS_NO_VARIADICS | |
| 458 | #endif | |
| 459 | ||
| 460 | 458 | // Objective-C++ features (opt-in) |
| 461 | 459 | #if __has_feature(objc_arc) |
| 462 | 460 | #define _LIBCPP_HAS_OBJC_ARC |
| ... | ... | @@ -720,7 +718,7 @@ typedef __char32_t char32_t; |
| 720 | 718 | #endif |
| 721 | 719 | |
| 722 | 720 | #ifndef _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS |
| 723 | # if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) | |
| 721 | # if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) | |
| 724 | 722 | # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__ ((__visibility__("default"))) |
| 725 | 723 | # else |
| 726 | 724 | # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS |
| ... | ... | @@ -754,16 +752,6 @@ typedef __char32_t char32_t; |
| 754 | 752 | # endif |
| 755 | 753 | #endif |
| 756 | 754 | |
| 757 | #ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION | |
| 758 | # ifdef _LIBCPP_OBJECT_FORMAT_COFF // Windows binaries can't merge typeinfos. | |
| 759 | # define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 2 | |
| 760 | # else | |
| 761 | // TODO: This isn't strictly correct on ELF platforms due to llvm.org/PR37398 | |
| 762 | // And we should consider defaulting to OFF. | |
| 763 | # define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 1 | |
| 764 | # endif | |
| 765 | #endif | |
| 766 | ||
| 767 | 755 | #ifndef _LIBCPP_HIDE_FROM_ABI |
| 768 | 756 | # if _LIBCPP_HIDE_FROM_ABI_PER_TU |
| 769 | 757 | # define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE |
| ... | ... | @@ -838,6 +826,12 @@ typedef unsigned int char32_t; |
| 838 | 826 | # define _LIBCPP_CONSTEXPR constexpr |
| 839 | 827 | #endif |
| 840 | 828 | |
| 829 | #ifndef __cpp_consteval | |
| 830 | # define _LIBCPP_CONSTEVAL _LIBCPP_CONSTEXPR | |
| 831 | #else | |
| 832 | # define _LIBCPP_CONSTEVAL consteval | |
| 833 | #endif | |
| 834 | ||
| 841 | 835 | #ifdef _LIBCPP_CXX03_LANG |
| 842 | 836 | # define _LIBCPP_DEFAULT {} |
| 843 | 837 | #else |
| ... | ... | @@ -863,10 +857,6 @@ typedef unsigned int char32_t; |
| 863 | 857 | # define _LIBCPP_EXPLICIT |
| 864 | 858 | #endif |
| 865 | 859 | |
| 866 | #if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) | |
| 867 | #define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE | |
| 868 | #endif | |
| 869 | ||
| 870 | 860 | #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS |
| 871 | 861 | # define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx |
| 872 | 862 | # define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ |
| ... | ... | @@ -880,34 +870,43 @@ typedef unsigned int char32_t; |
| 880 | 870 | # define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) |
| 881 | 871 | #endif // _LIBCPP_HAS_NO_STRONG_ENUMS |
| 882 | 872 | |
| 883 | #ifdef _LIBCPP_DEBUG | |
| 884 | # if _LIBCPP_DEBUG == 0 | |
| 885 | # define _LIBCPP_DEBUG_LEVEL 1 | |
| 886 | # elif _LIBCPP_DEBUG == 1 | |
| 887 | # define _LIBCPP_DEBUG_LEVEL 2 | |
| 888 | # else | |
| 889 | # error Supported values for _LIBCPP_DEBUG are 0 and 1 | |
| 890 | # endif | |
| 891 | # if !defined(_LIBCPP_BUILDING_LIBRARY) | |
| 892 | # define _LIBCPP_EXTERN_TEMPLATE(...) | |
| 893 | # endif | |
| 873 | // _LIBCPP_DEBUG potential values: | |
| 874 | // - undefined: No assertions. This is the default. | |
| 875 | // - 0: Basic assertions | |
| 876 | // - 1: Basic assertions + iterator validity checks. | |
| 877 | #if !defined(_LIBCPP_DEBUG) | |
| 878 | # define _LIBCPP_DEBUG_LEVEL 0 | |
| 879 | #elif _LIBCPP_DEBUG == 0 | |
| 880 | # define _LIBCPP_DEBUG_LEVEL 1 | |
| 881 | #elif _LIBCPP_DEBUG == 1 | |
| 882 | # define _LIBCPP_DEBUG_LEVEL 2 | |
| 883 | #else | |
| 884 | # error Supported values for _LIBCPP_DEBUG are 0 and 1 | |
| 894 | 885 | #endif |
| 895 | 886 | |
| 896 | #ifndef _LIBCPP_DEBUG_LEVEL | |
| 897 | # define _LIBCPP_DEBUG_LEVEL 0 | |
| 887 | // _LIBCPP_DEBUG_LEVEL is always defined to one of [0, 1, 2] at this point | |
| 888 | #if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_DISABLE_EXTERN_TEMPLATE) | |
| 889 | # define _LIBCPP_EXTERN_TEMPLATE(...) | |
| 898 | 890 | #endif |
| 899 | 891 | |
| 900 | 892 | #ifdef _LIBCPP_DISABLE_EXTERN_TEMPLATE |
| 901 | #define _LIBCPP_EXTERN_TEMPLATE(...) | |
| 902 | #define _LIBCPP_EXTERN_TEMPLATE2(...) | |
| 893 | # define _LIBCPP_EXTERN_TEMPLATE(...) | |
| 894 | # define _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(...) | |
| 903 | 895 | #endif |
| 904 | 896 | |
| 905 | 897 | #ifndef _LIBCPP_EXTERN_TEMPLATE |
| 906 | 898 | #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; |
| 907 | 899 | #endif |
| 908 | 900 | |
| 909 | #ifndef _LIBCPP_EXTERN_TEMPLATE2 | |
| 910 | #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; | |
| 901 | // When the Debug mode is enabled, we disable extern declarations because we | |
| 902 | // don't want to use the functions compiled in the library, which might not | |
| 903 | // have had the debug mode enabled when built. However, some extern declarations | |
| 904 | // need to be used, because code correctness depends on it (several instances | |
| 905 | // in the <locale>). Those special declarations are declared with | |
| 906 | // _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE, which is enabled even | |
| 907 | // when the debug mode is enabled. | |
| 908 | #ifndef _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE | |
| 909 | # define _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(...) extern template __VA_ARGS__; | |
| 911 | 910 | #endif |
| 912 | 911 | |
| 913 | 912 | #ifndef _LIBCPP_EXTERN_TEMPLATE_DEFINE |
| ... | ... | @@ -938,6 +937,8 @@ typedef unsigned int char32_t; |
| 938 | 937 | // We're deferring to Microsoft's STL to provide aligned new et al. We don't |
| 939 | 938 | // have it unless the language feature test macro is defined. |
| 940 | 939 | # define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION |
| 940 | #elif defined(__MVS__) | |
| 941 | # define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION | |
| 941 | 942 | #endif |
| 942 | 943 | |
| 943 | 944 | #if defined(__APPLE__) |
| ... | ... | @@ -999,6 +1000,18 @@ typedef unsigned int char32_t; |
| 999 | 1000 | # define _LIBCPP_DEPRECATED_IN_CXX17 |
| 1000 | 1001 | #endif |
| 1001 | 1002 | |
| 1003 | #if _LIBCPP_STD_VER > 17 | |
| 1004 | # define _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_DEPRECATED | |
| 1005 | #else | |
| 1006 | # define _LIBCPP_DEPRECATED_IN_CXX20 | |
| 1007 | #endif | |
| 1008 | ||
| 1009 | #if !defined(_LIBCPP_NO_HAS_CHAR8_T) | |
| 1010 | # define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED | |
| 1011 | #else | |
| 1012 | # define _LIBCPP_DEPRECATED_WITH_CHAR8_T | |
| 1013 | #endif | |
| 1014 | ||
| 1002 | 1015 | // Macros to enter and leave a state where deprecation warnings are suppressed. |
| 1003 | 1016 | #if !defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH) && \ |
| 1004 | 1017 | (defined(_LIBCPP_COMPILER_CLANG) || defined(_LIBCPP_COMPILER_GCC)) |
| ... | ... | @@ -1037,14 +1050,6 @@ typedef unsigned int char32_t; |
| 1037 | 1050 | # define _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 1038 | 1051 | #endif |
| 1039 | 1052 | |
| 1040 | #if _LIBCPP_STD_VER > 17 && \ | |
| 1041 | !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) && \ | |
| 1042 | !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED) | |
| 1043 | # define _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED constexpr | |
| 1044 | #else | |
| 1045 | # define _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 1046 | #endif | |
| 1047 | ||
| 1048 | 1053 | // The _LIBCPP_NODISCARD_ATTRIBUTE should only be used to define other |
| 1049 | 1054 | // NODISCARD macros to the correct attribute. |
| 1050 | 1055 | #if __has_cpp_attribute(nodiscard) || defined(_LIBCPP_COMPILER_MSVC) |
| ... | ... | @@ -1079,12 +1084,6 @@ typedef unsigned int char32_t; |
| 1079 | 1084 | # define _LIBCPP_INLINE_VAR |
| 1080 | 1085 | #endif |
| 1081 | 1086 | |
| 1082 | #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1083 | # define _LIBCPP_EXPLICIT_MOVE(x) _VSTD::move(x) | |
| 1084 | #else | |
| 1085 | # define _LIBCPP_EXPLICIT_MOVE(x) (x) | |
| 1086 | #endif | |
| 1087 | ||
| 1088 | 1087 | #ifndef _LIBCPP_CONSTEXPR_IF_NODEBUG |
| 1089 | 1088 | #if defined(_LIBCPP_DEBUG) || defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) |
| 1090 | 1089 | #define _LIBCPP_CONSTEXPR_IF_NODEBUG |
| ... | ... | @@ -1100,7 +1099,7 @@ typedef unsigned int char32_t; |
| 1100 | 1099 | #endif |
| 1101 | 1100 | |
| 1102 | 1101 | #ifndef _LIBCPP_HAS_NO_ASAN |
| 1103 | _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( | |
| 1102 | extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container( | |
| 1104 | 1103 | const void *, const void *, const void *, const void *); |
| 1105 | 1104 | #endif |
| 1106 | 1105 | |
| ... | ... | @@ -1125,11 +1124,14 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( |
| 1125 | 1124 | # if defined(__FreeBSD__) || \ |
| 1126 | 1125 | defined(__wasi__) || \ |
| 1127 | 1126 | defined(__NetBSD__) || \ |
| 1127 | defined(__OpenBSD__) || \ | |
| 1128 | defined(__NuttX__) || \ | |
| 1128 | 1129 | defined(__linux__) || \ |
| 1129 | 1130 | defined(__GNU__) || \ |
| 1130 | 1131 | defined(__APPLE__) || \ |
| 1131 | 1132 | defined(__CloudABI__) || \ |
| 1132 | 1133 | defined(__sun__) || \ |
| 1134 | defined(__MVS__) || \ | |
| 1133 | 1135 | (defined(__MINGW32__) && __has_include(<pthread.h>)) |
| 1134 | 1136 | # define _LIBCPP_HAS_THREAD_API_PTHREAD |
| 1135 | 1137 | # elif defined(__Fuchsia__) |
| ... | ... | @@ -1167,10 +1169,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( |
| 1167 | 1169 | _LIBCPP_HAS_NO_THREADS is defined. |
| 1168 | 1170 | #endif |
| 1169 | 1171 | |
| 1170 | #if defined(__STDCPP_THREADS__) && defined(_LIBCPP_HAS_NO_THREADS) | |
| 1171 | #error _LIBCPP_HAS_NO_THREADS cannot be set when __STDCPP_THREADS__ is set. | |
| 1172 | #endif | |
| 1173 | ||
| 1174 | 1172 | #if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(__STDCPP_THREADS__) |
| 1175 | 1173 | #define __STDCPP_THREADS__ 1 |
| 1176 | 1174 | #endif |
| ... | ... | @@ -1222,13 +1220,15 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( |
| 1222 | 1220 | // Some systems do not provide gets() in their C library, for security reasons. |
| 1223 | 1221 | #ifndef _LIBCPP_C_HAS_NO_GETS |
| 1224 | 1222 | # if defined(_LIBCPP_MSVCRT) || \ |
| 1225 | (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043) | |
| 1223 | (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043) || \ | |
| 1224 | defined(__OpenBSD__) | |
| 1226 | 1225 | # define _LIBCPP_C_HAS_NO_GETS |
| 1227 | 1226 | # endif |
| 1228 | 1227 | #endif |
| 1229 | 1228 | |
| 1230 | #if defined(__BIONIC__) || defined(__CloudABI__) || \ | |
| 1231 | defined(__Fuchsia__) || defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC) | |
| 1229 | #if defined(__BIONIC__) || defined(__CloudABI__) || defined(__NuttX__) || \ | |
| 1230 | defined(__Fuchsia__) || defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC) || \ | |
| 1231 | defined(__MVS__) || defined(__OpenBSD__) | |
| 1232 | 1232 | #define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE |
| 1233 | 1233 | #endif |
| 1234 | 1234 | |
| ... | ... | @@ -1337,6 +1337,12 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( |
| 1337 | 1337 | #endif |
| 1338 | 1338 | #endif // !defined(_LIBCPP_NODEBUG_TYPE) |
| 1339 | 1339 | |
| 1340 | #if __has_attribute(__preferred_name__) | |
| 1341 | #define _LIBCPP_PREFERRED_NAME(x) __attribute__((__preferred_name__(x))) | |
| 1342 | #else | |
| 1343 | #define _LIBCPP_PREFERRED_NAME(x) | |
| 1344 | #endif | |
| 1345 | ||
| 1340 | 1346 | #if defined(_LIBCPP_ABI_MICROSOFT) && \ |
| 1341 | 1347 | (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases)) |
| 1342 | 1348 | # define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases) |
| ... | ... | @@ -1367,120 +1373,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( |
| 1367 | 1373 | #define _LIBCPP_HAS_NO_SPACESHIP_OPERATOR |
| 1368 | 1374 | #endif |
| 1369 | 1375 | |
| 1370 | // Decide whether to use availability macros. | |
| 1371 | #if !defined(_LIBCPP_BUILDING_LIBRARY) && \ | |
| 1372 | !defined(_LIBCXXABI_BUILDING_LIBRARY) && \ | |
| 1373 | !defined(_LIBCPP_DISABLE_AVAILABILITY) && \ | |
| 1374 | __has_feature(attribute_availability_with_strict) && \ | |
| 1375 | __has_feature(attribute_availability_in_templates) && \ | |
| 1376 | __has_extension(pragma_clang_attribute_external_declaration) | |
| 1377 | # ifdef __APPLE__ | |
| 1378 | # define _LIBCPP_USE_AVAILABILITY_APPLE | |
| 1379 | # endif | |
| 1380 | #endif | |
| 1381 | ||
| 1382 | // Define availability macros. | |
| 1383 | #if defined(_LIBCPP_USE_AVAILABILITY_APPLE) | |
| 1384 | # define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ | |
| 1385 | __attribute__((availability(macosx,strict,introduced=10.12))) \ | |
| 1386 | __attribute__((availability(ios,strict,introduced=10.0))) \ | |
| 1387 | __attribute__((availability(tvos,strict,introduced=10.0))) \ | |
| 1388 | __attribute__((availability(watchos,strict,introduced=3.0))) | |
| 1389 | # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \ | |
| 1390 | __attribute__((availability(macosx,strict,introduced=10.13))) \ | |
| 1391 | __attribute__((availability(ios,strict,introduced=11.0))) \ | |
| 1392 | __attribute__((availability(tvos,strict,introduced=11.0))) \ | |
| 1393 | __attribute__((availability(watchos,strict,introduced=4.0))) | |
| 1394 | # define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \ | |
| 1395 | _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 1396 | # define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \ | |
| 1397 | _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 1398 | # define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ | |
| 1399 | __attribute__((availability(macosx,strict,introduced=10.12))) \ | |
| 1400 | __attribute__((availability(ios,strict,introduced=10.0))) \ | |
| 1401 | __attribute__((availability(tvos,strict,introduced=10.0))) \ | |
| 1402 | __attribute__((availability(watchos,strict,introduced=3.0))) | |
| 1403 | # define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ | |
| 1404 | __attribute__((availability(macosx,strict,introduced=10.12))) \ | |
| 1405 | __attribute__((availability(ios,strict,introduced=10.0))) \ | |
| 1406 | __attribute__((availability(tvos,strict,introduced=10.0))) \ | |
| 1407 | __attribute__((availability(watchos,strict,introduced=3.0))) | |
| 1408 | # define _LIBCPP_AVAILABILITY_FUTURE_ERROR \ | |
| 1409 | __attribute__((availability(ios,strict,introduced=6.0))) | |
| 1410 | # define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \ | |
| 1411 | __attribute__((availability(macosx,strict,introduced=10.9))) \ | |
| 1412 | __attribute__((availability(ios,strict,introduced=7.0))) | |
| 1413 | # define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \ | |
| 1414 | __attribute__((availability(macosx,strict,introduced=10.9))) \ | |
| 1415 | __attribute__((availability(ios,strict,introduced=7.0))) | |
| 1416 | # define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ | |
| 1417 | __attribute__((availability(macosx,strict,introduced=10.9))) \ | |
| 1418 | __attribute__((availability(ios,strict,introduced=7.0))) | |
| 1419 | # define _LIBCPP_AVAILABILITY_FILESYSTEM \ | |
| 1420 | __attribute__((availability(macosx,strict,introduced=10.15))) \ | |
| 1421 | __attribute__((availability(ios,strict,introduced=13.0))) \ | |
| 1422 | __attribute__((availability(tvos,strict,introduced=13.0))) \ | |
| 1423 | __attribute__((availability(watchos,strict,introduced=6.0))) | |
| 1424 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \ | |
| 1425 | _Pragma("clang attribute push(__attribute__((availability(macosx,strict,introduced=10.15))), apply_to=any(function,record))") \ | |
| 1426 | _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ | |
| 1427 | _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ | |
| 1428 | _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") | |
| 1429 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \ | |
| 1430 | _Pragma("clang attribute pop") \ | |
| 1431 | _Pragma("clang attribute pop") \ | |
| 1432 | _Pragma("clang attribute pop") \ | |
| 1433 | _Pragma("clang attribute pop") | |
| 1434 | # define _LIBCPP_AVAILABILITY_TO_CHARS \ | |
| 1435 | _LIBCPP_AVAILABILITY_FILESYSTEM | |
| 1436 | # define _LIBCPP_AVAILABILITY_SYNC \ | |
| 1437 | __attribute__((unavailable)) | |
| 1438 | #else | |
| 1439 | # define _LIBCPP_AVAILABILITY_SHARED_MUTEX | |
| 1440 | # define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS | |
| 1441 | # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 1442 | # define _LIBCPP_AVAILABILITY_BAD_ANY_CAST | |
| 1443 | # define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS | |
| 1444 | # define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE | |
| 1445 | # define _LIBCPP_AVAILABILITY_FUTURE_ERROR | |
| 1446 | # define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE | |
| 1447 | # define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY | |
| 1448 | # define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR | |
| 1449 | # define _LIBCPP_AVAILABILITY_FILESYSTEM | |
| 1450 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH | |
| 1451 | # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP | |
| 1452 | # define _LIBCPP_AVAILABILITY_TO_CHARS | |
| 1453 | # define _LIBCPP_AVAILABILITY_SYNC | |
| 1454 | #endif | |
| 1455 | ||
| 1456 | // Define availability that depends on _LIBCPP_NO_EXCEPTIONS. | |
| 1457 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 1458 | # define _LIBCPP_AVAILABILITY_FUTURE | |
| 1459 | # define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST | |
| 1460 | # define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS | |
| 1461 | # define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS | |
| 1462 | #else | |
| 1463 | # define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR | |
| 1464 | # define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _LIBCPP_AVAILABILITY_BAD_ANY_CAST | |
| 1465 | # define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS | |
| 1466 | # define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS | |
| 1467 | #endif | |
| 1468 | ||
| 1469 | // The stream API was dropped and re-added in the dylib shipped on macOS | |
| 1470 | // and iOS. We can only assume the dylib to provide these definitions for | |
| 1471 | // macosx >= 10.9 and ios >= 7.0. Otherwise, the definitions are available | |
| 1472 | // from the headers, but not from the dylib. Explicit instantiation | |
| 1473 | // declarations for streams exist conditionally to this; if we provide | |
| 1474 | // an explicit instantiation declaration and we try to deploy to a dylib | |
| 1475 | // that does not provide those symbols, we'll get a load-time error. | |
| 1476 | #if !defined(_LIBCPP_BUILDING_LIBRARY) && \ | |
| 1477 | ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ | |
| 1478 | __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) || \ | |
| 1479 | (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ | |
| 1480 | __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)) | |
| 1481 | # define _LIBCPP_DO_NOT_ASSUME_STREAMS_EXPLICIT_INSTANTIATION_IN_DYLIB | |
| 1482 | #endif | |
| 1483 | ||
| 1484 | 1376 | #if defined(_LIBCPP_COMPILER_IBM) |
| 1485 | 1377 | #define _LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO |
| 1486 | 1378 | #endif |
| ... | ... | @@ -1547,6 +1439,12 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( |
| 1547 | 1439 | #define _LIBCPP_HAS_NO_FGETPOS_FSETPOS |
| 1548 | 1440 | #endif |
| 1549 | 1441 | |
| 1442 | #if __has_attribute(init_priority) | |
| 1443 | # define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(101))) | |
| 1444 | #else | |
| 1445 | # define _LIBCPP_INIT_PRIORITY_MAX | |
| 1446 | #endif | |
| 1447 | ||
| 1550 | 1448 | #endif // __cplusplus |
| 1551 | 1449 | |
| 1552 | 1450 | #endif // _LIBCPP_CONFIG |
lib/libcxx/include/__config_site.in+4-2| ... | ... | @@ -26,12 +26,14 @@ |
| 26 | 26 | #cmakedefine _LIBCPP_HAS_THREAD_API_WIN32 |
| 27 | 27 | #cmakedefine _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL |
| 28 | 28 | #cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS |
| 29 | #cmakedefine _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS | |
| 29 | 30 | #cmakedefine _LIBCPP_NO_VCRUNTIME |
| 30 | #ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION | |
| 31 | 31 | #cmakedefine _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION@ |
| 32 | #endif | |
| 33 | 32 | #cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@ |
| 33 | #cmakedefine _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY | |
| 34 | 34 | #cmakedefine _LIBCPP_HAS_PARALLEL_ALGORITHMS |
| 35 | #cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE | |
| 36 | #cmakedefine _LIBCPP_HAS_NO_LOCALIZATION | |
| 35 | 37 | |
| 36 | 38 | @_LIBCPP_ABI_DEFINES@ |
| 37 | 39 |
lib/libcxx/include/__debug+17-22| ... | ... | @@ -27,26 +27,21 @@ |
| 27 | 27 | # include <cstddef> |
| 28 | 28 | #endif |
| 29 | 29 | |
| 30 | #if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT) | |
| 31 | # define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : \ | |
| 32 | _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) | |
| 33 | #endif | |
| 34 | ||
| 35 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 36 | #ifndef _LIBCPP_DEBUG_ASSERT | |
| 37 | #define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(x, m) | |
| 38 | #endif | |
| 39 | #define _LIBCPP_DEBUG_MODE(...) __VA_ARGS__ | |
| 40 | #endif | |
| 41 | ||
| 42 | #ifndef _LIBCPP_ASSERT | |
| 43 | # define _LIBCPP_ASSERT(x, m) ((void)0) | |
| 44 | #endif | |
| 45 | #ifndef _LIBCPP_DEBUG_ASSERT | |
| 30 | #if _LIBCPP_DEBUG_LEVEL == 0 | |
| 31 | # define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0) | |
| 32 | # define _LIBCPP_ASSERT_IMPL(x, m) ((void)0) | |
| 33 | #elif _LIBCPP_DEBUG_LEVEL == 1 | |
| 46 | 34 | # define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0) |
| 35 | # define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) | |
| 36 | #elif _LIBCPP_DEBUG_LEVEL == 2 | |
| 37 | # define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(x, m) | |
| 38 | # define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) | |
| 39 | #else | |
| 40 | # error _LIBCPP_DEBUG_LEVEL must be one of 0, 1, 2 | |
| 47 | 41 | #endif |
| 48 | #ifndef _LIBCPP_DEBUG_MODE | |
| 49 | #define _LIBCPP_DEBUG_MODE(...) ((void)0) | |
| 42 | ||
| 43 | #if !defined(_LIBCPP_ASSERT) | |
| 44 | # define _LIBCPP_ASSERT(x, m) _LIBCPP_ASSERT_IMPL(x, m) | |
| 50 | 45 | #endif |
| 51 | 46 | |
| 52 | 47 | _LIBCPP_BEGIN_NAMESPACE_STD |
| ... | ... | @@ -59,7 +54,7 @@ struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info { |
| 59 | 54 | __libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m) |
| 60 | 55 | : __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {} |
| 61 | 56 | |
| 62 | _LIBCPP_FUNC_VIS std::string what() const; | |
| 57 | _LIBCPP_FUNC_VIS string what() const; | |
| 63 | 58 | |
| 64 | 59 | const char* __file_; |
| 65 | 60 | int __line_; |
| ... | ... | @@ -83,7 +78,7 @@ void __libcpp_abort_debug_function(__libcpp_debug_info const&); |
| 83 | 78 | _LIBCPP_FUNC_VIS |
| 84 | 79 | bool __libcpp_set_debug_function(__libcpp_debug_function_type __func); |
| 85 | 80 | |
| 86 | #if _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY) | |
| 81 | #if _LIBCPP_DEBUG_LEVEL == 2 || defined(_LIBCPP_BUILDING_LIBRARY) | |
| 87 | 82 | |
| 88 | 83 | struct _LIBCPP_TYPE_VIS __c_node; |
| 89 | 84 | |
| ... | ... | @@ -226,7 +221,7 @@ public: |
| 226 | 221 | |
| 227 | 222 | template <class _Cont> |
| 228 | 223 | _LIBCPP_INLINE_VISIBILITY static __c_node* __create_C_node(void *__mem, void *__c, __c_node *__next) { |
| 229 | return ::new(__mem) _C_node<_Cont>(__c, __next); | |
| 224 | return ::new (__mem) _C_node<_Cont>(__c, __next); | |
| 230 | 225 | } |
| 231 | 226 | |
| 232 | 227 | template <class _Cont> |
| ... | ... | @@ -271,7 +266,7 @@ _LIBCPP_FUNC_VIS __libcpp_db* __get_db(); |
| 271 | 266 | _LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db(); |
| 272 | 267 | |
| 273 | 268 | |
| 274 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY) | |
| 269 | #endif // _LIBCPP_DEBUG_LEVEL == 2 || defined(_LIBCPP_BUILDING_LIBRARY) | |
| 275 | 270 | |
| 276 | 271 | _LIBCPP_END_NAMESPACE_STD |
| 277 | 272 |
lib/libcxx/include/__functional_03+24-24| ... | ... | @@ -126,7 +126,7 @@ __func<_Fp, _Alloc, _Rp()>::__clone() const |
| 126 | 126 | _Ap __a(__f_.second()); |
| 127 | 127 | typedef __allocator_destructor<_Ap> _Dp; |
| 128 | 128 | unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 129 | ::new (__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 129 | ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 130 | 130 | return __hold.release(); |
| 131 | 131 | } |
| 132 | 132 | |
| ... | ... | @@ -134,7 +134,7 @@ template<class _Fp, class _Alloc, class _Rp> |
| 134 | 134 | void |
| 135 | 135 | __func<_Fp, _Alloc, _Rp()>::__clone(__base<_Rp()>* __p) const |
| 136 | 136 | { |
| 137 | ::new (__p) __func(__f_.first(), __f_.second()); | |
| 137 | ::new ((void*)__p) __func(__f_.first(), __f_.second()); | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | template<class _Fp, class _Alloc, class _Rp> |
| ... | ... | @@ -212,7 +212,7 @@ __func<_Fp, _Alloc, _Rp(_A0)>::__clone() const |
| 212 | 212 | _Ap __a(__f_.second()); |
| 213 | 213 | typedef __allocator_destructor<_Ap> _Dp; |
| 214 | 214 | unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 215 | ::new (__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 215 | ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 216 | 216 | return __hold.release(); |
| 217 | 217 | } |
| 218 | 218 | |
| ... | ... | @@ -220,7 +220,7 @@ template<class _Fp, class _Alloc, class _Rp, class _A0> |
| 220 | 220 | void |
| 221 | 221 | __func<_Fp, _Alloc, _Rp(_A0)>::__clone(__base<_Rp(_A0)>* __p) const |
| 222 | 222 | { |
| 223 | ::new (__p) __func(__f_.first(), __f_.second()); | |
| 223 | ::new ((void*)__p) __func(__f_.first(), __f_.second()); | |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | template<class _Fp, class _Alloc, class _Rp, class _A0> |
| ... | ... | @@ -298,7 +298,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1)>::__clone() const |
| 298 | 298 | _Ap __a(__f_.second()); |
| 299 | 299 | typedef __allocator_destructor<_Ap> _Dp; |
| 300 | 300 | unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 301 | ::new (__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 301 | ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 302 | 302 | return __hold.release(); |
| 303 | 303 | } |
| 304 | 304 | |
| ... | ... | @@ -306,7 +306,7 @@ template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1> |
| 306 | 306 | void |
| 307 | 307 | __func<_Fp, _Alloc, _Rp(_A0, _A1)>::__clone(__base<_Rp(_A0, _A1)>* __p) const |
| 308 | 308 | { |
| 309 | ::new (__p) __func(__f_.first(), __f_.second()); | |
| 309 | ::new ((void*)__p) __func(__f_.first(), __f_.second()); | |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1> |
| ... | ... | @@ -384,7 +384,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::__clone() const |
| 384 | 384 | _Ap __a(__f_.second()); |
| 385 | 385 | typedef __allocator_destructor<_Ap> _Dp; |
| 386 | 386 | unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 387 | ::new (__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 387 | ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a)); | |
| 388 | 388 | return __hold.release(); |
| 389 | 389 | } |
| 390 | 390 | |
| ... | ... | @@ -392,7 +392,7 @@ template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2> |
| 392 | 392 | void |
| 393 | 393 | __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::__clone(__base<_Rp(_A0, _A1, _A2)>* __p) const |
| 394 | 394 | { |
| 395 | ::new (__p) __func(__f_.first(), __f_.second()); | |
| 395 | ::new ((void*)__p) __func(__f_.first(), __f_.second()); | |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2> |
| ... | ... | @@ -554,7 +554,7 @@ function<_Rp()>::function(_Fp __f, |
| 554 | 554 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 555 | 555 | { |
| 556 | 556 | __f_ = (__base*)&__buf_; |
| 557 | ::new (__f_) _FF(__f); | |
| 557 | ::new ((void*)__f_) _FF(__f); | |
| 558 | 558 | } |
| 559 | 559 | else |
| 560 | 560 | { |
| ... | ... | @@ -562,7 +562,7 @@ function<_Rp()>::function(_Fp __f, |
| 562 | 562 | _Ap __a; |
| 563 | 563 | typedef __allocator_destructor<_Ap> _Dp; |
| 564 | 564 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 565 | ::new (__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 565 | ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 566 | 566 | __f_ = __hold.release(); |
| 567 | 567 | } |
| 568 | 568 | } |
| ... | ... | @@ -581,7 +581,7 @@ function<_Rp()>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f, |
| 581 | 581 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 582 | 582 | { |
| 583 | 583 | __f_ = (__base*)&__buf_; |
| 584 | ::new (__f_) _FF(__f, __a0); | |
| 584 | ::new ((void*)__f_) _FF(__f, __a0); | |
| 585 | 585 | } |
| 586 | 586 | else |
| 587 | 587 | { |
| ... | ... | @@ -589,7 +589,7 @@ function<_Rp()>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f, |
| 589 | 589 | _Ap __a(__a0); |
| 590 | 590 | typedef __allocator_destructor<_Ap> _Dp; |
| 591 | 591 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 592 | ::new (__hold.get()) _FF(__f, _Alloc(__a)); | |
| 592 | ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a)); | |
| 593 | 593 | __f_ = __hold.release(); |
| 594 | 594 | } |
| 595 | 595 | } |
| ... | ... | @@ -834,7 +834,7 @@ function<_Rp(_A0)>::function(_Fp __f, |
| 834 | 834 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 835 | 835 | { |
| 836 | 836 | __f_ = (__base*)&__buf_; |
| 837 | ::new (__f_) _FF(__f); | |
| 837 | ::new ((void*)__f_) _FF(__f); | |
| 838 | 838 | } |
| 839 | 839 | else |
| 840 | 840 | { |
| ... | ... | @@ -842,7 +842,7 @@ function<_Rp(_A0)>::function(_Fp __f, |
| 842 | 842 | _Ap __a; |
| 843 | 843 | typedef __allocator_destructor<_Ap> _Dp; |
| 844 | 844 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 845 | ::new (__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 845 | ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 846 | 846 | __f_ = __hold.release(); |
| 847 | 847 | } |
| 848 | 848 | } |
| ... | ... | @@ -861,7 +861,7 @@ function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f, |
| 861 | 861 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 862 | 862 | { |
| 863 | 863 | __f_ = (__base*)&__buf_; |
| 864 | ::new (__f_) _FF(__f, __a0); | |
| 864 | ::new ((void*)__f_) _FF(__f, __a0); | |
| 865 | 865 | } |
| 866 | 866 | else |
| 867 | 867 | { |
| ... | ... | @@ -869,7 +869,7 @@ function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f, |
| 869 | 869 | _Ap __a(__a0); |
| 870 | 870 | typedef __allocator_destructor<_Ap> _Dp; |
| 871 | 871 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 872 | ::new (__hold.get()) _FF(__f, _Alloc(__a)); | |
| 872 | ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a)); | |
| 873 | 873 | __f_ = __hold.release(); |
| 874 | 874 | } |
| 875 | 875 | } |
| ... | ... | @@ -1114,7 +1114,7 @@ function<_Rp(_A0, _A1)>::function(_Fp __f, |
| 1114 | 1114 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 1115 | 1115 | { |
| 1116 | 1116 | __f_ = (__base*)&__buf_; |
| 1117 | ::new (__f_) _FF(__f); | |
| 1117 | ::new ((void*)__f_) _FF(__f); | |
| 1118 | 1118 | } |
| 1119 | 1119 | else |
| 1120 | 1120 | { |
| ... | ... | @@ -1122,7 +1122,7 @@ function<_Rp(_A0, _A1)>::function(_Fp __f, |
| 1122 | 1122 | _Ap __a; |
| 1123 | 1123 | typedef __allocator_destructor<_Ap> _Dp; |
| 1124 | 1124 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 1125 | ::new (__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 1125 | ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 1126 | 1126 | __f_ = __hold.release(); |
| 1127 | 1127 | } |
| 1128 | 1128 | } |
| ... | ... | @@ -1141,7 +1141,7 @@ function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f, |
| 1141 | 1141 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 1142 | 1142 | { |
| 1143 | 1143 | __f_ = (__base*)&__buf_; |
| 1144 | ::new (__f_) _FF(__f, __a0); | |
| 1144 | ::new ((void*)__f_) _FF(__f, __a0); | |
| 1145 | 1145 | } |
| 1146 | 1146 | else |
| 1147 | 1147 | { |
| ... | ... | @@ -1149,7 +1149,7 @@ function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f, |
| 1149 | 1149 | _Ap __a(__a0); |
| 1150 | 1150 | typedef __allocator_destructor<_Ap> _Dp; |
| 1151 | 1151 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 1152 | ::new (__hold.get()) _FF(__f, _Alloc(__a)); | |
| 1152 | ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a)); | |
| 1153 | 1153 | __f_ = __hold.release(); |
| 1154 | 1154 | } |
| 1155 | 1155 | } |
| ... | ... | @@ -1394,7 +1394,7 @@ function<_Rp(_A0, _A1, _A2)>::function(_Fp __f, |
| 1394 | 1394 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 1395 | 1395 | { |
| 1396 | 1396 | __f_ = (__base*)&__buf_; |
| 1397 | ::new (__f_) _FF(__f); | |
| 1397 | ::new ((void*)__f_) _FF(__f); | |
| 1398 | 1398 | } |
| 1399 | 1399 | else |
| 1400 | 1400 | { |
| ... | ... | @@ -1402,7 +1402,7 @@ function<_Rp(_A0, _A1, _A2)>::function(_Fp __f, |
| 1402 | 1402 | _Ap __a; |
| 1403 | 1403 | typedef __allocator_destructor<_Ap> _Dp; |
| 1404 | 1404 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 1405 | ::new (__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 1405 | ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a)); | |
| 1406 | 1406 | __f_ = __hold.release(); |
| 1407 | 1407 | } |
| 1408 | 1408 | } |
| ... | ... | @@ -1421,7 +1421,7 @@ function<_Rp(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc& __a0, _Fp |
| 1421 | 1421 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 1422 | 1422 | { |
| 1423 | 1423 | __f_ = (__base*)&__buf_; |
| 1424 | ::new (__f_) _FF(__f, __a0); | |
| 1424 | ::new ((void*)__f_) _FF(__f, __a0); | |
| 1425 | 1425 | } |
| 1426 | 1426 | else |
| 1427 | 1427 | { |
| ... | ... | @@ -1429,7 +1429,7 @@ function<_Rp(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc& __a0, _Fp |
| 1429 | 1429 | _Ap __a(__a0); |
| 1430 | 1430 | typedef __allocator_destructor<_Ap> _Dp; |
| 1431 | 1431 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 1432 | ::new (__hold.get()) _FF(__f, _Alloc(__a)); | |
| 1432 | ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a)); | |
| 1433 | 1433 | __f_ = __hold.release(); |
| 1434 | 1434 | } |
| 1435 | 1435 | } |
lib/libcxx/include/__functional_base+41-38| ... | ... | @@ -298,7 +298,7 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile> |
| 298 | 298 | template <class _Tp, class ..._Args> |
| 299 | 299 | struct __invoke_return |
| 300 | 300 | { |
| 301 | typedef decltype(__invoke(_VSTD::declval<_Tp>(), _VSTD::declval<_Args>()...)) type; | |
| 301 | typedef decltype(_VSTD::__invoke(declval<_Tp>(), declval<_Args>()...)) type; | |
| 302 | 302 | }; |
| 303 | 303 | |
| 304 | 304 | #else // defined(_LIBCPP_CXX03_LANG) |
| ... | ... | @@ -308,64 +308,64 @@ struct __invoke_return |
| 308 | 308 | #endif // !defined(_LIBCPP_CXX03_LANG) |
| 309 | 309 | |
| 310 | 310 | |
| 311 | template <class _Ret> | |
| 311 | template <class _Ret, bool = is_void<_Ret>::value> | |
| 312 | 312 | struct __invoke_void_return_wrapper |
| 313 | 313 | { |
| 314 | 314 | #ifndef _LIBCPP_CXX03_LANG |
| 315 | 315 | template <class ..._Args> |
| 316 | 316 | static _Ret __call(_Args&&... __args) { |
| 317 | return __invoke(_VSTD::forward<_Args>(__args)...); | |
| 317 | return _VSTD::__invoke(_VSTD::forward<_Args>(__args)...); | |
| 318 | 318 | } |
| 319 | 319 | #else |
| 320 | 320 | template <class _Fn> |
| 321 | 321 | static _Ret __call(_Fn __f) { |
| 322 | return __invoke(__f); | |
| 322 | return _VSTD::__invoke(__f); | |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | template <class _Fn, class _A0> |
| 326 | 326 | static _Ret __call(_Fn __f, _A0& __a0) { |
| 327 | return __invoke(__f, __a0); | |
| 327 | return _VSTD::__invoke(__f, __a0); | |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | template <class _Fn, class _A0, class _A1> |
| 331 | 331 | static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1) { |
| 332 | return __invoke(__f, __a0, __a1); | |
| 332 | return _VSTD::__invoke(__f, __a0, __a1); | |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | template <class _Fn, class _A0, class _A1, class _A2> |
| 336 | 336 | static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2){ |
| 337 | return __invoke(__f, __a0, __a1, __a2); | |
| 337 | return _VSTD::__invoke(__f, __a0, __a1, __a2); | |
| 338 | 338 | } |
| 339 | 339 | #endif |
| 340 | 340 | }; |
| 341 | 341 | |
| 342 | template <> | |
| 343 | struct __invoke_void_return_wrapper<void> | |
| 342 | template <class _Ret> | |
| 343 | struct __invoke_void_return_wrapper<_Ret, true> | |
| 344 | 344 | { |
| 345 | 345 | #ifndef _LIBCPP_CXX03_LANG |
| 346 | 346 | template <class ..._Args> |
| 347 | 347 | static void __call(_Args&&... __args) { |
| 348 | __invoke(_VSTD::forward<_Args>(__args)...); | |
| 348 | _VSTD::__invoke(_VSTD::forward<_Args>(__args)...); | |
| 349 | 349 | } |
| 350 | 350 | #else |
| 351 | 351 | template <class _Fn> |
| 352 | 352 | static void __call(_Fn __f) { |
| 353 | __invoke(__f); | |
| 353 | _VSTD::__invoke(__f); | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | template <class _Fn, class _A0> |
| 357 | 357 | static void __call(_Fn __f, _A0& __a0) { |
| 358 | __invoke(__f, __a0); | |
| 358 | _VSTD::__invoke(__f, __a0); | |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | template <class _Fn, class _A0, class _A1> |
| 362 | 362 | static void __call(_Fn __f, _A0& __a0, _A1& __a1) { |
| 363 | __invoke(__f, __a0, __a1); | |
| 363 | _VSTD::__invoke(__f, __a0, __a1); | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | template <class _Fn, class _A0, class _A1, class _A2> |
| 367 | 367 | static void __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2) { |
| 368 | __invoke(__f, __a0, __a1, __a2); | |
| 368 | _VSTD::__invoke(__f, __a0, __a1, __a2); | |
| 369 | 369 | } |
| 370 | 370 | #endif |
| 371 | 371 | }; |
| ... | ... | @@ -382,135 +382,138 @@ private: |
| 382 | 382 | |
| 383 | 383 | public: |
| 384 | 384 | // construct/copy/destroy |
| 385 | _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT | |
| 385 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 386 | reference_wrapper(type& __f) _NOEXCEPT | |
| 386 | 387 | : __f_(_VSTD::addressof(__f)) {} |
| 387 | 388 | #ifndef _LIBCPP_CXX03_LANG |
| 388 | 389 | private: reference_wrapper(type&&); public: // = delete; // do not bind to temps |
| 389 | 390 | #endif |
| 390 | 391 | |
| 391 | 392 | // access |
| 392 | _LIBCPP_INLINE_VISIBILITY operator type& () const _NOEXCEPT {return *__f_;} | |
| 393 | _LIBCPP_INLINE_VISIBILITY type& get() const _NOEXCEPT {return *__f_;} | |
| 393 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 394 | operator type&() const _NOEXCEPT {return *__f_;} | |
| 395 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 396 | type& get() const _NOEXCEPT {return *__f_;} | |
| 394 | 397 | |
| 395 | 398 | #ifndef _LIBCPP_CXX03_LANG |
| 396 | 399 | // invoke |
| 397 | 400 | template <class... _ArgTypes> |
| 398 | _LIBCPP_INLINE_VISIBILITY | |
| 401 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 399 | 402 | typename __invoke_of<type&, _ArgTypes...>::type |
| 400 | 403 | operator() (_ArgTypes&&... __args) const { |
| 401 | return __invoke(get(), _VSTD::forward<_ArgTypes>(__args)...); | |
| 404 | return _VSTD::__invoke(get(), _VSTD::forward<_ArgTypes>(__args)...); | |
| 402 | 405 | } |
| 403 | 406 | #else |
| 404 | 407 | |
| 405 | 408 | _LIBCPP_INLINE_VISIBILITY |
| 406 | 409 | typename __invoke_return<type>::type |
| 407 | 410 | operator() () const { |
| 408 | return __invoke(get()); | |
| 411 | return _VSTD::__invoke(get()); | |
| 409 | 412 | } |
| 410 | 413 | |
| 411 | 414 | template <class _A0> |
| 412 | 415 | _LIBCPP_INLINE_VISIBILITY |
| 413 | 416 | typename __invoke_return0<type, _A0>::type |
| 414 | 417 | operator() (_A0& __a0) const { |
| 415 | return __invoke(get(), __a0); | |
| 418 | return _VSTD::__invoke(get(), __a0); | |
| 416 | 419 | } |
| 417 | 420 | |
| 418 | 421 | template <class _A0> |
| 419 | 422 | _LIBCPP_INLINE_VISIBILITY |
| 420 | 423 | typename __invoke_return0<type, _A0 const>::type |
| 421 | 424 | operator() (_A0 const& __a0) const { |
| 422 | return __invoke(get(), __a0); | |
| 425 | return _VSTD::__invoke(get(), __a0); | |
| 423 | 426 | } |
| 424 | 427 | |
| 425 | 428 | template <class _A0, class _A1> |
| 426 | 429 | _LIBCPP_INLINE_VISIBILITY |
| 427 | 430 | typename __invoke_return1<type, _A0, _A1>::type |
| 428 | 431 | operator() (_A0& __a0, _A1& __a1) const { |
| 429 | return __invoke(get(), __a0, __a1); | |
| 432 | return _VSTD::__invoke(get(), __a0, __a1); | |
| 430 | 433 | } |
| 431 | 434 | |
| 432 | 435 | template <class _A0, class _A1> |
| 433 | 436 | _LIBCPP_INLINE_VISIBILITY |
| 434 | 437 | typename __invoke_return1<type, _A0 const, _A1>::type |
| 435 | 438 | operator() (_A0 const& __a0, _A1& __a1) const { |
| 436 | return __invoke(get(), __a0, __a1); | |
| 439 | return _VSTD::__invoke(get(), __a0, __a1); | |
| 437 | 440 | } |
| 438 | 441 | |
| 439 | 442 | template <class _A0, class _A1> |
| 440 | 443 | _LIBCPP_INLINE_VISIBILITY |
| 441 | 444 | typename __invoke_return1<type, _A0, _A1 const>::type |
| 442 | 445 | operator() (_A0& __a0, _A1 const& __a1) const { |
| 443 | return __invoke(get(), __a0, __a1); | |
| 446 | return _VSTD::__invoke(get(), __a0, __a1); | |
| 444 | 447 | } |
| 445 | 448 | |
| 446 | 449 | template <class _A0, class _A1> |
| 447 | 450 | _LIBCPP_INLINE_VISIBILITY |
| 448 | 451 | typename __invoke_return1<type, _A0 const, _A1 const>::type |
| 449 | 452 | operator() (_A0 const& __a0, _A1 const& __a1) const { |
| 450 | return __invoke(get(), __a0, __a1); | |
| 453 | return _VSTD::__invoke(get(), __a0, __a1); | |
| 451 | 454 | } |
| 452 | 455 | |
| 453 | 456 | template <class _A0, class _A1, class _A2> |
| 454 | 457 | _LIBCPP_INLINE_VISIBILITY |
| 455 | 458 | typename __invoke_return2<type, _A0, _A1, _A2>::type |
| 456 | 459 | operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { |
| 457 | return __invoke(get(), __a0, __a1, __a2); | |
| 460 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 458 | 461 | } |
| 459 | 462 | |
| 460 | 463 | template <class _A0, class _A1, class _A2> |
| 461 | 464 | _LIBCPP_INLINE_VISIBILITY |
| 462 | 465 | typename __invoke_return2<type, _A0 const, _A1, _A2>::type |
| 463 | 466 | operator() (_A0 const& __a0, _A1& __a1, _A2& __a2) const { |
| 464 | return __invoke(get(), __a0, __a1, __a2); | |
| 467 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 465 | 468 | } |
| 466 | 469 | |
| 467 | 470 | template <class _A0, class _A1, class _A2> |
| 468 | 471 | _LIBCPP_INLINE_VISIBILITY |
| 469 | 472 | typename __invoke_return2<type, _A0, _A1 const, _A2>::type |
| 470 | 473 | operator() (_A0& __a0, _A1 const& __a1, _A2& __a2) const { |
| 471 | return __invoke(get(), __a0, __a1, __a2); | |
| 474 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 472 | 475 | } |
| 473 | 476 | |
| 474 | 477 | template <class _A0, class _A1, class _A2> |
| 475 | 478 | _LIBCPP_INLINE_VISIBILITY |
| 476 | 479 | typename __invoke_return2<type, _A0, _A1, _A2 const>::type |
| 477 | 480 | operator() (_A0& __a0, _A1& __a1, _A2 const& __a2) const { |
| 478 | return __invoke(get(), __a0, __a1, __a2); | |
| 481 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 479 | 482 | } |
| 480 | 483 | |
| 481 | 484 | template <class _A0, class _A1, class _A2> |
| 482 | 485 | _LIBCPP_INLINE_VISIBILITY |
| 483 | 486 | typename __invoke_return2<type, _A0 const, _A1 const, _A2>::type |
| 484 | 487 | operator() (_A0 const& __a0, _A1 const& __a1, _A2& __a2) const { |
| 485 | return __invoke(get(), __a0, __a1, __a2); | |
| 488 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 486 | 489 | } |
| 487 | 490 | |
| 488 | 491 | template <class _A0, class _A1, class _A2> |
| 489 | 492 | _LIBCPP_INLINE_VISIBILITY |
| 490 | 493 | typename __invoke_return2<type, _A0 const, _A1, _A2 const>::type |
| 491 | 494 | operator() (_A0 const& __a0, _A1& __a1, _A2 const& __a2) const { |
| 492 | return __invoke(get(), __a0, __a1, __a2); | |
| 495 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 493 | 496 | } |
| 494 | 497 | |
| 495 | 498 | template <class _A0, class _A1, class _A2> |
| 496 | 499 | _LIBCPP_INLINE_VISIBILITY |
| 497 | 500 | typename __invoke_return2<type, _A0, _A1 const, _A2 const>::type |
| 498 | 501 | operator() (_A0& __a0, _A1 const& __a1, _A2 const& __a2) const { |
| 499 | return __invoke(get(), __a0, __a1, __a2); | |
| 502 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 500 | 503 | } |
| 501 | 504 | |
| 502 | 505 | template <class _A0, class _A1, class _A2> |
| 503 | 506 | _LIBCPP_INLINE_VISIBILITY |
| 504 | 507 | typename __invoke_return2<type, _A0 const, _A1 const, _A2 const>::type |
| 505 | 508 | operator() (_A0 const& __a0, _A1 const& __a1, _A2 const& __a2) const { |
| 506 | return __invoke(get(), __a0, __a1, __a2); | |
| 509 | return _VSTD::__invoke(get(), __a0, __a1, __a2); | |
| 507 | 510 | } |
| 508 | 511 | #endif // _LIBCPP_CXX03_LANG |
| 509 | 512 | }; |
| 510 | 513 | |
| 511 | 514 | |
| 512 | 515 | template <class _Tp> |
| 513 | inline _LIBCPP_INLINE_VISIBILITY | |
| 516 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 514 | 517 | reference_wrapper<_Tp> |
| 515 | 518 | ref(_Tp& __t) _NOEXCEPT |
| 516 | 519 | { |
| ... | ... | @@ -518,7 +521,7 @@ ref(_Tp& __t) _NOEXCEPT |
| 518 | 521 | } |
| 519 | 522 | |
| 520 | 523 | template <class _Tp> |
| 521 | inline _LIBCPP_INLINE_VISIBILITY | |
| 524 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 522 | 525 | reference_wrapper<_Tp> |
| 523 | 526 | ref(reference_wrapper<_Tp> __t) _NOEXCEPT |
| 524 | 527 | { |
| ... | ... | @@ -526,7 +529,7 @@ ref(reference_wrapper<_Tp> __t) _NOEXCEPT |
| 526 | 529 | } |
| 527 | 530 | |
| 528 | 531 | template <class _Tp> |
| 529 | inline _LIBCPP_INLINE_VISIBILITY | |
| 532 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 530 | 533 | reference_wrapper<const _Tp> |
| 531 | 534 | cref(const _Tp& __t) _NOEXCEPT |
| 532 | 535 | { |
| ... | ... | @@ -534,7 +537,7 @@ cref(const _Tp& __t) _NOEXCEPT |
| 534 | 537 | } |
| 535 | 538 | |
| 536 | 539 | template <class _Tp> |
| 537 | inline _LIBCPP_INLINE_VISIBILITY | |
| 540 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 538 | 541 | reference_wrapper<const _Tp> |
| 539 | 542 | cref(reference_wrapper<_Tp> __t) _NOEXCEPT |
| 540 | 543 | { |
lib/libcxx/include/__functional_base_03+12-12| ... | ... | @@ -40,7 +40,7 @@ struct __enable_invoke_imp<_Ret, _T1, false, true> { |
| 40 | 40 | template <class _Ret, class _T1> |
| 41 | 41 | struct __enable_invoke_imp<_Ret, _T1, false, false> { |
| 42 | 42 | typedef typename add_lvalue_reference< |
| 43 | typename __apply_cv<decltype(*_VSTD::declval<_T1>()), _Ret>::type | |
| 43 | typename __apply_cv<decltype(*declval<_T1>()), _Ret>::type | |
| 44 | 44 | >::type _Bullet4; |
| 45 | 45 | typedef _Bullet4 type; |
| 46 | 46 | }; |
| ... | ... | @@ -142,7 +142,7 @@ __invoke(_Fn __f, _T1& __t1) { |
| 142 | 142 | |
| 143 | 143 | template <class _Fp> |
| 144 | 144 | inline _LIBCPP_INLINE_VISIBILITY |
| 145 | decltype(_VSTD::declval<_Fp&>()()) | |
| 145 | decltype(declval<_Fp&>()()) | |
| 146 | 146 | __invoke(_Fp& __f) |
| 147 | 147 | { |
| 148 | 148 | return __f(); |
| ... | ... | @@ -150,7 +150,7 @@ __invoke(_Fp& __f) |
| 150 | 150 | |
| 151 | 151 | template <class _Fp, class _A0> |
| 152 | 152 | inline _LIBCPP_INLINE_VISIBILITY |
| 153 | decltype(_VSTD::declval<_Fp&>()(_VSTD::declval<_A0&>())) | |
| 153 | decltype(declval<_Fp&>()(declval<_A0&>())) | |
| 154 | 154 | __invoke(_Fp& __f, _A0& __a0) |
| 155 | 155 | { |
| 156 | 156 | return __f(__a0); |
| ... | ... | @@ -158,7 +158,7 @@ __invoke(_Fp& __f, _A0& __a0) |
| 158 | 158 | |
| 159 | 159 | template <class _Fp, class _A0, class _A1> |
| 160 | 160 | inline _LIBCPP_INLINE_VISIBILITY |
| 161 | decltype(_VSTD::declval<_Fp&>()(_VSTD::declval<_A0&>(), _VSTD::declval<_A1&>())) | |
| 161 | decltype(declval<_Fp&>()(declval<_A0&>(), declval<_A1&>())) | |
| 162 | 162 | __invoke(_Fp& __f, _A0& __a0, _A1& __a1) |
| 163 | 163 | { |
| 164 | 164 | return __f(__a0, __a1); |
| ... | ... | @@ -166,7 +166,7 @@ __invoke(_Fp& __f, _A0& __a0, _A1& __a1) |
| 166 | 166 | |
| 167 | 167 | template <class _Fp, class _A0, class _A1, class _A2> |
| 168 | 168 | inline _LIBCPP_INLINE_VISIBILITY |
| 169 | decltype(_VSTD::declval<_Fp&>()(_VSTD::declval<_A0&>(), _VSTD::declval<_A1&>(), _VSTD::declval<_A2&>())) | |
| 169 | decltype(declval<_Fp&>()(declval<_A0&>(), declval<_A1&>(), declval<_A2&>())) | |
| 170 | 170 | __invoke(_Fp& __f, _A0& __a0, _A1& __a1, _A2& __a2) |
| 171 | 171 | { |
| 172 | 172 | return __f(__a0, __a1, __a2); |
| ... | ... | @@ -181,13 +181,13 @@ struct __invoke_return |
| 181 | 181 | template <class _Fp> |
| 182 | 182 | struct __invoke_return<_Fp, false> |
| 183 | 183 | { |
| 184 | typedef decltype(__invoke(_VSTD::declval<_Fp&>())) type; | |
| 184 | typedef decltype(_VSTD::__invoke(declval<_Fp&>())) type; | |
| 185 | 185 | }; |
| 186 | 186 | |
| 187 | 187 | template <class _Tp, class _A0> |
| 188 | 188 | struct __invoke_return0 |
| 189 | 189 | { |
| 190 | typedef decltype(__invoke(_VSTD::declval<_Tp&>(), _VSTD::declval<_A0&>())) type; | |
| 190 | typedef decltype(_VSTD::__invoke(declval<_Tp&>(), declval<_A0&>())) type; | |
| 191 | 191 | }; |
| 192 | 192 | |
| 193 | 193 | template <class _Rp, class _Tp, class _A0> |
| ... | ... | @@ -199,8 +199,8 @@ struct __invoke_return0<_Rp _Tp::*, _A0> |
| 199 | 199 | template <class _Tp, class _A0, class _A1> |
| 200 | 200 | struct __invoke_return1 |
| 201 | 201 | { |
| 202 | typedef decltype(__invoke(_VSTD::declval<_Tp&>(), _VSTD::declval<_A0&>(), | |
| 203 | _VSTD::declval<_A1&>())) type; | |
| 202 | typedef decltype(_VSTD::__invoke(declval<_Tp&>(), declval<_A0&>(), | |
| 203 | declval<_A1&>())) type; | |
| 204 | 204 | }; |
| 205 | 205 | |
| 206 | 206 | template <class _Rp, class _Class, class _A0, class _A1> |
| ... | ... | @@ -211,9 +211,9 @@ struct __invoke_return1<_Rp _Class::*, _A0, _A1> { |
| 211 | 211 | template <class _Tp, class _A0, class _A1, class _A2> |
| 212 | 212 | struct __invoke_return2 |
| 213 | 213 | { |
| 214 | typedef decltype(__invoke(_VSTD::declval<_Tp&>(), _VSTD::declval<_A0&>(), | |
| 215 | _VSTD::declval<_A1&>(), | |
| 216 | _VSTD::declval<_A2&>())) type; | |
| 214 | typedef decltype(_VSTD::__invoke(declval<_Tp&>(), declval<_A0&>(), | |
| 215 | declval<_A1&>(), | |
| 216 | declval<_A2&>())) type; | |
| 217 | 217 | }; |
| 218 | 218 | |
| 219 | 219 | template <class _Ret, class _Class, class _A0, class _A1, class _A2> |
lib/libcxx/include/__hash_table+68-170| ... | ... | @@ -34,19 +34,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD |
| 34 | 34 | template <class _Key, class _Tp> |
| 35 | 35 | struct __hash_value_type; |
| 36 | 36 | |
| 37 | #ifndef _LIBCPP_CXX03_LANG | |
| 38 | 37 | template <class _Tp> |
| 39 | 38 | struct __is_hash_value_type_imp : false_type {}; |
| 40 | 39 | |
| 41 | 40 | template <class _Key, class _Value> |
| 42 | struct __is_hash_value_type_imp<__hash_value_type<_Key, _Value>> : true_type {}; | |
| 41 | struct __is_hash_value_type_imp<__hash_value_type<_Key, _Value> > : true_type {}; | |
| 43 | 42 | |
| 44 | 43 | template <class ..._Args> |
| 45 | 44 | struct __is_hash_value_type : false_type {}; |
| 46 | 45 | |
| 47 | 46 | template <class _One> |
| 48 | 47 | struct __is_hash_value_type<_One> : __is_hash_value_type_imp<typename __uncvref<_One>::type> {}; |
| 49 | #endif | |
| 50 | 48 | |
| 51 | 49 | _LIBCPP_FUNC_VIS |
| 52 | 50 | size_t __next_prime(size_t __n); |
| ... | ... | @@ -122,7 +120,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 122 | 120 | size_t |
| 123 | 121 | __next_hash_pow2(size_t __n) |
| 124 | 122 | { |
| 125 | return __n < 2 ? __n : (size_t(1) << (std::numeric_limits<size_t>::digits - __libcpp_clz(__n-1))); | |
| 123 | return __n < 2 ? __n : (size_t(1) << (numeric_limits<size_t>::digits - __libcpp_clz(__n-1))); | |
| 126 | 124 | } |
| 127 | 125 | |
| 128 | 126 | |
| ... | ... | @@ -155,12 +153,10 @@ struct __hash_key_value_types { |
| 155 | 153 | static __container_value_type* __get_ptr(__node_value_type& __n) { |
| 156 | 154 | return _VSTD::addressof(__n); |
| 157 | 155 | } |
| 158 | #ifndef _LIBCPP_CXX03_LANG | |
| 159 | 156 | _LIBCPP_INLINE_VISIBILITY |
| 160 | 157 | static __container_value_type&& __move(__node_value_type& __v) { |
| 161 | 158 | return _VSTD::move(__v); |
| 162 | 159 | } |
| 163 | #endif | |
| 164 | 160 | }; |
| 165 | 161 | |
| 166 | 162 | template <class _Key, class _Tp> |
| ... | ... | @@ -197,13 +193,10 @@ struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > { |
| 197 | 193 | static __container_value_type* __get_ptr(__node_value_type& __n) { |
| 198 | 194 | return _VSTD::addressof(__n.__get_value()); |
| 199 | 195 | } |
| 200 | #ifndef _LIBCPP_CXX03_LANG | |
| 201 | 196 | _LIBCPP_INLINE_VISIBILITY |
| 202 | 197 | static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) { |
| 203 | 198 | return __v.__move(); |
| 204 | 199 | } |
| 205 | #endif | |
| 206 | ||
| 207 | 200 | }; |
| 208 | 201 | |
| 209 | 202 | template <class _Tp, class _AllocPtr, class _KVTypes = __hash_key_value_types<_Tp>, |
| ... | ... | @@ -295,10 +288,12 @@ public: |
| 295 | 288 | typedef typename _NodeTypes::__node_value_type_pointer pointer; |
| 296 | 289 | |
| 297 | 290 | _LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT : __node_(nullptr) { |
| 298 | _LIBCPP_DEBUG_MODE(__get_db()->__insert_i(this)); | |
| 291 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 292 | __get_db()->__insert_i(this); | |
| 293 | #endif | |
| 299 | 294 | } |
| 300 | 295 | |
| 301 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 296 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 302 | 297 | _LIBCPP_INLINE_VISIBILITY |
| 303 | 298 | __hash_iterator(const __hash_iterator& __i) |
| 304 | 299 | : __node_(__i.__node_) |
| ... | ... | @@ -322,7 +317,7 @@ public: |
| 322 | 317 | } |
| 323 | 318 | return *this; |
| 324 | 319 | } |
| 325 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 320 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 326 | 321 | |
| 327 | 322 | _LIBCPP_INLINE_VISIBILITY |
| 328 | 323 | reference operator*() const { |
| ... | ... | @@ -364,7 +359,7 @@ public: |
| 364 | 359 | {return !(__x == __y);} |
| 365 | 360 | |
| 366 | 361 | private: |
| 367 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 362 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 368 | 363 | _LIBCPP_INLINE_VISIBILITY |
| 369 | 364 | __hash_iterator(__next_pointer __node, const void* __c) _NOEXCEPT |
| 370 | 365 | : __node_(__node) |
| ... | ... | @@ -405,17 +400,21 @@ public: |
| 405 | 400 | |
| 406 | 401 | |
| 407 | 402 | _LIBCPP_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT : __node_(nullptr) { |
| 408 | _LIBCPP_DEBUG_MODE(__get_db()->__insert_i(this)); | |
| 403 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 404 | __get_db()->__insert_i(this); | |
| 405 | #endif | |
| 409 | 406 | } |
| 410 | 407 | |
| 411 | 408 | _LIBCPP_INLINE_VISIBILITY |
| 412 | 409 | __hash_const_iterator(const __non_const_iterator& __x) _NOEXCEPT |
| 413 | 410 | : __node_(__x.__node_) |
| 414 | 411 | { |
| 415 | _LIBCPP_DEBUG_MODE(__get_db()->__iterator_copy(this, &__x)); | |
| 412 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 413 | __get_db()->__iterator_copy(this, &__x); | |
| 414 | #endif | |
| 416 | 415 | } |
| 417 | 416 | |
| 418 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 417 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 419 | 418 | _LIBCPP_INLINE_VISIBILITY |
| 420 | 419 | __hash_const_iterator(const __hash_const_iterator& __i) |
| 421 | 420 | : __node_(__i.__node_) |
| ... | ... | @@ -439,7 +438,7 @@ public: |
| 439 | 438 | } |
| 440 | 439 | return *this; |
| 441 | 440 | } |
| 442 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 441 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 443 | 442 | |
| 444 | 443 | _LIBCPP_INLINE_VISIBILITY |
| 445 | 444 | reference operator*() const { |
| ... | ... | @@ -480,7 +479,7 @@ public: |
| 480 | 479 | {return !(__x == __y);} |
| 481 | 480 | |
| 482 | 481 | private: |
| 483 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 482 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 484 | 483 | _LIBCPP_INLINE_VISIBILITY |
| 485 | 484 | __hash_const_iterator(__next_pointer __node, const void* __c) _NOEXCEPT |
| 486 | 485 | : __node_(__node) |
| ... | ... | @@ -518,10 +517,12 @@ public: |
| 518 | 517 | typedef typename _NodeTypes::__node_value_type_pointer pointer; |
| 519 | 518 | |
| 520 | 519 | _LIBCPP_INLINE_VISIBILITY __hash_local_iterator() _NOEXCEPT : __node_(nullptr) { |
| 521 | _LIBCPP_DEBUG_MODE(__get_db()->__insert_i(this)); | |
| 520 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 521 | __get_db()->__insert_i(this); | |
| 522 | #endif | |
| 522 | 523 | } |
| 523 | 524 | |
| 524 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 525 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 525 | 526 | _LIBCPP_INLINE_VISIBILITY |
| 526 | 527 | __hash_local_iterator(const __hash_local_iterator& __i) |
| 527 | 528 | : __node_(__i.__node_), |
| ... | ... | @@ -549,7 +550,7 @@ public: |
| 549 | 550 | } |
| 550 | 551 | return *this; |
| 551 | 552 | } |
| 552 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 553 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 553 | 554 | |
| 554 | 555 | _LIBCPP_INLINE_VISIBILITY |
| 555 | 556 | reference operator*() const { |
| ... | ... | @@ -593,7 +594,7 @@ public: |
| 593 | 594 | {return !(__x == __y);} |
| 594 | 595 | |
| 595 | 596 | private: |
| 596 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 597 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 597 | 598 | _LIBCPP_INLINE_VISIBILITY |
| 598 | 599 | __hash_local_iterator(__next_pointer __node, size_t __bucket, |
| 599 | 600 | size_t __bucket_count, const void* __c) _NOEXCEPT |
| ... | ... | @@ -650,7 +651,9 @@ public: |
| 650 | 651 | |
| 651 | 652 | |
| 652 | 653 | _LIBCPP_INLINE_VISIBILITY __hash_const_local_iterator() _NOEXCEPT : __node_(nullptr) { |
| 653 | _LIBCPP_DEBUG_MODE(__get_db()->__insert_i(this)); | |
| 654 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 655 | __get_db()->__insert_i(this); | |
| 656 | #endif | |
| 654 | 657 | } |
| 655 | 658 | |
| 656 | 659 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -659,10 +662,12 @@ public: |
| 659 | 662 | __bucket_(__x.__bucket_), |
| 660 | 663 | __bucket_count_(__x.__bucket_count_) |
| 661 | 664 | { |
| 662 | _LIBCPP_DEBUG_MODE(__get_db()->__iterator_copy(this, &__x)); | |
| 665 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 666 | __get_db()->__iterator_copy(this, &__x); | |
| 667 | #endif | |
| 663 | 668 | } |
| 664 | 669 | |
| 665 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 670 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 666 | 671 | _LIBCPP_INLINE_VISIBILITY |
| 667 | 672 | __hash_const_local_iterator(const __hash_const_local_iterator& __i) |
| 668 | 673 | : __node_(__i.__node_), |
| ... | ... | @@ -690,7 +695,7 @@ public: |
| 690 | 695 | } |
| 691 | 696 | return *this; |
| 692 | 697 | } |
| 693 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 698 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 694 | 699 | |
| 695 | 700 | _LIBCPP_INLINE_VISIBILITY |
| 696 | 701 | reference operator*() const { |
| ... | ... | @@ -734,7 +739,7 @@ public: |
| 734 | 739 | {return !(__x == __y);} |
| 735 | 740 | |
| 736 | 741 | private: |
| 737 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 742 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 738 | 743 | _LIBCPP_INLINE_VISIBILITY |
| 739 | 744 | __hash_const_local_iterator(__next_pointer __node, size_t __bucket, |
| 740 | 745 | size_t __bucket_count, const void* __c) _NOEXCEPT |
| ... | ... | @@ -783,7 +788,6 @@ public: |
| 783 | 788 | _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value) |
| 784 | 789 | : __data_(__size, __a) {} |
| 785 | 790 | |
| 786 | #ifndef _LIBCPP_CXX03_LANG | |
| 787 | 791 | _LIBCPP_INLINE_VISIBILITY |
| 788 | 792 | __bucket_list_deallocator(__bucket_list_deallocator&& __x) |
| 789 | 793 | _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) |
| ... | ... | @@ -791,7 +795,6 @@ public: |
| 791 | 795 | { |
| 792 | 796 | __x.size() = 0; |
| 793 | 797 | } |
| 794 | #endif | |
| 795 | 798 | |
| 796 | 799 | _LIBCPP_INLINE_VISIBILITY |
| 797 | 800 | size_type& size() _NOEXCEPT {return __data_.first();} |
| ... | ... | @@ -1007,7 +1010,6 @@ public: |
| 1007 | 1010 | explicit __hash_table(const allocator_type& __a); |
| 1008 | 1011 | __hash_table(const __hash_table& __u); |
| 1009 | 1012 | __hash_table(const __hash_table& __u, const allocator_type& __a); |
| 1010 | #ifndef _LIBCPP_CXX03_LANG | |
| 1011 | 1013 | __hash_table(__hash_table&& __u) |
| 1012 | 1014 | _NOEXCEPT_( |
| 1013 | 1015 | is_nothrow_move_constructible<__bucket_list>::value && |
| ... | ... | @@ -1016,11 +1018,9 @@ public: |
| 1016 | 1018 | is_nothrow_move_constructible<hasher>::value && |
| 1017 | 1019 | is_nothrow_move_constructible<key_equal>::value); |
| 1018 | 1020 | __hash_table(__hash_table&& __u, const allocator_type& __a); |
| 1019 | #endif // _LIBCPP_CXX03_LANG | |
| 1020 | 1021 | ~__hash_table(); |
| 1021 | 1022 | |
| 1022 | 1023 | __hash_table& operator=(const __hash_table& __u); |
| 1023 | #ifndef _LIBCPP_CXX03_LANG | |
| 1024 | 1024 | _LIBCPP_INLINE_VISIBILITY |
| 1025 | 1025 | __hash_table& operator=(__hash_table&& __u) |
| 1026 | 1026 | _NOEXCEPT_( |
| ... | ... | @@ -1028,7 +1028,6 @@ public: |
| 1028 | 1028 | is_nothrow_move_assignable<__node_allocator>::value && |
| 1029 | 1029 | is_nothrow_move_assignable<hasher>::value && |
| 1030 | 1030 | is_nothrow_move_assignable<key_equal>::value); |
| 1031 | #endif | |
| 1032 | 1031 | template <class _InputIterator> |
| 1033 | 1032 | void __assign_unique(_InputIterator __first, _InputIterator __last); |
| 1034 | 1033 | template <class _InputIterator> |
| ... | ... | @@ -1037,7 +1036,7 @@ public: |
| 1037 | 1036 | _LIBCPP_INLINE_VISIBILITY |
| 1038 | 1037 | size_type max_size() const _NOEXCEPT |
| 1039 | 1038 | { |
| 1040 | return std::min<size_type>( | |
| 1039 | return _VSTD::min<size_type>( | |
| 1041 | 1040 | __node_traits::max_size(__node_alloc()), |
| 1042 | 1041 | numeric_limits<difference_type >::max() |
| 1043 | 1042 | ); |
| ... | ... | @@ -1066,7 +1065,6 @@ public: |
| 1066 | 1065 | iterator __node_insert_multi(const_iterator __p, |
| 1067 | 1066 | __node_pointer __nd); |
| 1068 | 1067 | |
| 1069 | #ifndef _LIBCPP_CXX03_LANG | |
| 1070 | 1068 | template <class _Key, class ..._Args> |
| 1071 | 1069 | _LIBCPP_INLINE_VISIBILITY |
| 1072 | 1070 | pair<iterator, bool> __emplace_unique_key_args(_Key const& __k, _Args&&... __args); |
| ... | ... | @@ -1151,15 +1149,6 @@ public: |
| 1151 | 1149 | return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x)); |
| 1152 | 1150 | } |
| 1153 | 1151 | |
| 1154 | #else // !defined(_LIBCPP_CXX03_LANG) | |
| 1155 | template <class _Key, class _Args> | |
| 1156 | _LIBCPP_INLINE_VISIBILITY | |
| 1157 | pair<iterator, bool> __emplace_unique_key_args(_Key const&, _Args& __args); | |
| 1158 | ||
| 1159 | iterator __insert_multi(const __container_value_type& __x); | |
| 1160 | iterator __insert_multi(const_iterator __p, const __container_value_type& __x); | |
| 1161 | #endif | |
| 1162 | ||
| 1163 | 1152 | _LIBCPP_INLINE_VISIBILITY |
| 1164 | 1153 | pair<iterator, bool> __insert_unique(const __container_value_type& __x) { |
| 1165 | 1154 | return __emplace_unique_key_args(_NodeTypes::__get_key(__x), __x); |
| ... | ... | @@ -1295,7 +1284,7 @@ public: |
| 1295 | 1284 | { |
| 1296 | 1285 | _LIBCPP_ASSERT(__n < bucket_count(), |
| 1297 | 1286 | "unordered container::begin(n) called with n >= bucket_count()"); |
| 1298 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1287 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1299 | 1288 | return local_iterator(__bucket_list_[__n], __n, bucket_count(), this); |
| 1300 | 1289 | #else |
| 1301 | 1290 | return local_iterator(__bucket_list_[__n], __n, bucket_count()); |
| ... | ... | @@ -1308,7 +1297,7 @@ public: |
| 1308 | 1297 | { |
| 1309 | 1298 | _LIBCPP_ASSERT(__n < bucket_count(), |
| 1310 | 1299 | "unordered container::end(n) called with n >= bucket_count()"); |
| 1311 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1300 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1312 | 1301 | return local_iterator(nullptr, __n, bucket_count(), this); |
| 1313 | 1302 | #else |
| 1314 | 1303 | return local_iterator(nullptr, __n, bucket_count()); |
| ... | ... | @@ -1321,7 +1310,7 @@ public: |
| 1321 | 1310 | { |
| 1322 | 1311 | _LIBCPP_ASSERT(__n < bucket_count(), |
| 1323 | 1312 | "unordered container::cbegin(n) called with n >= bucket_count()"); |
| 1324 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1313 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1325 | 1314 | return const_local_iterator(__bucket_list_[__n], __n, bucket_count(), this); |
| 1326 | 1315 | #else |
| 1327 | 1316 | return const_local_iterator(__bucket_list_[__n], __n, bucket_count()); |
| ... | ... | @@ -1334,35 +1323,30 @@ public: |
| 1334 | 1323 | { |
| 1335 | 1324 | _LIBCPP_ASSERT(__n < bucket_count(), |
| 1336 | 1325 | "unordered container::cend(n) called with n >= bucket_count()"); |
| 1337 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1326 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1338 | 1327 | return const_local_iterator(nullptr, __n, bucket_count(), this); |
| 1339 | 1328 | #else |
| 1340 | 1329 | return const_local_iterator(nullptr, __n, bucket_count()); |
| 1341 | 1330 | #endif |
| 1342 | 1331 | } |
| 1343 | 1332 | |
| 1344 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1333 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1345 | 1334 | |
| 1346 | 1335 | bool __dereferenceable(const const_iterator* __i) const; |
| 1347 | 1336 | bool __decrementable(const const_iterator* __i) const; |
| 1348 | 1337 | bool __addable(const const_iterator* __i, ptrdiff_t __n) const; |
| 1349 | 1338 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const; |
| 1350 | 1339 | |
| 1351 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1340 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 1352 | 1341 | |
| 1353 | 1342 | private: |
| 1354 | 1343 | void __rehash(size_type __n); |
| 1355 | 1344 | |
| 1356 | #ifndef _LIBCPP_CXX03_LANG | |
| 1357 | 1345 | template <class ..._Args> |
| 1358 | 1346 | __node_holder __construct_node(_Args&& ...__args); |
| 1359 | 1347 | |
| 1360 | 1348 | template <class _First, class ..._Rest> |
| 1361 | 1349 | __node_holder __construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest); |
| 1362 | #else // _LIBCPP_CXX03_LANG | |
| 1363 | __node_holder __construct_node(const __container_value_type& __v); | |
| 1364 | __node_holder __construct_node_hash(size_t __hash, const __container_value_type& __v); | |
| 1365 | #endif | |
| 1366 | 1350 | |
| 1367 | 1351 | |
| 1368 | 1352 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1373,7 +1357,6 @@ private: |
| 1373 | 1357 | _LIBCPP_INLINE_VISIBILITY |
| 1374 | 1358 | void __copy_assign_alloc(const __hash_table&, false_type) {} |
| 1375 | 1359 | |
| 1376 | #ifndef _LIBCPP_CXX03_LANG | |
| 1377 | 1360 | void __move_assign(__hash_table& __u, false_type); |
| 1378 | 1361 | void __move_assign(__hash_table& __u, true_type) |
| 1379 | 1362 | _NOEXCEPT_( |
| ... | ... | @@ -1400,7 +1383,6 @@ private: |
| 1400 | 1383 | } |
| 1401 | 1384 | _LIBCPP_INLINE_VISIBILITY |
| 1402 | 1385 | void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {} |
| 1403 | #endif // _LIBCPP_CXX03_LANG | |
| 1404 | 1386 | |
| 1405 | 1387 | void __deallocate_node(__next_pointer __np) _NOEXCEPT; |
| 1406 | 1388 | __next_pointer __detach() _NOEXCEPT; |
| ... | ... | @@ -1477,8 +1459,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u, |
| 1477 | 1459 | { |
| 1478 | 1460 | } |
| 1479 | 1461 | |
| 1480 | #ifndef _LIBCPP_CXX03_LANG | |
| 1481 | ||
| 1482 | 1462 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 1483 | 1463 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u) |
| 1484 | 1464 | _NOEXCEPT_( |
| ... | ... | @@ -1526,8 +1506,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u, |
| 1526 | 1506 | } |
| 1527 | 1507 | } |
| 1528 | 1508 | |
| 1529 | #endif // _LIBCPP_CXX03_LANG | |
| 1530 | ||
| 1531 | 1509 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 1532 | 1510 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() |
| 1533 | 1511 | { |
| ... | ... | @@ -1539,7 +1517,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() |
| 1539 | 1517 | #endif |
| 1540 | 1518 | |
| 1541 | 1519 | __deallocate_node(__p1_.first().__next_); |
| 1542 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1520 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1543 | 1521 | __get_db()->__erase_c(this); |
| 1544 | 1522 | #endif |
| 1545 | 1523 | } |
| ... | ... | @@ -1583,7 +1561,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np) |
| 1583 | 1561 | while (__np != nullptr) |
| 1584 | 1562 | { |
| 1585 | 1563 | __next_pointer __next = __np->__next_; |
| 1586 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1564 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1587 | 1565 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 1588 | 1566 | for (__i_node** __p = __c->end_; __p != __c->beg_; ) |
| 1589 | 1567 | { |
| ... | ... | @@ -1593,7 +1571,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np) |
| 1593 | 1571 | { |
| 1594 | 1572 | (*__p)->__c_ = nullptr; |
| 1595 | 1573 | if (--__c->end_ != __p) |
| 1596 | memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1574 | _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1597 | 1575 | } |
| 1598 | 1576 | } |
| 1599 | 1577 | __get_db()->unlock(); |
| ... | ... | @@ -1618,8 +1596,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() _NOEXCEPT |
| 1618 | 1596 | return __cache; |
| 1619 | 1597 | } |
| 1620 | 1598 | |
| 1621 | #ifndef _LIBCPP_CXX03_LANG | |
| 1622 | ||
| 1623 | 1599 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 1624 | 1600 | void |
| 1625 | 1601 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign( |
| ... | ... | @@ -1646,7 +1622,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign( |
| 1646 | 1622 | __u.__p1_.first().__next_ = nullptr; |
| 1647 | 1623 | __u.size() = 0; |
| 1648 | 1624 | } |
| 1649 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1625 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1650 | 1626 | __get_db()->swap(this, &__u); |
| 1651 | 1627 | #endif |
| 1652 | 1628 | } |
| ... | ... | @@ -1714,8 +1690,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u) |
| 1714 | 1690 | return *this; |
| 1715 | 1691 | } |
| 1716 | 1692 | |
| 1717 | #endif // _LIBCPP_CXX03_LANG | |
| 1718 | ||
| 1719 | 1693 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 1720 | 1694 | template <class _InputIterator> |
| 1721 | 1695 | void |
| ... | ... | @@ -1800,7 +1774,7 @@ inline |
| 1800 | 1774 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator |
| 1801 | 1775 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::begin() _NOEXCEPT |
| 1802 | 1776 | { |
| 1803 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1777 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1804 | 1778 | return iterator(__p1_.first().__next_, this); |
| 1805 | 1779 | #else |
| 1806 | 1780 | return iterator(__p1_.first().__next_); |
| ... | ... | @@ -1812,7 +1786,7 @@ inline |
| 1812 | 1786 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator |
| 1813 | 1787 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::end() _NOEXCEPT |
| 1814 | 1788 | { |
| 1815 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1789 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1816 | 1790 | return iterator(nullptr, this); |
| 1817 | 1791 | #else |
| 1818 | 1792 | return iterator(nullptr); |
| ... | ... | @@ -1824,7 +1798,7 @@ inline |
| 1824 | 1798 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator |
| 1825 | 1799 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::begin() const _NOEXCEPT |
| 1826 | 1800 | { |
| 1827 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1801 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1828 | 1802 | return const_iterator(__p1_.first().__next_, this); |
| 1829 | 1803 | #else |
| 1830 | 1804 | return const_iterator(__p1_.first().__next_); |
| ... | ... | @@ -1836,7 +1810,7 @@ inline |
| 1836 | 1810 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator |
| 1837 | 1811 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::end() const _NOEXCEPT |
| 1838 | 1812 | { |
| 1839 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1813 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1840 | 1814 | return const_iterator(nullptr, this); |
| 1841 | 1815 | #else |
| 1842 | 1816 | return const_iterator(nullptr); |
| ... | ... | @@ -1945,7 +1919,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __ |
| 1945 | 1919 | __existing_node = __nd->__ptr(); |
| 1946 | 1920 | __inserted = true; |
| 1947 | 1921 | } |
| 1948 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1922 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1949 | 1923 | return pair<iterator, bool>(iterator(__existing_node, this), __inserted); |
| 1950 | 1924 | #else |
| 1951 | 1925 | return pair<iterator, bool>(iterator(__existing_node), __inserted); |
| ... | ... | @@ -1955,7 +1929,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __ |
| 1955 | 1929 | // Prepare the container for an insertion of the value __cp_val with the hash |
| 1956 | 1930 | // __cp_hash. This does a lookup into the container to see if __cp_value is |
| 1957 | 1931 | // already present, and performs a rehash if necessary. Returns a pointer to the |
| 1958 | // last occurance of __cp_val in the map. | |
| 1932 | // last occurrence of __cp_val in the map. | |
| 1959 | 1933 | // |
| 1960 | 1934 | // Note that this function does forward exceptions if key_eq() throws, and never |
| 1961 | 1935 | // mutates __value or actually inserts into the map. |
| ... | ... | @@ -2043,7 +2017,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(__node_pointer __c |
| 2043 | 2017 | __next_pointer __pn = __node_insert_multi_prepare(__cp->__hash(), __cp->__value_); |
| 2044 | 2018 | __node_insert_multi_perform(__cp, __pn); |
| 2045 | 2019 | |
| 2046 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2020 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2047 | 2021 | return iterator(__cp->__ptr(), this); |
| 2048 | 2022 | #else |
| 2049 | 2023 | return iterator(__cp->__ptr()); |
| ... | ... | @@ -2055,7 +2029,7 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator |
| 2055 | 2029 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi( |
| 2056 | 2030 | const_iterator __p, __node_pointer __cp) |
| 2057 | 2031 | { |
| 2058 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2032 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2059 | 2033 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 2060 | 2034 | "unordered container::emplace_hint(const_iterator, args...) called with an iterator not" |
| 2061 | 2035 | " referring to this unordered container"); |
| ... | ... | @@ -2078,7 +2052,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi( |
| 2078 | 2052 | __cp->__next_ = __np; |
| 2079 | 2053 | __pp->__next_ = static_cast<__next_pointer>(__cp); |
| 2080 | 2054 | ++size(); |
| 2081 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2055 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2082 | 2056 | return iterator(static_cast<__next_pointer>(__cp), this); |
| 2083 | 2057 | #else |
| 2084 | 2058 | return iterator(static_cast<__next_pointer>(__cp)); |
| ... | ... | @@ -2089,17 +2063,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi( |
| 2089 | 2063 | |
| 2090 | 2064 | |
| 2091 | 2065 | |
| 2092 | #ifndef _LIBCPP_CXX03_LANG | |
| 2093 | 2066 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2094 | 2067 | template <class _Key, class ..._Args> |
| 2095 | 2068 | pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> |
| 2096 | 2069 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args) |
| 2097 | #else | |
| 2098 | template <class _Tp, class _Hash, class _Equal, class _Alloc> | |
| 2099 | template <class _Key, class _Args> | |
| 2100 | pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> | |
| 2101 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args& __args) | |
| 2102 | #endif | |
| 2103 | 2070 | { |
| 2104 | 2071 | |
| 2105 | 2072 | size_t __hash = hash_function()(__k); |
| ... | ... | @@ -2123,11 +2090,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& |
| 2123 | 2090 | } |
| 2124 | 2091 | } |
| 2125 | 2092 | { |
| 2126 | #ifndef _LIBCPP_CXX03_LANG | |
| 2127 | 2093 | __node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...); |
| 2128 | #else | |
| 2129 | __node_holder __h = __construct_node_hash(__hash, __args); | |
| 2130 | #endif | |
| 2131 | 2094 | if (size()+1 > __bc * max_load_factor() || __bc == 0) |
| 2132 | 2095 | { |
| 2133 | 2096 | rehash(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc), |
| ... | ... | @@ -2159,15 +2122,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& |
| 2159 | 2122 | __inserted = true; |
| 2160 | 2123 | } |
| 2161 | 2124 | __done: |
| 2162 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2125 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2163 | 2126 | return pair<iterator, bool>(iterator(__nd, this), __inserted); |
| 2164 | 2127 | #else |
| 2165 | 2128 | return pair<iterator, bool>(iterator(__nd), __inserted); |
| 2166 | 2129 | #endif |
| 2167 | 2130 | } |
| 2168 | 2131 | |
| 2169 | #ifndef _LIBCPP_CXX03_LANG | |
| 2170 | ||
| 2171 | 2132 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2172 | 2133 | template <class... _Args> |
| 2173 | 2134 | pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> |
| ... | ... | @@ -2197,7 +2158,7 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator |
| 2197 | 2158 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi( |
| 2198 | 2159 | const_iterator __p, _Args&&... __args) |
| 2199 | 2160 | { |
| 2200 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2161 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2201 | 2162 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 2202 | 2163 | "unordered container::emplace_hint(const_iterator, args...) called with an iterator not" |
| 2203 | 2164 | " referring to this unordered container"); |
| ... | ... | @@ -2208,36 +2169,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi( |
| 2208 | 2169 | return __r; |
| 2209 | 2170 | } |
| 2210 | 2171 | |
| 2211 | #else // _LIBCPP_CXX03_LANG | |
| 2212 | ||
| 2213 | template <class _Tp, class _Hash, class _Equal, class _Alloc> | |
| 2214 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator | |
| 2215 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const __container_value_type& __x) | |
| 2216 | { | |
| 2217 | __node_holder __h = __construct_node(__x); | |
| 2218 | iterator __r = __node_insert_multi(__h.get()); | |
| 2219 | __h.release(); | |
| 2220 | return __r; | |
| 2221 | } | |
| 2222 | ||
| 2223 | template <class _Tp, class _Hash, class _Equal, class _Alloc> | |
| 2224 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator | |
| 2225 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p, | |
| 2226 | const __container_value_type& __x) | |
| 2227 | { | |
| 2228 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2229 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, | |
| 2230 | "unordered container::insert(const_iterator, lvalue) called with an iterator not" | |
| 2231 | " referring to this unordered container"); | |
| 2232 | #endif | |
| 2233 | __node_holder __h = __construct_node(__x); | |
| 2234 | iterator __r = __node_insert_multi(__p, __h.get()); | |
| 2235 | __h.release(); | |
| 2236 | return __r; | |
| 2237 | } | |
| 2238 | ||
| 2239 | #endif // _LIBCPP_CXX03_LANG | |
| 2240 | ||
| 2241 | 2172 | #if _LIBCPP_STD_VER > 14 |
| 2242 | 2173 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2243 | 2174 | template <class _NodeHandle, class _InsertReturnType> |
| ... | ... | @@ -2399,9 +2330,9 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2399 | 2330 | void |
| 2400 | 2331 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __nbc) |
| 2401 | 2332 | { |
| 2402 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2333 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2403 | 2334 | __get_db()->__invalidate_all(this); |
| 2404 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2335 | #endif | |
| 2405 | 2336 | __pointer_allocator& __npa = __bucket_list_.get_deleter().__alloc(); |
| 2406 | 2337 | __bucket_list_.reset(__nbc > 0 ? |
| 2407 | 2338 | __pointer_alloc_traits::allocate(__npa, __nbc) : nullptr); |
| ... | ... | @@ -2470,7 +2401,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) |
| 2470 | 2401 | { |
| 2471 | 2402 | if ((__nd->__hash() == __hash) |
| 2472 | 2403 | && key_eq()(__nd->__upcast()->__value_, __k)) |
| 2473 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2404 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2474 | 2405 | return iterator(__nd, this); |
| 2475 | 2406 | #else |
| 2476 | 2407 | return iterator(__nd); |
| ... | ... | @@ -2501,7 +2432,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const |
| 2501 | 2432 | { |
| 2502 | 2433 | if ((__nd->__hash() == __hash) |
| 2503 | 2434 | && key_eq()(__nd->__upcast()->__value_, __k)) |
| 2504 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2435 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2505 | 2436 | return const_iterator(__nd, this); |
| 2506 | 2437 | #else |
| 2507 | 2438 | return const_iterator(__nd); |
| ... | ... | @@ -2513,8 +2444,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const |
| 2513 | 2444 | return end(); |
| 2514 | 2445 | } |
| 2515 | 2446 | |
| 2516 | #ifndef _LIBCPP_CXX03_LANG | |
| 2517 | ||
| 2518 | 2447 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2519 | 2448 | template <class ..._Args> |
| 2520 | 2449 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder |
| ... | ... | @@ -2550,43 +2479,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash( |
| 2550 | 2479 | return __h; |
| 2551 | 2480 | } |
| 2552 | 2481 | |
| 2553 | #else // _LIBCPP_CXX03_LANG | |
| 2554 | ||
| 2555 | template <class _Tp, class _Hash, class _Equal, class _Alloc> | |
| 2556 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder | |
| 2557 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const __container_value_type& __v) | |
| 2558 | { | |
| 2559 | __node_allocator& __na = __node_alloc(); | |
| 2560 | __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); | |
| 2561 | __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), __v); | |
| 2562 | __h.get_deleter().__value_constructed = true; | |
| 2563 | __h->__hash_ = hash_function()(__h->__value_); | |
| 2564 | __h->__next_ = nullptr; | |
| 2565 | return _LIBCPP_EXPLICIT_MOVE(__h); // explicitly moved for C++03 | |
| 2566 | } | |
| 2567 | ||
| 2568 | template <class _Tp, class _Hash, class _Equal, class _Alloc> | |
| 2569 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder | |
| 2570 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(size_t __hash, | |
| 2571 | const __container_value_type& __v) | |
| 2572 | { | |
| 2573 | __node_allocator& __na = __node_alloc(); | |
| 2574 | __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); | |
| 2575 | __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), __v); | |
| 2576 | __h.get_deleter().__value_constructed = true; | |
| 2577 | __h->__hash_ = __hash; | |
| 2578 | __h->__next_ = nullptr; | |
| 2579 | return _LIBCPP_EXPLICIT_MOVE(__h); // explicitly moved for C++03 | |
| 2580 | } | |
| 2581 | ||
| 2582 | #endif // _LIBCPP_CXX03_LANG | |
| 2583 | ||
| 2584 | 2482 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2585 | 2483 | typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator |
| 2586 | 2484 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p) |
| 2587 | 2485 | { |
| 2588 | 2486 | __next_pointer __np = __p.__node_; |
| 2589 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2487 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2590 | 2488 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 2591 | 2489 | "unordered container erase(iterator) called with an iterator not" |
| 2592 | 2490 | " referring to this container"); |
| ... | ... | @@ -2606,7 +2504,7 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator |
| 2606 | 2504 | __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __first, |
| 2607 | 2505 | const_iterator __last) |
| 2608 | 2506 | { |
| 2609 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2507 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2610 | 2508 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__first) == this, |
| 2611 | 2509 | "unodered container::erase(iterator, iterator) called with an iterator not" |
| 2612 | 2510 | " referring to this unodered container"); |
| ... | ... | @@ -2620,7 +2518,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __first, |
| 2620 | 2518 | erase(__p); |
| 2621 | 2519 | } |
| 2622 | 2520 | __next_pointer __np = __last.__node_; |
| 2623 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2521 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2624 | 2522 | return iterator (__np, this); |
| 2625 | 2523 | #else |
| 2626 | 2524 | return iterator (__np); |
| ... | ... | @@ -2691,7 +2589,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT |
| 2691 | 2589 | __pn->__next_ = __cn->__next_; |
| 2692 | 2590 | __cn->__next_ = nullptr; |
| 2693 | 2591 | --size(); |
| 2694 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2592 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2695 | 2593 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 2696 | 2594 | for (__i_node** __dp = __c->end_; __dp != __c->beg_; ) |
| 2697 | 2595 | { |
| ... | ... | @@ -2701,7 +2599,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT |
| 2701 | 2599 | { |
| 2702 | 2600 | (*__dp)->__c_ = nullptr; |
| 2703 | 2601 | if (--__c->end_ != __dp) |
| 2704 | memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*)); | |
| 2602 | _VSTD::memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*)); | |
| 2705 | 2603 | } |
| 2706 | 2604 | } |
| 2707 | 2605 | __get_db()->unlock(); |
| ... | ... | @@ -2830,9 +2728,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u) |
| 2830 | 2728 | __u.__bucket_list_.reset(__npp); |
| 2831 | 2729 | } |
| 2832 | 2730 | _VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size()); |
| 2833 | __swap_allocator(__bucket_list_.get_deleter().__alloc(), | |
| 2731 | _VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(), | |
| 2834 | 2732 | __u.__bucket_list_.get_deleter().__alloc()); |
| 2835 | __swap_allocator(__node_alloc(), __u.__node_alloc()); | |
| 2733 | _VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc()); | |
| 2836 | 2734 | _VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_); |
| 2837 | 2735 | __p2_.swap(__u.__p2_); |
| 2838 | 2736 | __p3_.swap(__u.__p3_); |
| ... | ... | @@ -2842,7 +2740,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u) |
| 2842 | 2740 | if (__u.size() > 0) |
| 2843 | 2741 | __u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash(), __u.bucket_count())] = |
| 2844 | 2742 | __u.__p1_.first().__ptr(); |
| 2845 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2743 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2846 | 2744 | __get_db()->swap(this, &__u); |
| 2847 | 2745 | #endif |
| 2848 | 2746 | } |
| ... | ... | @@ -2876,7 +2774,7 @@ swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x, |
| 2876 | 2774 | __x.swap(__y); |
| 2877 | 2775 | } |
| 2878 | 2776 | |
| 2879 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2777 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2880 | 2778 | |
| 2881 | 2779 | template <class _Tp, class _Hash, class _Equal, class _Alloc> |
| 2882 | 2780 | bool |
| ... | ... | @@ -2906,7 +2804,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__subscriptable(const const_iterator*, |
| 2906 | 2804 | return false; |
| 2907 | 2805 | } |
| 2908 | 2806 | |
| 2909 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2807 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 2910 | 2808 | |
| 2911 | 2809 | _LIBCPP_END_NAMESPACE_STD |
| 2912 | 2810 |
lib/libcxx/include/__libcpp_version+1-1| ... | ... | @@ -1 +1 @@ |
| 1 | 11000 | |
| 1 | 12000 |
lib/libcxx/include/__locale+244-44| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | #define _LIBCPP___LOCALE |
| 12 | 12 | |
| 13 | 13 | #include <__config> |
| 14 | #include <__availability> | |
| 14 | 15 | #include <string> |
| 15 | 16 | #include <memory> |
| 16 | 17 | #include <utility> |
| ... | ... | @@ -20,26 +21,30 @@ |
| 20 | 21 | #include <locale.h> |
| 21 | 22 | #if defined(_LIBCPP_MSVCRT_LIKE) |
| 22 | 23 | # include <cstring> |
| 23 | # include <support/win32/locale_win32.h> | |
| 24 | #elif defined(_AIX) | |
| 25 | # include <support/ibm/xlocale.h> | |
| 24 | # include <__support/win32/locale_win32.h> | |
| 25 | #elif defined(__NuttX__) | |
| 26 | # include <__support/nuttx/xlocale.h> | |
| 27 | #elif defined(_AIX) || defined(__MVS__) | |
| 28 | # include <__support/ibm/xlocale.h> | |
| 26 | 29 | #elif defined(__ANDROID__) |
| 27 | # include <support/android/locale_bionic.h> | |
| 30 | # include <__support/android/locale_bionic.h> | |
| 28 | 31 | #elif defined(__sun__) |
| 29 | 32 | # include <xlocale.h> |
| 30 | # include <support/solaris/xlocale.h> | |
| 33 | # include <__support/solaris/xlocale.h> | |
| 31 | 34 | #elif defined(_NEWLIB_VERSION) |
| 32 | # include <support/newlib/xlocale.h> | |
| 35 | # include <__support/newlib/xlocale.h> | |
| 36 | #elif defined(__OpenBSD__) | |
| 37 | # include <__support/openbsd/xlocale.h> | |
| 33 | 38 | #elif (defined(__APPLE__) || defined(__FreeBSD__) \ |
| 34 | 39 | || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) |
| 35 | 40 | # include <xlocale.h> |
| 36 | 41 | #elif defined(__Fuchsia__) |
| 37 | # include <support/fuchsia/xlocale.h> | |
| 42 | # include <__support/fuchsia/xlocale.h> | |
| 38 | 43 | #elif defined(__wasi__) |
| 39 | 44 | // WASI libc uses musl's locales support. |
| 40 | # include <support/musl/xlocale.h> | |
| 45 | # include <__support/musl/xlocale.h> | |
| 41 | 46 | #elif defined(_LIBCPP_HAS_MUSL_LIBC) |
| 42 | # include <support/musl/xlocale.h> | |
| 47 | # include <__support/musl/xlocale.h> | |
| 43 | 48 | #endif |
| 44 | 49 | |
| 45 | 50 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| ... | ... | @@ -76,7 +81,7 @@ struct __libcpp_locale_guard { |
| 76 | 81 | // locale name, otherwise it will be a semicolon-separated string listing |
| 77 | 82 | // each category. In the second case, we know at least one category won't |
| 78 | 83 | // be what we want, so we only have to check the first case. |
| 79 | if (strcmp(__l.__get_locale(), __lc) != 0) { | |
| 84 | if (_VSTD::strcmp(__l.__get_locale(), __lc) != 0) { | |
| 80 | 85 | __locale_all = _strdup(__lc); |
| 81 | 86 | if (__locale_all == nullptr) |
| 82 | 87 | __throw_bad_alloc(); |
| ... | ... | @@ -105,7 +110,6 @@ struct __libcpp_locale_guard { |
| 105 | 110 | }; |
| 106 | 111 | #endif |
| 107 | 112 | |
| 108 | ||
| 109 | 113 | class _LIBCPP_TYPE_VIS locale; |
| 110 | 114 | |
| 111 | 115 | template <class _Facet> |
| ... | ... | @@ -335,8 +339,8 @@ collate<_CharT>::do_hash(const char_type* __lo, const char_type* __hi) const |
| 335 | 339 | return static_cast<long>(__h); |
| 336 | 340 | } |
| 337 | 341 | |
| 338 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>) | |
| 339 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>) | |
| 342 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>) | |
| 343 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>) | |
| 340 | 344 | |
| 341 | 345 | // template <class CharT> class collate_byname; |
| 342 | 346 | |
| ... | ... | @@ -396,7 +400,26 @@ locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x, |
| 396 | 400 | class _LIBCPP_TYPE_VIS ctype_base |
| 397 | 401 | { |
| 398 | 402 | public: |
| 399 | #if defined(__GLIBC__) | |
| 403 | #if defined(_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE) | |
| 404 | typedef unsigned long mask; | |
| 405 | static const mask space = 1<<0; | |
| 406 | static const mask print = 1<<1; | |
| 407 | static const mask cntrl = 1<<2; | |
| 408 | static const mask upper = 1<<3; | |
| 409 | static const mask lower = 1<<4; | |
| 410 | static const mask alpha = 1<<5; | |
| 411 | static const mask digit = 1<<6; | |
| 412 | static const mask punct = 1<<7; | |
| 413 | static const mask xdigit = 1<<8; | |
| 414 | static const mask blank = 1<<9; | |
| 415 | #if defined(__BIONIC__) | |
| 416 | // Historically this was a part of regex_traits rather than ctype_base. The | |
| 417 | // historical value of the constant is preserved for ABI compatibility. | |
| 418 | static const mask __regex_word = 0x8000; | |
| 419 | #else | |
| 420 | static const mask __regex_word = 1<<10; | |
| 421 | #endif // defined(__BIONIC__) | |
| 422 | #elif defined(__GLIBC__) | |
| 400 | 423 | typedef unsigned short mask; |
| 401 | 424 | static const mask space = _ISspace; |
| 402 | 425 | static const mask print = _ISprint; |
| ... | ... | @@ -485,24 +508,7 @@ public: |
| 485 | 508 | # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA |
| 486 | 509 | # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT |
| 487 | 510 | #else |
| 488 | typedef unsigned long mask; | |
| 489 | static const mask space = 1<<0; | |
| 490 | static const mask print = 1<<1; | |
| 491 | static const mask cntrl = 1<<2; | |
| 492 | static const mask upper = 1<<3; | |
| 493 | static const mask lower = 1<<4; | |
| 494 | static const mask alpha = 1<<5; | |
| 495 | static const mask digit = 1<<6; | |
| 496 | static const mask punct = 1<<7; | |
| 497 | static const mask xdigit = 1<<8; | |
| 498 | static const mask blank = 1<<9; | |
| 499 | #if defined(__BIONIC__) | |
| 500 | // Historically this was a part of regex_traits rather than ctype_base. The | |
| 501 | // historical value of the constant is preserved for ABI compatibility. | |
| 502 | static const mask __regex_word = 0x8000; | |
| 503 | #else | |
| 504 | static const mask __regex_word = 1<<10; | |
| 505 | #endif // defined(__BIONIC__) | |
| 511 | # error unknown rune table for this platform -- do you mean to define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE? | |
| 506 | 512 | #endif |
| 507 | 513 | static const mask alnum = alpha | digit; |
| 508 | 514 | static const mask graph = alnum | punct; |
| ... | ... | @@ -623,7 +629,7 @@ class _LIBCPP_TYPE_VIS ctype<char> |
| 623 | 629 | public: |
| 624 | 630 | typedef char char_type; |
| 625 | 631 | |
| 626 | explicit ctype(const mask* __tab = 0, bool __del = false, size_t __refs = 0); | |
| 632 | explicit ctype(const mask* __tab = nullptr, bool __del = false, size_t __refs = 0); | |
| 627 | 633 | |
| 628 | 634 | _LIBCPP_INLINE_VISIBILITY |
| 629 | 635 | bool is(mask __m, char_type __c) const |
| ... | ... | @@ -1069,10 +1075,10 @@ protected: |
| 1069 | 1075 | virtual int do_max_length() const _NOEXCEPT; |
| 1070 | 1076 | }; |
| 1071 | 1077 | |
| 1072 | // template <> class codecvt<char16_t, char, mbstate_t> | |
| 1078 | // template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20 | |
| 1073 | 1079 | |
| 1074 | 1080 | template <> |
| 1075 | class _LIBCPP_TYPE_VIS codecvt<char16_t, char, mbstate_t> | |
| 1081 | class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_TYPE_VIS codecvt<char16_t, char, mbstate_t> | |
| 1076 | 1082 | : public locale::facet, |
| 1077 | 1083 | public codecvt_base |
| 1078 | 1084 | { |
| ... | ... | @@ -1155,10 +1161,100 @@ protected: |
| 1155 | 1161 | virtual int do_max_length() const _NOEXCEPT; |
| 1156 | 1162 | }; |
| 1157 | 1163 | |
| 1158 | // template <> class codecvt<char32_t, char, mbstate_t> | |
| 1164 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1165 | ||
| 1166 | // template <> class codecvt<char16_t, char8_t, mbstate_t> // C++20 | |
| 1159 | 1167 | |
| 1160 | 1168 | template <> |
| 1161 | class _LIBCPP_TYPE_VIS codecvt<char32_t, char, mbstate_t> | |
| 1169 | class _LIBCPP_TYPE_VIS codecvt<char16_t, char8_t, mbstate_t> | |
| 1170 | : public locale::facet, | |
| 1171 | public codecvt_base | |
| 1172 | { | |
| 1173 | public: | |
| 1174 | typedef char16_t intern_type; | |
| 1175 | typedef char8_t extern_type; | |
| 1176 | typedef mbstate_t state_type; | |
| 1177 | ||
| 1178 | _LIBCPP_INLINE_VISIBILITY | |
| 1179 | explicit codecvt(size_t __refs = 0) | |
| 1180 | : locale::facet(__refs) {} | |
| 1181 | ||
| 1182 | _LIBCPP_INLINE_VISIBILITY | |
| 1183 | result out(state_type& __st, | |
| 1184 | const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, | |
| 1185 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const | |
| 1186 | { | |
| 1187 | return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt); | |
| 1188 | } | |
| 1189 | ||
| 1190 | _LIBCPP_INLINE_VISIBILITY | |
| 1191 | result unshift(state_type& __st, | |
| 1192 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const | |
| 1193 | { | |
| 1194 | return do_unshift(__st, __to, __to_end, __to_nxt); | |
| 1195 | } | |
| 1196 | ||
| 1197 | _LIBCPP_INLINE_VISIBILITY | |
| 1198 | result in(state_type& __st, | |
| 1199 | const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, | |
| 1200 | intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const | |
| 1201 | { | |
| 1202 | return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt); | |
| 1203 | } | |
| 1204 | ||
| 1205 | _LIBCPP_INLINE_VISIBILITY | |
| 1206 | int encoding() const _NOEXCEPT | |
| 1207 | { | |
| 1208 | return do_encoding(); | |
| 1209 | } | |
| 1210 | ||
| 1211 | _LIBCPP_INLINE_VISIBILITY | |
| 1212 | bool always_noconv() const _NOEXCEPT | |
| 1213 | { | |
| 1214 | return do_always_noconv(); | |
| 1215 | } | |
| 1216 | ||
| 1217 | _LIBCPP_INLINE_VISIBILITY | |
| 1218 | int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const | |
| 1219 | { | |
| 1220 | return do_length(__st, __frm, __end, __mx); | |
| 1221 | } | |
| 1222 | ||
| 1223 | _LIBCPP_INLINE_VISIBILITY | |
| 1224 | int max_length() const _NOEXCEPT | |
| 1225 | { | |
| 1226 | return do_max_length(); | |
| 1227 | } | |
| 1228 | ||
| 1229 | static locale::id id; | |
| 1230 | ||
| 1231 | protected: | |
| 1232 | _LIBCPP_INLINE_VISIBILITY | |
| 1233 | explicit codecvt(const char*, size_t __refs = 0) | |
| 1234 | : locale::facet(__refs) {} | |
| 1235 | ||
| 1236 | ~codecvt(); | |
| 1237 | ||
| 1238 | virtual result do_out(state_type& __st, | |
| 1239 | const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, | |
| 1240 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; | |
| 1241 | virtual result do_in(state_type& __st, | |
| 1242 | const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, | |
| 1243 | intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; | |
| 1244 | virtual result do_unshift(state_type& __st, | |
| 1245 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; | |
| 1246 | virtual int do_encoding() const _NOEXCEPT; | |
| 1247 | virtual bool do_always_noconv() const _NOEXCEPT; | |
| 1248 | virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; | |
| 1249 | virtual int do_max_length() const _NOEXCEPT; | |
| 1250 | }; | |
| 1251 | ||
| 1252 | #endif | |
| 1253 | ||
| 1254 | // template <> class codecvt<char32_t, char, mbstate_t> // deprecated in C++20 | |
| 1255 | ||
| 1256 | template <> | |
| 1257 | class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_TYPE_VIS codecvt<char32_t, char, mbstate_t> | |
| 1162 | 1258 | : public locale::facet, |
| 1163 | 1259 | public codecvt_base |
| 1164 | 1260 | { |
| ... | ... | @@ -1241,6 +1337,96 @@ protected: |
| 1241 | 1337 | virtual int do_max_length() const _NOEXCEPT; |
| 1242 | 1338 | }; |
| 1243 | 1339 | |
| 1340 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1341 | ||
| 1342 | // template <> class codecvt<char32_t, char8_t, mbstate_t> // C++20 | |
| 1343 | ||
| 1344 | template <> | |
| 1345 | class _LIBCPP_TYPE_VIS codecvt<char32_t, char8_t, mbstate_t> | |
| 1346 | : public locale::facet, | |
| 1347 | public codecvt_base | |
| 1348 | { | |
| 1349 | public: | |
| 1350 | typedef char32_t intern_type; | |
| 1351 | typedef char8_t extern_type; | |
| 1352 | typedef mbstate_t state_type; | |
| 1353 | ||
| 1354 | _LIBCPP_INLINE_VISIBILITY | |
| 1355 | explicit codecvt(size_t __refs = 0) | |
| 1356 | : locale::facet(__refs) {} | |
| 1357 | ||
| 1358 | _LIBCPP_INLINE_VISIBILITY | |
| 1359 | result out(state_type& __st, | |
| 1360 | const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, | |
| 1361 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const | |
| 1362 | { | |
| 1363 | return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt); | |
| 1364 | } | |
| 1365 | ||
| 1366 | _LIBCPP_INLINE_VISIBILITY | |
| 1367 | result unshift(state_type& __st, | |
| 1368 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const | |
| 1369 | { | |
| 1370 | return do_unshift(__st, __to, __to_end, __to_nxt); | |
| 1371 | } | |
| 1372 | ||
| 1373 | _LIBCPP_INLINE_VISIBILITY | |
| 1374 | result in(state_type& __st, | |
| 1375 | const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, | |
| 1376 | intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const | |
| 1377 | { | |
| 1378 | return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt); | |
| 1379 | } | |
| 1380 | ||
| 1381 | _LIBCPP_INLINE_VISIBILITY | |
| 1382 | int encoding() const _NOEXCEPT | |
| 1383 | { | |
| 1384 | return do_encoding(); | |
| 1385 | } | |
| 1386 | ||
| 1387 | _LIBCPP_INLINE_VISIBILITY | |
| 1388 | bool always_noconv() const _NOEXCEPT | |
| 1389 | { | |
| 1390 | return do_always_noconv(); | |
| 1391 | } | |
| 1392 | ||
| 1393 | _LIBCPP_INLINE_VISIBILITY | |
| 1394 | int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const | |
| 1395 | { | |
| 1396 | return do_length(__st, __frm, __end, __mx); | |
| 1397 | } | |
| 1398 | ||
| 1399 | _LIBCPP_INLINE_VISIBILITY | |
| 1400 | int max_length() const _NOEXCEPT | |
| 1401 | { | |
| 1402 | return do_max_length(); | |
| 1403 | } | |
| 1404 | ||
| 1405 | static locale::id id; | |
| 1406 | ||
| 1407 | protected: | |
| 1408 | _LIBCPP_INLINE_VISIBILITY | |
| 1409 | explicit codecvt(const char*, size_t __refs = 0) | |
| 1410 | : locale::facet(__refs) {} | |
| 1411 | ||
| 1412 | ~codecvt(); | |
| 1413 | ||
| 1414 | virtual result do_out(state_type& __st, | |
| 1415 | const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, | |
| 1416 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; | |
| 1417 | virtual result do_in(state_type& __st, | |
| 1418 | const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt, | |
| 1419 | intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const; | |
| 1420 | virtual result do_unshift(state_type& __st, | |
| 1421 | extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; | |
| 1422 | virtual int do_encoding() const _NOEXCEPT; | |
| 1423 | virtual bool do_always_noconv() const _NOEXCEPT; | |
| 1424 | virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; | |
| 1425 | virtual int do_max_length() const _NOEXCEPT; | |
| 1426 | }; | |
| 1427 | ||
| 1428 | #endif | |
| 1429 | ||
| 1244 | 1430 | // template <class _InternT, class _ExternT, class _StateT> class codecvt_byname |
| 1245 | 1431 | |
| 1246 | 1432 | template <class _InternT, class _ExternT, class _StateT> |
| ... | ... | @@ -1258,15 +1444,21 @@ protected: |
| 1258 | 1444 | ~codecvt_byname(); |
| 1259 | 1445 | }; |
| 1260 | 1446 | |
| 1447 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1261 | 1448 | template <class _InternT, class _ExternT, class _StateT> |
| 1262 | 1449 | codecvt_byname<_InternT, _ExternT, _StateT>::~codecvt_byname() |
| 1263 | 1450 | { |
| 1264 | 1451 | } |
| 1265 | ||
| 1266 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>) | |
| 1267 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>) | |
| 1268 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>) | |
| 1269 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>) | |
| 1452 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1453 | ||
| 1454 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>) | |
| 1455 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>) | |
| 1456 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>) // deprecated in C++20 | |
| 1457 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>) // deprecated in C++20 | |
| 1458 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1459 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>) // C++20 | |
| 1460 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>) // C++20 | |
| 1461 | #endif | |
| 1270 | 1462 | |
| 1271 | 1463 | template <size_t _Np> |
| 1272 | 1464 | struct __narrow_to_utf8 |
| ... | ... | @@ -1290,12 +1482,14 @@ struct __narrow_to_utf8<8> |
| 1290 | 1482 | } |
| 1291 | 1483 | }; |
| 1292 | 1484 | |
| 1485 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1293 | 1486 | template <> |
| 1294 | 1487 | struct _LIBCPP_TEMPLATE_VIS __narrow_to_utf8<16> |
| 1295 | 1488 | : public codecvt<char16_t, char, mbstate_t> |
| 1296 | 1489 | { |
| 1297 | 1490 | _LIBCPP_INLINE_VISIBILITY |
| 1298 | 1491 | __narrow_to_utf8() : codecvt<char16_t, char, mbstate_t>(1) {} |
| 1492 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1299 | 1493 | |
| 1300 | 1494 | _LIBCPP_EXPORTED_FROM_ABI ~__narrow_to_utf8(); |
| 1301 | 1495 | |
| ... | ... | @@ -1324,12 +1518,14 @@ struct _LIBCPP_TEMPLATE_VIS __narrow_to_utf8<16> |
| 1324 | 1518 | } |
| 1325 | 1519 | }; |
| 1326 | 1520 | |
| 1521 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1327 | 1522 | template <> |
| 1328 | 1523 | struct _LIBCPP_TEMPLATE_VIS __narrow_to_utf8<32> |
| 1329 | 1524 | : public codecvt<char32_t, char, mbstate_t> |
| 1330 | 1525 | { |
| 1331 | 1526 | _LIBCPP_INLINE_VISIBILITY |
| 1332 | 1527 | __narrow_to_utf8() : codecvt<char32_t, char, mbstate_t>(1) {} |
| 1528 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1333 | 1529 | |
| 1334 | 1530 | _LIBCPP_EXPORTED_FROM_ABI ~__narrow_to_utf8(); |
| 1335 | 1531 | |
| ... | ... | @@ -1380,12 +1576,14 @@ struct __widen_from_utf8<8> |
| 1380 | 1576 | } |
| 1381 | 1577 | }; |
| 1382 | 1578 | |
| 1579 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1383 | 1580 | template <> |
| 1384 | 1581 | struct _LIBCPP_TEMPLATE_VIS __widen_from_utf8<16> |
| 1385 | 1582 | : public codecvt<char16_t, char, mbstate_t> |
| 1386 | 1583 | { |
| 1387 | 1584 | _LIBCPP_INLINE_VISIBILITY |
| 1388 | 1585 | __widen_from_utf8() : codecvt<char16_t, char, mbstate_t>(1) {} |
| 1586 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1389 | 1587 | |
| 1390 | 1588 | _LIBCPP_EXPORTED_FROM_ABI ~__widen_from_utf8(); |
| 1391 | 1589 | |
| ... | ... | @@ -1407,19 +1605,21 @@ struct _LIBCPP_TEMPLATE_VIS __widen_from_utf8<16> |
| 1407 | 1605 | if (__r == codecvt_base::error || __nn == __nb) |
| 1408 | 1606 | __throw_runtime_error("locale not supported"); |
| 1409 | 1607 | for (const char16_t* __p = __buf; __p < __bn; ++__p, ++__s) |
| 1410 | *__s = (wchar_t)*__p; | |
| 1608 | *__s = *__p; | |
| 1411 | 1609 | __nb = __nn; |
| 1412 | 1610 | } |
| 1413 | 1611 | return __s; |
| 1414 | 1612 | } |
| 1415 | 1613 | }; |
| 1416 | 1614 | |
| 1615 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1417 | 1616 | template <> |
| 1418 | 1617 | struct _LIBCPP_TEMPLATE_VIS __widen_from_utf8<32> |
| 1419 | 1618 | : public codecvt<char32_t, char, mbstate_t> |
| 1420 | 1619 | { |
| 1421 | 1620 | _LIBCPP_INLINE_VISIBILITY |
| 1422 | 1621 | __widen_from_utf8() : codecvt<char32_t, char, mbstate_t>(1) {} |
| 1622 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1423 | 1623 | |
| 1424 | 1624 | _LIBCPP_EXPORTED_FROM_ABI ~__widen_from_utf8(); |
| 1425 | 1625 | |
| ... | ... | @@ -1441,7 +1641,7 @@ struct _LIBCPP_TEMPLATE_VIS __widen_from_utf8<32> |
| 1441 | 1641 | if (__r == codecvt_base::error || __nn == __nb) |
| 1442 | 1642 | __throw_runtime_error("locale not supported"); |
| 1443 | 1643 | for (const char32_t* __p = __buf; __p < __bn; ++__p, ++__s) |
| 1444 | *__s = (wchar_t)*__p; | |
| 1644 | *__s = *__p; | |
| 1445 | 1645 | __nb = __nn; |
| 1446 | 1646 | } |
| 1447 | 1647 | return __s; |
lib/libcxx/include/__memory/allocator_traits.h created+401| ... | ... | @@ -0,0 +1,401 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H | |
| 11 | #define _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | #include <__memory/base.h> | |
| 15 | #include <__memory/pointer_traits.h> | |
| 16 | #include <type_traits> | |
| 17 | ||
| 18 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | |
| 19 | #pragma GCC system_header | |
| 20 | #endif | |
| 21 | ||
| 22 | _LIBCPP_PUSH_MACROS | |
| 23 | #include <__undef_macros> | |
| 24 | ||
| 25 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 26 | ||
| 27 | #define _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY) \ | |
| 28 | template <class _Tp, class = void> struct NAME : false_type { }; \ | |
| 29 | template <class _Tp> struct NAME<_Tp, typename __void_t<typename _Tp:: PROPERTY >::type> : true_type { } | |
| 30 | ||
| 31 | // __pointer | |
| 32 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer); | |
| 33 | template <class _Tp, class _Alloc, | |
| 34 | class _RawAlloc = typename remove_reference<_Alloc>::type, | |
| 35 | bool = __has_pointer<_RawAlloc>::value> | |
| 36 | struct __pointer { | |
| 37 | using type _LIBCPP_NODEBUG_TYPE = typename _RawAlloc::pointer; | |
| 38 | }; | |
| 39 | template <class _Tp, class _Alloc, class _RawAlloc> | |
| 40 | struct __pointer<_Tp, _Alloc, _RawAlloc, false> { | |
| 41 | using type _LIBCPP_NODEBUG_TYPE = _Tp*; | |
| 42 | }; | |
| 43 | ||
| 44 | // __const_pointer | |
| 45 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_pointer, const_pointer); | |
| 46 | template <class _Tp, class _Ptr, class _Alloc, | |
| 47 | bool = __has_const_pointer<_Alloc>::value> | |
| 48 | struct __const_pointer { | |
| 49 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::const_pointer; | |
| 50 | }; | |
| 51 | template <class _Tp, class _Ptr, class _Alloc> | |
| 52 | struct __const_pointer<_Tp, _Ptr, _Alloc, false> { | |
| 53 | #ifdef _LIBCPP_CXX03_LANG | |
| 54 | using type = typename pointer_traits<_Ptr>::template rebind<const _Tp>::other; | |
| 55 | #else | |
| 56 | using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind<const _Tp>; | |
| 57 | #endif | |
| 58 | }; | |
| 59 | ||
| 60 | // __void_pointer | |
| 61 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_void_pointer, void_pointer); | |
| 62 | template <class _Ptr, class _Alloc, | |
| 63 | bool = __has_void_pointer<_Alloc>::value> | |
| 64 | struct __void_pointer { | |
| 65 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::void_pointer; | |
| 66 | }; | |
| 67 | template <class _Ptr, class _Alloc> | |
| 68 | struct __void_pointer<_Ptr, _Alloc, false> { | |
| 69 | #ifdef _LIBCPP_CXX03_LANG | |
| 70 | using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind<void>::other; | |
| 71 | #else | |
| 72 | using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind<void>; | |
| 73 | #endif | |
| 74 | }; | |
| 75 | ||
| 76 | // __const_void_pointer | |
| 77 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_void_pointer, const_void_pointer); | |
| 78 | template <class _Ptr, class _Alloc, | |
| 79 | bool = __has_const_void_pointer<_Alloc>::value> | |
| 80 | struct __const_void_pointer { | |
| 81 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::const_void_pointer; | |
| 82 | }; | |
| 83 | template <class _Ptr, class _Alloc> | |
| 84 | struct __const_void_pointer<_Ptr, _Alloc, false> { | |
| 85 | #ifdef _LIBCPP_CXX03_LANG | |
| 86 | using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind<const void>::other; | |
| 87 | #else | |
| 88 | using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind<const void>; | |
| 89 | #endif | |
| 90 | }; | |
| 91 | ||
| 92 | // __size_type | |
| 93 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_size_type, size_type); | |
| 94 | template <class _Alloc, class _DiffType, bool = __has_size_type<_Alloc>::value> | |
| 95 | struct __size_type : make_unsigned<_DiffType> { }; | |
| 96 | template <class _Alloc, class _DiffType> | |
| 97 | struct __size_type<_Alloc, _DiffType, true> { | |
| 98 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::size_type; | |
| 99 | }; | |
| 100 | ||
| 101 | // __alloc_traits_difference_type | |
| 102 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_alloc_traits_difference_type, difference_type); | |
| 103 | template <class _Alloc, class _Ptr, bool = __has_alloc_traits_difference_type<_Alloc>::value> | |
| 104 | struct __alloc_traits_difference_type { | |
| 105 | using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::difference_type; | |
| 106 | }; | |
| 107 | template <class _Alloc, class _Ptr> | |
| 108 | struct __alloc_traits_difference_type<_Alloc, _Ptr, true> { | |
| 109 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::difference_type; | |
| 110 | }; | |
| 111 | ||
| 112 | // __propagate_on_container_copy_assignment | |
| 113 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_copy_assignment, propagate_on_container_copy_assignment); | |
| 114 | template <class _Alloc, bool = __has_propagate_on_container_copy_assignment<_Alloc>::value> | |
| 115 | struct __propagate_on_container_copy_assignment : false_type { }; | |
| 116 | template <class _Alloc> | |
| 117 | struct __propagate_on_container_copy_assignment<_Alloc, true> { | |
| 118 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::propagate_on_container_copy_assignment; | |
| 119 | }; | |
| 120 | ||
| 121 | // __propagate_on_container_move_assignment | |
| 122 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_move_assignment, propagate_on_container_move_assignment); | |
| 123 | template <class _Alloc, bool = __has_propagate_on_container_move_assignment<_Alloc>::value> | |
| 124 | struct __propagate_on_container_move_assignment : false_type { }; | |
| 125 | template <class _Alloc> | |
| 126 | struct __propagate_on_container_move_assignment<_Alloc, true> { | |
| 127 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::propagate_on_container_move_assignment; | |
| 128 | }; | |
| 129 | ||
| 130 | // __propagate_on_container_swap | |
| 131 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_swap, propagate_on_container_swap); | |
| 132 | template <class _Alloc, bool = __has_propagate_on_container_swap<_Alloc>::value> | |
| 133 | struct __propagate_on_container_swap : false_type { }; | |
| 134 | template <class _Alloc> | |
| 135 | struct __propagate_on_container_swap<_Alloc, true> { | |
| 136 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::propagate_on_container_swap; | |
| 137 | }; | |
| 138 | ||
| 139 | // __is_always_equal | |
| 140 | _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_is_always_equal, is_always_equal); | |
| 141 | template <class _Alloc, bool = __has_is_always_equal<_Alloc>::value> | |
| 142 | struct __is_always_equal : is_empty<_Alloc> { }; | |
| 143 | template <class _Alloc> | |
| 144 | struct __is_always_equal<_Alloc, true> { | |
| 145 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::is_always_equal; | |
| 146 | }; | |
| 147 | ||
| 148 | // __allocator_traits_rebind | |
| 149 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 150 | template <class _Tp, class _Up, class = void> | |
| 151 | struct __has_rebind_other : false_type { }; | |
| 152 | template <class _Tp, class _Up> | |
| 153 | struct __has_rebind_other<_Tp, _Up, typename __void_t< | |
| 154 | typename _Tp::template rebind<_Up>::other | |
| 155 | >::type> : true_type { }; | |
| 156 | ||
| 157 | template <class _Tp, class _Up, bool = __has_rebind_other<_Tp, _Up>::value> | |
| 158 | struct __allocator_traits_rebind { | |
| 159 | using type _LIBCPP_NODEBUG_TYPE = typename _Tp::template rebind<_Up>::other; | |
| 160 | }; | |
| 161 | template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up> | |
| 162 | struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, true> { | |
| 163 | using type _LIBCPP_NODEBUG_TYPE = typename _Alloc<_Tp, _Args...>::template rebind<_Up>::other; | |
| 164 | }; | |
| 165 | template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up> | |
| 166 | struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, false> { | |
| 167 | using type _LIBCPP_NODEBUG_TYPE = _Alloc<_Up, _Args...>; | |
| 168 | }; | |
| 169 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 170 | ||
| 171 | template<class _Alloc, class _Tp> | |
| 172 | using __allocator_traits_rebind_t = typename __allocator_traits_rebind<_Alloc, _Tp>::type; | |
| 173 | ||
| 174 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 175 | ||
| 176 | // __has_allocate_hint | |
| 177 | template <class _Alloc, class _SizeType, class _ConstVoidPtr, class = void> | |
| 178 | struct __has_allocate_hint : false_type { }; | |
| 179 | ||
| 180 | template <class _Alloc, class _SizeType, class _ConstVoidPtr> | |
| 181 | struct __has_allocate_hint<_Alloc, _SizeType, _ConstVoidPtr, decltype( | |
| 182 | (void)declval<_Alloc>().allocate(declval<_SizeType>(), declval<_ConstVoidPtr>()) | |
| 183 | )> : true_type { }; | |
| 184 | ||
| 185 | // __has_construct | |
| 186 | template <class, class _Alloc, class ..._Args> | |
| 187 | struct __has_construct_impl : false_type { }; | |
| 188 | ||
| 189 | template <class _Alloc, class ..._Args> | |
| 190 | struct __has_construct_impl<decltype( | |
| 191 | (void)declval<_Alloc>().construct(declval<_Args>()...) | |
| 192 | ), _Alloc, _Args...> : true_type { }; | |
| 193 | ||
| 194 | template <class _Alloc, class ..._Args> | |
| 195 | struct __has_construct : __has_construct_impl<void, _Alloc, _Args...> { }; | |
| 196 | ||
| 197 | // __has_destroy | |
| 198 | template <class _Alloc, class _Pointer, class = void> | |
| 199 | struct __has_destroy : false_type { }; | |
| 200 | ||
| 201 | template <class _Alloc, class _Pointer> | |
| 202 | struct __has_destroy<_Alloc, _Pointer, decltype( | |
| 203 | (void)declval<_Alloc>().destroy(declval<_Pointer>()) | |
| 204 | )> : true_type { }; | |
| 205 | ||
| 206 | // __has_max_size | |
| 207 | template <class _Alloc, class = void> | |
| 208 | struct __has_max_size : false_type { }; | |
| 209 | ||
| 210 | template <class _Alloc> | |
| 211 | struct __has_max_size<_Alloc, decltype( | |
| 212 | (void)declval<_Alloc&>().max_size() | |
| 213 | )> : true_type { }; | |
| 214 | ||
| 215 | // __has_select_on_container_copy_construction | |
| 216 | template <class _Alloc, class = void> | |
| 217 | struct __has_select_on_container_copy_construction : false_type { }; | |
| 218 | ||
| 219 | template <class _Alloc> | |
| 220 | struct __has_select_on_container_copy_construction<_Alloc, decltype( | |
| 221 | (void)declval<_Alloc>().select_on_container_copy_construction() | |
| 222 | )> : true_type { }; | |
| 223 | ||
| 224 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 225 | ||
| 226 | template <class _Alloc> | |
| 227 | struct _LIBCPP_TEMPLATE_VIS allocator_traits | |
| 228 | { | |
| 229 | using allocator_type = _Alloc; | |
| 230 | using value_type = typename allocator_type::value_type; | |
| 231 | using pointer = typename __pointer<value_type, allocator_type>::type; | |
| 232 | using const_pointer = typename __const_pointer<value_type, pointer, allocator_type>::type; | |
| 233 | using void_pointer = typename __void_pointer<pointer, allocator_type>::type; | |
| 234 | using const_void_pointer = typename __const_void_pointer<pointer, allocator_type>::type; | |
| 235 | using difference_type = typename __alloc_traits_difference_type<allocator_type, pointer>::type; | |
| 236 | using size_type = typename __size_type<allocator_type, difference_type>::type; | |
| 237 | using propagate_on_container_copy_assignment = typename __propagate_on_container_copy_assignment<allocator_type>::type; | |
| 238 | using propagate_on_container_move_assignment = typename __propagate_on_container_move_assignment<allocator_type>::type; | |
| 239 | using propagate_on_container_swap = typename __propagate_on_container_swap<allocator_type>::type; | |
| 240 | using is_always_equal = typename __is_always_equal<allocator_type>::type; | |
| 241 | ||
| 242 | #ifndef _LIBCPP_CXX03_LANG | |
| 243 | template <class _Tp> | |
| 244 | using rebind_alloc = __allocator_traits_rebind_t<allocator_type, _Tp>; | |
| 245 | template <class _Tp> | |
| 246 | using rebind_traits = allocator_traits<rebind_alloc<_Tp> >; | |
| 247 | #else // _LIBCPP_CXX03_LANG | |
| 248 | template <class _Tp> | |
| 249 | struct rebind_alloc { | |
| 250 | using other = __allocator_traits_rebind_t<allocator_type, _Tp>; | |
| 251 | }; | |
| 252 | template <class _Tp> | |
| 253 | struct rebind_traits { | |
| 254 | using other = allocator_traits<typename rebind_alloc<_Tp>::other>; | |
| 255 | }; | |
| 256 | #endif // _LIBCPP_CXX03_LANG | |
| 257 | ||
| 258 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 259 | static pointer allocate(allocator_type& __a, size_type __n) { | |
| 260 | return __a.allocate(__n); | |
| 261 | } | |
| 262 | ||
| 263 | template <class _Ap = _Alloc, class = | |
| 264 | _EnableIf<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> > | |
| 265 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 266 | static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) { | |
| 267 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 268 | return __a.allocate(__n, __hint); | |
| 269 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 270 | } | |
| 271 | template <class _Ap = _Alloc, class = void, class = | |
| 272 | _EnableIf<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> > | |
| 273 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 274 | static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer) { | |
| 275 | return __a.allocate(__n); | |
| 276 | } | |
| 277 | ||
| 278 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 279 | static void deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT { | |
| 280 | __a.deallocate(__p, __n); | |
| 281 | } | |
| 282 | ||
| 283 | template <class _Tp, class... _Args, class = | |
| 284 | _EnableIf<__has_construct<allocator_type, _Tp*, _Args...>::value> > | |
| 285 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 286 | static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) { | |
| 287 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 288 | __a.construct(__p, _VSTD::forward<_Args>(__args)...); | |
| 289 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 290 | } | |
| 291 | template <class _Tp, class... _Args, class = void, class = | |
| 292 | _EnableIf<!__has_construct<allocator_type, _Tp*, _Args...>::value> > | |
| 293 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 294 | static void construct(allocator_type&, _Tp* __p, _Args&&... __args) { | |
| 295 | #if _LIBCPP_STD_VER > 17 | |
| 296 | _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...); | |
| 297 | #else | |
| 298 | ::new ((void*)__p) _Tp(_VSTD::forward<_Args>(__args)...); | |
| 299 | #endif | |
| 300 | } | |
| 301 | ||
| 302 | template <class _Tp, class = | |
| 303 | _EnableIf<__has_destroy<allocator_type, _Tp*>::value> > | |
| 304 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 305 | static void destroy(allocator_type& __a, _Tp* __p) { | |
| 306 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 307 | __a.destroy(__p); | |
| 308 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 309 | } | |
| 310 | template <class _Tp, class = void, class = | |
| 311 | _EnableIf<!__has_destroy<allocator_type, _Tp*>::value> > | |
| 312 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 313 | static void destroy(allocator_type&, _Tp* __p) { | |
| 314 | #if _LIBCPP_STD_VER > 17 | |
| 315 | _VSTD::destroy_at(__p); | |
| 316 | #else | |
| 317 | __p->~_Tp(); | |
| 318 | #endif | |
| 319 | } | |
| 320 | ||
| 321 | template <class _Ap = _Alloc, class = | |
| 322 | _EnableIf<__has_max_size<const _Ap>::value> > | |
| 323 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 324 | static size_type max_size(const allocator_type& __a) _NOEXCEPT { | |
| 325 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 326 | return __a.max_size(); | |
| 327 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 328 | } | |
| 329 | template <class _Ap = _Alloc, class = void, class = | |
| 330 | _EnableIf<!__has_max_size<const _Ap>::value> > | |
| 331 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 332 | static size_type max_size(const allocator_type&) _NOEXCEPT { | |
| 333 | return numeric_limits<size_type>::max() / sizeof(value_type); | |
| 334 | } | |
| 335 | ||
| 336 | template <class _Ap = _Alloc, class = | |
| 337 | _EnableIf<__has_select_on_container_copy_construction<const _Ap>::value> > | |
| 338 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 339 | static allocator_type select_on_container_copy_construction(const allocator_type& __a) { | |
| 340 | return __a.select_on_container_copy_construction(); | |
| 341 | } | |
| 342 | template <class _Ap = _Alloc, class = void, class = | |
| 343 | _EnableIf<!__has_select_on_container_copy_construction<const _Ap>::value> > | |
| 344 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 345 | static allocator_type select_on_container_copy_construction(const allocator_type& __a) { | |
| 346 | return __a; | |
| 347 | } | |
| 348 | }; | |
| 349 | ||
| 350 | template <class _Traits, class _Tp> | |
| 351 | struct __rebind_alloc_helper { | |
| 352 | #ifndef _LIBCPP_CXX03_LANG | |
| 353 | using type _LIBCPP_NODEBUG_TYPE = typename _Traits::template rebind_alloc<_Tp>; | |
| 354 | #else | |
| 355 | using type = typename _Traits::template rebind_alloc<_Tp>::other; | |
| 356 | #endif | |
| 357 | }; | |
| 358 | ||
| 359 | // __is_default_allocator | |
| 360 | template <class _Tp> | |
| 361 | struct __is_default_allocator : false_type { }; | |
| 362 | ||
| 363 | template <class _Tp> | |
| 364 | struct __is_default_allocator<_VSTD::allocator<_Tp> > : true_type { }; | |
| 365 | ||
| 366 | // __is_cpp17_move_insertable | |
| 367 | template <class _Alloc, class = void> | |
| 368 | struct __is_cpp17_move_insertable | |
| 369 | : is_move_constructible<typename _Alloc::value_type> | |
| 370 | { }; | |
| 371 | ||
| 372 | template <class _Alloc> | |
| 373 | struct __is_cpp17_move_insertable<_Alloc, _EnableIf< | |
| 374 | !__is_default_allocator<_Alloc>::value && | |
| 375 | __has_construct<_Alloc, typename _Alloc::value_type*, typename _Alloc::value_type&&>::value | |
| 376 | > > : true_type { }; | |
| 377 | ||
| 378 | // __is_cpp17_copy_insertable | |
| 379 | template <class _Alloc, class = void> | |
| 380 | struct __is_cpp17_copy_insertable | |
| 381 | : integral_constant<bool, | |
| 382 | is_copy_constructible<typename _Alloc::value_type>::value && | |
| 383 | __is_cpp17_move_insertable<_Alloc>::value | |
| 384 | > | |
| 385 | { }; | |
| 386 | ||
| 387 | template <class _Alloc> | |
| 388 | struct __is_cpp17_copy_insertable<_Alloc, _EnableIf< | |
| 389 | !__is_default_allocator<_Alloc>::value && | |
| 390 | __has_construct<_Alloc, typename _Alloc::value_type*, const typename _Alloc::value_type&>::value | |
| 391 | > > | |
| 392 | : __is_cpp17_move_insertable<_Alloc> | |
| 393 | { }; | |
| 394 | ||
| 395 | #undef _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX | |
| 396 | ||
| 397 | _LIBCPP_END_NAMESPACE_STD | |
| 398 | ||
| 399 | _LIBCPP_POP_MACROS | |
| 400 | ||
| 401 | #endif // _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H |
lib/libcxx/include/__memory/base.h created+127| ... | ... | @@ -0,0 +1,127 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP___MEMORY_BASE_H | |
| 11 | #define _LIBCPP___MEMORY_BASE_H | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | #include <__debug> | |
| 15 | #include <type_traits> | |
| 16 | ||
| 17 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | |
| 18 | #pragma GCC system_header | |
| 19 | #endif | |
| 20 | ||
| 21 | _LIBCPP_PUSH_MACROS | |
| 22 | #include <__undef_macros> | |
| 23 | ||
| 24 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 25 | ||
| 26 | // addressof | |
| 27 | #ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF | |
| 28 | ||
| 29 | template <class _Tp> | |
| 30 | inline _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 31 | _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY | |
| 32 | _Tp* | |
| 33 | addressof(_Tp& __x) _NOEXCEPT | |
| 34 | { | |
| 35 | return __builtin_addressof(__x); | |
| 36 | } | |
| 37 | ||
| 38 | #else | |
| 39 | ||
| 40 | template <class _Tp> | |
| 41 | inline _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY | |
| 42 | _Tp* | |
| 43 | addressof(_Tp& __x) _NOEXCEPT | |
| 44 | { | |
| 45 | return reinterpret_cast<_Tp *>( | |
| 46 | const_cast<char *>(&reinterpret_cast<const volatile char &>(__x))); | |
| 47 | } | |
| 48 | ||
| 49 | #endif // _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF | |
| 50 | ||
| 51 | #if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF) | |
| 52 | // Objective-C++ Automatic Reference Counting uses qualified pointers | |
| 53 | // that require special addressof() signatures. When | |
| 54 | // _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler | |
| 55 | // itself is providing these definitions. Otherwise, we provide them. | |
| 56 | template <class _Tp> | |
| 57 | inline _LIBCPP_INLINE_VISIBILITY | |
| 58 | __strong _Tp* | |
| 59 | addressof(__strong _Tp& __x) _NOEXCEPT | |
| 60 | { | |
| 61 | return &__x; | |
| 62 | } | |
| 63 | ||
| 64 | #ifdef _LIBCPP_HAS_OBJC_ARC_WEAK | |
| 65 | template <class _Tp> | |
| 66 | inline _LIBCPP_INLINE_VISIBILITY | |
| 67 | __weak _Tp* | |
| 68 | addressof(__weak _Tp& __x) _NOEXCEPT | |
| 69 | { | |
| 70 | return &__x; | |
| 71 | } | |
| 72 | #endif | |
| 73 | ||
| 74 | template <class _Tp> | |
| 75 | inline _LIBCPP_INLINE_VISIBILITY | |
| 76 | __autoreleasing _Tp* | |
| 77 | addressof(__autoreleasing _Tp& __x) _NOEXCEPT | |
| 78 | { | |
| 79 | return &__x; | |
| 80 | } | |
| 81 | ||
| 82 | template <class _Tp> | |
| 83 | inline _LIBCPP_INLINE_VISIBILITY | |
| 84 | __unsafe_unretained _Tp* | |
| 85 | addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT | |
| 86 | { | |
| 87 | return &__x; | |
| 88 | } | |
| 89 | #endif | |
| 90 | ||
| 91 | #if !defined(_LIBCPP_CXX03_LANG) | |
| 92 | template <class _Tp> _Tp* addressof(const _Tp&&) noexcept = delete; | |
| 93 | #endif | |
| 94 | ||
| 95 | // construct_at | |
| 96 | ||
| 97 | #if _LIBCPP_STD_VER > 17 | |
| 98 | ||
| 99 | template<class _Tp, class ..._Args, class = decltype( | |
| 100 | ::new (_VSTD::declval<void*>()) _Tp(_VSTD::declval<_Args>()...) | |
| 101 | )> | |
| 102 | _LIBCPP_INLINE_VISIBILITY | |
| 103 | constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) { | |
| 104 | _LIBCPP_ASSERT(__location, "null pointer given to construct_at"); | |
| 105 | return ::new ((void*)__location) _Tp(_VSTD::forward<_Args>(__args)...); | |
| 106 | } | |
| 107 | ||
| 108 | #endif | |
| 109 | ||
| 110 | // destroy_at | |
| 111 | ||
| 112 | #if _LIBCPP_STD_VER > 14 | |
| 113 | ||
| 114 | template <class _Tp> | |
| 115 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 116 | void destroy_at(_Tp* __loc) { | |
| 117 | _LIBCPP_ASSERT(__loc, "null pointer given to destroy_at"); | |
| 118 | __loc->~_Tp(); | |
| 119 | } | |
| 120 | ||
| 121 | #endif | |
| 122 | ||
| 123 | _LIBCPP_END_NAMESPACE_STD | |
| 124 | ||
| 125 | _LIBCPP_POP_MACROS | |
| 126 | ||
| 127 | #endif // _LIBCPP___MEMORY_BASE_H |
lib/libcxx/include/__memory/pointer_traits.h created+169| ... | ... | @@ -0,0 +1,169 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H | |
| 11 | #define _LIBCPP___MEMORY_POINTER_TRAITS_H | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | #include <type_traits> | |
| 15 | ||
| 16 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | |
| 17 | #pragma GCC system_header | |
| 18 | #endif | |
| 19 | ||
| 20 | _LIBCPP_PUSH_MACROS | |
| 21 | #include <__undef_macros> | |
| 22 | ||
| 23 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 24 | ||
| 25 | template <class _Tp, class = void> | |
| 26 | struct __has_element_type : false_type {}; | |
| 27 | ||
| 28 | template <class _Tp> | |
| 29 | struct __has_element_type<_Tp, | |
| 30 | typename __void_t<typename _Tp::element_type>::type> : true_type {}; | |
| 31 | ||
| 32 | template <class _Ptr, bool = __has_element_type<_Ptr>::value> | |
| 33 | struct __pointer_traits_element_type; | |
| 34 | ||
| 35 | template <class _Ptr> | |
| 36 | struct __pointer_traits_element_type<_Ptr, true> | |
| 37 | { | |
| 38 | typedef _LIBCPP_NODEBUG_TYPE typename _Ptr::element_type type; | |
| 39 | }; | |
| 40 | ||
| 41 | template <template <class, class...> class _Sp, class _Tp, class ..._Args> | |
| 42 | struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true> | |
| 43 | { | |
| 44 | typedef _LIBCPP_NODEBUG_TYPE typename _Sp<_Tp, _Args...>::element_type type; | |
| 45 | }; | |
| 46 | ||
| 47 | template <template <class, class...> class _Sp, class _Tp, class ..._Args> | |
| 48 | struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false> | |
| 49 | { | |
| 50 | typedef _LIBCPP_NODEBUG_TYPE _Tp type; | |
| 51 | }; | |
| 52 | ||
| 53 | template <class _Tp, class = void> | |
| 54 | struct __has_difference_type : false_type {}; | |
| 55 | ||
| 56 | template <class _Tp> | |
| 57 | struct __has_difference_type<_Tp, | |
| 58 | typename __void_t<typename _Tp::difference_type>::type> : true_type {}; | |
| 59 | ||
| 60 | template <class _Ptr, bool = __has_difference_type<_Ptr>::value> | |
| 61 | struct __pointer_traits_difference_type | |
| 62 | { | |
| 63 | typedef _LIBCPP_NODEBUG_TYPE ptrdiff_t type; | |
| 64 | }; | |
| 65 | ||
| 66 | template <class _Ptr> | |
| 67 | struct __pointer_traits_difference_type<_Ptr, true> | |
| 68 | { | |
| 69 | typedef _LIBCPP_NODEBUG_TYPE typename _Ptr::difference_type type; | |
| 70 | }; | |
| 71 | ||
| 72 | template <class _Tp, class _Up> | |
| 73 | struct __has_rebind | |
| 74 | { | |
| 75 | private: | |
| 76 | struct __two {char __lx; char __lxx;}; | |
| 77 | template <class _Xp> static __two __test(...); | |
| 78 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 79 | template <class _Xp> static char __test(typename _Xp::template rebind<_Up>* = 0); | |
| 80 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 81 | public: | |
| 82 | static const bool value = sizeof(__test<_Tp>(0)) == 1; | |
| 83 | }; | |
| 84 | ||
| 85 | template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value> | |
| 86 | struct __pointer_traits_rebind | |
| 87 | { | |
| 88 | #ifndef _LIBCPP_CXX03_LANG | |
| 89 | typedef _LIBCPP_NODEBUG_TYPE typename _Tp::template rebind<_Up> type; | |
| 90 | #else | |
| 91 | typedef _LIBCPP_NODEBUG_TYPE typename _Tp::template rebind<_Up>::other type; | |
| 92 | #endif | |
| 93 | }; | |
| 94 | ||
| 95 | template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up> | |
| 96 | struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true> | |
| 97 | { | |
| 98 | #ifndef _LIBCPP_CXX03_LANG | |
| 99 | typedef _LIBCPP_NODEBUG_TYPE typename _Sp<_Tp, _Args...>::template rebind<_Up> type; | |
| 100 | #else | |
| 101 | typedef _LIBCPP_NODEBUG_TYPE typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type; | |
| 102 | #endif | |
| 103 | }; | |
| 104 | ||
| 105 | template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up> | |
| 106 | struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false> | |
| 107 | { | |
| 108 | typedef _Sp<_Up, _Args...> type; | |
| 109 | }; | |
| 110 | ||
| 111 | template <class _Ptr> | |
| 112 | struct _LIBCPP_TEMPLATE_VIS pointer_traits | |
| 113 | { | |
| 114 | typedef _Ptr pointer; | |
| 115 | typedef typename __pointer_traits_element_type<pointer>::type element_type; | |
| 116 | typedef typename __pointer_traits_difference_type<pointer>::type difference_type; | |
| 117 | ||
| 118 | #ifndef _LIBCPP_CXX03_LANG | |
| 119 | template <class _Up> using rebind = typename __pointer_traits_rebind<pointer, _Up>::type; | |
| 120 | #else | |
| 121 | template <class _Up> struct rebind | |
| 122 | {typedef typename __pointer_traits_rebind<pointer, _Up>::type other;}; | |
| 123 | #endif // _LIBCPP_CXX03_LANG | |
| 124 | ||
| 125 | private: | |
| 126 | struct __nat {}; | |
| 127 | public: | |
| 128 | _LIBCPP_INLINE_VISIBILITY | |
| 129 | static pointer pointer_to(typename conditional<is_void<element_type>::value, | |
| 130 | __nat, element_type>::type& __r) | |
| 131 | {return pointer::pointer_to(__r);} | |
| 132 | }; | |
| 133 | ||
| 134 | template <class _Tp> | |
| 135 | struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> | |
| 136 | { | |
| 137 | typedef _Tp* pointer; | |
| 138 | typedef _Tp element_type; | |
| 139 | typedef ptrdiff_t difference_type; | |
| 140 | ||
| 141 | #ifndef _LIBCPP_CXX03_LANG | |
| 142 | template <class _Up> using rebind = _Up*; | |
| 143 | #else | |
| 144 | template <class _Up> struct rebind {typedef _Up* other;}; | |
| 145 | #endif | |
| 146 | ||
| 147 | private: | |
| 148 | struct __nat {}; | |
| 149 | public: | |
| 150 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 151 | static pointer pointer_to(typename conditional<is_void<element_type>::value, | |
| 152 | __nat, element_type>::type& __r) _NOEXCEPT | |
| 153 | {return _VSTD::addressof(__r);} | |
| 154 | }; | |
| 155 | ||
| 156 | template <class _From, class _To> | |
| 157 | struct __rebind_pointer { | |
| 158 | #ifndef _LIBCPP_CXX03_LANG | |
| 159 | typedef typename pointer_traits<_From>::template rebind<_To> type; | |
| 160 | #else | |
| 161 | typedef typename pointer_traits<_From>::template rebind<_To>::other type; | |
| 162 | #endif | |
| 163 | }; | |
| 164 | ||
| 165 | _LIBCPP_END_NAMESPACE_STD | |
| 166 | ||
| 167 | _LIBCPP_POP_MACROS | |
| 168 | ||
| 169 | #endif // _LIBCPP___MEMORY_POINTER_TRAITS_H |
lib/libcxx/include/__memory/utilities.h created+88| ... | ... | @@ -0,0 +1,88 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP___MEMORY_UTILITIES_H | |
| 11 | #define _LIBCPP___MEMORY_UTILITIES_H | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | #include <__memory/allocator_traits.h> | |
| 15 | #include <cstddef> | |
| 16 | ||
| 17 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | |
| 18 | #pragma GCC system_header | |
| 19 | #endif | |
| 20 | ||
| 21 | _LIBCPP_PUSH_MACROS | |
| 22 | #include <__undef_macros> | |
| 23 | ||
| 24 | ||
| 25 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 26 | ||
| 27 | // Helper class to allocate memory using an Allocator in an exception safe | |
| 28 | // manner. | |
| 29 | // | |
| 30 | // The intended usage of this class is as follows: | |
| 31 | // | |
| 32 | // 0 | |
| 33 | // 1 __allocation_guard<SomeAllocator> guard(alloc, 10); | |
| 34 | // 2 do_some_initialization_that_may_throw(guard.__get()); | |
| 35 | // 3 save_allocated_pointer_in_a_noexcept_operation(guard.__release_ptr()); | |
| 36 | // 4 | |
| 37 | // | |
| 38 | // If line (2) throws an exception during initialization of the memory, the | |
| 39 | // guard's destructor will be called, and the memory will be released using | |
| 40 | // Allocator deallocation. Otherwise, we release the memory from the guard on | |
| 41 | // line (3) in an operation that can't throw -- after that, the guard is not | |
| 42 | // responsible for the memory anymore. | |
| 43 | // | |
| 44 | // This is similar to a unique_ptr, except it's easier to use with a | |
| 45 | // custom allocator. | |
| 46 | template<class _Alloc> | |
| 47 | struct __allocation_guard { | |
| 48 | using _Pointer = typename allocator_traits<_Alloc>::pointer; | |
| 49 | using _Size = typename allocator_traits<_Alloc>::size_type; | |
| 50 | ||
| 51 | template<class _AllocT> // we perform the allocator conversion inside the constructor | |
| 52 | _LIBCPP_HIDE_FROM_ABI | |
| 53 | explicit __allocation_guard(_AllocT __alloc, _Size __n) | |
| 54 | : __alloc_(_VSTD::move(__alloc)) | |
| 55 | , __n_(__n) | |
| 56 | , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important | |
| 57 | { } | |
| 58 | ||
| 59 | _LIBCPP_HIDE_FROM_ABI | |
| 60 | ~__allocation_guard() _NOEXCEPT { | |
| 61 | if (__ptr_ != nullptr) { | |
| 62 | allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __n_); | |
| 63 | } | |
| 64 | } | |
| 65 | ||
| 66 | _LIBCPP_HIDE_FROM_ABI | |
| 67 | _Pointer __release_ptr() _NOEXCEPT { // not called __release() because it's a keyword in objective-c++ | |
| 68 | _Pointer __tmp = __ptr_; | |
| 69 | __ptr_ = nullptr; | |
| 70 | return __tmp; | |
| 71 | } | |
| 72 | ||
| 73 | _LIBCPP_HIDE_FROM_ABI | |
| 74 | _Pointer __get() const _NOEXCEPT { | |
| 75 | return __ptr_; | |
| 76 | } | |
| 77 | ||
| 78 | private: | |
| 79 | _Alloc __alloc_; | |
| 80 | _Size __n_; | |
| 81 | _Pointer __ptr_; | |
| 82 | }; | |
| 83 | ||
| 84 | _LIBCPP_END_NAMESPACE_STD | |
| 85 | ||
| 86 | _LIBCPP_POP_MACROS | |
| 87 | ||
| 88 | #endif // _LIBCPP___MEMORY_UTILITIES_H |
lib/libcxx/include/__mutex_base+6-9| ... | ... | @@ -146,7 +146,6 @@ private: |
| 146 | 146 | unique_lock& operator=(unique_lock const&); // = delete; |
| 147 | 147 | |
| 148 | 148 | public: |
| 149 | #ifndef _LIBCPP_CXX03_LANG | |
| 150 | 149 | _LIBCPP_INLINE_VISIBILITY |
| 151 | 150 | unique_lock(unique_lock&& __u) _NOEXCEPT |
| 152 | 151 | : __m_(__u.__m_), __owns_(__u.__owns_) |
| ... | ... | @@ -163,8 +162,6 @@ public: |
| 163 | 162 | return *this; |
| 164 | 163 | } |
| 165 | 164 | |
| 166 | #endif // _LIBCPP_CXX03_LANG | |
| 167 | ||
| 168 | 165 | void lock(); |
| 169 | 166 | bool try_lock(); |
| 170 | 167 | |
| ... | ... | @@ -382,12 +379,12 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) |
| 382 | 379 | |
| 383 | 380 | using __ratio = ratio_divide<_Period, nano>; |
| 384 | 381 | using __ns_rep = nanoseconds::rep; |
| 385 | __ns_rep __result_max = std::numeric_limits<__ns_rep>::max(); | |
| 382 | __ns_rep __result_max = numeric_limits<__ns_rep>::max(); | |
| 386 | 383 | if (__d.count() > 0 && __d.count() > __result_max / __ratio::num) { |
| 387 | 384 | return nanoseconds::max(); |
| 388 | 385 | } |
| 389 | 386 | |
| 390 | __ns_rep __result_min = std::numeric_limits<__ns_rep>::min(); | |
| 387 | __ns_rep __result_min = numeric_limits<__ns_rep>::min(); | |
| 391 | 388 | if (__d.count() < 0 && __d.count() < __result_min / __ratio::num) { |
| 392 | 389 | return nanoseconds::min(); |
| 393 | 390 | } |
| ... | ... | @@ -421,7 +418,7 @@ condition_variable::wait_until(unique_lock<mutex>& __lk, |
| 421 | 418 | if (__t <= __now) |
| 422 | 419 | return cv_status::timeout; |
| 423 | 420 | |
| 424 | __clock_tp_ns __t_ns = __clock_tp_ns(__safe_nanosecond_cast(__t.time_since_epoch())); | |
| 421 | __clock_tp_ns __t_ns = __clock_tp_ns(_VSTD::__safe_nanosecond_cast(__t.time_since_epoch())); | |
| 425 | 422 | |
| 426 | 423 | __do_timed_wait(__lk, __t_ns); |
| 427 | 424 | return _Clock::now() < __t ? cv_status::no_timeout : cv_status::timeout; |
| ... | ... | @@ -454,13 +451,13 @@ condition_variable::wait_for(unique_lock<mutex>& __lk, |
| 454 | 451 | |
| 455 | 452 | #if defined(_LIBCPP_HAS_COND_CLOCKWAIT) |
| 456 | 453 | using __clock_tp_ns = time_point<steady_clock, nanoseconds>; |
| 457 | __ns_rep __now_count_ns = __safe_nanosecond_cast(__c_now.time_since_epoch()).count(); | |
| 454 | __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(__c_now.time_since_epoch()).count(); | |
| 458 | 455 | #else |
| 459 | 456 | using __clock_tp_ns = time_point<system_clock, nanoseconds>; |
| 460 | __ns_rep __now_count_ns = __safe_nanosecond_cast(system_clock::now().time_since_epoch()).count(); | |
| 457 | __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count(); | |
| 461 | 458 | #endif |
| 462 | 459 | |
| 463 | __ns_rep __d_ns_count = __safe_nanosecond_cast(__d).count(); | |
| 460 | __ns_rep __d_ns_count = _VSTD::__safe_nanosecond_cast(__d).count(); | |
| 464 | 461 | |
| 465 | 462 | if (__now_count_ns > numeric_limits<__ns_rep>::max() - __d_ns_count) { |
| 466 | 463 | __do_timed_wait(__lk, __clock_tp_ns::max()); |
lib/libcxx/include/__split_buffer+4-20| ... | ... | @@ -68,7 +68,6 @@ public: |
| 68 | 68 | __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a); |
| 69 | 69 | ~__split_buffer(); |
| 70 | 70 | |
| 71 | #ifndef _LIBCPP_CXX03_LANG | |
| 72 | 71 | __split_buffer(__split_buffer&& __c) |
| 73 | 72 | _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value); |
| 74 | 73 | __split_buffer(__split_buffer&& __c, const __alloc_rr& __a); |
| ... | ... | @@ -76,7 +75,6 @@ public: |
| 76 | 75 | _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value && |
| 77 | 76 | is_nothrow_move_assignable<allocator_type>::value) || |
| 78 | 77 | !__alloc_traits::propagate_on_container_move_assignment::value); |
| 79 | #endif // _LIBCPP_CXX03_LANG | |
| 80 | 78 | |
| 81 | 79 | _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;} |
| 82 | 80 | _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;} |
| ... | ... | @@ -101,12 +99,10 @@ public: |
| 101 | 99 | void shrink_to_fit() _NOEXCEPT; |
| 102 | 100 | void push_front(const_reference __x); |
| 103 | 101 | _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); |
| 104 | #ifndef _LIBCPP_CXX03_LANG | |
| 105 | 102 | void push_front(value_type&& __x); |
| 106 | 103 | void push_back(value_type&& __x); |
| 107 | 104 | template <class... _Args> |
| 108 | 105 | void emplace_back(_Args&&... __args); |
| 109 | #endif // !defined(_LIBCPP_CXX03_LANG) | |
| 110 | 106 | |
| 111 | 107 | _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);} |
| 112 | 108 | _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);} |
| ... | ... | @@ -270,7 +266,7 @@ typename enable_if |
| 270 | 266 | >::type |
| 271 | 267 | __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) |
| 272 | 268 | { |
| 273 | _ConstructTransaction __tx(&this->__end_, std::distance(__first, __last)); | |
| 269 | _ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last)); | |
| 274 | 270 | for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, ++__first) { |
| 275 | 271 | __alloc_traits::construct(this->__alloc(), |
| 276 | 272 | _VSTD::__to_address(__tx.__pos_), *__first); |
| ... | ... | @@ -283,7 +279,7 @@ void |
| 283 | 279 | __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type) |
| 284 | 280 | { |
| 285 | 281 | while (__begin_ != __new_begin) |
| 286 | __alloc_traits::destroy(__alloc(), __to_address(__begin_++)); | |
| 282 | __alloc_traits::destroy(__alloc(), _VSTD::__to_address(__begin_++)); | |
| 287 | 283 | } |
| 288 | 284 | |
| 289 | 285 | template <class _Tp, class _Allocator> |
| ... | ... | @@ -300,7 +296,7 @@ void |
| 300 | 296 | __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT |
| 301 | 297 | { |
| 302 | 298 | while (__new_last != __end_) |
| 303 | __alloc_traits::destroy(__alloc(), __to_address(--__end_)); | |
| 299 | __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__end_)); | |
| 304 | 300 | } |
| 305 | 301 | |
| 306 | 302 | template <class _Tp, class _Allocator> |
| ... | ... | @@ -350,8 +346,6 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer() |
| 350 | 346 | __alloc_traits::deallocate(__alloc(), __first_, capacity()); |
| 351 | 347 | } |
| 352 | 348 | |
| 353 | #ifndef _LIBCPP_CXX03_LANG | |
| 354 | ||
| 355 | 349 | template <class _Tp, class _Allocator> |
| 356 | 350 | __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c) |
| 357 | 351 | _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) |
| ... | ... | @@ -412,8 +406,6 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c) |
| 412 | 406 | return *this; |
| 413 | 407 | } |
| 414 | 408 | |
| 415 | #endif // _LIBCPP_CXX03_LANG | |
| 416 | ||
| 417 | 409 | template <class _Tp, class _Allocator> |
| 418 | 410 | void |
| 419 | 411 | __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x) |
| ... | ... | @@ -424,7 +416,7 @@ __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x) |
| 424 | 416 | _VSTD::swap(__begin_, __x.__begin_); |
| 425 | 417 | _VSTD::swap(__end_, __x.__end_); |
| 426 | 418 | _VSTD::swap(__end_cap(), __x.__end_cap()); |
| 427 | __swap_allocator(__alloc(), __x.__alloc()); | |
| 419 | _VSTD::__swap_allocator(__alloc(), __x.__alloc()); | |
| 428 | 420 | } |
| 429 | 421 | |
| 430 | 422 | template <class _Tp, class _Allocator> |
| ... | ... | @@ -499,8 +491,6 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x) |
| 499 | 491 | --__begin_; |
| 500 | 492 | } |
| 501 | 493 | |
| 502 | #ifndef _LIBCPP_CXX03_LANG | |
| 503 | ||
| 504 | 494 | template <class _Tp, class _Allocator> |
| 505 | 495 | void |
| 506 | 496 | __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) |
| ... | ... | @@ -531,8 +521,6 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) |
| 531 | 521 | --__begin_; |
| 532 | 522 | } |
| 533 | 523 | |
| 534 | #endif // _LIBCPP_CXX03_LANG | |
| 535 | ||
| 536 | 524 | template <class _Tp, class _Allocator> |
| 537 | 525 | inline _LIBCPP_INLINE_VISIBILITY |
| 538 | 526 | void |
| ... | ... | @@ -563,8 +551,6 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x) |
| 563 | 551 | ++__end_; |
| 564 | 552 | } |
| 565 | 553 | |
| 566 | #ifndef _LIBCPP_CXX03_LANG | |
| 567 | ||
| 568 | 554 | template <class _Tp, class _Allocator> |
| 569 | 555 | void |
| 570 | 556 | __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x) |
| ... | ... | @@ -626,8 +612,6 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args) |
| 626 | 612 | ++__end_; |
| 627 | 613 | } |
| 628 | 614 | |
| 629 | #endif // _LIBCPP_CXX03_LANG | |
| 630 | ||
| 631 | 615 | template <class _Tp, class _Allocator> |
| 632 | 616 | inline _LIBCPP_INLINE_VISIBILITY |
| 633 | 617 | void |
lib/libcxx/include/__sso_allocator+5-4| ... | ... | @@ -11,8 +11,9 @@ |
| 11 | 11 | #define _LIBCPP___SSO_ALLOCATOR |
| 12 | 12 | |
| 13 | 13 | #include <__config> |
| 14 | #include <type_traits> | |
| 14 | #include <memory> | |
| 15 | 15 | #include <new> |
| 16 | #include <type_traits> | |
| 16 | 17 | |
| 17 | 18 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 18 | 19 | #pragma GCC system_header |
| ... | ... | @@ -47,21 +48,21 @@ public: |
| 47 | 48 | private: |
| 48 | 49 | __sso_allocator& operator=(const __sso_allocator&); |
| 49 | 50 | public: |
| 50 | _LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, typename __sso_allocator<void, _Np>::const_pointer = 0) | |
| 51 | _LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, typename __sso_allocator<void, _Np>::const_pointer = nullptr) | |
| 51 | 52 | { |
| 52 | 53 | if (!__allocated_ && __n <= _Np) |
| 53 | 54 | { |
| 54 | 55 | __allocated_ = true; |
| 55 | 56 | return (pointer)&buf_; |
| 56 | 57 | } |
| 57 | return static_cast<pointer>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); | |
| 58 | return allocator<_Tp>().allocate(__n); | |
| 58 | 59 | } |
| 59 | 60 | _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type __n) |
| 60 | 61 | { |
| 61 | 62 | if (__p == (pointer)&buf_) |
| 62 | 63 | __allocated_ = false; |
| 63 | 64 | else |
| 64 | _VSTD::__libcpp_deallocate(__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); | |
| 65 | allocator<_Tp>().deallocate(__p, __n); | |
| 65 | 66 | } |
| 66 | 67 | _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} |
| 67 | 68 |
lib/libcxx/include/__string+49-47| ... | ... | @@ -55,7 +55,9 @@ template <> struct char_traits<char8_t>; // c++20 |
| 55 | 55 | |
| 56 | 56 | #include <__config> |
| 57 | 57 | #include <algorithm> // for search and min |
| 58 | #include <cstdio> // For EOF. | |
| 58 | #include <cstdio> // for EOF | |
| 59 | #include <cstring> // for memcpy | |
| 60 | #include <cwchar> // for wmemcpy | |
| 59 | 61 | #include <memory> // for __murmur2_or_cityhash |
| 60 | 62 | |
| 61 | 63 | #include <__debug> |
| ... | ... | @@ -92,7 +94,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD |
| 92 | 94 | _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \ |
| 93 | 95 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&)) \ |
| 94 | 96 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \ |
| 95 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, std::allocator<_CharType> const&)) \ | |
| 97 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \ | |
| 96 | 98 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \ |
| 97 | 99 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \ |
| 98 | 100 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \ |
| ... | ... | @@ -108,7 +110,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD |
| 108 | 110 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \ |
| 109 | 111 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \ |
| 110 | 112 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \ |
| 111 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, std::allocator<_CharType> const&)) \ | |
| 113 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \ | |
| 112 | 114 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \ |
| 113 | 115 | _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \ |
| 114 | 116 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \ |
| ... | ... | @@ -158,7 +160,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD |
| 158 | 160 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \ |
| 159 | 161 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \ |
| 160 | 162 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \ |
| 161 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, std::allocator<_CharType> const&)) \ | |
| 163 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \ | |
| 162 | 164 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \ |
| 163 | 165 | _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \ |
| 164 | 166 | _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \ |
| ... | ... | @@ -268,7 +270,7 @@ char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a |
| 268 | 270 | return __s; |
| 269 | 271 | ++__s; |
| 270 | 272 | } |
| 271 | return 0; | |
| 273 | return nullptr; | |
| 272 | 274 | } |
| 273 | 275 | |
| 274 | 276 | template <class _CharT> |
| ... | ... | @@ -318,7 +320,7 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a) |
| 318 | 320 | // constexpr versions of move/copy/assign. |
| 319 | 321 | |
| 320 | 322 | template <class _CharT> |
| 321 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 323 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 322 | 324 | _CharT* __move_constexpr(_CharT* __s1, const _CharT* __s2, size_t __n) _NOEXCEPT |
| 323 | 325 | { |
| 324 | 326 | if (__n == 0) return __s1; |
| ... | ... | @@ -331,7 +333,7 @@ _CharT* __move_constexpr(_CharT* __s1, const _CharT* __s2, size_t __n) _NOEXCEPT |
| 331 | 333 | } |
| 332 | 334 | |
| 333 | 335 | template <class _CharT> |
| 334 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 336 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 335 | 337 | _CharT* __copy_constexpr(_CharT* __s1, const _CharT* __s2, size_t __n) _NOEXCEPT |
| 336 | 338 | { |
| 337 | 339 | _VSTD::copy_n(__s2, __n, __s1); |
| ... | ... | @@ -339,7 +341,7 @@ _CharT* __copy_constexpr(_CharT* __s1, const _CharT* __s2, size_t __n) _NOEXCEPT |
| 339 | 341 | } |
| 340 | 342 | |
| 341 | 343 | template <class _CharT> |
| 342 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 344 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 343 | 345 | _CharT* __assign_constexpr(_CharT* __s, size_t __n, _CharT __a) _NOEXCEPT |
| 344 | 346 | { |
| 345 | 347 | _VSTD::fill_n(__s, __n, __a); |
| ... | ... | @@ -370,27 +372,27 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char> |
| 370 | 372 | length(const char_type* __s) _NOEXCEPT {return __builtin_strlen(__s);} |
| 371 | 373 | static _LIBCPP_CONSTEXPR_AFTER_CXX14 |
| 372 | 374 | const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; |
| 373 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 375 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 374 | 376 | char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT |
| 375 | 377 | { |
| 376 | 378 | return __libcpp_is_constant_evaluated() |
| 377 | ? __move_constexpr(__s1, __s2, __n) | |
| 378 | : __n == 0 ? __s1 : (char_type*)memmove(__s1, __s2, __n); | |
| 379 | ? _VSTD::__move_constexpr(__s1, __s2, __n) | |
| 380 | : __n == 0 ? __s1 : (char_type*)_VSTD::memmove(__s1, __s2, __n); | |
| 379 | 381 | } |
| 380 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 382 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 381 | 383 | char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT |
| 382 | 384 | { |
| 383 | 385 | _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); |
| 384 | 386 | return __libcpp_is_constant_evaluated() |
| 385 | ? __copy_constexpr(__s1, __s2, __n) | |
| 386 | : __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n); | |
| 387 | ? _VSTD::__copy_constexpr(__s1, __s2, __n) | |
| 388 | : __n == 0 ? __s1 : (char_type*)_VSTD::memcpy(__s1, __s2, __n); | |
| 387 | 389 | } |
| 388 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 390 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 389 | 391 | char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT |
| 390 | 392 | { |
| 391 | 393 | return __libcpp_is_constant_evaluated() |
| 392 | ? __assign_constexpr(__s, __n, __a) | |
| 393 | : __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n); | |
| 394 | ? _VSTD::__assign_constexpr(__s, __n, __a) | |
| 395 | : __n == 0 ? __s : (char_type*)_VSTD::memset(__s, to_int_type(__a), __n); | |
| 394 | 396 | } |
| 395 | 397 | |
| 396 | 398 | static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT |
| ... | ... | @@ -414,7 +416,7 @@ char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t |
| 414 | 416 | #if __has_feature(cxx_constexpr_string_builtins) |
| 415 | 417 | return __builtin_memcmp(__s1, __s2, __n); |
| 416 | 418 | #elif _LIBCPP_STD_VER <= 14 |
| 417 | return memcmp(__s1, __s2, __n); | |
| 419 | return _VSTD::memcmp(__s1, __s2, __n); | |
| 418 | 420 | #else |
| 419 | 421 | for (; __n; --__n, ++__s1, ++__s2) |
| 420 | 422 | { |
| ... | ... | @@ -436,7 +438,7 @@ char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a) |
| 436 | 438 | #if __has_feature(cxx_constexpr_string_builtins) |
| 437 | 439 | return __builtin_char_memchr(__s, to_int_type(__a), __n); |
| 438 | 440 | #elif _LIBCPP_STD_VER <= 14 |
| 439 | return (const char_type*) memchr(__s, to_int_type(__a), __n); | |
| 441 | return (const char_type*) _VSTD::memchr(__s, to_int_type(__a), __n); | |
| 440 | 442 | #else |
| 441 | 443 | for (; __n; --__n) |
| 442 | 444 | { |
| ... | ... | @@ -473,27 +475,27 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> |
| 473 | 475 | size_t length(const char_type* __s) _NOEXCEPT; |
| 474 | 476 | static _LIBCPP_CONSTEXPR_AFTER_CXX14 |
| 475 | 477 | const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; |
| 476 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 478 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 477 | 479 | char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT |
| 478 | 480 | { |
| 479 | 481 | return __libcpp_is_constant_evaluated() |
| 480 | ? __move_constexpr(__s1, __s2, __n) | |
| 481 | : __n == 0 ? __s1 : wmemmove(__s1, __s2, __n); | |
| 482 | ? _VSTD::__move_constexpr(__s1, __s2, __n) | |
| 483 | : __n == 0 ? __s1 : _VSTD::wmemmove(__s1, __s2, __n); | |
| 482 | 484 | } |
| 483 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 485 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 484 | 486 | char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT |
| 485 | 487 | { |
| 486 | 488 | _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); |
| 487 | 489 | return __libcpp_is_constant_evaluated() |
| 488 | ? __copy_constexpr(__s1, __s2, __n) | |
| 489 | : __n == 0 ? __s1 : wmemcpy(__s1, __s2, __n); | |
| 490 | ? _VSTD::__copy_constexpr(__s1, __s2, __n) | |
| 491 | : __n == 0 ? __s1 : _VSTD::wmemcpy(__s1, __s2, __n); | |
| 490 | 492 | } |
| 491 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 493 | static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 492 | 494 | char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT |
| 493 | 495 | { |
| 494 | 496 | return __libcpp_is_constant_evaluated() |
| 495 | ? __assign_constexpr(__s, __n, __a) | |
| 496 | : __n == 0 ? __s : wmemset(__s, __a, __n); | |
| 497 | ? _VSTD::__assign_constexpr(__s, __n, __a) | |
| 498 | : __n == 0 ? __s : _VSTD::wmemset(__s, __a, __n); | |
| 497 | 499 | } |
| 498 | 500 | static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT |
| 499 | 501 | {return eq_int_type(__c, eof()) ? ~eof() : __c;} |
| ... | ... | @@ -516,7 +518,7 @@ char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size |
| 516 | 518 | #if __has_feature(cxx_constexpr_string_builtins) |
| 517 | 519 | return __builtin_wmemcmp(__s1, __s2, __n); |
| 518 | 520 | #elif _LIBCPP_STD_VER <= 14 |
| 519 | return wmemcmp(__s1, __s2, __n); | |
| 521 | return _VSTD::wmemcmp(__s1, __s2, __n); | |
| 520 | 522 | #else |
| 521 | 523 | for (; __n; --__n, ++__s1, ++__s2) |
| 522 | 524 | { |
| ... | ... | @@ -548,7 +550,7 @@ char_traits<wchar_t>::length(const char_type* __s) _NOEXCEPT |
| 548 | 550 | #if __has_feature(cxx_constexpr_string_builtins) |
| 549 | 551 | return __builtin_wcslen(__s); |
| 550 | 552 | #elif _LIBCPP_STD_VER <= 14 |
| 551 | return wcslen(__s); | |
| 553 | return _VSTD::wcslen(__s); | |
| 552 | 554 | #else |
| 553 | 555 | size_t __len = 0; |
| 554 | 556 | for (; !eq(*__s, char_type(0)); ++__s) |
| ... | ... | @@ -566,7 +568,7 @@ char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __ |
| 566 | 568 | #if __has_feature(cxx_constexpr_string_builtins) |
| 567 | 569 | return __builtin_wmemchr(__s, __a, __n); |
| 568 | 570 | #elif _LIBCPP_STD_VER <= 14 |
| 569 | return wmemchr(__s, __a, __n); | |
| 571 | return _VSTD::wmemchr(__s, __a, __n); | |
| 570 | 572 | #else |
| 571 | 573 | for (; __n; --__n) |
| 572 | 574 | { |
| ... | ... | @@ -606,29 +608,29 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t> |
| 606 | 608 | _LIBCPP_INLINE_VISIBILITY static constexpr |
| 607 | 609 | const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; |
| 608 | 610 | |
| 609 | static _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 611 | static _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 610 | 612 | char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT |
| 611 | 613 | { |
| 612 | 614 | return __libcpp_is_constant_evaluated() |
| 613 | ? __move_constexpr(__s1, __s2, __n) | |
| 614 | : __n == 0 ? __s1 : (char_type*)memmove(__s1, __s2, __n); | |
| 615 | ? _VSTD::__move_constexpr(__s1, __s2, __n) | |
| 616 | : __n == 0 ? __s1 : (char_type*)_VSTD::memmove(__s1, __s2, __n); | |
| 615 | 617 | } |
| 616 | 618 | |
| 617 | static _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 619 | static _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 618 | 620 | char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT |
| 619 | 621 | { |
| 620 | 622 | _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); |
| 621 | 623 | return __libcpp_is_constant_evaluated() |
| 622 | ? __copy_constexpr(__s1, __s2, __n) | |
| 623 | : __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n); | |
| 624 | ? _VSTD::__copy_constexpr(__s1, __s2, __n) | |
| 625 | : __n == 0 ? __s1 : (char_type*)_VSTD::memcpy(__s1, __s2, __n); | |
| 624 | 626 | } |
| 625 | 627 | |
| 626 | static _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 628 | static _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 627 | 629 | char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT |
| 628 | 630 | { |
| 629 | 631 | return __libcpp_is_constant_evaluated() |
| 630 | ? __assign_constexpr(__s, __n, __a) | |
| 631 | : __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n); | |
| 632 | ? _VSTD::__assign_constexpr(__s, __n, __a) | |
| 633 | : __n == 0 ? __s : (char_type*)_VSTD::memset(__s, to_int_type(__a), __n); | |
| 632 | 634 | } |
| 633 | 635 | |
| 634 | 636 | static inline constexpr int_type not_eof(int_type __c) noexcept |
| ... | ... | @@ -683,7 +685,7 @@ char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __ |
| 683 | 685 | return __s; |
| 684 | 686 | ++__s; |
| 685 | 687 | } |
| 686 | return 0; | |
| 688 | return nullptr; | |
| 687 | 689 | } |
| 688 | 690 | |
| 689 | 691 | #endif // #_LIBCPP_NO_HAS_CHAR8_T |
| ... | ... | @@ -765,7 +767,7 @@ char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& _ |
| 765 | 767 | return __s; |
| 766 | 768 | ++__s; |
| 767 | 769 | } |
| 768 | return 0; | |
| 770 | return nullptr; | |
| 769 | 771 | } |
| 770 | 772 | |
| 771 | 773 | inline _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| ... | ... | @@ -885,7 +887,7 @@ char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& _ |
| 885 | 887 | return __s; |
| 886 | 888 | ++__s; |
| 887 | 889 | } |
| 888 | return 0; | |
| 890 | return nullptr; | |
| 889 | 891 | } |
| 890 | 892 | |
| 891 | 893 | inline _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| ... | ... | @@ -943,7 +945,7 @@ __str_find(const _CharT *__p, _SizeT __sz, |
| 943 | 945 | if (__pos >= __sz) |
| 944 | 946 | return __npos; |
| 945 | 947 | const _CharT* __r = _Traits::find(__p + __pos, __sz - __pos, __c); |
| 946 | if (__r == 0) | |
| 948 | if (__r == nullptr) | |
| 947 | 949 | return __npos; |
| 948 | 950 | return static_cast<_SizeT>(__r - __p); |
| 949 | 951 | } |
| ... | ... | @@ -972,7 +974,7 @@ __search_substring(const _CharT *__first1, const _CharT *__last1, |
| 972 | 974 | |
| 973 | 975 | // Find __f2 the first byte matching in __first1. |
| 974 | 976 | __first1 = _Traits::find(__first1, __len1 - __len2 + 1, __f2); |
| 975 | if (__first1 == 0) | |
| 977 | if (__first1 == nullptr) | |
| 976 | 978 | return __last1; |
| 977 | 979 | |
| 978 | 980 | // It is faster to compare from the first byte of __first1 even if we |
| ... | ... | @@ -1095,7 +1097,7 @@ __str_find_first_not_of(const _CharT *__p, _SizeT __sz, |
| 1095 | 1097 | { |
| 1096 | 1098 | const _CharT* __pe = __p + __sz; |
| 1097 | 1099 | for (const _CharT* __ps = __p + __pos; __ps != __pe; ++__ps) |
| 1098 | if (_Traits::find(__s, __n, *__ps) == 0) | |
| 1100 | if (_Traits::find(__s, __n, *__ps) == nullptr) | |
| 1099 | 1101 | return static_cast<_SizeT>(__ps - __p); |
| 1100 | 1102 | } |
| 1101 | 1103 | return __npos; |
| ... | ... | @@ -1129,7 +1131,7 @@ __str_find_last_not_of(const _CharT *__p, _SizeT __sz, |
| 1129 | 1131 | else |
| 1130 | 1132 | __pos = __sz; |
| 1131 | 1133 | for (const _CharT* __ps = __p + __pos; __ps != __p;) |
| 1132 | if (_Traits::find(__s, __n, *--__ps) == 0) | |
| 1134 | if (_Traits::find(__s, __n, *--__ps) == nullptr) | |
| 1133 | 1135 | return static_cast<_SizeT>(__ps - __p); |
| 1134 | 1136 | return __npos; |
| 1135 | 1137 | } |
lib/libcxx/include/__support/android/locale_bionic.h created+69| ... | ... | @@ -0,0 +1,69 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H | |
| 11 | #define _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H | |
| 12 | ||
| 13 | #if defined(__BIONIC__) | |
| 14 | ||
| 15 | #ifdef __cplusplus | |
| 16 | extern "C" { | |
| 17 | #endif | |
| 18 | ||
| 19 | #include <stdlib.h> | |
| 20 | #include <xlocale.h> | |
| 21 | ||
| 22 | #ifdef __cplusplus | |
| 23 | } | |
| 24 | #endif | |
| 25 | ||
| 26 | #if defined(__ANDROID__) | |
| 27 | ||
| 28 | #include <android/api-level.h> | |
| 29 | #include <android/ndk-version.h> | |
| 30 | #if __ANDROID_API__ < 21 | |
| 31 | #include <__support/xlocale/__posix_l_fallback.h> | |
| 32 | #endif | |
| 33 | // In NDK versions later than 16, locale-aware functions are provided by | |
| 34 | // legacy_stdlib_inlines.h | |
| 35 | #if __NDK_MAJOR__ <= 16 | |
| 36 | #if __ANDROID_API__ < 21 | |
| 37 | #include <__support/xlocale/__strtonum_fallback.h> | |
| 38 | #elif __ANDROID_API__ < 26 | |
| 39 | ||
| 40 | #if defined(__cplusplus) | |
| 41 | extern "C" { | |
| 42 | #endif | |
| 43 | ||
| 44 | inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char* __nptr, char** __endptr, | |
| 45 | locale_t) { | |
| 46 | return ::strtof(__nptr, __endptr); | |
| 47 | } | |
| 48 | ||
| 49 | inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char* __nptr, | |
| 50 | char** __endptr, locale_t) { | |
| 51 | return ::strtod(__nptr, __endptr); | |
| 52 | } | |
| 53 | ||
| 54 | inline _LIBCPP_INLINE_VISIBILITY long strtol_l(const char* __nptr, char** __endptr, | |
| 55 | int __base, locale_t) { | |
| 56 | return ::strtol(__nptr, __endptr, __base); | |
| 57 | } | |
| 58 | ||
| 59 | #if defined(__cplusplus) | |
| 60 | } | |
| 61 | #endif | |
| 62 | ||
| 63 | #endif // __ANDROID_API__ < 26 | |
| 64 | ||
| 65 | #endif // __NDK_MAJOR__ <= 16 | |
| 66 | #endif // defined(__ANDROID__) | |
| 67 | ||
| 68 | #endif // defined(__BIONIC__) | |
| 69 | #endif // _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H |
lib/libcxx/include/__support/fuchsia/xlocale.h created+22| ... | ... | @@ -0,0 +1,22 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H | |
| 11 | #define _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H | |
| 12 | ||
| 13 | #if defined(__Fuchsia__) | |
| 14 | ||
| 15 | #include <cstdlib> | |
| 16 | #include <cwchar> | |
| 17 | #include <__support/xlocale/__posix_l_fallback.h> | |
| 18 | #include <__support/xlocale/__strtonum_fallback.h> | |
| 19 | ||
| 20 | #endif // defined(__Fuchsia__) | |
| 21 | ||
| 22 | #endif // _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H |
lib/libcxx/include/__support/ibm/limits.h created+98| ... | ... | @@ -0,0 +1,98 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_LIMITS_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_LIMITS_H | |
| 12 | ||
| 13 | #if !defined(_AIX) // Linux | |
| 14 | #include <math.h> // for HUGE_VAL, HUGE_VALF, HUGE_VALL, and NAN | |
| 15 | ||
| 16 | static const unsigned int _QNAN_F = 0x7fc00000; | |
| 17 | #define NANF (*((float *)(&_QNAN_F))) | |
| 18 | static const unsigned int _QNAN_LDBL128[4] = {0x7ff80000, 0x0, 0x0, 0x0}; | |
| 19 | #define NANL (*((long double *)(&_QNAN_LDBL128))) | |
| 20 | static const unsigned int _SNAN_F= 0x7f855555; | |
| 21 | #define NANSF (*((float *)(&_SNAN_F))) | |
| 22 | static const unsigned int _SNAN_D[2] = {0x7ff55555, 0x55555555}; | |
| 23 | #define NANS (*((double *)(&_SNAN_D))) | |
| 24 | static const unsigned int _SNAN_LDBL128[4] = {0x7ff55555, 0x55555555, 0x0, 0x0}; | |
| 25 | #define NANSL (*((long double *)(&_SNAN_LDBL128))) | |
| 26 | ||
| 27 | #define __builtin_huge_val() HUGE_VAL | |
| 28 | #define __builtin_huge_valf() HUGE_VALF | |
| 29 | #define __builtin_huge_vall() HUGE_VALL | |
| 30 | #define __builtin_nan(__dummy) NAN | |
| 31 | #define __builtin_nanf(__dummy) NANF | |
| 32 | #define __builtin_nanl(__dummy) NANL | |
| 33 | #define __builtin_nans(__dummy) NANS | |
| 34 | #define __builtin_nansf(__dummy) NANSF | |
| 35 | #define __builtin_nansl(__dummy) NANSL | |
| 36 | ||
| 37 | #else | |
| 38 | ||
| 39 | #include <math.h> | |
| 40 | #include <float.h> // limit constants | |
| 41 | ||
| 42 | #define __builtin_huge_val() HUGE_VAL //0x7ff0000000000000 | |
| 43 | #define __builtin_huge_valf() HUGE_VALF //0x7f800000 | |
| 44 | #define __builtin_huge_vall() HUGE_VALL //0x7ff0000000000000 | |
| 45 | #define __builtin_nan(__dummy) nan(__dummy) //0x7ff8000000000000 | |
| 46 | #define __builtin_nanf(__dummy) nanf(__dummy) // 0x7ff80000 | |
| 47 | #define __builtin_nanl(__dummy) nanl(__dummy) //0x7ff8000000000000 | |
| 48 | #define __builtin_nans(__dummy) DBL_SNAN //0x7ff5555555555555 | |
| 49 | #define __builtin_nansf(__dummy) FLT_SNAN //0x7f855555 | |
| 50 | #define __builtin_nansl(__dummy) DBL_SNAN //0x7ff5555555555555 | |
| 51 | ||
| 52 | #define __FLT_MANT_DIG__ FLT_MANT_DIG | |
| 53 | #define __FLT_DIG__ FLT_DIG | |
| 54 | #define __FLT_RADIX__ FLT_RADIX | |
| 55 | #define __FLT_MIN_EXP__ FLT_MIN_EXP | |
| 56 | #define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP | |
| 57 | #define __FLT_MAX_EXP__ FLT_MAX_EXP | |
| 58 | #define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP | |
| 59 | #define __FLT_MIN__ FLT_MIN | |
| 60 | #define __FLT_MAX__ FLT_MAX | |
| 61 | #define __FLT_EPSILON__ FLT_EPSILON | |
| 62 | // predefined by XLC on LoP | |
| 63 | #define __FLT_DENORM_MIN__ 1.40129846e-45F | |
| 64 | ||
| 65 | #define __DBL_MANT_DIG__ DBL_MANT_DIG | |
| 66 | #define __DBL_DIG__ DBL_DIG | |
| 67 | #define __DBL_MIN_EXP__ DBL_MIN_EXP | |
| 68 | #define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP | |
| 69 | #define __DBL_MAX_EXP__ DBL_MAX_EXP | |
| 70 | #define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP | |
| 71 | #define __DBL_MIN__ DBL_MIN | |
| 72 | #define __DBL_MAX__ DBL_MAX | |
| 73 | #define __DBL_EPSILON__ DBL_EPSILON | |
| 74 | // predefined by XLC on LoP | |
| 75 | #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 | |
| 76 | ||
| 77 | #define __LDBL_MANT_DIG__ LDBL_MANT_DIG | |
| 78 | #define __LDBL_DIG__ LDBL_DIG | |
| 79 | #define __LDBL_MIN_EXP__ LDBL_MIN_EXP | |
| 80 | #define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP | |
| 81 | #define __LDBL_MAX_EXP__ LDBL_MAX_EXP | |
| 82 | #define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP | |
| 83 | #define __LDBL_MIN__ LDBL_MIN | |
| 84 | #define __LDBL_MAX__ LDBL_MAX | |
| 85 | #define __LDBL_EPSILON__ LDBL_EPSILON | |
| 86 | // predefined by XLC on LoP | |
| 87 | #if __LONGDOUBLE128 | |
| 88 | #define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L | |
| 89 | #else | |
| 90 | #define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L | |
| 91 | #endif | |
| 92 | ||
| 93 | // predefined by XLC on LoP | |
| 94 | #define __CHAR_BIT__ 8 | |
| 95 | ||
| 96 | #endif // _AIX | |
| 97 | ||
| 98 | #endif // _LIBCPP_SUPPORT_IBM_LIMITS_H |
lib/libcxx/include/__support/ibm/locale_mgmt_aix.h created+84| ... | ... | @@ -0,0 +1,84 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H | |
| 12 | ||
| 13 | #if defined(_AIX) | |
| 14 | #include "cstdlib" | |
| 15 | ||
| 16 | #ifdef __cplusplus | |
| 17 | extern "C" { | |
| 18 | #endif | |
| 19 | ||
| 20 | #if !defined(_AIX71) | |
| 21 | // AIX 7.1 and higher has these definitions. Definitions and stubs | |
| 22 | // are provied here as a temporary workaround on AIX 6.1. | |
| 23 | ||
| 24 | #define LC_COLLATE_MASK 1 | |
| 25 | #define LC_CTYPE_MASK 2 | |
| 26 | #define LC_MESSAGES_MASK 4 | |
| 27 | #define LC_MONETARY_MASK 8 | |
| 28 | #define LC_NUMERIC_MASK 16 | |
| 29 | #define LC_TIME_MASK 32 | |
| 30 | #define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | \ | |
| 31 | LC_MESSAGES_MASK | LC_MONETARY_MASK |\ | |
| 32 | LC_NUMERIC_MASK | LC_TIME_MASK) | |
| 33 | ||
| 34 | typedef void* locale_t; | |
| 35 | ||
| 36 | // The following are stubs. They are not supported on AIX 6.1. | |
| 37 | static inline | |
| 38 | locale_t newlocale(int category_mask, const char *locale, locale_t base) | |
| 39 | { | |
| 40 | _LC_locale_t *newloc, *loc; | |
| 41 | if ((loc = (_LC_locale_t *)__xopen_locale(locale)) == NULL) | |
| 42 | { | |
| 43 | errno = EINVAL; | |
| 44 | return (locale_t)0; | |
| 45 | } | |
| 46 | if ((newloc = (_LC_locale_t *)calloc(1, sizeof(_LC_locale_t))) == NULL) | |
| 47 | { | |
| 48 | errno = ENOMEM; | |
| 49 | return (locale_t)0; | |
| 50 | } | |
| 51 | if (!base) | |
| 52 | base = (_LC_locale_t *)__xopen_locale("C"); | |
| 53 | memcpy(newloc, base, sizeof (_LC_locale_t)); | |
| 54 | if (category_mask & LC_COLLATE_MASK) | |
| 55 | newloc->lc_collate = loc->lc_collate; | |
| 56 | if (category_mask & LC_CTYPE_MASK) | |
| 57 | newloc->lc_ctype = loc->lc_ctype; | |
| 58 | //if (category_mask & LC_MESSAGES_MASK) | |
| 59 | // newloc->lc_messages = loc->lc_messages; | |
| 60 | if (category_mask & LC_MONETARY_MASK) | |
| 61 | newloc->lc_monetary = loc->lc_monetary; | |
| 62 | if (category_mask & LC_TIME_MASK) | |
| 63 | newloc->lc_time = loc->lc_time; | |
| 64 | if (category_mask & LC_NUMERIC_MASK) | |
| 65 | newloc->lc_numeric = loc->lc_numeric; | |
| 66 | return (locale_t)newloc; | |
| 67 | } | |
| 68 | static inline | |
| 69 | void freelocale(locale_t locobj) | |
| 70 | { | |
| 71 | free(locobj); | |
| 72 | } | |
| 73 | static inline | |
| 74 | locale_t uselocale(locale_t newloc) | |
| 75 | { | |
| 76 | return (locale_t)0; | |
| 77 | } | |
| 78 | #endif // !defined(_AIX71) | |
| 79 | ||
| 80 | #ifdef __cplusplus | |
| 81 | } | |
| 82 | #endif | |
| 83 | #endif // defined(_AIX) | |
| 84 | #endif // _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H |
lib/libcxx/include/__support/ibm/nanosleep.h created+38| ... | ... | @@ -0,0 +1,38 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_NANOSLEEP_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_NANOSLEEP_H | |
| 12 | ||
| 13 | #include <unistd.h> | |
| 14 | ||
| 15 | inline int nanosleep(const struct timespec* req, struct timespec* rem) | |
| 16 | { | |
| 17 | // The nanosleep() function is not available on z/OS. Therefore, we will call | |
| 18 | // sleep() to sleep for whole seconds and usleep() to sleep for any remaining | |
| 19 | // fraction of a second. Any remaining nanoseconds will round up to the next | |
| 20 | // microsecond. | |
| 21 | ||
| 22 | useconds_t __micro_sec = (rem->tv_nsec + 999) / 1000; | |
| 23 | if (__micro_sec > 999999) | |
| 24 | { | |
| 25 | ++rem->tv_sec; | |
| 26 | __micro_sec -= 1000000; | |
| 27 | } | |
| 28 | while (rem->tv_sec) | |
| 29 | rem->tv_sec = sleep(rem->tv_sec); | |
| 30 | if (__micro_sec) { | |
| 31 | rem->tv_nsec = __micro_sec * 1000; | |
| 32 | return usleep(__micro_sec); | |
| 33 | } | |
| 34 | rem->tv_nsec = 0; | |
| 35 | return 0; | |
| 36 | } | |
| 37 | ||
| 38 | #endif // _LIBCPP_SUPPORT_IBM_NANOSLEEP_H |
lib/libcxx/include/__support/ibm/support.h created+53| ... | ... | @@ -0,0 +1,53 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_SUPPORT_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_SUPPORT_H | |
| 12 | ||
| 13 | extern "builtin" int __popcnt4(unsigned int); | |
| 14 | extern "builtin" int __popcnt8(unsigned long long); | |
| 15 | extern "builtin" unsigned int __cnttz4(unsigned int); | |
| 16 | extern "builtin" unsigned int __cnttz8(unsigned long long); | |
| 17 | extern "builtin" unsigned int __cntlz4(unsigned int); | |
| 18 | extern "builtin" unsigned int __cntlz8(unsigned long long); | |
| 19 | ||
| 20 | // Builtin functions for counting population | |
| 21 | #define __builtin_popcount(x) __popcnt4(x) | |
| 22 | #define __builtin_popcountll(x) __popcnt8(x) | |
| 23 | #if defined(__64BIT__) | |
| 24 | #define __builtin_popcountl(x) __builtin_popcountll(x) | |
| 25 | #else | |
| 26 | #define __builtin_popcountl(x) __builtin_popcount(x) | |
| 27 | #endif | |
| 28 | ||
| 29 | // Builtin functions for counting trailing zeros | |
| 30 | #define __builtin_ctz(x) __cnttz4(x) | |
| 31 | #define __builtin_ctzll(x) __cnttz8(x) | |
| 32 | #if defined(__64BIT__) | |
| 33 | #define __builtin_ctzl(x) __builtin_ctzll(x) | |
| 34 | #else | |
| 35 | #define __builtin_ctzl(x) __builtin_ctz(x) | |
| 36 | #endif | |
| 37 | ||
| 38 | // Builtin functions for counting leading zeros | |
| 39 | #define __builtin_clz(x) __cntlz4(x) | |
| 40 | #define __builtin_clzll(x) __cntlz8(x) | |
| 41 | #if defined(__64BIT__) | |
| 42 | #define __builtin_clzl(x) __builtin_clzll(x) | |
| 43 | #else | |
| 44 | #define __builtin_clzl(x) __builtin_clz(x) | |
| 45 | #endif | |
| 46 | ||
| 47 | #if defined(__64BIT__) | |
| 48 | #define __SIZE_WIDTH__ 64 | |
| 49 | #else | |
| 50 | #define __SIZE_WIDTH__ 32 | |
| 51 | #endif | |
| 52 | ||
| 53 | #endif // _LIBCPP_SUPPORT_IBM_SUPPORT_H |
lib/libcxx/include/__support/ibm/xlocale.h created+276| ... | ... | @@ -0,0 +1,276 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_XLOCALE_H | |
| 12 | ||
| 13 | #include <__support/ibm/locale_mgmt_aix.h> | |
| 14 | ||
| 15 | #include "cstdlib" | |
| 16 | ||
| 17 | #ifdef __cplusplus | |
| 18 | extern "C" { | |
| 19 | #endif | |
| 20 | ||
| 21 | #if defined(_AIX) | |
| 22 | #if !defined(_AIX71) | |
| 23 | // AIX 7.1 and higher has these definitions. Definitions and stubs | |
| 24 | // are provied here as a temporary workaround on AIX 6.1. | |
| 25 | static inline | |
| 26 | int isalnum_l(int c, locale_t locale) | |
| 27 | { | |
| 28 | return __xisalnum(locale, c); | |
| 29 | } | |
| 30 | static inline | |
| 31 | int isalpha_l(int c, locale_t locale) | |
| 32 | { | |
| 33 | return __xisalpha(locale, c); | |
| 34 | } | |
| 35 | static inline | |
| 36 | int isblank_l(int c, locale_t locale) | |
| 37 | { | |
| 38 | return __xisblank(locale, c); | |
| 39 | } | |
| 40 | static inline | |
| 41 | int iscntrl_l(int c, locale_t locale) | |
| 42 | { | |
| 43 | return __xiscntrl(locale, c); | |
| 44 | } | |
| 45 | static inline | |
| 46 | int isdigit_l(int c, locale_t locale) | |
| 47 | { | |
| 48 | return __xisdigit(locale, c); | |
| 49 | } | |
| 50 | static inline | |
| 51 | int isgraph_l(int c, locale_t locale) | |
| 52 | { | |
| 53 | return __xisgraph(locale, c); | |
| 54 | } | |
| 55 | static inline | |
| 56 | int islower_l(int c, locale_t locale) | |
| 57 | { | |
| 58 | return __xislower(locale, c); | |
| 59 | } | |
| 60 | static inline | |
| 61 | int isprint_l(int c, locale_t locale) | |
| 62 | { | |
| 63 | return __xisprint(locale, c); | |
| 64 | } | |
| 65 | ||
| 66 | static inline | |
| 67 | int ispunct_l(int c, locale_t locale) | |
| 68 | { | |
| 69 | return __xispunct(locale, c); | |
| 70 | } | |
| 71 | static inline | |
| 72 | int isspace_l(int c, locale_t locale) | |
| 73 | { | |
| 74 | return __xisspace(locale, c); | |
| 75 | } | |
| 76 | static inline | |
| 77 | int isupper_l(int c, locale_t locale) | |
| 78 | { | |
| 79 | return __xisupper(locale, c); | |
| 80 | } | |
| 81 | ||
| 82 | static inline | |
| 83 | int isxdigit_l(int c, locale_t locale) | |
| 84 | { | |
| 85 | return __xisxdigit(locale, c); | |
| 86 | } | |
| 87 | ||
| 88 | static inline | |
| 89 | int iswalnum_l(wchar_t wc, locale_t locale) | |
| 90 | { | |
| 91 | return __xiswalnum(locale, wc); | |
| 92 | } | |
| 93 | ||
| 94 | static inline | |
| 95 | int iswalpha_l(wchar_t wc, locale_t locale) | |
| 96 | { | |
| 97 | return __xiswalpha(locale, wc); | |
| 98 | } | |
| 99 | ||
| 100 | static inline | |
| 101 | int iswblank_l(wchar_t wc, locale_t locale) | |
| 102 | { | |
| 103 | return __xiswblank(locale, wc); | |
| 104 | } | |
| 105 | ||
| 106 | static inline | |
| 107 | int iswcntrl_l(wchar_t wc, locale_t locale) | |
| 108 | { | |
| 109 | return __xiswcntrl(locale, wc); | |
| 110 | } | |
| 111 | ||
| 112 | static inline | |
| 113 | int iswdigit_l(wchar_t wc, locale_t locale) | |
| 114 | { | |
| 115 | return __xiswdigit(locale, wc); | |
| 116 | } | |
| 117 | ||
| 118 | static inline | |
| 119 | int iswgraph_l(wchar_t wc, locale_t locale) | |
| 120 | { | |
| 121 | return __xiswgraph(locale, wc); | |
| 122 | } | |
| 123 | ||
| 124 | static inline | |
| 125 | int iswlower_l(wchar_t wc, locale_t locale) | |
| 126 | { | |
| 127 | return __xiswlower(locale, wc); | |
| 128 | } | |
| 129 | ||
| 130 | static inline | |
| 131 | int iswprint_l(wchar_t wc, locale_t locale) | |
| 132 | { | |
| 133 | return __xiswprint(locale, wc); | |
| 134 | } | |
| 135 | ||
| 136 | static inline | |
| 137 | int iswpunct_l(wchar_t wc, locale_t locale) | |
| 138 | { | |
| 139 | return __xiswpunct(locale, wc); | |
| 140 | } | |
| 141 | ||
| 142 | static inline | |
| 143 | int iswspace_l(wchar_t wc, locale_t locale) | |
| 144 | { | |
| 145 | return __xiswspace(locale, wc); | |
| 146 | } | |
| 147 | ||
| 148 | static inline | |
| 149 | int iswupper_l(wchar_t wc, locale_t locale) | |
| 150 | { | |
| 151 | return __xiswupper(locale, wc); | |
| 152 | } | |
| 153 | ||
| 154 | static inline | |
| 155 | int iswxdigit_l(wchar_t wc, locale_t locale) | |
| 156 | { | |
| 157 | return __xiswxdigit(locale, wc); | |
| 158 | } | |
| 159 | ||
| 160 | static inline | |
| 161 | int iswctype_l(wint_t wc, wctype_t desc, locale_t locale) | |
| 162 | { | |
| 163 | return __xiswctype(locale, wc, desc); | |
| 164 | } | |
| 165 | ||
| 166 | static inline | |
| 167 | int toupper_l(int c, locale_t locale) | |
| 168 | { | |
| 169 | return __xtoupper(locale, c); | |
| 170 | } | |
| 171 | static inline | |
| 172 | int tolower_l(int c, locale_t locale) | |
| 173 | { | |
| 174 | return __xtolower(locale, c); | |
| 175 | } | |
| 176 | static inline | |
| 177 | wint_t towupper_l(wint_t wc, locale_t locale) | |
| 178 | { | |
| 179 | return __xtowupper(locale, wc); | |
| 180 | } | |
| 181 | static inline | |
| 182 | wint_t towlower_l(wint_t wc, locale_t locale) | |
| 183 | { | |
| 184 | return __xtowlower(locale, wc); | |
| 185 | } | |
| 186 | ||
| 187 | static inline | |
| 188 | int strcoll_l(const char *__s1, const char *__s2, locale_t locale) | |
| 189 | { | |
| 190 | return __xstrcoll(locale, __s1, __s2); | |
| 191 | } | |
| 192 | static inline | |
| 193 | int wcscoll_l(const wchar_t *__s1, const wchar_t *__s2, locale_t locale) | |
| 194 | { | |
| 195 | return __xwcscoll(locale, __s1, __s2); | |
| 196 | } | |
| 197 | static inline | |
| 198 | size_t strxfrm_l(char *__s1, const char *__s2, size_t __n, locale_t locale) | |
| 199 | { | |
| 200 | return __xstrxfrm(locale, __s1, __s2, __n); | |
| 201 | } | |
| 202 | ||
| 203 | static inline | |
| 204 | size_t wcsxfrm_l(wchar_t *__ws1, const wchar_t *__ws2, size_t __n, | |
| 205 | locale_t locale) | |
| 206 | { | |
| 207 | return __xwcsxfrm(locale, __ws1, __ws2, __n); | |
| 208 | } | |
| 209 | #endif // !defined(_AIX71) | |
| 210 | ||
| 211 | // strftime_l() is defined by POSIX. However, AIX 7.1 and z/OS do not have it | |
| 212 | // implemented yet. z/OS retrieves it from the POSIX fallbacks. | |
| 213 | static inline | |
| 214 | size_t strftime_l(char *__s, size_t __size, const char *__fmt, | |
| 215 | const struct tm *__tm, locale_t locale) { | |
| 216 | return __xstrftime(locale, __s, __size, __fmt, __tm); | |
| 217 | } | |
| 218 | ||
| 219 | #elif defined(__MVS__) | |
| 220 | #include <wctype.h> | |
| 221 | // POSIX routines | |
| 222 | #include <__support/xlocale/__posix_l_fallback.h> | |
| 223 | #endif // defined(__MVS__) | |
| 224 | ||
| 225 | // The following are not POSIX routines. These are quick-and-dirty hacks | |
| 226 | // to make things pretend to work | |
| 227 | static inline | |
| 228 | long long strtoll_l(const char *__nptr, char **__endptr, | |
| 229 | int __base, locale_t locale) { | |
| 230 | return strtoll(__nptr, __endptr, __base); | |
| 231 | } | |
| 232 | static inline | |
| 233 | long strtol_l(const char *__nptr, char **__endptr, | |
| 234 | int __base, locale_t locale) { | |
| 235 | return strtol(__nptr, __endptr, __base); | |
| 236 | } | |
| 237 | static inline | |
| 238 | long double strtold_l(const char *__nptr, char **__endptr, | |
| 239 | locale_t locale) { | |
| 240 | return strtold(__nptr, __endptr); | |
| 241 | } | |
| 242 | static inline | |
| 243 | unsigned long long strtoull_l(const char *__nptr, char **__endptr, | |
| 244 | int __base, locale_t locale) { | |
| 245 | return strtoull(__nptr, __endptr, __base); | |
| 246 | } | |
| 247 | static inline | |
| 248 | unsigned long strtoul_l(const char *__nptr, char **__endptr, | |
| 249 | int __base, locale_t locale) { | |
| 250 | return strtoul(__nptr, __endptr, __base); | |
| 251 | } | |
| 252 | ||
| 253 | static inline | |
| 254 | int vasprintf(char **strp, const char *fmt, va_list ap) | |
| 255 | { | |
| 256 | const size_t buff_size = 256; | |
| 257 | int str_size; | |
| 258 | if ((*strp = (char *)malloc(buff_size)) == NULL) | |
| 259 | { | |
| 260 | return -1; | |
| 261 | } | |
| 262 | if ((str_size = vsnprintf(*strp, buff_size, fmt, ap)) >= buff_size) | |
| 263 | { | |
| 264 | if ((*strp = (char *)realloc(*strp, str_size + 1)) == NULL) | |
| 265 | { | |
| 266 | return -1; | |
| 267 | } | |
| 268 | str_size = vsnprintf(*strp, str_size + 1, fmt, ap); | |
| 269 | } | |
| 270 | return str_size; | |
| 271 | } | |
| 272 | ||
| 273 | #ifdef __cplusplus | |
| 274 | } | |
| 275 | #endif | |
| 276 | #endif // _LIBCPP_SUPPORT_IBM_XLOCALE_H |
lib/libcxx/include/__support/musl/xlocale.h created+57| ... | ... | @@ -0,0 +1,57 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | // This adds support for the extended locale functions that are currently | |
| 10 | // missing from the Musl C library. | |
| 11 | // | |
| 12 | // This only works when the specified locale is "C" or "POSIX", but that's | |
| 13 | // about as good as we can do without implementing full xlocale support | |
| 14 | // in Musl. | |
| 15 | //===----------------------------------------------------------------------===// | |
| 16 | ||
| 17 | #ifndef _LIBCPP_SUPPORT_MUSL_XLOCALE_H | |
| 18 | #define _LIBCPP_SUPPORT_MUSL_XLOCALE_H | |
| 19 | ||
| 20 | #include <cstdlib> | |
| 21 | #include <cwchar> | |
| 22 | ||
| 23 | #ifdef __cplusplus | |
| 24 | extern "C" { | |
| 25 | #endif | |
| 26 | ||
| 27 | static inline long long strtoll_l(const char *nptr, char **endptr, int base, | |
| 28 | locale_t) { | |
| 29 | return strtoll(nptr, endptr, base); | |
| 30 | } | |
| 31 | ||
| 32 | static inline unsigned long long strtoull_l(const char *nptr, char **endptr, | |
| 33 | int base, locale_t) { | |
| 34 | return strtoull(nptr, endptr, base); | |
| 35 | } | |
| 36 | ||
| 37 | static inline long long wcstoll_l(const wchar_t *nptr, wchar_t **endptr, | |
| 38 | int base, locale_t) { | |
| 39 | return wcstoll(nptr, endptr, base); | |
| 40 | } | |
| 41 | ||
| 42 | static inline unsigned long long wcstoull_l(const wchar_t *nptr, | |
| 43 | wchar_t **endptr, int base, | |
| 44 | locale_t) { | |
| 45 | return wcstoull(nptr, endptr, base); | |
| 46 | } | |
| 47 | ||
| 48 | static inline long double wcstold_l(const wchar_t *nptr, wchar_t **endptr, | |
| 49 | locale_t) { | |
| 50 | return wcstold(nptr, endptr); | |
| 51 | } | |
| 52 | ||
| 53 | #ifdef __cplusplus | |
| 54 | } | |
| 55 | #endif | |
| 56 | ||
| 57 | #endif // _LIBCPP_SUPPORT_MUSL_XLOCALE_H |
lib/libcxx/include/__support/newlib/xlocale.h created+27| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #ifndef _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H | |
| 10 | #define _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H | |
| 11 | ||
| 12 | #if defined(_NEWLIB_VERSION) | |
| 13 | ||
| 14 | #include <cstdlib> | |
| 15 | #include <clocale> | |
| 16 | #include <cwctype> | |
| 17 | #include <ctype.h> | |
| 18 | #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \ | |
| 19 | __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5 | |
| 20 | #include <__support/xlocale/__nop_locale_mgmt.h> | |
| 21 | #include <__support/xlocale/__posix_l_fallback.h> | |
| 22 | #include <__support/xlocale/__strtonum_fallback.h> | |
| 23 | #endif | |
| 24 | ||
| 25 | #endif // _NEWLIB_VERSION | |
| 26 | ||
| 27 | #endif |
lib/libcxx/include/__support/nuttx/xlocale.h created+18| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_NUTTX_XLOCALE_H | |
| 11 | #define _LIBCPP_SUPPORT_NUTTX_XLOCALE_H | |
| 12 | ||
| 13 | #if defined(__NuttX__) | |
| 14 | #include <__support/xlocale/__posix_l_fallback.h> | |
| 15 | #include <__support/xlocale/__strtonum_fallback.h> | |
| 16 | #endif // __NuttX__ | |
| 17 | ||
| 18 | #endif |
lib/libcxx/include/__support/openbsd/xlocale.h created+19| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H | |
| 11 | #define _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H | |
| 12 | ||
| 13 | #include <cstdlib> | |
| 14 | #include <clocale> | |
| 15 | #include <cwctype> | |
| 16 | #include <ctype.h> | |
| 17 | #include <__support/xlocale/__strtonum_fallback.h> | |
| 18 | ||
| 19 | #endif |
lib/libcxx/include/__support/solaris/floatingpoint.h created+13| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #define atof sun_atof | |
| 10 | #define strtod sun_strtod | |
| 11 | #include_next "floatingpoint.h" | |
| 12 | #undef atof | |
| 13 | #undef strtod |
lib/libcxx/include/__support/solaris/wchar.h created+46| ... | ... | @@ -0,0 +1,46 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #define iswalpha sun_iswalpha | |
| 10 | #define iswupper sun_iswupper | |
| 11 | #define iswlower sun_iswlower | |
| 12 | #define iswdigit sun_iswdigit | |
| 13 | #define iswxdigit sun_iswxdigit | |
| 14 | #define iswalnum sun_iswalnum | |
| 15 | #define iswspace sun_iswspace | |
| 16 | #define iswpunct sun_iswpunct | |
| 17 | #define iswprint sun_iswprint | |
| 18 | #define iswgraph sun_iswgraph | |
| 19 | #define iswcntrl sun_iswcntrl | |
| 20 | #define iswctype sun_iswctype | |
| 21 | #define towlower sun_towlower | |
| 22 | #define towupper sun_towupper | |
| 23 | #define wcswcs sun_wcswcs | |
| 24 | #define wcswidth sun_wcswidth | |
| 25 | #define wcwidth sun_wcwidth | |
| 26 | #define wctype sun_wctype | |
| 27 | #define _WCHAR_T 1 | |
| 28 | #include_next "wchar.h" | |
| 29 | #undef iswalpha | |
| 30 | #undef iswupper | |
| 31 | #undef iswlower | |
| 32 | #undef iswdigit | |
| 33 | #undef iswxdigit | |
| 34 | #undef iswalnum | |
| 35 | #undef iswspace | |
| 36 | #undef iswpunct | |
| 37 | #undef iswprint | |
| 38 | #undef iswgraph | |
| 39 | #undef iswcntrl | |
| 40 | #undef iswctype | |
| 41 | #undef towlower | |
| 42 | #undef towupper | |
| 43 | #undef wcswcs | |
| 44 | #undef wcswidth | |
| 45 | #undef wcwidth | |
| 46 | #undef wctype |
lib/libcxx/include/__support/solaris/xlocale.h created+76| ... | ... | @@ -0,0 +1,76 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | //////////////////////////////////////////////////////////////////////////////// | |
| 10 | // Minimal xlocale implementation for Solaris. This implements the subset of | |
| 11 | // the xlocale APIs that libc++ depends on. | |
| 12 | //////////////////////////////////////////////////////////////////////////////// | |
| 13 | #ifndef __XLOCALE_H_INCLUDED | |
| 14 | #define __XLOCALE_H_INCLUDED | |
| 15 | ||
| 16 | #include <stdlib.h> | |
| 17 | ||
| 18 | #ifdef __cplusplus | |
| 19 | extern "C" { | |
| 20 | #endif | |
| 21 | ||
| 22 | ||
| 23 | int snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...); | |
| 24 | int asprintf_l(char **__s, locale_t __l, const char *__format, ...); | |
| 25 | ||
| 26 | int sscanf_l(const char *__s, locale_t __l, const char *__format, ...); | |
| 27 | ||
| 28 | int toupper_l(int __c, locale_t __l); | |
| 29 | int tolower_l(int __c, locale_t __l); | |
| 30 | ||
| 31 | struct lconv *localeconv(void); | |
| 32 | struct lconv *localeconv_l(locale_t __l); | |
| 33 | ||
| 34 | // FIXME: These are quick-and-dirty hacks to make things pretend to work | |
| 35 | static inline | |
| 36 | long long strtoll_l(const char *__nptr, char **__endptr, | |
| 37 | int __base, locale_t __loc) { | |
| 38 | return strtoll(__nptr, __endptr, __base); | |
| 39 | } | |
| 40 | static inline | |
| 41 | long strtol_l(const char *__nptr, char **__endptr, | |
| 42 | int __base, locale_t __loc) { | |
| 43 | return strtol(__nptr, __endptr, __base); | |
| 44 | } | |
| 45 | static inline | |
| 46 | unsigned long long strtoull_l(const char *__nptr, char **__endptr, | |
| 47 | int __base, locale_t __loc) { | |
| 48 | return strtoull(__nptr, __endptr, __base); | |
| 49 | } | |
| 50 | static inline | |
| 51 | unsigned long strtoul_l(const char *__nptr, char **__endptr, | |
| 52 | int __base, locale_t __loc) { | |
| 53 | return strtoul(__nptr, __endptr, __base); | |
| 54 | } | |
| 55 | static inline | |
| 56 | float strtof_l(const char *__nptr, char **__endptr, | |
| 57 | locale_t __loc) { | |
| 58 | return strtof(__nptr, __endptr); | |
| 59 | } | |
| 60 | static inline | |
| 61 | double strtod_l(const char *__nptr, char **__endptr, | |
| 62 | locale_t __loc) { | |
| 63 | return strtod(__nptr, __endptr); | |
| 64 | } | |
| 65 | static inline | |
| 66 | long double strtold_l(const char *__nptr, char **__endptr, | |
| 67 | locale_t __loc) { | |
| 68 | return strtold(__nptr, __endptr); | |
| 69 | } | |
| 70 | ||
| 71 | ||
| 72 | #ifdef __cplusplus | |
| 73 | } | |
| 74 | #endif | |
| 75 | ||
| 76 | #endif |
lib/libcxx/include/__support/win32/limits_msvc_win32.h created+71| ... | ... | @@ -0,0 +1,71 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H | |
| 11 | #define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H | |
| 12 | ||
| 13 | #if !defined(_LIBCPP_MSVCRT) | |
| 14 | #error "This header complements the Microsoft C Runtime library, and should not be included otherwise." | |
| 15 | #endif | |
| 16 | #if defined(__clang__) | |
| 17 | #error "This header should only be included when using Microsofts C1XX frontend" | |
| 18 | #endif | |
| 19 | ||
| 20 | #include <limits.h> // CHAR_BIT | |
| 21 | #include <float.h> // limit constants | |
| 22 | #include <math.h> // HUGE_VAL | |
| 23 | #include <ymath.h> // internal MSVC header providing the needed functionality | |
| 24 | ||
| 25 | #define __CHAR_BIT__ CHAR_BIT | |
| 26 | ||
| 27 | #define __FLT_MANT_DIG__ FLT_MANT_DIG | |
| 28 | #define __FLT_DIG__ FLT_DIG | |
| 29 | #define __FLT_RADIX__ FLT_RADIX | |
| 30 | #define __FLT_MIN_EXP__ FLT_MIN_EXP | |
| 31 | #define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP | |
| 32 | #define __FLT_MAX_EXP__ FLT_MAX_EXP | |
| 33 | #define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP | |
| 34 | #define __FLT_MIN__ FLT_MIN | |
| 35 | #define __FLT_MAX__ FLT_MAX | |
| 36 | #define __FLT_EPSILON__ FLT_EPSILON | |
| 37 | // predefined by MinGW GCC | |
| 38 | #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F | |
| 39 | ||
| 40 | #define __DBL_MANT_DIG__ DBL_MANT_DIG | |
| 41 | #define __DBL_DIG__ DBL_DIG | |
| 42 | #define __DBL_RADIX__ DBL_RADIX | |
| 43 | #define __DBL_MIN_EXP__ DBL_MIN_EXP | |
| 44 | #define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP | |
| 45 | #define __DBL_MAX_EXP__ DBL_MAX_EXP | |
| 46 | #define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP | |
| 47 | #define __DBL_MIN__ DBL_MIN | |
| 48 | #define __DBL_MAX__ DBL_MAX | |
| 49 | #define __DBL_EPSILON__ DBL_EPSILON | |
| 50 | // predefined by MinGW GCC | |
| 51 | #define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L) | |
| 52 | ||
| 53 | #define __LDBL_MANT_DIG__ LDBL_MANT_DIG | |
| 54 | #define __LDBL_DIG__ LDBL_DIG | |
| 55 | #define __LDBL_RADIX__ LDBL_RADIX | |
| 56 | #define __LDBL_MIN_EXP__ LDBL_MIN_EXP | |
| 57 | #define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP | |
| 58 | #define __LDBL_MAX_EXP__ LDBL_MAX_EXP | |
| 59 | #define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP | |
| 60 | #define __LDBL_MIN__ LDBL_MIN | |
| 61 | #define __LDBL_MAX__ LDBL_MAX | |
| 62 | #define __LDBL_EPSILON__ LDBL_EPSILON | |
| 63 | // predefined by MinGW GCC | |
| 64 | #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L | |
| 65 | ||
| 66 | // __builtin replacements/workarounds | |
| 67 | #define __builtin_huge_vall() _LInf._Long_double | |
| 68 | #define __builtin_nanl(__dummmy) _LNan._Long_double | |
| 69 | #define __builtin_nansl(__dummy) _LSnan._Long_double | |
| 70 | ||
| 71 | #endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H |
lib/libcxx/include/__support/win32/locale_win32.h created+264| ... | ... | @@ -0,0 +1,264 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H | |
| 11 | #define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | #include <stdio.h> | |
| 15 | #include <xlocinfo.h> // _locale_t | |
| 16 | #include <__nullptr> | |
| 17 | ||
| 18 | #define LC_COLLATE_MASK _M_COLLATE | |
| 19 | #define LC_CTYPE_MASK _M_CTYPE | |
| 20 | #define LC_MONETARY_MASK _M_MONETARY | |
| 21 | #define LC_NUMERIC_MASK _M_NUMERIC | |
| 22 | #define LC_TIME_MASK _M_TIME | |
| 23 | #define LC_MESSAGES_MASK _M_MESSAGES | |
| 24 | #define LC_ALL_MASK ( LC_COLLATE_MASK \ | |
| 25 | | LC_CTYPE_MASK \ | |
| 26 | | LC_MESSAGES_MASK \ | |
| 27 | | LC_MONETARY_MASK \ | |
| 28 | | LC_NUMERIC_MASK \ | |
| 29 | | LC_TIME_MASK ) | |
| 30 | ||
| 31 | class __lconv_storage { | |
| 32 | public: | |
| 33 | __lconv_storage(const lconv *__lc_input) { | |
| 34 | __lc = *__lc_input; | |
| 35 | ||
| 36 | __decimal_point = __lc_input->decimal_point; | |
| 37 | __thousands_sep = __lc_input->thousands_sep; | |
| 38 | __grouping = __lc_input->grouping; | |
| 39 | __int_curr_symbol = __lc_input->int_curr_symbol; | |
| 40 | __currency_symbol = __lc_input->currency_symbol; | |
| 41 | __mon_decimal_point = __lc_input->mon_decimal_point; | |
| 42 | __mon_thousands_sep = __lc_input->mon_thousands_sep; | |
| 43 | __mon_grouping = __lc_input->mon_grouping; | |
| 44 | __positive_sign = __lc_input->positive_sign; | |
| 45 | __negative_sign = __lc_input->negative_sign; | |
| 46 | ||
| 47 | __lc.decimal_point = const_cast<char *>(__decimal_point.c_str()); | |
| 48 | __lc.thousands_sep = const_cast<char *>(__thousands_sep.c_str()); | |
| 49 | __lc.grouping = const_cast<char *>(__grouping.c_str()); | |
| 50 | __lc.int_curr_symbol = const_cast<char *>(__int_curr_symbol.c_str()); | |
| 51 | __lc.currency_symbol = const_cast<char *>(__currency_symbol.c_str()); | |
| 52 | __lc.mon_decimal_point = const_cast<char *>(__mon_decimal_point.c_str()); | |
| 53 | __lc.mon_thousands_sep = const_cast<char *>(__mon_thousands_sep.c_str()); | |
| 54 | __lc.mon_grouping = const_cast<char *>(__mon_grouping.c_str()); | |
| 55 | __lc.positive_sign = const_cast<char *>(__positive_sign.c_str()); | |
| 56 | __lc.negative_sign = const_cast<char *>(__negative_sign.c_str()); | |
| 57 | } | |
| 58 | ||
| 59 | lconv *__get() { | |
| 60 | return &__lc; | |
| 61 | } | |
| 62 | private: | |
| 63 | lconv __lc; | |
| 64 | std::string __decimal_point; | |
| 65 | std::string __thousands_sep; | |
| 66 | std::string __grouping; | |
| 67 | std::string __int_curr_symbol; | |
| 68 | std::string __currency_symbol; | |
| 69 | std::string __mon_decimal_point; | |
| 70 | std::string __mon_thousands_sep; | |
| 71 | std::string __mon_grouping; | |
| 72 | std::string __positive_sign; | |
| 73 | std::string __negative_sign; | |
| 74 | }; | |
| 75 | ||
| 76 | class locale_t { | |
| 77 | public: | |
| 78 | locale_t() | |
| 79 | : __locale(nullptr), __locale_str(nullptr), __lc(nullptr) {} | |
| 80 | locale_t(std::nullptr_t) | |
| 81 | : __locale(nullptr), __locale_str(nullptr), __lc(nullptr) {} | |
| 82 | locale_t(_locale_t __xlocale, const char* __xlocale_str) | |
| 83 | : __locale(__xlocale), __locale_str(__xlocale_str), __lc(nullptr) {} | |
| 84 | locale_t(const locale_t &__l) | |
| 85 | : __locale(__l.__locale), __locale_str(__l.__locale_str), __lc(nullptr) {} | |
| 86 | ||
| 87 | ~locale_t() { | |
| 88 | delete __lc; | |
| 89 | } | |
| 90 | ||
| 91 | locale_t &operator =(const locale_t &__l) { | |
| 92 | __locale = __l.__locale; | |
| 93 | __locale_str = __l.__locale_str; | |
| 94 | // __lc not copied | |
| 95 | return *this; | |
| 96 | } | |
| 97 | ||
| 98 | friend bool operator==(const locale_t& __left, const locale_t& __right) { | |
| 99 | return __left.__locale == __right.__locale; | |
| 100 | } | |
| 101 | ||
| 102 | friend bool operator==(const locale_t& __left, int __right) { | |
| 103 | return __left.__locale == nullptr && __right == 0; | |
| 104 | } | |
| 105 | ||
| 106 | friend bool operator==(const locale_t& __left, long long __right) { | |
| 107 | return __left.__locale == nullptr && __right == 0; | |
| 108 | } | |
| 109 | ||
| 110 | friend bool operator==(const locale_t& __left, std::nullptr_t) { | |
| 111 | return __left.__locale == nullptr; | |
| 112 | } | |
| 113 | ||
| 114 | friend bool operator==(int __left, const locale_t& __right) { | |
| 115 | return __left == 0 && nullptr == __right.__locale; | |
| 116 | } | |
| 117 | ||
| 118 | friend bool operator==(std::nullptr_t, const locale_t& __right) { | |
| 119 | return nullptr == __right.__locale; | |
| 120 | } | |
| 121 | ||
| 122 | friend bool operator!=(const locale_t& __left, const locale_t& __right) { | |
| 123 | return !(__left == __right); | |
| 124 | } | |
| 125 | ||
| 126 | friend bool operator!=(const locale_t& __left, int __right) { | |
| 127 | return !(__left == __right); | |
| 128 | } | |
| 129 | ||
| 130 | friend bool operator!=(const locale_t& __left, long long __right) { | |
| 131 | return !(__left == __right); | |
| 132 | } | |
| 133 | ||
| 134 | friend bool operator!=(const locale_t& __left, std::nullptr_t __right) { | |
| 135 | return !(__left == __right); | |
| 136 | } | |
| 137 | ||
| 138 | friend bool operator!=(int __left, const locale_t& __right) { | |
| 139 | return !(__left == __right); | |
| 140 | } | |
| 141 | ||
| 142 | friend bool operator!=(std::nullptr_t __left, const locale_t& __right) { | |
| 143 | return !(__left == __right); | |
| 144 | } | |
| 145 | ||
| 146 | operator bool() const { | |
| 147 | return __locale != nullptr; | |
| 148 | } | |
| 149 | ||
| 150 | const char* __get_locale() const { return __locale_str; } | |
| 151 | ||
| 152 | operator _locale_t() const { | |
| 153 | return __locale; | |
| 154 | } | |
| 155 | ||
| 156 | lconv *__store_lconv(const lconv *__input_lc) { | |
| 157 | delete __lc; | |
| 158 | __lc = new __lconv_storage(__input_lc); | |
| 159 | return __lc->__get(); | |
| 160 | } | |
| 161 | private: | |
| 162 | _locale_t __locale; | |
| 163 | const char* __locale_str; | |
| 164 | __lconv_storage *__lc = nullptr; | |
| 165 | }; | |
| 166 | ||
| 167 | // Locale management functions | |
| 168 | #define freelocale _free_locale | |
| 169 | // FIXME: base currently unused. Needs manual work to construct the new locale | |
| 170 | locale_t newlocale( int mask, const char * locale, locale_t base ); | |
| 171 | // uselocale can't be implemented on Windows because Windows allows partial modification | |
| 172 | // of thread-local locale and so _get_current_locale() returns a copy while uselocale does | |
| 173 | // not create any copies. | |
| 174 | // We can still implement raii even without uselocale though. | |
| 175 | ||
| 176 | ||
| 177 | lconv *localeconv_l( locale_t &loc ); | |
| 178 | size_t mbrlen_l( const char *__restrict s, size_t n, | |
| 179 | mbstate_t *__restrict ps, locale_t loc); | |
| 180 | size_t mbsrtowcs_l( wchar_t *__restrict dst, const char **__restrict src, | |
| 181 | size_t len, mbstate_t *__restrict ps, locale_t loc ); | |
| 182 | size_t wcrtomb_l( char *__restrict s, wchar_t wc, mbstate_t *__restrict ps, | |
| 183 | locale_t loc); | |
| 184 | size_t mbrtowc_l( wchar_t *__restrict pwc, const char *__restrict s, | |
| 185 | size_t n, mbstate_t *__restrict ps, locale_t loc); | |
| 186 | size_t mbsnrtowcs_l( wchar_t *__restrict dst, const char **__restrict src, | |
| 187 | size_t nms, size_t len, mbstate_t *__restrict ps, locale_t loc); | |
| 188 | size_t wcsnrtombs_l( char *__restrict dst, const wchar_t **__restrict src, | |
| 189 | size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc); | |
| 190 | wint_t btowc_l( int c, locale_t loc ); | |
| 191 | int wctob_l( wint_t c, locale_t loc ); | |
| 192 | ||
| 193 | decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ); | |
| 194 | ||
| 195 | // the *_l functions are prefixed on Windows, only available for msvcr80+, VS2005+ | |
| 196 | #define mbtowc_l _mbtowc_l | |
| 197 | #define strtoll_l _strtoi64_l | |
| 198 | #define strtoull_l _strtoui64_l | |
| 199 | #define strtod_l _strtod_l | |
| 200 | #if defined(_LIBCPP_MSVCRT) | |
| 201 | #define strtof_l _strtof_l | |
| 202 | #define strtold_l _strtold_l | |
| 203 | #else | |
| 204 | _LIBCPP_FUNC_VIS float strtof_l(const char*, char**, locale_t); | |
| 205 | _LIBCPP_FUNC_VIS long double strtold_l(const char*, char**, locale_t); | |
| 206 | #endif | |
| 207 | inline _LIBCPP_INLINE_VISIBILITY | |
| 208 | int | |
| 209 | islower_l(int c, _locale_t loc) | |
| 210 | { | |
| 211 | return _islower_l((int)c, loc); | |
| 212 | } | |
| 213 | ||
| 214 | inline _LIBCPP_INLINE_VISIBILITY | |
| 215 | int | |
| 216 | isupper_l(int c, _locale_t loc) | |
| 217 | { | |
| 218 | return _isupper_l((int)c, loc); | |
| 219 | } | |
| 220 | ||
| 221 | #define isdigit_l _isdigit_l | |
| 222 | #define isxdigit_l _isxdigit_l | |
| 223 | #define strcoll_l _strcoll_l | |
| 224 | #define strxfrm_l _strxfrm_l | |
| 225 | #define wcscoll_l _wcscoll_l | |
| 226 | #define wcsxfrm_l _wcsxfrm_l | |
| 227 | #define toupper_l _toupper_l | |
| 228 | #define tolower_l _tolower_l | |
| 229 | #define iswspace_l _iswspace_l | |
| 230 | #define iswprint_l _iswprint_l | |
| 231 | #define iswcntrl_l _iswcntrl_l | |
| 232 | #define iswupper_l _iswupper_l | |
| 233 | #define iswlower_l _iswlower_l | |
| 234 | #define iswalpha_l _iswalpha_l | |
| 235 | #define iswdigit_l _iswdigit_l | |
| 236 | #define iswpunct_l _iswpunct_l | |
| 237 | #define iswxdigit_l _iswxdigit_l | |
| 238 | #define towupper_l _towupper_l | |
| 239 | #define towlower_l _towlower_l | |
| 240 | #if defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x0800 | |
| 241 | _LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format, | |
| 242 | const struct tm *tm, locale_t loc); | |
| 243 | #else | |
| 244 | #define strftime_l _strftime_l | |
| 245 | #endif | |
| 246 | #define sscanf_l( __s, __l, __f, ...) _sscanf_l( __s, __f, __l, __VA_ARGS__ ) | |
| 247 | #define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ ) | |
| 248 | #define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ ) | |
| 249 | #define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ ) | |
| 250 | _LIBCPP_FUNC_VIS int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...); | |
| 251 | _LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... ); | |
| 252 | _LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap ); | |
| 253 | ||
| 254 | // not-so-pressing FIXME: use locale to determine blank characters | |
| 255 | inline int isblank_l( int c, locale_t /*loc*/ ) | |
| 256 | { | |
| 257 | return ( c == ' ' || c == '\t' ); | |
| 258 | } | |
| 259 | inline int iswblank_l( wint_t c, locale_t /*loc*/ ) | |
| 260 | { | |
| 261 | return ( c == L' ' || c == L'\t' ); | |
| 262 | } | |
| 263 | ||
| 264 | #endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H |
lib/libcxx/include/__support/xlocale/__nop_locale_mgmt.h created+51| ... | ... | @@ -0,0 +1,51 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H | |
| 11 | #define _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H | |
| 12 | ||
| 13 | #ifdef __cplusplus | |
| 14 | extern "C" { | |
| 15 | #endif | |
| 16 | ||
| 17 | // Patch over lack of extended locale support | |
| 18 | typedef void *locale_t; | |
| 19 | static inline locale_t duplocale(locale_t) { | |
| 20 | return NULL; | |
| 21 | } | |
| 22 | ||
| 23 | static inline void freelocale(locale_t) { | |
| 24 | } | |
| 25 | ||
| 26 | static inline locale_t newlocale(int, const char *, locale_t) { | |
| 27 | return NULL; | |
| 28 | } | |
| 29 | ||
| 30 | static inline locale_t uselocale(locale_t) { | |
| 31 | return NULL; | |
| 32 | } | |
| 33 | ||
| 34 | #define LC_COLLATE_MASK (1 << LC_COLLATE) | |
| 35 | #define LC_CTYPE_MASK (1 << LC_CTYPE) | |
| 36 | #define LC_MESSAGES_MASK (1 << LC_MESSAGES) | |
| 37 | #define LC_MONETARY_MASK (1 << LC_MONETARY) | |
| 38 | #define LC_NUMERIC_MASK (1 << LC_NUMERIC) | |
| 39 | #define LC_TIME_MASK (1 << LC_TIME) | |
| 40 | #define LC_ALL_MASK (LC_COLLATE_MASK|\ | |
| 41 | LC_CTYPE_MASK|\ | |
| 42 | LC_MONETARY_MASK|\ | |
| 43 | LC_NUMERIC_MASK|\ | |
| 44 | LC_TIME_MASK|\ | |
| 45 | LC_MESSAGES_MASK) | |
| 46 | ||
| 47 | #ifdef __cplusplus | |
| 48 | } // extern "C" | |
| 49 | #endif | |
| 50 | ||
| 51 | #endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H |
lib/libcxx/include/__support/xlocale/__posix_l_fallback.h created+164| ... | ... | @@ -0,0 +1,164 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | // These are reimplementations of some extended locale functions ( *_l ) that | |
| 10 | // are normally part of POSIX. This shared implementation provides parts of the | |
| 11 | // extended locale support for libc's that normally don't have any (like | |
| 12 | // Android's bionic and Newlib). | |
| 13 | //===----------------------------------------------------------------------===// | |
| 14 | ||
| 15 | #ifndef _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H | |
| 16 | #define _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H | |
| 17 | ||
| 18 | #ifdef __cplusplus | |
| 19 | extern "C" { | |
| 20 | #endif | |
| 21 | ||
| 22 | inline _LIBCPP_INLINE_VISIBILITY int isalnum_l(int c, locale_t) { | |
| 23 | return ::isalnum(c); | |
| 24 | } | |
| 25 | ||
| 26 | inline _LIBCPP_INLINE_VISIBILITY int isalpha_l(int c, locale_t) { | |
| 27 | return ::isalpha(c); | |
| 28 | } | |
| 29 | ||
| 30 | inline _LIBCPP_INLINE_VISIBILITY int isblank_l(int c, locale_t) { | |
| 31 | return ::isblank(c); | |
| 32 | } | |
| 33 | ||
| 34 | inline _LIBCPP_INLINE_VISIBILITY int iscntrl_l(int c, locale_t) { | |
| 35 | return ::iscntrl(c); | |
| 36 | } | |
| 37 | ||
| 38 | inline _LIBCPP_INLINE_VISIBILITY int isdigit_l(int c, locale_t) { | |
| 39 | return ::isdigit(c); | |
| 40 | } | |
| 41 | ||
| 42 | inline _LIBCPP_INLINE_VISIBILITY int isgraph_l(int c, locale_t) { | |
| 43 | return ::isgraph(c); | |
| 44 | } | |
| 45 | ||
| 46 | inline _LIBCPP_INLINE_VISIBILITY int islower_l(int c, locale_t) { | |
| 47 | return ::islower(c); | |
| 48 | } | |
| 49 | ||
| 50 | inline _LIBCPP_INLINE_VISIBILITY int isprint_l(int c, locale_t) { | |
| 51 | return ::isprint(c); | |
| 52 | } | |
| 53 | ||
| 54 | inline _LIBCPP_INLINE_VISIBILITY int ispunct_l(int c, locale_t) { | |
| 55 | return ::ispunct(c); | |
| 56 | } | |
| 57 | ||
| 58 | inline _LIBCPP_INLINE_VISIBILITY int isspace_l(int c, locale_t) { | |
| 59 | return ::isspace(c); | |
| 60 | } | |
| 61 | ||
| 62 | inline _LIBCPP_INLINE_VISIBILITY int isupper_l(int c, locale_t) { | |
| 63 | return ::isupper(c); | |
| 64 | } | |
| 65 | ||
| 66 | inline _LIBCPP_INLINE_VISIBILITY int isxdigit_l(int c, locale_t) { | |
| 67 | return ::isxdigit(c); | |
| 68 | } | |
| 69 | ||
| 70 | inline _LIBCPP_INLINE_VISIBILITY int iswalnum_l(wint_t c, locale_t) { | |
| 71 | return ::iswalnum(c); | |
| 72 | } | |
| 73 | ||
| 74 | inline _LIBCPP_INLINE_VISIBILITY int iswalpha_l(wint_t c, locale_t) { | |
| 75 | return ::iswalpha(c); | |
| 76 | } | |
| 77 | ||
| 78 | inline _LIBCPP_INLINE_VISIBILITY int iswblank_l(wint_t c, locale_t) { | |
| 79 | return ::iswblank(c); | |
| 80 | } | |
| 81 | ||
| 82 | inline _LIBCPP_INLINE_VISIBILITY int iswcntrl_l(wint_t c, locale_t) { | |
| 83 | return ::iswcntrl(c); | |
| 84 | } | |
| 85 | ||
| 86 | inline _LIBCPP_INLINE_VISIBILITY int iswdigit_l(wint_t c, locale_t) { | |
| 87 | return ::iswdigit(c); | |
| 88 | } | |
| 89 | ||
| 90 | inline _LIBCPP_INLINE_VISIBILITY int iswgraph_l(wint_t c, locale_t) { | |
| 91 | return ::iswgraph(c); | |
| 92 | } | |
| 93 | ||
| 94 | inline _LIBCPP_INLINE_VISIBILITY int iswlower_l(wint_t c, locale_t) { | |
| 95 | return ::iswlower(c); | |
| 96 | } | |
| 97 | ||
| 98 | inline _LIBCPP_INLINE_VISIBILITY int iswprint_l(wint_t c, locale_t) { | |
| 99 | return ::iswprint(c); | |
| 100 | } | |
| 101 | ||
| 102 | inline _LIBCPP_INLINE_VISIBILITY int iswpunct_l(wint_t c, locale_t) { | |
| 103 | return ::iswpunct(c); | |
| 104 | } | |
| 105 | ||
| 106 | inline _LIBCPP_INLINE_VISIBILITY int iswspace_l(wint_t c, locale_t) { | |
| 107 | return ::iswspace(c); | |
| 108 | } | |
| 109 | ||
| 110 | inline _LIBCPP_INLINE_VISIBILITY int iswupper_l(wint_t c, locale_t) { | |
| 111 | return ::iswupper(c); | |
| 112 | } | |
| 113 | ||
| 114 | inline _LIBCPP_INLINE_VISIBILITY int iswxdigit_l(wint_t c, locale_t) { | |
| 115 | return ::iswxdigit(c); | |
| 116 | } | |
| 117 | ||
| 118 | inline _LIBCPP_INLINE_VISIBILITY int toupper_l(int c, locale_t) { | |
| 119 | return ::toupper(c); | |
| 120 | } | |
| 121 | ||
| 122 | inline _LIBCPP_INLINE_VISIBILITY int tolower_l(int c, locale_t) { | |
| 123 | return ::tolower(c); | |
| 124 | } | |
| 125 | ||
| 126 | inline _LIBCPP_INLINE_VISIBILITY wint_t towupper_l(wint_t c, locale_t) { | |
| 127 | return ::towupper(c); | |
| 128 | } | |
| 129 | ||
| 130 | inline _LIBCPP_INLINE_VISIBILITY wint_t towlower_l(wint_t c, locale_t) { | |
| 131 | return ::towlower(c); | |
| 132 | } | |
| 133 | ||
| 134 | inline _LIBCPP_INLINE_VISIBILITY int strcoll_l(const char *s1, const char *s2, | |
| 135 | locale_t) { | |
| 136 | return ::strcoll(s1, s2); | |
| 137 | } | |
| 138 | ||
| 139 | inline _LIBCPP_INLINE_VISIBILITY size_t strxfrm_l(char *dest, const char *src, | |
| 140 | size_t n, locale_t) { | |
| 141 | return ::strxfrm(dest, src, n); | |
| 142 | } | |
| 143 | ||
| 144 | inline _LIBCPP_INLINE_VISIBILITY size_t strftime_l(char *s, size_t max, | |
| 145 | const char *format, | |
| 146 | const struct tm *tm, locale_t) { | |
| 147 | return ::strftime(s, max, format, tm); | |
| 148 | } | |
| 149 | ||
| 150 | inline _LIBCPP_INLINE_VISIBILITY int wcscoll_l(const wchar_t *ws1, | |
| 151 | const wchar_t *ws2, locale_t) { | |
| 152 | return ::wcscoll(ws1, ws2); | |
| 153 | } | |
| 154 | ||
| 155 | inline _LIBCPP_INLINE_VISIBILITY size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, | |
| 156 | size_t n, locale_t) { | |
| 157 | return ::wcsxfrm(dest, src, n); | |
| 158 | } | |
| 159 | ||
| 160 | #ifdef __cplusplus | |
| 161 | } | |
| 162 | #endif | |
| 163 | ||
| 164 | #endif // _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H |
lib/libcxx/include/__support/xlocale/__strtonum_fallback.h created+66| ... | ... | @@ -0,0 +1,66 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-----------------------------------------------------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | // These are reimplementations of some extended locale functions ( *_l ) that | |
| 10 | // aren't part of POSIX. They are widely available though (GLIBC, BSD, maybe | |
| 11 | // others). The unifying aspect in this case is that all of these functions | |
| 12 | // convert strings to some numeric type. | |
| 13 | //===----------------------------------------------------------------------===// | |
| 14 | ||
| 15 | #ifndef _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H | |
| 16 | #define _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H | |
| 17 | ||
| 18 | #ifdef __cplusplus | |
| 19 | extern "C" { | |
| 20 | #endif | |
| 21 | ||
| 22 | inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char *nptr, | |
| 23 | char **endptr, locale_t) { | |
| 24 | return ::strtof(nptr, endptr); | |
| 25 | } | |
| 26 | ||
| 27 | inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char *nptr, | |
| 28 | char **endptr, locale_t) { | |
| 29 | return ::strtod(nptr, endptr); | |
| 30 | } | |
| 31 | ||
| 32 | inline _LIBCPP_INLINE_VISIBILITY long double strtold_l(const char *nptr, | |
| 33 | char **endptr, locale_t) { | |
| 34 | return ::strtold(nptr, endptr); | |
| 35 | } | |
| 36 | ||
| 37 | inline _LIBCPP_INLINE_VISIBILITY long long | |
| 38 | strtoll_l(const char *nptr, char **endptr, int base, locale_t) { | |
| 39 | return ::strtoll(nptr, endptr, base); | |
| 40 | } | |
| 41 | ||
| 42 | inline _LIBCPP_INLINE_VISIBILITY unsigned long long | |
| 43 | strtoull_l(const char *nptr, char **endptr, int base, locale_t) { | |
| 44 | return ::strtoull(nptr, endptr, base); | |
| 45 | } | |
| 46 | ||
| 47 | inline _LIBCPP_INLINE_VISIBILITY long long | |
| 48 | wcstoll_l(const wchar_t *nptr, wchar_t **endptr, int base, locale_t) { | |
| 49 | return ::wcstoll(nptr, endptr, base); | |
| 50 | } | |
| 51 | ||
| 52 | inline _LIBCPP_INLINE_VISIBILITY unsigned long long | |
| 53 | wcstoull_l(const wchar_t *nptr, wchar_t **endptr, int base, locale_t) { | |
| 54 | return ::wcstoull(nptr, endptr, base); | |
| 55 | } | |
| 56 | ||
| 57 | inline _LIBCPP_INLINE_VISIBILITY long double wcstold_l(const wchar_t *nptr, | |
| 58 | wchar_t **endptr, locale_t) { | |
| 59 | return ::wcstold(nptr, endptr); | |
| 60 | } | |
| 61 | ||
| 62 | #ifdef __cplusplus | |
| 63 | } | |
| 64 | #endif | |
| 65 | ||
| 66 | #endif // _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H |
lib/libcxx/include/__threading_support+36-26| ... | ... | @@ -11,10 +11,15 @@ |
| 11 | 11 | #define _LIBCPP_THREADING_SUPPORT |
| 12 | 12 | |
| 13 | 13 | #include <__config> |
| 14 | #include <__availability> | |
| 14 | 15 | #include <chrono> |
| 15 | 16 | #include <iosfwd> |
| 16 | 17 | #include <errno.h> |
| 17 | 18 | |
| 19 | #ifdef __MVS__ | |
| 20 | # include <__support/ibm/nanosleep.h> | |
| 21 | #endif | |
| 22 | ||
| 18 | 23 | #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER |
| 19 | 24 | #pragma GCC system_header |
| 20 | 25 | #endif |
| ... | ... | @@ -26,7 +31,7 @@ |
| 26 | 31 | #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) |
| 27 | 32 | # include <pthread.h> |
| 28 | 33 | # include <sched.h> |
| 29 | # ifdef __APPLE__ | |
| 34 | # if defined(__APPLE__) || defined(__MVS__) | |
| 30 | 35 | # define _LIBCPP_NO_NATIVE_SEMAPHORES |
| 31 | 36 | # endif |
| 32 | 37 | # ifndef _LIBCPP_NO_NATIVE_SEMAPHORES |
| ... | ... | @@ -82,11 +87,14 @@ typedef pthread_once_t __libcpp_exec_once_flag; |
| 82 | 87 | #define _LIBCPP_EXEC_ONCE_INITIALIZER PTHREAD_ONCE_INIT |
| 83 | 88 | |
| 84 | 89 | // Thread id |
| 85 | typedef pthread_t __libcpp_thread_id; | |
| 90 | #if defined(__MVS__) | |
| 91 | typedef unsigned long long __libcpp_thread_id; | |
| 92 | #else | |
| 93 | typedef pthread_t __libcpp_thread_id; | |
| 94 | #endif | |
| 86 | 95 | |
| 87 | 96 | // Thread |
| 88 | #define _LIBCPP_NULL_THREAD 0U | |
| 89 | ||
| 97 | #define _LIBCPP_NULL_THREAD ((__libcpp_thread_t())) | |
| 90 | 98 | typedef pthread_t __libcpp_thread_t; |
| 91 | 99 | |
| 92 | 100 | // Thread Local Storage |
| ... | ... | @@ -278,24 +286,21 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p); |
| 278 | 286 | #endif // !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) |
| 279 | 287 | |
| 280 | 288 | struct __libcpp_timed_backoff_policy { |
| 281 | _LIBCPP_THREAD_ABI_VISIBILITY | |
| 282 | bool operator()(chrono::nanoseconds __elapsed) const; | |
| 289 | _LIBCPP_INLINE_VISIBILITY | |
| 290 | bool operator()(chrono::nanoseconds __elapsed) const | |
| 291 | { | |
| 292 | if(__elapsed > chrono::milliseconds(128)) | |
| 293 | __libcpp_thread_sleep_for(chrono::milliseconds(8)); | |
| 294 | else if(__elapsed > chrono::microseconds(64)) | |
| 295 | __libcpp_thread_sleep_for(__elapsed / 2); | |
| 296 | else if(__elapsed > chrono::microseconds(4)) | |
| 297 | __libcpp_thread_yield(); | |
| 298 | else | |
| 299 | {} // poll | |
| 300 | return false; | |
| 301 | } | |
| 283 | 302 | }; |
| 284 | 303 | |
| 285 | inline _LIBCPP_INLINE_VISIBILITY | |
| 286 | bool __libcpp_timed_backoff_policy::operator()(chrono::nanoseconds __elapsed) const | |
| 287 | { | |
| 288 | if(__elapsed > chrono::milliseconds(128)) | |
| 289 | __libcpp_thread_sleep_for(chrono::milliseconds(8)); | |
| 290 | else if(__elapsed > chrono::microseconds(64)) | |
| 291 | __libcpp_thread_sleep_for(__elapsed / 2); | |
| 292 | else if(__elapsed > chrono::microseconds(4)) | |
| 293 | __libcpp_thread_yield(); | |
| 294 | else | |
| 295 | ; // poll | |
| 296 | return false; | |
| 297 | } | |
| 298 | ||
| 299 | 304 | static _LIBCPP_CONSTEXPR const int __libcpp_polling_count = 64; |
| 300 | 305 | |
| 301 | 306 | template<class _Fn, class _BFn> |
| ... | ... | @@ -484,7 +489,7 @@ int __libcpp_execute_once(__libcpp_exec_once_flag *flag, |
| 484 | 489 | // Returns non-zero if the thread ids are equal, otherwise 0 |
| 485 | 490 | bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2) |
| 486 | 491 | { |
| 487 | return pthread_equal(t1, t2) != 0; | |
| 492 | return t1 == t2; | |
| 488 | 493 | } |
| 489 | 494 | |
| 490 | 495 | // Returns non-zero if t1 < t2, otherwise 0 |
| ... | ... | @@ -495,28 +500,33 @@ bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2) |
| 495 | 500 | |
| 496 | 501 | // Thread |
| 497 | 502 | bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) { |
| 498 | return *__t == 0; | |
| 503 | return *__t == __libcpp_thread_t(); | |
| 499 | 504 | } |
| 500 | 505 | |
| 501 | 506 | int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *), |
| 502 | 507 | void *__arg) |
| 503 | 508 | { |
| 504 | return pthread_create(__t, 0, __func, __arg); | |
| 509 | return pthread_create(__t, nullptr, __func, __arg); | |
| 505 | 510 | } |
| 506 | 511 | |
| 507 | 512 | __libcpp_thread_id __libcpp_thread_get_current_id() |
| 508 | 513 | { |
| 509 | return pthread_self(); | |
| 514 | const __libcpp_thread_t thread = pthread_self(); | |
| 515 | return __libcpp_thread_get_id(&thread); | |
| 510 | 516 | } |
| 511 | 517 | |
| 512 | 518 | __libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t) |
| 513 | 519 | { |
| 520 | #if defined(__MVS__) | |
| 521 | return __t->__; | |
| 522 | #else | |
| 514 | 523 | return *__t; |
| 524 | #endif | |
| 515 | 525 | } |
| 516 | 526 | |
| 517 | 527 | int __libcpp_thread_join(__libcpp_thread_t *__t) |
| 518 | 528 | { |
| 519 | return pthread_join(*__t, 0); | |
| 529 | return pthread_join(*__t, nullptr); | |
| 520 | 530 | } |
| 521 | 531 | |
| 522 | 532 | int __libcpp_thread_detach(__libcpp_thread_t *__t) |
| ... | ... | @@ -651,7 +661,7 @@ bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2) |
| 651 | 661 | |
| 652 | 662 | // Thread |
| 653 | 663 | bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) { |
| 654 | return *__t == 0; | |
| 664 | return __libcpp_thread_get_id(__t) == 0; | |
| 655 | 665 | } |
| 656 | 666 | |
| 657 | 667 | int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *), |
lib/libcxx/include/__tree+60-160| ... | ... | @@ -108,10 +108,10 @@ __tree_sub_invariant(_NodePtr __x) |
| 108 | 108 | if (__x->__right_ && !__x->__right_->__is_black_) |
| 109 | 109 | return 0; |
| 110 | 110 | } |
| 111 | unsigned __h = __tree_sub_invariant(__x->__left_); | |
| 111 | unsigned __h = _VSTD::__tree_sub_invariant(__x->__left_); | |
| 112 | 112 | if (__h == 0) |
| 113 | 113 | return 0; // invalid left subtree |
| 114 | if (__h != __tree_sub_invariant(__x->__right_)) | |
| 114 | if (__h != _VSTD::__tree_sub_invariant(__x->__right_)) | |
| 115 | 115 | return 0; // invalid or different height right subtree |
| 116 | 116 | return __h + __x->__is_black_; // return black height of this node |
| 117 | 117 | } |
| ... | ... | @@ -128,13 +128,13 @@ __tree_invariant(_NodePtr __root) |
| 128 | 128 | // check __x->__parent_ consistency |
| 129 | 129 | if (__root->__parent_ == nullptr) |
| 130 | 130 | return false; |
| 131 | if (!__tree_is_left_child(__root)) | |
| 131 | if (!_VSTD::__tree_is_left_child(__root)) | |
| 132 | 132 | return false; |
| 133 | 133 | // root must be black |
| 134 | 134 | if (!__root->__is_black_) |
| 135 | 135 | return false; |
| 136 | 136 | // do normal node checks |
| 137 | return __tree_sub_invariant(__root) != 0; | |
| 137 | return _VSTD::__tree_sub_invariant(__root) != 0; | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // Returns: pointer to the left-most node under __x. |
| ... | ... | @@ -168,8 +168,8 @@ _NodePtr |
| 168 | 168 | __tree_next(_NodePtr __x) _NOEXCEPT |
| 169 | 169 | { |
| 170 | 170 | if (__x->__right_ != nullptr) |
| 171 | return __tree_min(__x->__right_); | |
| 172 | while (!__tree_is_left_child(__x)) | |
| 171 | return _VSTD::__tree_min(__x->__right_); | |
| 172 | while (!_VSTD::__tree_is_left_child(__x)) | |
| 173 | 173 | __x = __x->__parent_unsafe(); |
| 174 | 174 | return __x->__parent_unsafe(); |
| 175 | 175 | } |
| ... | ... | @@ -180,8 +180,8 @@ _EndNodePtr |
| 180 | 180 | __tree_next_iter(_NodePtr __x) _NOEXCEPT |
| 181 | 181 | { |
| 182 | 182 | if (__x->__right_ != nullptr) |
| 183 | return static_cast<_EndNodePtr>(__tree_min(__x->__right_)); | |
| 184 | while (!__tree_is_left_child(__x)) | |
| 183 | return static_cast<_EndNodePtr>(_VSTD::__tree_min(__x->__right_)); | |
| 184 | while (!_VSTD::__tree_is_left_child(__x)) | |
| 185 | 185 | __x = __x->__parent_unsafe(); |
| 186 | 186 | return static_cast<_EndNodePtr>(__x->__parent_); |
| 187 | 187 | } |
| ... | ... | @@ -195,9 +195,9 @@ _NodePtr |
| 195 | 195 | __tree_prev_iter(_EndNodePtr __x) _NOEXCEPT |
| 196 | 196 | { |
| 197 | 197 | if (__x->__left_ != nullptr) |
| 198 | return __tree_max(__x->__left_); | |
| 198 | return _VSTD::__tree_max(__x->__left_); | |
| 199 | 199 | _NodePtr __xx = static_cast<_NodePtr>(__x); |
| 200 | while (__tree_is_left_child(__xx)) | |
| 200 | while (_VSTD::__tree_is_left_child(__xx)) | |
| 201 | 201 | __xx = __xx->__parent_unsafe(); |
| 202 | 202 | return __xx->__parent_unsafe(); |
| 203 | 203 | } |
| ... | ... | @@ -237,7 +237,7 @@ __tree_left_rotate(_NodePtr __x) _NOEXCEPT |
| 237 | 237 | if (__x->__right_ != nullptr) |
| 238 | 238 | __x->__right_->__set_parent(__x); |
| 239 | 239 | __y->__parent_ = __x->__parent_; |
| 240 | if (__tree_is_left_child(__x)) | |
| 240 | if (_VSTD::__tree_is_left_child(__x)) | |
| 241 | 241 | __x->__parent_->__left_ = __y; |
| 242 | 242 | else |
| 243 | 243 | __x->__parent_unsafe()->__right_ = __y; |
| ... | ... | @@ -257,7 +257,7 @@ __tree_right_rotate(_NodePtr __x) _NOEXCEPT |
| 257 | 257 | if (__x->__left_ != nullptr) |
| 258 | 258 | __x->__left_->__set_parent(__x); |
| 259 | 259 | __y->__parent_ = __x->__parent_; |
| 260 | if (__tree_is_left_child(__x)) | |
| 260 | if (_VSTD::__tree_is_left_child(__x)) | |
| 261 | 261 | __x->__parent_->__left_ = __y; |
| 262 | 262 | else |
| 263 | 263 | __x->__parent_unsafe()->__right_ = __y; |
| ... | ... | @@ -281,7 +281,7 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT |
| 281 | 281 | while (__x != __root && !__x->__parent_unsafe()->__is_black_) |
| 282 | 282 | { |
| 283 | 283 | // __x->__parent_ != __root because __x->__parent_->__is_black == false |
| 284 | if (__tree_is_left_child(__x->__parent_unsafe())) | |
| 284 | if (_VSTD::__tree_is_left_child(__x->__parent_unsafe())) | |
| 285 | 285 | { |
| 286 | 286 | _NodePtr __y = __x->__parent_unsafe()->__parent_unsafe()->__right_; |
| 287 | 287 | if (__y != nullptr && !__y->__is_black_) |
| ... | ... | @@ -294,16 +294,16 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT |
| 294 | 294 | } |
| 295 | 295 | else |
| 296 | 296 | { |
| 297 | if (!__tree_is_left_child(__x)) | |
| 297 | if (!_VSTD::__tree_is_left_child(__x)) | |
| 298 | 298 | { |
| 299 | 299 | __x = __x->__parent_unsafe(); |
| 300 | __tree_left_rotate(__x); | |
| 300 | _VSTD::__tree_left_rotate(__x); | |
| 301 | 301 | } |
| 302 | 302 | __x = __x->__parent_unsafe(); |
| 303 | 303 | __x->__is_black_ = true; |
| 304 | 304 | __x = __x->__parent_unsafe(); |
| 305 | 305 | __x->__is_black_ = false; |
| 306 | __tree_right_rotate(__x); | |
| 306 | _VSTD::__tree_right_rotate(__x); | |
| 307 | 307 | break; |
| 308 | 308 | } |
| 309 | 309 | } |
| ... | ... | @@ -320,16 +320,16 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT |
| 320 | 320 | } |
| 321 | 321 | else |
| 322 | 322 | { |
| 323 | if (__tree_is_left_child(__x)) | |
| 323 | if (_VSTD::__tree_is_left_child(__x)) | |
| 324 | 324 | { |
| 325 | 325 | __x = __x->__parent_unsafe(); |
| 326 | __tree_right_rotate(__x); | |
| 326 | _VSTD::__tree_right_rotate(__x); | |
| 327 | 327 | } |
| 328 | 328 | __x = __x->__parent_unsafe(); |
| 329 | 329 | __x->__is_black_ = true; |
| 330 | 330 | __x = __x->__parent_unsafe(); |
| 331 | 331 | __x->__is_black_ = false; |
| 332 | __tree_left_rotate(__x); | |
| 332 | _VSTD::__tree_left_rotate(__x); | |
| 333 | 333 | break; |
| 334 | 334 | } |
| 335 | 335 | } |
| ... | ... | @@ -352,7 +352,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 352 | 352 | // __y will have at most one child. |
| 353 | 353 | // __y will be the initial hole in the tree (make the hole at a leaf) |
| 354 | 354 | _NodePtr __y = (__z->__left_ == nullptr || __z->__right_ == nullptr) ? |
| 355 | __z : __tree_next(__z); | |
| 355 | __z : _VSTD::__tree_next(__z); | |
| 356 | 356 | // __x is __y's possibly null single child |
| 357 | 357 | _NodePtr __x = __y->__left_ != nullptr ? __y->__left_ : __y->__right_; |
| 358 | 358 | // __w is __x's possibly null uncle (will become __x's sibling) |
| ... | ... | @@ -360,7 +360,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 360 | 360 | // link __x to __y's parent, and find __w |
| 361 | 361 | if (__x != nullptr) |
| 362 | 362 | __x->__parent_ = __y->__parent_; |
| 363 | if (__tree_is_left_child(__y)) | |
| 363 | if (_VSTD::__tree_is_left_child(__y)) | |
| 364 | 364 | { |
| 365 | 365 | __y->__parent_->__left_ = __x; |
| 366 | 366 | if (__y != __root) |
| ... | ... | @@ -381,7 +381,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 381 | 381 | { |
| 382 | 382 | // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr |
| 383 | 383 | __y->__parent_ = __z->__parent_; |
| 384 | if (__tree_is_left_child(__z)) | |
| 384 | if (_VSTD::__tree_is_left_child(__z)) | |
| 385 | 385 | __y->__parent_->__left_ = __y; |
| 386 | 386 | else |
| 387 | 387 | __y->__parent_unsafe()->__right_ = __y; |
| ... | ... | @@ -421,13 +421,13 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 421 | 421 | // with a non-null black child). |
| 422 | 422 | while (true) |
| 423 | 423 | { |
| 424 | if (!__tree_is_left_child(__w)) // if x is left child | |
| 424 | if (!_VSTD::__tree_is_left_child(__w)) // if x is left child | |
| 425 | 425 | { |
| 426 | 426 | if (!__w->__is_black_) |
| 427 | 427 | { |
| 428 | 428 | __w->__is_black_ = true; |
| 429 | 429 | __w->__parent_unsafe()->__is_black_ = false; |
| 430 | __tree_left_rotate(__w->__parent_unsafe()); | |
| 430 | _VSTD::__tree_left_rotate(__w->__parent_unsafe()); | |
| 431 | 431 | // __x is still valid |
| 432 | 432 | // reset __root only if necessary |
| 433 | 433 | if (__root == __w->__left_) |
| ... | ... | @@ -448,7 +448,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 448 | 448 | break; |
| 449 | 449 | } |
| 450 | 450 | // reset sibling, and it still can't be null |
| 451 | __w = __tree_is_left_child(__x) ? | |
| 451 | __w = _VSTD::__tree_is_left_child(__x) ? | |
| 452 | 452 | __x->__parent_unsafe()->__right_ : |
| 453 | 453 | __x->__parent_->__left_; |
| 454 | 454 | // continue; |
| ... | ... | @@ -460,7 +460,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 460 | 460 | // __w left child is non-null and red |
| 461 | 461 | __w->__left_->__is_black_ = true; |
| 462 | 462 | __w->__is_black_ = false; |
| 463 | __tree_right_rotate(__w); | |
| 463 | _VSTD::__tree_right_rotate(__w); | |
| 464 | 464 | // __w is known not to be root, so root hasn't changed |
| 465 | 465 | // reset sibling, and it still can't be null |
| 466 | 466 | __w = __w->__parent_unsafe(); |
| ... | ... | @@ -469,7 +469,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 469 | 469 | __w->__is_black_ = __w->__parent_unsafe()->__is_black_; |
| 470 | 470 | __w->__parent_unsafe()->__is_black_ = true; |
| 471 | 471 | __w->__right_->__is_black_ = true; |
| 472 | __tree_left_rotate(__w->__parent_unsafe()); | |
| 472 | _VSTD::__tree_left_rotate(__w->__parent_unsafe()); | |
| 473 | 473 | break; |
| 474 | 474 | } |
| 475 | 475 | } |
| ... | ... | @@ -479,7 +479,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 479 | 479 | { |
| 480 | 480 | __w->__is_black_ = true; |
| 481 | 481 | __w->__parent_unsafe()->__is_black_ = false; |
| 482 | __tree_right_rotate(__w->__parent_unsafe()); | |
| 482 | _VSTD::__tree_right_rotate(__w->__parent_unsafe()); | |
| 483 | 483 | // __x is still valid |
| 484 | 484 | // reset __root only if necessary |
| 485 | 485 | if (__root == __w->__right_) |
| ... | ... | @@ -500,7 +500,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 500 | 500 | break; |
| 501 | 501 | } |
| 502 | 502 | // reset sibling, and it still can't be null |
| 503 | __w = __tree_is_left_child(__x) ? | |
| 503 | __w = _VSTD::__tree_is_left_child(__x) ? | |
| 504 | 504 | __x->__parent_unsafe()->__right_ : |
| 505 | 505 | __x->__parent_->__left_; |
| 506 | 506 | // continue; |
| ... | ... | @@ -512,7 +512,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 512 | 512 | // __w right child is non-null and red |
| 513 | 513 | __w->__right_->__is_black_ = true; |
| 514 | 514 | __w->__is_black_ = false; |
| 515 | __tree_left_rotate(__w); | |
| 515 | _VSTD::__tree_left_rotate(__w); | |
| 516 | 516 | // __w is known not to be root, so root hasn't changed |
| 517 | 517 | // reset sibling, and it still can't be null |
| 518 | 518 | __w = __w->__parent_unsafe(); |
| ... | ... | @@ -521,7 +521,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 521 | 521 | __w->__is_black_ = __w->__parent_unsafe()->__is_black_; |
| 522 | 522 | __w->__parent_unsafe()->__is_black_ = true; |
| 523 | 523 | __w->__left_->__is_black_ = true; |
| 524 | __tree_right_rotate(__w->__parent_unsafe()); | |
| 524 | _VSTD::__tree_right_rotate(__w->__parent_unsafe()); | |
| 525 | 525 | break; |
| 526 | 526 | } |
| 527 | 527 | } |
| ... | ... | @@ -533,19 +533,17 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT |
| 533 | 533 | // node traits |
| 534 | 534 | |
| 535 | 535 | |
| 536 | #ifndef _LIBCPP_CXX03_LANG | |
| 537 | 536 | template <class _Tp> |
| 538 | 537 | struct __is_tree_value_type_imp : false_type {}; |
| 539 | 538 | |
| 540 | 539 | template <class _Key, class _Value> |
| 541 | struct __is_tree_value_type_imp<__value_type<_Key, _Value>> : true_type {}; | |
| 540 | struct __is_tree_value_type_imp<__value_type<_Key, _Value> > : true_type {}; | |
| 542 | 541 | |
| 543 | 542 | template <class ..._Args> |
| 544 | 543 | struct __is_tree_value_type : false_type {}; |
| 545 | 544 | |
| 546 | 545 | template <class _One> |
| 547 | 546 | struct __is_tree_value_type<_One> : __is_tree_value_type_imp<typename __uncvref<_One>::type> {}; |
| 548 | #endif | |
| 549 | 547 | |
| 550 | 548 | template <class _Tp> |
| 551 | 549 | struct __tree_key_value_types { |
| ... | ... | @@ -566,12 +564,10 @@ struct __tree_key_value_types { |
| 566 | 564 | static __container_value_type* __get_ptr(__node_value_type& __n) { |
| 567 | 565 | return _VSTD::addressof(__n); |
| 568 | 566 | } |
| 569 | #ifndef _LIBCPP_CXX03_LANG | |
| 570 | 567 | _LIBCPP_INLINE_VISIBILITY |
| 571 | 568 | static __container_value_type&& __move(__node_value_type& __v) { |
| 572 | 569 | return _VSTD::move(__v); |
| 573 | 570 | } |
| 574 | #endif | |
| 575 | 571 | }; |
| 576 | 572 | |
| 577 | 573 | template <class _Key, class _Tp> |
| ... | ... | @@ -616,12 +612,10 @@ struct __tree_key_value_types<__value_type<_Key, _Tp> > { |
| 616 | 612 | return _VSTD::addressof(__n.__get_value()); |
| 617 | 613 | } |
| 618 | 614 | |
| 619 | #ifndef _LIBCPP_CXX03_LANG | |
| 620 | 615 | _LIBCPP_INLINE_VISIBILITY |
| 621 | 616 | static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) { |
| 622 | 617 | return __v.__move(); |
| 623 | 618 | } |
| 624 | #endif | |
| 625 | 619 | }; |
| 626 | 620 | |
| 627 | 621 | template <class _VoidPtr> |
| ... | ... | @@ -845,7 +839,7 @@ public: |
| 845 | 839 | _LIBCPP_INLINE_VISIBILITY |
| 846 | 840 | __tree_iterator& operator++() { |
| 847 | 841 | __ptr_ = static_cast<__iter_pointer>( |
| 848 | __tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); | |
| 842 | _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); | |
| 849 | 843 | return *this; |
| 850 | 844 | } |
| 851 | 845 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -854,7 +848,7 @@ public: |
| 854 | 848 | |
| 855 | 849 | _LIBCPP_INLINE_VISIBILITY |
| 856 | 850 | __tree_iterator& operator--() { |
| 857 | __ptr_ = static_cast<__iter_pointer>(__tree_prev_iter<__node_base_pointer>( | |
| 851 | __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>( | |
| 858 | 852 | static_cast<__end_node_pointer>(__ptr_))); |
| 859 | 853 | return *this; |
| 860 | 854 | } |
| ... | ... | @@ -926,7 +920,7 @@ public: |
| 926 | 920 | _LIBCPP_INLINE_VISIBILITY |
| 927 | 921 | __tree_const_iterator& operator++() { |
| 928 | 922 | __ptr_ = static_cast<__iter_pointer>( |
| 929 | __tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); | |
| 923 | _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); | |
| 930 | 924 | return *this; |
| 931 | 925 | } |
| 932 | 926 | |
| ... | ... | @@ -936,7 +930,7 @@ public: |
| 936 | 930 | |
| 937 | 931 | _LIBCPP_INLINE_VISIBILITY |
| 938 | 932 | __tree_const_iterator& operator--() { |
| 939 | __ptr_ = static_cast<__iter_pointer>(__tree_prev_iter<__node_base_pointer>( | |
| 933 | __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>( | |
| 940 | 934 | static_cast<__end_node_pointer>(__ptr_))); |
| 941 | 935 | return *this; |
| 942 | 936 | } |
| ... | ... | @@ -973,7 +967,7 @@ private: |
| 973 | 967 | |
| 974 | 968 | template<class _Tp, class _Compare> |
| 975 | 969 | #ifndef _LIBCPP_CXX03_LANG |
| 976 | _LIBCPP_DIAGNOSE_WARNING(!std::__invokable<_Compare const&, _Tp const&, _Tp const&>::value, | |
| 970 | _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value, | |
| 977 | 971 | "the specified comparator type does not provide a viable const call operator") |
| 978 | 972 | #endif |
| 979 | 973 | int __diagnose_non_const_comparator(); |
| ... | ... | @@ -1103,7 +1097,6 @@ public: |
| 1103 | 1097 | void __assign_unique(_ForwardIterator __first, _ForwardIterator __last); |
| 1104 | 1098 | template <class _InputIterator> |
| 1105 | 1099 | void __assign_multi(_InputIterator __first, _InputIterator __last); |
| 1106 | #ifndef _LIBCPP_CXX03_LANG | |
| 1107 | 1100 | __tree(__tree&& __t) |
| 1108 | 1101 | _NOEXCEPT_( |
| 1109 | 1102 | is_nothrow_move_constructible<__node_allocator>::value && |
| ... | ... | @@ -1114,8 +1107,6 @@ public: |
| 1114 | 1107 | __node_traits::propagate_on_container_move_assignment::value && |
| 1115 | 1108 | is_nothrow_move_assignable<value_compare>::value && |
| 1116 | 1109 | is_nothrow_move_assignable<__node_allocator>::value); |
| 1117 | #endif // _LIBCPP_CXX03_LANG | |
| 1118 | ||
| 1119 | 1110 | ~__tree(); |
| 1120 | 1111 | |
| 1121 | 1112 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1129,7 +1120,7 @@ public: |
| 1129 | 1120 | |
| 1130 | 1121 | _LIBCPP_INLINE_VISIBILITY |
| 1131 | 1122 | size_type max_size() const _NOEXCEPT |
| 1132 | {return std::min<size_type>( | |
| 1123 | {return _VSTD::min<size_type>( | |
| 1133 | 1124 | __node_traits::max_size(__node_alloc()), |
| 1134 | 1125 | numeric_limits<difference_type >::max());} |
| 1135 | 1126 | |
| ... | ... | @@ -1146,12 +1137,11 @@ public: |
| 1146 | 1137 | _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value); |
| 1147 | 1138 | #endif |
| 1148 | 1139 | |
| 1149 | #ifndef _LIBCPP_CXX03_LANG | |
| 1150 | 1140 | template <class _Key, class ..._Args> |
| 1151 | 1141 | pair<iterator, bool> |
| 1152 | 1142 | __emplace_unique_key_args(_Key const&, _Args&&... __args); |
| 1153 | 1143 | template <class _Key, class ..._Args> |
| 1154 | iterator | |
| 1144 | pair<iterator, bool> | |
| 1155 | 1145 | __emplace_hint_unique_key_args(const_iterator, _Key const&, _Args&&...); |
| 1156 | 1146 | |
| 1157 | 1147 | template <class... _Args> |
| ... | ... | @@ -1225,7 +1215,7 @@ public: |
| 1225 | 1215 | >::type __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) { |
| 1226 | 1216 | return __emplace_hint_unique_key_args(__p, __f, |
| 1227 | 1217 | _VSTD::forward<_First>(__f), |
| 1228 | _VSTD::forward<_Second>(__s)); | |
| 1218 | _VSTD::forward<_Second>(__s)).first; | |
| 1229 | 1219 | } |
| 1230 | 1220 | |
| 1231 | 1221 | template <class... _Args> |
| ... | ... | @@ -1245,25 +1235,16 @@ public: |
| 1245 | 1235 | _LIBCPP_INLINE_VISIBILITY |
| 1246 | 1236 | iterator |
| 1247 | 1237 | __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_self_tag) { |
| 1248 | return __emplace_hint_unique_key_args(__p, __x, _VSTD::forward<_Pp>(__x)); | |
| 1238 | return __emplace_hint_unique_key_args(__p, __x, _VSTD::forward<_Pp>(__x)).first; | |
| 1249 | 1239 | } |
| 1250 | 1240 | |
| 1251 | 1241 | template <class _Pp> |
| 1252 | 1242 | _LIBCPP_INLINE_VISIBILITY |
| 1253 | 1243 | iterator |
| 1254 | 1244 | __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_first_tag) { |
| 1255 | return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)); | |
| 1245 | return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)).first; | |
| 1256 | 1246 | } |
| 1257 | 1247 | |
| 1258 | #else | |
| 1259 | template <class _Key, class _Args> | |
| 1260 | _LIBCPP_INLINE_VISIBILITY | |
| 1261 | pair<iterator, bool> __emplace_unique_key_args(_Key const&, _Args& __args); | |
| 1262 | template <class _Key, class _Args> | |
| 1263 | _LIBCPP_INLINE_VISIBILITY | |
| 1264 | iterator __emplace_hint_unique_key_args(const_iterator, _Key const&, _Args&); | |
| 1265 | #endif | |
| 1266 | ||
| 1267 | 1248 | _LIBCPP_INLINE_VISIBILITY |
| 1268 | 1249 | pair<iterator, bool> __insert_unique(const __container_value_type& __v) { |
| 1269 | 1250 | return __emplace_unique_key_args(_NodeTypes::__get_key(__v), __v); |
| ... | ... | @@ -1271,15 +1252,9 @@ public: |
| 1271 | 1252 | |
| 1272 | 1253 | _LIBCPP_INLINE_VISIBILITY |
| 1273 | 1254 | iterator __insert_unique(const_iterator __p, const __container_value_type& __v) { |
| 1274 | return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), __v); | |
| 1255 | return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), __v).first; | |
| 1275 | 1256 | } |
| 1276 | 1257 | |
| 1277 | #ifdef _LIBCPP_CXX03_LANG | |
| 1278 | _LIBCPP_INLINE_VISIBILITY | |
| 1279 | iterator __insert_multi(const __container_value_type& __v); | |
| 1280 | _LIBCPP_INLINE_VISIBILITY | |
| 1281 | iterator __insert_multi(const_iterator __p, const __container_value_type& __v); | |
| 1282 | #else | |
| 1283 | 1258 | _LIBCPP_INLINE_VISIBILITY |
| 1284 | 1259 | pair<iterator, bool> __insert_unique(__container_value_type&& __v) { |
| 1285 | 1260 | return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _VSTD::move(__v)); |
| ... | ... | @@ -1287,7 +1262,7 @@ public: |
| 1287 | 1262 | |
| 1288 | 1263 | _LIBCPP_INLINE_VISIBILITY |
| 1289 | 1264 | iterator __insert_unique(const_iterator __p, __container_value_type&& __v) { |
| 1290 | return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _VSTD::move(__v)); | |
| 1265 | return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _VSTD::move(__v)).first; | |
| 1291 | 1266 | } |
| 1292 | 1267 | |
| 1293 | 1268 | template <class _Vp, class = typename enable_if< |
| ... | ... | @@ -1332,8 +1307,6 @@ public: |
| 1332 | 1307 | return __emplace_hint_multi(__p, _VSTD::forward<_Vp>(__v)); |
| 1333 | 1308 | } |
| 1334 | 1309 | |
| 1335 | #endif // !_LIBCPP_CXX03_LANG | |
| 1336 | ||
| 1337 | 1310 | _LIBCPP_INLINE_VISIBILITY |
| 1338 | 1311 | pair<iterator, bool> __node_assign_unique(const __container_value_type& __v, __node_pointer __dest); |
| 1339 | 1312 | |
| ... | ... | @@ -1455,7 +1428,7 @@ private: |
| 1455 | 1428 | __node_base_pointer& |
| 1456 | 1429 | __find_leaf(const_iterator __hint, |
| 1457 | 1430 | __parent_pointer& __parent, const key_type& __v); |
| 1458 | // FIXME: Make this function const qualified. Unfortunetly doing so | |
| 1431 | // FIXME: Make this function const qualified. Unfortunately doing so | |
| 1459 | 1432 | // breaks existing code which uses non-const callable comparators. |
| 1460 | 1433 | template <class _Key> |
| 1461 | 1434 | __node_base_pointer& |
| ... | ... | @@ -1471,12 +1444,8 @@ private: |
| 1471 | 1444 | __node_base_pointer& __dummy, |
| 1472 | 1445 | const _Key& __v); |
| 1473 | 1446 | |
| 1474 | #ifndef _LIBCPP_CXX03_LANG | |
| 1475 | 1447 | template <class ..._Args> |
| 1476 | 1448 | __node_holder __construct_node(_Args&& ...__args); |
| 1477 | #else | |
| 1478 | __node_holder __construct_node(const __container_value_type& __v); | |
| 1479 | #endif | |
| 1480 | 1449 | |
| 1481 | 1450 | void destroy(__node_pointer __nd) _NOEXCEPT; |
| 1482 | 1451 | |
| ... | ... | @@ -1621,20 +1590,20 @@ __tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_next(__node_poin |
| 1621 | 1590 | { |
| 1622 | 1591 | if (__cache->__parent_ == nullptr) |
| 1623 | 1592 | return nullptr; |
| 1624 | if (__tree_is_left_child(static_cast<__node_base_pointer>(__cache))) | |
| 1593 | if (_VSTD::__tree_is_left_child(static_cast<__node_base_pointer>(__cache))) | |
| 1625 | 1594 | { |
| 1626 | 1595 | __cache->__parent_->__left_ = nullptr; |
| 1627 | 1596 | __cache = static_cast<__node_pointer>(__cache->__parent_); |
| 1628 | 1597 | if (__cache->__right_ == nullptr) |
| 1629 | 1598 | return __cache; |
| 1630 | return static_cast<__node_pointer>(__tree_leaf(__cache->__right_)); | |
| 1599 | return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__right_)); | |
| 1631 | 1600 | } |
| 1632 | 1601 | // __cache is right child |
| 1633 | 1602 | __cache->__parent_unsafe()->__right_ = nullptr; |
| 1634 | 1603 | __cache = static_cast<__node_pointer>(__cache->__parent_); |
| 1635 | 1604 | if (__cache->__left_ == nullptr) |
| 1636 | 1605 | return __cache; |
| 1637 | return static_cast<__node_pointer>(__tree_leaf(__cache->__left_)); | |
| 1606 | return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__left_)); | |
| 1638 | 1607 | } |
| 1639 | 1608 | |
| 1640 | 1609 | template <class _Tp, class _Compare, class _Allocator> |
| ... | ... | @@ -1706,8 +1675,6 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t) |
| 1706 | 1675 | __begin_node() = __end_node(); |
| 1707 | 1676 | } |
| 1708 | 1677 | |
| 1709 | #ifndef _LIBCPP_CXX03_LANG | |
| 1710 | ||
| 1711 | 1678 | template <class _Tp, class _Compare, class _Allocator> |
| 1712 | 1679 | __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) |
| 1713 | 1680 | _NOEXCEPT_( |
| ... | ... | @@ -1814,8 +1781,6 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) |
| 1814 | 1781 | return *this; |
| 1815 | 1782 | } |
| 1816 | 1783 | |
| 1817 | #endif // _LIBCPP_CXX03_LANG | |
| 1818 | ||
| 1819 | 1784 | template <class _Tp, class _Compare, class _Allocator> |
| 1820 | 1785 | __tree<_Tp, _Compare, _Allocator>::~__tree() |
| 1821 | 1786 | { |
| ... | ... | @@ -1854,7 +1819,7 @@ __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t) |
| 1854 | 1819 | using _VSTD::swap; |
| 1855 | 1820 | swap(__begin_node_, __t.__begin_node_); |
| 1856 | 1821 | swap(__pair1_.first(), __t.__pair1_.first()); |
| 1857 | __swap_allocator(__node_alloc(), __t.__node_alloc()); | |
| 1822 | _VSTD::__swap_allocator(__node_alloc(), __t.__node_alloc()); | |
| 1858 | 1823 | __pair3_.swap(__t.__pair3_); |
| 1859 | 1824 | if (size() == 0) |
| 1860 | 1825 | __begin_node() = __end_node(); |
| ... | ... | @@ -2113,21 +2078,14 @@ void __tree<_Tp, _Compare, _Allocator>::__insert_node_at( |
| 2113 | 2078 | __child = __new_node; |
| 2114 | 2079 | if (__begin_node()->__left_ != nullptr) |
| 2115 | 2080 | __begin_node() = static_cast<__iter_pointer>(__begin_node()->__left_); |
| 2116 | __tree_balance_after_insert(__end_node()->__left_, __child); | |
| 2081 | _VSTD::__tree_balance_after_insert(__end_node()->__left_, __child); | |
| 2117 | 2082 | ++size(); |
| 2118 | 2083 | } |
| 2119 | 2084 | |
| 2120 | #ifndef _LIBCPP_CXX03_LANG | |
| 2121 | 2085 | template <class _Tp, class _Compare, class _Allocator> |
| 2122 | 2086 | template <class _Key, class... _Args> |
| 2123 | 2087 | pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> |
| 2124 | 2088 | __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args) |
| 2125 | #else | |
| 2126 | template <class _Tp, class _Compare, class _Allocator> | |
| 2127 | template <class _Key, class _Args> | |
| 2128 | pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> | |
| 2129 | __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args& __args) | |
| 2130 | #endif | |
| 2131 | 2089 | { |
| 2132 | 2090 | __parent_pointer __parent; |
| 2133 | 2091 | __node_base_pointer& __child = __find_equal(__parent, __k); |
| ... | ... | @@ -2135,11 +2093,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _A |
| 2135 | 2093 | bool __inserted = false; |
| 2136 | 2094 | if (__child == nullptr) |
| 2137 | 2095 | { |
| 2138 | #ifndef _LIBCPP_CXX03_LANG | |
| 2139 | 2096 | __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); |
| 2140 | #else | |
| 2141 | __node_holder __h = __construct_node(__args); | |
| 2142 | #endif | |
| 2143 | 2097 | __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); |
| 2144 | 2098 | __r = __h.release(); |
| 2145 | 2099 | __inserted = true; |
| ... | ... | @@ -2147,41 +2101,27 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _A |
| 2147 | 2101 | return pair<iterator, bool>(iterator(__r), __inserted); |
| 2148 | 2102 | } |
| 2149 | 2103 | |
| 2150 | ||
| 2151 | #ifndef _LIBCPP_CXX03_LANG | |
| 2152 | 2104 | template <class _Tp, class _Compare, class _Allocator> |
| 2153 | 2105 | template <class _Key, class... _Args> |
| 2154 | typename __tree<_Tp, _Compare, _Allocator>::iterator | |
| 2106 | pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> | |
| 2155 | 2107 | __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args( |
| 2156 | 2108 | const_iterator __p, _Key const& __k, _Args&&... __args) |
| 2157 | #else | |
| 2158 | template <class _Tp, class _Compare, class _Allocator> | |
| 2159 | template <class _Key, class _Args> | |
| 2160 | typename __tree<_Tp, _Compare, _Allocator>::iterator | |
| 2161 | __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args( | |
| 2162 | const_iterator __p, _Key const& __k, _Args& __args) | |
| 2163 | #endif | |
| 2164 | 2109 | { |
| 2165 | 2110 | __parent_pointer __parent; |
| 2166 | 2111 | __node_base_pointer __dummy; |
| 2167 | 2112 | __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __k); |
| 2168 | 2113 | __node_pointer __r = static_cast<__node_pointer>(__child); |
| 2114 | bool __inserted = false; | |
| 2169 | 2115 | if (__child == nullptr) |
| 2170 | 2116 | { |
| 2171 | #ifndef _LIBCPP_CXX03_LANG | |
| 2172 | 2117 | __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); |
| 2173 | #else | |
| 2174 | __node_holder __h = __construct_node(__args); | |
| 2175 | #endif | |
| 2176 | 2118 | __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); |
| 2177 | 2119 | __r = __h.release(); |
| 2120 | __inserted = true; | |
| 2178 | 2121 | } |
| 2179 | return iterator(__r); | |
| 2122 | return pair<iterator, bool>(iterator(__r), __inserted); | |
| 2180 | 2123 | } |
| 2181 | 2124 | |
| 2182 | ||
| 2183 | #ifndef _LIBCPP_CXX03_LANG | |
| 2184 | ||
| 2185 | 2125 | template <class _Tp, class _Compare, class _Allocator> |
| 2186 | 2126 | template <class ..._Args> |
| 2187 | 2127 | typename __tree<_Tp, _Compare, _Allocator>::__node_holder |
| ... | ... | @@ -2259,46 +2199,6 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p, |
| 2259 | 2199 | return iterator(static_cast<__node_pointer>(__h.release())); |
| 2260 | 2200 | } |
| 2261 | 2201 | |
| 2262 | ||
| 2263 | #else // _LIBCPP_CXX03_LANG | |
| 2264 | ||
| 2265 | template <class _Tp, class _Compare, class _Allocator> | |
| 2266 | typename __tree<_Tp, _Compare, _Allocator>::__node_holder | |
| 2267 | __tree<_Tp, _Compare, _Allocator>::__construct_node(const __container_value_type& __v) | |
| 2268 | { | |
| 2269 | __node_allocator& __na = __node_alloc(); | |
| 2270 | __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); | |
| 2271 | __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), __v); | |
| 2272 | __h.get_deleter().__value_constructed = true; | |
| 2273 | return _LIBCPP_EXPLICIT_MOVE(__h); // explicitly moved for C++03 | |
| 2274 | } | |
| 2275 | ||
| 2276 | #endif // _LIBCPP_CXX03_LANG | |
| 2277 | ||
| 2278 | #ifdef _LIBCPP_CXX03_LANG | |
| 2279 | template <class _Tp, class _Compare, class _Allocator> | |
| 2280 | typename __tree<_Tp, _Compare, _Allocator>::iterator | |
| 2281 | __tree<_Tp, _Compare, _Allocator>::__insert_multi(const __container_value_type& __v) | |
| 2282 | { | |
| 2283 | __parent_pointer __parent; | |
| 2284 | __node_base_pointer& __child = __find_leaf_high(__parent, _NodeTypes::__get_key(__v)); | |
| 2285 | __node_holder __h = __construct_node(__v); | |
| 2286 | __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); | |
| 2287 | return iterator(__h.release()); | |
| 2288 | } | |
| 2289 | ||
| 2290 | template <class _Tp, class _Compare, class _Allocator> | |
| 2291 | typename __tree<_Tp, _Compare, _Allocator>::iterator | |
| 2292 | __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const __container_value_type& __v) | |
| 2293 | { | |
| 2294 | __parent_pointer __parent; | |
| 2295 | __node_base_pointer& __child = __find_leaf(__p, __parent, _NodeTypes::__get_key(__v)); | |
| 2296 | __node_holder __h = __construct_node(__v); | |
| 2297 | __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); | |
| 2298 | return iterator(__h.release()); | |
| 2299 | } | |
| 2300 | #endif | |
| 2301 | ||
| 2302 | 2202 | template <class _Tp, class _Compare, class _Allocator> |
| 2303 | 2203 | pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> |
| 2304 | 2204 | __tree<_Tp, _Compare, _Allocator>::__node_assign_unique(const __container_value_type& __v, __node_pointer __nd) |
| ... | ... | @@ -2348,8 +2248,8 @@ __tree<_Tp, _Compare, _Allocator>::__remove_node_pointer(__node_pointer __ptr) _ |
| 2348 | 2248 | if (__begin_node() == __ptr) |
| 2349 | 2249 | __begin_node() = __r.__ptr_; |
| 2350 | 2250 | --size(); |
| 2351 | __tree_remove(__end_node()->__left_, | |
| 2352 | static_cast<__node_base_pointer>(__ptr)); | |
| 2251 | _VSTD::__tree_remove(__end_node()->__left_, | |
| 2252 | static_cast<__node_base_pointer>(__ptr)); | |
| 2353 | 2253 | return __r; |
| 2354 | 2254 | } |
| 2355 | 2255 | |
| ... | ... | @@ -2727,7 +2627,7 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) |
| 2727 | 2627 | return _Pp(iterator(__rt), |
| 2728 | 2628 | iterator( |
| 2729 | 2629 | __rt->__right_ != nullptr ? |
| 2730 | static_cast<__iter_pointer>(__tree_min(__rt->__right_)) | |
| 2630 | static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_)) | |
| 2731 | 2631 | : __result)); |
| 2732 | 2632 | } |
| 2733 | 2633 | return _Pp(iterator(__result), iterator(__result)); |
| ... | ... | @@ -2755,7 +2655,7 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const |
| 2755 | 2655 | return _Pp(const_iterator(__rt), |
| 2756 | 2656 | const_iterator( |
| 2757 | 2657 | __rt->__right_ != nullptr ? |
| 2758 | static_cast<__iter_pointer>(__tree_min(__rt->__right_)) | |
| 2658 | static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_)) | |
| 2759 | 2659 | : __result)); |
| 2760 | 2660 | } |
| 2761 | 2661 | return _Pp(const_iterator(__result), const_iterator(__result)); |
| ... | ... | @@ -2824,8 +2724,8 @@ __tree<_Tp, _Compare, _Allocator>::remove(const_iterator __p) _NOEXCEPT |
| 2824 | 2724 | __begin_node() = static_cast<__iter_pointer>(__np->__parent_); |
| 2825 | 2725 | } |
| 2826 | 2726 | --size(); |
| 2827 | __tree_remove(__end_node()->__left_, | |
| 2828 | static_cast<__node_base_pointer>(__np)); | |
| 2727 | _VSTD::__tree_remove(__end_node()->__left_, | |
| 2728 | static_cast<__node_base_pointer>(__np)); | |
| 2829 | 2729 | return __node_holder(__np, _Dp(__node_alloc(), true)); |
| 2830 | 2730 | } |
| 2831 | 2731 |
lib/libcxx/include/algorithm+417-268| ... | ... | @@ -47,16 +47,16 @@ template <class InputIterator, class Predicate> |
| 47 | 47 | find_if(InputIterator first, InputIterator last, Predicate pred); |
| 48 | 48 | |
| 49 | 49 | template<class InputIterator, class Predicate> |
| 50 | InputIterator // constexpr in C++20 | |
| 50 | constexpr InputIterator // constexpr in C++20 | |
| 51 | 51 | find_if_not(InputIterator first, InputIterator last, Predicate pred); |
| 52 | 52 | |
| 53 | 53 | template <class ForwardIterator1, class ForwardIterator2> |
| 54 | ForwardIterator1 // constexpr in C++20 | |
| 54 | constexpr ForwardIterator1 // constexpr in C++20 | |
| 55 | 55 | find_end(ForwardIterator1 first1, ForwardIterator1 last1, |
| 56 | 56 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 57 | 57 | |
| 58 | 58 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
| 59 | ForwardIterator1 // constexpr in C++20 | |
| 59 | constexpr ForwardIterator1 // constexpr in C++20 | |
| 60 | 60 | find_end(ForwardIterator1 first1, ForwardIterator1 last1, |
| 61 | 61 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 62 | 62 | |
| ... | ... | @@ -185,11 +185,11 @@ template <class BidirectionalIterator1, class BidirectionalIterator2> |
| 185 | 185 | BidirectionalIterator2 result); |
| 186 | 186 | |
| 187 | 187 | template <class ForwardIterator1, class ForwardIterator2> |
| 188 | ForwardIterator2 | |
| 188 | constexpr ForwardIterator2 // constexpr in C++20 | |
| 189 | 189 | swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); |
| 190 | 190 | |
| 191 | 191 | template <class ForwardIterator1, class ForwardIterator2> |
| 192 | void | |
| 192 | constexpr void // constexpr in C++20 | |
| 193 | 193 | iter_swap(ForwardIterator1 a, ForwardIterator2 b); |
| 194 | 194 | |
| 195 | 195 | template <class InputIterator, class OutputIterator, class UnaryOperation> |
| ... | ... | @@ -251,23 +251,23 @@ template <class InputIterator, class OutputIterator, class Predicate> |
| 251 | 251 | remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred); |
| 252 | 252 | |
| 253 | 253 | template <class ForwardIterator> |
| 254 | ForwardIterator | |
| 254 | constexpr ForwardIterator // constexpr in C++20 | |
| 255 | 255 | unique(ForwardIterator first, ForwardIterator last); |
| 256 | 256 | |
| 257 | 257 | template <class ForwardIterator, class BinaryPredicate> |
| 258 | ForwardIterator | |
| 258 | constexpr ForwardIterator // constexpr in C++20 | |
| 259 | 259 | unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred); |
| 260 | 260 | |
| 261 | 261 | template <class InputIterator, class OutputIterator> |
| 262 | OutputIterator | |
| 262 | constexpr OutputIterator // constexpr in C++20 | |
| 263 | 263 | unique_copy(InputIterator first, InputIterator last, OutputIterator result); |
| 264 | 264 | |
| 265 | 265 | template <class InputIterator, class OutputIterator, class BinaryPredicate> |
| 266 | OutputIterator | |
| 266 | constexpr OutputIterator // constexpr in C++20 | |
| 267 | 267 | unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate pred); |
| 268 | 268 | |
| 269 | 269 | template <class BidirectionalIterator> |
| 270 | void | |
| 270 | constexpr void // constexpr in C++20 | |
| 271 | 271 | reverse(BidirectionalIterator first, BidirectionalIterator last); |
| 272 | 272 | |
| 273 | 273 | template <class BidirectionalIterator, class OutputIterator> |
| ... | ... | @@ -275,11 +275,11 @@ template <class BidirectionalIterator, class OutputIterator> |
| 275 | 275 | reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result); |
| 276 | 276 | |
| 277 | 277 | template <class ForwardIterator> |
| 278 | ForwardIterator | |
| 278 | constexpr ForwardIterator // constexpr in C++20 | |
| 279 | 279 | rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last); |
| 280 | 280 | |
| 281 | 281 | template <class ForwardIterator, class OutputIterator> |
| 282 | OutputIterator | |
| 282 | constexpr OutputIterator // constexpr in C++20 | |
| 283 | 283 | rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result); |
| 284 | 284 | |
| 285 | 285 | template <class RandomAccessIterator> |
| ... | ... | @@ -301,12 +301,22 @@ template<class RandomAccessIterator, class UniformRandomNumberGenerator> |
| 301 | 301 | void shuffle(RandomAccessIterator first, RandomAccessIterator last, |
| 302 | 302 | UniformRandomNumberGenerator&& g); |
| 303 | 303 | |
| 304 | template<class ForwardIterator> | |
| 305 | constexpr ForwardIterator | |
| 306 | shift_left(ForwardIterator first, ForwardIterator last, | |
| 307 | typename iterator_traits<ForwardIterator>::difference_type n); // C++20 | |
| 308 | ||
| 309 | template<class ForwardIterator> | |
| 310 | constexpr ForwardIterator | |
| 311 | shift_right(ForwardIterator first, ForwardIterator last, | |
| 312 | typename iterator_traits<ForwardIterator>::difference_type n); // C++20 | |
| 313 | ||
| 304 | 314 | template <class InputIterator, class Predicate> |
| 305 | 315 | constexpr bool // constexpr in C++20 |
| 306 | 316 | is_partitioned(InputIterator first, InputIterator last, Predicate pred); |
| 307 | 317 | |
| 308 | 318 | template <class ForwardIterator, class Predicate> |
| 309 | ForwardIterator | |
| 319 | constexpr ForwardIterator // constexpr in C++20 | |
| 310 | 320 | partition(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 311 | 321 | |
| 312 | 322 | template <class InputIterator, class OutputIterator1, |
| ... | ... | @@ -329,7 +339,7 @@ template <class ForwardIterator> |
| 329 | 339 | is_sorted(ForwardIterator first, ForwardIterator last); |
| 330 | 340 | |
| 331 | 341 | template <class ForwardIterator, class Compare> |
| 332 | bool | |
| 342 | constexpr bool // constexpr in C++20 | |
| 333 | 343 | is_sorted(ForwardIterator first, ForwardIterator last, Compare comp); |
| 334 | 344 | |
| 335 | 345 | template<class ForwardIterator> |
| ... | ... | @@ -415,12 +425,12 @@ template <class ForwardIterator, class T, class Compare> |
| 415 | 425 | binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 416 | 426 | |
| 417 | 427 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
| 418 | OutputIterator | |
| 428 | constexpr OutputIterator // constexpr in C++20 | |
| 419 | 429 | merge(InputIterator1 first1, InputIterator1 last1, |
| 420 | 430 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 421 | 431 | |
| 422 | 432 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
| 423 | OutputIterator | |
| 433 | constexpr OutputIterator // constexpr in C++20 | |
| 424 | 434 | merge(InputIterator1 first1, InputIterator1 last1, |
| 425 | 435 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 426 | 436 | |
| ... | ... | @@ -441,12 +451,12 @@ template <class InputIterator1, class InputIterator2, class Compare> |
| 441 | 451 | includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp); |
| 442 | 452 | |
| 443 | 453 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
| 444 | OutputIterator | |
| 454 | constexpr OutputIterator // constexpr in C++20 | |
| 445 | 455 | set_union(InputIterator1 first1, InputIterator1 last1, |
| 446 | 456 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 447 | 457 | |
| 448 | 458 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
| 449 | OutputIterator | |
| 459 | constexpr OutputIterator // constexpr in C++20 | |
| 450 | 460 | set_union(InputIterator1 first1, InputIterator1 last1, |
| 451 | 461 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 452 | 462 | |
| ... | ... | @@ -461,22 +471,22 @@ template <class InputIterator1, class InputIterator2, class OutputIterator, clas |
| 461 | 471 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 462 | 472 | |
| 463 | 473 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
| 464 | OutputIterator | |
| 474 | constexpr OutputIterator // constexpr in C++20 | |
| 465 | 475 | set_difference(InputIterator1 first1, InputIterator1 last1, |
| 466 | 476 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 467 | 477 | |
| 468 | 478 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
| 469 | OutputIterator | |
| 479 | constexpr OutputIterator // constexpr in C++20 | |
| 470 | 480 | set_difference(InputIterator1 first1, InputIterator1 last1, |
| 471 | 481 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 472 | 482 | |
| 473 | 483 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
| 474 | OutputIterator | |
| 484 | constexpr OutputIterator // constexpr in C++20 | |
| 475 | 485 | set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, |
| 476 | 486 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 477 | 487 | |
| 478 | 488 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
| 479 | OutputIterator | |
| 489 | constexpr OutputIterator // constexpr in C++20 | |
| 480 | 490 | set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, |
| 481 | 491 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 482 | 492 | |
| ... | ... | @@ -529,82 +539,82 @@ template <class RandomAccessIterator, class Compare> |
| 529 | 539 | is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp); |
| 530 | 540 | |
| 531 | 541 | template <class ForwardIterator> |
| 532 | ForwardIterator | |
| 533 | min_element(ForwardIterator first, ForwardIterator last); // constexpr in C++14 | |
| 542 | constexpr ForwardIterator // constexpr in C++14 | |
| 543 | min_element(ForwardIterator first, ForwardIterator last); | |
| 534 | 544 | |
| 535 | 545 | template <class ForwardIterator, class Compare> |
| 536 | ForwardIterator | |
| 537 | min_element(ForwardIterator first, ForwardIterator last, Compare comp); // constexpr in C++14 | |
| 546 | constexpr ForwardIterator // constexpr in C++14 | |
| 547 | min_element(ForwardIterator first, ForwardIterator last, Compare comp); | |
| 538 | 548 | |
| 539 | 549 | template <class T> |
| 540 | const T& | |
| 541 | min(const T& a, const T& b); // constexpr in C++14 | |
| 550 | constexpr const T& // constexpr in C++14 | |
| 551 | min(const T& a, const T& b); | |
| 542 | 552 | |
| 543 | 553 | template <class T, class Compare> |
| 544 | const T& | |
| 545 | min(const T& a, const T& b, Compare comp); // constexpr in C++14 | |
| 554 | constexpr const T& // constexpr in C++14 | |
| 555 | min(const T& a, const T& b, Compare comp); | |
| 546 | 556 | |
| 547 | 557 | template<class T> |
| 548 | T | |
| 549 | min(initializer_list<T> t); // constexpr in C++14 | |
| 558 | constexpr T // constexpr in C++14 | |
| 559 | min(initializer_list<T> t); | |
| 550 | 560 | |
| 551 | 561 | template<class T, class Compare> |
| 552 | T | |
| 553 | min(initializer_list<T> t, Compare comp); // constexpr in C++14 | |
| 562 | constexpr T // constexpr in C++14 | |
| 563 | min(initializer_list<T> t, Compare comp); | |
| 554 | 564 | |
| 555 | 565 | template<class T> |
| 556 | constexpr const T& clamp( const T& v, const T& lo, const T& hi ); // C++17 | |
| 566 | constexpr const T& clamp(const T& v, const T& lo, const T& hi); // C++17 | |
| 557 | 567 | |
| 558 | 568 | template<class T, class Compare> |
| 559 | constexpr const T& clamp( const T& v, const T& lo, const T& hi, Compare comp ); // C++17 | |
| 569 | constexpr const T& clamp(const T& v, const T& lo, const T& hi, Compare comp); // C++17 | |
| 560 | 570 | |
| 561 | 571 | template <class ForwardIterator> |
| 562 | ForwardIterator | |
| 563 | max_element(ForwardIterator first, ForwardIterator last); // constexpr in C++14 | |
| 572 | constexpr ForwardIterator // constexpr in C++14 | |
| 573 | max_element(ForwardIterator first, ForwardIterator last); | |
| 564 | 574 | |
| 565 | 575 | template <class ForwardIterator, class Compare> |
| 566 | ForwardIterator | |
| 567 | max_element(ForwardIterator first, ForwardIterator last, Compare comp); // constexpr in C++14 | |
| 576 | constexpr ForwardIterator // constexpr in C++14 | |
| 577 | max_element(ForwardIterator first, ForwardIterator last, Compare comp); | |
| 568 | 578 | |
| 569 | 579 | template <class T> |
| 570 | const T& | |
| 571 | max(const T& a, const T& b); // constexpr in C++14 | |
| 580 | constexpr const T& // constexpr in C++14 | |
| 581 | max(const T& a, const T& b); | |
| 572 | 582 | |
| 573 | 583 | template <class T, class Compare> |
| 574 | const T& | |
| 575 | max(const T& a, const T& b, Compare comp); // constexpr in C++14 | |
| 584 | constexpr const T& // constexpr in C++14 | |
| 585 | max(const T& a, const T& b, Compare comp); | |
| 576 | 586 | |
| 577 | 587 | template<class T> |
| 578 | T | |
| 579 | max(initializer_list<T> t); // constexpr in C++14 | |
| 588 | constexpr T // constexpr in C++14 | |
| 589 | max(initializer_list<T> t); | |
| 580 | 590 | |
| 581 | 591 | template<class T, class Compare> |
| 582 | T | |
| 583 | max(initializer_list<T> t, Compare comp); // constexpr in C++14 | |
| 592 | constexpr T // constexpr in C++14 | |
| 593 | max(initializer_list<T> t, Compare comp); | |
| 584 | 594 | |
| 585 | 595 | template<class ForwardIterator> |
| 586 | pair<ForwardIterator, ForwardIterator> | |
| 587 | minmax_element(ForwardIterator first, ForwardIterator last); // constexpr in C++14 | |
| 596 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++14 | |
| 597 | minmax_element(ForwardIterator first, ForwardIterator last); | |
| 588 | 598 | |
| 589 | 599 | template<class ForwardIterator, class Compare> |
| 590 | pair<ForwardIterator, ForwardIterator> | |
| 591 | minmax_element(ForwardIterator first, ForwardIterator last, Compare comp); // constexpr in C++14 | |
| 600 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++14 | |
| 601 | minmax_element(ForwardIterator first, ForwardIterator last, Compare comp); | |
| 592 | 602 | |
| 593 | 603 | template<class T> |
| 594 | pair<const T&, const T&> | |
| 595 | minmax(const T& a, const T& b); // constexpr in C++14 | |
| 604 | constexpr pair<const T&, const T&> // constexpr in C++14 | |
| 605 | minmax(const T& a, const T& b); | |
| 596 | 606 | |
| 597 | 607 | template<class T, class Compare> |
| 598 | pair<const T&, const T&> | |
| 599 | minmax(const T& a, const T& b, Compare comp); // constexpr in C++14 | |
| 608 | constexpr pair<const T&, const T&> // constexpr in C++14 | |
| 609 | minmax(const T& a, const T& b, Compare comp); | |
| 600 | 610 | |
| 601 | 611 | template<class T> |
| 602 | pair<T, T> | |
| 603 | minmax(initializer_list<T> t); // constexpr in C++14 | |
| 612 | constexpr pair<T, T> // constexpr in C++14 | |
| 613 | minmax(initializer_list<T> t); | |
| 604 | 614 | |
| 605 | 615 | template<class T, class Compare> |
| 606 | pair<T, T> | |
| 607 | minmax(initializer_list<T> t, Compare comp); // constexpr in C++14 | |
| 616 | constexpr pair<T, T> // constexpr in C++14 | |
| 617 | minmax(initializer_list<T> t, Compare comp); | |
| 608 | 618 | |
| 609 | 619 | template <class InputIterator1, class InputIterator2> |
| 610 | 620 | constexpr bool // constexpr in C++20 |
| ... | ... | @@ -616,19 +626,19 @@ template <class InputIterator1, class InputIterator2, class Compare> |
| 616 | 626 | InputIterator2 first2, InputIterator2 last2, Compare comp); |
| 617 | 627 | |
| 618 | 628 | template <class BidirectionalIterator> |
| 619 | bool | |
| 629 | constexpr bool // constexpr in C++20 | |
| 620 | 630 | next_permutation(BidirectionalIterator first, BidirectionalIterator last); |
| 621 | 631 | |
| 622 | 632 | template <class BidirectionalIterator, class Compare> |
| 623 | bool | |
| 633 | constexpr bool // constexpr in C++20 | |
| 624 | 634 | next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); |
| 625 | 635 | |
| 626 | 636 | template <class BidirectionalIterator> |
| 627 | bool | |
| 637 | constexpr bool // constexpr in C++20 | |
| 628 | 638 | prev_permutation(BidirectionalIterator first, BidirectionalIterator last); |
| 629 | 639 | |
| 630 | 640 | template <class BidirectionalIterator, class Compare> |
| 631 | bool | |
| 641 | constexpr bool // constexpr in C++20 | |
| 632 | 642 | prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); |
| 633 | 643 | |
| 634 | 644 | } // std |
| ... | ... | @@ -895,7 +905,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 895 | 905 | _InputIterator |
| 896 | 906 | for_each_n(_InputIterator __first, _Size __orig_n, _Function __f) |
| 897 | 907 | { |
| 898 | typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize; | |
| 908 | typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; | |
| 899 | 909 | _IntegralSize __n = __orig_n; |
| 900 | 910 | while (__n > 0) |
| 901 | 911 | { |
| ... | ... | @@ -1614,7 +1624,7 @@ search_n(_ForwardIterator __first, _ForwardIterator __last, |
| 1614 | 1624 | _Size __count, const _Tp& __value_, _BinaryPredicate __pred) |
| 1615 | 1625 | { |
| 1616 | 1626 | return _VSTD::__search_n<typename add_lvalue_reference<_BinaryPredicate>::type> |
| 1617 | (__first, __last, __convert_to_integral(__count), __value_, __pred, | |
| 1627 | (__first, __last, _VSTD::__convert_to_integral(__count), __value_, __pred, | |
| 1618 | 1628 | typename iterator_traits<_ForwardIterator>::iterator_category()); |
| 1619 | 1629 | } |
| 1620 | 1630 | |
| ... | ... | @@ -1625,13 +1635,13 @@ _ForwardIterator |
| 1625 | 1635 | search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value_) |
| 1626 | 1636 | { |
| 1627 | 1637 | typedef typename iterator_traits<_ForwardIterator>::value_type __v; |
| 1628 | return _VSTD::search_n(__first, __last, __convert_to_integral(__count), | |
| 1638 | return _VSTD::search_n(__first, __last, _VSTD::__convert_to_integral(__count), | |
| 1629 | 1639 | __value_, __equal_to<__v, _Tp>()); |
| 1630 | 1640 | } |
| 1631 | 1641 | |
| 1632 | 1642 | // copy |
| 1633 | 1643 | template <class _Iter> |
| 1634 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1644 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1635 | 1645 | _Iter |
| 1636 | 1646 | __unwrap_iter(_Iter __i) |
| 1637 | 1647 | { |
| ... | ... | @@ -1639,7 +1649,7 @@ __unwrap_iter(_Iter __i) |
| 1639 | 1649 | } |
| 1640 | 1650 | |
| 1641 | 1651 | template <class _Tp> |
| 1642 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1652 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1643 | 1653 | typename enable_if |
| 1644 | 1654 | < |
| 1645 | 1655 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1653,7 +1663,7 @@ __unwrap_iter(move_iterator<_Tp*> __i) |
| 1653 | 1663 | #if _LIBCPP_DEBUG_LEVEL < 2 |
| 1654 | 1664 | |
| 1655 | 1665 | template <class _Tp> |
| 1656 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG | |
| 1666 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1657 | 1667 | typename enable_if |
| 1658 | 1668 | < |
| 1659 | 1669 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1665,7 +1675,7 @@ __unwrap_iter(__wrap_iter<_Tp*> __i) |
| 1665 | 1675 | } |
| 1666 | 1676 | |
| 1667 | 1677 | template <class _Tp> |
| 1668 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG | |
| 1678 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1669 | 1679 | typename enable_if |
| 1670 | 1680 | < |
| 1671 | 1681 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1679,7 +1689,7 @@ __unwrap_iter(__wrap_iter<const _Tp*> __i) |
| 1679 | 1689 | #else |
| 1680 | 1690 | |
| 1681 | 1691 | template <class _Tp> |
| 1682 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG | |
| 1692 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1683 | 1693 | typename enable_if |
| 1684 | 1694 | < |
| 1685 | 1695 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1707,7 +1717,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1707 | 1717 | _OutputIterator |
| 1708 | 1718 | __copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) |
| 1709 | 1719 | { |
| 1710 | return __copy_constexpr(__first, __last, __result); | |
| 1720 | return _VSTD::__copy_constexpr(__first, __last, __result); | |
| 1711 | 1721 | } |
| 1712 | 1722 | |
| 1713 | 1723 | template <class _Tp, class _Up> |
| ... | ... | @@ -1727,16 +1737,16 @@ __copy(_Tp* __first, _Tp* __last, _Up* __result) |
| 1727 | 1737 | } |
| 1728 | 1738 | |
| 1729 | 1739 | template <class _InputIterator, class _OutputIterator> |
| 1730 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 1740 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1731 | 1741 | _OutputIterator |
| 1732 | 1742 | copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) |
| 1733 | 1743 | { |
| 1734 | 1744 | if (__libcpp_is_constant_evaluated()) { |
| 1735 | 1745 | return _VSTD::__copy_constexpr( |
| 1736 | __unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result)); | |
| 1746 | _VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _VSTD::__unwrap_iter(__result)); | |
| 1737 | 1747 | } else { |
| 1738 | 1748 | return _VSTD::__copy( |
| 1739 | __unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result)); | |
| 1749 | _VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _VSTD::__unwrap_iter(__result)); | |
| 1740 | 1750 | } |
| 1741 | 1751 | } |
| 1742 | 1752 | |
| ... | ... | @@ -1757,7 +1767,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1757 | 1767 | _OutputIterator |
| 1758 | 1768 | __copy_backward(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) |
| 1759 | 1769 | { |
| 1760 | return __copy_backward_constexpr(__first, __last, __result); | |
| 1770 | return _VSTD::__copy_backward_constexpr(__first, __last, __result); | |
| 1761 | 1771 | } |
| 1762 | 1772 | |
| 1763 | 1773 | template <class _Tp, class _Up> |
| ... | ... | @@ -1780,19 +1790,19 @@ __copy_backward(_Tp* __first, _Tp* __last, _Up* __result) |
| 1780 | 1790 | } |
| 1781 | 1791 | |
| 1782 | 1792 | template <class _BidirectionalIterator1, class _BidirectionalIterator2> |
| 1783 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 1793 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1784 | 1794 | _BidirectionalIterator2 |
| 1785 | 1795 | copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, |
| 1786 | 1796 | _BidirectionalIterator2 __result) |
| 1787 | 1797 | { |
| 1788 | 1798 | if (__libcpp_is_constant_evaluated()) { |
| 1789 | return _VSTD::__copy_backward_constexpr(__unwrap_iter(__first), | |
| 1790 | __unwrap_iter(__last), | |
| 1791 | __unwrap_iter(__result)); | |
| 1799 | return _VSTD::__copy_backward_constexpr(_VSTD::__unwrap_iter(__first), | |
| 1800 | _VSTD::__unwrap_iter(__last), | |
| 1801 | _VSTD::__unwrap_iter(__result)); | |
| 1792 | 1802 | } else { |
| 1793 | return _VSTD::__copy_backward(__unwrap_iter(__first), | |
| 1794 | __unwrap_iter(__last), | |
| 1795 | __unwrap_iter(__result)); | |
| 1803 | return _VSTD::__copy_backward(_VSTD::__unwrap_iter(__first), | |
| 1804 | _VSTD::__unwrap_iter(__last), | |
| 1805 | _VSTD::__unwrap_iter(__result)); | |
| 1796 | 1806 | } |
| 1797 | 1807 | } |
| 1798 | 1808 | |
| ... | ... | @@ -1818,7 +1828,7 @@ copy_if(_InputIterator __first, _InputIterator __last, |
| 1818 | 1828 | // copy_n |
| 1819 | 1829 | |
| 1820 | 1830 | template<class _InputIterator, class _Size, class _OutputIterator> |
| 1821 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 1831 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1822 | 1832 | typename enable_if |
| 1823 | 1833 | < |
| 1824 | 1834 | __is_cpp17_input_iterator<_InputIterator>::value && |
| ... | ... | @@ -1827,7 +1837,7 @@ typename enable_if |
| 1827 | 1837 | >::type |
| 1828 | 1838 | copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) |
| 1829 | 1839 | { |
| 1830 | typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize; | |
| 1840 | typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; | |
| 1831 | 1841 | _IntegralSize __n = __orig_n; |
| 1832 | 1842 | if (__n > 0) |
| 1833 | 1843 | { |
| ... | ... | @@ -1844,7 +1854,7 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) |
| 1844 | 1854 | } |
| 1845 | 1855 | |
| 1846 | 1856 | template<class _InputIterator, class _Size, class _OutputIterator> |
| 1847 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED | |
| 1857 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1848 | 1858 | typename enable_if |
| 1849 | 1859 | < |
| 1850 | 1860 | __is_cpp17_random_access_iterator<_InputIterator>::value, |
| ... | ... | @@ -1852,25 +1862,35 @@ typename enable_if |
| 1852 | 1862 | >::type |
| 1853 | 1863 | copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) |
| 1854 | 1864 | { |
| 1855 | typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize; | |
| 1865 | typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; | |
| 1856 | 1866 | _IntegralSize __n = __orig_n; |
| 1857 | 1867 | return _VSTD::copy(__first, __first + __n, __result); |
| 1858 | 1868 | } |
| 1859 | 1869 | |
| 1860 | 1870 | // move |
| 1861 | 1871 | |
| 1872 | // __move_constexpr exists so that __move doesn't call itself when delegating to the constexpr | |
| 1873 | // version of __move. | |
| 1862 | 1874 | template <class _InputIterator, class _OutputIterator> |
| 1863 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1875 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 1864 | 1876 | _OutputIterator |
| 1865 | __move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) | |
| 1877 | __move_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result) | |
| 1866 | 1878 | { |
| 1867 | 1879 | for (; __first != __last; ++__first, (void) ++__result) |
| 1868 | 1880 | *__result = _VSTD::move(*__first); |
| 1869 | 1881 | return __result; |
| 1870 | 1882 | } |
| 1871 | 1883 | |
| 1884 | template <class _InputIterator, class _OutputIterator> | |
| 1885 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 1886 | _OutputIterator | |
| 1887 | __move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) | |
| 1888 | { | |
| 1889 | return _VSTD::__move_constexpr(__first, __last, __result); | |
| 1890 | } | |
| 1891 | ||
| 1872 | 1892 | template <class _Tp, class _Up> |
| 1873 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1893 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 1874 | 1894 | typename enable_if |
| 1875 | 1895 | < |
| 1876 | 1896 | is_same<typename remove_const<_Tp>::type, _Up>::value && |
| ... | ... | @@ -1879,6 +1899,8 @@ typename enable_if |
| 1879 | 1899 | >::type |
| 1880 | 1900 | __move(_Tp* __first, _Tp* __last, _Up* __result) |
| 1881 | 1901 | { |
| 1902 | if (__libcpp_is_constant_evaluated()) | |
| 1903 | return _VSTD::__move_constexpr(__first, __last, __result); | |
| 1882 | 1904 | const size_t __n = static_cast<size_t>(__last - __first); |
| 1883 | 1905 | if (__n > 0) |
| 1884 | 1906 | _VSTD::memmove(__result, __first, __n * sizeof(_Up)); |
| ... | ... | @@ -1886,27 +1908,37 @@ __move(_Tp* __first, _Tp* __last, _Up* __result) |
| 1886 | 1908 | } |
| 1887 | 1909 | |
| 1888 | 1910 | template <class _InputIterator, class _OutputIterator> |
| 1889 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1911 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1890 | 1912 | _OutputIterator |
| 1891 | 1913 | move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) |
| 1892 | 1914 | { |
| 1893 | return _VSTD::__move(__unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result)); | |
| 1915 | return _VSTD::__move(_VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _VSTD::__unwrap_iter(__result)); | |
| 1894 | 1916 | } |
| 1895 | 1917 | |
| 1896 | 1918 | // move_backward |
| 1897 | 1919 | |
| 1920 | // __move_backward_constexpr exists so that __move_backward doesn't call itself when delegating to | |
| 1921 | // the constexpr version of __move_backward. | |
| 1898 | 1922 | template <class _InputIterator, class _OutputIterator> |
| 1899 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1923 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 1900 | 1924 | _OutputIterator |
| 1901 | __move_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result) | |
| 1925 | __move_backward_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result) | |
| 1902 | 1926 | { |
| 1903 | 1927 | while (__first != __last) |
| 1904 | 1928 | *--__result = _VSTD::move(*--__last); |
| 1905 | 1929 | return __result; |
| 1906 | 1930 | } |
| 1907 | 1931 | |
| 1932 | template <class _InputIterator, class _OutputIterator> | |
| 1933 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 1934 | _OutputIterator | |
| 1935 | __move_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result) | |
| 1936 | { | |
| 1937 | return _VSTD::__move_backward_constexpr(__first, __last, __result); | |
| 1938 | } | |
| 1939 | ||
| 1908 | 1940 | template <class _Tp, class _Up> |
| 1909 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1941 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 1910 | 1942 | typename enable_if |
| 1911 | 1943 | < |
| 1912 | 1944 | is_same<typename remove_const<_Tp>::type, _Up>::value && |
| ... | ... | @@ -1915,6 +1947,8 @@ typename enable_if |
| 1915 | 1947 | >::type |
| 1916 | 1948 | __move_backward(_Tp* __first, _Tp* __last, _Up* __result) |
| 1917 | 1949 | { |
| 1950 | if (__libcpp_is_constant_evaluated()) | |
| 1951 | return _VSTD::__move_backward_constexpr(__first, __last, __result); | |
| 1918 | 1952 | const size_t __n = static_cast<size_t>(__last - __first); |
| 1919 | 1953 | if (__n > 0) |
| 1920 | 1954 | { |
| ... | ... | @@ -1925,12 +1959,12 @@ __move_backward(_Tp* __first, _Tp* __last, _Up* __result) |
| 1925 | 1959 | } |
| 1926 | 1960 | |
| 1927 | 1961 | template <class _BidirectionalIterator1, class _BidirectionalIterator2> |
| 1928 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1962 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1929 | 1963 | _BidirectionalIterator2 |
| 1930 | 1964 | move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, |
| 1931 | 1965 | _BidirectionalIterator2 __result) |
| 1932 | 1966 | { |
| 1933 | return _VSTD::__move_backward(__unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result)); | |
| 1967 | return _VSTD::__move_backward(_VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _VSTD::__unwrap_iter(__result)); | |
| 1934 | 1968 | } |
| 1935 | 1969 | |
| 1936 | 1970 | // iter_swap |
| ... | ... | @@ -2033,7 +2067,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 2033 | 2067 | _OutputIterator |
| 2034 | 2068 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_) |
| 2035 | 2069 | { |
| 2036 | return _VSTD::__fill_n(__first, __convert_to_integral(__n), __value_); | |
| 2070 | return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value_); | |
| 2037 | 2071 | } |
| 2038 | 2072 | |
| 2039 | 2073 | // fill |
| ... | ... | @@ -2081,7 +2115,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 2081 | 2115 | _OutputIterator |
| 2082 | 2116 | generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen) |
| 2083 | 2117 | { |
| 2084 | typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize; | |
| 2118 | typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; | |
| 2085 | 2119 | _IntegralSize __n = __orig_n; |
| 2086 | 2120 | for (; __n > 0; ++__first, (void) --__n) |
| 2087 | 2121 | *__first = __gen(); |
| ... | ... | @@ -2287,7 +2321,7 @@ unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __res |
| 2287 | 2321 | // reverse |
| 2288 | 2322 | |
| 2289 | 2323 | template <class _BidirectionalIterator> |
| 2290 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2324 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2291 | 2325 | void |
| 2292 | 2326 | __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag) |
| 2293 | 2327 | { |
| ... | ... | @@ -2301,7 +2335,7 @@ __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirec |
| 2301 | 2335 | } |
| 2302 | 2336 | |
| 2303 | 2337 | template <class _RandomAccessIterator> |
| 2304 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2338 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2305 | 2339 | void |
| 2306 | 2340 | __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) |
| 2307 | 2341 | { |
| ... | ... | @@ -2311,7 +2345,7 @@ __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_ac |
| 2311 | 2345 | } |
| 2312 | 2346 | |
| 2313 | 2347 | template <class _BidirectionalIterator> |
| 2314 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2348 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2315 | 2349 | void |
| 2316 | 2350 | reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) |
| 2317 | 2351 | { |
| ... | ... | @@ -2333,7 +2367,7 @@ reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _Out |
| 2333 | 2367 | // rotate |
| 2334 | 2368 | |
| 2335 | 2369 | template <class _ForwardIterator> |
| 2336 | _ForwardIterator | |
| 2370 | _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator | |
| 2337 | 2371 | __rotate_left(_ForwardIterator __first, _ForwardIterator __last) |
| 2338 | 2372 | { |
| 2339 | 2373 | typedef typename iterator_traits<_ForwardIterator>::value_type value_type; |
| ... | ... | @@ -2344,7 +2378,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last) |
| 2344 | 2378 | } |
| 2345 | 2379 | |
| 2346 | 2380 | template <class _BidirectionalIterator> |
| 2347 | _BidirectionalIterator | |
| 2381 | _LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator | |
| 2348 | 2382 | __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) |
| 2349 | 2383 | { |
| 2350 | 2384 | typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; |
| ... | ... | @@ -2356,7 +2390,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) |
| 2356 | 2390 | } |
| 2357 | 2391 | |
| 2358 | 2392 | template <class _ForwardIterator> |
| 2359 | _ForwardIterator | |
| 2393 | _LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator | |
| 2360 | 2394 | __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) |
| 2361 | 2395 | { |
| 2362 | 2396 | _ForwardIterator __i = __middle; |
| ... | ... | @@ -2392,7 +2426,7 @@ __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIt |
| 2392 | 2426 | |
| 2393 | 2427 | template<typename _Integral> |
| 2394 | 2428 | inline _LIBCPP_INLINE_VISIBILITY |
| 2395 | _Integral | |
| 2429 | _LIBCPP_CONSTEXPR_AFTER_CXX14 _Integral | |
| 2396 | 2430 | __algo_gcd(_Integral __x, _Integral __y) |
| 2397 | 2431 | { |
| 2398 | 2432 | do |
| ... | ... | @@ -2405,7 +2439,7 @@ __algo_gcd(_Integral __x, _Integral __y) |
| 2405 | 2439 | } |
| 2406 | 2440 | |
| 2407 | 2441 | template<typename _RandomAccessIterator> |
| 2408 | _RandomAccessIterator | |
| 2442 | _LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator | |
| 2409 | 2443 | __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) |
| 2410 | 2444 | { |
| 2411 | 2445 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; |
| ... | ... | @@ -2441,7 +2475,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran |
| 2441 | 2475 | |
| 2442 | 2476 | template <class _ForwardIterator> |
| 2443 | 2477 | inline _LIBCPP_INLINE_VISIBILITY |
| 2444 | _ForwardIterator | |
| 2478 | _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator | |
| 2445 | 2479 | __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, |
| 2446 | 2480 | _VSTD::forward_iterator_tag) |
| 2447 | 2481 | { |
| ... | ... | @@ -2456,7 +2490,7 @@ __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator _ |
| 2456 | 2490 | |
| 2457 | 2491 | template <class _BidirectionalIterator> |
| 2458 | 2492 | inline _LIBCPP_INLINE_VISIBILITY |
| 2459 | _BidirectionalIterator | |
| 2493 | _LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator | |
| 2460 | 2494 | __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, |
| 2461 | 2495 | _VSTD::bidirectional_iterator_tag) |
| 2462 | 2496 | { |
| ... | ... | @@ -2473,7 +2507,7 @@ __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _Bidir |
| 2473 | 2507 | |
| 2474 | 2508 | template <class _RandomAccessIterator> |
| 2475 | 2509 | inline _LIBCPP_INLINE_VISIBILITY |
| 2476 | _RandomAccessIterator | |
| 2510 | _LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator | |
| 2477 | 2511 | __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, |
| 2478 | 2512 | _VSTD::random_access_iterator_tag) |
| 2479 | 2513 | { |
| ... | ... | @@ -2491,7 +2525,7 @@ __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomA |
| 2491 | 2525 | |
| 2492 | 2526 | template <class _ForwardIterator> |
| 2493 | 2527 | inline _LIBCPP_INLINE_VISIBILITY |
| 2494 | _ForwardIterator | |
| 2528 | _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator | |
| 2495 | 2529 | rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) |
| 2496 | 2530 | { |
| 2497 | 2531 | if (__first == __middle) |
| ... | ... | @@ -2505,7 +2539,7 @@ rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __l |
| 2505 | 2539 | // rotate_copy |
| 2506 | 2540 | |
| 2507 | 2541 | template <class _ForwardIterator, class _OutputIterator> |
| 2508 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2542 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2509 | 2543 | _OutputIterator |
| 2510 | 2544 | rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) |
| 2511 | 2545 | { |
| ... | ... | @@ -2684,12 +2718,12 @@ clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi) |
| 2684 | 2718 | |
| 2685 | 2719 | template <class _ForwardIterator, class _Compare> |
| 2686 | 2720 | _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11 |
| 2687 | std::pair<_ForwardIterator, _ForwardIterator> | |
| 2721 | pair<_ForwardIterator, _ForwardIterator> | |
| 2688 | 2722 | minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) |
| 2689 | 2723 | { |
| 2690 | 2724 | static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value, |
| 2691 | 2725 | "std::minmax_element requires a ForwardIterator"); |
| 2692 | std::pair<_ForwardIterator, _ForwardIterator> __result(__first, __first); | |
| 2726 | pair<_ForwardIterator, _ForwardIterator> __result(__first, __first); | |
| 2693 | 2727 | if (__first != __last) |
| 2694 | 2728 | { |
| 2695 | 2729 | if (++__first != __last) |
| ... | ... | @@ -2735,7 +2769,7 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com |
| 2735 | 2769 | template <class _ForwardIterator> |
| 2736 | 2770 | _LIBCPP_NODISCARD_EXT inline |
| 2737 | 2771 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 |
| 2738 | std::pair<_ForwardIterator, _ForwardIterator> | |
| 2772 | pair<_ForwardIterator, _ForwardIterator> | |
| 2739 | 2773 | minmax_element(_ForwardIterator __first, _ForwardIterator __last) |
| 2740 | 2774 | { |
| 2741 | 2775 | return _VSTD::minmax_element(__first, __last, |
| ... | ... | @@ -2774,7 +2808,7 @@ minmax(initializer_list<_Tp> __t, _Compare __comp) |
| 2774 | 2808 | typedef typename initializer_list<_Tp>::const_iterator _Iter; |
| 2775 | 2809 | _Iter __first = __t.begin(); |
| 2776 | 2810 | _Iter __last = __t.end(); |
| 2777 | std::pair<_Tp, _Tp> __result(*__first, *__first); | |
| 2811 | pair<_Tp, _Tp> __result(*__first, *__first); | |
| 2778 | 2812 | |
| 2779 | 2813 | ++__first; |
| 2780 | 2814 | if (__t.size() % 2 == 0) |
| ... | ... | @@ -3005,9 +3039,17 @@ private: |
| 3005 | 3039 | |
| 3006 | 3040 | public: |
| 3007 | 3041 | // constructors and reset functions |
| 3008 | explicit uniform_int_distribution(result_type __a = 0, | |
| 3009 | result_type __b = numeric_limits<result_type>::max()) | |
| 3042 | #ifndef _LIBCPP_CXX03_LANG | |
| 3043 | uniform_int_distribution() : uniform_int_distribution(0) {} | |
| 3044 | explicit uniform_int_distribution( | |
| 3045 | result_type __a, result_type __b = numeric_limits<result_type>::max()) | |
| 3046 | : __p_(param_type(__a, __b)) {} | |
| 3047 | #else | |
| 3048 | explicit uniform_int_distribution( | |
| 3049 | result_type __a = 0, | |
| 3050 | result_type __b = numeric_limits<result_type>::max()) | |
| 3010 | 3051 | : __p_(param_type(__a, __b)) {} |
| 3052 | #endif | |
| 3011 | 3053 | explicit uniform_int_distribution(const param_type& __p) : __p_(__p) {} |
| 3012 | 3054 | void reset() {} |
| 3013 | 3055 | |
| ... | ... | @@ -3050,7 +3092,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK |
| 3050 | 3092 | if (_Rp == 0) |
| 3051 | 3093 | return static_cast<result_type>(_Eng(__g, _Dt)()); |
| 3052 | 3094 | size_t __w = _Dt - __libcpp_clz(_Rp) - 1; |
| 3053 | if ((_Rp & (std::numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0) | |
| 3095 | if ((_Rp & (numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0) | |
| 3054 | 3096 | ++__w; |
| 3055 | 3097 | _Eng __e(__g, __w); |
| 3056 | 3098 | _UIntType __u; |
| ... | ... | @@ -3227,6 +3269,111 @@ template<class _RandomAccessIterator, class _UniformRandomNumberGenerator> |
| 3227 | 3269 | } |
| 3228 | 3270 | } |
| 3229 | 3271 | |
| 3272 | #if _LIBCPP_STD_VER > 17 | |
| 3273 | ||
| 3274 | // shift_left, shift_right | |
| 3275 | ||
| 3276 | template <class _ForwardIterator> | |
| 3277 | inline _LIBCPP_INLINE_VISIBILITY constexpr | |
| 3278 | _ForwardIterator | |
| 3279 | shift_left(_ForwardIterator __first, _ForwardIterator __last, | |
| 3280 | typename iterator_traits<_ForwardIterator>::difference_type __n) | |
| 3281 | { | |
| 3282 | if (__n == 0) { | |
| 3283 | return __last; | |
| 3284 | } | |
| 3285 | ||
| 3286 | _ForwardIterator __m = __first; | |
| 3287 | if constexpr (__is_cpp17_random_access_iterator<_ForwardIterator>::value) { | |
| 3288 | if (__n >= __last - __first) { | |
| 3289 | return __first; | |
| 3290 | } | |
| 3291 | __m += __n; | |
| 3292 | } else { | |
| 3293 | for (; __n > 0; --__n) { | |
| 3294 | if (__m == __last) { | |
| 3295 | return __first; | |
| 3296 | } | |
| 3297 | ++__m; | |
| 3298 | } | |
| 3299 | } | |
| 3300 | return _VSTD::move(__m, __last, __first); | |
| 3301 | } | |
| 3302 | ||
| 3303 | template <class _ForwardIterator> | |
| 3304 | inline _LIBCPP_INLINE_VISIBILITY constexpr | |
| 3305 | _ForwardIterator | |
| 3306 | shift_right(_ForwardIterator __first, _ForwardIterator __last, | |
| 3307 | typename iterator_traits<_ForwardIterator>::difference_type __n) | |
| 3308 | { | |
| 3309 | if (__n == 0) { | |
| 3310 | return __first; | |
| 3311 | } | |
| 3312 | ||
| 3313 | if constexpr (__is_cpp17_random_access_iterator<_ForwardIterator>::value) { | |
| 3314 | decltype(__n) __d = __last - __first; | |
| 3315 | if (__n >= __d) { | |
| 3316 | return __last; | |
| 3317 | } | |
| 3318 | _ForwardIterator __m = __first + (__d - __n); | |
| 3319 | return _VSTD::move_backward(__first, __m, __last); | |
| 3320 | } else if constexpr (__is_cpp17_bidirectional_iterator<_ForwardIterator>::value) { | |
| 3321 | _ForwardIterator __m = __last; | |
| 3322 | for (; __n > 0; --__n) { | |
| 3323 | if (__m == __first) { | |
| 3324 | return __last; | |
| 3325 | } | |
| 3326 | --__m; | |
| 3327 | } | |
| 3328 | return _VSTD::move_backward(__first, __m, __last); | |
| 3329 | } else { | |
| 3330 | _ForwardIterator __ret = __first; | |
| 3331 | for (; __n > 0; --__n) { | |
| 3332 | if (__ret == __last) { | |
| 3333 | return __last; | |
| 3334 | } | |
| 3335 | ++__ret; | |
| 3336 | } | |
| 3337 | ||
| 3338 | // We have an __n-element scratch space from __first to __ret. | |
| 3339 | // Slide an __n-element window [__trail, __lead) from left to right. | |
| 3340 | // We're essentially doing swap_ranges(__first, __ret, __trail, __lead) | |
| 3341 | // over and over; but once __lead reaches __last we needn't bother | |
| 3342 | // to save the values of elements [__trail, __last). | |
| 3343 | ||
| 3344 | auto __trail = __first; | |
| 3345 | auto __lead = __ret; | |
| 3346 | while (__trail != __ret) { | |
| 3347 | if (__lead == __last) { | |
| 3348 | _VSTD::move(__first, __trail, __ret); | |
| 3349 | return __ret; | |
| 3350 | } | |
| 3351 | ++__trail; | |
| 3352 | ++__lead; | |
| 3353 | } | |
| 3354 | ||
| 3355 | _ForwardIterator __mid = __first; | |
| 3356 | while (true) { | |
| 3357 | if (__lead == __last) { | |
| 3358 | __trail = _VSTD::move(__mid, __ret, __trail); | |
| 3359 | _VSTD::move(__first, __mid, __trail); | |
| 3360 | return __ret; | |
| 3361 | } | |
| 3362 | swap(*__mid, *__trail); | |
| 3363 | ++__mid; | |
| 3364 | ++__trail; | |
| 3365 | ++__lead; | |
| 3366 | if (__mid == __ret) { | |
| 3367 | __mid = __first; | |
| 3368 | } | |
| 3369 | } | |
| 3370 | } | |
| 3371 | } | |
| 3372 | ||
| 3373 | #endif // _LIBCPP_STD_VER > 17 | |
| 3374 | ||
| 3375 | // is_partitioned | |
| 3376 | ||
| 3230 | 3377 | template <class _InputIterator, class _Predicate> |
| 3231 | 3378 | _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 bool |
| 3232 | 3379 | is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred) |
| ... | ... | @@ -3246,7 +3393,7 @@ is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred) |
| 3246 | 3393 | // partition |
| 3247 | 3394 | |
| 3248 | 3395 | template <class _Predicate, class _ForwardIterator> |
| 3249 | _ForwardIterator | |
| 3396 | _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator | |
| 3250 | 3397 | __partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, forward_iterator_tag) |
| 3251 | 3398 | { |
| 3252 | 3399 | while (true) |
| ... | ... | @@ -3269,7 +3416,7 @@ __partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred |
| 3269 | 3416 | } |
| 3270 | 3417 | |
| 3271 | 3418 | template <class _Predicate, class _BidirectionalIterator> |
| 3272 | _BidirectionalIterator | |
| 3419 | _LIBCPP_CONSTEXPR_AFTER_CXX17 _BidirectionalIterator | |
| 3273 | 3420 | __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred, |
| 3274 | 3421 | bidirectional_iterator_tag) |
| 3275 | 3422 | { |
| ... | ... | @@ -3294,7 +3441,7 @@ __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, _Pred |
| 3294 | 3441 | } |
| 3295 | 3442 | |
| 3296 | 3443 | template <class _ForwardIterator, class _Predicate> |
| 3297 | inline _LIBCPP_INLINE_VISIBILITY | |
| 3444 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3298 | 3445 | _ForwardIterator |
| 3299 | 3446 | partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) |
| 3300 | 3447 | { |
| ... | ... | @@ -3380,8 +3527,8 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate |
| 3380 | 3527 | // Move the falses into the temporary buffer, and the trues to the front of the line |
| 3381 | 3528 | // Update __first to always point to the end of the trues |
| 3382 | 3529 | value_type* __t = __p.first; |
| 3383 | ::new(__t) value_type(_VSTD::move(*__first)); | |
| 3384 | __d.__incr((value_type*)0); | |
| 3530 | ::new ((void*)__t) value_type(_VSTD::move(*__first)); | |
| 3531 | __d.template __incr<value_type>(); | |
| 3385 | 3532 | ++__t; |
| 3386 | 3533 | _ForwardIterator __i = __first; |
| 3387 | 3534 | while (++__i != __last) |
| ... | ... | @@ -3393,8 +3540,8 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate |
| 3393 | 3540 | } |
| 3394 | 3541 | else |
| 3395 | 3542 | { |
| 3396 | ::new(__t) value_type(_VSTD::move(*__i)); | |
| 3397 | __d.__incr((value_type*)0); | |
| 3543 | ::new ((void*)__t) value_type(_VSTD::move(*__i)); | |
| 3544 | __d.template __incr<value_type>(); | |
| 3398 | 3545 | ++__t; |
| 3399 | 3546 | } |
| 3400 | 3547 | } |
| ... | ... | @@ -3415,7 +3562,7 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate |
| 3415 | 3562 | // F????????????????? |
| 3416 | 3563 | // f m l |
| 3417 | 3564 | typedef typename add_lvalue_reference<_Predicate>::type _PredRef; |
| 3418 | _ForwardIterator __first_false = __stable_partition<_PredRef>(__first, __m, __pred, __len2, __p, __fit); | |
| 3565 | _ForwardIterator __first_false = _VSTD::__stable_partition<_PredRef>(__first, __m, __pred, __len2, __p, __fit); | |
| 3419 | 3566 | // TTTFFFFF?????????? |
| 3420 | 3567 | // f ff m l |
| 3421 | 3568 | // recurse on [__m, __last], except increase __m until *(__m) is false, *__last know to be true |
| ... | ... | @@ -3430,7 +3577,7 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate |
| 3430 | 3577 | } |
| 3431 | 3578 | // TTTFFFFFTTTF?????? |
| 3432 | 3579 | // f ff m m1 l |
| 3433 | __second_false = __stable_partition<_PredRef>(__m1, __last, __pred, __len_half, __p, __fit); | |
| 3580 | __second_false = _VSTD::__stable_partition<_PredRef>(__m1, __last, __pred, __len_half, __p, __fit); | |
| 3434 | 3581 | __second_half_done: |
| 3435 | 3582 | // TTTFFFFFTTTTTFFFFF |
| 3436 | 3583 | // f ff m sf l |
| ... | ... | @@ -3472,7 +3619,7 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate |
| 3472 | 3619 | __p = _VSTD::get_temporary_buffer<value_type>(__len); |
| 3473 | 3620 | __h.reset(__p.first); |
| 3474 | 3621 | } |
| 3475 | return __stable_partition<typename add_lvalue_reference<_Predicate>::type> | |
| 3622 | return _VSTD::__stable_partition<typename add_lvalue_reference<_Predicate>::type> | |
| 3476 | 3623 | (__first, __last, __pred, __len, __p, forward_iterator_tag()); |
| 3477 | 3624 | } |
| 3478 | 3625 | |
| ... | ... | @@ -3510,8 +3657,8 @@ __stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last |
| 3510 | 3657 | // Move the falses into the temporary buffer, and the trues to the front of the line |
| 3511 | 3658 | // Update __first to always point to the end of the trues |
| 3512 | 3659 | value_type* __t = __p.first; |
| 3513 | ::new(__t) value_type(_VSTD::move(*__first)); | |
| 3514 | __d.__incr((value_type*)0); | |
| 3660 | ::new ((void*)__t) value_type(_VSTD::move(*__first)); | |
| 3661 | __d.template __incr<value_type>(); | |
| 3515 | 3662 | ++__t; |
| 3516 | 3663 | _BidirectionalIterator __i = __first; |
| 3517 | 3664 | while (++__i != __last) |
| ... | ... | @@ -3523,8 +3670,8 @@ __stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last |
| 3523 | 3670 | } |
| 3524 | 3671 | else |
| 3525 | 3672 | { |
| 3526 | ::new(__t) value_type(_VSTD::move(*__i)); | |
| 3527 | __d.__incr((value_type*)0); | |
| 3673 | ::new ((void*)__t) value_type(_VSTD::move(*__i)); | |
| 3674 | __d.template __incr<value_type>(); | |
| 3528 | 3675 | ++__t; |
| 3529 | 3676 | } |
| 3530 | 3677 | } |
| ... | ... | @@ -3558,7 +3705,7 @@ __stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last |
| 3558 | 3705 | // F???TFFF?????????T |
| 3559 | 3706 | // f m1 m l |
| 3560 | 3707 | typedef typename add_lvalue_reference<_Predicate>::type _PredRef; |
| 3561 | __first_false = __stable_partition<_PredRef>(__first, __m1, __pred, __len_half, __p, __bit); | |
| 3708 | __first_false = _VSTD::__stable_partition<_PredRef>(__first, __m1, __pred, __len_half, __p, __bit); | |
| 3562 | 3709 | __first_half_done: |
| 3563 | 3710 | // TTTFFFFF?????????T |
| 3564 | 3711 | // f ff m l |
| ... | ... | @@ -3575,7 +3722,7 @@ __first_half_done: |
| 3575 | 3722 | } |
| 3576 | 3723 | // TTTFFFFFTTTF?????T |
| 3577 | 3724 | // f ff m m1 l |
| 3578 | __second_false = __stable_partition<_PredRef>(__m1, __last, __pred, __len_half, __p, __bit); | |
| 3725 | __second_false = _VSTD::__stable_partition<_PredRef>(__m1, __last, __pred, __len_half, __p, __bit); | |
| 3579 | 3726 | __second_half_done: |
| 3580 | 3727 | // TTTFFFFFTTTTTFFFFF |
| 3581 | 3728 | // f ff m sf l |
| ... | ... | @@ -3620,7 +3767,7 @@ __stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last |
| 3620 | 3767 | __p = _VSTD::get_temporary_buffer<value_type>(__len); |
| 3621 | 3768 | __h.reset(__p.first); |
| 3622 | 3769 | } |
| 3623 | return __stable_partition<typename add_lvalue_reference<_Predicate>::type> | |
| 3770 | return _VSTD::__stable_partition<typename add_lvalue_reference<_Predicate>::type> | |
| 3624 | 3771 | (__first, __last, __pred, __len, __p, bidirectional_iterator_tag()); |
| 3625 | 3772 | } |
| 3626 | 3773 | |
| ... | ... | @@ -3629,7 +3776,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 3629 | 3776 | _ForwardIterator |
| 3630 | 3777 | stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) |
| 3631 | 3778 | { |
| 3632 | return __stable_partition<typename add_lvalue_reference<_Predicate>::type> | |
| 3779 | return _VSTD::__stable_partition<typename add_lvalue_reference<_Predicate>::type> | |
| 3633 | 3780 | (__first, __last, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); |
| 3634 | 3781 | } |
| 3635 | 3782 | |
| ... | ... | @@ -3727,7 +3874,7 @@ unsigned |
| 3727 | 3874 | __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, |
| 3728 | 3875 | _ForwardIterator __x4, _Compare __c) |
| 3729 | 3876 | { |
| 3730 | unsigned __r = __sort3<_Compare>(__x1, __x2, __x3, __c); | |
| 3877 | unsigned __r = _VSTD::__sort3<_Compare>(__x1, __x2, __x3, __c); | |
| 3731 | 3878 | if (__c(*__x4, *__x3)) |
| 3732 | 3879 | { |
| 3733 | 3880 | swap(*__x3, *__x4); |
| ... | ... | @@ -3754,7 +3901,7 @@ unsigned |
| 3754 | 3901 | __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, |
| 3755 | 3902 | _ForwardIterator __x4, _ForwardIterator __x5, _Compare __c) |
| 3756 | 3903 | { |
| 3757 | unsigned __r = __sort4<_Compare>(__x1, __x2, __x3, __x4, __c); | |
| 3904 | unsigned __r = _VSTD::__sort4<_Compare>(__x1, __x2, __x3, __x4, __c); | |
| 3758 | 3905 | if (__c(*__x5, *__x4)) |
| 3759 | 3906 | { |
| 3760 | 3907 | swap(*__x4, *__x5); |
| ... | ... | @@ -3779,14 +3926,14 @@ __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, |
| 3779 | 3926 | } |
| 3780 | 3927 | |
| 3781 | 3928 | // Assumes size > 0 |
| 3782 | template <class _Compare, class _BirdirectionalIterator> | |
| 3929 | template <class _Compare, class _BidirectionalIterator> | |
| 3783 | 3930 | void |
| 3784 | __selection_sort(_BirdirectionalIterator __first, _BirdirectionalIterator __last, _Compare __comp) | |
| 3931 | __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) | |
| 3785 | 3932 | { |
| 3786 | _BirdirectionalIterator __lm1 = __last; | |
| 3933 | _BidirectionalIterator __lm1 = __last; | |
| 3787 | 3934 | for (--__lm1; __first != __lm1; ++__first) |
| 3788 | 3935 | { |
| 3789 | _BirdirectionalIterator __i = _VSTD::min_element<_BirdirectionalIterator, | |
| 3936 | _BidirectionalIterator __i = _VSTD::min_element<_BidirectionalIterator, | |
| 3790 | 3937 | typename add_lvalue_reference<_Compare>::type> |
| 3791 | 3938 | (__first, __last, __comp); |
| 3792 | 3939 | if (__i != __first) |
| ... | ... | @@ -3794,19 +3941,19 @@ __selection_sort(_BirdirectionalIterator __first, _BirdirectionalIterator __last |
| 3794 | 3941 | } |
| 3795 | 3942 | } |
| 3796 | 3943 | |
| 3797 | template <class _Compare, class _BirdirectionalIterator> | |
| 3944 | template <class _Compare, class _BidirectionalIterator> | |
| 3798 | 3945 | void |
| 3799 | __insertion_sort(_BirdirectionalIterator __first, _BirdirectionalIterator __last, _Compare __comp) | |
| 3946 | __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) | |
| 3800 | 3947 | { |
| 3801 | typedef typename iterator_traits<_BirdirectionalIterator>::value_type value_type; | |
| 3948 | typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; | |
| 3802 | 3949 | if (__first != __last) |
| 3803 | 3950 | { |
| 3804 | _BirdirectionalIterator __i = __first; | |
| 3951 | _BidirectionalIterator __i = __first; | |
| 3805 | 3952 | for (++__i; __i != __last; ++__i) |
| 3806 | 3953 | { |
| 3807 | _BirdirectionalIterator __j = __i; | |
| 3954 | _BidirectionalIterator __j = __i; | |
| 3808 | 3955 | value_type __t(_VSTD::move(*__j)); |
| 3809 | for (_BirdirectionalIterator __k = __i; __k != __first && __comp(__t, *--__k); --__j) | |
| 3956 | for (_BidirectionalIterator __k = __i; __k != __first && __comp(__t, *--__k); --__j) | |
| 3810 | 3957 | *__j = _VSTD::move(*__k); |
| 3811 | 3958 | *__j = _VSTD::move(__t); |
| 3812 | 3959 | } |
| ... | ... | @@ -3819,7 +3966,7 @@ __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __last, |
| 3819 | 3966 | { |
| 3820 | 3967 | typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; |
| 3821 | 3968 | _RandomAccessIterator __j = __first+2; |
| 3822 | __sort3<_Compare>(__first, __first+1, __j, __comp); | |
| 3969 | _VSTD::__sort3<_Compare>(__first, __first+1, __j, __comp); | |
| 3823 | 3970 | for (_RandomAccessIterator __i = __j+1; __i != __last; ++__i) |
| 3824 | 3971 | { |
| 3825 | 3972 | if (__comp(*__i, *__j)) |
| ... | ... | @@ -3863,7 +4010,7 @@ __insertion_sort_incomplete(_RandomAccessIterator __first, _RandomAccessIterator |
| 3863 | 4010 | } |
| 3864 | 4011 | typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; |
| 3865 | 4012 | _RandomAccessIterator __j = __first+2; |
| 3866 | __sort3<_Compare>(__first, __first+1, __j, __comp); | |
| 4013 | _VSTD::__sort3<_Compare>(__first, __first+1, __j, __comp); | |
| 3867 | 4014 | const unsigned __limit = 8; |
| 3868 | 4015 | unsigned __count = 0; |
| 3869 | 4016 | for (_RandomAccessIterator __i = __j+1; __i != __last; ++__i) |
| ... | ... | @@ -3887,35 +4034,35 @@ __insertion_sort_incomplete(_RandomAccessIterator __first, _RandomAccessIterator |
| 3887 | 4034 | return true; |
| 3888 | 4035 | } |
| 3889 | 4036 | |
| 3890 | template <class _Compare, class _BirdirectionalIterator> | |
| 4037 | template <class _Compare, class _BidirectionalIterator> | |
| 3891 | 4038 | void |
| 3892 | __insertion_sort_move(_BirdirectionalIterator __first1, _BirdirectionalIterator __last1, | |
| 3893 | typename iterator_traits<_BirdirectionalIterator>::value_type* __first2, _Compare __comp) | |
| 4039 | __insertion_sort_move(_BidirectionalIterator __first1, _BidirectionalIterator __last1, | |
| 4040 | typename iterator_traits<_BidirectionalIterator>::value_type* __first2, _Compare __comp) | |
| 3894 | 4041 | { |
| 3895 | typedef typename iterator_traits<_BirdirectionalIterator>::value_type value_type; | |
| 4042 | typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; | |
| 3896 | 4043 | if (__first1 != __last1) |
| 3897 | 4044 | { |
| 3898 | 4045 | __destruct_n __d(0); |
| 3899 | 4046 | unique_ptr<value_type, __destruct_n&> __h(__first2, __d); |
| 3900 | 4047 | value_type* __last2 = __first2; |
| 3901 | ::new(__last2) value_type(_VSTD::move(*__first1)); | |
| 3902 | __d.__incr((value_type*)0); | |
| 4048 | ::new ((void*)__last2) value_type(_VSTD::move(*__first1)); | |
| 4049 | __d.template __incr<value_type>(); | |
| 3903 | 4050 | for (++__last2; ++__first1 != __last1; ++__last2) |
| 3904 | 4051 | { |
| 3905 | 4052 | value_type* __j2 = __last2; |
| 3906 | 4053 | value_type* __i2 = __j2; |
| 3907 | 4054 | if (__comp(*__first1, *--__i2)) |
| 3908 | 4055 | { |
| 3909 | ::new(__j2) value_type(_VSTD::move(*__i2)); | |
| 3910 | __d.__incr((value_type*)0); | |
| 4056 | ::new ((void*)__j2) value_type(_VSTD::move(*__i2)); | |
| 4057 | __d.template __incr<value_type>(); | |
| 3911 | 4058 | for (--__j2; __i2 != __first2 && __comp(*__first1, *--__i2); --__j2) |
| 3912 | 4059 | *__j2 = _VSTD::move(*__i2); |
| 3913 | 4060 | *__j2 = _VSTD::move(*__first1); |
| 3914 | 4061 | } |
| 3915 | 4062 | else |
| 3916 | 4063 | { |
| 3917 | ::new(__j2) value_type(_VSTD::move(*__first1)); | |
| 3918 | __d.__incr((value_type*)0); | |
| 4064 | ::new ((void*)__j2) value_type(_VSTD::move(*__first1)); | |
| 4065 | __d.template __incr<value_type>(); | |
| 3919 | 4066 | } |
| 3920 | 4067 | } |
| 3921 | 4068 | __h.release(); |
| ... | ... | @@ -4032,7 +4179,7 @@ __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __c |
| 4032 | 4179 | ++__i; |
| 4033 | 4180 | } |
| 4034 | 4181 | // [__first, __i) == *__first and *__first < [__i, __last) |
| 4035 | // The first part is sorted, sort the secod part | |
| 4182 | // The first part is sorted, sort the second part | |
| 4036 | 4183 | // _VSTD::__sort<_Compare>(__i, __last, __comp); |
| 4037 | 4184 | __first = __i; |
| 4038 | 4185 | goto __restart; |
| ... | ... | @@ -4138,7 +4285,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 4138 | 4285 | void |
| 4139 | 4286 | sort(_Tp** __first, _Tp** __last) |
| 4140 | 4287 | { |
| 4141 | _VSTD::sort((size_t*)__first, (size_t*)__last, __less<size_t>()); | |
| 4288 | _VSTD::sort((uintptr_t*)__first, (uintptr_t*)__last, __less<uintptr_t>()); | |
| 4142 | 4289 | } |
| 4143 | 4290 | |
| 4144 | 4291 | template <class _Tp> |
| ... | ... | @@ -4223,7 +4370,7 @@ _ForwardIterator |
| 4223 | 4370 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) |
| 4224 | 4371 | { |
| 4225 | 4372 | typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; |
| 4226 | return __lower_bound<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4373 | return _VSTD::__lower_bound<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4227 | 4374 | } |
| 4228 | 4375 | |
| 4229 | 4376 | template <class _ForwardIterator, class _Tp> |
| ... | ... | @@ -4267,7 +4414,7 @@ _ForwardIterator |
| 4267 | 4414 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) |
| 4268 | 4415 | { |
| 4269 | 4416 | typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; |
| 4270 | return __upper_bound<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4417 | return _VSTD::__upper_bound<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4271 | 4418 | } |
| 4272 | 4419 | |
| 4273 | 4420 | template <class _ForwardIterator, class _Tp> |
| ... | ... | @@ -4308,8 +4455,8 @@ __equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va |
| 4308 | 4455 | _ForwardIterator __mp1 = __m; |
| 4309 | 4456 | return pair<_ForwardIterator, _ForwardIterator> |
| 4310 | 4457 | ( |
| 4311 | __lower_bound<_Compare>(__first, __m, __value_, __comp), | |
| 4312 | __upper_bound<_Compare>(++__mp1, __last, __value_, __comp) | |
| 4458 | _VSTD::__lower_bound<_Compare>(__first, __m, __value_, __comp), | |
| 4459 | _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value_, __comp) | |
| 4313 | 4460 | ); |
| 4314 | 4461 | } |
| 4315 | 4462 | } |
| ... | ... | @@ -4323,7 +4470,7 @@ pair<_ForwardIterator, _ForwardIterator> |
| 4323 | 4470 | equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) |
| 4324 | 4471 | { |
| 4325 | 4472 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 4326 | return __equal_range<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4473 | return _VSTD::__equal_range<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4327 | 4474 | } |
| 4328 | 4475 | |
| 4329 | 4476 | template <class _ForwardIterator, class _Tp> |
| ... | ... | @@ -4343,7 +4490,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 4343 | 4490 | bool |
| 4344 | 4491 | __binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) |
| 4345 | 4492 | { |
| 4346 | __first = __lower_bound<_Compare>(__first, __last, __value_, __comp); | |
| 4493 | __first = _VSTD::__lower_bound<_Compare>(__first, __last, __value_, __comp); | |
| 4347 | 4494 | return __first != __last && !__comp(__value_, *__first); |
| 4348 | 4495 | } |
| 4349 | 4496 | |
| ... | ... | @@ -4354,7 +4501,7 @@ bool |
| 4354 | 4501 | binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) |
| 4355 | 4502 | { |
| 4356 | 4503 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 4357 | return __binary_search<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4504 | return _VSTD::__binary_search<_Comp_ref>(__first, __last, __value_, __comp); | |
| 4358 | 4505 | } |
| 4359 | 4506 | |
| 4360 | 4507 | template <class _ForwardIterator, class _Tp> |
| ... | ... | @@ -4370,6 +4517,7 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va |
| 4370 | 4517 | // merge |
| 4371 | 4518 | |
| 4372 | 4519 | template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 4520 | _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 4373 | 4521 | _OutputIterator |
| 4374 | 4522 | __merge(_InputIterator1 __first1, _InputIterator1 __last1, |
| 4375 | 4523 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| ... | ... | @@ -4393,7 +4541,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1, |
| 4393 | 4541 | } |
| 4394 | 4542 | |
| 4395 | 4543 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare> |
| 4396 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4544 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 4397 | 4545 | _OutputIterator |
| 4398 | 4546 | merge(_InputIterator1 __first1, _InputIterator1 __last1, |
| 4399 | 4547 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| ... | ... | @@ -4403,7 +4551,7 @@ merge(_InputIterator1 __first1, _InputIterator1 __last1, |
| 4403 | 4551 | } |
| 4404 | 4552 | |
| 4405 | 4553 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 4406 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4554 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 4407 | 4555 | _OutputIterator |
| 4408 | 4556 | merge(_InputIterator1 __first1, _InputIterator1 __last1, |
| 4409 | 4557 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) |
| ... | ... | @@ -4456,20 +4604,21 @@ __buffered_inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator |
| 4456 | 4604 | if (__len1 <= __len2) |
| 4457 | 4605 | { |
| 4458 | 4606 | value_type* __p = __buff; |
| 4459 | for (_BidirectionalIterator __i = __first; __i != __middle; __d.__incr((value_type*)0), (void) ++__i, (void) ++__p) | |
| 4460 | ::new(__p) value_type(_VSTD::move(*__i)); | |
| 4461 | __half_inplace_merge(__buff, __p, __middle, __last, __first, __comp); | |
| 4607 | for (_BidirectionalIterator __i = __first; __i != __middle; __d.template __incr<value_type>(), (void) ++__i, (void) ++__p) | |
| 4608 | ::new ((void*)__p) value_type(_VSTD::move(*__i)); | |
| 4609 | _VSTD::__half_inplace_merge<_Compare>(__buff, __p, __middle, __last, __first, __comp); | |
| 4462 | 4610 | } |
| 4463 | 4611 | else |
| 4464 | 4612 | { |
| 4465 | 4613 | value_type* __p = __buff; |
| 4466 | for (_BidirectionalIterator __i = __middle; __i != __last; __d.__incr((value_type*)0), (void) ++__i, (void) ++__p) | |
| 4467 | ::new(__p) value_type(_VSTD::move(*__i)); | |
| 4614 | for (_BidirectionalIterator __i = __middle; __i != __last; __d.template __incr<value_type>(), (void) ++__i, (void) ++__p) | |
| 4615 | ::new ((void*)__p) value_type(_VSTD::move(*__i)); | |
| 4468 | 4616 | typedef reverse_iterator<_BidirectionalIterator> _RBi; |
| 4469 | 4617 | typedef reverse_iterator<value_type*> _Rv; |
| 4470 | __half_inplace_merge(_Rv(__p), _Rv(__buff), | |
| 4471 | _RBi(__middle), _RBi(__first), | |
| 4472 | _RBi(__last), __invert<_Compare>(__comp)); | |
| 4618 | typedef __invert<_Compare> _Inverted; | |
| 4619 | _VSTD::__half_inplace_merge<_Inverted>(_Rv(__p), _Rv(__buff), | |
| 4620 | _RBi(__middle), _RBi(__first), | |
| 4621 | _RBi(__last), _Inverted(__comp)); | |
| 4473 | 4622 | } |
| 4474 | 4623 | } |
| 4475 | 4624 | |
| ... | ... | @@ -4487,7 +4636,7 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, |
| 4487 | 4636 | if (__len2 == 0) |
| 4488 | 4637 | return; |
| 4489 | 4638 | if (__len1 <= __buff_size || __len2 <= __buff_size) |
| 4490 | return __buffered_inplace_merge<_Compare> | |
| 4639 | return _VSTD::__buffered_inplace_merge<_Compare> | |
| 4491 | 4640 | (__first, __middle, __last, __comp, __len1, __len2, __buff); |
| 4492 | 4641 | // shrink [__first, __middle) as much as possible (with no moves), returning if it shrinks to 0 |
| 4493 | 4642 | for (; true; ++__first, (void) --__len1) |
| ... | ... | @@ -4515,7 +4664,7 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, |
| 4515 | 4664 | __len21 = __len2 / 2; |
| 4516 | 4665 | __m2 = __middle; |
| 4517 | 4666 | _VSTD::advance(__m2, __len21); |
| 4518 | __m1 = __upper_bound<_Compare>(__first, __middle, *__m2, __comp); | |
| 4667 | __m1 = _VSTD::__upper_bound<_Compare>(__first, __middle, *__m2, __comp); | |
| 4519 | 4668 | __len11 = _VSTD::distance(__first, __m1); |
| 4520 | 4669 | } |
| 4521 | 4670 | else |
| ... | ... | @@ -4530,7 +4679,7 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, |
| 4530 | 4679 | __len11 = __len1 / 2; |
| 4531 | 4680 | __m1 = __first; |
| 4532 | 4681 | _VSTD::advance(__m1, __len11); |
| 4533 | __m2 = __lower_bound<_Compare>(__middle, __last, *__m1, __comp); | |
| 4682 | __m2 = _VSTD::__lower_bound<_Compare>(__middle, __last, *__m1, __comp); | |
| 4534 | 4683 | __len21 = _VSTD::distance(__middle, __m2); |
| 4535 | 4684 | } |
| 4536 | 4685 | difference_type __len12 = __len1 - __len11; // distance(__m1, __middle) |
| ... | ... | @@ -4539,11 +4688,11 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, |
| 4539 | 4688 | // swap middle two partitions |
| 4540 | 4689 | __middle = _VSTD::rotate(__m1, __middle, __m2); |
| 4541 | 4690 | // __len12 and __len21 now have swapped meanings |
| 4542 | // merge smaller range with recurisve call and larger with tail recursion elimination | |
| 4691 | // merge smaller range with recursive call and larger with tail recursion elimination | |
| 4543 | 4692 | if (__len11 + __len21 < __len12 + __len22) |
| 4544 | 4693 | { |
| 4545 | __inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); | |
| 4546 | // __inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); | |
| 4694 | _VSTD::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); | |
| 4695 | // _VSTD::__inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); | |
| 4547 | 4696 | __first = __middle; |
| 4548 | 4697 | __middle = __m2; |
| 4549 | 4698 | __len1 = __len12; |
| ... | ... | @@ -4551,8 +4700,8 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, |
| 4551 | 4700 | } |
| 4552 | 4701 | else |
| 4553 | 4702 | { |
| 4554 | __inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); | |
| 4555 | // __inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); | |
| 4703 | _VSTD::__inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); | |
| 4704 | // _VSTD::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); | |
| 4556 | 4705 | __last = __middle; |
| 4557 | 4706 | __middle = __m1; |
| 4558 | 4707 | __len1 = __len11; |
| ... | ... | @@ -4603,28 +4752,28 @@ __merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1, |
| 4603 | 4752 | { |
| 4604 | 4753 | if (__first1 == __last1) |
| 4605 | 4754 | { |
| 4606 | for (; __first2 != __last2; ++__first2, ++__result, (void) __d.__incr((value_type*)0)) | |
| 4607 | ::new (__result) value_type(_VSTD::move(*__first2)); | |
| 4755 | for (; __first2 != __last2; ++__first2, ++__result, (void)__d.template __incr<value_type>()) | |
| 4756 | ::new ((void*)__result) value_type(_VSTD::move(*__first2)); | |
| 4608 | 4757 | __h.release(); |
| 4609 | 4758 | return; |
| 4610 | 4759 | } |
| 4611 | 4760 | if (__first2 == __last2) |
| 4612 | 4761 | { |
| 4613 | for (; __first1 != __last1; ++__first1, ++__result, (void) __d.__incr((value_type*)0)) | |
| 4614 | ::new (__result) value_type(_VSTD::move(*__first1)); | |
| 4762 | for (; __first1 != __last1; ++__first1, ++__result, (void)__d.template __incr<value_type>()) | |
| 4763 | ::new ((void*)__result) value_type(_VSTD::move(*__first1)); | |
| 4615 | 4764 | __h.release(); |
| 4616 | 4765 | return; |
| 4617 | 4766 | } |
| 4618 | 4767 | if (__comp(*__first2, *__first1)) |
| 4619 | 4768 | { |
| 4620 | ::new (__result) value_type(_VSTD::move(*__first2)); | |
| 4621 | __d.__incr((value_type*)0); | |
| 4769 | ::new ((void*)__result) value_type(_VSTD::move(*__first2)); | |
| 4770 | __d.template __incr<value_type>(); | |
| 4622 | 4771 | ++__first2; |
| 4623 | 4772 | } |
| 4624 | 4773 | else |
| 4625 | 4774 | { |
| 4626 | ::new (__result) value_type(_VSTD::move(*__first1)); | |
| 4627 | __d.__incr((value_type*)0); | |
| 4775 | ::new ((void*)__result) value_type(_VSTD::move(*__first1)); | |
| 4776 | __d.template __incr<value_type>(); | |
| 4628 | 4777 | ++__first1; |
| 4629 | 4778 | } |
| 4630 | 4779 | } |
| ... | ... | @@ -4677,38 +4826,38 @@ __stable_sort_move(_RandomAccessIterator __first1, _RandomAccessIterator __last1 |
| 4677 | 4826 | case 0: |
| 4678 | 4827 | return; |
| 4679 | 4828 | case 1: |
| 4680 | ::new(__first2) value_type(_VSTD::move(*__first1)); | |
| 4829 | ::new ((void*)__first2) value_type(_VSTD::move(*__first1)); | |
| 4681 | 4830 | return; |
| 4682 | 4831 | case 2: |
| 4683 | 4832 | __destruct_n __d(0); |
| 4684 | 4833 | unique_ptr<value_type, __destruct_n&> __h2(__first2, __d); |
| 4685 | 4834 | if (__comp(*--__last1, *__first1)) |
| 4686 | 4835 | { |
| 4687 | ::new(__first2) value_type(_VSTD::move(*__last1)); | |
| 4688 | __d.__incr((value_type*)0); | |
| 4836 | ::new ((void*)__first2) value_type(_VSTD::move(*__last1)); | |
| 4837 | __d.template __incr<value_type>(); | |
| 4689 | 4838 | ++__first2; |
| 4690 | ::new(__first2) value_type(_VSTD::move(*__first1)); | |
| 4839 | ::new ((void*)__first2) value_type(_VSTD::move(*__first1)); | |
| 4691 | 4840 | } |
| 4692 | 4841 | else |
| 4693 | 4842 | { |
| 4694 | ::new(__first2) value_type(_VSTD::move(*__first1)); | |
| 4695 | __d.__incr((value_type*)0); | |
| 4843 | ::new ((void*)__first2) value_type(_VSTD::move(*__first1)); | |
| 4844 | __d.template __incr<value_type>(); | |
| 4696 | 4845 | ++__first2; |
| 4697 | ::new(__first2) value_type(_VSTD::move(*__last1)); | |
| 4846 | ::new ((void*)__first2) value_type(_VSTD::move(*__last1)); | |
| 4698 | 4847 | } |
| 4699 | 4848 | __h2.release(); |
| 4700 | 4849 | return; |
| 4701 | 4850 | } |
| 4702 | 4851 | if (__len <= 8) |
| 4703 | 4852 | { |
| 4704 | __insertion_sort_move<_Compare>(__first1, __last1, __first2, __comp); | |
| 4853 | _VSTD::__insertion_sort_move<_Compare>(__first1, __last1, __first2, __comp); | |
| 4705 | 4854 | return; |
| 4706 | 4855 | } |
| 4707 | 4856 | typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2; |
| 4708 | 4857 | _RandomAccessIterator __m = __first1 + __l2; |
| 4709 | __stable_sort<_Compare>(__first1, __m, __comp, __l2, __first2, __l2); | |
| 4710 | __stable_sort<_Compare>(__m, __last1, __comp, __len - __l2, __first2 + __l2, __len - __l2); | |
| 4711 | __merge_move_construct<_Compare>(__first1, __m, __m, __last1, __first2, __comp); | |
| 4858 | _VSTD::__stable_sort<_Compare>(__first1, __m, __comp, __l2, __first2, __l2); | |
| 4859 | _VSTD::__stable_sort<_Compare>(__m, __last1, __comp, __len - __l2, __first2 + __l2, __len - __l2); | |
| 4860 | _VSTD::__merge_move_construct<_Compare>(__first1, __m, __m, __last1, __first2, __comp); | |
| 4712 | 4861 | } |
| 4713 | 4862 | |
| 4714 | 4863 | template <class _Tp> |
| ... | ... | @@ -4737,7 +4886,7 @@ __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp |
| 4737 | 4886 | } |
| 4738 | 4887 | if (__len <= static_cast<difference_type>(__stable_sort_switch<value_type>::value)) |
| 4739 | 4888 | { |
| 4740 | __insertion_sort<_Compare>(__first, __last, __comp); | |
| 4889 | _VSTD::__insertion_sort<_Compare>(__first, __last, __comp); | |
| 4741 | 4890 | return; |
| 4742 | 4891 | } |
| 4743 | 4892 | typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2; |
| ... | ... | @@ -4746,21 +4895,21 @@ __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp |
| 4746 | 4895 | { |
| 4747 | 4896 | __destruct_n __d(0); |
| 4748 | 4897 | unique_ptr<value_type, __destruct_n&> __h2(__buff, __d); |
| 4749 | __stable_sort_move<_Compare>(__first, __m, __comp, __l2, __buff); | |
| 4750 | __d.__set(__l2, (value_type*)0); | |
| 4751 | __stable_sort_move<_Compare>(__m, __last, __comp, __len - __l2, __buff + __l2); | |
| 4752 | __d.__set(__len, (value_type*)0); | |
| 4753 | __merge_move_assign<_Compare>(__buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp); | |
| 4754 | // __merge<_Compare>(move_iterator<value_type*>(__buff), | |
| 4755 | // move_iterator<value_type*>(__buff + __l2), | |
| 4756 | // move_iterator<_RandomAccessIterator>(__buff + __l2), | |
| 4757 | // move_iterator<_RandomAccessIterator>(__buff + __len), | |
| 4758 | // __first, __comp); | |
| 4898 | _VSTD::__stable_sort_move<_Compare>(__first, __m, __comp, __l2, __buff); | |
| 4899 | __d.__set(__l2, (value_type*)nullptr); | |
| 4900 | _VSTD::__stable_sort_move<_Compare>(__m, __last, __comp, __len - __l2, __buff + __l2); | |
| 4901 | __d.__set(__len, (value_type*)nullptr); | |
| 4902 | _VSTD::__merge_move_assign<_Compare>(__buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp); | |
| 4903 | // _VSTD::__merge<_Compare>(move_iterator<value_type*>(__buff), | |
| 4904 | // move_iterator<value_type*>(__buff + __l2), | |
| 4905 | // move_iterator<_RandomAccessIterator>(__buff + __l2), | |
| 4906 | // move_iterator<_RandomAccessIterator>(__buff + __len), | |
| 4907 | // __first, __comp); | |
| 4759 | 4908 | return; |
| 4760 | 4909 | } |
| 4761 | __stable_sort<_Compare>(__first, __m, __comp, __l2, __buff, __buff_size); | |
| 4762 | __stable_sort<_Compare>(__m, __last, __comp, __len - __l2, __buff, __buff_size); | |
| 4763 | __inplace_merge<_Compare>(__first, __m, __last, __comp, __l2, __len - __l2, __buff, __buff_size); | |
| 4910 | _VSTD::__stable_sort<_Compare>(__first, __m, __comp, __l2, __buff, __buff_size); | |
| 4911 | _VSTD::__stable_sort<_Compare>(__m, __last, __comp, __len - __l2, __buff, __buff_size); | |
| 4912 | _VSTD::__inplace_merge<_Compare>(__first, __m, __last, __comp, __l2, __len - __l2, __buff, __buff_size); | |
| 4764 | 4913 | } |
| 4765 | 4914 | |
| 4766 | 4915 | template <class _RandomAccessIterator, class _Compare> |
| ... | ... | @@ -4779,7 +4928,7 @@ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar |
| 4779 | 4928 | __h.reset(__buf.first); |
| 4780 | 4929 | } |
| 4781 | 4930 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 4782 | __stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second); | |
| 4931 | _VSTD::__stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second); | |
| 4783 | 4932 | } |
| 4784 | 4933 | |
| 4785 | 4934 | template <class _RandomAccessIterator> |
| ... | ... | @@ -4883,7 +5032,7 @@ void |
| 4883 | 5032 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
| 4884 | 5033 | { |
| 4885 | 5034 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 4886 | __sift_up<_Comp_ref>(__first, __last, __comp, __last - __first); | |
| 5035 | _VSTD::__sift_up<_Comp_ref>(__first, __last, __comp, __last - __first); | |
| 4887 | 5036 | } |
| 4888 | 5037 | |
| 4889 | 5038 | template <class _RandomAccessIterator> |
| ... | ... | @@ -4960,7 +5109,7 @@ __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare |
| 4960 | 5109 | if (__len > 1) |
| 4961 | 5110 | { |
| 4962 | 5111 | swap(*__first, *--__last); |
| 4963 | __sift_down<_Compare>(__first, __last, __comp, __len - 1, __first); | |
| 5112 | _VSTD::__sift_down<_Compare>(__first, __last, __comp, __len - 1, __first); | |
| 4964 | 5113 | } |
| 4965 | 5114 | } |
| 4966 | 5115 | |
| ... | ... | @@ -4970,7 +5119,7 @@ void |
| 4970 | 5119 | pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
| 4971 | 5120 | { |
| 4972 | 5121 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 4973 | __pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first); | |
| 5122 | _VSTD::__pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first); | |
| 4974 | 5123 | } |
| 4975 | 5124 | |
| 4976 | 5125 | template <class _RandomAccessIterator> |
| ... | ... | @@ -4994,7 +5143,7 @@ __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar |
| 4994 | 5143 | // start from the first parent, there is no need to consider children |
| 4995 | 5144 | for (difference_type __start = (__n - 2) / 2; __start >= 0; --__start) |
| 4996 | 5145 | { |
| 4997 | __sift_down<_Compare>(__first, __last, __comp, __n, __first + __start); | |
| 5146 | _VSTD::__sift_down<_Compare>(__first, __last, __comp, __n, __first + __start); | |
| 4998 | 5147 | } |
| 4999 | 5148 | } |
| 5000 | 5149 | } |
| ... | ... | @@ -5005,7 +5154,7 @@ void |
| 5005 | 5154 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
| 5006 | 5155 | { |
| 5007 | 5156 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5008 | __make_heap<_Comp_ref>(__first, __last, __comp); | |
| 5157 | _VSTD::__make_heap<_Comp_ref>(__first, __last, __comp); | |
| 5009 | 5158 | } |
| 5010 | 5159 | |
| 5011 | 5160 | template <class _RandomAccessIterator> |
| ... | ... | @@ -5024,7 +5173,7 @@ __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar |
| 5024 | 5173 | { |
| 5025 | 5174 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; |
| 5026 | 5175 | for (difference_type __n = __last - __first; __n > 1; --__last, (void) --__n) |
| 5027 | __pop_heap<_Compare>(__first, __last, __comp, __n); | |
| 5176 | _VSTD::__pop_heap<_Compare>(__first, __last, __comp, __n); | |
| 5028 | 5177 | } |
| 5029 | 5178 | |
| 5030 | 5179 | template <class _RandomAccessIterator, class _Compare> |
| ... | ... | @@ -5033,7 +5182,7 @@ void |
| 5033 | 5182 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
| 5034 | 5183 | { |
| 5035 | 5184 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5036 | __sort_heap<_Comp_ref>(__first, __last, __comp); | |
| 5185 | _VSTD::__sort_heap<_Comp_ref>(__first, __last, __comp); | |
| 5037 | 5186 | } |
| 5038 | 5187 | |
| 5039 | 5188 | template <class _RandomAccessIterator> |
| ... | ... | @@ -5051,17 +5200,17 @@ void |
| 5051 | 5200 | __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, |
| 5052 | 5201 | _Compare __comp) |
| 5053 | 5202 | { |
| 5054 | __make_heap<_Compare>(__first, __middle, __comp); | |
| 5203 | _VSTD::__make_heap<_Compare>(__first, __middle, __comp); | |
| 5055 | 5204 | typename iterator_traits<_RandomAccessIterator>::difference_type __len = __middle - __first; |
| 5056 | 5205 | for (_RandomAccessIterator __i = __middle; __i != __last; ++__i) |
| 5057 | 5206 | { |
| 5058 | 5207 | if (__comp(*__i, *__first)) |
| 5059 | 5208 | { |
| 5060 | 5209 | swap(*__i, *__first); |
| 5061 | __sift_down<_Compare>(__first, __middle, __comp, __len, __first); | |
| 5210 | _VSTD::__sift_down<_Compare>(__first, __middle, __comp, __len, __first); | |
| 5062 | 5211 | } |
| 5063 | 5212 | } |
| 5064 | __sort_heap<_Compare>(__first, __middle, __comp); | |
| 5213 | _VSTD::__sort_heap<_Compare>(__first, __middle, __comp); | |
| 5065 | 5214 | } |
| 5066 | 5215 | |
| 5067 | 5216 | template <class _RandomAccessIterator, class _Compare> |
| ... | ... | @@ -5071,7 +5220,7 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran |
| 5071 | 5220 | _Compare __comp) |
| 5072 | 5221 | { |
| 5073 | 5222 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5074 | __partial_sort<_Comp_ref>(__first, __middle, __last, __comp); | |
| 5223 | _VSTD::__partial_sort<_Comp_ref>(__first, __middle, __last, __comp); | |
| 5075 | 5224 | } |
| 5076 | 5225 | |
| 5077 | 5226 | template <class _RandomAccessIterator> |
| ... | ... | @@ -5095,15 +5244,15 @@ __partial_sort_copy(_InputIterator __first, _InputIterator __last, |
| 5095 | 5244 | { |
| 5096 | 5245 | for (; __first != __last && __r != __result_last; ++__first, (void) ++__r) |
| 5097 | 5246 | *__r = *__first; |
| 5098 | __make_heap<_Compare>(__result_first, __r, __comp); | |
| 5247 | _VSTD::__make_heap<_Compare>(__result_first, __r, __comp); | |
| 5099 | 5248 | typename iterator_traits<_RandomAccessIterator>::difference_type __len = __r - __result_first; |
| 5100 | 5249 | for (; __first != __last; ++__first) |
| 5101 | 5250 | if (__comp(*__first, *__result_first)) |
| 5102 | 5251 | { |
| 5103 | 5252 | *__result_first = *__first; |
| 5104 | __sift_down<_Compare>(__result_first, __r, __comp, __len, __result_first); | |
| 5253 | _VSTD::__sift_down<_Compare>(__result_first, __r, __comp, __len, __result_first); | |
| 5105 | 5254 | } |
| 5106 | __sort_heap<_Compare>(__result_first, __r, __comp); | |
| 5255 | _VSTD::__sort_heap<_Compare>(__result_first, __r, __comp); | |
| 5107 | 5256 | } |
| 5108 | 5257 | return __r; |
| 5109 | 5258 | } |
| ... | ... | @@ -5115,7 +5264,7 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last, |
| 5115 | 5264 | _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp) |
| 5116 | 5265 | { |
| 5117 | 5266 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5118 | return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp); | |
| 5267 | return _VSTD::__partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp); | |
| 5119 | 5268 | } |
| 5120 | 5269 | |
| 5121 | 5270 | template <class _InputIterator, class _RandomAccessIterator> |
| ... | ... | @@ -5161,7 +5310,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando |
| 5161 | 5310 | } |
| 5162 | 5311 | if (__len <= __limit) |
| 5163 | 5312 | { |
| 5164 | __selection_sort<_Compare>(__first, __last, __comp); | |
| 5313 | _VSTD::__selection_sort<_Compare>(__first, __last, __comp); | |
| 5165 | 5314 | return; |
| 5166 | 5315 | } |
| 5167 | 5316 | // __len > __limit >= 3 |
| ... | ... | @@ -5185,7 +5334,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando |
| 5185 | 5334 | if (__i == --__j) |
| 5186 | 5335 | { |
| 5187 | 5336 | // *__first == *__m, *__m <= all other elements |
| 5188 | // Parition instead into [__first, __i) == *__first and *__first < [__i, __last) | |
| 5337 | // Partition instead into [__first, __i) == *__first and *__first < [__i, __last) | |
| 5189 | 5338 | ++__i; // __first + 1 |
| 5190 | 5339 | __j = __last; |
| 5191 | 5340 | if (!__comp(*__first, *--__j)) // we need a guard if *__first == *(__last-1) |
| ... | ... | @@ -5223,8 +5372,8 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando |
| 5223 | 5372 | // The first part is sorted, |
| 5224 | 5373 | if (__nth < __i) |
| 5225 | 5374 | return; |
| 5226 | // __nth_element the secod part | |
| 5227 | // __nth_element<_Compare>(__i, __nth, __last, __comp); | |
| 5375 | // __nth_element the second part | |
| 5376 | // _VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp); | |
| 5228 | 5377 | __first = __i; |
| 5229 | 5378 | goto __restart; |
| 5230 | 5379 | } |
| ... | ... | @@ -5306,12 +5455,12 @@ not_sorted: |
| 5306 | 5455 | // __nth_element on range containing __nth |
| 5307 | 5456 | if (__nth < __i) |
| 5308 | 5457 | { |
| 5309 | // __nth_element<_Compare>(__first, __nth, __i, __comp); | |
| 5458 | // _VSTD::__nth_element<_Compare>(__first, __nth, __i, __comp); | |
| 5310 | 5459 | __last = __i; |
| 5311 | 5460 | } |
| 5312 | 5461 | else |
| 5313 | 5462 | { |
| 5314 | // __nth_element<_Compare>(__i+1, __nth, __last, __comp); | |
| 5463 | // _VSTD::__nth_element<_Compare>(__i+1, __nth, __last, __comp); | |
| 5315 | 5464 | __first = ++__i; |
| 5316 | 5465 | } |
| 5317 | 5466 | } |
| ... | ... | @@ -5323,7 +5472,7 @@ void |
| 5323 | 5472 | nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) |
| 5324 | 5473 | { |
| 5325 | 5474 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5326 | __nth_element<_Comp_ref>(__first, __nth, __last, __comp); | |
| 5475 | _VSTD::__nth_element<_Comp_ref>(__first, __nth, __last, __comp); | |
| 5327 | 5476 | } |
| 5328 | 5477 | |
| 5329 | 5478 | template <class _RandomAccessIterator> |
| ... | ... | @@ -5359,7 +5508,7 @@ includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi |
| 5359 | 5508 | _Compare __comp) |
| 5360 | 5509 | { |
| 5361 | 5510 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5362 | return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); | |
| 5511 | return _VSTD::__includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); | |
| 5363 | 5512 | } |
| 5364 | 5513 | |
| 5365 | 5514 | template <class _InputIterator1, class _InputIterator2> |
| ... | ... | @@ -5376,7 +5525,7 @@ includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi |
| 5376 | 5525 | // set_union |
| 5377 | 5526 | |
| 5378 | 5527 | template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 5379 | _OutputIterator | |
| 5528 | _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator | |
| 5380 | 5529 | __set_union(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5381 | 5530 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5382 | 5531 | { |
| ... | ... | @@ -5401,17 +5550,17 @@ __set_union(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5401 | 5550 | } |
| 5402 | 5551 | |
| 5403 | 5552 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare> |
| 5404 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5553 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5405 | 5554 | _OutputIterator |
| 5406 | 5555 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5407 | 5556 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5408 | 5557 | { |
| 5409 | 5558 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5410 | return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5559 | return _VSTD::__set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5411 | 5560 | } |
| 5412 | 5561 | |
| 5413 | 5562 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 5414 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5563 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5415 | 5564 | _OutputIterator |
| 5416 | 5565 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5417 | 5566 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) |
| ... | ... | @@ -5453,7 +5602,7 @@ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5453 | 5602 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5454 | 5603 | { |
| 5455 | 5604 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5456 | return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5605 | return _VSTD::__set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5457 | 5606 | } |
| 5458 | 5607 | |
| 5459 | 5608 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| ... | ... | @@ -5470,7 +5619,7 @@ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5470 | 5619 | // set_difference |
| 5471 | 5620 | |
| 5472 | 5621 | template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 5473 | _OutputIterator | |
| 5622 | _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator | |
| 5474 | 5623 | __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5475 | 5624 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5476 | 5625 | { |
| ... | ... | @@ -5495,17 +5644,17 @@ __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5495 | 5644 | } |
| 5496 | 5645 | |
| 5497 | 5646 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare> |
| 5498 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5647 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5499 | 5648 | _OutputIterator |
| 5500 | 5649 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5501 | 5650 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5502 | 5651 | { |
| 5503 | 5652 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5504 | return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5653 | return _VSTD::__set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5505 | 5654 | } |
| 5506 | 5655 | |
| 5507 | 5656 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 5508 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5657 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5509 | 5658 | _OutputIterator |
| 5510 | 5659 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5511 | 5660 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) |
| ... | ... | @@ -5518,7 +5667,7 @@ set_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5518 | 5667 | // set_symmetric_difference |
| 5519 | 5668 | |
| 5520 | 5669 | template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 5521 | _OutputIterator | |
| 5670 | _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator | |
| 5522 | 5671 | __set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5523 | 5672 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5524 | 5673 | { |
| ... | ... | @@ -5548,17 +5697,17 @@ __set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5548 | 5697 | } |
| 5549 | 5698 | |
| 5550 | 5699 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare> |
| 5551 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5700 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5552 | 5701 | _OutputIterator |
| 5553 | 5702 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5554 | 5703 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) |
| 5555 | 5704 | { |
| 5556 | 5705 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5557 | return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5706 | return _VSTD::__set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); | |
| 5558 | 5707 | } |
| 5559 | 5708 | |
| 5560 | 5709 | template <class _InputIterator1, class _InputIterator2, class _OutputIterator> |
| 5561 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5710 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5562 | 5711 | _OutputIterator |
| 5563 | 5712 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5564 | 5713 | _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) |
| ... | ... | @@ -5593,7 +5742,7 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5593 | 5742 | _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) |
| 5594 | 5743 | { |
| 5595 | 5744 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5596 | return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); | |
| 5745 | return _VSTD::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); | |
| 5597 | 5746 | } |
| 5598 | 5747 | |
| 5599 | 5748 | template <class _InputIterator1, class _InputIterator2> |
| ... | ... | @@ -5611,7 +5760,7 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, |
| 5611 | 5760 | // next_permutation |
| 5612 | 5761 | |
| 5613 | 5762 | template <class _Compare, class _BidirectionalIterator> |
| 5614 | bool | |
| 5763 | _LIBCPP_CONSTEXPR_AFTER_CXX17 bool | |
| 5615 | 5764 | __next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) |
| 5616 | 5765 | { |
| 5617 | 5766 | _BidirectionalIterator __i = __last; |
| ... | ... | @@ -5638,16 +5787,16 @@ __next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last |
| 5638 | 5787 | } |
| 5639 | 5788 | |
| 5640 | 5789 | template <class _BidirectionalIterator, class _Compare> |
| 5641 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5790 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5642 | 5791 | bool |
| 5643 | 5792 | next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) |
| 5644 | 5793 | { |
| 5645 | 5794 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5646 | return __next_permutation<_Comp_ref>(__first, __last, __comp); | |
| 5795 | return _VSTD::__next_permutation<_Comp_ref>(__first, __last, __comp); | |
| 5647 | 5796 | } |
| 5648 | 5797 | |
| 5649 | 5798 | template <class _BidirectionalIterator> |
| 5650 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5799 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5651 | 5800 | bool |
| 5652 | 5801 | next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) |
| 5653 | 5802 | { |
| ... | ... | @@ -5658,7 +5807,7 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) |
| 5658 | 5807 | // prev_permutation |
| 5659 | 5808 | |
| 5660 | 5809 | template <class _Compare, class _BidirectionalIterator> |
| 5661 | bool | |
| 5810 | _LIBCPP_CONSTEXPR_AFTER_CXX17 bool | |
| 5662 | 5811 | __prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) |
| 5663 | 5812 | { |
| 5664 | 5813 | _BidirectionalIterator __i = __last; |
| ... | ... | @@ -5685,16 +5834,16 @@ __prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last |
| 5685 | 5834 | } |
| 5686 | 5835 | |
| 5687 | 5836 | template <class _BidirectionalIterator, class _Compare> |
| 5688 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5837 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5689 | 5838 | bool |
| 5690 | 5839 | prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) |
| 5691 | 5840 | { |
| 5692 | 5841 | typedef typename __comp_ref_type<_Compare>::type _Comp_ref; |
| 5693 | return __prev_permutation<_Comp_ref>(__first, __last, __comp); | |
| 5842 | return _VSTD::__prev_permutation<_Comp_ref>(__first, __last, __comp); | |
| 5694 | 5843 | } |
| 5695 | 5844 | |
| 5696 | 5845 | template <class _BidirectionalIterator> |
| 5697 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5846 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 5698 | 5847 | bool |
| 5699 | 5848 | prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) |
| 5700 | 5849 | { |
lib/libcxx/include/any+22-8| ... | ... | @@ -81,8 +81,8 @@ namespace std { |
| 81 | 81 | */ |
| 82 | 82 | |
| 83 | 83 | #include <experimental/__config> |
| 84 | #include <__availability> | |
| 84 | 85 | #include <memory> |
| 85 | #include <new> | |
| 86 | 86 | #include <typeinfo> |
| 87 | 87 | #include <type_traits> |
| 88 | 88 | #include <cstdlib> |
| ... | ... | @@ -157,7 +157,7 @@ namespace __any_imp |
| 157 | 157 | template <class _Tp> |
| 158 | 158 | inline _LIBCPP_INLINE_VISIBILITY |
| 159 | 159 | constexpr const void* __get_fallback_typeid() { |
| 160 | return &__unique_typeinfo<decay_t<_Tp>>::__id; | |
| 160 | return &__unique_typeinfo<remove_cv_t<remove_reference_t<_Tp>>>::__id; | |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | template <class _Tp> |
| ... | ... | @@ -368,7 +368,11 @@ namespace __any_imp |
| 368 | 368 | template <class ..._Args> |
| 369 | 369 | _LIBCPP_INLINE_VISIBILITY |
| 370 | 370 | static _Tp& __create(any & __dest, _Args&&... __args) { |
| 371 | _Tp* __ret = ::new (static_cast<void*>(&__dest.__s.__buf)) _Tp(_VSTD::forward<_Args>(__args)...); | |
| 371 | typedef allocator<_Tp> _Alloc; | |
| 372 | typedef allocator_traits<_Alloc> _ATraits; | |
| 373 | _Alloc __a; | |
| 374 | _Tp * __ret = static_cast<_Tp*>(static_cast<void*>(&__dest.__s.__buf)); | |
| 375 | _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...); | |
| 372 | 376 | __dest.__h = &_SmallHandler::__handle; |
| 373 | 377 | return *__ret; |
| 374 | 378 | } |
| ... | ... | @@ -376,8 +380,11 @@ namespace __any_imp |
| 376 | 380 | private: |
| 377 | 381 | _LIBCPP_INLINE_VISIBILITY |
| 378 | 382 | static void __destroy(any & __this) { |
| 379 | _Tp & __value = *static_cast<_Tp *>(static_cast<void*>(&__this.__s.__buf)); | |
| 380 | __value.~_Tp(); | |
| 383 | typedef allocator<_Tp> _Alloc; | |
| 384 | typedef allocator_traits<_Alloc> _ATraits; | |
| 385 | _Alloc __a; | |
| 386 | _Tp * __p = static_cast<_Tp *>(static_cast<void*>(&__this.__s.__buf)); | |
| 387 | _ATraits::destroy(__a, __p); | |
| 381 | 388 | __this.__h = nullptr; |
| 382 | 389 | } |
| 383 | 390 | |
| ... | ... | @@ -445,10 +452,12 @@ namespace __any_imp |
| 445 | 452 | _LIBCPP_INLINE_VISIBILITY |
| 446 | 453 | static _Tp& __create(any & __dest, _Args&&... __args) { |
| 447 | 454 | typedef allocator<_Tp> _Alloc; |
| 455 | typedef allocator_traits<_Alloc> _ATraits; | |
| 448 | 456 | typedef __allocator_destructor<_Alloc> _Dp; |
| 449 | 457 | _Alloc __a; |
| 450 | unique_ptr<_Tp, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); | |
| 451 | _Tp* __ret = ::new ((void*)__hold.get()) _Tp(_VSTD::forward<_Args>(__args)...); | |
| 458 | unique_ptr<_Tp, _Dp> __hold(_ATraits::allocate(__a, 1), _Dp(__a, 1)); | |
| 459 | _Tp * __ret = __hold.get(); | |
| 460 | _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...); | |
| 452 | 461 | __dest.__s.__ptr = __hold.release(); |
| 453 | 462 | __dest.__h = &_LargeHandler::__handle; |
| 454 | 463 | return *__ret; |
| ... | ... | @@ -458,7 +467,12 @@ namespace __any_imp |
| 458 | 467 | |
| 459 | 468 | _LIBCPP_INLINE_VISIBILITY |
| 460 | 469 | static void __destroy(any & __this){ |
| 461 | delete static_cast<_Tp*>(__this.__s.__ptr); | |
| 470 | typedef allocator<_Tp> _Alloc; | |
| 471 | typedef allocator_traits<_Alloc> _ATraits; | |
| 472 | _Alloc __a; | |
| 473 | _Tp * __p = static_cast<_Tp *>(__this.__s.__ptr); | |
| 474 | _ATraits::destroy(__a, __p); | |
| 475 | _ATraits::deallocate(__a, __p, 1); | |
| 462 | 476 | __this.__h = nullptr; |
| 463 | 477 | } |
| 464 | 478 |
lib/libcxx/include/array+8-12| ... | ... | @@ -142,8 +142,8 @@ struct _LIBCPP_TEMPLATE_VIS array |
| 142 | 142 | typedef const value_type* const_pointer; |
| 143 | 143 | typedef size_t size_type; |
| 144 | 144 | typedef ptrdiff_t difference_type; |
| 145 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
| 146 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
| 145 | typedef _VSTD::reverse_iterator<iterator> reverse_iterator; | |
| 146 | typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator; | |
| 147 | 147 | |
| 148 | 148 | _Tp __elems_[_Size]; |
| 149 | 149 | |
| ... | ... | @@ -155,7 +155,7 @@ struct _LIBCPP_TEMPLATE_VIS array |
| 155 | 155 | |
| 156 | 156 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 157 | 157 | void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { |
| 158 | std::swap_ranges(data(), data() + _Size, __a.data()); | |
| 158 | _VSTD::swap_ranges(data(), data() + _Size, __a.data()); | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | // iterators: |
| ... | ... | @@ -245,8 +245,8 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> |
| 245 | 245 | typedef const value_type* const_pointer; |
| 246 | 246 | typedef size_t size_type; |
| 247 | 247 | typedef ptrdiff_t difference_type; |
| 248 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
| 249 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
| 248 | typedef _VSTD::reverse_iterator<iterator> reverse_iterator; | |
| 249 | typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator; | |
| 250 | 250 | |
| 251 | 251 | typedef typename conditional<is_const<_Tp>::value, const char, |
| 252 | 252 | char>::type _CharType; |
| ... | ... | @@ -459,8 +459,6 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT |
| 459 | 459 | return __a.__elems_[_Ip]; |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | #ifndef _LIBCPP_CXX03_LANG | |
| 463 | ||
| 464 | 462 | template <size_t _Ip, class _Tp, size_t _Size> |
| 465 | 463 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 |
| 466 | 464 | _Tp&& |
| ... | ... | @@ -479,8 +477,6 @@ get(const array<_Tp, _Size>&& __a) _NOEXCEPT |
| 479 | 477 | return _VSTD::move(__a.__elems_[_Ip]); |
| 480 | 478 | } |
| 481 | 479 | |
| 482 | #endif // !_LIBCPP_CXX03_LANG | |
| 483 | ||
| 484 | 480 | #if _LIBCPP_STD_VER > 17 |
| 485 | 481 | |
| 486 | 482 | template <typename _Tp, size_t _Size, size_t... _Index> |
| ... | ... | @@ -504,7 +500,7 @@ to_array(_Tp (&__arr)[_Size]) noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) { |
| 504 | 500 | static_assert( |
| 505 | 501 | is_constructible_v<_Tp, _Tp&>, |
| 506 | 502 | "[array.creation]/1: to_array requires copy constructible elements."); |
| 507 | return __to_array_lvalue_impl(__arr, make_index_sequence<_Size>()); | |
| 503 | return _VSTD::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>()); | |
| 508 | 504 | } |
| 509 | 505 | |
| 510 | 506 | template <typename _Tp, size_t _Size> |
| ... | ... | @@ -516,8 +512,8 @@ to_array(_Tp(&&__arr)[_Size]) noexcept(is_nothrow_move_constructible_v<_Tp>) { |
| 516 | 512 | static_assert( |
| 517 | 513 | is_move_constructible_v<_Tp>, |
| 518 | 514 | "[array.creation]/4: to_array requires move constructible elements."); |
| 519 | return __to_array_rvalue_impl(_VSTD::move(__arr), | |
| 520 | make_index_sequence<_Size>()); | |
| 515 | return _VSTD::__to_array_rvalue_impl(_VSTD::move(__arr), | |
| 516 | make_index_sequence<_Size>()); | |
| 521 | 517 | } |
| 522 | 518 | |
| 523 | 519 | #endif // _LIBCPP_STD_VER > 17 |
lib/libcxx/include/atomic+93-77| ... | ... | @@ -16,9 +16,12 @@ |
| 16 | 16 | namespace std |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | // feature test macro | |
| 19 | // feature test macro [version.syn] | |
| 20 | 20 | |
| 21 | #define __cpp_lib_atomic_is_always_lock_free // as specified by SG10 | |
| 21 | #define __cpp_lib_atomic_is_always_lock_free | |
| 22 | #define __cpp_lib_atomic_flag_test | |
| 23 | #define __cpp_lib_atomic_lock_free_type_aliases | |
| 24 | #define __cpp_lib_atomic_wait | |
| 22 | 25 | |
| 23 | 26 | // order and consistency |
| 24 | 27 | |
| ... | ... | @@ -45,6 +48,7 @@ template <class T> T kill_dependency(T y) noexcept; |
| 45 | 48 | |
| 46 | 49 | #define ATOMIC_BOOL_LOCK_FREE unspecified |
| 47 | 50 | #define ATOMIC_CHAR_LOCK_FREE unspecified |
| 51 | #define ATOMIC_CHAR8_T_LOCK_FREE unspecified // C++20 | |
| 48 | 52 | #define ATOMIC_CHAR16_T_LOCK_FREE unspecified |
| 49 | 53 | #define ATOMIC_CHAR32_T_LOCK_FREE unspecified |
| 50 | 54 | #define ATOMIC_WCHAR_T_LOCK_FREE unspecified |
| ... | ... | @@ -108,6 +112,7 @@ template <> |
| 108 | 112 | struct atomic<integral> |
| 109 | 113 | { |
| 110 | 114 | using value_type = integral; |
| 115 | using difference_type = value_type; | |
| 111 | 116 | |
| 112 | 117 | static constexpr bool is_always_lock_free; |
| 113 | 118 | bool is_lock_free() const volatile noexcept; |
| ... | ... | @@ -190,6 +195,7 @@ template <class T> |
| 190 | 195 | struct atomic<T*> |
| 191 | 196 | { |
| 192 | 197 | using value_type = T*; |
| 198 | using difference_type = ptrdiff_t; | |
| 193 | 199 | |
| 194 | 200 | static constexpr bool is_always_lock_free; |
| 195 | 201 | bool is_lock_free() const volatile noexcept; |
| ... | ... | @@ -460,6 +466,7 @@ typedef atomic<long> atomic_long; |
| 460 | 466 | typedef atomic<unsigned long> atomic_ulong; |
| 461 | 467 | typedef atomic<long long> atomic_llong; |
| 462 | 468 | typedef atomic<unsigned long long> atomic_ullong; |
| 469 | typedef atomic<char8_t> atomic_char8_t; // C++20 | |
| 463 | 470 | typedef atomic<char16_t> atomic_char16_t; |
| 464 | 471 | typedef atomic<char32_t> atomic_char32_t; |
| 465 | 472 | typedef atomic<wchar_t> atomic_wchar_t; |
| ... | ... | @@ -477,7 +484,7 @@ typedef atomic<int_fast8_t> atomic_int_fast8_t; |
| 477 | 484 | typedef atomic<uint_fast8_t> atomic_uint_fast8_t; |
| 478 | 485 | typedef atomic<int_fast16_t> atomic_int_fast16_t; |
| 479 | 486 | typedef atomic<uint_fast16_t> atomic_uint_fast16_t; |
| 480 | typedef atomic<int_fast32_t> atomic_int_fast32_t; | |
| 487 | typedef atomic<int_fast32_t> atomic_int_fast32_t; | |
| 481 | 488 | typedef atomic<uint_fast32_t> atomic_uint_fast32_t; |
| 482 | 489 | typedef atomic<int_fast64_t> atomic_int_fast64_t; |
| 483 | 490 | typedef atomic<uint_fast64_t> atomic_uint_fast64_t; |
| ... | ... | @@ -568,6 +575,7 @@ template <class T> |
| 568 | 575 | */ |
| 569 | 576 | |
| 570 | 577 | #include <__config> |
| 578 | #include <__availability> | |
| 571 | 579 | #include <__threading_support> |
| 572 | 580 | #include <cstddef> |
| 573 | 581 | #include <cstdint> |
| ... | ... | @@ -654,7 +662,7 @@ typedef enum memory_order { |
| 654 | 662 | |
| 655 | 663 | template <typename _Tp> _LIBCPP_INLINE_VISIBILITY |
| 656 | 664 | bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) { |
| 657 | return memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0; | |
| 665 | return _VSTD::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0; | |
| 658 | 666 | } |
| 659 | 667 | |
| 660 | 668 | static_assert((is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value), |
| ... | ... | @@ -1119,6 +1127,9 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT |
| 1119 | 1127 | #if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE) |
| 1120 | 1128 | # define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE |
| 1121 | 1129 | # define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE |
| 1130 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1131 | # define ATOMIC_CHAR8_T_LOCK_FREE __CLANG_ATOMIC_CHAR8_T_LOCK_FREE | |
| 1132 | #endif | |
| 1122 | 1133 | # define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE |
| 1123 | 1134 | # define ATOMIC_CHAR32_T_LOCK_FREE __CLANG_ATOMIC_CHAR32_T_LOCK_FREE |
| 1124 | 1135 | # define ATOMIC_WCHAR_T_LOCK_FREE __CLANG_ATOMIC_WCHAR_T_LOCK_FREE |
| ... | ... | @@ -1130,6 +1141,9 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT |
| 1130 | 1141 | #elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE) |
| 1131 | 1142 | # define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE |
| 1132 | 1143 | # define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE |
| 1144 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1145 | # define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE | |
| 1146 | #endif | |
| 1133 | 1147 | # define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE |
| 1134 | 1148 | # define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE |
| 1135 | 1149 | # define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE |
| ... | ... | @@ -1245,10 +1259,10 @@ template <typename _Tp> |
| 1245 | 1259 | _LIBCPP_INLINE_VISIBILITY |
| 1246 | 1260 | bool __cxx_atomic_compare_exchange_strong(volatile __cxx_atomic_lock_impl<_Tp>* __a, |
| 1247 | 1261 | _Tp* __expected, _Tp __value, memory_order, memory_order) { |
| 1248 | __a->__lock(); | |
| 1249 | 1262 | _Tp __temp; |
| 1263 | __a->__lock(); | |
| 1250 | 1264 | __cxx_atomic_assign_volatile(__temp, __a->__a_value); |
| 1251 | bool __ret = __temp == *__expected; | |
| 1265 | bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0); | |
| 1252 | 1266 | if(__ret) |
| 1253 | 1267 | __cxx_atomic_assign_volatile(__a->__a_value, __value); |
| 1254 | 1268 | else |
| ... | ... | @@ -1261,11 +1275,11 @@ _LIBCPP_INLINE_VISIBILITY |
| 1261 | 1275 | bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_lock_impl<_Tp>* __a, |
| 1262 | 1276 | _Tp* __expected, _Tp __value, memory_order, memory_order) { |
| 1263 | 1277 | __a->__lock(); |
| 1264 | bool __ret = __a->__a_value == *__expected; | |
| 1278 | bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0); | |
| 1265 | 1279 | if(__ret) |
| 1266 | __a->__a_value = __value; | |
| 1280 | _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp)); | |
| 1267 | 1281 | else |
| 1268 | *__expected = __a->__a_value; | |
| 1282 | _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp)); | |
| 1269 | 1283 | __a->__unlock(); |
| 1270 | 1284 | return __ret; |
| 1271 | 1285 | } |
| ... | ... | @@ -1274,10 +1288,10 @@ template <typename _Tp> |
| 1274 | 1288 | _LIBCPP_INLINE_VISIBILITY |
| 1275 | 1289 | bool __cxx_atomic_compare_exchange_weak(volatile __cxx_atomic_lock_impl<_Tp>* __a, |
| 1276 | 1290 | _Tp* __expected, _Tp __value, memory_order, memory_order) { |
| 1277 | __a->__lock(); | |
| 1278 | 1291 | _Tp __temp; |
| 1292 | __a->__lock(); | |
| 1279 | 1293 | __cxx_atomic_assign_volatile(__temp, __a->__a_value); |
| 1280 | bool __ret = __temp == *__expected; | |
| 1294 | bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0); | |
| 1281 | 1295 | if(__ret) |
| 1282 | 1296 | __cxx_atomic_assign_volatile(__a->__a_value, __value); |
| 1283 | 1297 | else |
| ... | ... | @@ -1290,11 +1304,11 @@ _LIBCPP_INLINE_VISIBILITY |
| 1290 | 1304 | bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_lock_impl<_Tp>* __a, |
| 1291 | 1305 | _Tp* __expected, _Tp __value, memory_order, memory_order) { |
| 1292 | 1306 | __a->__lock(); |
| 1293 | bool __ret = __a->__a_value == *__expected; | |
| 1307 | bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0); | |
| 1294 | 1308 | if(__ret) |
| 1295 | __a->__a_value = __value; | |
| 1309 | _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp)); | |
| 1296 | 1310 | else |
| 1297 | *__expected = __a->__a_value; | |
| 1311 | _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp)); | |
| 1298 | 1312 | __a->__unlock(); |
| 1299 | 1313 | return __ret; |
| 1300 | 1314 | } |
| ... | ... | @@ -1444,6 +1458,9 @@ template<> struct __cxx_is_always_lock_free<bool> { enum { __value = 2 == ATOMIC |
| 1444 | 1458 | template<> struct __cxx_is_always_lock_free<char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; |
| 1445 | 1459 | template<> struct __cxx_is_always_lock_free<signed char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; |
| 1446 | 1460 | template<> struct __cxx_is_always_lock_free<unsigned char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; |
| 1461 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1462 | template<> struct __cxx_is_always_lock_free<char8_t> { enum { __value = 2 == ATOMIC_CHAR8_T_LOCK_FREE }; }; | |
| 1463 | #endif | |
| 1447 | 1464 | template<> struct __cxx_is_always_lock_free<char16_t> { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; }; |
| 1448 | 1465 | template<> struct __cxx_is_always_lock_free<char32_t> { enum { __value = 2 == ATOMIC_CHAR32_T_LOCK_FREE }; }; |
| 1449 | 1466 | template<> struct __cxx_is_always_lock_free<wchar_t> { enum { __value = 2 == ATOMIC_WCHAR_T_LOCK_FREE }; }; |
| ... | ... | @@ -1486,8 +1503,6 @@ struct __cxx_atomic_impl : public _Base { |
| 1486 | 1503 | using __cxx_contention_t = int64_t; |
| 1487 | 1504 | #endif //__linux__ |
| 1488 | 1505 | |
| 1489 | #if _LIBCPP_STD_VER >= 11 | |
| 1490 | ||
| 1491 | 1506 | using __cxx_atomic_contention_t = __cxx_atomic_impl<__cxx_contention_t>; |
| 1492 | 1507 | |
| 1493 | 1508 | #ifndef _LIBCPP_HAS_NO_PLATFORM_WAIT |
| ... | ... | @@ -1519,7 +1534,7 @@ struct __libcpp_atomic_wait_backoff_impl { |
| 1519 | 1534 | else if(__elapsed > chrono::microseconds(4)) |
| 1520 | 1535 | __libcpp_thread_yield(); |
| 1521 | 1536 | else |
| 1522 | ; // poll | |
| 1537 | {} // poll | |
| 1523 | 1538 | return false; |
| 1524 | 1539 | } |
| 1525 | 1540 | }; |
| ... | ... | @@ -1565,8 +1580,6 @@ _LIBCPP_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp* __a, _Tp const __val, mem |
| 1565 | 1580 | return __cxx_atomic_wait(__a, __test_fn); |
| 1566 | 1581 | } |
| 1567 | 1582 | |
| 1568 | #endif //_LIBCPP_STD_VER >= 11 | |
| 1569 | ||
| 1570 | 1583 | // general atomic<T> |
| 1571 | 1584 | |
| 1572 | 1585 | template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::value> |
| ... | ... | @@ -1775,6 +1788,7 @@ struct atomic |
| 1775 | 1788 | { |
| 1776 | 1789 | typedef __atomic_base<_Tp> __base; |
| 1777 | 1790 | typedef _Tp value_type; |
| 1791 | typedef value_type difference_type; | |
| 1778 | 1792 | _LIBCPP_INLINE_VISIBILITY |
| 1779 | 1793 | atomic() _NOEXCEPT _LIBCPP_DEFAULT |
| 1780 | 1794 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1796,6 +1810,7 @@ struct atomic<_Tp*> |
| 1796 | 1810 | { |
| 1797 | 1811 | typedef __atomic_base<_Tp*> __base; |
| 1798 | 1812 | typedef _Tp* value_type; |
| 1813 | typedef ptrdiff_t difference_type; | |
| 1799 | 1814 | _LIBCPP_INLINE_VISIBILITY |
| 1800 | 1815 | atomic() _NOEXCEPT _LIBCPP_DEFAULT |
| 1801 | 1816 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1872,7 +1887,7 @@ atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT |
| 1872 | 1887 | template <class _Tp> |
| 1873 | 1888 | _LIBCPP_INLINE_VISIBILITY |
| 1874 | 1889 | void |
| 1875 | atomic_init(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT | |
| 1890 | atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 1876 | 1891 | { |
| 1877 | 1892 | __cxx_atomic_init(&__o->__a_, __d); |
| 1878 | 1893 | } |
| ... | ... | @@ -1880,7 +1895,7 @@ atomic_init(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT |
| 1880 | 1895 | template <class _Tp> |
| 1881 | 1896 | _LIBCPP_INLINE_VISIBILITY |
| 1882 | 1897 | void |
| 1883 | atomic_init(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT | |
| 1898 | atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 1884 | 1899 | { |
| 1885 | 1900 | __cxx_atomic_init(&__o->__a_, __d); |
| 1886 | 1901 | } |
| ... | ... | @@ -1890,7 +1905,7 @@ atomic_init(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT |
| 1890 | 1905 | template <class _Tp> |
| 1891 | 1906 | _LIBCPP_INLINE_VISIBILITY |
| 1892 | 1907 | void |
| 1893 | atomic_store(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT | |
| 1908 | atomic_store(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 1894 | 1909 | { |
| 1895 | 1910 | __o->store(__d); |
| 1896 | 1911 | } |
| ... | ... | @@ -1898,7 +1913,7 @@ atomic_store(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT |
| 1898 | 1913 | template <class _Tp> |
| 1899 | 1914 | _LIBCPP_INLINE_VISIBILITY |
| 1900 | 1915 | void |
| 1901 | atomic_store(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT | |
| 1916 | atomic_store(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 1902 | 1917 | { |
| 1903 | 1918 | __o->store(__d); |
| 1904 | 1919 | } |
| ... | ... | @@ -1908,7 +1923,7 @@ atomic_store(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT |
| 1908 | 1923 | template <class _Tp> |
| 1909 | 1924 | _LIBCPP_INLINE_VISIBILITY |
| 1910 | 1925 | void |
| 1911 | atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT | |
| 1926 | atomic_store_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT | |
| 1912 | 1927 | _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) |
| 1913 | 1928 | { |
| 1914 | 1929 | __o->store(__d, __m); |
| ... | ... | @@ -1917,7 +1932,7 @@ atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOE |
| 1917 | 1932 | template <class _Tp> |
| 1918 | 1933 | _LIBCPP_INLINE_VISIBILITY |
| 1919 | 1934 | void |
| 1920 | atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT | |
| 1935 | atomic_store_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT | |
| 1921 | 1936 | _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) |
| 1922 | 1937 | { |
| 1923 | 1938 | __o->store(__d, __m); |
| ... | ... | @@ -1966,7 +1981,7 @@ atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT |
| 1966 | 1981 | template <class _Tp> |
| 1967 | 1982 | _LIBCPP_INLINE_VISIBILITY |
| 1968 | 1983 | _Tp |
| 1969 | atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT | |
| 1984 | atomic_exchange(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 1970 | 1985 | { |
| 1971 | 1986 | return __o->exchange(__d); |
| 1972 | 1987 | } |
| ... | ... | @@ -1974,7 +1989,7 @@ atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT |
| 1974 | 1989 | template <class _Tp> |
| 1975 | 1990 | _LIBCPP_INLINE_VISIBILITY |
| 1976 | 1991 | _Tp |
| 1977 | atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT | |
| 1992 | atomic_exchange(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 1978 | 1993 | { |
| 1979 | 1994 | return __o->exchange(__d); |
| 1980 | 1995 | } |
| ... | ... | @@ -1984,7 +1999,7 @@ atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT |
| 1984 | 1999 | template <class _Tp> |
| 1985 | 2000 | _LIBCPP_INLINE_VISIBILITY |
| 1986 | 2001 | _Tp |
| 1987 | atomic_exchange_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT | |
| 2002 | atomic_exchange_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT | |
| 1988 | 2003 | { |
| 1989 | 2004 | return __o->exchange(__d, __m); |
| 1990 | 2005 | } |
| ... | ... | @@ -1992,7 +2007,7 @@ atomic_exchange_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _ |
| 1992 | 2007 | template <class _Tp> |
| 1993 | 2008 | _LIBCPP_INLINE_VISIBILITY |
| 1994 | 2009 | _Tp |
| 1995 | atomic_exchange_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT | |
| 2010 | atomic_exchange_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT | |
| 1996 | 2011 | { |
| 1997 | 2012 | return __o->exchange(__d, __m); |
| 1998 | 2013 | } |
| ... | ... | @@ -2002,7 +2017,7 @@ atomic_exchange_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT |
| 2002 | 2017 | template <class _Tp> |
| 2003 | 2018 | _LIBCPP_INLINE_VISIBILITY |
| 2004 | 2019 | bool |
| 2005 | atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT | |
| 2020 | atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 2006 | 2021 | { |
| 2007 | 2022 | return __o->compare_exchange_weak(*__e, __d); |
| 2008 | 2023 | } |
| ... | ... | @@ -2010,7 +2025,7 @@ atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEX |
| 2010 | 2025 | template <class _Tp> |
| 2011 | 2026 | _LIBCPP_INLINE_VISIBILITY |
| 2012 | 2027 | bool |
| 2013 | atomic_compare_exchange_weak(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT | |
| 2028 | atomic_compare_exchange_weak(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 2014 | 2029 | { |
| 2015 | 2030 | return __o->compare_exchange_weak(*__e, __d); |
| 2016 | 2031 | } |
| ... | ... | @@ -2020,7 +2035,7 @@ atomic_compare_exchange_weak(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT |
| 2020 | 2035 | template <class _Tp> |
| 2021 | 2036 | _LIBCPP_INLINE_VISIBILITY |
| 2022 | 2037 | bool |
| 2023 | atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT | |
| 2038 | atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 2024 | 2039 | { |
| 2025 | 2040 | return __o->compare_exchange_strong(*__e, __d); |
| 2026 | 2041 | } |
| ... | ... | @@ -2028,7 +2043,7 @@ atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NO |
| 2028 | 2043 | template <class _Tp> |
| 2029 | 2044 | _LIBCPP_INLINE_VISIBILITY |
| 2030 | 2045 | bool |
| 2031 | atomic_compare_exchange_strong(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT | |
| 2046 | atomic_compare_exchange_strong(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT | |
| 2032 | 2047 | { |
| 2033 | 2048 | return __o->compare_exchange_strong(*__e, __d); |
| 2034 | 2049 | } |
| ... | ... | @@ -2038,8 +2053,8 @@ atomic_compare_exchange_strong(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT |
| 2038 | 2053 | template <class _Tp> |
| 2039 | 2054 | _LIBCPP_INLINE_VISIBILITY |
| 2040 | 2055 | bool |
| 2041 | atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e, | |
| 2042 | _Tp __d, | |
| 2056 | atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, | |
| 2057 | typename atomic<_Tp>::value_type __d, | |
| 2043 | 2058 | memory_order __s, memory_order __f) _NOEXCEPT |
| 2044 | 2059 | _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) |
| 2045 | 2060 | { |
| ... | ... | @@ -2049,7 +2064,7 @@ atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e, |
| 2049 | 2064 | template <class _Tp> |
| 2050 | 2065 | _LIBCPP_INLINE_VISIBILITY |
| 2051 | 2066 | bool |
| 2052 | atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d, | |
| 2067 | atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d, | |
| 2053 | 2068 | memory_order __s, memory_order __f) _NOEXCEPT |
| 2054 | 2069 | _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) |
| 2055 | 2070 | { |
| ... | ... | @@ -2062,7 +2077,7 @@ template <class _Tp> |
| 2062 | 2077 | _LIBCPP_INLINE_VISIBILITY |
| 2063 | 2078 | bool |
| 2064 | 2079 | atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o, |
| 2065 | _Tp* __e, _Tp __d, | |
| 2080 | typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d, | |
| 2066 | 2081 | memory_order __s, memory_order __f) _NOEXCEPT |
| 2067 | 2082 | _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) |
| 2068 | 2083 | { |
| ... | ... | @@ -2072,8 +2087,8 @@ atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o, |
| 2072 | 2087 | template <class _Tp> |
| 2073 | 2088 | _LIBCPP_INLINE_VISIBILITY |
| 2074 | 2089 | bool |
| 2075 | atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, _Tp* __e, | |
| 2076 | _Tp __d, | |
| 2090 | atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, | |
| 2091 | typename atomic<_Tp>::value_type __d, | |
| 2077 | 2092 | memory_order __s, memory_order __f) _NOEXCEPT |
| 2078 | 2093 | _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) |
| 2079 | 2094 | { |
| ... | ... | @@ -2156,10 +2171,10 @@ template <class _Tp> |
| 2156 | 2171 | _LIBCPP_INLINE_VISIBILITY |
| 2157 | 2172 | typename enable_if |
| 2158 | 2173 | < |
| 2159 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2174 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2160 | 2175 | _Tp |
| 2161 | 2176 | >::type |
| 2162 | atomic_fetch_add(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2177 | atomic_fetch_add(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT | |
| 2163 | 2178 | { |
| 2164 | 2179 | return __o->fetch_add(__op); |
| 2165 | 2180 | } |
| ... | ... | @@ -2168,10 +2183,10 @@ template <class _Tp> |
| 2168 | 2183 | _LIBCPP_INLINE_VISIBILITY |
| 2169 | 2184 | typename enable_if |
| 2170 | 2185 | < |
| 2171 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2186 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2172 | 2187 | _Tp |
| 2173 | 2188 | >::type |
| 2174 | atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2189 | atomic_fetch_add(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT | |
| 2175 | 2190 | { |
| 2176 | 2191 | return __o->fetch_add(__op); |
| 2177 | 2192 | } |
| ... | ... | @@ -2179,7 +2194,7 @@ atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT |
| 2179 | 2194 | template <class _Tp> |
| 2180 | 2195 | _LIBCPP_INLINE_VISIBILITY |
| 2181 | 2196 | _Tp* |
| 2182 | atomic_fetch_add(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT | |
| 2197 | atomic_fetch_add(volatile atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op) _NOEXCEPT | |
| 2183 | 2198 | { |
| 2184 | 2199 | return __o->fetch_add(__op); |
| 2185 | 2200 | } |
| ... | ... | @@ -2187,7 +2202,7 @@ atomic_fetch_add(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT |
| 2187 | 2202 | template <class _Tp> |
| 2188 | 2203 | _LIBCPP_INLINE_VISIBILITY |
| 2189 | 2204 | _Tp* |
| 2190 | atomic_fetch_add(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT | |
| 2205 | atomic_fetch_add(atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op) _NOEXCEPT | |
| 2191 | 2206 | { |
| 2192 | 2207 | return __o->fetch_add(__op); |
| 2193 | 2208 | } |
| ... | ... | @@ -2198,10 +2213,10 @@ template <class _Tp> |
| 2198 | 2213 | _LIBCPP_INLINE_VISIBILITY |
| 2199 | 2214 | typename enable_if |
| 2200 | 2215 | < |
| 2201 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2216 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2202 | 2217 | _Tp |
| 2203 | 2218 | >::type |
| 2204 | atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2219 | atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2205 | 2220 | { |
| 2206 | 2221 | return __o->fetch_add(__op, __m); |
| 2207 | 2222 | } |
| ... | ... | @@ -2210,10 +2225,10 @@ template <class _Tp> |
| 2210 | 2225 | _LIBCPP_INLINE_VISIBILITY |
| 2211 | 2226 | typename enable_if |
| 2212 | 2227 | < |
| 2213 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2228 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2214 | 2229 | _Tp |
| 2215 | 2230 | >::type |
| 2216 | atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2231 | atomic_fetch_add_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2217 | 2232 | { |
| 2218 | 2233 | return __o->fetch_add(__op, __m); |
| 2219 | 2234 | } |
| ... | ... | @@ -2221,8 +2236,7 @@ atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEP |
| 2221 | 2236 | template <class _Tp> |
| 2222 | 2237 | _LIBCPP_INLINE_VISIBILITY |
| 2223 | 2238 | _Tp* |
| 2224 | atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, | |
| 2225 | memory_order __m) _NOEXCEPT | |
| 2239 | atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2226 | 2240 | { |
| 2227 | 2241 | return __o->fetch_add(__op, __m); |
| 2228 | 2242 | } |
| ... | ... | @@ -2230,7 +2244,7 @@ atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, |
| 2230 | 2244 | template <class _Tp> |
| 2231 | 2245 | _LIBCPP_INLINE_VISIBILITY |
| 2232 | 2246 | _Tp* |
| 2233 | atomic_fetch_add_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT | |
| 2247 | atomic_fetch_add_explicit(atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2234 | 2248 | { |
| 2235 | 2249 | return __o->fetch_add(__op, __m); |
| 2236 | 2250 | } |
| ... | ... | @@ -2241,10 +2255,10 @@ template <class _Tp> |
| 2241 | 2255 | _LIBCPP_INLINE_VISIBILITY |
| 2242 | 2256 | typename enable_if |
| 2243 | 2257 | < |
| 2244 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2258 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2245 | 2259 | _Tp |
| 2246 | 2260 | >::type |
| 2247 | atomic_fetch_sub(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2261 | atomic_fetch_sub(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT | |
| 2248 | 2262 | { |
| 2249 | 2263 | return __o->fetch_sub(__op); |
| 2250 | 2264 | } |
| ... | ... | @@ -2253,10 +2267,10 @@ template <class _Tp> |
| 2253 | 2267 | _LIBCPP_INLINE_VISIBILITY |
| 2254 | 2268 | typename enable_if |
| 2255 | 2269 | < |
| 2256 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2270 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2257 | 2271 | _Tp |
| 2258 | 2272 | >::type |
| 2259 | atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2273 | atomic_fetch_sub(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT | |
| 2260 | 2274 | { |
| 2261 | 2275 | return __o->fetch_sub(__op); |
| 2262 | 2276 | } |
| ... | ... | @@ -2264,7 +2278,7 @@ atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT |
| 2264 | 2278 | template <class _Tp> |
| 2265 | 2279 | _LIBCPP_INLINE_VISIBILITY |
| 2266 | 2280 | _Tp* |
| 2267 | atomic_fetch_sub(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT | |
| 2281 | atomic_fetch_sub(volatile atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op) _NOEXCEPT | |
| 2268 | 2282 | { |
| 2269 | 2283 | return __o->fetch_sub(__op); |
| 2270 | 2284 | } |
| ... | ... | @@ -2272,7 +2286,7 @@ atomic_fetch_sub(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT |
| 2272 | 2286 | template <class _Tp> |
| 2273 | 2287 | _LIBCPP_INLINE_VISIBILITY |
| 2274 | 2288 | _Tp* |
| 2275 | atomic_fetch_sub(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT | |
| 2289 | atomic_fetch_sub(atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op) _NOEXCEPT | |
| 2276 | 2290 | { |
| 2277 | 2291 | return __o->fetch_sub(__op); |
| 2278 | 2292 | } |
| ... | ... | @@ -2283,10 +2297,10 @@ template <class _Tp> |
| 2283 | 2297 | _LIBCPP_INLINE_VISIBILITY |
| 2284 | 2298 | typename enable_if |
| 2285 | 2299 | < |
| 2286 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2300 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2287 | 2301 | _Tp |
| 2288 | 2302 | >::type |
| 2289 | atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2303 | atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2290 | 2304 | { |
| 2291 | 2305 | return __o->fetch_sub(__op, __m); |
| 2292 | 2306 | } |
| ... | ... | @@ -2295,10 +2309,10 @@ template <class _Tp> |
| 2295 | 2309 | _LIBCPP_INLINE_VISIBILITY |
| 2296 | 2310 | typename enable_if |
| 2297 | 2311 | < |
| 2298 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, | |
| 2312 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value && !is_const<_Tp>::value, | |
| 2299 | 2313 | _Tp |
| 2300 | 2314 | >::type |
| 2301 | atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2315 | atomic_fetch_sub_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2302 | 2316 | { |
| 2303 | 2317 | return __o->fetch_sub(__op, __m); |
| 2304 | 2318 | } |
| ... | ... | @@ -2306,8 +2320,7 @@ atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEP |
| 2306 | 2320 | template <class _Tp> |
| 2307 | 2321 | _LIBCPP_INLINE_VISIBILITY |
| 2308 | 2322 | _Tp* |
| 2309 | atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, | |
| 2310 | memory_order __m) _NOEXCEPT | |
| 2323 | atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2311 | 2324 | { |
| 2312 | 2325 | return __o->fetch_sub(__op, __m); |
| 2313 | 2326 | } |
| ... | ... | @@ -2315,7 +2328,7 @@ atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, |
| 2315 | 2328 | template <class _Tp> |
| 2316 | 2329 | _LIBCPP_INLINE_VISIBILITY |
| 2317 | 2330 | _Tp* |
| 2318 | atomic_fetch_sub_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT | |
| 2331 | atomic_fetch_sub_explicit(atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT | |
| 2319 | 2332 | { |
| 2320 | 2333 | return __o->fetch_sub(__op, __m); |
| 2321 | 2334 | } |
| ... | ... | @@ -2329,7 +2342,7 @@ typename enable_if |
| 2329 | 2342 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2330 | 2343 | _Tp |
| 2331 | 2344 | >::type |
| 2332 | atomic_fetch_and(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2345 | atomic_fetch_and(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT | |
| 2333 | 2346 | { |
| 2334 | 2347 | return __o->fetch_and(__op); |
| 2335 | 2348 | } |
| ... | ... | @@ -2341,7 +2354,7 @@ typename enable_if |
| 2341 | 2354 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2342 | 2355 | _Tp |
| 2343 | 2356 | >::type |
| 2344 | atomic_fetch_and(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2357 | atomic_fetch_and(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT | |
| 2345 | 2358 | { |
| 2346 | 2359 | return __o->fetch_and(__op); |
| 2347 | 2360 | } |
| ... | ... | @@ -2355,7 +2368,7 @@ typename enable_if |
| 2355 | 2368 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2356 | 2369 | _Tp |
| 2357 | 2370 | >::type |
| 2358 | atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2371 | atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT | |
| 2359 | 2372 | { |
| 2360 | 2373 | return __o->fetch_and(__op, __m); |
| 2361 | 2374 | } |
| ... | ... | @@ -2367,7 +2380,7 @@ typename enable_if |
| 2367 | 2380 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2368 | 2381 | _Tp |
| 2369 | 2382 | >::type |
| 2370 | atomic_fetch_and_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2383 | atomic_fetch_and_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT | |
| 2371 | 2384 | { |
| 2372 | 2385 | return __o->fetch_and(__op, __m); |
| 2373 | 2386 | } |
| ... | ... | @@ -2381,7 +2394,7 @@ typename enable_if |
| 2381 | 2394 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2382 | 2395 | _Tp |
| 2383 | 2396 | >::type |
| 2384 | atomic_fetch_or(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2397 | atomic_fetch_or(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT | |
| 2385 | 2398 | { |
| 2386 | 2399 | return __o->fetch_or(__op); |
| 2387 | 2400 | } |
| ... | ... | @@ -2393,7 +2406,7 @@ typename enable_if |
| 2393 | 2406 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2394 | 2407 | _Tp |
| 2395 | 2408 | >::type |
| 2396 | atomic_fetch_or(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2409 | atomic_fetch_or(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT | |
| 2397 | 2410 | { |
| 2398 | 2411 | return __o->fetch_or(__op); |
| 2399 | 2412 | } |
| ... | ... | @@ -2407,7 +2420,7 @@ typename enable_if |
| 2407 | 2420 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2408 | 2421 | _Tp |
| 2409 | 2422 | >::type |
| 2410 | atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2423 | atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT | |
| 2411 | 2424 | { |
| 2412 | 2425 | return __o->fetch_or(__op, __m); |
| 2413 | 2426 | } |
| ... | ... | @@ -2419,7 +2432,7 @@ typename enable_if |
| 2419 | 2432 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2420 | 2433 | _Tp |
| 2421 | 2434 | >::type |
| 2422 | atomic_fetch_or_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2435 | atomic_fetch_or_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT | |
| 2423 | 2436 | { |
| 2424 | 2437 | return __o->fetch_or(__op, __m); |
| 2425 | 2438 | } |
| ... | ... | @@ -2433,7 +2446,7 @@ typename enable_if |
| 2433 | 2446 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2434 | 2447 | _Tp |
| 2435 | 2448 | >::type |
| 2436 | atomic_fetch_xor(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2449 | atomic_fetch_xor(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT | |
| 2437 | 2450 | { |
| 2438 | 2451 | return __o->fetch_xor(__op); |
| 2439 | 2452 | } |
| ... | ... | @@ -2445,7 +2458,7 @@ typename enable_if |
| 2445 | 2458 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2446 | 2459 | _Tp |
| 2447 | 2460 | >::type |
| 2448 | atomic_fetch_xor(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT | |
| 2461 | atomic_fetch_xor(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT | |
| 2449 | 2462 | { |
| 2450 | 2463 | return __o->fetch_xor(__op); |
| 2451 | 2464 | } |
| ... | ... | @@ -2459,7 +2472,7 @@ typename enable_if |
| 2459 | 2472 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2460 | 2473 | _Tp |
| 2461 | 2474 | >::type |
| 2462 | atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2475 | atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT | |
| 2463 | 2476 | { |
| 2464 | 2477 | return __o->fetch_xor(__op, __m); |
| 2465 | 2478 | } |
| ... | ... | @@ -2471,7 +2484,7 @@ typename enable_if |
| 2471 | 2484 | is_integral<_Tp>::value && !is_same<_Tp, bool>::value, |
| 2472 | 2485 | _Tp |
| 2473 | 2486 | >::type |
| 2474 | atomic_fetch_xor_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT | |
| 2487 | atomic_fetch_xor_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT | |
| 2475 | 2488 | { |
| 2476 | 2489 | return __o->fetch_xor(__op, __m); |
| 2477 | 2490 | } |
| ... | ... | @@ -2715,6 +2728,9 @@ typedef atomic<long> atomic_long; |
| 2715 | 2728 | typedef atomic<unsigned long> atomic_ulong; |
| 2716 | 2729 | typedef atomic<long long> atomic_llong; |
| 2717 | 2730 | typedef atomic<unsigned long long> atomic_ullong; |
| 2731 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 2732 | typedef atomic<char8_t> atomic_char8_t; | |
| 2733 | #endif | |
| 2718 | 2734 | typedef atomic<char16_t> atomic_char16_t; |
| 2719 | 2735 | typedef atomic<char32_t> atomic_char32_t; |
| 2720 | 2736 | typedef atomic<wchar_t> atomic_wchar_t; |
lib/libcxx/include/barrier+10-2| ... | ... | @@ -22,6 +22,8 @@ namespace std |
| 22 | 22 | public: |
| 23 | 23 | using arrival_token = see below; |
| 24 | 24 | |
| 25 | static constexpr ptrdiff_t max() noexcept; | |
| 26 | ||
| 25 | 27 | constexpr explicit barrier(ptrdiff_t phase_count, |
| 26 | 28 | CompletionFunction f = CompletionFunction()); |
| 27 | 29 | ~barrier(); |
| ... | ... | @@ -44,6 +46,7 @@ namespace std |
| 44 | 46 | */ |
| 45 | 47 | |
| 46 | 48 | #include <__config> |
| 49 | #include <__availability> | |
| 47 | 50 | #include <atomic> |
| 48 | 51 | #ifndef _LIBCPP_HAS_NO_TREE_BARRIER |
| 49 | 52 | # include <memory> |
| ... | ... | @@ -57,6 +60,9 @@ namespace std |
| 57 | 60 | # error <barrier> is not supported on this single threaded system |
| 58 | 61 | #endif |
| 59 | 62 | |
| 63 | _LIBCPP_PUSH_MACROS | |
| 64 | #include <__undef_macros> | |
| 65 | ||
| 60 | 66 | #if _LIBCPP_STD_VER >= 14 |
| 61 | 67 | |
| 62 | 68 | _LIBCPP_BEGIN_NAMESPACE_STD |
| ... | ... | @@ -287,7 +293,7 @@ public: |
| 287 | 293 | |
| 288 | 294 | _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY |
| 289 | 295 | barrier(ptrdiff_t __count, _CompletionF __completion = _CompletionF()) |
| 290 | : __b(__count, std::move(__completion)) { | |
| 296 | : __b(__count, _VSTD::move(__completion)) { | |
| 291 | 297 | } |
| 292 | 298 | |
| 293 | 299 | barrier(barrier const&) = delete; |
| ... | ... | @@ -301,7 +307,7 @@ public: |
| 301 | 307 | _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY |
| 302 | 308 | void wait(arrival_token&& __phase) const |
| 303 | 309 | { |
| 304 | __b.wait(std::move(__phase)); | |
| 310 | __b.wait(_VSTD::move(__phase)); | |
| 305 | 311 | } |
| 306 | 312 | 	_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY |
| 307 | 313 | void arrive_and_wait() |
| ... | ... | @@ -319,4 +325,6 @@ _LIBCPP_END_NAMESPACE_STD |
| 319 | 325 | |
| 320 | 326 | #endif // _LIBCPP_STD_VER >= 14 |
| 321 | 327 | |
| 328 | _LIBCPP_POP_MACROS | |
| 329 | ||
| 322 | 330 | #endif //_LIBCPP_BARRIER |
lib/libcxx/include/bit+16-132| ... | ... | @@ -17,13 +17,13 @@ namespace std { |
| 17 | 17 | |
| 18 | 18 | // [bit.pow.two], integral powers of 2 |
| 19 | 19 | template <class T> |
| 20 | constexpr bool ispow2(T x) noexcept; // C++20 | |
| 20 | constexpr bool has_single_bit(T x) noexcept; // C++20 | |
| 21 | 21 | template <class T> |
| 22 | constexpr T ceil2(T x); // C++20 | |
| 22 | constexpr T bit_ceil(T x); // C++20 | |
| 23 | 23 | template <class T> |
| 24 | constexpr T floor2(T x) noexcept; // C++20 | |
| 24 | constexpr T bit_floor(T x) noexcept; // C++20 | |
| 25 | 25 | template <class T> |
| 26 | constexpr T log2p1(T x) noexcept; // C++20 | |
| 26 | constexpr T bit_width(T x) noexcept; // C++20 | |
| 27 | 27 | |
| 28 | 28 | // [bit.rotate], rotating |
| 29 | 29 | template<class T> |
| ... | ... | @@ -55,13 +55,14 @@ namespace std { |
| 55 | 55 | */ |
| 56 | 56 | |
| 57 | 57 | #include <__config> |
| 58 | #include <__bits> | |
| 58 | 59 | #include <limits> |
| 59 | 60 | #include <type_traits> |
| 60 | 61 | #include <version> |
| 61 | 62 | #include <__debug> |
| 62 | 63 | |
| 63 | 64 | #if defined(__IBMCPP__) |
| 64 | #include "support/ibm/support.h" | |
| 65 | #include "__support/ibm/support.h" | |
| 65 | 66 | #endif |
| 66 | 67 | #if defined(_LIBCPP_COMPILER_MSVC) |
| 67 | 68 | #include <intrin.h> |
| ... | ... | @@ -76,122 +77,6 @@ _LIBCPP_PUSH_MACROS |
| 76 | 77 | |
| 77 | 78 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 78 | 79 | |
| 79 | #ifndef _LIBCPP_COMPILER_MSVC | |
| 80 | ||
| 81 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 82 | int __libcpp_ctz(unsigned __x) _NOEXCEPT { return __builtin_ctz(__x); } | |
| 83 | ||
| 84 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 85 | int __libcpp_ctz(unsigned long __x) _NOEXCEPT { return __builtin_ctzl(__x); } | |
| 86 | ||
| 87 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 88 | int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); } | |
| 89 | ||
| 90 | ||
| 91 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 92 | int __libcpp_clz(unsigned __x) _NOEXCEPT { return __builtin_clz(__x); } | |
| 93 | ||
| 94 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 95 | int __libcpp_clz(unsigned long __x) _NOEXCEPT { return __builtin_clzl(__x); } | |
| 96 | ||
| 97 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 98 | int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); } | |
| 99 | ||
| 100 | ||
| 101 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 102 | int __libcpp_popcount(unsigned __x) _NOEXCEPT { return __builtin_popcount(__x); } | |
| 103 | ||
| 104 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 105 | int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popcountl(__x); } | |
| 106 | ||
| 107 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 108 | int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); } | |
| 109 | ||
| 110 | #else // _LIBCPP_COMPILER_MSVC | |
| 111 | ||
| 112 | // Precondition: __x != 0 | |
| 113 | inline _LIBCPP_INLINE_VISIBILITY | |
| 114 | int __libcpp_ctz(unsigned __x) { | |
| 115 | static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); | |
| 116 | static_assert(sizeof(unsigned long) == 4, ""); | |
| 117 | unsigned long __where; | |
| 118 | if (_BitScanForward(&__where, __x)) | |
| 119 | return static_cast<int>(__where); | |
| 120 | return 32; | |
| 121 | } | |
| 122 | ||
| 123 | inline _LIBCPP_INLINE_VISIBILITY | |
| 124 | int __libcpp_ctz(unsigned long __x) { | |
| 125 | static_assert(sizeof(unsigned long) == sizeof(unsigned), ""); | |
| 126 | return __ctz(static_cast<unsigned>(__x)); | |
| 127 | } | |
| 128 | ||
| 129 | inline _LIBCPP_INLINE_VISIBILITY | |
| 130 | int __libcpp_ctz(unsigned long long __x) { | |
| 131 | unsigned long __where; | |
| 132 | #if defined(_LIBCPP_HAS_BITSCAN64) | |
| 133 | (defined(_M_AMD64) || defined(__x86_64__)) | |
| 134 | if (_BitScanForward64(&__where, __x)) | |
| 135 | return static_cast<int>(__where); | |
| 136 | #else | |
| 137 | // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls. | |
| 138 | if (_BitScanForward(&__where, static_cast<unsigned long>(__x))) | |
| 139 | return static_cast<int>(__where); | |
| 140 | if (_BitScanForward(&__where, static_cast<unsigned long>(__x >> 32))) | |
| 141 | return static_cast<int>(__where + 32); | |
| 142 | #endif | |
| 143 | return 64; | |
| 144 | } | |
| 145 | ||
| 146 | // Precondition: __x != 0 | |
| 147 | inline _LIBCPP_INLINE_VISIBILITY | |
| 148 | int __libcpp_clz(unsigned __x) { | |
| 149 | static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); | |
| 150 | static_assert(sizeof(unsigned long) == 4, ""); | |
| 151 | unsigned long __where; | |
| 152 | if (_BitScanReverse(&__where, __x)) | |
| 153 | return static_cast<int>(31 - __where); | |
| 154 | return 32; // Undefined Behavior. | |
| 155 | } | |
| 156 | ||
| 157 | inline _LIBCPP_INLINE_VISIBILITY | |
| 158 | int __libcpp_clz(unsigned long __x) { | |
| 159 | static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); | |
| 160 | return __libcpp_clz(static_cast<unsigned>(__x)); | |
| 161 | } | |
| 162 | ||
| 163 | inline _LIBCPP_INLINE_VISIBILITY | |
| 164 | int __libcpp_clz(unsigned long long __x) { | |
| 165 | unsigned long __where; | |
| 166 | #if defined(_LIBCPP_HAS_BITSCAN64) | |
| 167 | if (_BitScanReverse64(&__where, __x)) | |
| 168 | return static_cast<int>(63 - __where); | |
| 169 | #else | |
| 170 | // Win32 doesn't have _BitScanReverse64 so emulate it with two 32 bit calls. | |
| 171 | if (_BitScanReverse(&__where, static_cast<unsigned long>(__x >> 32))) | |
| 172 | return static_cast<int>(63 - (__where + 32)); | |
| 173 | if (_BitScanReverse(&__where, static_cast<unsigned long>(__x))) | |
| 174 | return static_cast<int>(63 - __where); | |
| 175 | #endif | |
| 176 | return 64; // Undefined Behavior. | |
| 177 | } | |
| 178 | ||
| 179 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) { | |
| 180 | static_assert(sizeof(unsigned) == 4, ""); | |
| 181 | return __popcnt(__x); | |
| 182 | } | |
| 183 | ||
| 184 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) { | |
| 185 | static_assert(sizeof(unsigned long) == 4, ""); | |
| 186 | return __popcnt(__x); | |
| 187 | } | |
| 188 | ||
| 189 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) { | |
| 190 | static_assert(sizeof(unsigned long long) == 8, ""); | |
| 191 | return __popcnt64(__x); | |
| 192 | } | |
| 193 | ||
| 194 | #endif // _LIBCPP_COMPILER_MSVC | |
| 195 | 80 | |
| 196 | 81 | template <class _Tp> |
| 197 | 82 | using __bitop_unsigned_integer _LIBCPP_NODEBUG_TYPE = integral_constant<bool, |
| ... | ... | @@ -343,14 +228,14 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 |
| 343 | 228 | unsigned __bit_log2(_Tp __t) _NOEXCEPT |
| 344 | 229 | { |
| 345 | 230 | static_assert(__bitop_unsigned_integer<_Tp>::value, "__bit_log2 requires unsigned"); |
| 346 | return std::numeric_limits<_Tp>::digits - 1 - __countl_zero(__t); | |
| 231 | return numeric_limits<_Tp>::digits - 1 - __countl_zero(__t); | |
| 347 | 232 | } |
| 348 | 233 | |
| 349 | 234 | template <class _Tp> |
| 350 | 235 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR |
| 351 | bool __ispow2(_Tp __t) _NOEXCEPT | |
| 236 | bool __has_single_bit(_Tp __t) _NOEXCEPT | |
| 352 | 237 | { |
| 353 | static_assert(__bitop_unsigned_integer<_Tp>::value, "__ispow2 requires unsigned"); | |
| 238 | static_assert(__bitop_unsigned_integer<_Tp>::value, "__has_single_bit requires unsigned"); | |
| 354 | 239 | return __t != 0 && (((__t & (__t - 1)) == 0)); |
| 355 | 240 | } |
| 356 | 241 | |
| ... | ... | @@ -399,7 +284,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr |
| 399 | 284 | enable_if_t<__bitop_unsigned_integer<_Tp>::value, int> |
| 400 | 285 | countr_zero(_Tp __t) noexcept |
| 401 | 286 | { |
| 402 | 	return __countr_zero(__t); | |
| 287 | return __countr_zero(__t); | |
| 403 | 288 | } |
| 404 | 289 | |
| 405 | 290 | |
| ... | ... | @@ -424,15 +309,15 @@ popcount(_Tp __t) noexcept |
| 424 | 309 | template <class _Tp> |
| 425 | 310 | _LIBCPP_INLINE_VISIBILITY constexpr |
| 426 | 311 | enable_if_t<__bitop_unsigned_integer<_Tp>::value, bool> |
| 427 | ispow2(_Tp __t) noexcept | |
| 312 | has_single_bit(_Tp __t) noexcept | |
| 428 | 313 | { |
| 429 | return __ispow2(__t); | |
| 314 | return __has_single_bit(__t); | |
| 430 | 315 | } |
| 431 | 316 | |
| 432 | 317 | template <class _Tp> |
| 433 | 318 | _LIBCPP_INLINE_VISIBILITY constexpr |
| 434 | 319 | enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp> |
| 435 | floor2(_Tp __t) noexcept | |
| 320 | bit_floor(_Tp __t) noexcept | |
| 436 | 321 | { |
| 437 | 322 | return __t == 0 ? 0 : _Tp{1} << __bit_log2(__t); |
| 438 | 323 | } |
| ... | ... | @@ -440,11 +325,11 @@ floor2(_Tp __t) noexcept |
| 440 | 325 | template <class _Tp> |
| 441 | 326 | _LIBCPP_INLINE_VISIBILITY constexpr |
| 442 | 327 | enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp> |
| 443 | ceil2(_Tp __t) noexcept | |
| 328 | bit_ceil(_Tp __t) noexcept | |
| 444 | 329 | { |
| 445 | 330 | if (__t < 2) return 1; |
| 446 | 331 | const unsigned __n = numeric_limits<_Tp>::digits - countl_zero((_Tp)(__t - 1u)); |
| 447 | _LIBCPP_DEBUG_ASSERT(__libcpp_is_constant_evaluated() || __n != numeric_limits<_Tp>::digits, "Bad input to ceil2"); | |
| 332 | _LIBCPP_DEBUG_ASSERT(__libcpp_is_constant_evaluated() || __n != numeric_limits<_Tp>::digits, "Bad input to bit_ceil"); | |
| 448 | 333 | |
| 449 | 334 | if constexpr (sizeof(_Tp) >= sizeof(unsigned)) |
| 450 | 335 | return _Tp{1} << __n; |
| ... | ... | @@ -459,12 +344,11 @@ ceil2(_Tp __t) noexcept |
| 459 | 344 | template <class _Tp> |
| 460 | 345 | _LIBCPP_INLINE_VISIBILITY constexpr |
| 461 | 346 | enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp> |
| 462 | log2p1(_Tp __t) noexcept | |
| 347 | bit_width(_Tp __t) noexcept | |
| 463 | 348 | { |
| 464 | 349 | return __t == 0 ? 0 : __bit_log2(__t) + 1; |
| 465 | 350 | } |
| 466 | 351 | |
| 467 | ||
| 468 | 352 | enum class endian |
| 469 | 353 | { |
| 470 | 354 | little = 0xDEAD, |
lib/libcxx/include/bitset+6-6| ... | ... | @@ -380,7 +380,7 @@ unsigned long long |
| 380 | 380 | __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const |
| 381 | 381 | { |
| 382 | 382 | unsigned long long __r = __first_[0]; |
| 383 | for (std::size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) | |
| 383 | for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) | |
| 384 | 384 | __r |= static_cast<unsigned long long>(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT); |
| 385 | 385 | return __r; |
| 386 | 386 | } |
| ... | ... | @@ -625,13 +625,13 @@ protected: |
| 625 | 625 | explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long) _NOEXCEPT; |
| 626 | 626 | |
| 627 | 627 | _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t) _NOEXCEPT |
| 628 | {return reference(0, 1);} | |
| 628 | {return reference(nullptr, 1);} | |
| 629 | 629 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t) const _NOEXCEPT |
| 630 | {return const_reference(0, 1);} | |
| 630 | {return const_reference(nullptr, 1);} | |
| 631 | 631 | _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t) _NOEXCEPT |
| 632 | {return iterator(0, 0);} | |
| 632 | {return iterator(nullptr, 0);} | |
| 633 | 633 | _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t) const _NOEXCEPT |
| 634 | {return const_iterator(0, 0);} | |
| 634 | {return const_iterator(nullptr, 0);} | |
| 635 | 635 | |
| 636 | 636 | _LIBCPP_INLINE_VISIBILITY void operator&=(const __bitset&) _NOEXCEPT {} |
| 637 | 637 | _LIBCPP_INLINE_VISIBILITY void operator|=(const __bitset&) _NOEXCEPT {} |
| ... | ... | @@ -990,7 +990,7 @@ inline |
| 990 | 990 | size_t |
| 991 | 991 | bitset<_Size>::count() const _NOEXCEPT |
| 992 | 992 | { |
| 993 | return static_cast<size_t>(__count_bool_true(base::__make_iter(0), _Size)); | |
| 993 | return static_cast<size_t>(_VSTD::__count_bool_true(base::__make_iter(0), _Size)); | |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | template <size_t _Size> |
lib/libcxx/include/charconv+14-13| ... | ... | @@ -74,12 +74,13 @@ namespace std { |
| 74 | 74 | */ |
| 75 | 75 | |
| 76 | 76 | #include <__config> |
| 77 | #include <__availability> | |
| 77 | 78 | #include <__errc> |
| 78 | #include <type_traits> | |
| 79 | #include <cmath> // for log2f | |
| 80 | #include <cstdint> | |
| 81 | #include <cstring> | |
| 79 | 82 | #include <limits> |
| 80 | #include <stdint.h> | |
| 81 | #include <string.h> | |
| 82 | #include <math.h> | |
| 83 | #include <type_traits> | |
| 83 | 84 | |
| 84 | 85 | #include <__debug> |
| 85 | 86 | |
| ... | ... | @@ -206,7 +207,7 @@ __mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r) |
| 206 | 207 | { |
| 207 | 208 | auto __c = __a * __b; |
| 208 | 209 | __r = __c; |
| 209 | return __c > (numeric_limits<unsigned char>::max)(); | |
| 210 | return __c > numeric_limits<unsigned char>::max(); | |
| 210 | 211 | } |
| 211 | 212 | |
| 212 | 213 | template <typename _Tp> |
| ... | ... | @@ -215,7 +216,7 @@ __mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r) |
| 215 | 216 | { |
| 216 | 217 | auto __c = __a * __b; |
| 217 | 218 | __r = __c; |
| 218 | return __c > (numeric_limits<unsigned short>::max)(); | |
| 219 | return __c > numeric_limits<unsigned short>::max(); | |
| 219 | 220 | } |
| 220 | 221 | |
| 221 | 222 | template <typename _Tp> |
| ... | ... | @@ -226,7 +227,7 @@ __mul_overflowed(_Tp __a, _Tp __b, _Tp& __r) |
| 226 | 227 | #if !defined(_LIBCPP_COMPILER_MSVC) |
| 227 | 228 | return __builtin_mul_overflow(__a, __b, &__r); |
| 228 | 229 | #else |
| 229 | bool __did = __b && ((numeric_limits<_Tp>::max)() / __b) < __a; | |
| 230 | bool __did = __b && (numeric_limits<_Tp>::max() / __b) < __a; | |
| 230 | 231 | __r = __a * __b; |
| 231 | 232 | return __did; |
| 232 | 233 | #endif |
| ... | ... | @@ -332,7 +333,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) |
| 332 | 333 | auto __len = __p - __buf; |
| 333 | 334 | if (__len <= __diff) |
| 334 | 335 | { |
| 335 | memcpy(__first, __buf, __len); | |
| 336 | _VSTD::memcpy(__first, __buf, __len); | |
| 336 | 337 | return {__first + __len, {}}; |
| 337 | 338 | } |
| 338 | 339 | else |
| ... | ... | @@ -381,7 +382,7 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base, |
| 381 | 382 | return {__last, errc::value_too_large}; |
| 382 | 383 | else |
| 383 | 384 | { |
| 384 | memmove(__first, __p, __len); | |
| 385 | _VSTD::memmove(__first, __p, __len); | |
| 385 | 386 | return {__first + __len, {}}; |
| 386 | 387 | } |
| 387 | 388 | } |
| ... | ... | @@ -428,13 +429,13 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args) |
| 428 | 429 | if (__x <= __complement(__to_unsigned(__tl::min()))) |
| 429 | 430 | { |
| 430 | 431 | __x = __complement(__x); |
| 431 | memcpy(&__value, &__x, sizeof(__x)); | |
| 432 | _VSTD::memcpy(&__value, &__x, sizeof(__x)); | |
| 432 | 433 | return __r; |
| 433 | 434 | } |
| 434 | 435 | } |
| 435 | 436 | else |
| 436 | 437 | { |
| 437 | if (__x <= (__tl::max)()) | |
| 438 | if (__x <= __tl::max()) | |
| 438 | 439 | { |
| 439 | 440 | __value = __x; |
| 440 | 441 | return __r; |
| ... | ... | @@ -525,7 +526,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value) |
| 525 | 526 | auto __p = __tx::__read(__first, __last, __a, __b); |
| 526 | 527 | if (__p == __last || !__in_pattern(*__p)) |
| 527 | 528 | { |
| 528 | __output_type __m = (numeric_limits<_Tp>::max)(); | |
| 529 | __output_type __m = numeric_limits<_Tp>::max(); | |
| 529 | 530 | if (__m >= __a && __m - __a >= __b) |
| 530 | 531 | { |
| 531 | 532 | __value = __a + __b; |
| ... | ... | @@ -580,7 +581,7 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value, |
| 580 | 581 | |
| 581 | 582 | if (__p == __last || !__in_pattern(*__p, __base)) |
| 582 | 583 | { |
| 583 | if ((__tl::max)() - __a >= __b) | |
| 584 | if (__tl::max() - __a >= __b) | |
| 584 | 585 | { |
| 585 | 586 | __value = __a + __b; |
| 586 | 587 | return {__p, {}}; |
lib/libcxx/include/chrono+4-3| ... | ... | @@ -824,6 +824,7 @@ constexpr chrono::year operator ""y(unsigned lo |
| 824 | 824 | */ |
| 825 | 825 | |
| 826 | 826 | #include <__config> |
| 827 | #include <__availability> | |
| 827 | 828 | #include <ctime> |
| 828 | 829 | #include <type_traits> |
| 829 | 830 | #include <ratio> |
| ... | ... | @@ -1076,7 +1077,7 @@ public: |
| 1076 | 1077 | is_convertible<_Rep2, rep>::value && |
| 1077 | 1078 | (treat_as_floating_point<rep>::value || |
| 1078 | 1079 | !treat_as_floating_point<_Rep2>::value) |
| 1079 | >::type* = 0) | |
| 1080 | >::type* = nullptr) | |
| 1080 | 1081 | : __rep_(__r) {} |
| 1081 | 1082 | |
| 1082 | 1083 | // conversions |
| ... | ... | @@ -1089,7 +1090,7 @@ public: |
| 1089 | 1090 | treat_as_floating_point<rep>::value || |
| 1090 | 1091 | (__no_overflow<_Period2, period>::type::den == 1 && |
| 1091 | 1092 | !treat_as_floating_point<_Rep2>::value)) |
| 1092 | >::type* = 0) | |
| 1093 | >::type* = nullptr) | |
| 1093 | 1094 | : __rep_(_VSTD::chrono::duration_cast<duration>(__d).count()) {} |
| 1094 | 1095 | |
| 1095 | 1096 | // observer |
| ... | ... | @@ -1375,7 +1376,7 @@ public: |
| 1375 | 1376 | typename enable_if |
| 1376 | 1377 | < |
| 1377 | 1378 | is_convertible<_Duration2, duration>::value |
| 1378 | >::type* = 0) | |
| 1379 | >::type* = nullptr) | |
| 1379 | 1380 | : __d_(t.time_since_epoch()) {} |
| 1380 | 1381 | |
| 1381 | 1382 | // observer |
lib/libcxx/include/cmath+2-2| ... | ... | @@ -660,8 +660,8 @@ _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT { |
| 660 | 660 | template <class _IntT, class _RealT> |
| 661 | 661 | _LIBCPP_INLINE_VISIBILITY |
| 662 | 662 | _IntT __clamp_to_integral(_RealT __r) _NOEXCEPT { |
| 663 | using _Lim = std::numeric_limits<_IntT>; | |
| 664 | const _IntT _MaxVal = std::__max_representable_int_for_float<_IntT, _RealT>(); | |
| 663 | using _Lim = numeric_limits<_IntT>; | |
| 664 | const _IntT _MaxVal = __max_representable_int_for_float<_IntT, _RealT>(); | |
| 665 | 665 | if (__r >= ::nextafter(static_cast<_RealT>(_MaxVal), INFINITY)) { |
| 666 | 666 | return _Lim::max(); |
| 667 | 667 | } else if (__r <= _Lim::lowest()) { |
lib/libcxx/include/codecvt+24| ... | ... | @@ -109,6 +109,7 @@ protected: |
| 109 | 109 | virtual int do_max_length() const _NOEXCEPT; |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 112 | 113 | template <> |
| 113 | 114 | class _LIBCPP_TYPE_VIS __codecvt_utf8<char16_t> |
| 114 | 115 | : public codecvt<char16_t, char, mbstate_t> |
| ... | ... | @@ -125,6 +126,8 @@ public: |
| 125 | 126 | codecvt_mode _Mode) |
| 126 | 127 | : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 127 | 128 | _Mode_(_Mode) {} |
| 129 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 130 | ||
| 128 | 131 | protected: |
| 129 | 132 | virtual result |
| 130 | 133 | do_out(state_type& __st, |
| ... | ... | @@ -144,6 +147,7 @@ protected: |
| 144 | 147 | virtual int do_max_length() const _NOEXCEPT; |
| 145 | 148 | }; |
| 146 | 149 | |
| 150 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 147 | 151 | template <> |
| 148 | 152 | class _LIBCPP_TYPE_VIS __codecvt_utf8<char32_t> |
| 149 | 153 | : public codecvt<char32_t, char, mbstate_t> |
| ... | ... | @@ -160,6 +164,8 @@ public: |
| 160 | 164 | codecvt_mode _Mode) |
| 161 | 165 | : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 162 | 166 | _Mode_(_Mode) {} |
| 167 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 168 | ||
| 163 | 169 | protected: |
| 164 | 170 | virtual result |
| 165 | 171 | do_out(state_type& __st, |
| ... | ... | @@ -267,6 +273,7 @@ protected: |
| 267 | 273 | virtual int do_max_length() const _NOEXCEPT; |
| 268 | 274 | }; |
| 269 | 275 | |
| 276 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 270 | 277 | template <> |
| 271 | 278 | class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, false> |
| 272 | 279 | : public codecvt<char16_t, char, mbstate_t> |
| ... | ... | @@ -283,6 +290,8 @@ public: |
| 283 | 290 | codecvt_mode _Mode) |
| 284 | 291 | : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 285 | 292 | _Mode_(_Mode) {} |
| 293 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 294 | ||
| 286 | 295 | protected: |
| 287 | 296 | virtual result |
| 288 | 297 | do_out(state_type& __st, |
| ... | ... | @@ -302,6 +311,7 @@ protected: |
| 302 | 311 | virtual int do_max_length() const _NOEXCEPT; |
| 303 | 312 | }; |
| 304 | 313 | |
| 314 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 305 | 315 | template <> |
| 306 | 316 | class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, true> |
| 307 | 317 | : public codecvt<char16_t, char, mbstate_t> |
| ... | ... | @@ -318,6 +328,8 @@ public: |
| 318 | 328 | codecvt_mode _Mode) |
| 319 | 329 | : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 320 | 330 | _Mode_(_Mode) {} |
| 331 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 332 | ||
| 321 | 333 | protected: |
| 322 | 334 | virtual result |
| 323 | 335 | do_out(state_type& __st, |
| ... | ... | @@ -337,6 +349,7 @@ protected: |
| 337 | 349 | virtual int do_max_length() const _NOEXCEPT; |
| 338 | 350 | }; |
| 339 | 351 | |
| 352 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 340 | 353 | template <> |
| 341 | 354 | class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, false> |
| 342 | 355 | : public codecvt<char32_t, char, mbstate_t> |
| ... | ... | @@ -353,6 +366,8 @@ public: |
| 353 | 366 | codecvt_mode _Mode) |
| 354 | 367 | : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 355 | 368 | _Mode_(_Mode) {} |
| 369 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 370 | ||
| 356 | 371 | protected: |
| 357 | 372 | virtual result |
| 358 | 373 | do_out(state_type& __st, |
| ... | ... | @@ -372,6 +387,7 @@ protected: |
| 372 | 387 | virtual int do_max_length() const _NOEXCEPT; |
| 373 | 388 | }; |
| 374 | 389 | |
| 390 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 375 | 391 | template <> |
| 376 | 392 | class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, true> |
| 377 | 393 | : public codecvt<char32_t, char, mbstate_t> |
| ... | ... | @@ -388,6 +404,8 @@ public: |
| 388 | 404 | codecvt_mode _Mode) |
| 389 | 405 | : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 390 | 406 | _Mode_(_Mode) {} |
| 407 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 408 | ||
| 391 | 409 | protected: |
| 392 | 410 | virtual result |
| 393 | 411 | do_out(state_type& __st, |
| ... | ... | @@ -460,6 +478,7 @@ protected: |
| 460 | 478 | virtual int do_max_length() const _NOEXCEPT; |
| 461 | 479 | }; |
| 462 | 480 | |
| 481 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 463 | 482 | template <> |
| 464 | 483 | class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char32_t> |
| 465 | 484 | : public codecvt<char32_t, char, mbstate_t> |
| ... | ... | @@ -476,6 +495,8 @@ public: |
| 476 | 495 | codecvt_mode _Mode) |
| 477 | 496 | : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 478 | 497 | _Mode_(_Mode) {} |
| 498 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 499 | ||
| 479 | 500 | protected: |
| 480 | 501 | virtual result |
| 481 | 502 | do_out(state_type& __st, |
| ... | ... | @@ -495,6 +516,7 @@ protected: |
| 495 | 516 | virtual int do_max_length() const _NOEXCEPT; |
| 496 | 517 | }; |
| 497 | 518 | |
| 519 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 498 | 520 | template <> |
| 499 | 521 | class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char16_t> |
| 500 | 522 | : public codecvt<char16_t, char, mbstate_t> |
| ... | ... | @@ -511,6 +533,8 @@ public: |
| 511 | 533 | codecvt_mode _Mode) |
| 512 | 534 | : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), |
| 513 | 535 | _Mode_(_Mode) {} |
| 536 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 537 | ||
| 514 | 538 | protected: |
| 515 | 539 | virtual result |
| 516 | 540 | do_out(state_type& __st, |
lib/libcxx/include/compare+9-4| ... | ... | @@ -154,8 +154,13 @@ enum class _LIBCPP_ENUM_VIS _NCmpResult : signed char { |
| 154 | 154 | __unordered = -127 |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | struct _CmpUnspecifiedType; | |
| 158 | using _CmpUnspecifiedParam = void (_CmpUnspecifiedType::*)(); | |
| 157 | struct _CmpUnspecifiedParam { | |
| 158 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEVAL | |
| 159 | _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {} | |
| 160 | ||
| 161 | template<typename _Tp, typename = _VSTD::enable_if_t<!_VSTD::is_same_v<_Tp, int>>> | |
| 162 | _CmpUnspecifiedParam(_Tp) = delete; | |
| 163 | }; | |
| 159 | 164 | |
| 160 | 165 | class weak_equality { |
| 161 | 166 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -696,8 +701,8 @@ constexpr _ClassifyCompCategory __type_to_enum() noexcept { |
| 696 | 701 | |
| 697 | 702 | template <size_t _Size> |
| 698 | 703 | constexpr _ClassifyCompCategory |
| 699 | __compute_comp_type(std::array<_ClassifyCompCategory, _Size> __types) { | |
| 700 | std::array<int, _CCC_Size> __seen = {}; | |
| 704 | __compute_comp_type(array<_ClassifyCompCategory, _Size> __types) { | |
| 705 | array<int, _CCC_Size> __seen = {}; | |
| 701 | 706 | for (auto __type : __types) |
| 702 | 707 | ++__seen[__type]; |
| 703 | 708 | if (__seen[_None]) |
lib/libcxx/include/complex+7-10| ... | ... | @@ -227,14 +227,6 @@ template<class T> complex<T> sqrt (const complex<T>&); |
| 227 | 227 | template<class T> complex<T> tan (const complex<T>&); |
| 228 | 228 | template<class T> complex<T> tanh (const complex<T>&); |
| 229 | 229 | |
| 230 | template<class T, class charT, class traits> | |
| 231 | basic_istream<charT, traits>& | |
| 232 | operator>>(basic_istream<charT, traits>& is, complex<T>& x); | |
| 233 | ||
| 234 | template<class T, class charT, class traits> | |
| 235 | basic_ostream<charT, traits>& | |
| 236 | operator<<(basic_ostream<charT, traits>& o, const complex<T>& x); | |
| 237 | ||
| 238 | 230 | } // std |
| 239 | 231 | |
| 240 | 232 | */ |
| ... | ... | @@ -244,9 +236,12 @@ template<class T, class charT, class traits> |
| 244 | 236 | #include <stdexcept> |
| 245 | 237 | #include <cmath> |
| 246 | 238 | #include <iosfwd> |
| 247 | #include <sstream> | |
| 248 | 239 | #include <version> |
| 249 | 240 | |
| 241 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 242 | # include <sstream> // for std::basic_ostringstream | |
| 243 | #endif | |
| 244 | ||
| 250 | 245 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 251 | 246 | #pragma GCC system_header |
| 252 | 247 | #endif |
| ... | ... | @@ -955,7 +950,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 955 | 950 | complex<_Tp> |
| 956 | 951 | proj(const complex<_Tp>& __c) |
| 957 | 952 | { |
| 958 | std::complex<_Tp> __r = __c; | |
| 953 | complex<_Tp> __r = __c; | |
| 959 | 954 | if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag())) |
| 960 | 955 | __r = complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag())); |
| 961 | 956 | return __r; |
| ... | ... | @@ -1438,6 +1433,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) |
| 1438 | 1433 | return __is; |
| 1439 | 1434 | } |
| 1440 | 1435 | |
| 1436 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 1441 | 1437 | template<class _Tp, class _CharT, class _Traits> |
| 1442 | 1438 | basic_ostream<_CharT, _Traits>& |
| 1443 | 1439 | operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) |
| ... | ... | @@ -1449,6 +1445,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) |
| 1449 | 1445 | __s << '(' << __x.real() << ',' << __x.imag() << ')'; |
| 1450 | 1446 | return __os << __s.str(); |
| 1451 | 1447 | } |
| 1448 | #endif // !_LIBCPP_HAS_NO_LOCALIZATION | |
| 1452 | 1449 | |
| 1453 | 1450 | #if _LIBCPP_STD_VER > 11 |
| 1454 | 1451 | // Literal suffix for complex number literals [complex.literals] |
lib/libcxx/include/concepts+5| ... | ... | @@ -157,6 +157,11 @@ concept __same_as_impl = _VSTD::_IsSame<_Tp, _Up>::value; |
| 157 | 157 | template<class _Tp, class _Up> |
| 158 | 158 | concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; |
| 159 | 159 | |
| 160 | // [concept.destructible] | |
| 161 | ||
| 162 | template<class _Tp> | |
| 163 | concept destructible = _VSTD::is_nothrow_destructible_v<_Tp>; | |
| 164 | ||
| 160 | 165 | #endif //_LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L |
| 161 | 166 | |
| 162 | 167 | _LIBCPP_END_NAMESPACE_STD |
lib/libcxx/include/ctime+15-1| ... | ... | @@ -52,6 +52,20 @@ int timespec_get( struct timespec *ts, int base); // C++17 |
| 52 | 52 | #pragma GCC system_header |
| 53 | 53 | #endif |
| 54 | 54 | |
| 55 | // FIXME: | |
| 56 | // Apple SDKs don't define ::timespec_get unconditionally in C++ mode. This | |
| 57 | // should be fixed in future SDKs, but for the time being we need to avoid | |
| 58 | // trying to use that declaration when the SDK doesn't provide it. Note that | |
| 59 | // we're detecting this here instead of in <__config> because we can't include | |
| 60 | // system headers from <__config>, since it leads to circular module dependencies. | |
| 61 | // This is also meant to be a very temporary workaround until the SDKs are fixed. | |
| 62 | #if defined(__APPLE__) | |
| 63 | # include <sys/cdefs.h> | |
| 64 | # if defined(_LIBCPP_HAS_TIMESPEC_GET) && (__DARWIN_C_LEVEL < __DARWIN_C_FULL) | |
| 65 | # define _LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED | |
| 66 | # endif | |
| 67 | #endif | |
| 68 | ||
| 55 | 69 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 56 | 70 | |
| 57 | 71 | using ::clock_t; |
| ... | ... | @@ -72,7 +86,7 @@ using ::gmtime; |
| 72 | 86 | using ::localtime; |
| 73 | 87 | #endif |
| 74 | 88 | using ::strftime; |
| 75 | #if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) | |
| 89 | #if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) && !defined(_LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED) | |
| 76 | 90 | using ::timespec_get; |
| 77 | 91 | #endif |
| 78 | 92 |
lib/libcxx/include/deque+8-8| ... | ... | @@ -1237,7 +1237,7 @@ __deque_base<_Tp, _Allocator>::swap(__deque_base& __c) |
| 1237 | 1237 | __map_.swap(__c.__map_); |
| 1238 | 1238 | _VSTD::swap(__start_, __c.__start_); |
| 1239 | 1239 | _VSTD::swap(size(), __c.size()); |
| 1240 | __swap_allocator(__alloc(), __c.__alloc()); | |
| 1240 | _VSTD::__swap_allocator(__alloc(), __c.__alloc()); | |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | template <class _Tp, class _Allocator> |
| ... | ... | @@ -1393,7 +1393,7 @@ public: |
| 1393 | 1393 | size_type size() const _NOEXCEPT {return __base::size();} |
| 1394 | 1394 | _LIBCPP_INLINE_VISIBILITY |
| 1395 | 1395 | size_type max_size() const _NOEXCEPT |
| 1396 | {return std::min<size_type>( | |
| 1396 | {return _VSTD::min<size_type>( | |
| 1397 | 1397 | __alloc_traits::max_size(__base::__alloc()), |
| 1398 | 1398 | numeric_limits<difference_type>::max());} |
| 1399 | 1399 | void resize(size_type __n); |
| ... | ... | @@ -1586,7 +1586,7 @@ public: |
| 1586 | 1586 | |
| 1587 | 1587 | #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES |
| 1588 | 1588 | template<class _InputIterator, |
| 1589 | class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 1589 | class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 1590 | 1590 | class = typename enable_if<__is_allocator<_Alloc>::value, void>::type |
| 1591 | 1591 | > |
| 1592 | 1592 | deque(_InputIterator, _InputIterator) |
| ... | ... | @@ -2376,7 +2376,7 @@ deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l, |
| 2376 | 2376 | for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) { |
| 2377 | 2377 | _ConstructTransaction __tx(this, __br); |
| 2378 | 2378 | for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__f) { |
| 2379 | __alloc_traits::construct(__a, std::__to_address(__tx.__pos_), *__f); | |
| 2379 | __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), *__f); | |
| 2380 | 2380 | } |
| 2381 | 2381 | } |
| 2382 | 2382 | } |
| ... | ... | @@ -2393,7 +2393,7 @@ deque<_Tp, _Allocator>::__append(size_type __n) |
| 2393 | 2393 | for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) { |
| 2394 | 2394 | _ConstructTransaction __tx(this, __br); |
| 2395 | 2395 | for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) { |
| 2396 | __alloc_traits::construct(__a, std::__to_address(__tx.__pos_)); | |
| 2396 | __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_)); | |
| 2397 | 2397 | } |
| 2398 | 2398 | } |
| 2399 | 2399 | } |
| ... | ... | @@ -2410,7 +2410,7 @@ deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v) |
| 2410 | 2410 | for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) { |
| 2411 | 2411 | _ConstructTransaction __tx(this, __br); |
| 2412 | 2412 | for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) { |
| 2413 | __alloc_traits::construct(__a, std::__to_address(__tx.__pos_), __v); | |
| 2413 | __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), __v); | |
| 2414 | 2414 | } |
| 2415 | 2415 | } |
| 2416 | 2416 | |
| ... | ... | @@ -2708,7 +2708,7 @@ void |
| 2708 | 2708 | deque<_Tp, _Allocator>::pop_front() |
| 2709 | 2709 | { |
| 2710 | 2710 | allocator_type& __a = __base::__alloc(); |
| 2711 | __alloc_traits::destroy(__a, __to_address(*(__base::__map_.begin() + | |
| 2711 | __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() + | |
| 2712 | 2712 | __base::__start_ / __base::__block_size) + |
| 2713 | 2713 | __base::__start_ % __base::__block_size)); |
| 2714 | 2714 | --__base::size(); |
| ... | ... | @@ -2723,7 +2723,7 @@ deque<_Tp, _Allocator>::pop_back() |
| 2723 | 2723 | _LIBCPP_ASSERT(!empty(), "deque::pop_back called for empty deque"); |
| 2724 | 2724 | allocator_type& __a = __base::__alloc(); |
| 2725 | 2725 | size_type __p = __base::size() + __base::__start_ - 1; |
| 2726 | __alloc_traits::destroy(__a, __to_address(*(__base::__map_.begin() + | |
| 2726 | __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() + | |
| 2727 | 2727 | __p / __base::__block_size) + |
| 2728 | 2728 | __p % __base::__block_size)); |
| 2729 | 2729 | --__base::size(); |
lib/libcxx/include/exception+2| ... | ... | @@ -77,6 +77,8 @@ template <class E> void rethrow_if_nested(const E& e); |
| 77 | 77 | */ |
| 78 | 78 | |
| 79 | 79 | #include <__config> |
| 80 | #include <__availability> | |
| 81 | #include <__memory/base.h> | |
| 80 | 82 | #include <cstddef> |
| 81 | 83 | #include <cstdlib> |
| 82 | 84 | #include <type_traits> |
lib/libcxx/include/experimental/memory_resource+2-3| ... | ... | @@ -116,7 +116,7 @@ public: |
| 116 | 116 | { return do_is_equal(__other); } |
| 117 | 117 | |
| 118 | 118 | // 8.5.3, memory.resource.priv |
| 119 | protected: | |
| 119 | private: | |
| 120 | 120 | virtual void* do_allocate(size_t, size_t) = 0; |
| 121 | 121 | virtual void do_deallocate(void*, size_t, size_t) = 0; |
| 122 | 122 | virtual bool do_is_equal(memory_resource const &) const _NOEXCEPT = 0; |
| ... | ... | @@ -381,7 +381,7 @@ public: |
| 381 | 381 | { return __alloc_; } |
| 382 | 382 | |
| 383 | 383 | // 8.7.3, memory.resource.adaptor.mem |
| 384 | protected: | |
| 384 | private: | |
| 385 | 385 | virtual void * do_allocate(size_t __bytes, size_t) |
| 386 | 386 | { |
| 387 | 387 | if (__bytes > __max_size()) { |
| ... | ... | @@ -407,7 +407,6 @@ protected: |
| 407 | 407 | return __p ? __alloc_ == __p->__alloc_ : false; |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | private: | |
| 411 | 410 | _LIBCPP_INLINE_VISIBILITY |
| 412 | 411 | size_t __max_size() const _NOEXCEPT { |
| 413 | 412 | return numeric_limits<size_t>::max() - _MaxAlign; |
lib/libcxx/include/experimental/simd+5| ... | ... | @@ -659,6 +659,9 @@ public: |
| 659 | 659 | #pragma GCC system_header |
| 660 | 660 | #endif |
| 661 | 661 | |
| 662 | _LIBCPP_PUSH_MACROS | |
| 663 | #include <__undef_macros> | |
| 664 | ||
| 662 | 665 | _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD |
| 663 | 666 | |
| 664 | 667 | #if _LIBCPP_STD_VER >= 17 |
| ... | ... | @@ -1566,4 +1569,6 @@ public: |
| 1566 | 1569 | |
| 1567 | 1570 | _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD |
| 1568 | 1571 | |
| 1572 | _LIBCPP_POP_MACROS | |
| 1573 | ||
| 1569 | 1574 | #endif /* _LIBCPP_EXPERIMENTAL_SIMD */ |
lib/libcxx/include/ext/hash_map+1-1| ... | ... | @@ -671,7 +671,7 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type& __k) |
| 671 | 671 | __h.get_deleter().__first_constructed = true; |
| 672 | 672 | __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second)); |
| 673 | 673 | __h.get_deleter().__second_constructed = true; |
| 674 | return _LIBCPP_EXPLICIT_MOVE(__h); // explicitly moved for C++03 | |
| 674 | return __h; | |
| 675 | 675 | } |
| 676 | 676 | |
| 677 | 677 | template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> |
lib/libcxx/include/filesystem+346-59| ... | ... | @@ -230,23 +230,31 @@ |
| 230 | 230 | */ |
| 231 | 231 | |
| 232 | 232 | #include <__config> |
| 233 | #include <__availability> | |
| 233 | 234 | #include <cstddef> |
| 234 | 235 | #include <cstdlib> |
| 235 | 236 | #include <chrono> |
| 236 | 237 | #include <iterator> |
| 237 | 238 | #include <iosfwd> |
| 238 | #include <locale> | |
| 239 | 239 | #include <memory> |
| 240 | 240 | #include <stack> |
| 241 | 241 | #include <string> |
| 242 | 242 | #include <system_error> |
| 243 | 243 | #include <utility> |
| 244 | #include <iomanip> // for quoted | |
| 245 | 244 | #include <string_view> |
| 246 | 245 | #include <version> |
| 247 | 246 | |
| 247 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 248 | # include <locale> | |
| 249 | # include <iomanip> // for quoted | |
| 250 | #endif | |
| 251 | ||
| 248 | 252 | #include <__debug> |
| 249 | 253 | |
| 254 | #if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 255 | # error "The Filesystem library is not supported by this configuration of libc++" | |
| 256 | #endif | |
| 257 | ||
| 250 | 258 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 251 | 259 | #pragma GCC system_header |
| 252 | 260 | #endif |
| ... | ... | @@ -543,6 +551,13 @@ struct __can_convert_char<wchar_t> { |
| 543 | 551 | static const bool value = true; |
| 544 | 552 | using __char_type = wchar_t; |
| 545 | 553 | }; |
| 554 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 555 | template <> | |
| 556 | struct __can_convert_char<char8_t> { | |
| 557 | static const bool value = true; | |
| 558 | using __char_type = char8_t; | |
| 559 | }; | |
| 560 | #endif | |
| 546 | 561 | template <> |
| 547 | 562 | struct __can_convert_char<char16_t> { |
| 548 | 563 | static const bool value = true; |
| ... | ... | @@ -557,10 +572,20 @@ struct __can_convert_char<char32_t> { |
| 557 | 572 | template <class _ECharT> |
| 558 | 573 | typename enable_if<__can_convert_char<_ECharT>::value, bool>::type |
| 559 | 574 | __is_separator(_ECharT __e) { |
| 575 | #if defined(_LIBCPP_WIN32API) | |
| 576 | return __e == _ECharT('/') || __e == _ECharT('\\'); | |
| 577 | #else | |
| 560 | 578 | return __e == _ECharT('/'); |
| 579 | #endif | |
| 561 | 580 | } |
| 562 | 581 | |
| 563 | struct _NullSentinal {}; | |
| 582 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 583 | typedef u8string __u8_string; | |
| 584 | #else | |
| 585 | typedef string __u8_string; | |
| 586 | #endif | |
| 587 | ||
| 588 | struct _NullSentinel {}; | |
| 564 | 589 | |
| 565 | 590 | template <class _Tp> |
| 566 | 591 | using _Void = void; |
| ... | ... | @@ -615,9 +640,9 @@ struct __is_pathable_char_array<_Source, _ECharT*, _UPtr, true> |
| 615 | 640 | static _ECharT const* __range_begin(const _ECharT* __b) { return __b; } |
| 616 | 641 | static _ECharT const* __range_end(const _ECharT* __b) { |
| 617 | 642 | using _Iter = const _ECharT*; |
| 618 | const _ECharT __sentinal = _ECharT{}; | |
| 643 | const _ECharT __sentinel = _ECharT{}; | |
| 619 | 644 | _Iter __e = __b; |
| 620 | for (; *__e != __sentinal; ++__e) | |
| 645 | for (; *__e != __sentinel; ++__e) | |
| 621 | 646 | ; |
| 622 | 647 | return __e; |
| 623 | 648 | } |
| ... | ... | @@ -639,7 +664,7 @@ struct __is_pathable_iter< |
| 639 | 664 | using _Base = __can_convert_char<_ECharT>; |
| 640 | 665 | |
| 641 | 666 | static _Iter __range_begin(_Iter __b) { return __b; } |
| 642 | static _NullSentinal __range_end(_Iter) { return _NullSentinal{}; } | |
| 667 | static _NullSentinel __range_end(_Iter) { return _NullSentinel{}; } | |
| 643 | 668 | |
| 644 | 669 | static _ECharT __first_or_null(_Iter __b) { return *__b; } |
| 645 | 670 | }; |
| ... | ... | @@ -661,80 +686,219 @@ struct __is_pathable<_Tp, false, true, false> : __is_pathable_char_array<_Tp> { |
| 661 | 686 | template <class _Tp> |
| 662 | 687 | struct __is_pathable<_Tp, false, false, true> : __is_pathable_iter<_Tp> {}; |
| 663 | 688 | |
| 689 | #if defined(_LIBCPP_WIN32API) | |
| 690 | typedef wstring __path_string; | |
| 691 | typedef wchar_t __path_value; | |
| 692 | #else | |
| 693 | typedef string __path_string; | |
| 694 | typedef char __path_value; | |
| 695 | #endif | |
| 696 | ||
| 697 | #if defined(_LIBCPP_WIN32API) | |
| 698 | _LIBCPP_FUNC_VIS | |
| 699 | size_t __wide_to_char(const wstring&, char*, size_t); | |
| 700 | _LIBCPP_FUNC_VIS | |
| 701 | size_t __char_to_wide(const string&, wchar_t*, size_t); | |
| 702 | #endif | |
| 703 | ||
| 704 | template <class _ECharT> | |
| 705 | struct _PathCVT; | |
| 706 | ||
| 707 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 664 | 708 | template <class _ECharT> |
| 665 | 709 | struct _PathCVT { |
| 666 | 710 | static_assert(__can_convert_char<_ECharT>::value, |
| 667 | 711 | "Char type not convertible"); |
| 668 | 712 | |
| 669 | 713 | typedef __narrow_to_utf8<sizeof(_ECharT) * __CHAR_BIT__> _Narrower; |
| 714 | #if defined(_LIBCPP_WIN32API) | |
| 715 | typedef __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__> _Widener; | |
| 716 | #endif | |
| 670 | 717 | |
| 671 | static void __append_range(string& __dest, _ECharT const* __b, | |
| 718 | static void __append_range(__path_string& __dest, _ECharT const* __b, | |
| 672 | 719 | _ECharT const* __e) { |
| 720 | #if defined(_LIBCPP_WIN32API) | |
| 721 | string __utf8; | |
| 722 | _Narrower()(back_inserter(__utf8), __b, __e); | |
| 723 | _Widener()(back_inserter(__dest), __utf8.data(), __utf8.data() + __utf8.size()); | |
| 724 | #else | |
| 673 | 725 | _Narrower()(back_inserter(__dest), __b, __e); |
| 726 | #endif | |
| 674 | 727 | } |
| 675 | 728 | |
| 676 | 729 | template <class _Iter> |
| 677 | static void __append_range(string& __dest, _Iter __b, _Iter __e) { | |
| 730 | static void __append_range(__path_string& __dest, _Iter __b, _Iter __e) { | |
| 678 | 731 | static_assert(!is_same<_Iter, _ECharT*>::value, "Call const overload"); |
| 679 | 732 | if (__b == __e) |
| 680 | 733 | return; |
| 681 | 734 | basic_string<_ECharT> __tmp(__b, __e); |
| 735 | #if defined(_LIBCPP_WIN32API) | |
| 736 | string __utf8; | |
| 737 | _Narrower()(back_inserter(__utf8), __tmp.data(), | |
| 738 | __tmp.data() + __tmp.length()); | |
| 739 | _Widener()(back_inserter(__dest), __utf8.data(), __utf8.data() + __utf8.size()); | |
| 740 | #else | |
| 682 | 741 | _Narrower()(back_inserter(__dest), __tmp.data(), |
| 683 | 742 | __tmp.data() + __tmp.length()); |
| 743 | #endif | |
| 684 | 744 | } |
| 685 | 745 | |
| 686 | 746 | template <class _Iter> |
| 687 | static void __append_range(string& __dest, _Iter __b, _NullSentinal) { | |
| 747 | static void __append_range(__path_string& __dest, _Iter __b, _NullSentinel) { | |
| 688 | 748 | static_assert(!is_same<_Iter, _ECharT*>::value, "Call const overload"); |
| 689 | const _ECharT __sentinal = _ECharT{}; | |
| 690 | if (*__b == __sentinal) | |
| 749 | const _ECharT __sentinel = _ECharT{}; | |
| 750 | if (*__b == __sentinel) | |
| 691 | 751 | return; |
| 692 | 752 | basic_string<_ECharT> __tmp; |
| 693 | for (; *__b != __sentinal; ++__b) | |
| 753 | for (; *__b != __sentinel; ++__b) | |
| 694 | 754 | __tmp.push_back(*__b); |
| 755 | #if defined(_LIBCPP_WIN32API) | |
| 756 | string __utf8; | |
| 757 | _Narrower()(back_inserter(__utf8), __tmp.data(), | |
| 758 | __tmp.data() + __tmp.length()); | |
| 759 | _Widener()(back_inserter(__dest), __utf8.data(), __utf8.data() + __utf8.size()); | |
| 760 | #else | |
| 695 | 761 | _Narrower()(back_inserter(__dest), __tmp.data(), |
| 696 | 762 | __tmp.data() + __tmp.length()); |
| 763 | #endif | |
| 697 | 764 | } |
| 698 | 765 | |
| 699 | 766 | template <class _Source> |
| 700 | static void __append_source(string& __dest, _Source const& __s) { | |
| 767 | static void __append_source(__path_string& __dest, _Source const& __s) { | |
| 701 | 768 | using _Traits = __is_pathable<_Source>; |
| 702 | 769 | __append_range(__dest, _Traits::__range_begin(__s), |
| 703 | 770 | _Traits::__range_end(__s)); |
| 704 | 771 | } |
| 705 | 772 | }; |
| 773 | #endif // !_LIBCPP_HAS_NO_LOCALIZATION | |
| 706 | 774 | |
| 707 | 775 | template <> |
| 708 | struct _PathCVT<char> { | |
| 776 | struct _PathCVT<__path_value> { | |
| 709 | 777 | |
| 710 | 778 | template <class _Iter> |
| 711 | 779 | static typename enable_if<__is_exactly_cpp17_input_iterator<_Iter>::value>::type |
| 712 | __append_range(string& __dest, _Iter __b, _Iter __e) { | |
| 780 | __append_range(__path_string& __dest, _Iter __b, _Iter __e) { | |
| 713 | 781 | for (; __b != __e; ++__b) |
| 714 | 782 | __dest.push_back(*__b); |
| 715 | 783 | } |
| 716 | 784 | |
| 717 | 785 | template <class _Iter> |
| 718 | 786 | static typename enable_if<__is_cpp17_forward_iterator<_Iter>::value>::type |
| 719 | __append_range(string& __dest, _Iter __b, _Iter __e) { | |
| 787 | __append_range(__path_string& __dest, _Iter __b, _Iter __e) { | |
| 720 | 788 | __dest.__append_forward_unsafe(__b, __e); |
| 721 | 789 | } |
| 722 | 790 | |
| 723 | 791 | template <class _Iter> |
| 724 | static void __append_range(string& __dest, _Iter __b, _NullSentinal) { | |
| 725 | const char __sentinal = char{}; | |
| 726 | for (; *__b != __sentinal; ++__b) | |
| 792 | static void __append_range(__path_string& __dest, _Iter __b, _NullSentinel) { | |
| 793 | const char __sentinel = char{}; | |
| 794 | for (; *__b != __sentinel; ++__b) | |
| 727 | 795 | __dest.push_back(*__b); |
| 728 | 796 | } |
| 729 | 797 | |
| 730 | 798 | template <class _Source> |
| 731 | static void __append_source(string& __dest, _Source const& __s) { | |
| 799 | static void __append_source(__path_string& __dest, _Source const& __s) { | |
| 800 | using _Traits = __is_pathable<_Source>; | |
| 801 | __append_range(__dest, _Traits::__range_begin(__s), | |
| 802 | _Traits::__range_end(__s)); | |
| 803 | } | |
| 804 | }; | |
| 805 | ||
| 806 | #if defined(_LIBCPP_WIN32API) | |
| 807 | template <> | |
| 808 | struct _PathCVT<char> { | |
| 809 | ||
| 810 | static void | |
| 811 | __append_string(__path_string& __dest, const basic_string<char> &__str) { | |
| 812 | size_t __size = __char_to_wide(__str, nullptr, 0); | |
| 813 | size_t __pos = __dest.size(); | |
| 814 | __dest.resize(__pos + __size); | |
| 815 | __char_to_wide(__str, const_cast<__path_value*>(__dest.data()) + __pos, __size); | |
| 816 | } | |
| 817 | ||
| 818 | template <class _Iter> | |
| 819 | static typename enable_if<__is_exactly_cpp17_input_iterator<_Iter>::value>::type | |
| 820 | __append_range(__path_string& __dest, _Iter __b, _Iter __e) { | |
| 821 | basic_string<char> __tmp(__b, __e); | |
| 822 | __append_string(__dest, __tmp); | |
| 823 | } | |
| 824 | ||
| 825 | template <class _Iter> | |
| 826 | static typename enable_if<__is_cpp17_forward_iterator<_Iter>::value>::type | |
| 827 | __append_range(__path_string& __dest, _Iter __b, _Iter __e) { | |
| 828 | basic_string<char> __tmp(__b, __e); | |
| 829 | __append_string(__dest, __tmp); | |
| 830 | } | |
| 831 | ||
| 832 | template <class _Iter> | |
| 833 | static void __append_range(__path_string& __dest, _Iter __b, _NullSentinel) { | |
| 834 | const char __sentinel = char{}; | |
| 835 | basic_string<char> __tmp; | |
| 836 | for (; *__b != __sentinel; ++__b) | |
| 837 | __tmp.push_back(*__b); | |
| 838 | __append_string(__dest, __tmp); | |
| 839 | } | |
| 840 | ||
| 841 | template <class _Source> | |
| 842 | static void __append_source(__path_string& __dest, _Source const& __s) { | |
| 732 | 843 | using _Traits = __is_pathable<_Source>; |
| 733 | 844 | __append_range(__dest, _Traits::__range_begin(__s), |
| 734 | 845 | _Traits::__range_end(__s)); |
| 735 | 846 | } |
| 736 | 847 | }; |
| 737 | 848 | |
| 849 | template <class _ECharT> | |
| 850 | struct _PathExport { | |
| 851 | typedef __narrow_to_utf8<sizeof(wchar_t) * __CHAR_BIT__> _Narrower; | |
| 852 | typedef __widen_from_utf8<sizeof(_ECharT) * __CHAR_BIT__> _Widener; | |
| 853 | ||
| 854 | template <class _Str> | |
| 855 | static void __append(_Str& __dest, const __path_string& __src) { | |
| 856 | string __utf8; | |
| 857 | _Narrower()(back_inserter(__utf8), __src.data(), __src.data() + __src.size()); | |
| 858 | _Widener()(back_inserter(__dest), __utf8.data(), __utf8.data() + __utf8.size()); | |
| 859 | } | |
| 860 | }; | |
| 861 | ||
| 862 | template <> | |
| 863 | struct _PathExport<char> { | |
| 864 | template <class _Str> | |
| 865 | static void __append(_Str& __dest, const __path_string& __src) { | |
| 866 | size_t __size = __wide_to_char(__src, nullptr, 0); | |
| 867 | size_t __pos = __dest.size(); | |
| 868 | __dest.resize(__size); | |
| 869 | __wide_to_char(__src, const_cast<char*>(__dest.data()) + __pos, __size); | |
| 870 | } | |
| 871 | }; | |
| 872 | ||
| 873 | template <> | |
| 874 | struct _PathExport<wchar_t> { | |
| 875 | template <class _Str> | |
| 876 | static void __append(_Str& __dest, const __path_string& __src) { | |
| 877 | __dest.append(__src.begin(), __src.end()); | |
| 878 | } | |
| 879 | }; | |
| 880 | ||
| 881 | template <> | |
| 882 | struct _PathExport<char16_t> { | |
| 883 | template <class _Str> | |
| 884 | static void __append(_Str& __dest, const __path_string& __src) { | |
| 885 | __dest.append(__src.begin(), __src.end()); | |
| 886 | } | |
| 887 | }; | |
| 888 | ||
| 889 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 890 | template <> | |
| 891 | struct _PathExport<char8_t> { | |
| 892 | typedef __narrow_to_utf8<sizeof(wchar_t) * __CHAR_BIT__> _Narrower; | |
| 893 | ||
| 894 | template <class _Str> | |
| 895 | static void __append(_Str& __dest, const __path_string& __src) { | |
| 896 | _Narrower()(back_inserter(__dest), __src.data(), __src.data() + __src.size()); | |
| 897 | } | |
| 898 | }; | |
| 899 | #endif /* !_LIBCPP_NO_HAS_CHAR8_T */ | |
| 900 | #endif /* _LIBCPP_WIN32API */ | |
| 901 | ||
| 738 | 902 | class _LIBCPP_TYPE_VIS path { |
| 739 | 903 | template <class _SourceOrIter, class _Tp = path&> |
| 740 | 904 | using _EnableIfPathable = |
| ... | ... | @@ -747,10 +911,15 @@ class _LIBCPP_TYPE_VIS path { |
| 747 | 911 | using _SourceCVT = _PathCVT<_SourceChar<_Tp> >; |
| 748 | 912 | |
| 749 | 913 | public: |
| 914 | #if defined(_LIBCPP_WIN32API) | |
| 915 | typedef wchar_t value_type; | |
| 916 | static constexpr value_type preferred_separator = L'\\'; | |
| 917 | #else | |
| 750 | 918 | typedef char value_type; |
| 751 | typedef basic_string<value_type> string_type; | |
| 752 | typedef _VSTD::string_view __string_view; | |
| 753 | 919 | static constexpr value_type preferred_separator = '/'; |
| 920 | #endif | |
| 921 | typedef basic_string<value_type> string_type; | |
| 922 | typedef basic_string_view<value_type> __string_view; | |
| 754 | 923 | |
| 755 | 924 | enum class _LIBCPP_ENUM_VIS format : unsigned char { |
| 756 | 925 | auto_format, |
| ... | ... | @@ -779,12 +948,14 @@ public: |
| 779 | 948 | _PathCVT<_ItVal>::__append_range(__pn_, __first, __last); |
| 780 | 949 | } |
| 781 | 950 | |
| 951 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 782 | 952 | // TODO Implement locale conversions. |
| 783 | 953 | template <class _Source, class = _EnableIfPathable<_Source, void> > |
| 784 | 954 | path(const _Source& __src, const locale& __loc, format = format::auto_format); |
| 785 | 955 | template <class _InputIt> |
| 786 | 956 | path(_InputIt __first, _InputIt _last, const locale& __loc, |
| 787 | 957 | format = format::auto_format); |
| 958 | #endif | |
| 788 | 959 | |
| 789 | 960 | _LIBCPP_INLINE_VISIBILITY |
| 790 | 961 | ~path() = default; |
| ... | ... | @@ -922,9 +1093,8 @@ public: |
| 922 | 1093 | template <class _ECharT> |
| 923 | 1094 | typename enable_if<__can_convert_char<_ECharT>::value, path&>::type |
| 924 | 1095 | operator+=(_ECharT __x) { |
| 925 | basic_string<_ECharT> __tmp; | |
| 926 | __tmp += __x; | |
| 927 | _PathCVT<_ECharT>::__append_source(__pn_, __tmp); | |
| 1096 | _PathCVT<_ECharT>::__append_source(__pn_, | |
| 1097 | basic_string_view<_ECharT>(&__x, 1)); | |
| 928 | 1098 | return *this; |
| 929 | 1099 | } |
| 930 | 1100 | |
| ... | ... | @@ -950,7 +1120,12 @@ public: |
| 950 | 1120 | _LIBCPP_INLINE_VISIBILITY |
| 951 | 1121 | void clear() noexcept { __pn_.clear(); } |
| 952 | 1122 | |
| 953 | path& make_preferred() { return *this; } | |
| 1123 | path& make_preferred() { | |
| 1124 | #if defined(_LIBCPP_WIN32API) | |
| 1125 | _VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\'); | |
| 1126 | #endif | |
| 1127 | return *this; | |
| 1128 | } | |
| 954 | 1129 | |
| 955 | 1130 | _LIBCPP_INLINE_VISIBILITY |
| 956 | 1131 | path& remove_filename() { |
| ... | ... | @@ -983,6 +1158,64 @@ public: |
| 983 | 1158 | |
| 984 | 1159 | _LIBCPP_INLINE_VISIBILITY operator string_type() const { return __pn_; } |
| 985 | 1160 | |
| 1161 | #if defined(_LIBCPP_WIN32API) | |
| 1162 | _LIBCPP_INLINE_VISIBILITY _VSTD::wstring wstring() const { return __pn_; } | |
| 1163 | ||
| 1164 | _VSTD::wstring generic_wstring() const { return __pn_; } | |
| 1165 | ||
| 1166 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 1167 | template <class _ECharT, class _Traits = char_traits<_ECharT>, | |
| 1168 | class _Allocator = allocator<_ECharT> > | |
| 1169 | basic_string<_ECharT, _Traits, _Allocator> | |
| 1170 | string(const _Allocator& __a = _Allocator()) const { | |
| 1171 | using _Str = basic_string<_ECharT, _Traits, _Allocator>; | |
| 1172 | _Str __s(__a); | |
| 1173 | __s.reserve(__pn_.size()); | |
| 1174 | _PathExport<_ECharT>::__append(__s, __pn_); | |
| 1175 | return __s; | |
| 1176 | } | |
| 1177 | ||
| 1178 | _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { | |
| 1179 | return string<char>(); | |
| 1180 | } | |
| 1181 | _LIBCPP_INLINE_VISIBILITY __u8_string u8string() const { | |
| 1182 | using _CVT = __narrow_to_utf8<sizeof(wchar_t) * __CHAR_BIT__>; | |
| 1183 | __u8_string __s; | |
| 1184 | __s.reserve(__pn_.size()); | |
| 1185 | _CVT()(back_inserter(__s), __pn_.data(), __pn_.data() + __pn_.size()); | |
| 1186 | return __s; | |
| 1187 | } | |
| 1188 | ||
| 1189 | _LIBCPP_INLINE_VISIBILITY _VSTD::u16string u16string() const { | |
| 1190 | return string<char16_t>(); | |
| 1191 | } | |
| 1192 | _LIBCPP_INLINE_VISIBILITY _VSTD::u32string u32string() const { | |
| 1193 | return string<char32_t>(); | |
| 1194 | } | |
| 1195 | ||
| 1196 | // generic format observers | |
| 1197 | template <class _ECharT, class _Traits = char_traits<_ECharT>, | |
| 1198 | class _Allocator = allocator<_ECharT> > | |
| 1199 | basic_string<_ECharT, _Traits, _Allocator> | |
| 1200 | generic_string(const _Allocator& __a = _Allocator()) const { | |
| 1201 | return string<_ECharT, _Traits, _Allocator>(__a); | |
| 1202 | } | |
| 1203 | ||
| 1204 | _VSTD::string generic_string() const { return generic_string<char>(); } | |
| 1205 | _VSTD::u16string generic_u16string() const { return generic_string<char16_t>(); } | |
| 1206 | _VSTD::u32string generic_u32string() const { return generic_string<char32_t>(); } | |
| 1207 | __u8_string generic_u8string() const { return u8string(); } | |
| 1208 | #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */ | |
| 1209 | #else /* _LIBCPP_WIN32API */ | |
| 1210 | ||
| 1211 | _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { return __pn_; } | |
| 1212 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1213 | _LIBCPP_INLINE_VISIBILITY _VSTD::u8string u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } | |
| 1214 | #else | |
| 1215 | _LIBCPP_INLINE_VISIBILITY _VSTD::string u8string() const { return __pn_; } | |
| 1216 | #endif | |
| 1217 | ||
| 1218 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 986 | 1219 | template <class _ECharT, class _Traits = char_traits<_ECharT>, |
| 987 | 1220 | class _Allocator = allocator<_ECharT> > |
| 988 | 1221 | basic_string<_ECharT, _Traits, _Allocator> |
| ... | ... | @@ -995,19 +1228,26 @@ public: |
| 995 | 1228 | return __s; |
| 996 | 1229 | } |
| 997 | 1230 | |
| 998 | _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; } | |
| 999 | _LIBCPP_INLINE_VISIBILITY std::wstring wstring() const { | |
| 1231 | _LIBCPP_INLINE_VISIBILITY _VSTD::wstring wstring() const { | |
| 1000 | 1232 | return string<wchar_t>(); |
| 1001 | 1233 | } |
| 1002 | _LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; } | |
| 1003 | _LIBCPP_INLINE_VISIBILITY std::u16string u16string() const { | |
| 1234 | _LIBCPP_INLINE_VISIBILITY _VSTD::u16string u16string() const { | |
| 1004 | 1235 | return string<char16_t>(); |
| 1005 | 1236 | } |
| 1006 | _LIBCPP_INLINE_VISIBILITY std::u32string u32string() const { | |
| 1237 | _LIBCPP_INLINE_VISIBILITY _VSTD::u32string u32string() const { | |
| 1007 | 1238 | return string<char32_t>(); |
| 1008 | 1239 | } |
| 1240 | #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */ | |
| 1009 | 1241 | |
| 1010 | 1242 | // generic format observers |
| 1243 | _VSTD::string generic_string() const { return __pn_; } | |
| 1244 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1245 | _VSTD::u8string generic_u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } | |
| 1246 | #else | |
| 1247 | _VSTD::string generic_u8string() const { return __pn_; } | |
| 1248 | #endif | |
| 1249 | ||
| 1250 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 1011 | 1251 | template <class _ECharT, class _Traits = char_traits<_ECharT>, |
| 1012 | 1252 | class _Allocator = allocator<_ECharT> > |
| 1013 | 1253 | basic_string<_ECharT, _Traits, _Allocator> |
| ... | ... | @@ -1015,11 +1255,11 @@ public: |
| 1015 | 1255 | return string<_ECharT, _Traits, _Allocator>(__a); |
| 1016 | 1256 | } |
| 1017 | 1257 | |
| 1018 | std::string generic_string() const { return __pn_; } | |
| 1019 | std::wstring generic_wstring() const { return string<wchar_t>(); } | |
| 1020 | std::string generic_u8string() const { return __pn_; } | |
| 1021 | std::u16string generic_u16string() const { return string<char16_t>(); } | |
| 1022 | std::u32string generic_u32string() const { return string<char32_t>(); } | |
| 1258 | _VSTD::wstring generic_wstring() const { return string<wchar_t>(); } | |
| 1259 | _VSTD::u16string generic_u16string() const { return string<char16_t>(); } | |
| 1260 | _VSTD::u32string generic_u32string() const { return string<char32_t>(); } | |
| 1261 | #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */ | |
| 1262 | #endif /* !_LIBCPP_WIN32API */ | |
| 1023 | 1263 | |
| 1024 | 1264 | private: |
| 1025 | 1265 | int __compare(__string_view) const; |
| ... | ... | @@ -1123,23 +1363,24 @@ public: |
| 1123 | 1363 | iterator begin() const; |
| 1124 | 1364 | iterator end() const; |
| 1125 | 1365 | |
| 1366 | #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 1126 | 1367 | template <class _CharT, class _Traits> |
| 1127 | 1368 | _LIBCPP_INLINE_VISIBILITY friend |
| 1128 | typename enable_if<is_same<_CharT, char>::value && | |
| 1129 | is_same<_Traits, char_traits<char> >::value, | |
| 1369 | typename enable_if<is_same<_CharT, value_type>::value && | |
| 1370 | is_same<_Traits, char_traits<value_type> >::value, | |
| 1130 | 1371 | basic_ostream<_CharT, _Traits>&>::type |
| 1131 | 1372 | operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { |
| 1132 | __os << std::__quoted(__p.native()); | |
| 1373 | __os << _VSTD::__quoted(__p.native()); | |
| 1133 | 1374 | return __os; |
| 1134 | 1375 | } |
| 1135 | 1376 | |
| 1136 | 1377 | template <class _CharT, class _Traits> |
| 1137 | 1378 | _LIBCPP_INLINE_VISIBILITY friend |
| 1138 | typename enable_if<!is_same<_CharT, char>::value || | |
| 1139 | !is_same<_Traits, char_traits<char> >::value, | |
| 1379 | typename enable_if<!is_same<_CharT, value_type>::value || | |
| 1380 | !is_same<_Traits, char_traits<value_type> >::value, | |
| 1140 | 1381 | basic_ostream<_CharT, _Traits>&>::type |
| 1141 | 1382 | operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { |
| 1142 | __os << std::__quoted(__p.string<_CharT, _Traits>()); | |
| 1383 | __os << _VSTD::__quoted(__p.string<_CharT, _Traits>()); | |
| 1143 | 1384 | return __os; |
| 1144 | 1385 | } |
| 1145 | 1386 | |
| ... | ... | @@ -1151,6 +1392,7 @@ public: |
| 1151 | 1392 | __p = __tmp; |
| 1152 | 1393 | return __is; |
| 1153 | 1394 | } |
| 1395 | #endif // !_LIBCPP_HAS_NO_LOCALIZATION | |
| 1154 | 1396 | |
| 1155 | 1397 | friend _LIBCPP_INLINE_VISIBILITY bool operator==(const path& __lhs, const path& __rhs) noexcept { |
| 1156 | 1398 | return __lhs.compare(__rhs) == 0; |
| ... | ... | @@ -1193,25 +1435,70 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(path& __lhs, path& __rhs) noexcept { |
| 1193 | 1435 | _LIBCPP_FUNC_VIS |
| 1194 | 1436 | size_t hash_value(const path& __p) noexcept; |
| 1195 | 1437 | |
| 1196 | template <class _Source> | |
| 1197 | _LIBCPP_INLINE_VISIBILITY | |
| 1198 | typename enable_if<__is_pathable<_Source>::value, path>::type | |
| 1199 | u8path(const _Source& __s) { | |
| 1438 | template <class _InputIt> | |
| 1439 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T | |
| 1440 | typename enable_if<__is_pathable<_InputIt>::value, path>::type | |
| 1441 | u8path(_InputIt __f, _InputIt __l) { | |
| 1200 | 1442 | static_assert( |
| 1201 | is_same<typename __is_pathable<_Source>::__char_type, char>::value, | |
| 1202 | "u8path(Source const&) requires Source have a character type of type " | |
| 1203 | "'char'"); | |
| 1204 | return path(__s); | |
| 1443 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1444 | is_same<typename __is_pathable<_InputIt>::__char_type, char8_t>::value || | |
| 1445 | #endif | |
| 1446 | is_same<typename __is_pathable<_InputIt>::__char_type, char>::value, | |
| 1447 | "u8path(Iter, Iter) requires Iter have a value_type of type 'char'" | |
| 1448 | " or 'char8_t'"); | |
| 1449 | #if defined(_LIBCPP_WIN32API) | |
| 1450 | string __tmp(__f, __l); | |
| 1451 | using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>; | |
| 1452 | _VSTD::wstring __w; | |
| 1453 | __w.reserve(__tmp.size()); | |
| 1454 | _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size()); | |
| 1455 | return path(__w); | |
| 1456 | #else | |
| 1457 | return path(__f, __l); | |
| 1458 | #endif /* !_LIBCPP_WIN32API */ | |
| 1205 | 1459 | } |
| 1206 | 1460 | |
| 1461 | #if defined(_LIBCPP_WIN32API) | |
| 1207 | 1462 | template <class _InputIt> |
| 1208 | _LIBCPP_INLINE_VISIBILITY | |
| 1463 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T | |
| 1209 | 1464 | typename enable_if<__is_pathable<_InputIt>::value, path>::type |
| 1210 | u8path(_InputIt __f, _InputIt __l) { | |
| 1465 | u8path(_InputIt __f, _NullSentinel) { | |
| 1211 | 1466 | static_assert( |
| 1467 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1468 | is_same<typename __is_pathable<_InputIt>::__char_type, char8_t>::value || | |
| 1469 | #endif | |
| 1212 | 1470 | is_same<typename __is_pathable<_InputIt>::__char_type, char>::value, |
| 1213 | "u8path(Iter, Iter) requires Iter have a value_type of type 'char'"); | |
| 1214 | return path(__f, __l); | |
| 1471 | "u8path(Iter, Iter) requires Iter have a value_type of type 'char'" | |
| 1472 | " or 'char8_t'"); | |
| 1473 | string __tmp; | |
| 1474 | const char __sentinel = char{}; | |
| 1475 | for (; *__f != __sentinel; ++__f) | |
| 1476 | __tmp.push_back(*__f); | |
| 1477 | using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>; | |
| 1478 | _VSTD::wstring __w; | |
| 1479 | __w.reserve(__tmp.size()); | |
| 1480 | _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size()); | |
| 1481 | return path(__w); | |
| 1482 | } | |
| 1483 | #endif /* _LIBCPP_WIN32API */ | |
| 1484 | ||
| 1485 | template <class _Source> | |
| 1486 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T | |
| 1487 | typename enable_if<__is_pathable<_Source>::value, path>::type | |
| 1488 | u8path(const _Source& __s) { | |
| 1489 | static_assert( | |
| 1490 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1491 | is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value || | |
| 1492 | #endif | |
| 1493 | is_same<typename __is_pathable<_Source>::__char_type, char>::value, | |
| 1494 | "u8path(Source const&) requires Source have a character type of type " | |
| 1495 | "'char' or 'char8_t'"); | |
| 1496 | #if defined(_LIBCPP_WIN32API) | |
| 1497 | using _Traits = __is_pathable<_Source>; | |
| 1498 | return u8path(__unwrap_iter(_Traits::__range_begin(__s)), __unwrap_iter(_Traits::__range_end(__s))); | |
| 1499 | #else | |
| 1500 | return path(__s); | |
| 1501 | #endif | |
| 1215 | 1502 | } |
| 1216 | 1503 | |
| 1217 | 1504 | class _LIBCPP_TYPE_VIS path::iterator { |
| ... | ... | @@ -1230,7 +1517,7 @@ public: |
| 1230 | 1517 | typedef bidirectional_iterator_tag iterator_category; |
| 1231 | 1518 | |
| 1232 | 1519 | typedef path value_type; |
| 1233 | typedef std::ptrdiff_t difference_type; | |
| 1520 | typedef ptrdiff_t difference_type; | |
| 1234 | 1521 | typedef const path* pointer; |
| 1235 | 1522 | typedef const path& reference; |
| 1236 | 1523 | |
| ... | ... | @@ -1374,7 +1661,7 @@ template <class... _Args> |
| 1374 | 1661 | _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY |
| 1375 | 1662 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 1376 | 1663 | void __throw_filesystem_error(_Args&&... __args) { |
| 1377 | throw filesystem_error(std::forward<_Args>(__args)...); | |
| 1664 | throw filesystem_error(_VSTD::forward<_Args>(__args)...); | |
| 1378 | 1665 | } |
| 1379 | 1666 | #else |
| 1380 | 1667 | void __throw_filesystem_error(_Args&&...) { |
| ... | ... | @@ -2204,7 +2491,7 @@ private: |
| 2204 | 2491 | |
| 2205 | 2492 | _LIBCPP_INLINE_VISIBILITY |
| 2206 | 2493 | void __assign_iter_entry(_Path&& __p, __cached_data __dt) { |
| 2207 | __p_ = std::move(__p); | |
| 2494 | __p_ = _VSTD::move(__p); | |
| 2208 | 2495 | __data_ = __dt; |
| 2209 | 2496 | } |
| 2210 | 2497 | |
| ... | ... | @@ -2505,10 +2792,10 @@ end(const directory_iterator&) noexcept { |
| 2505 | 2792 | class recursive_directory_iterator { |
| 2506 | 2793 | public: |
| 2507 | 2794 | using value_type = directory_entry; |
| 2508 | using difference_type = std::ptrdiff_t; | |
| 2795 | using difference_type = ptrdiff_t; | |
| 2509 | 2796 | using pointer = directory_entry const*; |
| 2510 | 2797 | using reference = directory_entry const&; |
| 2511 | using iterator_category = std::input_iterator_tag; | |
| 2798 | using iterator_category = input_iterator_tag; | |
| 2512 | 2799 | |
| 2513 | 2800 | public: |
| 2514 | 2801 | // constructors and destructor |
lib/libcxx/include/forward_list+3-3| ... | ... | @@ -603,7 +603,7 @@ __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x) |
| 603 | 603 | __is_nothrow_swappable<__node_allocator>::value) |
| 604 | 604 | #endif |
| 605 | 605 | { |
| 606 | __swap_allocator(__alloc(), __x.__alloc(), | |
| 606 | _VSTD::__swap_allocator(__alloc(), __x.__alloc(), | |
| 607 | 607 | integral_constant<bool, __node_traits::propagate_on_container_swap::value>()); |
| 608 | 608 | using _VSTD::swap; |
| 609 | 609 | swap(__before_begin()->__next_, __x.__before_begin()->__next_); |
| ... | ... | @@ -758,7 +758,7 @@ public: |
| 758 | 758 | {return base::__before_begin()->__next_ == nullptr;} |
| 759 | 759 | _LIBCPP_INLINE_VISIBILITY |
| 760 | 760 | size_type max_size() const _NOEXCEPT { |
| 761 | return std::min<size_type>( | |
| 761 | return _VSTD::min<size_type>( | |
| 762 | 762 | __node_traits::max_size(base::__alloc()), |
| 763 | 763 | numeric_limits<difference_type>::max()); |
| 764 | 764 | } |
| ... | ... | @@ -871,7 +871,7 @@ private: |
| 871 | 871 | |
| 872 | 872 | #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES |
| 873 | 873 | template<class _InputIterator, |
| 874 | class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 874 | class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 875 | 875 | class = typename enable_if<__is_allocator<_Alloc>::value, void>::type |
| 876 | 876 | > |
| 877 | 877 | forward_list(_InputIterator, _InputIterator) |
lib/libcxx/include/fstream+83-72| ... | ... | @@ -180,12 +180,16 @@ typedef basic_fstream<wchar_t> wfstream; |
| 180 | 180 | */ |
| 181 | 181 | |
| 182 | 182 | #include <__config> |
| 183 | #include <__availability> | |
| 183 | 184 | #include <ostream> |
| 184 | 185 | #include <istream> |
| 185 | 186 | #include <__locale> |
| 186 | 187 | #include <cstdio> |
| 187 | 188 | #include <cstdlib> |
| 188 | #include <filesystem> | |
| 189 | ||
| 190 | #if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 191 | # include <filesystem> | |
| 192 | #endif | |
| 189 | 193 | |
| 190 | 194 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 191 | 195 | #pragma GCC system_header |
| ... | ... | @@ -234,13 +238,13 @@ public: |
| 234 | 238 | _LIBCPP_INLINE_VISIBILITY |
| 235 | 239 | basic_filebuf* open(const string& __s, ios_base::openmode __mode); |
| 236 | 240 | |
| 237 | #if _LIBCPP_STD_VER >= 17 | |
| 241 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 238 | 242 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 239 | 243 | basic_filebuf* open(const _VSTD_FS::path& __p, ios_base::openmode __mode) { |
| 240 | 244 | return open(__p.c_str(), __mode); |
| 241 | 245 | } |
| 242 | 246 | #endif |
| 243 | _LIBCPP_INLINE_VISIBILITY | |
| 247 | inline _LIBCPP_INLINE_VISIBILITY | |
| 244 | 248 | basic_filebuf* __open(int __fd, ios_base::openmode __mode); |
| 245 | 249 | #endif |
| 246 | 250 | basic_filebuf* close(); |
| ... | ... | @@ -286,13 +290,13 @@ private: |
| 286 | 290 | |
| 287 | 291 | template <class _CharT, class _Traits> |
| 288 | 292 | basic_filebuf<_CharT, _Traits>::basic_filebuf() |
| 289 | : __extbuf_(0), | |
| 290 | __extbufnext_(0), | |
| 291 | __extbufend_(0), | |
| 293 | : __extbuf_(nullptr), | |
| 294 | __extbufnext_(nullptr), | |
| 295 | __extbufend_(nullptr), | |
| 292 | 296 | __ebs_(0), |
| 293 | __intbuf_(0), | |
| 297 | __intbuf_(nullptr), | |
| 294 | 298 | __ibs_(0), |
| 295 | __file_(0), | |
| 299 | __file_(nullptr), | |
| 296 | 300 | __cv_(nullptr), |
| 297 | 301 | __st_(), |
| 298 | 302 | __st_last_(), |
| ... | ... | @@ -307,7 +311,7 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf() |
| 307 | 311 | __cv_ = &use_facet<codecvt<char_type, char, state_type> >(this->getloc()); |
| 308 | 312 | __always_noconv_ = __cv_->always_noconv(); |
| 309 | 313 | } |
| 310 | setbuf(0, 4096); | |
| 314 | setbuf(nullptr, 4096); | |
| 311 | 315 | } |
| 312 | 316 | |
| 313 | 317 | #ifndef _LIBCPP_CXX03_LANG |
| ... | ... | @@ -359,13 +363,13 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf(basic_filebuf&& __rhs) |
| 359 | 363 | (char_type*)__extbuf_ + (__rhs.gptr() - __rhs.eback()), |
| 360 | 364 | (char_type*)__extbuf_ + (__rhs.egptr() - __rhs.eback())); |
| 361 | 365 | } |
| 362 | __rhs.__extbuf_ = 0; | |
| 363 | __rhs.__extbufnext_ = 0; | |
| 364 | __rhs.__extbufend_ = 0; | |
| 366 | __rhs.__extbuf_ = nullptr; | |
| 367 | __rhs.__extbufnext_ = nullptr; | |
| 368 | __rhs.__extbufend_ = nullptr; | |
| 365 | 369 | __rhs.__ebs_ = 0; |
| 366 | 370 | __rhs.__intbuf_ = 0; |
| 367 | 371 | __rhs.__ibs_ = 0; |
| 368 | __rhs.__file_ = 0; | |
| 372 | __rhs.__file_ = nullptr; | |
| 369 | 373 | __rhs.__st_ = state_type(); |
| 370 | 374 | __rhs.__st_last_ = state_type(); |
| 371 | 375 | __rhs.__om_ = 0; |
| ... | ... | @@ -499,7 +503,7 @@ inline |
| 499 | 503 | bool |
| 500 | 504 | basic_filebuf<_CharT, _Traits>::is_open() const |
| 501 | 505 | { |
| 502 | return __file_ != 0; | |
| 506 | return __file_ != nullptr; | |
| 503 | 507 | } |
| 504 | 508 | |
| 505 | 509 | template <class _CharT, class _Traits> |
| ... | ... | @@ -547,8 +551,8 @@ template <class _CharT, class _Traits> |
| 547 | 551 | basic_filebuf<_CharT, _Traits>* |
| 548 | 552 | basic_filebuf<_CharT, _Traits>::open(const char* __s, ios_base::openmode __mode) |
| 549 | 553 | { |
| 550 | basic_filebuf<_CharT, _Traits>* __rt = 0; | |
| 551 | if (__file_ == 0) | |
| 554 | basic_filebuf<_CharT, _Traits>* __rt = nullptr; | |
| 555 | if (__file_ == nullptr) | |
| 552 | 556 | { |
| 553 | 557 | if (const char* __mdstr = __make_mdstring(__mode)) { |
| 554 | 558 | __rt = this; |
| ... | ... | @@ -558,22 +562,23 @@ basic_filebuf<_CharT, _Traits>::open(const char* __s, ios_base::openmode __mode) |
| 558 | 562 | if (__mode & ios_base::ate) { |
| 559 | 563 | if (fseek(__file_, 0, SEEK_END)) { |
| 560 | 564 | fclose(__file_); |
| 561 | __file_ = 0; | |
| 562 | __rt = 0; | |
| 565 | __file_ = nullptr; | |
| 566 | __rt = nullptr; | |
| 563 | 567 | } |
| 564 | 568 | } |
| 565 | 569 | } else |
| 566 | __rt = 0; | |
| 570 | __rt = nullptr; | |
| 567 | 571 | } |
| 568 | 572 | } |
| 569 | 573 | return __rt; |
| 570 | 574 | } |
| 571 | 575 | |
| 572 | 576 | template <class _CharT, class _Traits> |
| 573 | _LIBCPP_INLINE_VISIBILITY basic_filebuf<_CharT, _Traits>* | |
| 577 | inline _LIBCPP_INLINE_VISIBILITY | |
| 578 | basic_filebuf<_CharT, _Traits>* | |
| 574 | 579 | basic_filebuf<_CharT, _Traits>::__open(int __fd, ios_base::openmode __mode) { |
| 575 | basic_filebuf<_CharT, _Traits>* __rt = 0; | |
| 576 | if (__file_ == 0) { | |
| 580 | basic_filebuf<_CharT, _Traits>* __rt = nullptr; | |
| 581 | if (__file_ == nullptr) { | |
| 577 | 582 | if (const char* __mdstr = __make_mdstring(__mode)) { |
| 578 | 583 | __rt = this; |
| 579 | 584 | __file_ = fdopen(__fd, __mdstr); |
| ... | ... | @@ -582,12 +587,12 @@ basic_filebuf<_CharT, _Traits>::__open(int __fd, ios_base::openmode __mode) { |
| 582 | 587 | if (__mode & ios_base::ate) { |
| 583 | 588 | if (fseek(__file_, 0, SEEK_END)) { |
| 584 | 589 | fclose(__file_); |
| 585 | __file_ = 0; | |
| 586 | __rt = 0; | |
| 590 | __file_ = nullptr; | |
| 591 | __rt = nullptr; | |
| 587 | 592 | } |
| 588 | 593 | } |
| 589 | 594 | } else |
| 590 | __rt = 0; | |
| 595 | __rt = nullptr; | |
| 591 | 596 | } |
| 592 | 597 | } |
| 593 | 598 | return __rt; |
| ... | ... | @@ -600,8 +605,8 @@ template <class _CharT, class _Traits> |
| 600 | 605 | basic_filebuf<_CharT, _Traits>* |
| 601 | 606 | basic_filebuf<_CharT, _Traits>::open(const wchar_t* __s, ios_base::openmode __mode) |
| 602 | 607 | { |
| 603 | basic_filebuf<_CharT, _Traits>* __rt = 0; | |
| 604 | if (__file_ == 0) | |
| 608 | basic_filebuf<_CharT, _Traits>* __rt = nullptr; | |
| 609 | if (__file_ == nullptr) | |
| 605 | 610 | { |
| 606 | 611 | __rt = this; |
| 607 | 612 | const wchar_t* __mdstr; |
| ... | ... | @@ -650,7 +655,7 @@ basic_filebuf<_CharT, _Traits>::open(const wchar_t* __s, ios_base::openmode __mo |
| 650 | 655 | __mdstr = L"a+b"; |
| 651 | 656 | break; |
| 652 | 657 | default: |
| 653 | __rt = 0; | |
| 658 | __rt = nullptr; | |
| 654 | 659 | break; |
| 655 | 660 | } |
| 656 | 661 | if (__rt) |
| ... | ... | @@ -664,13 +669,13 @@ basic_filebuf<_CharT, _Traits>::open(const wchar_t* __s, ios_base::openmode __mo |
| 664 | 669 | if (fseek(__file_, 0, SEEK_END)) |
| 665 | 670 | { |
| 666 | 671 | fclose(__file_); |
| 667 | __file_ = 0; | |
| 668 | __rt = 0; | |
| 672 | __file_ = nullptr; | |
| 673 | __rt = nullptr; | |
| 669 | 674 | } |
| 670 | 675 | } |
| 671 | 676 | } |
| 672 | 677 | else |
| 673 | __rt = 0; | |
| 678 | __rt = nullptr; | |
| 674 | 679 | } |
| 675 | 680 | } |
| 676 | 681 | return __rt; |
| ... | ... | @@ -690,16 +695,16 @@ template <class _CharT, class _Traits> |
| 690 | 695 | basic_filebuf<_CharT, _Traits>* |
| 691 | 696 | basic_filebuf<_CharT, _Traits>::close() |
| 692 | 697 | { |
| 693 | basic_filebuf<_CharT, _Traits>* __rt = 0; | |
| 698 | basic_filebuf<_CharT, _Traits>* __rt = nullptr; | |
| 694 | 699 | if (__file_) |
| 695 | 700 | { |
| 696 | 701 | __rt = this; |
| 697 | 702 | unique_ptr<FILE, int(*)(FILE*)> __h(__file_, fclose); |
| 698 | 703 | if (sync()) |
| 699 | __rt = 0; | |
| 704 | __rt = nullptr; | |
| 700 | 705 | if (fclose(__h.release())) |
| 701 | __rt = 0; | |
| 702 | __file_ = 0; | |
| 706 | __rt = nullptr; | |
| 707 | __file_ = nullptr; | |
| 703 | 708 | setbuf(0, 0); |
| 704 | 709 | } |
| 705 | 710 | return __rt; |
| ... | ... | @@ -709,17 +714,17 @@ template <class _CharT, class _Traits> |
| 709 | 714 | typename basic_filebuf<_CharT, _Traits>::int_type |
| 710 | 715 | basic_filebuf<_CharT, _Traits>::underflow() |
| 711 | 716 | { |
| 712 | if (__file_ == 0) | |
| 717 | if (__file_ == nullptr) | |
| 713 | 718 | return traits_type::eof(); |
| 714 | 719 | bool __initial = __read_mode(); |
| 715 | 720 | char_type __1buf; |
| 716 | if (this->gptr() == 0) | |
| 721 | if (this->gptr() == nullptr) | |
| 717 | 722 | this->setg(&__1buf, &__1buf+1, &__1buf+1); |
| 718 | 723 | const size_t __unget_sz = __initial ? 0 : min<size_t>((this->egptr() - this->eback()) / 2, 4); |
| 719 | 724 | int_type __c = traits_type::eof(); |
| 720 | 725 | if (this->gptr() == this->egptr()) |
| 721 | 726 | { |
| 722 | memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); | |
| 727 | _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); | |
| 723 | 728 | if (__always_noconv_) |
| 724 | 729 | { |
| 725 | 730 | size_t __nmemb = static_cast<size_t>(this->egptr() - this->eback() - __unget_sz); |
| ... | ... | @@ -736,7 +741,7 @@ basic_filebuf<_CharT, _Traits>::underflow() |
| 736 | 741 | { |
| 737 | 742 | _LIBCPP_ASSERT ( !(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" ); |
| 738 | 743 | if (__extbufend_ != __extbufnext_) |
| 739 | memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); | |
| 744 | _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); | |
| 740 | 745 | __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_); |
| 741 | 746 | __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_); |
| 742 | 747 | size_t __nmemb = _VSTD::min(static_cast<size_t>(__ibs_ - __unget_sz), |
| ... | ... | @@ -771,7 +776,7 @@ basic_filebuf<_CharT, _Traits>::underflow() |
| 771 | 776 | else |
| 772 | 777 | __c = traits_type::to_int_type(*this->gptr()); |
| 773 | 778 | if (this->eback() == &__1buf) |
| 774 | this->setg(0, 0, 0); | |
| 779 | this->setg(nullptr, nullptr, nullptr); | |
| 775 | 780 | return __c; |
| 776 | 781 | } |
| 777 | 782 | |
| ... | ... | @@ -801,7 +806,7 @@ template <class _CharT, class _Traits> |
| 801 | 806 | typename basic_filebuf<_CharT, _Traits>::int_type |
| 802 | 807 | basic_filebuf<_CharT, _Traits>::overflow(int_type __c) |
| 803 | 808 | { |
| 804 | if (__file_ == 0) | |
| 809 | if (__file_ == nullptr) | |
| 805 | 810 | return traits_type::eof(); |
| 806 | 811 | __write_mode(); |
| 807 | 812 | char_type __1buf; |
| ... | ... | @@ -809,7 +814,7 @@ basic_filebuf<_CharT, _Traits>::overflow(int_type __c) |
| 809 | 814 | char_type* __epb_save = this->epptr(); |
| 810 | 815 | if (!traits_type::eq_int_type(__c, traits_type::eof())) |
| 811 | 816 | { |
| 812 | if (this->pptr() == 0) | |
| 817 | if (this->pptr() == nullptr) | |
| 813 | 818 | this->setp(&__1buf, &__1buf+1); |
| 814 | 819 | *this->pptr() = traits_type::to_char_type(__c); |
| 815 | 820 | this->pbump(1); |
| ... | ... | @@ -866,8 +871,8 @@ template <class _CharT, class _Traits> |
| 866 | 871 | basic_streambuf<_CharT, _Traits>* |
| 867 | 872 | basic_filebuf<_CharT, _Traits>::setbuf(char_type* __s, streamsize __n) |
| 868 | 873 | { |
| 869 | this->setg(0, 0, 0); | |
| 870 | this->setp(0, 0); | |
| 874 | this->setg(nullptr, nullptr, nullptr); | |
| 875 | this->setp(nullptr, nullptr); | |
| 871 | 876 | if (__owns_eb_) |
| 872 | 877 | delete [] __extbuf_; |
| 873 | 878 | if (__owns_ib_) |
| ... | ... | @@ -909,7 +914,7 @@ basic_filebuf<_CharT, _Traits>::setbuf(char_type* __s, streamsize __n) |
| 909 | 914 | else |
| 910 | 915 | { |
| 911 | 916 | __ibs_ = 0; |
| 912 | __intbuf_ = 0; | |
| 917 | __intbuf_ = nullptr; | |
| 913 | 918 | __owns_ib_ = false; |
| 914 | 919 | } |
| 915 | 920 | return this; |
| ... | ... | @@ -924,7 +929,7 @@ basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, ios_base::seekdir __way, |
| 924 | 929 | __throw_bad_cast(); |
| 925 | 930 | |
| 926 | 931 | int __width = __cv_->encoding(); |
| 927 | if (__file_ == 0 || (__width <= 0 && __off != 0) || sync()) | |
| 932 | if (__file_ == nullptr || (__width <= 0 && __off != 0) || sync()) | |
| 928 | 933 | return pos_type(off_type(-1)); |
| 929 | 934 | // __width > 0 || __off == 0 |
| 930 | 935 | int __whence; |
| ... | ... | @@ -959,7 +964,7 @@ template <class _CharT, class _Traits> |
| 959 | 964 | typename basic_filebuf<_CharT, _Traits>::pos_type |
| 960 | 965 | basic_filebuf<_CharT, _Traits>::seekpos(pos_type __sp, ios_base::openmode) |
| 961 | 966 | { |
| 962 | if (__file_ == 0 || sync()) | |
| 967 | if (__file_ == nullptr || sync()) | |
| 963 | 968 | return pos_type(off_type(-1)); |
| 964 | 969 | #if defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS) |
| 965 | 970 | if (fseek(__file_, __sp, SEEK_SET)) |
| ... | ... | @@ -976,7 +981,7 @@ template <class _CharT, class _Traits> |
| 976 | 981 | int |
| 977 | 982 | basic_filebuf<_CharT, _Traits>::sync() |
| 978 | 983 | { |
| 979 | if (__file_ == 0) | |
| 984 | if (__file_ == nullptr) | |
| 980 | 985 | return 0; |
| 981 | 986 | if (!__cv_) |
| 982 | 987 | __throw_bad_cast(); |
| ... | ... | @@ -1035,7 +1040,7 @@ basic_filebuf<_CharT, _Traits>::sync() |
| 1035 | 1040 | if (__update_st) |
| 1036 | 1041 | __st_ = __state; |
| 1037 | 1042 | __extbufnext_ = __extbufend_ = __extbuf_; |
| 1038 | this->setg(0, 0, 0); | |
| 1043 | this->setg(nullptr, nullptr, nullptr); | |
| 1039 | 1044 | __cm_ = 0; |
| 1040 | 1045 | } |
| 1041 | 1046 | return 0; |
| ... | ... | @@ -1051,8 +1056,8 @@ basic_filebuf<_CharT, _Traits>::imbue(const locale& __loc) |
| 1051 | 1056 | __always_noconv_ = __cv_->always_noconv(); |
| 1052 | 1057 | if (__old_anc != __always_noconv_) |
| 1053 | 1058 | { |
| 1054 | this->setg(0, 0, 0); | |
| 1055 | this->setp(0, 0); | |
| 1059 | this->setg(nullptr, nullptr, nullptr); | |
| 1060 | this->setp(nullptr, nullptr); | |
| 1056 | 1061 | // invariant, char_type is char, else we couldn't get here |
| 1057 | 1062 | if (__always_noconv_) // need to dump __intbuf_ |
| 1058 | 1063 | { |
| ... | ... | @@ -1062,7 +1067,7 @@ basic_filebuf<_CharT, _Traits>::imbue(const locale& __loc) |
| 1062 | 1067 | __ebs_ = __ibs_; |
| 1063 | 1068 | __extbuf_ = (char*)__intbuf_; |
| 1064 | 1069 | __ibs_ = 0; |
| 1065 | __intbuf_ = 0; | |
| 1070 | __intbuf_ = nullptr; | |
| 1066 | 1071 | __owns_ib_ = false; |
| 1067 | 1072 | } |
| 1068 | 1073 | else // need to obtain an __intbuf_. |
| ... | ... | @@ -1091,7 +1096,7 @@ basic_filebuf<_CharT, _Traits>::__read_mode() |
| 1091 | 1096 | { |
| 1092 | 1097 | if (!(__cm_ & ios_base::in)) |
| 1093 | 1098 | { |
| 1094 | this->setp(0, 0); | |
| 1099 | this->setp(nullptr, nullptr); | |
| 1095 | 1100 | if (__always_noconv_) |
| 1096 | 1101 | this->setg((char_type*)__extbuf_, |
| 1097 | 1102 | (char_type*)__extbuf_ + __ebs_, |
| ... | ... | @@ -1110,7 +1115,7 @@ basic_filebuf<_CharT, _Traits>::__write_mode() |
| 1110 | 1115 | { |
| 1111 | 1116 | if (!(__cm_ & ios_base::out)) |
| 1112 | 1117 | { |
| 1113 | this->setg(0, 0, 0); | |
| 1118 | this->setg(nullptr, nullptr, nullptr); | |
| 1114 | 1119 | if (__ebs_ > sizeof(__extbuf_min_)) |
| 1115 | 1120 | { |
| 1116 | 1121 | if (__always_noconv_) |
| ... | ... | @@ -1120,7 +1125,7 @@ basic_filebuf<_CharT, _Traits>::__write_mode() |
| 1120 | 1125 | this->setp(__intbuf_, __intbuf_ + (__ibs_ - 1)); |
| 1121 | 1126 | } |
| 1122 | 1127 | else |
| 1123 | this->setp(0, 0); | |
| 1128 | this->setp(nullptr, nullptr); | |
| 1124 | 1129 | __cm_ = ios_base::out; |
| 1125 | 1130 | } |
| 1126 | 1131 | } |
| ... | ... | @@ -1149,7 +1154,7 @@ public: |
| 1149 | 1154 | #endif |
| 1150 | 1155 | _LIBCPP_INLINE_VISIBILITY |
| 1151 | 1156 | explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in); |
| 1152 | #if _LIBCPP_STD_VER >= 17 | |
| 1157 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 1153 | 1158 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 1154 | 1159 | explicit basic_ifstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in) |
| 1155 | 1160 | : basic_ifstream(__p.c_str(), __mode) {} |
| ... | ... | @@ -1175,7 +1180,7 @@ public: |
| 1175 | 1180 | void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in); |
| 1176 | 1181 | #endif |
| 1177 | 1182 | void open(const string& __s, ios_base::openmode __mode = ios_base::in); |
| 1178 | #if _LIBCPP_STD_VER >= 17 | |
| 1183 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 1179 | 1184 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 1180 | 1185 | void open(const filesystem::path& __p, |
| 1181 | 1186 | ios_base::openmode __mode = ios_base::in) { |
| ... | ... | @@ -1206,7 +1211,7 @@ inline |
| 1206 | 1211 | basic_ifstream<_CharT, _Traits>::basic_ifstream(const char* __s, ios_base::openmode __mode) |
| 1207 | 1212 | : basic_istream<char_type, traits_type>(&__sb_) |
| 1208 | 1213 | { |
| 1209 | if (__sb_.open(__s, __mode | ios_base::in) == 0) | |
| 1214 | if (__sb_.open(__s, __mode | ios_base::in) == nullptr) | |
| 1210 | 1215 | this->setstate(ios_base::failbit); |
| 1211 | 1216 | } |
| 1212 | 1217 | |
| ... | ... | @@ -1216,7 +1221,7 @@ inline |
| 1216 | 1221 | basic_ifstream<_CharT, _Traits>::basic_ifstream(const wchar_t* __s, ios_base::openmode __mode) |
| 1217 | 1222 | : basic_istream<char_type, traits_type>(&__sb_) |
| 1218 | 1223 | { |
| 1219 | if (__sb_.open(__s, __mode | ios_base::in) == 0) | |
| 1224 | if (__sb_.open(__s, __mode | ios_base::in) == nullptr) | |
| 1220 | 1225 | this->setstate(ios_base::failbit); |
| 1221 | 1226 | } |
| 1222 | 1227 | #endif |
| ... | ... | @@ -1226,7 +1231,7 @@ inline |
| 1226 | 1231 | basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::openmode __mode) |
| 1227 | 1232 | : basic_istream<char_type, traits_type>(&__sb_) |
| 1228 | 1233 | { |
| 1229 | if (__sb_.open(__s, __mode | ios_base::in) == 0) | |
| 1234 | if (__sb_.open(__s, __mode | ios_base::in) == nullptr) | |
| 1230 | 1235 | this->setstate(ios_base::failbit); |
| 1231 | 1236 | } |
| 1232 | 1237 | #endif |
| ... | ... | @@ -1363,7 +1368,7 @@ public: |
| 1363 | 1368 | _LIBCPP_INLINE_VISIBILITY |
| 1364 | 1369 | explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out); |
| 1365 | 1370 | |
| 1366 | #if _LIBCPP_STD_VER >= 17 | |
| 1371 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 1367 | 1372 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 1368 | 1373 | explicit basic_ofstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out) |
| 1369 | 1374 | : basic_ofstream(__p.c_str(), __mode) {} |
| ... | ... | @@ -1390,7 +1395,7 @@ public: |
| 1390 | 1395 | #endif |
| 1391 | 1396 | void open(const string& __s, ios_base::openmode __mode = ios_base::out); |
| 1392 | 1397 | |
| 1393 | #if _LIBCPP_STD_VER >= 17 | |
| 1398 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 1394 | 1399 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 1395 | 1400 | void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out) |
| 1396 | 1401 | { return open(__p.c_str(), __mode); } |
| ... | ... | @@ -1419,7 +1424,7 @@ inline |
| 1419 | 1424 | basic_ofstream<_CharT, _Traits>::basic_ofstream(const char* __s, ios_base::openmode __mode) |
| 1420 | 1425 | : basic_ostream<char_type, traits_type>(&__sb_) |
| 1421 | 1426 | { |
| 1422 | if (__sb_.open(__s, __mode | ios_base::out) == 0) | |
| 1427 | if (__sb_.open(__s, __mode | ios_base::out) == nullptr) | |
| 1423 | 1428 | this->setstate(ios_base::failbit); |
| 1424 | 1429 | } |
| 1425 | 1430 | |
| ... | ... | @@ -1429,7 +1434,7 @@ inline |
| 1429 | 1434 | basic_ofstream<_CharT, _Traits>::basic_ofstream(const wchar_t* __s, ios_base::openmode __mode) |
| 1430 | 1435 | : basic_ostream<char_type, traits_type>(&__sb_) |
| 1431 | 1436 | { |
| 1432 | if (__sb_.open(__s, __mode | ios_base::out) == 0) | |
| 1437 | if (__sb_.open(__s, __mode | ios_base::out) == nullptr) | |
| 1433 | 1438 | this->setstate(ios_base::failbit); |
| 1434 | 1439 | } |
| 1435 | 1440 | #endif |
| ... | ... | @@ -1439,7 +1444,7 @@ inline |
| 1439 | 1444 | basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::openmode __mode) |
| 1440 | 1445 | : basic_ostream<char_type, traits_type>(&__sb_) |
| 1441 | 1446 | { |
| 1442 | if (__sb_.open(__s, __mode | ios_base::out) == 0) | |
| 1447 | if (__sb_.open(__s, __mode | ios_base::out) == nullptr) | |
| 1443 | 1448 | this->setstate(ios_base::failbit); |
| 1444 | 1449 | } |
| 1445 | 1450 | #endif |
| ... | ... | @@ -1548,7 +1553,7 @@ inline |
| 1548 | 1553 | void |
| 1549 | 1554 | basic_ofstream<_CharT, _Traits>::close() |
| 1550 | 1555 | { |
| 1551 | if (__sb_.close() == 0) | |
| 1556 | if (__sb_.close() == nullptr) | |
| 1552 | 1557 | this->setstate(ios_base::failbit); |
| 1553 | 1558 | } |
| 1554 | 1559 | |
| ... | ... | @@ -1577,7 +1582,7 @@ public: |
| 1577 | 1582 | _LIBCPP_INLINE_VISIBILITY |
| 1578 | 1583 | explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out); |
| 1579 | 1584 | |
| 1580 | #if _LIBCPP_STD_VER >= 17 | |
| 1585 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 1581 | 1586 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 1582 | 1587 | explicit basic_fstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in | ios_base::out) |
| 1583 | 1588 | : basic_fstream(__p.c_str(), __mode) {} |
| ... | ... | @@ -1605,7 +1610,7 @@ public: |
| 1605 | 1610 | #endif |
| 1606 | 1611 | void open(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out); |
| 1607 | 1612 | |
| 1608 | #if _LIBCPP_STD_VER >= 17 | |
| 1613 | #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) | |
| 1609 | 1614 | _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY |
| 1610 | 1615 | void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in|ios_base::out) |
| 1611 | 1616 | { return open(__p.c_str(), __mode); } |
| ... | ... | @@ -1632,7 +1637,7 @@ inline |
| 1632 | 1637 | basic_fstream<_CharT, _Traits>::basic_fstream(const char* __s, ios_base::openmode __mode) |
| 1633 | 1638 | : basic_iostream<char_type, traits_type>(&__sb_) |
| 1634 | 1639 | { |
| 1635 | if (__sb_.open(__s, __mode) == 0) | |
| 1640 | if (__sb_.open(__s, __mode) == nullptr) | |
| 1636 | 1641 | this->setstate(ios_base::failbit); |
| 1637 | 1642 | } |
| 1638 | 1643 | |
| ... | ... | @@ -1642,7 +1647,7 @@ inline |
| 1642 | 1647 | basic_fstream<_CharT, _Traits>::basic_fstream(const wchar_t* __s, ios_base::openmode __mode) |
| 1643 | 1648 | : basic_iostream<char_type, traits_type>(&__sb_) |
| 1644 | 1649 | { |
| 1645 | if (__sb_.open(__s, __mode) == 0) | |
| 1650 | if (__sb_.open(__s, __mode) == nullptr) | |
| 1646 | 1651 | this->setstate(ios_base::failbit); |
| 1647 | 1652 | } |
| 1648 | 1653 | #endif |
| ... | ... | @@ -1652,7 +1657,7 @@ inline |
| 1652 | 1657 | basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openmode __mode) |
| 1653 | 1658 | : basic_iostream<char_type, traits_type>(&__sb_) |
| 1654 | 1659 | { |
| 1655 | if (__sb_.open(__s, __mode) == 0) | |
| 1660 | if (__sb_.open(__s, __mode) == nullptr) | |
| 1656 | 1661 | this->setstate(ios_base::failbit); |
| 1657 | 1662 | } |
| 1658 | 1663 | #endif |
| ... | ... | @@ -1752,10 +1757,16 @@ inline |
| 1752 | 1757 | void |
| 1753 | 1758 | basic_fstream<_CharT, _Traits>::close() |
| 1754 | 1759 | { |
| 1755 | if (__sb_.close() == 0) | |
| 1760 | if (__sb_.close() == nullptr) | |
| 1756 | 1761 | this->setstate(ios_base::failbit); |
| 1757 | 1762 | } |
| 1758 | 1763 | |
| 1764 | #if defined(_LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1) | |
| 1765 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ifstream<char>) | |
| 1766 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ofstream<char>) | |
| 1767 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>) | |
| 1768 | #endif | |
| 1769 | ||
| 1759 | 1770 | _LIBCPP_END_NAMESPACE_STD |
| 1760 | 1771 | |
| 1761 | 1772 | _LIBCPP_POP_MACROS |
lib/libcxx/include/functional+82-78| ... | ... | @@ -213,7 +213,8 @@ public: |
| 213 | 213 | template <class Predicate> // deprecated in C++17 |
| 214 | 214 | binary_negate<Predicate> not2(const Predicate& pred); |
| 215 | 215 | |
| 216 | template <class F> unspecified not_fn(F&& f); // C++17 | |
| 216 | template <class F> | |
| 217 | constexpr unspecified not_fn(F&& f); // C++17, constexpr in C++20 | |
| 217 | 218 | |
| 218 | 219 | template<class T> struct is_bind_expression; |
| 219 | 220 | template<class T> struct is_placeholder; |
| ... | ... | @@ -226,11 +227,12 @@ template <class T> inline constexpr int is_placeholder_v |
| 226 | 227 | |
| 227 | 228 | |
| 228 | 229 | template<class Fn, class... BoundArgs> |
| 229 | unspecified bind(Fn&&, BoundArgs&&...); | |
| 230 | constexpr unspecified bind(Fn&&, BoundArgs&&...); // constexpr in C++20 | |
| 230 | 231 | template<class R, class Fn, class... BoundArgs> |
| 231 | unspecified bind(Fn&&, BoundArgs&&...); | |
| 232 | constexpr unspecified bind(Fn&&, BoundArgs&&...); // constexpr in C++20 | |
| 232 | 233 | |
| 233 | 234 | template<class F, class... Args> |
| 235 | constexpr // constexpr in C++20 | |
| 234 | 236 | invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) // C++17 |
| 235 | 237 | noexcept(is_nothrow_invocable_v<F, Args...>); |
| 236 | 238 | |
| ... | ... | @@ -376,7 +378,8 @@ public: |
| 376 | 378 | template <class S, class T> const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const); // deprecated in C++11, removed in C++17 |
| 377 | 379 | template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const); // deprecated in C++11, removed in C++17 |
| 378 | 380 | |
| 379 | template<class R, class T> unspecified mem_fn(R T::*); | |
| 381 | template<class R, class T> | |
| 382 | constexpr unspecified mem_fn(R T::*); // constexpr in C++20 | |
| 380 | 383 | |
| 381 | 384 | class bad_function_call |
| 382 | 385 | : public exception |
| ... | ... | @@ -470,6 +473,7 @@ template <> struct hash<bool>; |
| 470 | 473 | template <> struct hash<char>; |
| 471 | 474 | template <> struct hash<signed char>; |
| 472 | 475 | template <> struct hash<unsigned char>; |
| 476 | template <> struct hash<char8_t>; // since C++20 | |
| 473 | 477 | template <> struct hash<char16_t>; |
| 474 | 478 | template <> struct hash<char32_t>; |
| 475 | 479 | template <> struct hash<wchar_t>; |
| ... | ... | @@ -508,10 +512,6 @@ POLICY: For non-variadic implementations, the number of arguments is limited |
| 508 | 512 | |
| 509 | 513 | #include <__functional_base> |
| 510 | 514 | |
| 511 | #if defined(_LIBCPP_HAS_BLOCKS_RUNTIME) && !defined(_LIBCPP_HAS_OBJC_ARC) | |
| 512 | #include <Block.h> | |
| 513 | #endif | |
| 514 | ||
| 515 | 515 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 516 | 516 | #pragma GCC system_header |
| 517 | 517 | #endif |
| ... | ... | @@ -1291,15 +1291,16 @@ private: |
| 1291 | 1291 | type __f_; |
| 1292 | 1292 | |
| 1293 | 1293 | public: |
| 1294 | _LIBCPP_INLINE_VISIBILITY __mem_fn(type __f) _NOEXCEPT : __f_(__f) {} | |
| 1294 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1295 | __mem_fn(type __f) _NOEXCEPT : __f_(__f) {} | |
| 1295 | 1296 | |
| 1296 | 1297 | #ifndef _LIBCPP_CXX03_LANG |
| 1297 | 1298 | // invoke |
| 1298 | 1299 | template <class... _ArgTypes> |
| 1299 | _LIBCPP_INLINE_VISIBILITY | |
| 1300 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1300 | 1301 | typename __invoke_return<type, _ArgTypes...>::type |
| 1301 | 1302 | operator() (_ArgTypes&&... __args) const { |
| 1302 | return __invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...); | |
| 1303 | return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...); | |
| 1303 | 1304 | } |
| 1304 | 1305 | #else |
| 1305 | 1306 | |
| ... | ... | @@ -1307,104 +1308,104 @@ public: |
| 1307 | 1308 | _LIBCPP_INLINE_VISIBILITY |
| 1308 | 1309 | typename __invoke_return0<type, _A0>::type |
| 1309 | 1310 | operator() (_A0& __a0) const { |
| 1310 | return __invoke(__f_, __a0); | |
| 1311 | return _VSTD::__invoke(__f_, __a0); | |
| 1311 | 1312 | } |
| 1312 | 1313 | |
| 1313 | 1314 | template <class _A0> |
| 1314 | 1315 | _LIBCPP_INLINE_VISIBILITY |
| 1315 | 1316 | typename __invoke_return0<type, _A0 const>::type |
| 1316 | 1317 | operator() (_A0 const& __a0) const { |
| 1317 | return __invoke(__f_, __a0); | |
| 1318 | return _VSTD::__invoke(__f_, __a0); | |
| 1318 | 1319 | } |
| 1319 | 1320 | |
| 1320 | 1321 | template <class _A0, class _A1> |
| 1321 | 1322 | _LIBCPP_INLINE_VISIBILITY |
| 1322 | 1323 | typename __invoke_return1<type, _A0, _A1>::type |
| 1323 | 1324 | operator() (_A0& __a0, _A1& __a1) const { |
| 1324 | return __invoke(__f_, __a0, __a1); | |
| 1325 | return _VSTD::__invoke(__f_, __a0, __a1); | |
| 1325 | 1326 | } |
| 1326 | 1327 | |
| 1327 | 1328 | template <class _A0, class _A1> |
| 1328 | 1329 | _LIBCPP_INLINE_VISIBILITY |
| 1329 | 1330 | typename __invoke_return1<type, _A0 const, _A1>::type |
| 1330 | 1331 | operator() (_A0 const& __a0, _A1& __a1) const { |
| 1331 | return __invoke(__f_, __a0, __a1); | |
| 1332 | return _VSTD::__invoke(__f_, __a0, __a1); | |
| 1332 | 1333 | } |
| 1333 | 1334 | |
| 1334 | 1335 | template <class _A0, class _A1> |
| 1335 | 1336 | _LIBCPP_INLINE_VISIBILITY |
| 1336 | 1337 | typename __invoke_return1<type, _A0, _A1 const>::type |
| 1337 | 1338 | operator() (_A0& __a0, _A1 const& __a1) const { |
| 1338 | return __invoke(__f_, __a0, __a1); | |
| 1339 | return _VSTD::__invoke(__f_, __a0, __a1); | |
| 1339 | 1340 | } |
| 1340 | 1341 | |
| 1341 | 1342 | template <class _A0, class _A1> |
| 1342 | 1343 | _LIBCPP_INLINE_VISIBILITY |
| 1343 | 1344 | typename __invoke_return1<type, _A0 const, _A1 const>::type |
| 1344 | 1345 | operator() (_A0 const& __a0, _A1 const& __a1) const { |
| 1345 | return __invoke(__f_, __a0, __a1); | |
| 1346 | return _VSTD::__invoke(__f_, __a0, __a1); | |
| 1346 | 1347 | } |
| 1347 | 1348 | |
| 1348 | 1349 | template <class _A0, class _A1, class _A2> |
| 1349 | 1350 | _LIBCPP_INLINE_VISIBILITY |
| 1350 | 1351 | typename __invoke_return2<type, _A0, _A1, _A2>::type |
| 1351 | 1352 | operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { |
| 1352 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1353 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1353 | 1354 | } |
| 1354 | 1355 | |
| 1355 | 1356 | template <class _A0, class _A1, class _A2> |
| 1356 | 1357 | _LIBCPP_INLINE_VISIBILITY |
| 1357 | 1358 | typename __invoke_return2<type, _A0 const, _A1, _A2>::type |
| 1358 | 1359 | operator() (_A0 const& __a0, _A1& __a1, _A2& __a2) const { |
| 1359 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1360 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1360 | 1361 | } |
| 1361 | 1362 | |
| 1362 | 1363 | template <class _A0, class _A1, class _A2> |
| 1363 | 1364 | _LIBCPP_INLINE_VISIBILITY |
| 1364 | 1365 | typename __invoke_return2<type, _A0, _A1 const, _A2>::type |
| 1365 | 1366 | operator() (_A0& __a0, _A1 const& __a1, _A2& __a2) const { |
| 1366 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1367 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1367 | 1368 | } |
| 1368 | 1369 | |
| 1369 | 1370 | template <class _A0, class _A1, class _A2> |
| 1370 | 1371 | _LIBCPP_INLINE_VISIBILITY |
| 1371 | 1372 | typename __invoke_return2<type, _A0, _A1, _A2 const>::type |
| 1372 | 1373 | operator() (_A0& __a0, _A1& __a1, _A2 const& __a2) const { |
| 1373 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1374 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1374 | 1375 | } |
| 1375 | 1376 | |
| 1376 | 1377 | template <class _A0, class _A1, class _A2> |
| 1377 | 1378 | _LIBCPP_INLINE_VISIBILITY |
| 1378 | 1379 | typename __invoke_return2<type, _A0 const, _A1 const, _A2>::type |
| 1379 | 1380 | operator() (_A0 const& __a0, _A1 const& __a1, _A2& __a2) const { |
| 1380 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1381 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1381 | 1382 | } |
| 1382 | 1383 | |
| 1383 | 1384 | template <class _A0, class _A1, class _A2> |
| 1384 | 1385 | _LIBCPP_INLINE_VISIBILITY |
| 1385 | 1386 | typename __invoke_return2<type, _A0 const, _A1, _A2 const>::type |
| 1386 | 1387 | operator() (_A0 const& __a0, _A1& __a1, _A2 const& __a2) const { |
| 1387 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1388 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1388 | 1389 | } |
| 1389 | 1390 | |
| 1390 | 1391 | template <class _A0, class _A1, class _A2> |
| 1391 | 1392 | _LIBCPP_INLINE_VISIBILITY |
| 1392 | 1393 | typename __invoke_return2<type, _A0, _A1 const, _A2 const>::type |
| 1393 | 1394 | operator() (_A0& __a0, _A1 const& __a1, _A2 const& __a2) const { |
| 1394 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1395 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1395 | 1396 | } |
| 1396 | 1397 | |
| 1397 | 1398 | template <class _A0, class _A1, class _A2> |
| 1398 | 1399 | _LIBCPP_INLINE_VISIBILITY |
| 1399 | 1400 | typename __invoke_return2<type, _A0 const, _A1 const, _A2 const>::type |
| 1400 | 1401 | operator() (_A0 const& __a0, _A1 const& __a1, _A2 const& __a2) const { |
| 1401 | return __invoke(__f_, __a0, __a1, __a2); | |
| 1402 | return _VSTD::__invoke(__f_, __a0, __a1, __a2); | |
| 1402 | 1403 | } |
| 1403 | 1404 | #endif |
| 1404 | 1405 | }; |
| 1405 | 1406 | |
| 1406 | 1407 | template<class _Rp, class _Tp> |
| 1407 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1408 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1408 | 1409 | __mem_fn<_Rp _Tp::*> |
| 1409 | 1410 | mem_fn(_Rp _Tp::* __pm) _NOEXCEPT |
| 1410 | 1411 | { |
| ... | ... | @@ -1596,7 +1597,7 @@ public: |
| 1596 | 1597 | const _Target& __target() const { return __f_; } |
| 1597 | 1598 | |
| 1598 | 1599 | _LIBCPP_INLINE_VISIBILITY |
| 1599 | explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {} | |
| 1600 | explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {} | |
| 1600 | 1601 | |
| 1601 | 1602 | _LIBCPP_INLINE_VISIBILITY |
| 1602 | 1603 | explicit __default_alloc_func(const _Target& __f) : __f_(__f) {} |
| ... | ... | @@ -1612,7 +1613,7 @@ public: |
| 1612 | 1613 | __builtin_new_allocator::__holder_t __hold = |
| 1613 | 1614 | __builtin_new_allocator::__allocate_type<__default_alloc_func>(1); |
| 1614 | 1615 | __default_alloc_func* __res = |
| 1615 | ::new (__hold.get()) __default_alloc_func(__f_); | |
| 1616 | ::new ((void*)__hold.get()) __default_alloc_func(__f_); | |
| 1616 | 1617 | (void)__hold.release(); |
| 1617 | 1618 | return __res; |
| 1618 | 1619 | } |
| ... | ... | @@ -1703,7 +1704,7 @@ template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes> |
| 1703 | 1704 | void |
| 1704 | 1705 | __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__clone(__base<_Rp(_ArgTypes...)>* __p) const |
| 1705 | 1706 | { |
| 1706 | ::new (__p) __func(__f_.__target(), __f_.__get_allocator()); | |
| 1707 | ::new ((void*)__p) __func(__f_.__target(), __f_.__get_allocator()); | |
| 1707 | 1708 | } |
| 1708 | 1709 | |
| 1709 | 1710 | template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes> |
| ... | ... | @@ -1739,7 +1740,7 @@ __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOE |
| 1739 | 1740 | { |
| 1740 | 1741 | if (__ti == typeid(_Fp)) |
| 1741 | 1742 | return &__f_.__target(); |
| 1742 | return (const void*)0; | |
| 1743 | return nullptr; | |
| 1743 | 1744 | } |
| 1744 | 1745 | |
| 1745 | 1746 | template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes> |
| ... | ... | @@ -1769,11 +1770,11 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1769 | 1770 | |
| 1770 | 1771 | public: |
| 1771 | 1772 | _LIBCPP_INLINE_VISIBILITY |
| 1772 | __value_func() _NOEXCEPT : __f_(0) {} | |
| 1773 | __value_func() _NOEXCEPT : __f_(nullptr) {} | |
| 1773 | 1774 | |
| 1774 | 1775 | template <class _Fp, class _Alloc> |
| 1775 | 1776 | _LIBCPP_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a) |
| 1776 | : __f_(0) | |
| 1777 | : __f_(nullptr) | |
| 1777 | 1778 | { |
| 1778 | 1779 | typedef allocator_traits<_Alloc> __alloc_traits; |
| 1779 | 1780 | typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _Fun; |
| ... | ... | @@ -1803,13 +1804,13 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1803 | 1804 | template <class _Fp, |
| 1804 | 1805 | class = typename enable_if<!is_same<typename decay<_Fp>::type, __value_func>::value>::type> |
| 1805 | 1806 | _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f) |
| 1806 | : __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {} | |
| 1807 | : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {} | |
| 1807 | 1808 | |
| 1808 | 1809 | _LIBCPP_INLINE_VISIBILITY |
| 1809 | 1810 | __value_func(const __value_func& __f) |
| 1810 | 1811 | { |
| 1811 | if (__f.__f_ == 0) | |
| 1812 | __f_ = 0; | |
| 1812 | if (__f.__f_ == nullptr) | |
| 1813 | __f_ = nullptr; | |
| 1813 | 1814 | else if ((void*)__f.__f_ == &__f.__buf_) |
| 1814 | 1815 | { |
| 1815 | 1816 | __f_ = __as_base(&__buf_); |
| ... | ... | @@ -1822,8 +1823,8 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1822 | 1823 | _LIBCPP_INLINE_VISIBILITY |
| 1823 | 1824 | __value_func(__value_func&& __f) _NOEXCEPT |
| 1824 | 1825 | { |
| 1825 | if (__f.__f_ == 0) | |
| 1826 | __f_ = 0; | |
| 1826 | if (__f.__f_ == nullptr) | |
| 1827 | __f_ = nullptr; | |
| 1827 | 1828 | else if ((void*)__f.__f_ == &__f.__buf_) |
| 1828 | 1829 | { |
| 1829 | 1830 | __f_ = __as_base(&__buf_); |
| ... | ... | @@ -1832,7 +1833,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1832 | 1833 | else |
| 1833 | 1834 | { |
| 1834 | 1835 | __f_ = __f.__f_; |
| 1835 | __f.__f_ = 0; | |
| 1836 | __f.__f_ = nullptr; | |
| 1836 | 1837 | } |
| 1837 | 1838 | } |
| 1838 | 1839 | |
| ... | ... | @@ -1849,8 +1850,8 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1849 | 1850 | __value_func& operator=(__value_func&& __f) |
| 1850 | 1851 | { |
| 1851 | 1852 | *this = nullptr; |
| 1852 | if (__f.__f_ == 0) | |
| 1853 | __f_ = 0; | |
| 1853 | if (__f.__f_ == nullptr) | |
| 1854 | __f_ = nullptr; | |
| 1854 | 1855 | else if ((void*)__f.__f_ == &__f.__buf_) |
| 1855 | 1856 | { |
| 1856 | 1857 | __f_ = __as_base(&__buf_); |
| ... | ... | @@ -1859,7 +1860,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1859 | 1860 | else |
| 1860 | 1861 | { |
| 1861 | 1862 | __f_ = __f.__f_; |
| 1862 | __f.__f_ = 0; | |
| 1863 | __f.__f_ = nullptr; | |
| 1863 | 1864 | } |
| 1864 | 1865 | return *this; |
| 1865 | 1866 | } |
| ... | ... | @@ -1868,7 +1869,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1868 | 1869 | __value_func& operator=(nullptr_t) |
| 1869 | 1870 | { |
| 1870 | 1871 | __func* __f = __f_; |
| 1871 | __f_ = 0; | |
| 1872 | __f_ = nullptr; | |
| 1872 | 1873 | if ((void*)__f == &__buf_) |
| 1873 | 1874 | __f->destroy(); |
| 1874 | 1875 | else if (__f) |
| ... | ... | @@ -1879,7 +1880,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1879 | 1880 | _LIBCPP_INLINE_VISIBILITY |
| 1880 | 1881 | _Rp operator()(_ArgTypes&&... __args) const |
| 1881 | 1882 | { |
| 1882 | if (__f_ == 0) | |
| 1883 | if (__f_ == nullptr) | |
| 1883 | 1884 | __throw_bad_function_call(); |
| 1884 | 1885 | return (*__f_)(_VSTD::forward<_ArgTypes>(__args)...); |
| 1885 | 1886 | } |
| ... | ... | @@ -1895,10 +1896,10 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1895 | 1896 | __func* __t = __as_base(&__tempbuf); |
| 1896 | 1897 | __f_->__clone(__t); |
| 1897 | 1898 | __f_->destroy(); |
| 1898 | __f_ = 0; | |
| 1899 | __f_ = nullptr; | |
| 1899 | 1900 | __f.__f_->__clone(__as_base(&__buf_)); |
| 1900 | 1901 | __f.__f_->destroy(); |
| 1901 | __f.__f_ = 0; | |
| 1902 | __f.__f_ = nullptr; | |
| 1902 | 1903 | __f_ = __as_base(&__buf_); |
| 1903 | 1904 | __t->__clone(__as_base(&__f.__buf_)); |
| 1904 | 1905 | __t->destroy(); |
| ... | ... | @@ -1923,13 +1924,13 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1923 | 1924 | } |
| 1924 | 1925 | |
| 1925 | 1926 | _LIBCPP_INLINE_VISIBILITY |
| 1926 | _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT { return __f_ != 0; } | |
| 1927 | _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT { return __f_ != nullptr; } | |
| 1927 | 1928 | |
| 1928 | 1929 | #ifndef _LIBCPP_NO_RTTI |
| 1929 | 1930 | _LIBCPP_INLINE_VISIBILITY |
| 1930 | 1931 | const std::type_info& target_type() const _NOEXCEPT |
| 1931 | 1932 | { |
| 1932 | if (__f_ == 0) | |
| 1933 | if (__f_ == nullptr) | |
| 1933 | 1934 | return typeid(void); |
| 1934 | 1935 | return __f_->target_type(); |
| 1935 | 1936 | } |
| ... | ... | @@ -1937,8 +1938,8 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)> |
| 1937 | 1938 | template <typename _Tp> |
| 1938 | 1939 | _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT |
| 1939 | 1940 | { |
| 1940 | if (__f_ == 0) | |
| 1941 | return 0; | |
| 1941 | if (__f_ == nullptr) | |
| 1942 | return nullptr; | |
| 1942 | 1943 | return (const _Tp*)__f_->target(typeid(_Tp)); |
| 1943 | 1944 | } |
| 1944 | 1945 | #endif // _LIBCPP_NO_RTTI |
| ... | ... | @@ -2157,7 +2158,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)> |
| 2157 | 2158 | } else { |
| 2158 | 2159 | __builtin_new_allocator::__holder_t __hold = |
| 2159 | 2160 | __builtin_new_allocator::__allocate_type<_Fun>(1); |
| 2160 | __buf_.__large = ::new (__hold.get()) _Fun(_VSTD::move(__f)); | |
| 2161 | __buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f)); | |
| 2161 | 2162 | (void)__hold.release(); |
| 2162 | 2163 | } |
| 2163 | 2164 | } |
| ... | ... | @@ -2257,6 +2258,9 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)> |
| 2257 | 2258 | |
| 2258 | 2259 | #if defined(_LIBCPP_HAS_BLOCKS_RUNTIME) && !defined(_LIBCPP_HAS_OBJC_ARC) |
| 2259 | 2260 | |
| 2261 | extern "C" void *_Block_copy(const void *); | |
| 2262 | extern "C" void _Block_release(const void *); | |
| 2263 | ||
| 2260 | 2264 | template<class _Rp1, class ..._ArgTypes1, class _Alloc, class _Rp, class ..._ArgTypes> |
| 2261 | 2265 | class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> |
| 2262 | 2266 | : public __base<_Rp(_ArgTypes...)> |
| ... | ... | @@ -2267,14 +2271,14 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> |
| 2267 | 2271 | public: |
| 2268 | 2272 | _LIBCPP_INLINE_VISIBILITY |
| 2269 | 2273 | explicit __func(__block_type const& __f) |
| 2270 | : __f_(__f ? Block_copy(__f) : (__block_type)0) | |
| 2274 | : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr)) | |
| 2271 | 2275 | { } |
| 2272 | 2276 | |
| 2273 | 2277 | // [TODO] add && to save on a retain |
| 2274 | 2278 | |
| 2275 | 2279 | _LIBCPP_INLINE_VISIBILITY |
| 2276 | 2280 | explicit __func(__block_type __f, const _Alloc& /* unused */) |
| 2277 | : __f_(__f ? Block_copy(__f) : (__block_type)0) | |
| 2281 | : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr)) | |
| 2278 | 2282 | { } |
| 2279 | 2283 | |
| 2280 | 2284 | virtual __base<_Rp(_ArgTypes...)>* __clone() const { |
| ... | ... | @@ -2286,12 +2290,12 @@ public: |
| 2286 | 2290 | } |
| 2287 | 2291 | |
| 2288 | 2292 | virtual void __clone(__base<_Rp(_ArgTypes...)>* __p) const { |
| 2289 | ::new (__p) __func(__f_); | |
| 2293 | ::new ((void*)__p) __func(__f_); | |
| 2290 | 2294 | } |
| 2291 | 2295 | |
| 2292 | 2296 | virtual void destroy() _NOEXCEPT { |
| 2293 | 2297 | if (__f_) |
| 2294 | Block_release(__f_); | |
| 2298 | _Block_release(__f_); | |
| 2295 | 2299 | __f_ = 0; |
| 2296 | 2300 | } |
| 2297 | 2301 | |
| ... | ... | @@ -2303,7 +2307,7 @@ public: |
| 2303 | 2307 | } |
| 2304 | 2308 | |
| 2305 | 2309 | virtual _Rp operator()(_ArgTypes&& ... __arg) { |
| 2306 | return __invoke(__f_, _VSTD::forward<_ArgTypes>(__arg)...); | |
| 2310 | return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__arg)...); | |
| 2307 | 2311 | } |
| 2308 | 2312 | |
| 2309 | 2313 | #ifndef _LIBCPP_NO_RTTI |
| ... | ... | @@ -2344,9 +2348,9 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> |
| 2344 | 2348 | template <class _Fp> |
| 2345 | 2349 | struct __callable<_Fp, true> |
| 2346 | 2350 | { |
| 2347 | static const bool value = is_same<void, _Rp>::value || | |
| 2348 | is_convertible<typename __invoke_of<_Fp, _ArgTypes...>::type, | |
| 2349 | _Rp>::value; | |
| 2351 | static const bool value = is_void<_Rp>::value || | |
| 2352 | __is_core_convertible<typename __invoke_of<_Fp, _ArgTypes...>::type, | |
| 2353 | _Rp>::value; | |
| 2350 | 2354 | }; |
| 2351 | 2355 | template <class _Fp> |
| 2352 | 2356 | struct __callable<_Fp, false> |
| ... | ... | @@ -2518,7 +2522,7 @@ template<class _Rp, class ..._ArgTypes> |
| 2518 | 2522 | function<_Rp(_ArgTypes...)>& |
| 2519 | 2523 | function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT |
| 2520 | 2524 | { |
| 2521 | __f_ = std::move(__f.__f_); | |
| 2525 | __f_ = _VSTD::move(__f.__f_); | |
| 2522 | 2526 | return *this; |
| 2523 | 2527 | } |
| 2524 | 2528 | |
| ... | ... | @@ -2701,7 +2705,7 @@ typename _EnableIf |
| 2701 | 2705 | __mu(_Ti& __ti, tuple<_Uj...>& __uj) |
| 2702 | 2706 | { |
| 2703 | 2707 | typedef typename __make_tuple_indices<sizeof...(_Uj)>::type __indices; |
| 2704 | return __mu_expand(__ti, __uj, __indices()); | |
| 2708 | return _VSTD::__mu_expand(__ti, __uj, __indices()); | |
| 2705 | 2709 | } |
| 2706 | 2710 | |
| 2707 | 2711 | template <bool IsPh, class _Ti, class _Uj> |
| ... | ... | @@ -2873,13 +2877,13 @@ public: |
| 2873 | 2877 | !is_same<typename remove_reference<_Gp>::type, |
| 2874 | 2878 | __bind>::value |
| 2875 | 2879 | >::type> |
| 2876 | _LIBCPP_INLINE_VISIBILITY | |
| 2880 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2877 | 2881 | explicit __bind(_Gp&& __f, _BA&& ...__bound_args) |
| 2878 | 2882 | : __f_(_VSTD::forward<_Gp>(__f)), |
| 2879 | 2883 | __bound_args_(_VSTD::forward<_BA>(__bound_args)...) {} |
| 2880 | 2884 | |
| 2881 | 2885 | template <class ..._Args> |
| 2882 | _LIBCPP_INLINE_VISIBILITY | |
| 2886 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2883 | 2887 | typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type |
| 2884 | 2888 | operator()(_Args&& ...__args) |
| 2885 | 2889 | { |
| ... | ... | @@ -2888,7 +2892,7 @@ public: |
| 2888 | 2892 | } |
| 2889 | 2893 | |
| 2890 | 2894 | template <class ..._Args> |
| 2891 | _LIBCPP_INLINE_VISIBILITY | |
| 2895 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2892 | 2896 | typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type |
| 2893 | 2897 | operator()(_Args&& ...__args) const |
| 2894 | 2898 | { |
| ... | ... | @@ -2918,13 +2922,13 @@ public: |
| 2918 | 2922 | !is_same<typename remove_reference<_Gp>::type, |
| 2919 | 2923 | __bind_r>::value |
| 2920 | 2924 | >::type> |
| 2921 | _LIBCPP_INLINE_VISIBILITY | |
| 2925 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2922 | 2926 | explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args) |
| 2923 | 2927 | : base(_VSTD::forward<_Gp>(__f), |
| 2924 | 2928 | _VSTD::forward<_BA>(__bound_args)...) {} |
| 2925 | 2929 | |
| 2926 | 2930 | template <class ..._Args> |
| 2927 | _LIBCPP_INLINE_VISIBILITY | |
| 2931 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2928 | 2932 | typename enable_if |
| 2929 | 2933 | < |
| 2930 | 2934 | is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type, |
| ... | ... | @@ -2938,7 +2942,7 @@ public: |
| 2938 | 2942 | } |
| 2939 | 2943 | |
| 2940 | 2944 | template <class ..._Args> |
| 2941 | _LIBCPP_INLINE_VISIBILITY | |
| 2945 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2942 | 2946 | typename enable_if |
| 2943 | 2947 | < |
| 2944 | 2948 | is_convertible<typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type, |
| ... | ... | @@ -2956,7 +2960,7 @@ template<class _Rp, class _Fp, class ..._BoundArgs> |
| 2956 | 2960 | struct __is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {}; |
| 2957 | 2961 | |
| 2958 | 2962 | template<class _Fp, class ..._BoundArgs> |
| 2959 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2963 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2960 | 2964 | __bind<_Fp, _BoundArgs...> |
| 2961 | 2965 | bind(_Fp&& __f, _BoundArgs&&... __bound_args) |
| 2962 | 2966 | { |
| ... | ... | @@ -2965,7 +2969,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args) |
| 2965 | 2969 | } |
| 2966 | 2970 | |
| 2967 | 2971 | template<class _Rp, class _Fp, class ..._BoundArgs> |
| 2968 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2972 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2969 | 2973 | __bind_r<_Rp, _Fp, _BoundArgs...> |
| 2970 | 2974 | bind(_Fp&& __f, _BoundArgs&&... __bound_args) |
| 2971 | 2975 | { |
| ... | ... | @@ -2978,7 +2982,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args) |
| 2978 | 2982 | #if _LIBCPP_STD_VER > 14 |
| 2979 | 2983 | |
| 2980 | 2984 | template <class _Fn, class ..._Args> |
| 2981 | invoke_result_t<_Fn, _Args...> | |
| 2985 | _LIBCPP_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...> | |
| 2982 | 2986 | invoke(_Fn&& __f, _Args&&... __args) |
| 2983 | 2987 | noexcept(is_nothrow_invocable_v<_Fn, _Args...>) |
| 2984 | 2988 | { |
| ... | ... | @@ -2993,21 +2997,21 @@ public: |
| 2993 | 2997 | __not_fn_imp() = delete; |
| 2994 | 2998 | |
| 2995 | 2999 | template <class ..._Args> |
| 2996 | _LIBCPP_INLINE_VISIBILITY | |
| 3000 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 2997 | 3001 | auto operator()(_Args&& ...__args) & |
| 2998 | 3002 | noexcept(noexcept(!_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...))) |
| 2999 | 3003 | -> decltype( !_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...)) |
| 3000 | 3004 | { return !_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...); } |
| 3001 | 3005 | |
| 3002 | 3006 | template <class ..._Args> |
| 3003 | _LIBCPP_INLINE_VISIBILITY | |
| 3007 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3004 | 3008 | auto operator()(_Args&& ...__args) && |
| 3005 | 3009 | noexcept(noexcept(!_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...))) |
| 3006 | 3010 | -> decltype( !_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...)) |
| 3007 | 3011 | { return !_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...); } |
| 3008 | 3012 | |
| 3009 | 3013 | template <class ..._Args> |
| 3010 | _LIBCPP_INLINE_VISIBILITY | |
| 3014 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3011 | 3015 | auto operator()(_Args&& ...__args) const& |
| 3012 | 3016 | noexcept(noexcept(!_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...))) |
| 3013 | 3017 | -> decltype( !_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...)) |
| ... | ... | @@ -3015,7 +3019,7 @@ public: |
| 3015 | 3019 | |
| 3016 | 3020 | |
| 3017 | 3021 | template <class ..._Args> |
| 3018 | _LIBCPP_INLINE_VISIBILITY | |
| 3022 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3019 | 3023 | auto operator()(_Args&& ...__args) const&& |
| 3020 | 3024 | noexcept(noexcept(!_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...))) |
| 3021 | 3025 | -> decltype( !_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...)) |
| ... | ... | @@ -3024,17 +3028,17 @@ public: |
| 3024 | 3028 | private: |
| 3025 | 3029 | template <class _RawFunc, |
| 3026 | 3030 | class = enable_if_t<!is_same<decay_t<_RawFunc>, __not_fn_imp>::value>> |
| 3027 | _LIBCPP_INLINE_VISIBILITY | |
| 3031 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3028 | 3032 | explicit __not_fn_imp(_RawFunc&& __rf) |
| 3029 | 3033 | : __fd(_VSTD::forward<_RawFunc>(__rf)) {} |
| 3030 | 3034 | |
| 3031 | 3035 | template <class _RawFunc> |
| 3032 | friend inline _LIBCPP_INLINE_VISIBILITY | |
| 3036 | friend inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3033 | 3037 | __not_fn_imp<decay_t<_RawFunc>> not_fn(_RawFunc&&); |
| 3034 | 3038 | }; |
| 3035 | 3039 | |
| 3036 | 3040 | template <class _RawFunc> |
| 3037 | inline _LIBCPP_INLINE_VISIBILITY | |
| 3041 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3038 | 3042 | __not_fn_imp<decay_t<_RawFunc>> not_fn(_RawFunc&& __fn) { |
| 3039 | 3043 | return __not_fn_imp<decay_t<_RawFunc>>(_VSTD::forward<_RawFunc>(__fn)); |
| 3040 | 3044 | } |
| ... | ... | @@ -3131,13 +3135,13 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, |
| 3131 | 3135 | template<class _ForwardIterator, class _BinaryPredicate = equal_to<>> |
| 3132 | 3136 | class _LIBCPP_TYPE_VIS default_searcher { |
| 3133 | 3137 | public: |
| 3134 | _LIBCPP_INLINE_VISIBILITY | |
| 3138 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3135 | 3139 | default_searcher(_ForwardIterator __f, _ForwardIterator __l, |
| 3136 | 3140 | _BinaryPredicate __p = _BinaryPredicate()) |
| 3137 | 3141 | : __first_(__f), __last_(__l), __pred_(__p) {} |
| 3138 | 3142 | |
| 3139 | 3143 | template <typename _ForwardIterator2> |
| 3140 | _LIBCPP_INLINE_VISIBILITY | |
| 3144 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3141 | 3145 | pair<_ForwardIterator2, _ForwardIterator2> |
| 3142 | 3146 | operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const |
| 3143 | 3147 | { |
lib/libcxx/include/future+49-199| ... | ... | @@ -362,6 +362,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>; |
| 362 | 362 | */ |
| 363 | 363 | |
| 364 | 364 | #include <__config> |
| 365 | #include <__availability> | |
| 365 | 366 | #include <system_error> |
| 366 | 367 | #include <memory> |
| 367 | 368 | #include <chrono> |
| ... | ... | @@ -624,18 +625,10 @@ protected: |
| 624 | 625 | public: |
| 625 | 626 | |
| 626 | 627 | template <class _Arg> |
| 627 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 628 | void set_value(_Arg&& __arg); | |
| 629 | #else | |
| 630 | void set_value(_Arg& __arg); | |
| 631 | #endif | |
| 628 | void set_value(_Arg&& __arg); | |
| 632 | 629 | |
| 633 | 630 | template <class _Arg> |
| 634 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 635 | void set_value_at_thread_exit(_Arg&& __arg); | |
| 636 | #else | |
| 637 | void set_value_at_thread_exit(_Arg& __arg); | |
| 638 | #endif | |
| 631 | void set_value_at_thread_exit(_Arg&& __arg); | |
| 639 | 632 | |
| 640 | 633 | _Rp move(); |
| 641 | 634 | typename add_lvalue_reference<_Rp>::type copy(); |
| ... | ... | @@ -654,16 +647,12 @@ template <class _Rp> |
| 654 | 647 | template <class _Arg> |
| 655 | 648 | _LIBCPP_AVAILABILITY_FUTURE |
| 656 | 649 | void |
| 657 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 658 | 650 | __assoc_state<_Rp>::set_value(_Arg&& __arg) |
| 659 | #else | |
| 660 | __assoc_state<_Rp>::set_value(_Arg& __arg) | |
| 661 | #endif | |
| 662 | 651 | { |
| 663 | 652 | unique_lock<mutex> __lk(this->__mut_); |
| 664 | 653 | if (this->__has_value()) |
| 665 | 654 | __throw_future_error(future_errc::promise_already_satisfied); |
| 666 | ::new(&__value_) _Rp(_VSTD::forward<_Arg>(__arg)); | |
| 655 | ::new ((void*)&__value_) _Rp(_VSTD::forward<_Arg>(__arg)); | |
| 667 | 656 | this->__state_ |= base::__constructed | base::ready; |
| 668 | 657 | __cv_.notify_all(); |
| 669 | 658 | } |
| ... | ... | @@ -671,16 +660,12 @@ __assoc_state<_Rp>::set_value(_Arg& __arg) |
| 671 | 660 | template <class _Rp> |
| 672 | 661 | template <class _Arg> |
| 673 | 662 | void |
| 674 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 675 | 663 | __assoc_state<_Rp>::set_value_at_thread_exit(_Arg&& __arg) |
| 676 | #else | |
| 677 | __assoc_state<_Rp>::set_value_at_thread_exit(_Arg& __arg) | |
| 678 | #endif | |
| 679 | 664 | { |
| 680 | 665 | unique_lock<mutex> __lk(this->__mut_); |
| 681 | 666 | if (this->__has_value()) |
| 682 | 667 | __throw_future_error(future_errc::promise_already_satisfied); |
| 683 | ::new(&__value_) _Rp(_VSTD::forward<_Arg>(__arg)); | |
| 668 | ::new ((void*)&__value_) _Rp(_VSTD::forward<_Arg>(__arg)); | |
| 684 | 669 | this->__state_ |= base::__constructed; |
| 685 | 670 | __thread_local_data()->__make_ready_at_thread_exit(this); |
| 686 | 671 | } |
| ... | ... | @@ -856,16 +841,12 @@ class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state |
| 856 | 841 | _Fp __func_; |
| 857 | 842 | |
| 858 | 843 | public: |
| 859 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 860 | 844 | _LIBCPP_INLINE_VISIBILITY |
| 861 | 845 | explicit __deferred_assoc_state(_Fp&& __f); |
| 862 | #endif | |
| 863 | 846 | |
| 864 | 847 | virtual void __execute(); |
| 865 | 848 | }; |
| 866 | 849 | |
| 867 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 868 | ||
| 869 | 850 | template <class _Rp, class _Fp> |
| 870 | 851 | inline |
| 871 | 852 | __deferred_assoc_state<_Rp, _Fp>::__deferred_assoc_state(_Fp&& __f) |
| ... | ... | @@ -874,8 +855,6 @@ __deferred_assoc_state<_Rp, _Fp>::__deferred_assoc_state(_Fp&& __f) |
| 874 | 855 | this->__set_deferred(); |
| 875 | 856 | } |
| 876 | 857 | |
| 877 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 878 | ||
| 879 | 858 | template <class _Rp, class _Fp> |
| 880 | 859 | void |
| 881 | 860 | __deferred_assoc_state<_Rp, _Fp>::__execute() |
| ... | ... | @@ -903,16 +882,12 @@ class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state<void, _Fp> |
| 903 | 882 | _Fp __func_; |
| 904 | 883 | |
| 905 | 884 | public: |
| 906 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 907 | 885 | _LIBCPP_INLINE_VISIBILITY |
| 908 | 886 | explicit __deferred_assoc_state(_Fp&& __f); |
| 909 | #endif | |
| 910 | 887 | |
| 911 | 888 | virtual void __execute(); |
| 912 | 889 | }; |
| 913 | 890 | |
| 914 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 915 | ||
| 916 | 891 | template <class _Fp> |
| 917 | 892 | inline |
| 918 | 893 | __deferred_assoc_state<void, _Fp>::__deferred_assoc_state(_Fp&& __f) |
| ... | ... | @@ -921,8 +896,6 @@ __deferred_assoc_state<void, _Fp>::__deferred_assoc_state(_Fp&& __f) |
| 921 | 896 | this->__set_deferred(); |
| 922 | 897 | } |
| 923 | 898 | |
| 924 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 925 | ||
| 926 | 899 | template <class _Fp> |
| 927 | 900 | void |
| 928 | 901 | __deferred_assoc_state<void, _Fp>::__execute() |
| ... | ... | @@ -952,16 +925,12 @@ class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state |
| 952 | 925 | |
| 953 | 926 | virtual void __on_zero_shared() _NOEXCEPT; |
| 954 | 927 | public: |
| 955 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 956 | 928 | _LIBCPP_INLINE_VISIBILITY |
| 957 | 929 | explicit __async_assoc_state(_Fp&& __f); |
| 958 | #endif | |
| 959 | 930 | |
| 960 | 931 | virtual void __execute(); |
| 961 | 932 | }; |
| 962 | 933 | |
| 963 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 964 | ||
| 965 | 934 | template <class _Rp, class _Fp> |
| 966 | 935 | inline |
| 967 | 936 | __async_assoc_state<_Rp, _Fp>::__async_assoc_state(_Fp&& __f) |
| ... | ... | @@ -969,8 +938,6 @@ __async_assoc_state<_Rp, _Fp>::__async_assoc_state(_Fp&& __f) |
| 969 | 938 | { |
| 970 | 939 | } |
| 971 | 940 | |
| 972 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 973 | ||
| 974 | 941 | template <class _Rp, class _Fp> |
| 975 | 942 | void |
| 976 | 943 | __async_assoc_state<_Rp, _Fp>::__execute() |
| ... | ... | @@ -1007,16 +974,12 @@ class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state<void, _Fp> |
| 1007 | 974 | |
| 1008 | 975 | virtual void __on_zero_shared() _NOEXCEPT; |
| 1009 | 976 | public: |
| 1010 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1011 | 977 | _LIBCPP_INLINE_VISIBILITY |
| 1012 | 978 | explicit __async_assoc_state(_Fp&& __f); |
| 1013 | #endif | |
| 1014 | 979 | |
| 1015 | 980 | virtual void __execute(); |
| 1016 | 981 | }; |
| 1017 | 982 | |
| 1018 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1019 | ||
| 1020 | 983 | template <class _Fp> |
| 1021 | 984 | inline |
| 1022 | 985 | __async_assoc_state<void, _Fp>::__async_assoc_state(_Fp&& __f) |
| ... | ... | @@ -1024,8 +987,6 @@ __async_assoc_state<void, _Fp>::__async_assoc_state(_Fp&& __f) |
| 1024 | 987 | { |
| 1025 | 988 | } |
| 1026 | 989 | |
| 1027 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1028 | ||
| 1029 | 990 | template <class _Fp> |
| 1030 | 991 | void |
| 1031 | 992 | __async_assoc_state<void, _Fp>::__execute() |
| ... | ... | @@ -1062,19 +1023,11 @@ template <class _Rp> class _LIBCPP_TEMPLATE_VIS future; |
| 1062 | 1023 | |
| 1063 | 1024 | template <class _Rp, class _Fp> |
| 1064 | 1025 | _LIBCPP_INLINE_VISIBILITY future<_Rp> |
| 1065 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1066 | 1026 | __make_deferred_assoc_state(_Fp&& __f); |
| 1067 | #else | |
| 1068 | __make_deferred_assoc_state(_Fp __f); | |
| 1069 | #endif | |
| 1070 | 1027 | |
| 1071 | 1028 | template <class _Rp, class _Fp> |
| 1072 | 1029 | _LIBCPP_INLINE_VISIBILITY future<_Rp> |
| 1073 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1074 | 1030 | __make_async_assoc_state(_Fp&& __f); |
| 1075 | #else | |
| 1076 | __make_async_assoc_state(_Fp __f); | |
| 1077 | #endif | |
| 1078 | 1031 | |
| 1079 | 1032 | template <class _Rp> |
| 1080 | 1033 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future |
| ... | ... | @@ -1086,22 +1039,14 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future |
| 1086 | 1039 | template <class> friend class promise; |
| 1087 | 1040 | template <class> friend class shared_future; |
| 1088 | 1041 | |
| 1089 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1090 | 1042 | template <class _R1, class _Fp> |
| 1091 | 1043 | friend future<_R1> __make_deferred_assoc_state(_Fp&& __f); |
| 1092 | 1044 | template <class _R1, class _Fp> |
| 1093 | 1045 | friend future<_R1> __make_async_assoc_state(_Fp&& __f); |
| 1094 | #else | |
| 1095 | template <class _R1, class _Fp> | |
| 1096 | friend future<_R1> __make_deferred_assoc_state(_Fp __f); | |
| 1097 | template <class _R1, class _Fp> | |
| 1098 | friend future<_R1> __make_async_assoc_state(_Fp __f); | |
| 1099 | #endif | |
| 1100 | 1046 | |
| 1101 | 1047 | public: |
| 1102 | 1048 | _LIBCPP_INLINE_VISIBILITY |
| 1103 | 1049 | future() _NOEXCEPT : __state_(nullptr) {} |
| 1104 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1105 | 1050 | _LIBCPP_INLINE_VISIBILITY |
| 1106 | 1051 | future(future&& __rhs) _NOEXCEPT |
| 1107 | 1052 | : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} |
| ... | ... | @@ -1110,15 +1055,10 @@ public: |
| 1110 | 1055 | _LIBCPP_INLINE_VISIBILITY |
| 1111 | 1056 | future& operator=(future&& __rhs) _NOEXCEPT |
| 1112 | 1057 | { |
| 1113 | future(std::move(__rhs)).swap(*this); | |
| 1058 | future(_VSTD::move(__rhs)).swap(*this); | |
| 1114 | 1059 | return *this; |
| 1115 | 1060 | } |
| 1116 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1117 | private: | |
| 1118 | future(const future&); | |
| 1119 | future& operator=(const future&); | |
| 1120 | public: | |
| 1121 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1061 | ||
| 1122 | 1062 | ~future(); |
| 1123 | 1063 | _LIBCPP_INLINE_VISIBILITY |
| 1124 | 1064 | shared_future<_Rp> share() _NOEXCEPT; |
| ... | ... | @@ -1186,22 +1126,14 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future<_Rp&> |
| 1186 | 1126 | template <class> friend class promise; |
| 1187 | 1127 | template <class> friend class shared_future; |
| 1188 | 1128 | |
| 1189 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1190 | 1129 | template <class _R1, class _Fp> |
| 1191 | 1130 | friend future<_R1> __make_deferred_assoc_state(_Fp&& __f); |
| 1192 | 1131 | template <class _R1, class _Fp> |
| 1193 | 1132 | friend future<_R1> __make_async_assoc_state(_Fp&& __f); |
| 1194 | #else | |
| 1195 | template <class _R1, class _Fp> | |
| 1196 | friend future<_R1> __make_deferred_assoc_state(_Fp __f); | |
| 1197 | template <class _R1, class _Fp> | |
| 1198 | friend future<_R1> __make_async_assoc_state(_Fp __f); | |
| 1199 | #endif | |
| 1200 | 1133 | |
| 1201 | 1134 | public: |
| 1202 | 1135 | _LIBCPP_INLINE_VISIBILITY |
| 1203 | 1136 | future() _NOEXCEPT : __state_(nullptr) {} |
| 1204 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1205 | 1137 | _LIBCPP_INLINE_VISIBILITY |
| 1206 | 1138 | future(future&& __rhs) _NOEXCEPT |
| 1207 | 1139 | : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} |
| ... | ... | @@ -1210,15 +1142,10 @@ public: |
| 1210 | 1142 | _LIBCPP_INLINE_VISIBILITY |
| 1211 | 1143 | future& operator=(future&& __rhs) _NOEXCEPT |
| 1212 | 1144 | { |
| 1213 | future(std::move(__rhs)).swap(*this); | |
| 1145 | future(_VSTD::move(__rhs)).swap(*this); | |
| 1214 | 1146 | return *this; |
| 1215 | 1147 | } |
| 1216 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1217 | private: | |
| 1218 | future(const future&); | |
| 1219 | future& operator=(const future&); | |
| 1220 | public: | |
| 1221 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1148 | ||
| 1222 | 1149 | ~future(); |
| 1223 | 1150 | _LIBCPP_INLINE_VISIBILITY |
| 1224 | 1151 | shared_future<_Rp&> share() _NOEXCEPT; |
| ... | ... | @@ -1281,22 +1208,14 @@ class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE future<void> |
| 1281 | 1208 | template <class> friend class promise; |
| 1282 | 1209 | template <class> friend class shared_future; |
| 1283 | 1210 | |
| 1284 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1285 | 1211 | template <class _R1, class _Fp> |
| 1286 | 1212 | friend future<_R1> __make_deferred_assoc_state(_Fp&& __f); |
| 1287 | 1213 | template <class _R1, class _Fp> |
| 1288 | 1214 | friend future<_R1> __make_async_assoc_state(_Fp&& __f); |
| 1289 | #else | |
| 1290 | template <class _R1, class _Fp> | |
| 1291 | friend future<_R1> __make_deferred_assoc_state(_Fp __f); | |
| 1292 | template <class _R1, class _Fp> | |
| 1293 | friend future<_R1> __make_async_assoc_state(_Fp __f); | |
| 1294 | #endif | |
| 1295 | 1215 | |
| 1296 | 1216 | public: |
| 1297 | 1217 | _LIBCPP_INLINE_VISIBILITY |
| 1298 | 1218 | future() _NOEXCEPT : __state_(nullptr) {} |
| 1299 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1300 | 1219 | _LIBCPP_INLINE_VISIBILITY |
| 1301 | 1220 | future(future&& __rhs) _NOEXCEPT |
| 1302 | 1221 | : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} |
| ... | ... | @@ -1305,15 +1224,10 @@ public: |
| 1305 | 1224 | _LIBCPP_INLINE_VISIBILITY |
| 1306 | 1225 | future& operator=(future&& __rhs) _NOEXCEPT |
| 1307 | 1226 | { |
| 1308 | future(std::move(__rhs)).swap(*this); | |
| 1227 | future(_VSTD::move(__rhs)).swap(*this); | |
| 1309 | 1228 | return *this; |
| 1310 | 1229 | } |
| 1311 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1312 | private: | |
| 1313 | future(const future&); | |
| 1314 | future& operator=(const future&); | |
| 1315 | public: | |
| 1316 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1230 | ||
| 1317 | 1231 | ~future(); |
| 1318 | 1232 | _LIBCPP_INLINE_VISIBILITY |
| 1319 | 1233 | shared_future<void> share() _NOEXCEPT; |
| ... | ... | @@ -1367,32 +1281,21 @@ public: |
| 1367 | 1281 | promise(); |
| 1368 | 1282 | template <class _Alloc> |
| 1369 | 1283 | promise(allocator_arg_t, const _Alloc& __a); |
| 1370 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1371 | 1284 | _LIBCPP_INLINE_VISIBILITY |
| 1372 | 1285 | promise(promise&& __rhs) _NOEXCEPT |
| 1373 | 1286 | : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} |
| 1374 | 1287 | promise(const promise& __rhs) = delete; |
| 1375 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1376 | private: | |
| 1377 | promise(const promise& __rhs); | |
| 1378 | public: | |
| 1379 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1380 | 1288 | ~promise(); |
| 1381 | 1289 | |
| 1382 | 1290 | // assignment |
| 1383 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1384 | 1291 | _LIBCPP_INLINE_VISIBILITY |
| 1385 | 1292 | promise& operator=(promise&& __rhs) _NOEXCEPT |
| 1386 | 1293 | { |
| 1387 | promise(std::move(__rhs)).swap(*this); | |
| 1294 | promise(_VSTD::move(__rhs)).swap(*this); | |
| 1388 | 1295 | return *this; |
| 1389 | 1296 | } |
| 1390 | 1297 | promise& operator=(const promise& __rhs) = delete; |
| 1391 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1392 | private: | |
| 1393 | promise& operator=(const promise& __rhs); | |
| 1394 | public: | |
| 1395 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1298 | ||
| 1396 | 1299 | _LIBCPP_INLINE_VISIBILITY |
| 1397 | 1300 | void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} |
| 1398 | 1301 | |
| ... | ... | @@ -1401,16 +1304,12 @@ public: |
| 1401 | 1304 | |
| 1402 | 1305 | // setting the result |
| 1403 | 1306 | void set_value(const _Rp& __r); |
| 1404 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1405 | 1307 | void set_value(_Rp&& __r); |
| 1406 | #endif | |
| 1407 | 1308 | void set_exception(exception_ptr __p); |
| 1408 | 1309 | |
| 1409 | 1310 | // setting the result with deferred notification |
| 1410 | 1311 | void set_value_at_thread_exit(const _Rp& __r); |
| 1411 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1412 | 1312 | void set_value_at_thread_exit(_Rp&& __r); |
| 1413 | #endif | |
| 1414 | 1313 | void set_exception_at_thread_exit(exception_ptr __p); |
| 1415 | 1314 | }; |
| 1416 | 1315 | |
| ... | ... | @@ -1429,7 +1328,7 @@ promise<_Rp>::promise(allocator_arg_t, const _Alloc& __a0) |
| 1429 | 1328 | typedef __allocator_destructor<_A2> _D2; |
| 1430 | 1329 | _A2 __a(__a0); |
| 1431 | 1330 | unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1)); |
| 1432 | ::new(static_cast<void*>(_VSTD::addressof(*__hold.get()))) _State(__a0); | |
| 1331 | ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0); | |
| 1433 | 1332 | __state_ = _VSTD::addressof(*__hold.release()); |
| 1434 | 1333 | } |
| 1435 | 1334 | |
| ... | ... | @@ -1464,8 +1363,6 @@ promise<_Rp>::set_value(const _Rp& __r) |
| 1464 | 1363 | __state_->set_value(__r); |
| 1465 | 1364 | } |
| 1466 | 1365 | |
| 1467 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1468 | ||
| 1469 | 1366 | template <class _Rp> |
| 1470 | 1367 | void |
| 1471 | 1368 | promise<_Rp>::set_value(_Rp&& __r) |
| ... | ... | @@ -1475,8 +1372,6 @@ promise<_Rp>::set_value(_Rp&& __r) |
| 1475 | 1372 | __state_->set_value(_VSTD::move(__r)); |
| 1476 | 1373 | } |
| 1477 | 1374 | |
| 1478 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1479 | ||
| 1480 | 1375 | template <class _Rp> |
| 1481 | 1376 | void |
| 1482 | 1377 | promise<_Rp>::set_exception(exception_ptr __p) |
| ... | ... | @@ -1496,8 +1391,6 @@ promise<_Rp>::set_value_at_thread_exit(const _Rp& __r) |
| 1496 | 1391 | __state_->set_value_at_thread_exit(__r); |
| 1497 | 1392 | } |
| 1498 | 1393 | |
| 1499 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1500 | ||
| 1501 | 1394 | template <class _Rp> |
| 1502 | 1395 | void |
| 1503 | 1396 | promise<_Rp>::set_value_at_thread_exit(_Rp&& __r) |
| ... | ... | @@ -1507,8 +1400,6 @@ promise<_Rp>::set_value_at_thread_exit(_Rp&& __r) |
| 1507 | 1400 | __state_->set_value_at_thread_exit(_VSTD::move(__r)); |
| 1508 | 1401 | } |
| 1509 | 1402 | |
| 1510 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1511 | ||
| 1512 | 1403 | template <class _Rp> |
| 1513 | 1404 | void |
| 1514 | 1405 | promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p) |
| ... | ... | @@ -1535,32 +1426,21 @@ public: |
| 1535 | 1426 | promise(); |
| 1536 | 1427 | template <class _Allocator> |
| 1537 | 1428 | promise(allocator_arg_t, const _Allocator& __a); |
| 1538 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1539 | 1429 | _LIBCPP_INLINE_VISIBILITY |
| 1540 | 1430 | promise(promise&& __rhs) _NOEXCEPT |
| 1541 | 1431 | : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} |
| 1542 | 1432 | promise(const promise& __rhs) = delete; |
| 1543 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1544 | private: | |
| 1545 | promise(const promise& __rhs); | |
| 1546 | public: | |
| 1547 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1548 | 1433 | ~promise(); |
| 1549 | 1434 | |
| 1550 | 1435 | // assignment |
| 1551 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1552 | 1436 | _LIBCPP_INLINE_VISIBILITY |
| 1553 | 1437 | promise& operator=(promise&& __rhs) _NOEXCEPT |
| 1554 | 1438 | { |
| 1555 | promise(std::move(__rhs)).swap(*this); | |
| 1439 | promise(_VSTD::move(__rhs)).swap(*this); | |
| 1556 | 1440 | return *this; |
| 1557 | 1441 | } |
| 1558 | 1442 | promise& operator=(const promise& __rhs) = delete; |
| 1559 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1560 | private: | |
| 1561 | promise& operator=(const promise& __rhs); | |
| 1562 | public: | |
| 1563 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1443 | ||
| 1564 | 1444 | _LIBCPP_INLINE_VISIBILITY |
| 1565 | 1445 | void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} |
| 1566 | 1446 | |
| ... | ... | @@ -1591,7 +1471,7 @@ promise<_Rp&>::promise(allocator_arg_t, const _Alloc& __a0) |
| 1591 | 1471 | typedef __allocator_destructor<_A2> _D2; |
| 1592 | 1472 | _A2 __a(__a0); |
| 1593 | 1473 | unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1)); |
| 1594 | ::new(static_cast<void*>(_VSTD::addressof(*__hold.get()))) _State(__a0); | |
| 1474 | ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0); | |
| 1595 | 1475 | __state_ = _VSTD::addressof(*__hold.release()); |
| 1596 | 1476 | } |
| 1597 | 1477 | |
| ... | ... | @@ -1672,32 +1552,21 @@ public: |
| 1672 | 1552 | template <class _Allocator> |
| 1673 | 1553 | _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS |
| 1674 | 1554 | promise(allocator_arg_t, const _Allocator& __a); |
| 1675 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1676 | 1555 | _LIBCPP_INLINE_VISIBILITY |
| 1677 | 1556 | promise(promise&& __rhs) _NOEXCEPT |
| 1678 | 1557 | : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} |
| 1679 | 1558 | promise(const promise& __rhs) = delete; |
| 1680 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1681 | private: | |
| 1682 | promise(const promise& __rhs); | |
| 1683 | public: | |
| 1684 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1685 | 1559 | ~promise(); |
| 1686 | 1560 | |
| 1687 | 1561 | // assignment |
| 1688 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1689 | 1562 | _LIBCPP_INLINE_VISIBILITY |
| 1690 | 1563 | promise& operator=(promise&& __rhs) _NOEXCEPT |
| 1691 | 1564 | { |
| 1692 | promise(std::move(__rhs)).swap(*this); | |
| 1565 | promise(_VSTD::move(__rhs)).swap(*this); | |
| 1693 | 1566 | return *this; |
| 1694 | 1567 | } |
| 1695 | 1568 | promise& operator=(const promise& __rhs) = delete; |
| 1696 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1697 | private: | |
| 1698 | promise& operator=(const promise& __rhs); | |
| 1699 | public: | |
| 1700 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 1569 | ||
| 1701 | 1570 | _LIBCPP_INLINE_VISIBILITY |
| 1702 | 1571 | void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} |
| 1703 | 1572 | |
| ... | ... | @@ -1721,7 +1590,7 @@ promise<void>::promise(allocator_arg_t, const _Alloc& __a0) |
| 1721 | 1590 | typedef __allocator_destructor<_A2> _D2; |
| 1722 | 1591 | _A2 __a(__a0); |
| 1723 | 1592 | unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1)); |
| 1724 | ::new(static_cast<void*>(_VSTD::addressof(*__hold.get()))) _State(__a0); | |
| 1593 | ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0); | |
| 1725 | 1594 | __state_ = _VSTD::addressof(*__hold.release()); |
| 1726 | 1595 | } |
| 1727 | 1596 | |
| ... | ... | @@ -1737,8 +1606,6 @@ template <class _Rp, class _Alloc> |
| 1737 | 1606 | struct _LIBCPP_TEMPLATE_VIS uses_allocator<promise<_Rp>, _Alloc> |
| 1738 | 1607 | : public true_type {}; |
| 1739 | 1608 | |
| 1740 | #ifndef _LIBCPP_HAS_NO_VARIADICS | |
| 1741 | ||
| 1742 | 1609 | // packaged_task |
| 1743 | 1610 | |
| 1744 | 1611 | template<class _Fp> class __packaged_task_base; |
| ... | ... | @@ -1788,7 +1655,7 @@ void |
| 1788 | 1655 | __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__move_to( |
| 1789 | 1656 | __packaged_task_base<_Rp(_ArgTypes...)>* __p) _NOEXCEPT |
| 1790 | 1657 | { |
| 1791 | ::new (__p) __packaged_task_func(_VSTD::move(__f_.first()), _VSTD::move(__f_.second())); | |
| 1658 | ::new ((void*)__p) __packaged_task_func(_VSTD::move(__f_.first()), _VSTD::move(__f_.second())); | |
| 1792 | 1659 | } |
| 1793 | 1660 | |
| 1794 | 1661 | template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes> |
| ... | ... | @@ -1814,7 +1681,7 @@ template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes> |
| 1814 | 1681 | _Rp |
| 1815 | 1682 | __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg) |
| 1816 | 1683 | { |
| 1817 | return __invoke(__f_.first(), _VSTD::forward<_ArgTypes>(__arg)...); | |
| 1684 | return _VSTD::__invoke(__f_.first(), _VSTD::forward<_ArgTypes>(__arg)...); | |
| 1818 | 1685 | } |
| 1819 | 1686 | |
| 1820 | 1687 | template <class _Callable> class __packaged_task_function; |
| ... | ... | @@ -1823,6 +1690,10 @@ template<class _Rp, class ..._ArgTypes> |
| 1823 | 1690 | class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_function<_Rp(_ArgTypes...)> |
| 1824 | 1691 | { |
| 1825 | 1692 | typedef __packaged_task_base<_Rp(_ArgTypes...)> __base; |
| 1693 | ||
| 1694 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_NO_CFI | |
| 1695 | __base* __get_buf() { return (__base*)&__buf_; } | |
| 1696 | ||
| 1826 | 1697 | typename aligned_storage<3*sizeof(void*)>::type __buf_; |
| 1827 | 1698 | __base* __f_; |
| 1828 | 1699 | |
| ... | ... | @@ -1856,10 +1727,10 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(__packaged |
| 1856 | 1727 | { |
| 1857 | 1728 | if (__f.__f_ == nullptr) |
| 1858 | 1729 | __f_ = nullptr; |
| 1859 | else if (__f.__f_ == (__base*)&__f.__buf_) | |
| 1730 | else if (__f.__f_ == __f.__get_buf()) | |
| 1860 | 1731 | { |
| 1732 | __f.__f_->__move_to(__get_buf()); | |
| 1861 | 1733 | __f_ = (__base*)&__buf_; |
| 1862 | __f.__f_->__move_to(__f_); | |
| 1863 | 1734 | } |
| 1864 | 1735 | else |
| 1865 | 1736 | { |
| ... | ... | @@ -1877,8 +1748,8 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f) |
| 1877 | 1748 | typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF; |
| 1878 | 1749 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 1879 | 1750 | { |
| 1751 | ::new ((void*)&__buf_) _FF(_VSTD::forward<_Fp>(__f)); | |
| 1880 | 1752 | __f_ = (__base*)&__buf_; |
| 1881 | ::new (__f_) _FF(_VSTD::forward<_Fp>(__f)); | |
| 1882 | 1753 | } |
| 1883 | 1754 | else |
| 1884 | 1755 | { |
| ... | ... | @@ -1886,7 +1757,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f) |
| 1886 | 1757 | _Ap __a; |
| 1887 | 1758 | typedef __allocator_destructor<_Ap> _Dp; |
| 1888 | 1759 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 1889 | ::new (__hold.get()) _FF(_VSTD::forward<_Fp>(__f), allocator<_FR>(__a)); | |
| 1760 | ::new ((void*)__hold.get()) _FF(_VSTD::forward<_Fp>(__f), allocator<_FR>(__a)); | |
| 1890 | 1761 | __f_ = __hold.release(); |
| 1891 | 1762 | } |
| 1892 | 1763 | } |
| ... | ... | @@ -1902,7 +1773,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function( |
| 1902 | 1773 | if (sizeof(_FF) <= sizeof(__buf_)) |
| 1903 | 1774 | { |
| 1904 | 1775 | __f_ = (__base*)&__buf_; |
| 1905 | ::new (__f_) _FF(_VSTD::forward<_Fp>(__f)); | |
| 1776 | ::new ((void*)__f_) _FF(_VSTD::forward<_Fp>(__f)); | |
| 1906 | 1777 | } |
| 1907 | 1778 | else |
| 1908 | 1779 | { |
| ... | ... | @@ -1910,7 +1781,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function( |
| 1910 | 1781 | _Ap __a(__a0); |
| 1911 | 1782 | typedef __allocator_destructor<_Ap> _Dp; |
| 1912 | 1783 | unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); |
| 1913 | ::new (static_cast<void*>(_VSTD::addressof(*__hold.get()))) | |
| 1784 | ::new ((void*)_VSTD::addressof(*__hold.get())) | |
| 1914 | 1785 | _FF(_VSTD::forward<_Fp>(__f), _Alloc(__a)); |
| 1915 | 1786 | __f_ = _VSTD::addressof(*__hold.release()); |
| 1916 | 1787 | } |
| ... | ... | @@ -1920,17 +1791,17 @@ template<class _Rp, class ..._ArgTypes> |
| 1920 | 1791 | __packaged_task_function<_Rp(_ArgTypes...)>& |
| 1921 | 1792 | __packaged_task_function<_Rp(_ArgTypes...)>::operator=(__packaged_task_function&& __f) _NOEXCEPT |
| 1922 | 1793 | { |
| 1923 | if (__f_ == (__base*)&__buf_) | |
| 1794 | if (__f_ == __get_buf()) | |
| 1924 | 1795 | __f_->destroy(); |
| 1925 | 1796 | else if (__f_) |
| 1926 | 1797 | __f_->destroy_deallocate(); |
| 1927 | 1798 | __f_ = nullptr; |
| 1928 | 1799 | if (__f.__f_ == nullptr) |
| 1929 | 1800 | __f_ = nullptr; |
| 1930 | else if (__f.__f_ == (__base*)&__f.__buf_) | |
| 1801 | else if (__f.__f_ == __f.__get_buf()) | |
| 1931 | 1802 | { |
| 1932 | __f_ = (__base*)&__buf_; | |
| 1933 | __f.__f_->__move_to(__f_); | |
| 1803 | __f.__f_->__move_to(__get_buf()); | |
| 1804 | __f_ = __get_buf(); | |
| 1934 | 1805 | } |
| 1935 | 1806 | else |
| 1936 | 1807 | { |
| ... | ... | @@ -1943,13 +1814,14 @@ __packaged_task_function<_Rp(_ArgTypes...)>::operator=(__packaged_task_function& |
| 1943 | 1814 | template<class _Rp, class ..._ArgTypes> |
| 1944 | 1815 | __packaged_task_function<_Rp(_ArgTypes...)>::~__packaged_task_function() |
| 1945 | 1816 | { |
| 1946 | if (__f_ == (__base*)&__buf_) | |
| 1817 | if (__f_ == __get_buf()) | |
| 1947 | 1818 | __f_->destroy(); |
| 1948 | 1819 | else if (__f_) |
| 1949 | 1820 | __f_->destroy_deallocate(); |
| 1950 | 1821 | } |
| 1951 | 1822 | |
| 1952 | 1823 | template<class _Rp, class ..._ArgTypes> |
| 1824 | _LIBCPP_NO_CFI | |
| 1953 | 1825 | void |
| 1954 | 1826 | __packaged_task_function<_Rp(_ArgTypes...)>::swap(__packaged_task_function& __f) _NOEXCEPT |
| 1955 | 1827 | { |
| ... | ... | @@ -2268,11 +2140,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<packaged_task<_Callable>, _Alloc> |
| 2268 | 2140 | |
| 2269 | 2141 | template <class _Rp, class _Fp> |
| 2270 | 2142 | _LIBCPP_INLINE_VISIBILITY future<_Rp> |
| 2271 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2272 | 2143 | __make_deferred_assoc_state(_Fp&& __f) |
| 2273 | #else | |
| 2274 | __make_deferred_assoc_state(_Fp __f) | |
| 2275 | #endif | |
| 2276 | 2144 | { |
| 2277 | 2145 | unique_ptr<__deferred_assoc_state<_Rp, _Fp>, __release_shared_count> |
| 2278 | 2146 | __h(new __deferred_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f))); |
| ... | ... | @@ -2281,11 +2149,7 @@ __make_deferred_assoc_state(_Fp __f) |
| 2281 | 2149 | |
| 2282 | 2150 | template <class _Rp, class _Fp> |
| 2283 | 2151 | _LIBCPP_INLINE_VISIBILITY future<_Rp> |
| 2284 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2285 | 2152 | __make_async_assoc_state(_Fp&& __f) |
| 2286 | #else | |
| 2287 | __make_async_assoc_state(_Fp __f) | |
| 2288 | #endif | |
| 2289 | 2153 | { |
| 2290 | 2154 | unique_ptr<__async_assoc_state<_Rp, _Fp>, __release_shared_count> |
| 2291 | 2155 | __h(new __async_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f))); |
| ... | ... | @@ -2293,6 +2157,8 @@ __make_async_assoc_state(_Fp __f) |
| 2293 | 2157 | return future<_Rp>(__h.get()); |
| 2294 | 2158 | } |
| 2295 | 2159 | |
| 2160 | #ifndef _LIBCPP_CXX03_LANG | |
| 2161 | ||
| 2296 | 2162 | template <class _Fp, class... _Args> |
| 2297 | 2163 | class _LIBCPP_HIDDEN __async_func |
| 2298 | 2164 | { |
| ... | ... | @@ -2318,7 +2184,7 @@ private: |
| 2318 | 2184 | _Rp |
| 2319 | 2185 | __execute(__tuple_indices<_Indices...>) |
| 2320 | 2186 | { |
| 2321 | return __invoke(_VSTD::move(_VSTD::get<0>(__f_)), _VSTD::move(_VSTD::get<_Indices>(__f_))...); | |
| 2187 | return _VSTD::__invoke(_VSTD::move(_VSTD::get<0>(__f_)), _VSTD::move(_VSTD::get<_Indices>(__f_))...); | |
| 2322 | 2188 | } |
| 2323 | 2189 | }; |
| 2324 | 2190 | |
| ... | ... | @@ -2338,16 +2204,16 @@ async(launch __policy, _Fp&& __f, _Args&&... __args) |
| 2338 | 2204 | { |
| 2339 | 2205 | #endif |
| 2340 | 2206 | if (__does_policy_contain(__policy, launch::async)) |
| 2341 | return _VSTD::__make_async_assoc_state<_Rp>(_BF(__decay_copy(_VSTD::forward<_Fp>(__f)), | |
| 2342 | __decay_copy(_VSTD::forward<_Args>(__args))...)); | |
| 2207 | return _VSTD::__make_async_assoc_state<_Rp>(_BF(_VSTD::__decay_copy(_VSTD::forward<_Fp>(__f)), | |
| 2208 | _VSTD::__decay_copy(_VSTD::forward<_Args>(__args))...)); | |
| 2343 | 2209 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2344 | 2210 | } |
| 2345 | 2211 | catch ( ... ) { if (__policy == launch::async) throw ; } |
| 2346 | 2212 | #endif |
| 2347 | 2213 | |
| 2348 | 2214 | if (__does_policy_contain(__policy, launch::deferred)) |
| 2349 | return _VSTD::__make_deferred_assoc_state<_Rp>(_BF(__decay_copy(_VSTD::forward<_Fp>(__f)), | |
| 2350 | __decay_copy(_VSTD::forward<_Args>(__args))...)); | |
| 2215 | return _VSTD::__make_deferred_assoc_state<_Rp>(_BF(_VSTD::__decay_copy(_VSTD::forward<_Fp>(__f)), | |
| 2216 | _VSTD::__decay_copy(_VSTD::forward<_Args>(__args))...)); | |
| 2351 | 2217 | return future<_Rp>{}; |
| 2352 | 2218 | } |
| 2353 | 2219 | |
| ... | ... | @@ -2360,7 +2226,7 @@ async(_Fp&& __f, _Args&&... __args) |
| 2360 | 2226 | _VSTD::forward<_Args>(__args)...); |
| 2361 | 2227 | } |
| 2362 | 2228 | |
| 2363 | #endif // _LIBCPP_HAS_NO_VARIADICS | |
| 2229 | #endif // C++03 | |
| 2364 | 2230 | |
| 2365 | 2231 | // shared_future |
| 2366 | 2232 | |
| ... | ... | @@ -2375,24 +2241,20 @@ public: |
| 2375 | 2241 | _LIBCPP_INLINE_VISIBILITY |
| 2376 | 2242 | shared_future(const shared_future& __rhs) _NOEXCEPT : __state_(__rhs.__state_) |
| 2377 | 2243 | {if (__state_) __state_->__add_shared();} |
| 2378 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2379 | 2244 | _LIBCPP_INLINE_VISIBILITY |
| 2380 | 2245 | shared_future(future<_Rp>&& __f) _NOEXCEPT : __state_(__f.__state_) |
| 2381 | 2246 | {__f.__state_ = nullptr;} |
| 2382 | 2247 | _LIBCPP_INLINE_VISIBILITY |
| 2383 | 2248 | shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_) |
| 2384 | 2249 | {__rhs.__state_ = nullptr;} |
| 2385 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2386 | 2250 | ~shared_future(); |
| 2387 | 2251 | shared_future& operator=(const shared_future& __rhs) _NOEXCEPT; |
| 2388 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2389 | 2252 | _LIBCPP_INLINE_VISIBILITY |
| 2390 | 2253 | shared_future& operator=(shared_future&& __rhs) _NOEXCEPT |
| 2391 | 2254 | { |
| 2392 | shared_future(std::move(__rhs)).swap(*this); | |
| 2255 | shared_future(_VSTD::move(__rhs)).swap(*this); | |
| 2393 | 2256 | return *this; |
| 2394 | 2257 | } |
| 2395 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2396 | 2258 | |
| 2397 | 2259 | // retrieving the value |
| 2398 | 2260 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -2449,24 +2311,20 @@ public: |
| 2449 | 2311 | _LIBCPP_INLINE_VISIBILITY |
| 2450 | 2312 | shared_future(const shared_future& __rhs) : __state_(__rhs.__state_) |
| 2451 | 2313 | {if (__state_) __state_->__add_shared();} |
| 2452 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2453 | 2314 | _LIBCPP_INLINE_VISIBILITY |
| 2454 | 2315 | shared_future(future<_Rp&>&& __f) _NOEXCEPT : __state_(__f.__state_) |
| 2455 | 2316 | {__f.__state_ = nullptr;} |
| 2456 | 2317 | _LIBCPP_INLINE_VISIBILITY |
| 2457 | 2318 | shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_) |
| 2458 | 2319 | {__rhs.__state_ = nullptr;} |
| 2459 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2460 | 2320 | ~shared_future(); |
| 2461 | 2321 | shared_future& operator=(const shared_future& __rhs); |
| 2462 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2463 | 2322 | _LIBCPP_INLINE_VISIBILITY |
| 2464 | 2323 | shared_future& operator=(shared_future&& __rhs) _NOEXCEPT |
| 2465 | 2324 | { |
| 2466 | shared_future(std::move(__rhs)).swap(*this); | |
| 2325 | shared_future(_VSTD::move(__rhs)).swap(*this); | |
| 2467 | 2326 | return *this; |
| 2468 | 2327 | } |
| 2469 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2470 | 2328 | |
| 2471 | 2329 | // retrieving the value |
| 2472 | 2330 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -2523,24 +2381,20 @@ public: |
| 2523 | 2381 | _LIBCPP_INLINE_VISIBILITY |
| 2524 | 2382 | shared_future(const shared_future& __rhs) : __state_(__rhs.__state_) |
| 2525 | 2383 | {if (__state_) __state_->__add_shared();} |
| 2526 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2527 | 2384 | _LIBCPP_INLINE_VISIBILITY |
| 2528 | 2385 | shared_future(future<void>&& __f) _NOEXCEPT : __state_(__f.__state_) |
| 2529 | 2386 | {__f.__state_ = nullptr;} |
| 2530 | 2387 | _LIBCPP_INLINE_VISIBILITY |
| 2531 | 2388 | shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_) |
| 2532 | 2389 | {__rhs.__state_ = nullptr;} |
| 2533 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2534 | 2390 | ~shared_future(); |
| 2535 | 2391 | shared_future& operator=(const shared_future& __rhs); |
| 2536 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2537 | 2392 | _LIBCPP_INLINE_VISIBILITY |
| 2538 | 2393 | shared_future& operator=(shared_future&& __rhs) _NOEXCEPT |
| 2539 | 2394 | { |
| 2540 | shared_future(std::move(__rhs)).swap(*this); | |
| 2395 | shared_future(_VSTD::move(__rhs)).swap(*this); | |
| 2541 | 2396 | return *this; |
| 2542 | 2397 | } |
| 2543 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2544 | 2398 | |
| 2545 | 2399 | // retrieving the value |
| 2546 | 2400 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -2591,8 +2445,6 @@ future<_Rp&>::share() _NOEXCEPT |
| 2591 | 2445 | return shared_future<_Rp&>(_VSTD::move(*this)); |
| 2592 | 2446 | } |
| 2593 | 2447 | |
| 2594 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2595 | ||
| 2596 | 2448 | inline |
| 2597 | 2449 | shared_future<void> |
| 2598 | 2450 | future<void>::share() _NOEXCEPT |
| ... | ... | @@ -2600,8 +2452,6 @@ future<void>::share() _NOEXCEPT |
| 2600 | 2452 | return shared_future<void>(_VSTD::move(*this)); |
| 2601 | 2453 | } |
| 2602 | 2454 | |
| 2603 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 2604 | ||
| 2605 | 2455 | _LIBCPP_END_NAMESPACE_STD |
| 2606 | 2456 | |
| 2607 | 2457 | #endif // !_LIBCPP_HAS_NO_THREADS |
lib/libcxx/include/iomanip+2-2| ... | ... | @@ -514,7 +514,7 @@ put_time(const tm* __tm, const _CharT* __fmt) |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | template <class _CharT, class _Traits, class _ForwardIterator> |
| 517 | std::basic_ostream<_CharT, _Traits> & | |
| 517 | basic_ostream<_CharT, _Traits> & | |
| 518 | 518 | __quoted_output ( basic_ostream<_CharT, _Traits> &__os, |
| 519 | 519 | _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape ) |
| 520 | 520 | { |
| ... | ... | @@ -527,7 +527,7 @@ __quoted_output ( basic_ostream<_CharT, _Traits> &__os, |
| 527 | 527 | __str.push_back(*__first); |
| 528 | 528 | } |
| 529 | 529 | __str.push_back(__delim); |
| 530 | return __put_character_sequence(__os, __str.data(), __str.size()); | |
| 530 | return _VSTD::__put_character_sequence(__os, __str.data(), __str.size()); | |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | template <class _CharT, class _Traits, class _String> |
lib/libcxx/include/ios+2-29| ... | ... | @@ -710,7 +710,7 @@ void |
| 710 | 710 | basic_ios<_CharT, _Traits>::init(basic_streambuf<char_type, traits_type>* __sb) |
| 711 | 711 | { |
| 712 | 712 | ios_base::init(__sb); |
| 713 | __tie_ = 0; | |
| 713 | __tie_ = nullptr; | |
| 714 | 714 | __fill_ = traits_type::eof(); |
| 715 | 715 | } |
| 716 | 716 | |
| ... | ... | @@ -821,7 +821,7 @@ basic_ios<_CharT, _Traits>::move(basic_ios& __rhs) |
| 821 | 821 | { |
| 822 | 822 | ios_base::move(__rhs); |
| 823 | 823 | __tie_ = __rhs.__tie_; |
| 824 | __rhs.__tie_ = 0; | |
| 824 | __rhs.__tie_ = nullptr; | |
| 825 | 825 | __fill_ = __rhs.__fill_; |
| 826 | 826 | } |
| 827 | 827 | |
| ... | ... | @@ -1035,33 +1035,6 @@ defaultfloat(ios_base& __str) |
| 1035 | 1035 | return __str; |
| 1036 | 1036 | } |
| 1037 | 1037 | |
| 1038 | template <class _CharT, class _Traits> | |
| 1039 | class __save_flags | |
| 1040 | { | |
| 1041 | typedef basic_ios<_CharT, _Traits> __stream_type; | |
| 1042 | typedef typename __stream_type::fmtflags fmtflags; | |
| 1043 | ||
| 1044 | __stream_type& __stream_; | |
| 1045 | fmtflags __fmtflags_; | |
| 1046 | _CharT __fill_; | |
| 1047 | ||
| 1048 | __save_flags(const __save_flags&); | |
| 1049 | __save_flags& operator=(const __save_flags&); | |
| 1050 | public: | |
| 1051 | _LIBCPP_INLINE_VISIBILITY | |
| 1052 | explicit __save_flags(__stream_type& __stream) | |
| 1053 | : __stream_(__stream), | |
| 1054 | __fmtflags_(__stream.flags()), | |
| 1055 | __fill_(__stream.fill()) | |
| 1056 | {} | |
| 1057 | _LIBCPP_INLINE_VISIBILITY | |
| 1058 | ~__save_flags() | |
| 1059 | { | |
| 1060 | __stream_.flags(__fmtflags_); | |
| 1061 | __stream_.fill(__fill_); | |
| 1062 | } | |
| 1063 | }; | |
| 1064 | ||
| 1065 | 1038 | _LIBCPP_END_NAMESPACE_STD |
| 1066 | 1039 | |
| 1067 | 1040 | #endif // _LIBCPP_IOS |
lib/libcxx/include/iosfwd+59| ... | ... | @@ -185,6 +185,36 @@ typedef basic_ifstream<wchar_t> wifstream; |
| 185 | 185 | typedef basic_ofstream<wchar_t> wofstream; |
| 186 | 186 | typedef basic_fstream<wchar_t> wfstream; |
| 187 | 187 | |
| 188 | template <class _CharT, class _Traits> | |
| 189 | class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_PREFERRED_NAME(wios) basic_ios; | |
| 190 | ||
| 191 | template <class _CharT, class _Traits> | |
| 192 | class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_PREFERRED_NAME(wstreambuf) basic_streambuf; | |
| 193 | template <class _CharT, class _Traits> | |
| 194 | class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_PREFERRED_NAME(wistream) basic_istream; | |
| 195 | template <class _CharT, class _Traits> | |
| 196 | class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_PREFERRED_NAME(wostream) basic_ostream; | |
| 197 | template <class _CharT, class _Traits> | |
| 198 | class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_PREFERRED_NAME(wiostream) basic_iostream; | |
| 199 | ||
| 200 | template <class _CharT, class _Traits, class _Allocator> | |
| 201 | class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_PREFERRED_NAME(wstringbuf) basic_stringbuf; | |
| 202 | template <class _CharT, class _Traits, class _Allocator> | |
| 203 | class _LIBCPP_PREFERRED_NAME(istringstream) _LIBCPP_PREFERRED_NAME(wistringstream) basic_istringstream; | |
| 204 | template <class _CharT, class _Traits, class _Allocator> | |
| 205 | class _LIBCPP_PREFERRED_NAME(ostringstream) _LIBCPP_PREFERRED_NAME(wostringstream) basic_ostringstream; | |
| 206 | template <class _CharT, class _Traits, class _Allocator> | |
| 207 | class _LIBCPP_PREFERRED_NAME(stringstream) _LIBCPP_PREFERRED_NAME(wstringstream) basic_stringstream; | |
| 208 | ||
| 209 | template <class _CharT, class _Traits> | |
| 210 | class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_PREFERRED_NAME(wfilebuf) basic_filebuf; | |
| 211 | template <class _CharT, class _Traits> | |
| 212 | class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_PREFERRED_NAME(wifstream) basic_ifstream; | |
| 213 | template <class _CharT, class _Traits> | |
| 214 | class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_PREFERRED_NAME(wofstream) basic_ofstream; | |
| 215 | template <class _CharT, class _Traits> | |
| 216 | class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_PREFERRED_NAME(wfstream) basic_fstream; | |
| 217 | ||
| 188 | 218 | template <class _State> class _LIBCPP_TEMPLATE_VIS fpos; |
| 189 | 219 | typedef fpos<mbstate_t> streampos; |
| 190 | 220 | typedef fpos<mbstate_t> wstreampos; |
| ... | ... | @@ -210,11 +240,40 @@ template <class _CharT, // for <stdexcept> |
| 210 | 240 | typedef basic_string<char, char_traits<char>, allocator<char> > string; |
| 211 | 241 | typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring; |
| 212 | 242 | |
| 243 | template <class _CharT, class _Traits, class _Allocator> | |
| 244 | class _LIBCPP_PREFERRED_NAME(string) _LIBCPP_PREFERRED_NAME(wstring) basic_string; | |
| 213 | 245 | |
| 214 | 246 | // Include other forward declarations here |
| 215 | 247 | template <class _Tp, class _Alloc = allocator<_Tp> > |
| 216 | 248 | class _LIBCPP_TEMPLATE_VIS vector; |
| 217 | 249 | |
| 250 | template <class _CharT, class _Traits> | |
| 251 | class __save_flags | |
| 252 | { | |
| 253 | typedef basic_ios<_CharT, _Traits> __stream_type; | |
| 254 | typedef typename __stream_type::fmtflags fmtflags; | |
| 255 | ||
| 256 | __stream_type& __stream_; | |
| 257 | fmtflags __fmtflags_; | |
| 258 | _CharT __fill_; | |
| 259 | ||
| 260 | __save_flags(const __save_flags&); | |
| 261 | __save_flags& operator=(const __save_flags&); | |
| 262 | public: | |
| 263 | _LIBCPP_INLINE_VISIBILITY | |
| 264 | explicit __save_flags(__stream_type& __stream) | |
| 265 | : __stream_(__stream), | |
| 266 | __fmtflags_(__stream.flags()), | |
| 267 | __fill_(__stream.fill()) | |
| 268 | {} | |
| 269 | _LIBCPP_INLINE_VISIBILITY | |
| 270 | ~__save_flags() | |
| 271 | { | |
| 272 | __stream_.flags(__fmtflags_); | |
| 273 | __stream_.fill(__fill_); | |
| 274 | } | |
| 275 | }; | |
| 276 | ||
| 218 | 277 | _LIBCPP_END_NAMESPACE_STD |
| 219 | 278 | |
| 220 | 279 | #endif // _LIBCPP_IOSFWD |
lib/libcxx/include/istream+21-13| ... | ... | @@ -150,9 +150,9 @@ template <class charT, class traits> |
| 150 | 150 | basic_istream<charT,traits>& |
| 151 | 151 | ws(basic_istream<charT,traits>& is); |
| 152 | 152 | |
| 153 | template <class charT, class traits, class T> | |
| 154 | basic_istream<charT, traits>& | |
| 155 | operator>>(basic_istream<charT, traits>&& is, T& x); | |
| 153 | // rvalue stream extraction | |
| 154 | template <class Stream, class T> | |
| 155 | Stream&& operator>>(Stream&& is, T&& x); | |
| 156 | 156 | |
| 157 | 157 | } // std |
| 158 | 158 | |
| ... | ... | @@ -1142,7 +1142,7 @@ basic_istream<_CharT, _Traits>::putback(char_type __c) |
| 1142 | 1142 | try |
| 1143 | 1143 | { |
| 1144 | 1144 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 1145 | if (this->rdbuf() == 0 || this->rdbuf()->sputbackc(__c) == traits_type::eof()) | |
| 1145 | if (this->rdbuf() == nullptr || this->rdbuf()->sputbackc(__c) == traits_type::eof()) | |
| 1146 | 1146 | __state |= ios_base::badbit; |
| 1147 | 1147 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 1148 | 1148 | } |
| ... | ... | @@ -1179,7 +1179,7 @@ basic_istream<_CharT, _Traits>::unget() |
| 1179 | 1179 | try |
| 1180 | 1180 | { |
| 1181 | 1181 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 1182 | if (this->rdbuf() == 0 || this->rdbuf()->sungetc() == traits_type::eof()) | |
| 1182 | if (this->rdbuf() == nullptr || this->rdbuf()->sungetc() == traits_type::eof()) | |
| 1183 | 1183 | __state |= ios_base::badbit; |
| 1184 | 1184 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 1185 | 1185 | } |
| ... | ... | @@ -1215,7 +1215,7 @@ basic_istream<_CharT, _Traits>::sync() |
| 1215 | 1215 | try |
| 1216 | 1216 | { |
| 1217 | 1217 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 1218 | if (this->rdbuf() == 0) | |
| 1218 | if (this->rdbuf() == nullptr) | |
| 1219 | 1219 | return -1; |
| 1220 | 1220 | if (this->rdbuf()->pubsync() == -1) |
| 1221 | 1221 | { |
| ... | ... | @@ -1378,13 +1378,23 @@ ws(basic_istream<_CharT, _Traits>& __is) |
| 1378 | 1378 | |
| 1379 | 1379 | #ifndef _LIBCPP_CXX03_LANG |
| 1380 | 1380 | |
| 1381 | template <class _CharT, class _Traits, class _Tp> | |
| 1382 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1383 | basic_istream<_CharT, _Traits>& | |
| 1384 | operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp&& __x) | |
| 1381 | template <class _Stream, class _Tp, class = void> | |
| 1382 | struct __is_istreamable : false_type { }; | |
| 1383 | ||
| 1384 | template <class _Stream, class _Tp> | |
| 1385 | struct __is_istreamable<_Stream, _Tp, decltype( | |
| 1386 | _VSTD::declval<_Stream>() >> _VSTD::declval<_Tp>(), void() | |
| 1387 | )> : true_type { }; | |
| 1388 | ||
| 1389 | template <class _Stream, class _Tp, class = typename enable_if< | |
| 1390 | _And<is_base_of<ios_base, _Stream>, | |
| 1391 | __is_istreamable<_Stream&, _Tp&&>>::value | |
| 1392 | >::type> | |
| 1393 | _LIBCPP_INLINE_VISIBILITY | |
| 1394 | _Stream&& operator>>(_Stream&& __is, _Tp&& __x) | |
| 1385 | 1395 | { |
| 1386 | 1396 | __is >> _VSTD::forward<_Tp>(__x); |
| 1387 | return __is; | |
| 1397 | return _VSTD::move(__is); | |
| 1388 | 1398 | } |
| 1389 | 1399 | |
| 1390 | 1400 | #endif // _LIBCPP_CXX03_LANG |
| ... | ... | @@ -1638,11 +1648,9 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x) |
| 1638 | 1648 | return __is; |
| 1639 | 1649 | } |
| 1640 | 1650 | |
| 1641 | #ifndef _LIBCPP_DO_NOT_ASSUME_STREAMS_EXPLICIT_INSTANTIATION_IN_DYLIB | |
| 1642 | 1651 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>) |
| 1643 | 1652 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>) |
| 1644 | 1653 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>) |
| 1645 | #endif | |
| 1646 | 1654 | |
| 1647 | 1655 | _LIBCPP_END_NAMESPACE_STD |
| 1648 | 1656 |
lib/libcxx/include/iterator+69-52| ... | ... | @@ -420,10 +420,8 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept; |
| 420 | 420 | #include <type_traits> |
| 421 | 421 | #include <cstddef> |
| 422 | 422 | #include <initializer_list> |
| 423 | #include <__memory/base.h> | |
| 423 | 424 | #include <version> |
| 424 | #ifdef __APPLE__ | |
| 425 | #include <Availability.h> | |
| 426 | #endif | |
| 427 | 425 | |
| 428 | 426 | #include <__debug> |
| 429 | 427 | |
| ... | ... | @@ -498,12 +496,11 @@ struct __has_iterator_typedefs |
| 498 | 496 | private: |
| 499 | 497 | struct __two {char __lx; char __lxx;}; |
| 500 | 498 | template <class _Up> static __two __test(...); |
| 501 | template <class _Up> static char __test(typename std::__void_t<typename _Up::iterator_category>::type* = 0, | |
| 502 | 										typename std::__void_t<typename _Up::difference_type>::type* = 0, | |
| 503 | 										typename std::__void_t<typename _Up::value_type>::type* = 0, | |
| 504 | 										typename std::__void_t<typename _Up::reference>::type* = 0, | |
| 505 | 										typename std::__void_t<typename _Up::pointer>::type* = 0 | |
| 506 | 										); | |
| 499 | template <class _Up> static char __test(typename __void_t<typename _Up::iterator_category>::type* = 0, | |
| 500 | typename __void_t<typename _Up::difference_type>::type* = 0, | |
| 501 | typename __void_t<typename _Up::value_type>::type* = 0, | |
| 502 | typename __void_t<typename _Up::reference>::type* = 0, | |
| 503 | typename __void_t<typename _Up::pointer>::type* = 0); | |
| 507 | 504 | public: |
| 508 | 505 | static const bool value = sizeof(__test<_Tp>(0,0,0,0,0)) == 1; |
| 509 | 506 | }; |
| ... | ... | @@ -515,9 +512,9 @@ struct __has_iterator_category |
| 515 | 512 | private: |
| 516 | 513 | struct __two {char __lx; char __lxx;}; |
| 517 | 514 | template <class _Up> static __two __test(...); |
| 518 | template <class _Up> static char __test(typename _Up::iterator_category* = 0); | |
| 515 | template <class _Up> static char __test(typename _Up::iterator_category* = nullptr); | |
| 519 | 516 | public: |
| 520 | static const bool value = sizeof(__test<_Tp>(0)) == 1; | |
| 517 | static const bool value = sizeof(__test<_Tp>(nullptr)) == 1; | |
| 521 | 518 | }; |
| 522 | 519 | |
| 523 | 520 | template <class _Iter, bool> struct __iterator_traits_impl {}; |
| ... | ... | @@ -667,9 +664,9 @@ void advance(_InputIter& __i, _Distance __orig_n) |
| 667 | 664 | { |
| 668 | 665 | _LIBCPP_ASSERT(__orig_n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value, |
| 669 | 666 | "Attempt to advance(it, n) with negative n on a non-bidirectional iterator"); |
| 670 | typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize; | |
| 667 | typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; | |
| 671 | 668 | _IntegralSize __n = __orig_n; |
| 672 | __advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category()); | |
| 669 | _VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category()); | |
| 673 | 670 | } |
| 674 | 671 | |
| 675 | 672 | template <class _InputIter> |
| ... | ... | @@ -696,7 +693,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 |
| 696 | 693 | typename iterator_traits<_InputIter>::difference_type |
| 697 | 694 | distance(_InputIter __first, _InputIter __last) |
| 698 | 695 | { |
| 699 | return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category()); | |
| 696 | return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category()); | |
| 700 | 697 | } |
| 701 | 698 | |
| 702 | 699 | template <class _InputIter> |
| ... | ... | @@ -998,11 +995,11 @@ private: |
| 998 | 995 | istream_type* __in_stream_; |
| 999 | 996 | _Tp __value_; |
| 1000 | 997 | public: |
| 1001 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(0), __value_() {} | |
| 998 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {} | |
| 1002 | 999 | _LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s)) |
| 1003 | 1000 | { |
| 1004 | 1001 | if (!(*__in_stream_ >> __value_)) |
| 1005 | __in_stream_ = 0; | |
| 1002 | __in_stream_ = nullptr; | |
| 1006 | 1003 | } |
| 1007 | 1004 | |
| 1008 | 1005 | _LIBCPP_INLINE_VISIBILITY const _Tp& operator*() const {return __value_;} |
| ... | ... | @@ -1010,7 +1007,7 @@ public: |
| 1010 | 1007 | _LIBCPP_INLINE_VISIBILITY istream_iterator& operator++() |
| 1011 | 1008 | { |
| 1012 | 1009 | if (!(*__in_stream_ >> __value_)) |
| 1013 | __in_stream_ = 0; | |
| 1010 | __in_stream_ = nullptr; | |
| 1014 | 1011 | return *this; |
| 1015 | 1012 | } |
| 1016 | 1013 | _LIBCPP_INLINE_VISIBILITY istream_iterator operator++(int) |
| ... | ... | @@ -1052,15 +1049,25 @@ class _LIBCPP_TEMPLATE_VIS ostream_iterator |
| 1052 | 1049 | : public iterator<output_iterator_tag, void, void, void, void> |
| 1053 | 1050 | { |
| 1054 | 1051 | public: |
| 1055 | typedef _CharT char_type; | |
| 1056 | typedef _Traits traits_type; | |
| 1057 | typedef basic_ostream<_CharT,_Traits> ostream_type; | |
| 1052 | typedef output_iterator_tag iterator_category; | |
| 1053 | typedef void value_type; | |
| 1054 | #if _LIBCPP_STD_VER > 17 | |
| 1055 | typedef std::ptrdiff_t difference_type; | |
| 1056 | #else | |
| 1057 | typedef void difference_type; | |
| 1058 | #endif | |
| 1059 | typedef void pointer; | |
| 1060 | typedef void reference; | |
| 1061 | typedef _CharT char_type; | |
| 1062 | typedef _Traits traits_type; | |
| 1063 | typedef basic_ostream<_CharT, _Traits> ostream_type; | |
| 1064 | ||
| 1058 | 1065 | private: |
| 1059 | 1066 | ostream_type* __out_stream_; |
| 1060 | 1067 | const char_type* __delim_; |
| 1061 | 1068 | public: |
| 1062 | 1069 | _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s) _NOEXCEPT |
| 1063 | : __out_stream_(_VSTD::addressof(__s)), __delim_(0) {} | |
| 1070 | : __out_stream_(_VSTD::addressof(__s)), __delim_(nullptr) {} | |
| 1064 | 1071 | _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT |
| 1065 | 1072 | : __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {} |
| 1066 | 1073 | _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value_) |
| ... | ... | @@ -1106,11 +1113,11 @@ private: |
| 1106 | 1113 | bool __test_for_eof() const |
| 1107 | 1114 | { |
| 1108 | 1115 | if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof())) |
| 1109 | __sbuf_ = 0; | |
| 1110 | return __sbuf_ == 0; | |
| 1116 | __sbuf_ = nullptr; | |
| 1117 | return __sbuf_ == nullptr; | |
| 1111 | 1118 | } |
| 1112 | 1119 | public: |
| 1113 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {} | |
| 1120 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {} | |
| 1114 | 1121 | _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT |
| 1115 | 1122 | : __sbuf_(__s.rdbuf()) {} |
| 1116 | 1123 | _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT |
| ... | ... | @@ -1151,10 +1158,20 @@ class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator |
| 1151 | 1158 | : public iterator<output_iterator_tag, void, void, void, void> |
| 1152 | 1159 | { |
| 1153 | 1160 | public: |
| 1154 | typedef _CharT char_type; | |
| 1155 | typedef _Traits traits_type; | |
| 1156 | typedef basic_streambuf<_CharT,_Traits> streambuf_type; | |
| 1157 | typedef basic_ostream<_CharT,_Traits> ostream_type; | |
| 1161 | typedef output_iterator_tag iterator_category; | |
| 1162 | typedef void value_type; | |
| 1163 | #if _LIBCPP_STD_VER > 17 | |
| 1164 | typedef std::ptrdiff_t difference_type; | |
| 1165 | #else | |
| 1166 | typedef void difference_type; | |
| 1167 | #endif | |
| 1168 | typedef void pointer; | |
| 1169 | typedef void reference; | |
| 1170 | typedef _CharT char_type; | |
| 1171 | typedef _Traits traits_type; | |
| 1172 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
| 1173 | typedef basic_ostream<_CharT, _Traits> ostream_type; | |
| 1174 | ||
| 1158 | 1175 | private: |
| 1159 | 1176 | streambuf_type* __sbuf_; |
| 1160 | 1177 | public: |
| ... | ... | @@ -1165,13 +1182,13 @@ public: |
| 1165 | 1182 | _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator=(_CharT __c) |
| 1166 | 1183 | { |
| 1167 | 1184 | if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof())) |
| 1168 | __sbuf_ = 0; | |
| 1185 | __sbuf_ = nullptr; | |
| 1169 | 1186 | return *this; |
| 1170 | 1187 | } |
| 1171 | 1188 | _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator*() {return *this;} |
| 1172 | 1189 | _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++() {return *this;} |
| 1173 | 1190 | _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;} |
| 1174 | _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;} | |
| 1191 | _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == nullptr;} | |
| 1175 | 1192 | |
| 1176 | 1193 | template <class _Ch, class _Tr> |
| 1177 | 1194 | friend |
| ... | ... | @@ -1373,13 +1390,13 @@ operator+(typename __wrap_iter<_Iter>::difference_type, __wrap_iter<_Iter>) _NOE |
| 1373 | 1390 | |
| 1374 | 1391 | template <class _Ip, class _Op> _Op _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 copy(_Ip, _Ip, _Op); |
| 1375 | 1392 | template <class _B1, class _B2> _B2 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 copy_backward(_B1, _B1, _B2); |
| 1376 | template <class _Ip, class _Op> _Op _LIBCPP_INLINE_VISIBILITY move(_Ip, _Ip, _Op); | |
| 1377 | template <class _B1, class _B2> _B2 _LIBCPP_INLINE_VISIBILITY move_backward(_B1, _B1, _B2); | |
| 1393 | template <class _Ip, class _Op> _Op _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 move(_Ip, _Ip, _Op); | |
| 1394 | template <class _B1, class _B2> _B2 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 move_backward(_B1, _B1, _B2); | |
| 1378 | 1395 | |
| 1379 | 1396 | #if _LIBCPP_DEBUG_LEVEL < 2 |
| 1380 | 1397 | |
| 1381 | 1398 | template <class _Tp> |
| 1382 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG | |
| 1399 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1383 | 1400 | typename enable_if |
| 1384 | 1401 | < |
| 1385 | 1402 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1390,7 +1407,7 @@ __unwrap_iter(__wrap_iter<_Tp*>); |
| 1390 | 1407 | #else |
| 1391 | 1408 | |
| 1392 | 1409 | template <class _Tp> |
| 1393 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG | |
| 1410 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1394 | 1411 | typename enable_if |
| 1395 | 1412 | < |
| 1396 | 1413 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1418,20 +1435,20 @@ public: |
| 1418 | 1435 | : __i{} |
| 1419 | 1436 | #endif |
| 1420 | 1437 | { |
| 1421 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1438 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1422 | 1439 | __get_db()->__insert_i(this); |
| 1423 | 1440 | #endif |
| 1424 | 1441 | } |
| 1425 | 1442 | template <class _Up> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG |
| 1426 | 1443 | __wrap_iter(const __wrap_iter<_Up>& __u, |
| 1427 | typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = 0) _NOEXCEPT | |
| 1444 | typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = nullptr) _NOEXCEPT | |
| 1428 | 1445 | : __i(__u.base()) |
| 1429 | 1446 | { |
| 1430 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1447 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1431 | 1448 | __get_db()->__iterator_copy(this, &__u); |
| 1432 | 1449 | #endif |
| 1433 | 1450 | } |
| 1434 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1451 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1435 | 1452 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG |
| 1436 | 1453 | __wrap_iter(const __wrap_iter& __x) |
| 1437 | 1454 | : __i(__x.base()) |
| ... | ... | @@ -1456,7 +1473,7 @@ public: |
| 1456 | 1473 | #endif |
| 1457 | 1474 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG reference operator*() const _NOEXCEPT |
| 1458 | 1475 | { |
| 1459 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1476 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1460 | 1477 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 1461 | 1478 | "Attempted to dereference a non-dereferenceable iterator"); |
| 1462 | 1479 | #endif |
| ... | ... | @@ -1464,7 +1481,7 @@ public: |
| 1464 | 1481 | } |
| 1465 | 1482 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG pointer operator->() const _NOEXCEPT |
| 1466 | 1483 | { |
| 1467 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1484 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1468 | 1485 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 1469 | 1486 | "Attempted to dereference a non-dereferenceable iterator"); |
| 1470 | 1487 | #endif |
| ... | ... | @@ -1472,7 +1489,7 @@ public: |
| 1472 | 1489 | } |
| 1473 | 1490 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator++() _NOEXCEPT |
| 1474 | 1491 | { |
| 1475 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1492 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1476 | 1493 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 1477 | 1494 | "Attempted to increment non-incrementable iterator"); |
| 1478 | 1495 | #endif |
| ... | ... | @@ -1484,7 +1501,7 @@ public: |
| 1484 | 1501 | |
| 1485 | 1502 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator--() _NOEXCEPT |
| 1486 | 1503 | { |
| 1487 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1504 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1488 | 1505 | _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), |
| 1489 | 1506 | "Attempted to decrement non-decrementable iterator"); |
| 1490 | 1507 | #endif |
| ... | ... | @@ -1497,7 +1514,7 @@ public: |
| 1497 | 1514 | {__wrap_iter __w(*this); __w += __n; return __w;} |
| 1498 | 1515 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator+=(difference_type __n) _NOEXCEPT |
| 1499 | 1516 | { |
| 1500 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1517 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1501 | 1518 | _LIBCPP_ASSERT(__get_const_db()->__addable(this, __n), |
| 1502 | 1519 | "Attempted to add/subtract iterator outside of valid range"); |
| 1503 | 1520 | #endif |
| ... | ... | @@ -1510,7 +1527,7 @@ public: |
| 1510 | 1527 | {*this += -__n; return *this;} |
| 1511 | 1528 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG reference operator[](difference_type __n) const _NOEXCEPT |
| 1512 | 1529 | { |
| 1513 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1530 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1514 | 1531 | _LIBCPP_ASSERT(__get_const_db()->__subscriptable(this, __n), |
| 1515 | 1532 | "Attempted to subscript iterator outside of valid range"); |
| 1516 | 1533 | #endif |
| ... | ... | @@ -1520,7 +1537,7 @@ public: |
| 1520 | 1537 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;} |
| 1521 | 1538 | |
| 1522 | 1539 | private: |
| 1523 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1540 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1524 | 1541 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(const void* __p, iterator_type __x) : __i(__x) |
| 1525 | 1542 | { |
| 1526 | 1543 | __get_db()->__insert_ic(this, __p); |
| ... | ... | @@ -1584,12 +1601,12 @@ private: |
| 1584 | 1601 | |
| 1585 | 1602 | template <class _Ip, class _Op> friend _LIBCPP_CONSTEXPR_AFTER_CXX17 _Op copy(_Ip, _Ip, _Op); |
| 1586 | 1603 | template <class _B1, class _B2> friend _LIBCPP_CONSTEXPR_AFTER_CXX17 _B2 copy_backward(_B1, _B1, _B2); |
| 1587 | template <class _Ip, class _Op> friend _Op move(_Ip, _Ip, _Op); | |
| 1588 | template <class _B1, class _B2> friend _B2 move_backward(_B1, _B1, _B2); | |
| 1604 | template <class _Ip, class _Op> friend _LIBCPP_CONSTEXPR_AFTER_CXX17 _Op move(_Ip, _Ip, _Op); | |
| 1605 | template <class _B1, class _B2> friend _LIBCPP_CONSTEXPR_AFTER_CXX17 _B2 move_backward(_B1, _B1, _B2); | |
| 1589 | 1606 | |
| 1590 | 1607 | #if _LIBCPP_DEBUG_LEVEL < 2 |
| 1591 | 1608 | template <class _Tp> |
| 1592 | _LIBCPP_CONSTEXPR_IF_NODEBUG friend | |
| 1609 | _LIBCPP_CONSTEXPR friend | |
| 1593 | 1610 | typename enable_if |
| 1594 | 1611 | < |
| 1595 | 1612 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1598,7 +1615,7 @@ private: |
| 1598 | 1615 | __unwrap_iter(__wrap_iter<_Tp*>); |
| 1599 | 1616 | #else |
| 1600 | 1617 | template <class _Tp> |
| 1601 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG | |
| 1618 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR friend | |
| 1602 | 1619 | typename enable_if |
| 1603 | 1620 | < |
| 1604 | 1621 | is_trivially_copy_assignable<_Tp>::value, |
| ... | ... | @@ -1621,7 +1638,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG |
| 1621 | 1638 | bool |
| 1622 | 1639 | operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT |
| 1623 | 1640 | { |
| 1624 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1641 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1625 | 1642 | _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y), |
| 1626 | 1643 | "Attempted to compare incomparable iterators"); |
| 1627 | 1644 | #endif |
| ... | ... | @@ -1699,7 +1716,7 @@ auto |
| 1699 | 1716 | operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT |
| 1700 | 1717 | -> decltype(__x.base() - __y.base()) |
| 1701 | 1718 | { |
| 1702 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1719 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1703 | 1720 | _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y), |
| 1704 | 1721 | "Attempted to subtract incompatible iterators"); |
| 1705 | 1722 | #endif |
| ... | ... | @@ -1711,7 +1728,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG |
| 1711 | 1728 | typename __wrap_iter<_Iter1>::difference_type |
| 1712 | 1729 | operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT |
| 1713 | 1730 | { |
| 1714 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1731 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1715 | 1732 | _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y), |
| 1716 | 1733 | "Attempted to subtract incompatible iterators"); |
| 1717 | 1734 | #endif |
lib/libcxx/include/latch+8| ... | ... | @@ -19,6 +19,8 @@ namespace std |
| 19 | 19 | class latch |
| 20 | 20 | { |
| 21 | 21 | public: |
| 22 | static constexpr ptrdiff_t max() noexcept; | |
| 23 | ||
| 22 | 24 | constexpr explicit latch(ptrdiff_t __expected); |
| 23 | 25 | ~latch(); |
| 24 | 26 | |
| ... | ... | @@ -39,6 +41,7 @@ namespace std |
| 39 | 41 | */ |
| 40 | 42 | |
| 41 | 43 | #include <__config> |
| 44 | #include <__availability> | |
| 42 | 45 | #include <atomic> |
| 43 | 46 | |
| 44 | 47 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| ... | ... | @@ -49,6 +52,9 @@ namespace std |
| 49 | 52 | # error <latch> is not supported on this single threaded system |
| 50 | 53 | #endif |
| 51 | 54 | |
| 55 | _LIBCPP_PUSH_MACROS | |
| 56 | #include <__undef_macros> | |
| 57 | ||
| 52 | 58 | #if _LIBCPP_STD_VER >= 14 |
| 53 | 59 | |
| 54 | 60 | _LIBCPP_BEGIN_NAMESPACE_STD |
| ... | ... | @@ -101,4 +107,6 @@ _LIBCPP_END_NAMESPACE_STD |
| 101 | 107 | |
| 102 | 108 | #endif // _LIBCPP_STD_VER >= 14 |
| 103 | 109 | |
| 110 | _LIBCPP_POP_MACROS | |
| 111 | ||
| 104 | 112 | #endif //_LIBCPP_LATCH |
lib/libcxx/include/limits+2-2| ... | ... | @@ -105,11 +105,11 @@ template<> class numeric_limits<cv long double>; |
| 105 | 105 | #include <type_traits> |
| 106 | 106 | |
| 107 | 107 | #if defined(_LIBCPP_COMPILER_MSVC) |
| 108 | #include "support/win32/limits_msvc_win32.h" | |
| 108 | #include "__support/win32/limits_msvc_win32.h" | |
| 109 | 109 | #endif // _LIBCPP_MSVCRT |
| 110 | 110 | |
| 111 | 111 | #if defined(__IBMCPP__) |
| 112 | #include "support/ibm/limits.h" | |
| 112 | #include "__support/ibm/limits.h" | |
| 113 | 113 | #endif // __IBMCPP__ |
| 114 | 114 | |
| 115 | 115 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
lib/libcxx/include/list+93-93| ... | ... | @@ -293,7 +293,7 @@ class _LIBCPP_TEMPLATE_VIS __list_iterator |
| 293 | 293 | |
| 294 | 294 | __link_pointer __ptr_; |
| 295 | 295 | |
| 296 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 296 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 297 | 297 | _LIBCPP_INLINE_VISIBILITY |
| 298 | 298 | explicit __list_iterator(__link_pointer __p, const void* __c) _NOEXCEPT |
| 299 | 299 | : __ptr_(__p) |
| ... | ... | @@ -320,12 +320,12 @@ public: |
| 320 | 320 | _LIBCPP_INLINE_VISIBILITY |
| 321 | 321 | __list_iterator() _NOEXCEPT : __ptr_(nullptr) |
| 322 | 322 | { |
| 323 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 323 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 324 | 324 | __get_db()->__insert_i(this); |
| 325 | 325 | #endif |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 328 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 329 | 329 | |
| 330 | 330 | _LIBCPP_INLINE_VISIBILITY |
| 331 | 331 | __list_iterator(const __list_iterator& __p) |
| ... | ... | @@ -351,12 +351,12 @@ public: |
| 351 | 351 | return *this; |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 354 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 355 | 355 | |
| 356 | 356 | _LIBCPP_INLINE_VISIBILITY |
| 357 | 357 | reference operator*() const |
| 358 | 358 | { |
| 359 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 359 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 360 | 360 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 361 | 361 | "Attempted to dereference a non-dereferenceable list::iterator"); |
| 362 | 362 | #endif |
| ... | ... | @@ -365,7 +365,7 @@ public: |
| 365 | 365 | _LIBCPP_INLINE_VISIBILITY |
| 366 | 366 | pointer operator->() const |
| 367 | 367 | { |
| 368 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 368 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 369 | 369 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 370 | 370 | "Attempted to dereference a non-dereferenceable list::iterator"); |
| 371 | 371 | #endif |
| ... | ... | @@ -375,7 +375,7 @@ public: |
| 375 | 375 | _LIBCPP_INLINE_VISIBILITY |
| 376 | 376 | __list_iterator& operator++() |
| 377 | 377 | { |
| 378 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 378 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 379 | 379 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 380 | 380 | "Attempted to increment non-incrementable list::iterator"); |
| 381 | 381 | #endif |
| ... | ... | @@ -388,7 +388,7 @@ public: |
| 388 | 388 | _LIBCPP_INLINE_VISIBILITY |
| 389 | 389 | __list_iterator& operator--() |
| 390 | 390 | { |
| 391 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 391 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 392 | 392 | _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), |
| 393 | 393 | "Attempted to decrement non-decrementable list::iterator"); |
| 394 | 394 | #endif |
| ... | ... | @@ -416,7 +416,7 @@ class _LIBCPP_TEMPLATE_VIS __list_const_iterator |
| 416 | 416 | |
| 417 | 417 | __link_pointer __ptr_; |
| 418 | 418 | |
| 419 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 419 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 420 | 420 | _LIBCPP_INLINE_VISIBILITY |
| 421 | 421 | explicit __list_const_iterator(__link_pointer __p, const void* __c) _NOEXCEPT |
| 422 | 422 | : __ptr_(__p) |
| ... | ... | @@ -440,7 +440,7 @@ public: |
| 440 | 440 | _LIBCPP_INLINE_VISIBILITY |
| 441 | 441 | __list_const_iterator() _NOEXCEPT : __ptr_(nullptr) |
| 442 | 442 | { |
| 443 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 443 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 444 | 444 | __get_db()->__insert_i(this); |
| 445 | 445 | #endif |
| 446 | 446 | } |
| ... | ... | @@ -448,12 +448,12 @@ public: |
| 448 | 448 | __list_const_iterator(const __list_iterator<_Tp, _VoidPtr>& __p) _NOEXCEPT |
| 449 | 449 | : __ptr_(__p.__ptr_) |
| 450 | 450 | { |
| 451 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 451 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 452 | 452 | __get_db()->__iterator_copy(this, &__p); |
| 453 | 453 | #endif |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 456 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 457 | 457 | |
| 458 | 458 | _LIBCPP_INLINE_VISIBILITY |
| 459 | 459 | __list_const_iterator(const __list_const_iterator& __p) |
| ... | ... | @@ -479,11 +479,11 @@ public: |
| 479 | 479 | return *this; |
| 480 | 480 | } |
| 481 | 481 | |
| 482 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 482 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 483 | 483 | _LIBCPP_INLINE_VISIBILITY |
| 484 | 484 | reference operator*() const |
| 485 | 485 | { |
| 486 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 486 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 487 | 487 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 488 | 488 | "Attempted to dereference a non-dereferenceable list::const_iterator"); |
| 489 | 489 | #endif |
| ... | ... | @@ -492,7 +492,7 @@ public: |
| 492 | 492 | _LIBCPP_INLINE_VISIBILITY |
| 493 | 493 | pointer operator->() const |
| 494 | 494 | { |
| 495 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 495 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 496 | 496 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 497 | 497 | "Attempted to dereference a non-dereferenceable list::const_iterator"); |
| 498 | 498 | #endif |
| ... | ... | @@ -502,7 +502,7 @@ public: |
| 502 | 502 | _LIBCPP_INLINE_VISIBILITY |
| 503 | 503 | __list_const_iterator& operator++() |
| 504 | 504 | { |
| 505 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 505 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 506 | 506 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), |
| 507 | 507 | "Attempted to increment non-incrementable list::const_iterator"); |
| 508 | 508 | #endif |
| ... | ... | @@ -515,7 +515,7 @@ public: |
| 515 | 515 | _LIBCPP_INLINE_VISIBILITY |
| 516 | 516 | __list_const_iterator& operator--() |
| 517 | 517 | { |
| 518 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 518 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 519 | 519 | _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), |
| 520 | 520 | "Attempted to decrement non-decrementable list::const_iterator"); |
| 521 | 521 | #endif |
| ... | ... | @@ -614,7 +614,7 @@ protected: |
| 614 | 614 | _LIBCPP_INLINE_VISIBILITY |
| 615 | 615 | iterator begin() _NOEXCEPT |
| 616 | 616 | { |
| 617 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 617 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 618 | 618 | return iterator(__end_.__next_, this); |
| 619 | 619 | #else |
| 620 | 620 | return iterator(__end_.__next_); |
| ... | ... | @@ -623,7 +623,7 @@ protected: |
| 623 | 623 | _LIBCPP_INLINE_VISIBILITY |
| 624 | 624 | const_iterator begin() const _NOEXCEPT |
| 625 | 625 | { |
| 626 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 626 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 627 | 627 | return const_iterator(__end_.__next_, this); |
| 628 | 628 | #else |
| 629 | 629 | return const_iterator(__end_.__next_); |
| ... | ... | @@ -632,7 +632,7 @@ protected: |
| 632 | 632 | _LIBCPP_INLINE_VISIBILITY |
| 633 | 633 | iterator end() _NOEXCEPT |
| 634 | 634 | { |
| 635 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 635 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 636 | 636 | return iterator(__end_as_link(), this); |
| 637 | 637 | #else |
| 638 | 638 | return iterator(__end_as_link()); |
| ... | ... | @@ -641,7 +641,7 @@ protected: |
| 641 | 641 | _LIBCPP_INLINE_VISIBILITY |
| 642 | 642 | const_iterator end() const _NOEXCEPT |
| 643 | 643 | { |
| 644 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 644 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 645 | 645 | return const_iterator(__end_as_link(), this); |
| 646 | 646 | #else |
| 647 | 647 | return const_iterator(__end_as_link()); |
| ... | ... | @@ -696,7 +696,7 @@ private: |
| 696 | 696 | |
| 697 | 697 | _LIBCPP_INLINE_VISIBILITY |
| 698 | 698 | void __invalidate_all_iterators() { |
| 699 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 699 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 700 | 700 | __get_db()->__invalidate_all(this); |
| 701 | 701 | #endif |
| 702 | 702 | } |
| ... | ... | @@ -735,13 +735,13 @@ inline __list_imp<_Tp, _Alloc>::__list_imp(const __node_allocator& __a) |
| 735 | 735 | #ifndef _LIBCPP_CXX03_LANG |
| 736 | 736 | template <class _Tp, class _Alloc> |
| 737 | 737 | inline __list_imp<_Tp, _Alloc>::__list_imp(__node_allocator&& __a) _NOEXCEPT |
| 738 | : __size_alloc_(0, std::move(__a)) {} | |
| 738 | : __size_alloc_(0, _VSTD::move(__a)) {} | |
| 739 | 739 | #endif |
| 740 | 740 | |
| 741 | 741 | template <class _Tp, class _Alloc> |
| 742 | 742 | __list_imp<_Tp, _Alloc>::~__list_imp() { |
| 743 | 743 | clear(); |
| 744 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 744 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 745 | 745 | __get_db()->__erase_c(this); |
| 746 | 746 | #endif |
| 747 | 747 | } |
| ... | ... | @@ -783,7 +783,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) |
| 783 | 783 | "list::swap: Either propagate_on_container_swap must be true" |
| 784 | 784 | " or the allocators must compare equal"); |
| 785 | 785 | using _VSTD::swap; |
| 786 | __swap_allocator(__node_alloc(), __c.__node_alloc()); | |
| 786 | _VSTD::__swap_allocator(__node_alloc(), __c.__node_alloc()); | |
| 787 | 787 | swap(__sz(), __c.__sz()); |
| 788 | 788 | swap(__end_, __c.__end_); |
| 789 | 789 | if (__sz() == 0) |
| ... | ... | @@ -795,13 +795,13 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) |
| 795 | 795 | else |
| 796 | 796 | __c.__end_.__prev_->__next_ = __c.__end_.__next_->__prev_ = __c.__end_as_link(); |
| 797 | 797 | |
| 798 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 798 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 799 | 799 | __libcpp_db* __db = __get_db(); |
| 800 | 800 | __c_node* __cn1 = __db->__find_c_and_lock(this); |
| 801 | 801 | __c_node* __cn2 = __db->__find_c(&__c); |
| 802 | std::swap(__cn1->beg_, __cn2->beg_); | |
| 803 | std::swap(__cn1->end_, __cn2->end_); | |
| 804 | std::swap(__cn1->cap_, __cn2->cap_); | |
| 802 | _VSTD::swap(__cn1->beg_, __cn2->beg_); | |
| 803 | _VSTD::swap(__cn1->end_, __cn2->end_); | |
| 804 | _VSTD::swap(__cn1->cap_, __cn2->cap_); | |
| 805 | 805 | for (__i_node** __p = __cn1->end_; __p != __cn1->beg_;) |
| 806 | 806 | { |
| 807 | 807 | --__p; |
| ... | ... | @@ -810,7 +810,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) |
| 810 | 810 | { |
| 811 | 811 | __cn2->__add(*__p); |
| 812 | 812 | if (--__cn1->end_ != __p) |
| 813 | memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*)); | |
| 813 | _VSTD::memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*)); | |
| 814 | 814 | } |
| 815 | 815 | else |
| 816 | 816 | (*__p)->__c_ = __cn1; |
| ... | ... | @@ -823,7 +823,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) |
| 823 | 823 | { |
| 824 | 824 | __cn1->__add(*__p); |
| 825 | 825 | if (--__cn2->end_ != __p) |
| 826 | memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); | |
| 826 | _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); | |
| 827 | 827 | } |
| 828 | 828 | else |
| 829 | 829 | (*__p)->__c_ = __cn2; |
| ... | ... | @@ -870,14 +870,14 @@ public: |
| 870 | 870 | list() |
| 871 | 871 | _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value) |
| 872 | 872 | { |
| 873 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 873 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 874 | 874 | __get_db()->__insert_c(this); |
| 875 | 875 | #endif |
| 876 | 876 | } |
| 877 | 877 | _LIBCPP_INLINE_VISIBILITY |
| 878 | 878 | explicit list(const allocator_type& __a) : base(__a) |
| 879 | 879 | { |
| 880 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 880 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 881 | 881 | __get_db()->__insert_c(this); |
| 882 | 882 | #endif |
| 883 | 883 | } |
| ... | ... | @@ -937,7 +937,7 @@ public: |
| 937 | 937 | _LIBCPP_INLINE_VISIBILITY |
| 938 | 938 | size_type max_size() const _NOEXCEPT |
| 939 | 939 | { |
| 940 | return std::min<size_type>( | |
| 940 | return _VSTD::min<size_type>( | |
| 941 | 941 | base::__node_alloc_max_size(), |
| 942 | 942 | numeric_limits<difference_type >::max()); |
| 943 | 943 | } |
| ... | ... | @@ -1117,14 +1117,14 @@ public: |
| 1117 | 1117 | return __hold_pointer(__p, __node_destructor(__na, 1)); |
| 1118 | 1118 | } |
| 1119 | 1119 | |
| 1120 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1120 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1121 | 1121 | |
| 1122 | 1122 | bool __dereferenceable(const const_iterator* __i) const; |
| 1123 | 1123 | bool __decrementable(const const_iterator* __i) const; |
| 1124 | 1124 | bool __addable(const const_iterator* __i, ptrdiff_t __n) const; |
| 1125 | 1125 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const; |
| 1126 | 1126 | |
| 1127 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1127 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 1128 | 1128 | |
| 1129 | 1129 | private: |
| 1130 | 1130 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1144,7 +1144,7 @@ private: |
| 1144 | 1144 | |
| 1145 | 1145 | #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES |
| 1146 | 1146 | template<class _InputIterator, |
| 1147 | class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 1147 | class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 1148 | 1148 | class = typename enable_if<__is_allocator<_Alloc>::value, void>::type |
| 1149 | 1149 | > |
| 1150 | 1150 | list(_InputIterator, _InputIterator) |
| ... | ... | @@ -1207,7 +1207,7 @@ list<_Tp, _Alloc>::__iterator(size_type __n) |
| 1207 | 1207 | template <class _Tp, class _Alloc> |
| 1208 | 1208 | list<_Tp, _Alloc>::list(size_type __n) |
| 1209 | 1209 | { |
| 1210 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1210 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1211 | 1211 | __get_db()->__insert_c(this); |
| 1212 | 1212 | #endif |
| 1213 | 1213 | for (; __n > 0; --__n) |
| ... | ... | @@ -1222,7 +1222,7 @@ list<_Tp, _Alloc>::list(size_type __n) |
| 1222 | 1222 | template <class _Tp, class _Alloc> |
| 1223 | 1223 | list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) : base(__a) |
| 1224 | 1224 | { |
| 1225 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1225 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1226 | 1226 | __get_db()->__insert_c(this); |
| 1227 | 1227 | #endif |
| 1228 | 1228 | for (; __n > 0; --__n) |
| ... | ... | @@ -1233,7 +1233,7 @@ list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) : base(__a) |
| 1233 | 1233 | template <class _Tp, class _Alloc> |
| 1234 | 1234 | list<_Tp, _Alloc>::list(size_type __n, const value_type& __x) |
| 1235 | 1235 | { |
| 1236 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1236 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1237 | 1237 | __get_db()->__insert_c(this); |
| 1238 | 1238 | #endif |
| 1239 | 1239 | for (; __n > 0; --__n) |
| ... | ... | @@ -1244,7 +1244,7 @@ template <class _Tp, class _Alloc> |
| 1244 | 1244 | list<_Tp, _Alloc>::list(size_type __n, const value_type& __x, const allocator_type& __a) |
| 1245 | 1245 | : base(__a) |
| 1246 | 1246 | { |
| 1247 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1247 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1248 | 1248 | __get_db()->__insert_c(this); |
| 1249 | 1249 | #endif |
| 1250 | 1250 | for (; __n > 0; --__n) |
| ... | ... | @@ -1256,7 +1256,7 @@ template <class _InpIter> |
| 1256 | 1256 | list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, |
| 1257 | 1257 | typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) |
| 1258 | 1258 | { |
| 1259 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1259 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1260 | 1260 | __get_db()->__insert_c(this); |
| 1261 | 1261 | #endif |
| 1262 | 1262 | for (; __f != __l; ++__f) |
| ... | ... | @@ -1269,7 +1269,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, const allocator_type& __a, |
| 1269 | 1269 | typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) |
| 1270 | 1270 | : base(__a) |
| 1271 | 1271 | { |
| 1272 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1272 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1273 | 1273 | __get_db()->__insert_c(this); |
| 1274 | 1274 | #endif |
| 1275 | 1275 | for (; __f != __l; ++__f) |
| ... | ... | @@ -1280,7 +1280,7 @@ template <class _Tp, class _Alloc> |
| 1280 | 1280 | list<_Tp, _Alloc>::list(const list& __c) |
| 1281 | 1281 | : base(__node_alloc_traits::select_on_container_copy_construction( |
| 1282 | 1282 | __c.__node_alloc())) { |
| 1283 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1283 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1284 | 1284 | __get_db()->__insert_c(this); |
| 1285 | 1285 | #endif |
| 1286 | 1286 | for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i) |
| ... | ... | @@ -1291,7 +1291,7 @@ template <class _Tp, class _Alloc> |
| 1291 | 1291 | list<_Tp, _Alloc>::list(const list& __c, const allocator_type& __a) |
| 1292 | 1292 | : base(__a) |
| 1293 | 1293 | { |
| 1294 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1294 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1295 | 1295 | __get_db()->__insert_c(this); |
| 1296 | 1296 | #endif |
| 1297 | 1297 | for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i) |
| ... | ... | @@ -1304,7 +1304,7 @@ template <class _Tp, class _Alloc> |
| 1304 | 1304 | list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type& __a) |
| 1305 | 1305 | : base(__a) |
| 1306 | 1306 | { |
| 1307 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1307 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1308 | 1308 | __get_db()->__insert_c(this); |
| 1309 | 1309 | #endif |
| 1310 | 1310 | for (typename initializer_list<value_type>::const_iterator __i = __il.begin(), |
| ... | ... | @@ -1315,7 +1315,7 @@ list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type& |
| 1315 | 1315 | template <class _Tp, class _Alloc> |
| 1316 | 1316 | list<_Tp, _Alloc>::list(initializer_list<value_type> __il) |
| 1317 | 1317 | { |
| 1318 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1318 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1319 | 1319 | __get_db()->__insert_c(this); |
| 1320 | 1320 | #endif |
| 1321 | 1321 | for (typename initializer_list<value_type>::const_iterator __i = __il.begin(), |
| ... | ... | @@ -1327,7 +1327,7 @@ template <class _Tp, class _Alloc> |
| 1327 | 1327 | inline list<_Tp, _Alloc>::list(list&& __c) |
| 1328 | 1328 | _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value) |
| 1329 | 1329 | : base(_VSTD::move(__c.__node_alloc())) { |
| 1330 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1330 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1331 | 1331 | __get_db()->__insert_c(this); |
| 1332 | 1332 | #endif |
| 1333 | 1333 | splice(end(), __c); |
| ... | ... | @@ -1338,7 +1338,7 @@ inline |
| 1338 | 1338 | list<_Tp, _Alloc>::list(list&& __c, const allocator_type& __a) |
| 1339 | 1339 | : base(__a) |
| 1340 | 1340 | { |
| 1341 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1341 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1342 | 1342 | __get_db()->__insert_c(this); |
| 1343 | 1343 | #endif |
| 1344 | 1344 | if (__a == __c.get_allocator()) |
| ... | ... | @@ -1415,7 +1415,7 @@ list<_Tp, _Alloc>::assign(_InpIter __f, _InpIter __l, |
| 1415 | 1415 | insert(__e, __f, __l); |
| 1416 | 1416 | else |
| 1417 | 1417 | erase(__i, __e); |
| 1418 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1418 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1419 | 1419 | __get_db()->__invalidate_all(this); |
| 1420 | 1420 | #endif |
| 1421 | 1421 | } |
| ... | ... | @@ -1432,7 +1432,7 @@ list<_Tp, _Alloc>::assign(size_type __n, const value_type& __x) |
| 1432 | 1432 | insert(__e, __n, __x); |
| 1433 | 1433 | else |
| 1434 | 1434 | erase(__i, __e); |
| 1435 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1435 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1436 | 1436 | __get_db()->__invalidate_all(this); |
| 1437 | 1437 | #endif |
| 1438 | 1438 | } |
| ... | ... | @@ -1449,7 +1449,7 @@ template <class _Tp, class _Alloc> |
| 1449 | 1449 | typename list<_Tp, _Alloc>::iterator |
| 1450 | 1450 | list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x) |
| 1451 | 1451 | { |
| 1452 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1452 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1453 | 1453 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1454 | 1454 | "list::insert(iterator, x) called with an iterator not" |
| 1455 | 1455 | " referring to this list"); |
| ... | ... | @@ -1459,7 +1459,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x) |
| 1459 | 1459 | __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); |
| 1460 | 1460 | __link_nodes(__p.__ptr_, __hold->__as_link(), __hold->__as_link()); |
| 1461 | 1461 | ++base::__sz(); |
| 1462 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1462 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1463 | 1463 | return iterator(__hold.release()->__as_link(), this); |
| 1464 | 1464 | #else |
| 1465 | 1465 | return iterator(__hold.release()->__as_link()); |
| ... | ... | @@ -1470,7 +1470,7 @@ template <class _Tp, class _Alloc> |
| 1470 | 1470 | typename list<_Tp, _Alloc>::iterator |
| 1471 | 1471 | list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& __x) |
| 1472 | 1472 | { |
| 1473 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1473 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1474 | 1474 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1475 | 1475 | "list::insert(iterator, n, x) called with an iterator not" |
| 1476 | 1476 | " referring to this list"); |
| ... | ... | @@ -1485,7 +1485,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _ |
| 1485 | 1485 | __hold_pointer __hold = __allocate_node(__na); |
| 1486 | 1486 | __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); |
| 1487 | 1487 | ++__ds; |
| 1488 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1488 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1489 | 1489 | __r = iterator(__hold->__as_link(), this); |
| 1490 | 1490 | #else |
| 1491 | 1491 | __r = iterator(__hold->__as_link()); |
| ... | ... | @@ -1515,7 +1515,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _ |
| 1515 | 1515 | __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); |
| 1516 | 1516 | if (__prev == 0) |
| 1517 | 1517 | break; |
| 1518 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1518 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1519 | 1519 | __e = iterator(__prev, this); |
| 1520 | 1520 | #else |
| 1521 | 1521 | __e = iterator(__prev); |
| ... | ... | @@ -1536,7 +1536,7 @@ typename list<_Tp, _Alloc>::iterator |
| 1536 | 1536 | list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, |
| 1537 | 1537 | typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) |
| 1538 | 1538 | { |
| 1539 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1539 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1540 | 1540 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1541 | 1541 | "list::insert(iterator, range) called with an iterator not" |
| 1542 | 1542 | " referring to this list"); |
| ... | ... | @@ -1551,7 +1551,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, |
| 1551 | 1551 | __hold_pointer __hold = __allocate_node(__na); |
| 1552 | 1552 | __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), *__f); |
| 1553 | 1553 | ++__ds; |
| 1554 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1554 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1555 | 1555 | __r = iterator(__hold.get()->__as_link(), this); |
| 1556 | 1556 | #else |
| 1557 | 1557 | __r = iterator(__hold.get()->__as_link()); |
| ... | ... | @@ -1581,7 +1581,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, |
| 1581 | 1581 | __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); |
| 1582 | 1582 | if (__prev == 0) |
| 1583 | 1583 | break; |
| 1584 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1584 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1585 | 1585 | __e = iterator(__prev, this); |
| 1586 | 1586 | #else |
| 1587 | 1587 | __e = iterator(__prev); |
| ... | ... | @@ -1695,7 +1695,7 @@ template <class... _Args> |
| 1695 | 1695 | typename list<_Tp, _Alloc>::iterator |
| 1696 | 1696 | list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args) |
| 1697 | 1697 | { |
| 1698 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1698 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1699 | 1699 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1700 | 1700 | "list::emplace(iterator, args...) called with an iterator not" |
| 1701 | 1701 | " referring to this list"); |
| ... | ... | @@ -1707,7 +1707,7 @@ list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args) |
| 1707 | 1707 | __link_nodes(__p.__ptr_, __nl, __nl); |
| 1708 | 1708 | ++base::__sz(); |
| 1709 | 1709 | __hold.release(); |
| 1710 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1710 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1711 | 1711 | return iterator(__nl, this); |
| 1712 | 1712 | #else |
| 1713 | 1713 | return iterator(__nl); |
| ... | ... | @@ -1718,7 +1718,7 @@ template <class _Tp, class _Alloc> |
| 1718 | 1718 | typename list<_Tp, _Alloc>::iterator |
| 1719 | 1719 | list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) |
| 1720 | 1720 | { |
| 1721 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1721 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1722 | 1722 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1723 | 1723 | "list::insert(iterator, x) called with an iterator not" |
| 1724 | 1724 | " referring to this list"); |
| ... | ... | @@ -1730,7 +1730,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) |
| 1730 | 1730 | __link_nodes(__p.__ptr_, __nl, __nl); |
| 1731 | 1731 | ++base::__sz(); |
| 1732 | 1732 | __hold.release(); |
| 1733 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1733 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1734 | 1734 | return iterator(__nl, this); |
| 1735 | 1735 | #else |
| 1736 | 1736 | return iterator(__nl); |
| ... | ... | @@ -1748,7 +1748,7 @@ list<_Tp, _Alloc>::pop_front() |
| 1748 | 1748 | __link_pointer __n = base::__end_.__next_; |
| 1749 | 1749 | base::__unlink_nodes(__n, __n); |
| 1750 | 1750 | --base::__sz(); |
| 1751 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1751 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1752 | 1752 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 1753 | 1753 | for (__i_node** __p = __c->end_; __p != __c->beg_; ) |
| 1754 | 1754 | { |
| ... | ... | @@ -1758,7 +1758,7 @@ list<_Tp, _Alloc>::pop_front() |
| 1758 | 1758 | { |
| 1759 | 1759 | (*__p)->__c_ = nullptr; |
| 1760 | 1760 | if (--__c->end_ != __p) |
| 1761 | memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1761 | _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1762 | 1762 | } |
| 1763 | 1763 | } |
| 1764 | 1764 | __get_db()->unlock(); |
| ... | ... | @@ -1777,7 +1777,7 @@ list<_Tp, _Alloc>::pop_back() |
| 1777 | 1777 | __link_pointer __n = base::__end_.__prev_; |
| 1778 | 1778 | base::__unlink_nodes(__n, __n); |
| 1779 | 1779 | --base::__sz(); |
| 1780 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1780 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1781 | 1781 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 1782 | 1782 | for (__i_node** __p = __c->end_; __p != __c->beg_; ) |
| 1783 | 1783 | { |
| ... | ... | @@ -1787,7 +1787,7 @@ list<_Tp, _Alloc>::pop_back() |
| 1787 | 1787 | { |
| 1788 | 1788 | (*__p)->__c_ = nullptr; |
| 1789 | 1789 | if (--__c->end_ != __p) |
| 1790 | memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1790 | _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1791 | 1791 | } |
| 1792 | 1792 | } |
| 1793 | 1793 | __get_db()->unlock(); |
| ... | ... | @@ -1801,7 +1801,7 @@ template <class _Tp, class _Alloc> |
| 1801 | 1801 | typename list<_Tp, _Alloc>::iterator |
| 1802 | 1802 | list<_Tp, _Alloc>::erase(const_iterator __p) |
| 1803 | 1803 | { |
| 1804 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1804 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1805 | 1805 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1806 | 1806 | "list::erase(iterator) called with an iterator not" |
| 1807 | 1807 | " referring to this list"); |
| ... | ... | @@ -1813,7 +1813,7 @@ list<_Tp, _Alloc>::erase(const_iterator __p) |
| 1813 | 1813 | __link_pointer __r = __n->__next_; |
| 1814 | 1814 | base::__unlink_nodes(__n, __n); |
| 1815 | 1815 | --base::__sz(); |
| 1816 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1816 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1817 | 1817 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 1818 | 1818 | for (__i_node** __ip = __c->end_; __ip != __c->beg_; ) |
| 1819 | 1819 | { |
| ... | ... | @@ -1823,7 +1823,7 @@ list<_Tp, _Alloc>::erase(const_iterator __p) |
| 1823 | 1823 | { |
| 1824 | 1824 | (*__ip)->__c_ = nullptr; |
| 1825 | 1825 | if (--__c->end_ != __ip) |
| 1826 | memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*)); | |
| 1826 | _VSTD::memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*)); | |
| 1827 | 1827 | } |
| 1828 | 1828 | } |
| 1829 | 1829 | __get_db()->unlock(); |
| ... | ... | @@ -1831,7 +1831,7 @@ list<_Tp, _Alloc>::erase(const_iterator __p) |
| 1831 | 1831 | __node_pointer __np = __n->__as_node(); |
| 1832 | 1832 | __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_)); |
| 1833 | 1833 | __node_alloc_traits::deallocate(__na, __np, 1); |
| 1834 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1834 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1835 | 1835 | return iterator(__r, this); |
| 1836 | 1836 | #else |
| 1837 | 1837 | return iterator(__r); |
| ... | ... | @@ -1842,7 +1842,7 @@ template <class _Tp, class _Alloc> |
| 1842 | 1842 | typename list<_Tp, _Alloc>::iterator |
| 1843 | 1843 | list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) |
| 1844 | 1844 | { |
| 1845 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1845 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1846 | 1846 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__f) == this, |
| 1847 | 1847 | "list::erase(iterator, iterator) called with an iterator not" |
| 1848 | 1848 | " referring to this list"); |
| ... | ... | @@ -1859,7 +1859,7 @@ list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) |
| 1859 | 1859 | __link_pointer __n = __f.__ptr_; |
| 1860 | 1860 | ++__f; |
| 1861 | 1861 | --base::__sz(); |
| 1862 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1862 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1863 | 1863 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 1864 | 1864 | for (__i_node** __p = __c->end_; __p != __c->beg_; ) |
| 1865 | 1865 | { |
| ... | ... | @@ -1869,7 +1869,7 @@ list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) |
| 1869 | 1869 | { |
| 1870 | 1870 | (*__p)->__c_ = nullptr; |
| 1871 | 1871 | if (--__c->end_ != __p) |
| 1872 | memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1872 | _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1873 | 1873 | } |
| 1874 | 1874 | } |
| 1875 | 1875 | __get_db()->unlock(); |
| ... | ... | @@ -1879,7 +1879,7 @@ list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) |
| 1879 | 1879 | __node_alloc_traits::deallocate(__na, __np, 1); |
| 1880 | 1880 | } |
| 1881 | 1881 | } |
| 1882 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1882 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1883 | 1883 | return iterator(__l.__ptr_, this); |
| 1884 | 1884 | #else |
| 1885 | 1885 | return iterator(__l.__ptr_); |
| ... | ... | @@ -1900,7 +1900,7 @@ list<_Tp, _Alloc>::resize(size_type __n) |
| 1900 | 1900 | __hold_pointer __hold = __allocate_node(__na); |
| 1901 | 1901 | __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_)); |
| 1902 | 1902 | ++__ds; |
| 1903 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1903 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1904 | 1904 | iterator __r = iterator(__hold.release()->__as_link(), this); |
| 1905 | 1905 | #else |
| 1906 | 1906 | iterator __r = iterator(__hold.release()->__as_link()); |
| ... | ... | @@ -1929,7 +1929,7 @@ list<_Tp, _Alloc>::resize(size_type __n) |
| 1929 | 1929 | __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); |
| 1930 | 1930 | if (__prev == 0) |
| 1931 | 1931 | break; |
| 1932 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1932 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1933 | 1933 | __e = iterator(__prev, this); |
| 1934 | 1934 | #else |
| 1935 | 1935 | __e = iterator(__prev); |
| ... | ... | @@ -1958,7 +1958,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) |
| 1958 | 1958 | __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); |
| 1959 | 1959 | ++__ds; |
| 1960 | 1960 | __link_pointer __nl = __hold.release()->__as_link(); |
| 1961 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1961 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1962 | 1962 | iterator __r = iterator(__nl, this); |
| 1963 | 1963 | #else |
| 1964 | 1964 | iterator __r = iterator(__nl); |
| ... | ... | @@ -1987,7 +1987,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) |
| 1987 | 1987 | __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); |
| 1988 | 1988 | if (__prev == 0) |
| 1989 | 1989 | break; |
| 1990 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1990 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1991 | 1991 | __e = iterator(__prev, this); |
| 1992 | 1992 | #else |
| 1993 | 1993 | __e = iterator(__prev); |
| ... | ... | @@ -2007,7 +2007,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) |
| 2007 | 2007 | { |
| 2008 | 2008 | _LIBCPP_ASSERT(this != &__c, |
| 2009 | 2009 | "list::splice(iterator, list) called with this == &list"); |
| 2010 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2010 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2011 | 2011 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 2012 | 2012 | "list::splice(iterator, list) called with an iterator not" |
| 2013 | 2013 | " referring to this list"); |
| ... | ... | @@ -2020,7 +2020,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) |
| 2020 | 2020 | __link_nodes(__p.__ptr_, __f, __l); |
| 2021 | 2021 | base::__sz() += __c.__sz(); |
| 2022 | 2022 | __c.__sz() = 0; |
| 2023 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2023 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2024 | 2024 | if (&__c != this) { |
| 2025 | 2025 | __libcpp_db* __db = __get_db(); |
| 2026 | 2026 | __c_node* __cn1 = __db->__find_c_and_lock(this); |
| ... | ... | @@ -2034,7 +2034,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) |
| 2034 | 2034 | __cn1->__add(*__ip); |
| 2035 | 2035 | (*__ip)->__c_ = __cn1; |
| 2036 | 2036 | if (--__cn2->end_ != __ip) |
| 2037 | memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); | |
| 2037 | _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); | |
| 2038 | 2038 | } |
| 2039 | 2039 | } |
| 2040 | 2040 | __db->unlock(); |
| ... | ... | @@ -2047,7 +2047,7 @@ template <class _Tp, class _Alloc> |
| 2047 | 2047 | void |
| 2048 | 2048 | list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) |
| 2049 | 2049 | { |
| 2050 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2050 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2051 | 2051 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 2052 | 2052 | "list::splice(iterator, list, iterator) called with first iterator not" |
| 2053 | 2053 | " referring to this list"); |
| ... | ... | @@ -2056,7 +2056,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) |
| 2056 | 2056 | " referring to list argument"); |
| 2057 | 2057 | _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(&__i), |
| 2058 | 2058 | "list::splice(iterator, list, iterator) called with second iterator not" |
| 2059 | " derefereceable"); | |
| 2059 | " dereferenceable"); | |
| 2060 | 2060 | #endif |
| 2061 | 2061 | if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_) |
| 2062 | 2062 | { |
| ... | ... | @@ -2065,7 +2065,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) |
| 2065 | 2065 | __link_nodes(__p.__ptr_, __f, __f); |
| 2066 | 2066 | --__c.__sz(); |
| 2067 | 2067 | ++base::__sz(); |
| 2068 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2068 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2069 | 2069 | if (&__c != this) { |
| 2070 | 2070 | __libcpp_db* __db = __get_db(); |
| 2071 | 2071 | __c_node* __cn1 = __db->__find_c_and_lock(this); |
| ... | ... | @@ -2079,7 +2079,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) |
| 2079 | 2079 | __cn1->__add(*__ip); |
| 2080 | 2080 | (*__ip)->__c_ = __cn1; |
| 2081 | 2081 | if (--__cn2->end_ != __ip) |
| 2082 | memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); | |
| 2082 | _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); | |
| 2083 | 2083 | } |
| 2084 | 2084 | } |
| 2085 | 2085 | __db->unlock(); |
| ... | ... | @@ -2092,7 +2092,7 @@ template <class _Tp, class _Alloc> |
| 2092 | 2092 | void |
| 2093 | 2093 | list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l) |
| 2094 | 2094 | { |
| 2095 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2095 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2096 | 2096 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 2097 | 2097 | "list::splice(iterator, list, iterator, iterator) called with first iterator not" |
| 2098 | 2098 | " referring to this list"); |
| ... | ... | @@ -2121,7 +2121,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, con |
| 2121 | 2121 | } |
| 2122 | 2122 | base::__unlink_nodes(__first, __last); |
| 2123 | 2123 | __link_nodes(__p.__ptr_, __first, __last); |
| 2124 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2124 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2125 | 2125 | if (&__c != this) { |
| 2126 | 2126 | __libcpp_db* __db = __get_db(); |
| 2127 | 2127 | __c_node* __cn1 = __db->__find_c_and_lock(this); |
| ... | ... | @@ -2138,7 +2138,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, con |
| 2138 | 2138 | __cn1->__add(*__ip); |
| 2139 | 2139 | (*__ip)->__c_ = __cn1; |
| 2140 | 2140 | if (--__cn2->end_ != __ip) |
| 2141 | memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); | |
| 2141 | _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); | |
| 2142 | 2142 | } |
| 2143 | 2143 | } |
| 2144 | 2144 | } |
| ... | ... | @@ -2258,7 +2258,7 @@ list<_Tp, _Alloc>::merge(list& __c, _Comp __comp) |
| 2258 | 2258 | ++__f1; |
| 2259 | 2259 | } |
| 2260 | 2260 | splice(__e1, __c); |
| 2261 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2261 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2262 | 2262 | __libcpp_db* __db = __get_db(); |
| 2263 | 2263 | __c_node* __cn1 = __db->__find_c_and_lock(this); |
| 2264 | 2264 | __c_node* __cn2 = __db->__find_c(&__c); |
| ... | ... | @@ -2271,7 +2271,7 @@ list<_Tp, _Alloc>::merge(list& __c, _Comp __comp) |
| 2271 | 2271 | __cn1->__add(*__p); |
| 2272 | 2272 | (*__p)->__c_ = __cn1; |
| 2273 | 2273 | if (--__cn2->end_ != __p) |
| 2274 | memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); | |
| 2274 | _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); | |
| 2275 | 2275 | } |
| 2276 | 2276 | } |
| 2277 | 2277 | __db->unlock(); |
| ... | ... | @@ -2382,7 +2382,7 @@ list<_Tp, _Alloc>::__invariants() const |
| 2382 | 2382 | return size() == _VSTD::distance(begin(), end()); |
| 2383 | 2383 | } |
| 2384 | 2384 | |
| 2385 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2385 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2386 | 2386 | |
| 2387 | 2387 | template <class _Tp, class _Alloc> |
| 2388 | 2388 | bool |
| ... | ... | @@ -2412,7 +2412,7 @@ list<_Tp, _Alloc>::__subscriptable(const const_iterator*, ptrdiff_t) const |
| 2412 | 2412 | return false; |
| 2413 | 2413 | } |
| 2414 | 2414 | |
| 2415 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2415 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 2416 | 2416 | |
| 2417 | 2417 | template <class _Tp, class _Alloc> |
| 2418 | 2418 | inline _LIBCPP_INLINE_VISIBILITY |
lib/libcxx/include/locale+105-79| ... | ... | @@ -92,7 +92,11 @@ public: |
| 92 | 92 | typedef typename Codecvt::state_type state_type; |
| 93 | 93 | typedef typename wide_string::traits_type::int_type int_type; |
| 94 | 94 | |
| 95 | explicit wstring_convert(Codecvt* pcvt = new Codecvt); // explicit in C++14 | |
| 95 | wstring_convert(Codecvt* pcvt = new Codecvt); // before C++14 | |
| 96 | explicit wstring_convert(Codecvt* pcvt = new Codecvt); // before C++20 | |
| 97 | wstring_convert() : wstring_convert(new Codecvt) {} // C++20 | |
| 98 | explicit wstring_convert(Codecvt* pcvt); // C++20 | |
| 99 | ||
| 96 | 100 | wstring_convert(Codecvt* pcvt, state_type state); |
| 97 | 101 | explicit wstring_convert(const byte_string& byte_err, // explicit in C++14 |
| 98 | 102 | const wide_string& wide_err = wide_string()); |
| ... | ... | @@ -121,8 +125,14 @@ class wbuffer_convert |
| 121 | 125 | public: |
| 122 | 126 | typedef typename Tr::state_type state_type; |
| 123 | 127 | |
| 124 | explicit wbuffer_convert(streambuf* bytebuf = 0, Codecvt* pcvt = new Codecvt, | |
| 125 | state_type state = state_type()); // explicit in C++14 | |
| 128 | wbuffer_convert(streambuf* bytebuf = 0, Codecvt* pcvt = new Codecvt, | |
| 129 | state_type state = state_type()); // before C++14 | |
| 130 | explicit wbuffer_convert(streambuf* bytebuf = nullptr, Codecvt* pcvt = new Codecvt, | |
| 131 | state_type state = state_type()); // before C++20 | |
| 132 | wbuffer_convert() : wbuffer_convert(nullptr) {} // C++20 | |
| 133 | explicit wbuffer_convert(streambuf* bytebuf, Codecvt* pcvt = new Codecvt, | |
| 134 | state_type state = state_type()); // C++20 | |
| 135 | ||
| 126 | 136 | wbuffer_convert(const wbuffer_convert&) = delete; // C++14 |
| 127 | 137 | wbuffer_convert & operator=(const wbuffer_convert &) = delete; // C++14 |
| 128 | 138 | ~wbuffer_convert(); // C++14 |
| ... | ... | @@ -197,10 +207,6 @@ template <class charT> class messages_byname; |
| 197 | 207 | #include <nl_types.h> |
| 198 | 208 | #endif |
| 199 | 209 | |
| 200 | #ifdef __APPLE__ | |
| 201 | #include <Availability.h> | |
| 202 | #endif | |
| 203 | ||
| 204 | 210 | #ifdef _LIBCPP_LOCALE__L_EXTENSIONS |
| 205 | 211 | #include <__bsd_locale_defaults.h> |
| 206 | 212 | #else |
| ... | ... | @@ -261,11 +267,11 @@ __scan_keyword(_InputIterator& __b, _InputIterator __e, |
| 261 | 267 | const unsigned char __does_match = '\2'; |
| 262 | 268 | unsigned char __statbuf[100]; |
| 263 | 269 | unsigned char* __status = __statbuf; |
| 264 | unique_ptr<unsigned char, void(*)(void*)> __stat_hold(0, free); | |
| 270 | unique_ptr<unsigned char, void(*)(void*)> __stat_hold(nullptr, free); | |
| 265 | 271 | if (__nkw > sizeof(__statbuf)) |
| 266 | 272 | { |
| 267 | 273 | __status = (unsigned char*)malloc(__nkw); |
| 268 | if (__status == 0) | |
| 274 | if (__status == nullptr) | |
| 269 | 275 | __throw_bad_alloc(); |
| 270 | 276 | __stat_hold.reset(__status); |
| 271 | 277 | } |
| ... | ... | @@ -561,8 +567,8 @@ __num_get<_CharT>::__stage2_float_loop(_CharT __ct, bool& __in_units, char& __ex |
| 561 | 567 | return 0; |
| 562 | 568 | } |
| 563 | 569 | |
| 564 | _LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>) | |
| 565 | _LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>) | |
| 570 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>) | |
| 571 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>) | |
| 566 | 572 | |
| 567 | 573 | template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> > |
| 568 | 574 | class _LIBCPP_TEMPLATE_VIS num_get |
| ... | ... | @@ -877,8 +883,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, |
| 877 | 883 | const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__iob.getloc()); |
| 878 | 884 | typedef typename numpunct<_CharT>::string_type string_type; |
| 879 | 885 | const string_type __names[2] = {__np.truename(), __np.falsename()}; |
| 880 | const string_type* __i = __scan_keyword(__b, __e, __names, __names+2, | |
| 881 | __ct, __err); | |
| 886 | const string_type* __i = _VSTD::__scan_keyword(__b, __e, __names, __names+2, | |
| 887 | __ct, __err); | |
| 882 | 888 | __v = __i == __names; |
| 883 | 889 | return __b; |
| 884 | 890 | } |
| ... | ... | @@ -1099,8 +1105,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, |
| 1099 | 1105 | return __b; |
| 1100 | 1106 | } |
| 1101 | 1107 | |
| 1102 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<char>) | |
| 1103 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>) | |
| 1108 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<char>) | |
| 1109 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>) | |
| 1104 | 1110 | |
| 1105 | 1111 | struct _LIBCPP_TYPE_VIS __num_put_base |
| 1106 | 1112 | { |
| ... | ... | @@ -1249,8 +1255,8 @@ __num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne, |
| 1249 | 1255 | __op = __ob + (__np - __nb); |
| 1250 | 1256 | } |
| 1251 | 1257 | |
| 1252 | _LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>) | |
| 1253 | _LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>) | |
| 1258 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>) | |
| 1259 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>) | |
| 1254 | 1260 | |
| 1255 | 1261 | template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> > |
| 1256 | 1262 | class _LIBCPP_TEMPLATE_VIS num_put |
| ... | ... | @@ -1427,7 +1433,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, |
| 1427 | 1433 | return do_put(__s, __iob, __fl, (unsigned long)__v); |
| 1428 | 1434 | const numpunct<char_type>& __np = use_facet<numpunct<char_type> >(__iob.getloc()); |
| 1429 | 1435 | typedef typename numpunct<char_type>::string_type string_type; |
| 1430 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1436 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1431 | 1437 | string_type __tmp(__v ? __np.truename() : __np.falsename()); |
| 1432 | 1438 | string_type __nm = _VSTD::move(__tmp); |
| 1433 | 1439 | #else |
| ... | ... | @@ -1564,14 +1570,14 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, |
| 1564 | 1570 | (int)__iob.precision(), __v); |
| 1565 | 1571 | else |
| 1566 | 1572 | __nc = __libcpp_snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt, __v); |
| 1567 | unique_ptr<char, void(*)(void*)> __nbh(0, free); | |
| 1573 | unique_ptr<char, void(*)(void*)> __nbh(nullptr, free); | |
| 1568 | 1574 | if (__nc > static_cast<int>(__nbuf-1)) |
| 1569 | 1575 | { |
| 1570 | 1576 | if (__specify_precision) |
| 1571 | 1577 | __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v); |
| 1572 | 1578 | else |
| 1573 | 1579 | __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, __v); |
| 1574 | if (__nb == 0) | |
| 1580 | if (__nc == -1) | |
| 1575 | 1581 | __throw_bad_alloc(); |
| 1576 | 1582 | __nbh.reset(__nb); |
| 1577 | 1583 | } |
| ... | ... | @@ -1615,14 +1621,14 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, |
| 1615 | 1621 | (int)__iob.precision(), __v); |
| 1616 | 1622 | else |
| 1617 | 1623 | __nc = __libcpp_snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt, __v); |
| 1618 | unique_ptr<char, void(*)(void*)> __nbh(0, free); | |
| 1624 | unique_ptr<char, void(*)(void*)> __nbh(nullptr, free); | |
| 1619 | 1625 | if (__nc > static_cast<int>(__nbuf-1)) |
| 1620 | 1626 | { |
| 1621 | 1627 | if (__specify_precision) |
| 1622 | 1628 | __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v); |
| 1623 | 1629 | else |
| 1624 | 1630 | __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, __v); |
| 1625 | if (__nb == 0) | |
| 1631 | if (__nc == -1) | |
| 1626 | 1632 | __throw_bad_alloc(); |
| 1627 | 1633 | __nbh.reset(__nb); |
| 1628 | 1634 | } |
| ... | ... | @@ -1676,8 +1682,8 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, |
| 1676 | 1682 | return __pad_and_output(__s, __o, __op, __oe, __iob, __fl); |
| 1677 | 1683 | } |
| 1678 | 1684 | |
| 1679 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<char>) | |
| 1680 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>) | |
| 1685 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<char>) | |
| 1686 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>) | |
| 1681 | 1687 | |
| 1682 | 1688 | template <class _CharT, class _InputIterator> |
| 1683 | 1689 | _LIBCPP_HIDDEN |
| ... | ... | @@ -1916,7 +1922,7 @@ time_get<_CharT, _InputIterator>::__get_weekdayname(int& __w, |
| 1916 | 1922 | { |
| 1917 | 1923 | // Note: ignoring case comes from the POSIX strptime spec |
| 1918 | 1924 | const string_type* __wk = this->__weeks(); |
| 1919 | ptrdiff_t __i = __scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk; | |
| 1925 | ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk; | |
| 1920 | 1926 | if (__i < 14) |
| 1921 | 1927 | __w = __i % 7; |
| 1922 | 1928 | } |
| ... | ... | @@ -1930,7 +1936,7 @@ time_get<_CharT, _InputIterator>::__get_monthname(int& __m, |
| 1930 | 1936 | { |
| 1931 | 1937 | // Note: ignoring case comes from the POSIX strptime spec |
| 1932 | 1938 | const string_type* __month = this->__months(); |
| 1933 | ptrdiff_t __i = __scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month; | |
| 1939 | ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month; | |
| 1934 | 1940 | if (__i < 24) |
| 1935 | 1941 | __m = __i % 12; |
| 1936 | 1942 | } |
| ... | ... | @@ -1942,7 +1948,7 @@ time_get<_CharT, _InputIterator>::__get_day(int& __d, |
| 1942 | 1948 | ios_base::iostate& __err, |
| 1943 | 1949 | const ctype<char_type>& __ct) const |
| 1944 | 1950 | { |
| 1945 | int __t = __get_up_to_n_digits(__b, __e, __err, __ct, 2); | |
| 1951 | int __t = _VSTD::__get_up_to_n_digits(__b, __e, __err, __ct, 2); | |
| 1946 | 1952 | if (!(__err & ios_base::failbit) && 1 <= __t && __t <= 31) |
| 1947 | 1953 | __d = __t; |
| 1948 | 1954 | else |
| ... | ... | @@ -2102,7 +2108,7 @@ time_get<_CharT, _InputIterator>::__get_am_pm(int& __h, |
| 2102 | 2108 | __err |= ios_base::failbit; |
| 2103 | 2109 | return; |
| 2104 | 2110 | } |
| 2105 | ptrdiff_t __i = __scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap; | |
| 2111 | ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap; | |
| 2106 | 2112 | if (__i == 0 && __h == 12) |
| 2107 | 2113 | __h = 0; |
| 2108 | 2114 | else if (__i == 1 && __h < 12) |
| ... | ... | @@ -2362,8 +2368,8 @@ time_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, |
| 2362 | 2368 | return __b; |
| 2363 | 2369 | } |
| 2364 | 2370 | |
| 2365 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<char>) | |
| 2366 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>) | |
| 2371 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<char>) | |
| 2372 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>) | |
| 2367 | 2373 | |
| 2368 | 2374 | class _LIBCPP_TYPE_VIS __time_get |
| 2369 | 2375 | { |
| ... | ... | @@ -2462,8 +2468,8 @@ private: |
| 2462 | 2468 | virtual const string_type& __X() const {return this->__X_;} |
| 2463 | 2469 | }; |
| 2464 | 2470 | |
| 2465 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>) | |
| 2466 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>) | |
| 2471 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>) | |
| 2472 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>) | |
| 2467 | 2473 | |
| 2468 | 2474 | class _LIBCPP_TYPE_VIS __time_put |
| 2469 | 2475 | { |
| ... | ... | @@ -2575,8 +2581,8 @@ time_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base&, |
| 2575 | 2581 | return _VSTD::copy(__nb, __ne, __s); |
| 2576 | 2582 | } |
| 2577 | 2583 | |
| 2578 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<char>) | |
| 2579 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>) | |
| 2584 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<char>) | |
| 2585 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>) | |
| 2580 | 2586 | |
| 2581 | 2587 | template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> > |
| 2582 | 2588 | class _LIBCPP_TEMPLATE_VIS time_put_byname |
| ... | ... | @@ -2596,8 +2602,8 @@ protected: |
| 2596 | 2602 | ~time_put_byname() {} |
| 2597 | 2603 | }; |
| 2598 | 2604 | |
| 2599 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<char>) | |
| 2600 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>) | |
| 2605 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<char>) | |
| 2606 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>) | |
| 2601 | 2607 | |
| 2602 | 2608 | // money_base |
| 2603 | 2609 | |
| ... | ... | @@ -2663,10 +2669,10 @@ template <class _CharT, bool _International> |
| 2663 | 2669 | const bool |
| 2664 | 2670 | moneypunct<_CharT, _International>::intl; |
| 2665 | 2671 | |
| 2666 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, false>) | |
| 2667 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, true>) | |
| 2668 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, false>) | |
| 2669 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>) | |
| 2672 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, false>) | |
| 2673 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, true>) | |
| 2674 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, false>) | |
| 2675 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>) | |
| 2670 | 2676 | |
| 2671 | 2677 | // moneypunct_byname |
| 2672 | 2678 | |
| ... | ... | @@ -2720,10 +2726,10 @@ template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, true>::init(const char* |
| 2720 | 2726 | template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, false>::init(const char*); |
| 2721 | 2727 | template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, true>::init(const char*); |
| 2722 | 2728 | |
| 2723 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>) | |
| 2724 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>) | |
| 2725 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, false>) | |
| 2726 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, true>) | |
| 2729 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>) | |
| 2730 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>) | |
| 2731 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, false>) | |
| 2732 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, true>) | |
| 2727 | 2733 | |
| 2728 | 2734 | // money_get |
| 2729 | 2735 | |
| ... | ... | @@ -2779,8 +2785,8 @@ __money_get<_CharT>::__gather_info(bool __intl, const locale& __loc, |
| 2779 | 2785 | } |
| 2780 | 2786 | } |
| 2781 | 2787 | |
| 2782 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<char>) | |
| 2783 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>) | |
| 2788 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<char>) | |
| 2789 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>) | |
| 2784 | 2790 | |
| 2785 | 2791 | template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> > |
| 2786 | 2792 | class _LIBCPP_TEMPLATE_VIS money_get |
| ... | ... | @@ -3108,11 +3114,11 @@ money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, |
| 3108 | 3114 | __ct.widen(__src, __src + (sizeof(__src)-1), __atoms); |
| 3109 | 3115 | char __nbuf[__bz]; |
| 3110 | 3116 | char* __nc = __nbuf; |
| 3111 | unique_ptr<char, void(*)(void*)> __h(0, free); | |
| 3117 | unique_ptr<char, void(*)(void*)> __h(nullptr, free); | |
| 3112 | 3118 | if (__wn - __wb.get() > __bz-2) |
| 3113 | 3119 | { |
| 3114 | 3120 | __h.reset((char*)malloc(static_cast<size_t>(__wn - __wb.get() + 2))); |
| 3115 | if (__h.get() == 0) | |
| 3121 | if (__h.get() == nullptr) | |
| 3116 | 3122 | __throw_bad_alloc(); |
| 3117 | 3123 | __nc = __h.get(); |
| 3118 | 3124 | } |
| ... | ... | @@ -3162,8 +3168,8 @@ money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, |
| 3162 | 3168 | return __b; |
| 3163 | 3169 | } |
| 3164 | 3170 | |
| 3165 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<char>) | |
| 3166 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<wchar_t>) | |
| 3171 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<char>) | |
| 3172 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<wchar_t>) | |
| 3167 | 3173 | |
| 3168 | 3174 | // money_put |
| 3169 | 3175 | |
| ... | ... | @@ -3337,8 +3343,8 @@ __money_put<_CharT>::__format(char_type* __mb, char_type*& __mi, char_type*& __m |
| 3337 | 3343 | __mi = __mb; |
| 3338 | 3344 | } |
| 3339 | 3345 | |
| 3340 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<char>) | |
| 3341 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>) | |
| 3346 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<char>) | |
| 3347 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>) | |
| 3342 | 3348 | |
| 3343 | 3349 | template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> > |
| 3344 | 3350 | class _LIBCPP_TEMPLATE_VIS money_put |
| ... | ... | @@ -3396,17 +3402,17 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl, |
| 3396 | 3402 | char* __bb = __buf; |
| 3397 | 3403 | char_type __digits[__bs]; |
| 3398 | 3404 | char_type* __db = __digits; |
| 3399 | size_t __n = static_cast<size_t>(snprintf(__bb, __bs, "%.0Lf", __units)); | |
| 3400 | unique_ptr<char, void(*)(void*)> __hn(0, free); | |
| 3405 | int __n = snprintf(__bb, __bs, "%.0Lf", __units); | |
| 3406 | unique_ptr<char, void(*)(void*)> __hn(nullptr, free); | |
| 3401 | 3407 | unique_ptr<char_type, void(*)(void*)> __hd(0, free); |
| 3402 | 3408 | // secure memory for digit storage |
| 3403 | if (__n > __bs-1) | |
| 3409 | if (static_cast<size_t>(__n) > __bs-1) | |
| 3404 | 3410 | { |
| 3405 | __n = static_cast<size_t>(__libcpp_asprintf_l(&__bb, _LIBCPP_GET_C_LOCALE, "%.0Lf", __units)); | |
| 3406 | if (__bb == 0) | |
| 3411 | __n = __libcpp_asprintf_l(&__bb, _LIBCPP_GET_C_LOCALE, "%.0Lf", __units); | |
| 3412 | if (__n == -1) | |
| 3407 | 3413 | __throw_bad_alloc(); |
| 3408 | 3414 | __hn.reset(__bb); |
| 3409 | __hd.reset((char_type*)malloc(__n * sizeof(char_type))); | |
| 3415 | __hd.reset((char_type*)malloc(static_cast<size_t>(__n) * sizeof(char_type))); | |
| 3410 | 3416 | if (__hd == nullptr) |
| 3411 | 3417 | __throw_bad_alloc(); |
| 3412 | 3418 | __db = __hd.get(); |
| ... | ... | @@ -3428,9 +3434,9 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl, |
| 3428 | 3434 | char_type __mbuf[__bs]; |
| 3429 | 3435 | char_type* __mb = __mbuf; |
| 3430 | 3436 | unique_ptr<char_type, void(*)(void*)> __hw(0, free); |
| 3431 | size_t __exn = static_cast<int>(__n) > __fd ? | |
| 3432 | (__n - static_cast<size_t>(__fd)) * 2 + __sn.size() + | |
| 3433 | __sym.size() + static_cast<size_t>(__fd) + 1 | |
| 3437 | size_t __exn = __n > __fd ? | |
| 3438 | (static_cast<size_t>(__n) - static_cast<size_t>(__fd)) * 2 + | |
| 3439 | __sn.size() + __sym.size() + static_cast<size_t>(__fd) + 1 | |
| 3434 | 3440 | : __sn.size() + __sym.size() + static_cast<size_t>(__fd) + 2; |
| 3435 | 3441 | if (__exn > __bs) |
| 3436 | 3442 | { |
| ... | ... | @@ -3490,8 +3496,8 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl, |
| 3490 | 3496 | return __pad_and_output(__s, __mb, __mi, __me, __iob, __fl); |
| 3491 | 3497 | } |
| 3492 | 3498 | |
| 3493 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<char>) | |
| 3494 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>) | |
| 3499 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<char>) | |
| 3500 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>) | |
| 3495 | 3501 | |
| 3496 | 3502 | // messages |
| 3497 | 3503 | |
| ... | ... | @@ -3582,7 +3588,7 @@ messages<_CharT>::do_get(catalog __c, int __set, int __msgid, |
| 3582 | 3588 | char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str()); |
| 3583 | 3589 | string_type __w; |
| 3584 | 3590 | __widen_from_utf8<sizeof(char_type)*__CHAR_BIT__>()(back_inserter(__w), |
| 3585 | __n, __n + strlen(__n)); | |
| 3591 | __n, __n + _VSTD::strlen(__n)); | |
| 3586 | 3592 | return __w; |
| 3587 | 3593 | #else // !_LIBCPP_HAS_CATOPEN |
| 3588 | 3594 | _LIBCPP_UNUSED_VAR(__c); |
| ... | ... | @@ -3606,8 +3612,8 @@ messages<_CharT>::do_close(catalog __c) const |
| 3606 | 3612 | #endif // _LIBCPP_HAS_CATOPEN |
| 3607 | 3613 | } |
| 3608 | 3614 | |
| 3609 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<char>) | |
| 3610 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>) | |
| 3615 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<char>) | |
| 3616 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>) | |
| 3611 | 3617 | |
| 3612 | 3618 | template <class _CharT> |
| 3613 | 3619 | class _LIBCPP_TEMPLATE_VIS messages_byname |
| ... | ... | @@ -3630,8 +3636,8 @@ protected: |
| 3630 | 3636 | ~messages_byname() {} |
| 3631 | 3637 | }; |
| 3632 | 3638 | |
| 3633 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>) | |
| 3634 | _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<wchar_t>) | |
| 3639 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>) | |
| 3640 | _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<wchar_t>) | |
| 3635 | 3641 | |
| 3636 | 3642 | template<class _Codecvt, class _Elem = wchar_t, |
| 3637 | 3643 | class _Wide_alloc = allocator<_Elem>, |
| ... | ... | @@ -3654,8 +3660,17 @@ private: |
| 3654 | 3660 | wstring_convert(const wstring_convert& __wc); |
| 3655 | 3661 | wstring_convert& operator=(const wstring_convert& __wc); |
| 3656 | 3662 | public: |
| 3663 | #ifndef _LIBCPP_CXX03_LANG | |
| 3657 | 3664 | _LIBCPP_INLINE_VISIBILITY |
| 3658 | _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(_Codecvt* __pcvt = new _Codecvt); | |
| 3665 | wstring_convert() : wstring_convert(new _Codecvt) {} | |
| 3666 | _LIBCPP_INLINE_VISIBILITY | |
| 3667 | explicit wstring_convert(_Codecvt* __pcvt); | |
| 3668 | #else | |
| 3669 | _LIBCPP_INLINE_VISIBILITY | |
| 3670 | _LIBCPP_EXPLICIT_AFTER_CXX11 | |
| 3671 | wstring_convert(_Codecvt* __pcvt = new _Codecvt); | |
| 3672 | #endif | |
| 3673 | ||
| 3659 | 3674 | _LIBCPP_INLINE_VISIBILITY |
| 3660 | 3675 | wstring_convert(_Codecvt* __pcvt, state_type __state); |
| 3661 | 3676 | _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err, |
| ... | ... | @@ -3922,9 +3937,20 @@ private: |
| 3922 | 3937 | |
| 3923 | 3938 | wbuffer_convert(const wbuffer_convert&); |
| 3924 | 3939 | wbuffer_convert& operator=(const wbuffer_convert&); |
| 3940 | ||
| 3925 | 3941 | public: |
| 3926 | _LIBCPP_EXPLICIT_AFTER_CXX11 wbuffer_convert(streambuf* __bytebuf = 0, | |
| 3927 | _Codecvt* __pcvt = new _Codecvt, state_type __state = state_type()); | |
| 3942 | #ifndef _LIBCPP_CXX03_LANG | |
| 3943 | wbuffer_convert() : wbuffer_convert(nullptr) {} | |
| 3944 | explicit wbuffer_convert(streambuf* __bytebuf, | |
| 3945 | _Codecvt* __pcvt = new _Codecvt, | |
| 3946 | state_type __state = state_type()); | |
| 3947 | #else | |
| 3948 | _LIBCPP_EXPLICIT_AFTER_CXX11 | |
| 3949 | wbuffer_convert(streambuf* __bytebuf = nullptr, | |
| 3950 | _Codecvt* __pcvt = new _Codecvt, | |
| 3951 | state_type __state = state_type()); | |
| 3952 | #endif | |
| 3953 | ||
| 3928 | 3954 | ~wbuffer_convert(); |
| 3929 | 3955 | |
| 3930 | 3956 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -3961,9 +3987,9 @@ private: |
| 3961 | 3987 | template <class _Codecvt, class _Elem, class _Tr> |
| 3962 | 3988 | wbuffer_convert<_Codecvt, _Elem, _Tr>:: |
| 3963 | 3989 | wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt, state_type __state) |
| 3964 | : __extbuf_(0), | |
| 3965 | __extbufnext_(0), | |
| 3966 | __extbufend_(0), | |
| 3990 | : __extbuf_(nullptr), | |
| 3991 | __extbufnext_(nullptr), | |
| 3992 | __extbufend_(nullptr), | |
| 3967 | 3993 | __ebs_(0), |
| 3968 | 3994 | __intbuf_(0), |
| 3969 | 3995 | __ibs_(0), |
| ... | ... | @@ -4003,7 +4029,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow() |
| 4003 | 4029 | int_type __c = traits_type::eof(); |
| 4004 | 4030 | if (this->gptr() == this->egptr()) |
| 4005 | 4031 | { |
| 4006 | memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); | |
| 4032 | _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); | |
| 4007 | 4033 | if (__always_noconv_) |
| 4008 | 4034 | { |
| 4009 | 4035 | streamsize __nmemb = static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz); |
| ... | ... | @@ -4020,7 +4046,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow() |
| 4020 | 4046 | { |
| 4021 | 4047 | _LIBCPP_ASSERT(!(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" ); |
| 4022 | 4048 | if (__extbufend_ != __extbufnext_) |
| 4023 | memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); | |
| 4049 | _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); | |
| 4024 | 4050 | __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_); |
| 4025 | 4051 | __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_); |
| 4026 | 4052 | streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz), |
| ... | ... | @@ -4336,12 +4362,12 @@ template <class _Codecvt, class _Elem, class _Tr> |
| 4336 | 4362 | wbuffer_convert<_Codecvt, _Elem, _Tr>* |
| 4337 | 4363 | wbuffer_convert<_Codecvt, _Elem, _Tr>::__close() |
| 4338 | 4364 | { |
| 4339 | wbuffer_convert* __rt = 0; | |
| 4340 | if (__cv_ != 0 && __bufptr_ != 0) | |
| 4365 | wbuffer_convert* __rt = nullptr; | |
| 4366 | if (__cv_ != nullptr && __bufptr_ != nullptr) | |
| 4341 | 4367 | { |
| 4342 | 4368 | __rt = this; |
| 4343 | 4369 | if ((__cm_ & ios_base::out) && sync()) |
| 4344 | __rt = 0; | |
| 4370 | __rt = nullptr; | |
| 4345 | 4371 | } |
| 4346 | 4372 | return __rt; |
| 4347 | 4373 | } |
lib/libcxx/include/locale.h+5-1| ... | ... | @@ -35,8 +35,12 @@ Functions: |
| 35 | 35 | |
| 36 | 36 | #include <__config> |
| 37 | 37 | |
| 38 | #if defined(_LIBCPP_HAS_NO_LOCALIZATION) | |
| 39 | # error "Localization is not supported by this configuration of libc++" | |
| 40 | #endif | |
| 41 | ||
| 38 | 42 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 39 | #pragma GCC system_header | |
| 43 | # pragma GCC system_header | |
| 40 | 44 | #endif |
| 41 | 45 | |
| 42 | 46 | #include_next <locale.h> |
lib/libcxx/include/map+25-25| ... | ... | @@ -1230,7 +1230,7 @@ public: |
| 1230 | 1230 | return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k, |
| 1231 | 1231 | _VSTD::piecewise_construct, |
| 1232 | 1232 | _VSTD::forward_as_tuple(__k), |
| 1233 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); | |
| 1233 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first; | |
| 1234 | 1234 | } |
| 1235 | 1235 | |
| 1236 | 1236 | template <class... _Args> |
| ... | ... | @@ -1240,7 +1240,7 @@ public: |
| 1240 | 1240 | return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k, |
| 1241 | 1241 | _VSTD::piecewise_construct, |
| 1242 | 1242 | _VSTD::forward_as_tuple(_VSTD::move(__k)), |
| 1243 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); | |
| 1243 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first; | |
| 1244 | 1244 | } |
| 1245 | 1245 | |
| 1246 | 1246 | template <class _Vp> |
| ... | ... | @@ -1270,30 +1270,30 @@ public: |
| 1270 | 1270 | } |
| 1271 | 1271 | |
| 1272 | 1272 | template <class _Vp> |
| 1273 | _LIBCPP_INLINE_VISIBILITY | |
| 1274 | iterator insert_or_assign(const_iterator __h, const key_type& __k, _Vp&& __v) | |
| 1275 | { | |
| 1276 | iterator __p = lower_bound(__k); | |
| 1277 | if ( __p != end() && !key_comp()(__k, __p->first)) | |
| 1278 | { | |
| 1279 | __p->second = _VSTD::forward<_Vp>(__v); | |
| 1280 | return __p; | |
| 1281 | } | |
| 1282 | return emplace_hint(__h, __k, _VSTD::forward<_Vp>(__v)); | |
| 1283 | } | |
| 1273 | _LIBCPP_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h, | |
| 1274 | const key_type& __k, | |
| 1275 | _Vp&& __v) { | |
| 1276 | auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args( | |
| 1277 | __h.__i_, __k, __k, _VSTD::forward<_Vp>(__v)); | |
| 1278 | ||
| 1279 | if (!__inserted) | |
| 1280 | __r->__get_value().second = _VSTD::forward<_Vp>(__v); | |
| 1281 | ||
| 1282 | return __r; | |
| 1283 | } | |
| 1284 | 1284 | |
| 1285 | 1285 | template <class _Vp> |
| 1286 | _LIBCPP_INLINE_VISIBILITY | |
| 1287 | iterator insert_or_assign(const_iterator __h, key_type&& __k, _Vp&& __v) | |
| 1288 | { | |
| 1289 | iterator __p = lower_bound(__k); | |
| 1290 | if ( __p != end() && !key_comp()(__k, __p->first)) | |
| 1291 | { | |
| 1292 | __p->second = _VSTD::forward<_Vp>(__v); | |
| 1293 | return __p; | |
| 1294 | } | |
| 1295 | return emplace_hint(__h, _VSTD::move(__k), _VSTD::forward<_Vp>(__v)); | |
| 1296 | } | |
| 1286 | _LIBCPP_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h, | |
| 1287 | key_type&& __k, | |
| 1288 | _Vp&& __v) { | |
| 1289 | auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args( | |
| 1290 | __h.__i_, __k, _VSTD::move(__k), _VSTD::forward<_Vp>(__v)); | |
| 1291 | ||
| 1292 | if (!__inserted) | |
| 1293 | __r->__get_value().second = _VSTD::forward<_Vp>(__v); | |
| 1294 | ||
| 1295 | return __r; | |
| 1296 | } | |
| 1297 | 1297 | |
| 1298 | 1298 | #endif // _LIBCPP_STD_VER > 14 |
| 1299 | 1299 | |
| ... | ... | @@ -1546,7 +1546,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node_with_key(const key_type& |
| 1546 | 1546 | __h.get_deleter().__first_constructed = true; |
| 1547 | 1547 | __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second)); |
| 1548 | 1548 | __h.get_deleter().__second_constructed = true; |
| 1549 | return _LIBCPP_EXPLICIT_MOVE(__h); // explicitly moved for C++03 | |
| 1549 | return __h; | |
| 1550 | 1550 | } |
| 1551 | 1551 | |
| 1552 | 1552 | template <class _Key, class _Tp, class _Compare, class _Allocator> |
lib/libcxx/include/memory+418-1383| ... | ... | @@ -46,7 +46,7 @@ struct pointer_traits<T*> |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | 48 | template <class T> constexpr T* to_address(T* p) noexcept; // C++20 |
| 49 | template <class Ptr> auto to_address(const Ptr& p) noexcept; // C++20 | |
| 49 | template <class Ptr> constexpr auto to_address(const Ptr& p) noexcept; // C++20 | |
| 50 | 50 | |
| 51 | 51 | template <class Alloc> |
| 52 | 52 | struct allocator_traits |
| ... | ... | @@ -83,21 +83,19 @@ struct allocator_traits |
| 83 | 83 | template <class T> using rebind_alloc = Alloc::rebind<T>::other | Alloc<T, Args...>; |
| 84 | 84 | template <class T> using rebind_traits = allocator_traits<rebind_alloc<T>>; |
| 85 | 85 | |
| 86 | static pointer allocate(allocator_type& a, size_type n); // [[nodiscard]] in C++20 | |
| 87 | static pointer allocate(allocator_type& a, size_type n, const_void_pointer hint); // [[nodiscard]] in C++20 | |
| 86 | static pointer allocate(allocator_type& a, size_type n); // constexpr and [[nodiscard]] in C++20 | |
| 87 | static pointer allocate(allocator_type& a, size_type n, const_void_pointer hint); // constexpr and [[nodiscard]] in C++20 | |
| 88 | 88 | |
| 89 | static void deallocate(allocator_type& a, pointer p, size_type n) noexcept; | |
| 89 | static void deallocate(allocator_type& a, pointer p, size_type n) noexcept; // constexpr in C++20 | |
| 90 | 90 | |
| 91 | 91 | template <class T, class... Args> |
| 92 | static void construct(allocator_type& a, T* p, Args&&... args); | |
| 92 | static void construct(allocator_type& a, T* p, Args&&... args); // constexpr in C++20 | |
| 93 | 93 | |
| 94 | 94 | template <class T> |
| 95 | static void destroy(allocator_type& a, T* p); | |
| 95 | static void destroy(allocator_type& a, T* p); // constexpr in C++20 | |
| 96 | 96 | |
| 97 | static size_type max_size(const allocator_type& a); // noexcept in C++14 | |
| 98 | ||
| 99 | static allocator_type | |
| 100 | select_on_container_copy_construction(const allocator_type& a); | |
| 97 | static size_type max_size(const allocator_type& a); // noexcept in C++14, constexpr in C++20 | |
| 98 | static allocator_type select_on_container_copy_construction(const allocator_type& a); // constexpr in C++20 | |
| 101 | 99 | }; |
| 102 | 100 | |
| 103 | 101 | template <> |
| ... | ... | @@ -115,8 +113,8 @@ template <class T> |
| 115 | 113 | class allocator |
| 116 | 114 | { |
| 117 | 115 | public: |
| 118 | typedef size_t size_type; // deprecated in C++17, removed in C++20 | |
| 119 | typedef ptrdiff_t difference_type; // deprecated in C++17, removed in C++20 | |
| 116 | typedef size_t size_type; | |
| 117 | typedef ptrdiff_t difference_type; | |
| 120 | 118 | typedef T* pointer; // deprecated in C++17, removed in C++20 |
| 121 | 119 | typedef const T* const_pointer; // deprecated in C++17, removed in C++20 |
| 122 | 120 | typedef typename add_lvalue_reference<T>::type |
| ... | ... | @@ -135,12 +133,12 @@ public: |
| 135 | 133 | constexpr allocator(const allocator&) noexcept; // constexpr in C++20 |
| 136 | 134 | template <class U> |
| 137 | 135 | constexpr allocator(const allocator<U>&) noexcept; // constexpr in C++20 |
| 138 | ~allocator(); | |
| 136 | ~allocator(); // constexpr in C++20 | |
| 139 | 137 | pointer address(reference x) const noexcept; // deprecated in C++17, removed in C++20 |
| 140 | 138 | const_pointer address(const_reference x) const noexcept; // deprecated in C++17, removed in C++20 |
| 141 | 139 | T* allocate(size_t n, const void* hint); // deprecated in C++17, removed in C++20 |
| 142 | T* allocate(size_t n); | |
| 143 | void deallocate(T* p, size_t n) noexcept; | |
| 140 | T* allocate(size_t n); // constexpr in C++20 | |
| 141 | void deallocate(T* p, size_t n) noexcept; // constexpr in C++20 | |
| 144 | 142 | size_type max_size() const noexcept; // deprecated in C++17, removed in C++20 |
| 145 | 143 | template<class U, class... Args> |
| 146 | 144 | void construct(U* p, Args&&... args); // deprecated in C++17, removed in C++20 |
| ... | ... | @@ -149,10 +147,10 @@ public: |
| 149 | 147 | }; |
| 150 | 148 | |
| 151 | 149 | template <class T, class U> |
| 152 | bool operator==(const allocator<T>&, const allocator<U>&) noexcept; | |
| 150 | bool operator==(const allocator<T>&, const allocator<U>&) noexcept; // constexpr in C++20 | |
| 153 | 151 | |
| 154 | 152 | template <class T, class U> |
| 155 | bool operator!=(const allocator<T>&, const allocator<U>&) noexcept; | |
| 153 | bool operator!=(const allocator<T>&, const allocator<U>&) noexcept; // constexpr in C++20 | |
| 156 | 154 | |
| 157 | 155 | template <class OutputIterator, class T> |
| 158 | 156 | class raw_storage_iterator |
| ... | ... | @@ -191,14 +189,17 @@ template <class ForwardIterator, class Size, class T> |
| 191 | 189 | ForwardIterator |
| 192 | 190 | uninitialized_fill_n(ForwardIterator first, Size n, const T& x); |
| 193 | 191 | |
| 192 | template <class T, class ...Args> | |
| 193 | constexpr T* construct_at(T* location, Args&& ...args); // since C++20 | |
| 194 | ||
| 194 | 195 | template <class T> |
| 195 | void destroy_at(T* location); | |
| 196 | void destroy_at(T* location); // constexpr in C++20 | |
| 196 | 197 | |
| 197 | 198 | template <class ForwardIterator> |
| 198 | void destroy(ForwardIterator first, ForwardIterator last); | |
| 199 | void destroy(ForwardIterator first, ForwardIterator last); // constexpr in C++20 | |
| 199 | 200 | |
| 200 | 201 | template <class ForwardIterator, class Size> |
| 201 | ForwardIterator destroy_n(ForwardIterator first, Size n); | |
| 202 | ForwardIterator destroy_n(ForwardIterator first, Size n); // constexpr in C++20 | |
| 202 | 203 | |
| 203 | 204 | template <class InputIterator, class ForwardIterator> |
| 204 | 205 | ForwardIterator uninitialized_move(InputIterator first, InputIterator last, ForwardIterator result); |
| ... | ... | @@ -338,7 +339,7 @@ public: |
| 338 | 339 | pointer release() noexcept; |
| 339 | 340 | void reset(pointer p = pointer()) noexcept; |
| 340 | 341 | void reset(nullptr_t) noexcept; |
| 341 | template <class U> void reset(U) = delete; | |
| 342 | template <class U> void reset(U) = delete; | |
| 342 | 343 | void swap(unique_ptr& u) noexcept; |
| 343 | 344 | }; |
| 344 | 345 | |
| ... | ... | @@ -664,6 +665,7 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space); |
| 664 | 665 | */ |
| 665 | 666 | |
| 666 | 667 | #include <__config> |
| 668 | #include <__availability> | |
| 667 | 669 | #include <type_traits> |
| 668 | 670 | #include <typeinfo> |
| 669 | 671 | #include <cstddef> |
| ... | ... | @@ -677,6 +679,10 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space); |
| 677 | 679 | #include <tuple> |
| 678 | 680 | #include <stdexcept> |
| 679 | 681 | #include <cstring> |
| 682 | #include <__memory/allocator_traits.h> | |
| 683 | #include <__memory/base.h> | |
| 684 | #include <__memory/pointer_traits.h> | |
| 685 | #include <__memory/utilities.h> | |
| 680 | 686 | #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) |
| 681 | 687 | # include <atomic> |
| 682 | 688 | #endif |
| ... | ... | @@ -716,413 +722,11 @@ _ValueType __libcpp_acquire_load(_ValueType const* __value) { |
| 716 | 722 | #endif |
| 717 | 723 | } |
| 718 | 724 | |
| 719 | // addressof moved to <type_traits> | |
| 720 | ||
| 721 | template <class _Tp> class allocator; | |
| 722 | ||
| 723 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 724 | template <> | |
| 725 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 allocator<void> | |
| 726 | { | |
| 727 | public: | |
| 728 | typedef void* pointer; | |
| 729 | typedef const void* const_pointer; | |
| 730 | typedef void value_type; | |
| 731 | ||
| 732 | template <class _Up> struct rebind {typedef allocator<_Up> other;}; | |
| 733 | }; | |
| 734 | ||
| 735 | template <> | |
| 736 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 allocator<const void> | |
| 737 | { | |
| 738 | public: | |
| 739 | typedef const void* pointer; | |
| 740 | typedef const void* const_pointer; | |
| 741 | typedef const void value_type; | |
| 742 | ||
| 743 | template <class _Up> struct rebind {typedef allocator<_Up> other;}; | |
| 744 | }; | |
| 745 | #endif | |
| 746 | ||
| 747 | // pointer_traits | |
| 748 | ||
| 749 | template <class _Tp, class = void> | |
| 750 | struct __has_element_type : false_type {}; | |
| 751 | ||
| 752 | template <class _Tp> | |
| 753 | struct __has_element_type<_Tp, | |
| 754 | typename __void_t<typename _Tp::element_type>::type> : true_type {}; | |
| 755 | ||
| 756 | template <class _Ptr, bool = __has_element_type<_Ptr>::value> | |
| 757 | struct __pointer_traits_element_type; | |
| 758 | ||
| 759 | template <class _Ptr> | |
| 760 | struct __pointer_traits_element_type<_Ptr, true> | |
| 761 | { | |
| 762 | typedef _LIBCPP_NODEBUG_TYPE typename _Ptr::element_type type; | |
| 763 | }; | |
| 764 | ||
| 765 | #ifndef _LIBCPP_HAS_NO_VARIADICS | |
| 766 | ||
| 767 | template <template <class, class...> class _Sp, class _Tp, class ..._Args> | |
| 768 | struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true> | |
| 769 | { | |
| 770 | typedef _LIBCPP_NODEBUG_TYPE typename _Sp<_Tp, _Args...>::element_type type; | |
| 771 | }; | |
| 772 | ||
| 773 | template <template <class, class...> class _Sp, class _Tp, class ..._Args> | |
| 774 | struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false> | |
| 775 | { | |
| 776 | typedef _LIBCPP_NODEBUG_TYPE _Tp type; | |
| 777 | }; | |
| 778 | ||
| 779 | #else // _LIBCPP_HAS_NO_VARIADICS | |
| 780 | ||
| 781 | template <template <class> class _Sp, class _Tp> | |
| 782 | struct __pointer_traits_element_type<_Sp<_Tp>, true> | |
| 783 | { | |
| 784 | typedef typename _Sp<_Tp>::element_type type; | |
| 785 | }; | |
| 786 | ||
| 787 | template <template <class> class _Sp, class _Tp> | |
| 788 | struct __pointer_traits_element_type<_Sp<_Tp>, false> | |
| 789 | { | |
| 790 | typedef _Tp type; | |
| 791 | }; | |
| 792 | ||
| 793 | template <template <class, class> class _Sp, class _Tp, class _A0> | |
| 794 | struct __pointer_traits_element_type<_Sp<_Tp, _A0>, true> | |
| 795 | { | |
| 796 | typedef typename _Sp<_Tp, _A0>::element_type type; | |
| 797 | }; | |
| 798 | ||
| 799 | template <template <class, class> class _Sp, class _Tp, class _A0> | |
| 800 | struct __pointer_traits_element_type<_Sp<_Tp, _A0>, false> | |
| 801 | { | |
| 802 | typedef _Tp type; | |
| 803 | }; | |
| 804 | ||
| 805 | template <template <class, class, class> class _Sp, class _Tp, class _A0, class _A1> | |
| 806 | struct __pointer_traits_element_type<_Sp<_Tp, _A0, _A1>, true> | |
| 807 | { | |
| 808 | typedef typename _Sp<_Tp, _A0, _A1>::element_type type; | |
| 809 | }; | |
| 810 | ||
| 811 | template <template <class, class, class> class _Sp, class _Tp, class _A0, class _A1> | |
| 812 | struct __pointer_traits_element_type<_Sp<_Tp, _A0, _A1>, false> | |
| 813 | { | |
| 814 | typedef _Tp type; | |
| 815 | }; | |
| 816 | ||
| 817 | template <template <class, class, class, class> class _Sp, class _Tp, class _A0, | |
| 818 | class _A1, class _A2> | |
| 819 | struct __pointer_traits_element_type<_Sp<_Tp, _A0, _A1, _A2>, true> | |
| 820 | { | |
| 821 | typedef typename _Sp<_Tp, _A0, _A1, _A2>::element_type type; | |
| 822 | }; | |
| 823 | ||
| 824 | template <template <class, class, class, class> class _Sp, class _Tp, class _A0, | |
| 825 | class _A1, class _A2> | |
| 826 | struct __pointer_traits_element_type<_Sp<_Tp, _A0, _A1, _A2>, false> | |
| 827 | { | |
| 828 | typedef _Tp type; | |
| 829 | }; | |
| 830 | ||
| 831 | #endif // _LIBCPP_HAS_NO_VARIADICS | |
| 832 | ||
| 833 | template <class _Tp, class = void> | |
| 834 | struct __has_difference_type : false_type {}; | |
| 835 | ||
| 836 | template <class _Tp> | |
| 837 | struct __has_difference_type<_Tp, | |
| 838 | typename __void_t<typename _Tp::difference_type>::type> : true_type {}; | |
| 839 | ||
| 840 | template <class _Ptr, bool = __has_difference_type<_Ptr>::value> | |
| 841 | struct __pointer_traits_difference_type | |
| 842 | { | |
| 843 | typedef _LIBCPP_NODEBUG_TYPE ptrdiff_t type; | |
| 844 | }; | |
| 845 | ||
| 846 | template <class _Ptr> | |
| 847 | struct __pointer_traits_difference_type<_Ptr, true> | |
| 848 | { | |
| 849 | typedef _LIBCPP_NODEBUG_TYPE typename _Ptr::difference_type type; | |
| 850 | }; | |
| 851 | ||
| 852 | template <class _Tp, class _Up> | |
| 853 | struct __has_rebind | |
| 854 | { | |
| 855 | private: | |
| 856 | struct __two {char __lx; char __lxx;}; | |
| 857 | template <class _Xp> static __two __test(...); | |
| 858 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 859 | template <class _Xp> static char __test(typename _Xp::template rebind<_Up>* = 0); | |
| 860 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 861 | public: | |
| 862 | static const bool value = sizeof(__test<_Tp>(0)) == 1; | |
| 863 | }; | |
| 864 | ||
| 865 | template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value> | |
| 866 | struct __pointer_traits_rebind | |
| 867 | { | |
| 868 | #ifndef _LIBCPP_CXX03_LANG | |
| 869 | typedef _LIBCPP_NODEBUG_TYPE typename _Tp::template rebind<_Up> type; | |
| 870 | #else | |
| 871 | typedef _LIBCPP_NODEBUG_TYPE typename _Tp::template rebind<_Up>::other type; | |
| 872 | #endif | |
| 873 | }; | |
| 874 | ||
| 875 | #ifndef _LIBCPP_HAS_NO_VARIADICS | |
| 876 | ||
| 877 | template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up> | |
| 878 | struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true> | |
| 879 | { | |
| 880 | #ifndef _LIBCPP_CXX03_LANG | |
| 881 | typedef _LIBCPP_NODEBUG_TYPE typename _Sp<_Tp, _Args...>::template rebind<_Up> type; | |
| 882 | #else | |
| 883 | typedef _LIBCPP_NODEBUG_TYPE typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type; | |
| 884 | #endif | |
| 885 | }; | |
| 886 | ||
| 887 | template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up> | |
| 888 | struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false> | |
| 889 | { | |
| 890 | typedef _Sp<_Up, _Args...> type; | |
| 891 | }; | |
| 892 | ||
| 893 | #else // _LIBCPP_HAS_NO_VARIADICS | |
| 894 | ||
| 895 | template <template <class> class _Sp, class _Tp, class _Up> | |
| 896 | struct __pointer_traits_rebind<_Sp<_Tp>, _Up, true> | |
| 897 | { | |
| 898 | #ifndef _LIBCPP_CXX03_LANG | |
| 899 | typedef typename _Sp<_Tp>::template rebind<_Up> type; | |
| 900 | #else | |
| 901 | typedef typename _Sp<_Tp>::template rebind<_Up>::other type; | |
| 902 | #endif | |
| 903 | }; | |
| 904 | ||
| 905 | template <template <class> class _Sp, class _Tp, class _Up> | |
| 906 | struct __pointer_traits_rebind<_Sp<_Tp>, _Up, false> | |
| 907 | { | |
| 908 | typedef _Sp<_Up> type; | |
| 909 | }; | |
| 910 | ||
| 911 | template <template <class, class> class _Sp, class _Tp, class _A0, class _Up> | |
| 912 | struct __pointer_traits_rebind<_Sp<_Tp, _A0>, _Up, true> | |
| 913 | { | |
| 914 | #ifndef _LIBCPP_CXX03_LANG | |
| 915 | typedef typename _Sp<_Tp, _A0>::template rebind<_Up> type; | |
| 916 | #else | |
| 917 | typedef typename _Sp<_Tp, _A0>::template rebind<_Up>::other type; | |
| 918 | #endif | |
| 919 | }; | |
| 920 | ||
| 921 | template <template <class, class> class _Sp, class _Tp, class _A0, class _Up> | |
| 922 | struct __pointer_traits_rebind<_Sp<_Tp, _A0>, _Up, false> | |
| 923 | { | |
| 924 | typedef _Sp<_Up, _A0> type; | |
| 925 | }; | |
| 926 | ||
| 927 | template <template <class, class, class> class _Sp, class _Tp, class _A0, | |
| 928 | class _A1, class _Up> | |
| 929 | struct __pointer_traits_rebind<_Sp<_Tp, _A0, _A1>, _Up, true> | |
| 930 | { | |
| 931 | #ifndef _LIBCPP_CXX03_LANG | |
| 932 | typedef typename _Sp<_Tp, _A0, _A1>::template rebind<_Up> type; | |
| 933 | #else | |
| 934 | typedef typename _Sp<_Tp, _A0, _A1>::template rebind<_Up>::other type; | |
| 935 | #endif | |
| 936 | }; | |
| 937 | ||
| 938 | template <template <class, class, class> class _Sp, class _Tp, class _A0, | |
| 939 | class _A1, class _Up> | |
| 940 | struct __pointer_traits_rebind<_Sp<_Tp, _A0, _A1>, _Up, false> | |
| 941 | { | |
| 942 | typedef _Sp<_Up, _A0, _A1> type; | |
| 943 | }; | |
| 944 | ||
| 945 | template <template <class, class, class, class> class _Sp, class _Tp, class _A0, | |
| 946 | class _A1, class _A2, class _Up> | |
| 947 | struct __pointer_traits_rebind<_Sp<_Tp, _A0, _A1, _A2>, _Up, true> | |
| 948 | { | |
| 949 | #ifndef _LIBCPP_CXX03_LANG | |
| 950 | typedef typename _Sp<_Tp, _A0, _A1, _A2>::template rebind<_Up> type; | |
| 951 | #else | |
| 952 | typedef typename _Sp<_Tp, _A0, _A1, _A2>::template rebind<_Up>::other type; | |
| 953 | #endif | |
| 954 | }; | |
| 955 | ||
| 956 | template <template <class, class, class, class> class _Sp, class _Tp, class _A0, | |
| 957 | class _A1, class _A2, class _Up> | |
| 958 | struct __pointer_traits_rebind<_Sp<_Tp, _A0, _A1, _A2>, _Up, false> | |
| 959 | { | |
| 960 | typedef _Sp<_Up, _A0, _A1, _A2> type; | |
| 961 | }; | |
| 962 | ||
| 963 | #endif // _LIBCPP_HAS_NO_VARIADICS | |
| 964 | ||
| 965 | template <class _Ptr> | |
| 966 | struct _LIBCPP_TEMPLATE_VIS pointer_traits | |
| 967 | { | |
| 968 | typedef _Ptr pointer; | |
| 969 | typedef typename __pointer_traits_element_type<pointer>::type element_type; | |
| 970 | typedef typename __pointer_traits_difference_type<pointer>::type difference_type; | |
| 971 | ||
| 972 | #ifndef _LIBCPP_CXX03_LANG | |
| 973 | template <class _Up> using rebind = typename __pointer_traits_rebind<pointer, _Up>::type; | |
| 974 | #else | |
| 975 | template <class _Up> struct rebind | |
| 976 | {typedef typename __pointer_traits_rebind<pointer, _Up>::type other;}; | |
| 977 | #endif // _LIBCPP_CXX03_LANG | |
| 978 | ||
| 979 | private: | |
| 980 | struct __nat {}; | |
| 981 | public: | |
| 982 | _LIBCPP_INLINE_VISIBILITY | |
| 983 | static pointer pointer_to(typename conditional<is_void<element_type>::value, | |
| 984 | __nat, element_type>::type& __r) | |
| 985 | {return pointer::pointer_to(__r);} | |
| 986 | }; | |
| 987 | ||
| 988 | template <class _Tp> | |
| 989 | struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> | |
| 990 | { | |
| 991 | typedef _Tp* pointer; | |
| 992 | typedef _Tp element_type; | |
| 993 | typedef ptrdiff_t difference_type; | |
| 994 | ||
| 995 | #ifndef _LIBCPP_CXX03_LANG | |
| 996 | template <class _Up> using rebind = _Up*; | |
| 997 | #else | |
| 998 | template <class _Up> struct rebind {typedef _Up* other;}; | |
| 999 | #endif | |
| 1000 | ||
| 1001 | private: | |
| 1002 | struct __nat {}; | |
| 1003 | public: | |
| 1004 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1005 | static pointer pointer_to(typename conditional<is_void<element_type>::value, | |
| 1006 | __nat, element_type>::type& __r) _NOEXCEPT | |
| 1007 | {return _VSTD::addressof(__r);} | |
| 1008 | }; | |
| 1009 | ||
| 1010 | template <class _From, class _To> | |
| 1011 | struct __rebind_pointer { | |
| 1012 | #ifndef _LIBCPP_CXX03_LANG | |
| 1013 | typedef typename pointer_traits<_From>::template rebind<_To> type; | |
| 1014 | #else | |
| 1015 | typedef typename pointer_traits<_From>::template rebind<_To>::other type; | |
| 1016 | #endif | |
| 1017 | }; | |
| 1018 | ||
| 1019 | // allocator_traits | |
| 1020 | ||
| 1021 | template <class _Tp, class = void> | |
| 1022 | struct __has_pointer_type : false_type {}; | |
| 1023 | ||
| 1024 | template <class _Tp> | |
| 1025 | struct __has_pointer_type<_Tp, | |
| 1026 | typename __void_t<typename _Tp::pointer>::type> : true_type {}; | |
| 1027 | ||
| 1028 | namespace __pointer_type_imp | |
| 1029 | { | |
| 1030 | ||
| 1031 | template <class _Tp, class _Dp, bool = __has_pointer_type<_Dp>::value> | |
| 1032 | struct __pointer_type | |
| 1033 | { | |
| 1034 | typedef _LIBCPP_NODEBUG_TYPE typename _Dp::pointer type; | |
| 1035 | }; | |
| 1036 | ||
| 1037 | template <class _Tp, class _Dp> | |
| 1038 | struct __pointer_type<_Tp, _Dp, false> | |
| 1039 | { | |
| 1040 | typedef _LIBCPP_NODEBUG_TYPE _Tp* type; | |
| 1041 | }; | |
| 1042 | ||
| 1043 | } // __pointer_type_imp | |
| 1044 | ||
| 1045 | template <class _Tp, class _Dp> | |
| 1046 | struct __pointer_type | |
| 1047 | { | |
| 1048 | typedef _LIBCPP_NODEBUG_TYPE typename __pointer_type_imp::__pointer_type<_Tp, typename remove_reference<_Dp>::type>::type type; | |
| 1049 | }; | |
| 1050 | ||
| 1051 | template <class _Tp, class = void> | |
| 1052 | struct __has_const_pointer : false_type {}; | |
| 1053 | ||
| 1054 | template <class _Tp> | |
| 1055 | struct __has_const_pointer<_Tp, | |
| 1056 | typename __void_t<typename _Tp::const_pointer>::type> : true_type {}; | |
| 1057 | ||
| 1058 | template <class _Tp, class _Ptr, class _Alloc, bool = __has_const_pointer<_Alloc>::value> | |
| 1059 | struct __const_pointer | |
| 1060 | { | |
| 1061 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::const_pointer type; | |
| 1062 | }; | |
| 1063 | ||
| 1064 | template <class _Tp, class _Ptr, class _Alloc> | |
| 1065 | struct __const_pointer<_Tp, _Ptr, _Alloc, false> | |
| 1066 | { | |
| 1067 | #ifndef _LIBCPP_CXX03_LANG | |
| 1068 | typedef _LIBCPP_NODEBUG_TYPE typename pointer_traits<_Ptr>::template rebind<const _Tp> type; | |
| 1069 | #else | |
| 1070 | typedef typename pointer_traits<_Ptr>::template rebind<const _Tp>::other type; | |
| 1071 | #endif | |
| 1072 | }; | |
| 1073 | ||
| 1074 | template <class _Tp, class = void> | |
| 1075 | struct __has_void_pointer : false_type {}; | |
| 1076 | ||
| 1077 | template <class _Tp> | |
| 1078 | struct __has_void_pointer<_Tp, | |
| 1079 | typename __void_t<typename _Tp::void_pointer>::type> : true_type {}; | |
| 1080 | ||
| 1081 | template <class _Ptr, class _Alloc, bool = __has_void_pointer<_Alloc>::value> | |
| 1082 | struct __void_pointer | |
| 1083 | { | |
| 1084 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::void_pointer type; | |
| 1085 | }; | |
| 1086 | ||
| 1087 | template <class _Ptr, class _Alloc> | |
| 1088 | struct __void_pointer<_Ptr, _Alloc, false> | |
| 1089 | { | |
| 1090 | #ifndef _LIBCPP_CXX03_LANG | |
| 1091 | typedef _LIBCPP_NODEBUG_TYPE typename pointer_traits<_Ptr>::template rebind<void> type; | |
| 1092 | #else | |
| 1093 | typedef _LIBCPP_NODEBUG_TYPE typename pointer_traits<_Ptr>::template rebind<void>::other type; | |
| 1094 | #endif | |
| 1095 | }; | |
| 1096 | ||
| 1097 | template <class _Tp, class = void> | |
| 1098 | struct __has_const_void_pointer : false_type {}; | |
| 1099 | ||
| 1100 | template <class _Tp> | |
| 1101 | struct __has_const_void_pointer<_Tp, | |
| 1102 | typename __void_t<typename _Tp::const_void_pointer>::type> : true_type {}; | |
| 1103 | ||
| 1104 | template <class _Ptr, class _Alloc, bool = __has_const_void_pointer<_Alloc>::value> | |
| 1105 | struct __const_void_pointer | |
| 1106 | { | |
| 1107 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::const_void_pointer type; | |
| 1108 | }; | |
| 1109 | ||
| 1110 | template <class _Ptr, class _Alloc> | |
| 1111 | struct __const_void_pointer<_Ptr, _Alloc, false> | |
| 1112 | { | |
| 1113 | #ifndef _LIBCPP_CXX03_LANG | |
| 1114 | typedef _LIBCPP_NODEBUG_TYPE typename pointer_traits<_Ptr>::template rebind<const void> type; | |
| 1115 | #else | |
| 1116 | typedef _LIBCPP_NODEBUG_TYPE typename pointer_traits<_Ptr>::template rebind<const void>::other type; | |
| 1117 | #endif | |
| 1118 | }; | |
| 1119 | ||
| 1120 | ||
| 1121 | 725 | template <bool _UsePointerTraits> struct __to_address_helper; |
| 1122 | 726 | |
| 1123 | 727 | template <> struct __to_address_helper<true> { |
| 1124 | 728 | template <class _Pointer> |
| 1125 | using __return_type = decltype(pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>())); | |
| 729 | using __return_type = decltype(pointer_traits<_Pointer>::to_address(_VSTD::declval<const _Pointer&>())); | |
| 1126 | 730 | |
| 1127 | 731 | template <class _Pointer> |
| 1128 | 732 | _LIBCPP_CONSTEXPR |
| ... | ... | @@ -1157,7 +761,7 @@ template <> struct __to_address_helper<false> { |
| 1157 | 761 | template <class _Pointer> |
| 1158 | 762 | _LIBCPP_CONSTEXPR |
| 1159 | 763 | static __return_type<_Pointer> |
| 1160 | __do_it(const _Pointer &__p) _NOEXCEPT { return std::__to_address(__p.operator->()); } | |
| 764 | __do_it(const _Pointer &__p) _NOEXCEPT { return _VSTD::__to_address(__p.operator->()); } | |
| 1161 | 765 | }; |
| 1162 | 766 | |
| 1163 | 767 | |
| ... | ... | @@ -1172,7 +776,7 @@ to_address(_Tp* __p) _NOEXCEPT |
| 1172 | 776 | } |
| 1173 | 777 | |
| 1174 | 778 | template <class _Pointer> |
| 1175 | inline _LIBCPP_INLINE_VISIBILITY | |
| 779 | inline _LIBCPP_INLINE_VISIBILITY constexpr | |
| 1176 | 780 | auto |
| 1177 | 781 | to_address(const _Pointer& __p) _NOEXCEPT |
| 1178 | 782 | { |
| ... | ... | @@ -1180,765 +784,287 @@ to_address(const _Pointer& __p) _NOEXCEPT |
| 1180 | 784 | } |
| 1181 | 785 | #endif |
| 1182 | 786 | |
| 1183 | template <class _Tp, class = void> | |
| 1184 | struct __has_size_type : false_type {}; | |
| 1185 | ||
| 1186 | template <class _Tp> | |
| 1187 | struct __has_size_type<_Tp, | |
| 1188 | typename __void_t<typename _Tp::size_type>::type> : true_type {}; | |
| 787 | template <class _Tp> class allocator; | |
| 1189 | 788 | |
| 1190 | template <class _Alloc, class _DiffType, bool = __has_size_type<_Alloc>::value> | |
| 1191 | struct __size_type | |
| 789 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 790 | template <> | |
| 791 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 allocator<void> | |
| 1192 | 792 | { |
| 1193 | typedef _LIBCPP_NODEBUG_TYPE typename make_unsigned<_DiffType>::type type; | |
| 1194 | }; | |
| 793 | public: | |
| 794 | typedef void* pointer; | |
| 795 | typedef const void* const_pointer; | |
| 796 | typedef void value_type; | |
| 1195 | 797 | |
| 1196 | template <class _Alloc, class _DiffType> | |
| 1197 | struct __size_type<_Alloc, _DiffType, true> | |
| 1198 | { | |
| 1199 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::size_type type; | |
| 798 | template <class _Up> struct rebind {typedef allocator<_Up> other;}; | |
| 1200 | 799 | }; |
| 1201 | 800 | |
| 1202 | template <class _Tp, class = void> | |
| 1203 | struct __has_propagate_on_container_copy_assignment : false_type {}; | |
| 1204 | ||
| 1205 | template <class _Tp> | |
| 1206 | struct __has_propagate_on_container_copy_assignment<_Tp, | |
| 1207 | typename __void_t<typename _Tp::propagate_on_container_copy_assignment>::type> | |
| 1208 | : true_type {}; | |
| 1209 | ||
| 1210 | template <class _Alloc, bool = __has_propagate_on_container_copy_assignment<_Alloc>::value> | |
| 1211 | struct __propagate_on_container_copy_assignment | |
| 801 | template <> | |
| 802 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 allocator<const void> | |
| 1212 | 803 | { |
| 1213 | typedef _LIBCPP_NODEBUG_TYPE false_type type; | |
| 1214 | }; | |
| 804 | public: | |
| 805 | typedef const void* pointer; | |
| 806 | typedef const void* const_pointer; | |
| 807 | typedef const void value_type; | |
| 1215 | 808 | |
| 1216 | template <class _Alloc> | |
| 1217 | struct __propagate_on_container_copy_assignment<_Alloc, true> | |
| 1218 | { | |
| 1219 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::propagate_on_container_copy_assignment type; | |
| 809 | template <class _Up> struct rebind {typedef allocator<_Up> other;}; | |
| 1220 | 810 | }; |
| 811 | #endif | |
| 1221 | 812 | |
| 1222 | template <class _Tp, class = void> | |
| 1223 | struct __has_propagate_on_container_move_assignment : false_type {}; | |
| 813 | // allocator | |
| 1224 | 814 | |
| 1225 | 815 | template <class _Tp> |
| 1226 | struct __has_propagate_on_container_move_assignment<_Tp, | |
| 1227 | typename __void_t<typename _Tp::propagate_on_container_move_assignment>::type> | |
| 1228 | : true_type {}; | |
| 1229 | ||
| 1230 | template <class _Alloc, bool = __has_propagate_on_container_move_assignment<_Alloc>::value> | |
| 1231 | struct __propagate_on_container_move_assignment | |
| 816 | class _LIBCPP_TEMPLATE_VIS allocator | |
| 1232 | 817 | { |
| 1233 | typedef false_type type; | |
| 1234 | }; | |
| 1235 | ||
| 1236 | template <class _Alloc> | |
| 1237 | struct __propagate_on_container_move_assignment<_Alloc, true> | |
| 1238 | { | |
| 1239 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::propagate_on_container_move_assignment type; | |
| 1240 | }; | |
| 1241 | ||
| 1242 | template <class _Tp, class = void> | |
| 1243 | struct __has_propagate_on_container_swap : false_type {}; | |
| 1244 | ||
| 1245 | template <class _Tp> | |
| 1246 | struct __has_propagate_on_container_swap<_Tp, | |
| 1247 | typename __void_t<typename _Tp::propagate_on_container_swap>::type> | |
| 1248 | : true_type {}; | |
| 1249 | ||
| 1250 | template <class _Alloc, bool = __has_propagate_on_container_swap<_Alloc>::value> | |
| 1251 | struct __propagate_on_container_swap | |
| 1252 | { | |
| 1253 | typedef false_type type; | |
| 1254 | }; | |
| 1255 | ||
| 1256 | template <class _Alloc> | |
| 1257 | struct __propagate_on_container_swap<_Alloc, true> | |
| 1258 | { | |
| 1259 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::propagate_on_container_swap type; | |
| 1260 | }; | |
| 1261 | ||
| 1262 | template <class _Tp, class = void> | |
| 1263 | struct __has_is_always_equal : false_type {}; | |
| 1264 | ||
| 1265 | template <class _Tp> | |
| 1266 | struct __has_is_always_equal<_Tp, | |
| 1267 | typename __void_t<typename _Tp::is_always_equal>::type> | |
| 1268 | : true_type {}; | |
| 1269 | ||
| 1270 | template <class _Alloc, bool = __has_is_always_equal<_Alloc>::value> | |
| 1271 | struct __is_always_equal | |
| 1272 | { | |
| 1273 | typedef _LIBCPP_NODEBUG_TYPE typename _VSTD::is_empty<_Alloc>::type type; | |
| 1274 | }; | |
| 1275 | ||
| 1276 | template <class _Alloc> | |
| 1277 | struct __is_always_equal<_Alloc, true> | |
| 1278 | { | |
| 1279 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::is_always_equal type; | |
| 1280 | }; | |
| 1281 | ||
| 1282 | template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value> | |
| 1283 | struct __has_rebind_other | |
| 1284 | { | |
| 1285 | private: | |
| 1286 | struct __two {char __lx; char __lxx;}; | |
| 1287 | template <class _Xp> static __two __test(...); | |
| 1288 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1289 | template <class _Xp> static char __test(typename _Xp::template rebind<_Up>::other* = 0); | |
| 1290 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1291 | 818 | public: |
| 1292 | static const bool value = sizeof(__test<_Tp>(0)) == 1; | |
| 1293 | }; | |
| 1294 | ||
| 1295 | template <class _Tp, class _Up> | |
| 1296 | struct __has_rebind_other<_Tp, _Up, false> | |
| 1297 | { | |
| 1298 | static const bool value = false; | |
| 1299 | }; | |
| 1300 | ||
| 1301 | template <class _Tp, class _Up, bool = __has_rebind_other<_Tp, _Up>::value> | |
| 1302 | struct __allocator_traits_rebind | |
| 1303 | { | |
| 1304 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1305 | typedef _LIBCPP_NODEBUG_TYPE typename _Tp::template rebind<_Up>::other type; | |
| 1306 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1307 | }; | |
| 1308 | ||
| 1309 | template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up> | |
| 1310 | struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, true> | |
| 1311 | { | |
| 1312 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1313 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc<_Tp, _Args...>::template rebind<_Up>::other type; | |
| 1314 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1315 | }; | |
| 1316 | ||
| 1317 | template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up> | |
| 1318 | struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, false> | |
| 1319 | { | |
| 1320 | typedef _LIBCPP_NODEBUG_TYPE _Alloc<_Up, _Args...> type; | |
| 1321 | }; | |
| 1322 | ||
| 1323 | #ifndef _LIBCPP_CXX03_LANG | |
| 1324 | ||
| 1325 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1326 | template <class _Alloc, class _SizeType, class _ConstVoidPtr> | |
| 1327 | auto | |
| 1328 | __has_allocate_hint_test(_Alloc&& __a, _SizeType&& __sz, _ConstVoidPtr&& __p) | |
| 1329 | -> decltype((void)__a.allocate(__sz, __p), true_type()); | |
| 1330 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1331 | ||
| 1332 | template <class _Alloc, class _SizeType, class _ConstVoidPtr> | |
| 1333 | auto | |
| 1334 | __has_allocate_hint_test(const _Alloc& __a, _SizeType&& __sz, _ConstVoidPtr&& __p) | |
| 1335 | -> false_type; | |
| 1336 | ||
| 1337 | template <class _Alloc, class _SizeType, class _ConstVoidPtr> | |
| 1338 | struct __has_allocate_hint | |
| 1339 | : decltype(_VSTD::__has_allocate_hint_test(declval<_Alloc>(), | |
| 1340 | declval<_SizeType>(), | |
| 1341 | declval<_ConstVoidPtr>())) | |
| 1342 | { | |
| 1343 | }; | |
| 1344 | ||
| 1345 | #else // _LIBCPP_CXX03_LANG | |
| 1346 | ||
| 1347 | template <class _Alloc, class _SizeType, class _ConstVoidPtr> | |
| 1348 | struct __has_allocate_hint | |
| 1349 | : true_type | |
| 1350 | { | |
| 1351 | }; | |
| 1352 | ||
| 1353 | #endif // _LIBCPP_CXX03_LANG | |
| 1354 | ||
| 1355 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1356 | template <class _Alloc, class ..._Args, | |
| 1357 | class = decltype(_VSTD::declval<_Alloc>().construct(_VSTD::declval<_Args>()...))> | |
| 1358 | static true_type __test_has_construct(int); | |
| 1359 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1360 | ||
| 1361 | template <class _Alloc, class...> | |
| 1362 | static false_type __test_has_construct(...); | |
| 1363 | ||
| 1364 | template <class _Alloc, class ..._Args> | |
| 1365 | struct __has_construct : decltype(__test_has_construct<_Alloc, _Args...>(0)) {}; | |
| 1366 | ||
| 1367 | #if !defined(_LIBCPP_CXX03_LANG) | |
| 1368 | ||
| 1369 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1370 | template <class _Alloc, class _Pointer> | |
| 1371 | auto | |
| 1372 | __has_destroy_test(_Alloc&& __a, _Pointer&& __p) | |
| 1373 | -> decltype(__a.destroy(__p), true_type()); | |
| 1374 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1375 | ||
| 1376 | template <class _Alloc, class _Pointer> | |
| 1377 | auto | |
| 1378 | __has_destroy_test(const _Alloc& __a, _Pointer&& __p) | |
| 1379 | -> false_type; | |
| 1380 | ||
| 1381 | template <class _Alloc, class _Pointer> | |
| 1382 | struct __has_destroy | |
| 1383 | : decltype(_VSTD::__has_destroy_test(declval<_Alloc>(), | |
| 1384 | declval<_Pointer>())) | |
| 1385 | { | |
| 1386 | }; | |
| 1387 | ||
| 1388 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1389 | template <class _Alloc> | |
| 1390 | auto | |
| 1391 | __has_max_size_test(_Alloc&& __a) | |
| 1392 | -> decltype(__a.max_size(), true_type()); | |
| 1393 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1394 | ||
| 1395 | template <class _Alloc> | |
| 1396 | auto | |
| 1397 | __has_max_size_test(const volatile _Alloc& __a) | |
| 1398 | -> false_type; | |
| 1399 | ||
| 1400 | template <class _Alloc> | |
| 1401 | struct __has_max_size | |
| 1402 | : decltype(_VSTD::__has_max_size_test(declval<_Alloc&>())) | |
| 1403 | { | |
| 1404 | }; | |
| 1405 | ||
| 1406 | template <class _Alloc> | |
| 1407 | auto | |
| 1408 | __has_select_on_container_copy_construction_test(_Alloc&& __a) | |
| 1409 | -> decltype(__a.select_on_container_copy_construction(), true_type()); | |
| 1410 | ||
| 1411 | template <class _Alloc> | |
| 1412 | auto | |
| 1413 | __has_select_on_container_copy_construction_test(const volatile _Alloc& __a) | |
| 1414 | -> false_type; | |
| 1415 | ||
| 1416 | template <class _Alloc> | |
| 1417 | struct __has_select_on_container_copy_construction | |
| 1418 | : decltype(_VSTD::__has_select_on_container_copy_construction_test(declval<_Alloc&>())) | |
| 1419 | { | |
| 1420 | }; | |
| 1421 | ||
| 1422 | #else // _LIBCPP_CXX03_LANG | |
| 1423 | ||
| 1424 | template <class _Alloc, class _Pointer, class = void> | |
| 1425 | struct __has_destroy : false_type {}; | |
| 1426 | ||
| 1427 | template <class _Alloc, class _Pointer> | |
| 1428 | struct __has_destroy<_Alloc, _Pointer, typename __void_t< | |
| 1429 | decltype(_VSTD::declval<_Alloc>().destroy(_VSTD::declval<_Pointer>())) | |
| 1430 | >::type> : std::true_type {}; | |
| 1431 | ||
| 1432 | template <class _Alloc> | |
| 1433 | struct __has_max_size | |
| 1434 | : true_type | |
| 1435 | { | |
| 1436 | }; | |
| 1437 | ||
| 1438 | template <class _Alloc> | |
| 1439 | struct __has_select_on_container_copy_construction | |
| 1440 | : false_type | |
| 1441 | { | |
| 1442 | }; | |
| 1443 | ||
| 1444 | #endif // _LIBCPP_CXX03_LANG | |
| 1445 | ||
| 1446 | template <class _Alloc, class _Ptr, bool = __has_difference_type<_Alloc>::value> | |
| 1447 | struct __alloc_traits_difference_type | |
| 1448 | { | |
| 1449 | typedef _LIBCPP_NODEBUG_TYPE typename pointer_traits<_Ptr>::difference_type type; | |
| 1450 | }; | |
| 1451 | ||
| 1452 | template <class _Alloc, class _Ptr> | |
| 1453 | struct __alloc_traits_difference_type<_Alloc, _Ptr, true> | |
| 1454 | { | |
| 1455 | typedef _LIBCPP_NODEBUG_TYPE typename _Alloc::difference_type type; | |
| 1456 | }; | |
| 1457 | ||
| 1458 | template <class _Tp> | |
| 1459 | struct __is_default_allocator : false_type {}; | |
| 1460 | ||
| 1461 | template <class _Tp> | |
| 1462 | struct __is_default_allocator<_VSTD::allocator<_Tp> > : true_type {}; | |
| 1463 | ||
| 1464 | ||
| 1465 | ||
| 1466 | template <class _Alloc, | |
| 1467 | bool = __has_construct<_Alloc, typename _Alloc::value_type*, typename _Alloc::value_type&&>::value && !__is_default_allocator<_Alloc>::value | |
| 1468 | > | |
| 1469 | struct __is_cpp17_move_insertable; | |
| 1470 | template <class _Alloc> | |
| 1471 | struct __is_cpp17_move_insertable<_Alloc, true> : std::true_type {}; | |
| 1472 | template <class _Alloc> | |
| 1473 | struct __is_cpp17_move_insertable<_Alloc, false> : std::is_move_constructible<typename _Alloc::value_type> {}; | |
| 1474 | ||
| 1475 | template <class _Alloc, | |
| 1476 | bool = __has_construct<_Alloc, typename _Alloc::value_type*, const typename _Alloc::value_type&>::value && !__is_default_allocator<_Alloc>::value | |
| 1477 | > | |
| 1478 | struct __is_cpp17_copy_insertable; | |
| 1479 | template <class _Alloc> | |
| 1480 | struct __is_cpp17_copy_insertable<_Alloc, true> : __is_cpp17_move_insertable<_Alloc> {}; | |
| 1481 | template <class _Alloc> | |
| 1482 | struct __is_cpp17_copy_insertable<_Alloc, false> : integral_constant<bool, | |
| 1483 | std::is_copy_constructible<typename _Alloc::value_type>::value && | |
| 1484 | __is_cpp17_move_insertable<_Alloc>::value> | |
| 1485 | {}; | |
| 1486 | ||
| 1487 | ||
| 1488 | ||
| 1489 | template <class _Alloc> | |
| 1490 | struct _LIBCPP_TEMPLATE_VIS allocator_traits | |
| 1491 | { | |
| 1492 | typedef _Alloc allocator_type; | |
| 1493 | typedef typename allocator_type::value_type value_type; | |
| 1494 | ||
| 1495 | typedef typename __pointer_type<value_type, allocator_type>::type pointer; | |
| 1496 | typedef typename __const_pointer<value_type, pointer, allocator_type>::type const_pointer; | |
| 1497 | typedef typename __void_pointer<pointer, allocator_type>::type void_pointer; | |
| 1498 | typedef typename __const_void_pointer<pointer, allocator_type>::type const_void_pointer; | |
| 1499 | ||
| 1500 | typedef typename __alloc_traits_difference_type<allocator_type, pointer>::type difference_type; | |
| 1501 | typedef typename __size_type<allocator_type, difference_type>::type size_type; | |
| 1502 | ||
| 1503 | typedef typename __propagate_on_container_copy_assignment<allocator_type>::type | |
| 1504 | propagate_on_container_copy_assignment; | |
| 1505 | typedef typename __propagate_on_container_move_assignment<allocator_type>::type | |
| 1506 | propagate_on_container_move_assignment; | |
| 1507 | typedef typename __propagate_on_container_swap<allocator_type>::type | |
| 1508 | propagate_on_container_swap; | |
| 1509 | typedef typename __is_always_equal<allocator_type>::type | |
| 1510 | is_always_equal; | |
| 1511 | ||
| 1512 | #ifndef _LIBCPP_CXX03_LANG | |
| 1513 | template <class _Tp> using rebind_alloc = | |
| 1514 | typename __allocator_traits_rebind<allocator_type, _Tp>::type; | |
| 1515 | template <class _Tp> using rebind_traits = allocator_traits<rebind_alloc<_Tp> >; | |
| 1516 | #else // _LIBCPP_CXX03_LANG | |
| 1517 | template <class _Tp> struct rebind_alloc | |
| 1518 | {typedef typename __allocator_traits_rebind<allocator_type, _Tp>::type other;}; | |
| 1519 | template <class _Tp> struct rebind_traits | |
| 1520 | {typedef allocator_traits<typename rebind_alloc<_Tp>::other> other;}; | |
| 1521 | #endif // _LIBCPP_CXX03_LANG | |
| 1522 | ||
| 1523 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 1524 | static pointer allocate(allocator_type& __a, size_type __n) | |
| 1525 | {return __a.allocate(__n);} | |
| 1526 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 1527 | static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) | |
| 1528 | {return __allocate(__a, __n, __hint, | |
| 1529 | __has_allocate_hint<allocator_type, size_type, const_void_pointer>());} | |
| 1530 | ||
| 1531 | _LIBCPP_INLINE_VISIBILITY | |
| 1532 | static void deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT | |
| 1533 | {__a.deallocate(__p, __n);} | |
| 1534 | ||
| 1535 | template <class _Tp, class... _Args> | |
| 1536 | _LIBCPP_INLINE_VISIBILITY | |
| 1537 | static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) | |
| 1538 | {__construct(__has_construct<allocator_type, _Tp*, _Args...>(), | |
| 1539 | __a, __p, _VSTD::forward<_Args>(__args)...);} | |
| 1540 | ||
| 1541 | template <class _Tp> | |
| 1542 | _LIBCPP_INLINE_VISIBILITY | |
| 1543 | static void destroy(allocator_type& __a, _Tp* __p) | |
| 1544 | {__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);} | |
| 1545 | ||
| 1546 | _LIBCPP_INLINE_VISIBILITY | |
| 1547 | static size_type max_size(const allocator_type& __a) _NOEXCEPT | |
| 1548 | {return __max_size(__has_max_size<const allocator_type>(), __a);} | |
| 1549 | ||
| 1550 | _LIBCPP_INLINE_VISIBILITY | |
| 1551 | static allocator_type | |
| 1552 | select_on_container_copy_construction(const allocator_type& __a) | |
| 1553 | {return __select_on_container_copy_construction( | |
| 1554 | __has_select_on_container_copy_construction<const allocator_type>(), | |
| 1555 | __a);} | |
| 1556 | ||
| 1557 | template <class _Ptr> | |
| 1558 | _LIBCPP_INLINE_VISIBILITY | |
| 1559 | static | |
| 1560 | void | |
| 1561 | __construct_forward_with_exception_guarantees(allocator_type& __a, _Ptr __begin1, _Ptr __end1, _Ptr& __begin2) | |
| 1562 | { | |
| 1563 | static_assert(__is_cpp17_move_insertable<allocator_type>::value, | |
| 1564 | "The specified type does not meet the requirements of Cpp17MoveInsertible"); | |
| 1565 | for (; __begin1 != __end1; ++__begin1, (void) ++__begin2) | |
| 1566 | construct(__a, _VSTD::__to_address(__begin2), | |
| 1567 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 1568 | _VSTD::move(*__begin1) | |
| 1569 | #else | |
| 1570 | _VSTD::move_if_noexcept(*__begin1) | |
| 1571 | #endif | |
| 1572 | ); | |
| 1573 | } | |
| 1574 | ||
| 1575 | template <class _Tp> | |
| 1576 | _LIBCPP_INLINE_VISIBILITY | |
| 1577 | static | |
| 1578 | typename enable_if | |
| 1579 | < | |
| 1580 | (__is_default_allocator<allocator_type>::value | |
| 1581 | || !__has_construct<allocator_type, _Tp*, _Tp>::value) && | |
| 1582 | is_trivially_move_constructible<_Tp>::value, | |
| 1583 | void | |
| 1584 | >::type | |
| 1585 | __construct_forward_with_exception_guarantees(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) | |
| 1586 | { | |
| 1587 | ptrdiff_t _Np = __end1 - __begin1; | |
| 1588 | if (_Np > 0) | |
| 1589 | { | |
| 1590 | _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp)); | |
| 1591 | __begin2 += _Np; | |
| 1592 | } | |
| 1593 | } | |
| 1594 | ||
| 1595 | template <class _Iter, class _Ptr> | |
| 1596 | _LIBCPP_INLINE_VISIBILITY | |
| 1597 | static | |
| 1598 | void | |
| 1599 | __construct_range_forward(allocator_type& __a, _Iter __begin1, _Iter __end1, _Ptr& __begin2) | |
| 1600 | { | |
| 1601 | for (; __begin1 != __end1; ++__begin1, (void) ++__begin2) | |
| 1602 | construct(__a, _VSTD::__to_address(__begin2), *__begin1); | |
| 1603 | } | |
| 819 | typedef size_t size_type; | |
| 820 | typedef ptrdiff_t difference_type; | |
| 821 | typedef _Tp value_type; | |
| 822 | typedef true_type propagate_on_container_move_assignment; | |
| 823 | typedef true_type is_always_equal; | |
| 1604 | 824 | |
| 1605 | template <class _SourceTp, class _DestTp, | |
| 1606 | class _RawSourceTp = typename remove_const<_SourceTp>::type, | |
| 1607 | class _RawDestTp = typename remove_const<_DestTp>::type> | |
| 1608 | _LIBCPP_INLINE_VISIBILITY | |
| 1609 | static | |
| 1610 | typename enable_if | |
| 1611 | < | |
| 1612 | is_trivially_copy_constructible<_DestTp>::value && | |
| 1613 | is_same<_RawSourceTp, _RawDestTp>::value && | |
| 1614 | (__is_default_allocator<allocator_type>::value || | |
| 1615 | !__has_construct<allocator_type, _DestTp*, _SourceTp&>::value), | |
| 1616 | void | |
| 1617 | >::type | |
| 1618 | __construct_range_forward(allocator_type&, _SourceTp* __begin1, _SourceTp* __end1, _DestTp*& __begin2) | |
| 1619 | { | |
| 1620 | ptrdiff_t _Np = __end1 - __begin1; | |
| 1621 | if (_Np > 0) | |
| 1622 | { | |
| 1623 | _VSTD::memcpy(const_cast<_RawDestTp*>(__begin2), __begin1, _Np * sizeof(_DestTp)); | |
| 1624 | __begin2 += _Np; | |
| 1625 | } | |
| 1626 | } | |
| 825 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 826 | allocator() _NOEXCEPT { } | |
| 1627 | 827 | |
| 1628 | template <class _Ptr> | |
| 1629 | _LIBCPP_INLINE_VISIBILITY | |
| 1630 | static | |
| 1631 | void | |
| 1632 | __construct_backward_with_exception_guarantees(allocator_type& __a, _Ptr __begin1, _Ptr __end1, _Ptr& __end2) | |
| 1633 | { | |
| 1634 | static_assert(__is_cpp17_move_insertable<allocator_type>::value, | |
| 1635 | "The specified type does not meet the requirements of Cpp17MoveInsertable"); | |
| 1636 | while (__end1 != __begin1) | |
| 1637 | { | |
| 1638 | construct(__a, _VSTD::__to_address(__end2 - 1), | |
| 1639 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 1640 | _VSTD::move(*--__end1) | |
| 1641 | #else | |
| 1642 | _VSTD::move_if_noexcept(*--__end1) | |
| 1643 | #endif | |
| 1644 | ); | |
| 1645 | --__end2; | |
| 1646 | } | |
| 1647 | } | |
| 828 | template <class _Up> | |
| 829 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 830 | allocator(const allocator<_Up>&) _NOEXCEPT { } | |
| 1648 | 831 | |
| 1649 | template <class _Tp> | |
| 1650 | _LIBCPP_INLINE_VISIBILITY | |
| 1651 | static | |
| 1652 | typename enable_if | |
| 1653 | < | |
| 1654 | (__is_default_allocator<allocator_type>::value | |
| 1655 | || !__has_construct<allocator_type, _Tp*, _Tp>::value) && | |
| 1656 | is_trivially_move_constructible<_Tp>::value, | |
| 1657 | void | |
| 1658 | >::type | |
| 1659 | __construct_backward_with_exception_guarantees(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __end2) | |
| 1660 | { | |
| 1661 | ptrdiff_t _Np = __end1 - __begin1; | |
| 1662 | __end2 -= _Np; | |
| 1663 | if (_Np > 0) | |
| 1664 | _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp)); | |
| 832 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 833 | _Tp* allocate(size_t __n) { | |
| 834 | if (__n > allocator_traits<allocator>::max_size(*this)) | |
| 835 | __throw_length_error("allocator<T>::allocate(size_t n)" | |
| 836 | " 'n' exceeds maximum supported size"); | |
| 837 | if (__libcpp_is_constant_evaluated()) { | |
| 838 | return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); | |
| 839 | } else { | |
| 840 | return static_cast<_Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); | |
| 1665 | 841 | } |
| 842 | } | |
| 1666 | 843 | |
| 1667 | private: | |
| 1668 | ||
| 1669 | _LIBCPP_INLINE_VISIBILITY | |
| 1670 | static pointer __allocate(allocator_type& __a, size_type __n, | |
| 1671 | const_void_pointer __hint, true_type) | |
| 1672 | { | |
| 1673 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1674 | return __a.allocate(__n, __hint); | |
| 1675 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 844 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 845 | void deallocate(_Tp* __p, size_t __n) _NOEXCEPT { | |
| 846 | if (__libcpp_is_constant_evaluated()) { | |
| 847 | ::operator delete(__p); | |
| 848 | } else { | |
| 849 | _VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); | |
| 1676 | 850 | } |
| 1677 | _LIBCPP_INLINE_VISIBILITY | |
| 1678 | static pointer __allocate(allocator_type& __a, size_type __n, | |
| 1679 | const_void_pointer, false_type) | |
| 1680 | {return __a.allocate(__n);} | |
| 851 | } | |
| 1681 | 852 | |
| 1682 | template <class _Tp, class... _Args> | |
| 1683 | _LIBCPP_INLINE_VISIBILITY | |
| 1684 | static void __construct(true_type, allocator_type& __a, _Tp* __p, _Args&&... __args) | |
| 1685 | { | |
| 1686 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1687 | __a.construct(__p, _VSTD::forward<_Args>(__args)...); | |
| 1688 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1689 | } | |
| 853 | // C++20 Removed members | |
| 854 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 855 | _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp* pointer; | |
| 856 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer; | |
| 857 | _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp& reference; | |
| 858 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference; | |
| 1690 | 859 | |
| 1691 | template <class _Tp, class... _Args> | |
| 1692 | _LIBCPP_INLINE_VISIBILITY | |
| 1693 | static void __construct(false_type, allocator_type&, _Tp* __p, _Args&&... __args) | |
| 1694 | { | |
| 1695 | ::new ((void*)__p) _Tp(_VSTD::forward<_Args>(__args)...); | |
| 1696 | } | |
| 860 | template <class _Up> | |
| 861 | struct _LIBCPP_DEPRECATED_IN_CXX17 rebind { | |
| 862 | typedef allocator<_Up> other; | |
| 863 | }; | |
| 1697 | 864 | |
| 1698 | template <class _Tp> | |
| 1699 | _LIBCPP_INLINE_VISIBILITY | |
| 1700 | static void __destroy(true_type, allocator_type& __a, _Tp* __p) | |
| 1701 | { | |
| 1702 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1703 | __a.destroy(__p); | |
| 1704 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1705 | } | |
| 1706 | template <class _Tp> | |
| 1707 | _LIBCPP_INLINE_VISIBILITY | |
| 1708 | static void __destroy(false_type, allocator_type&, _Tp* __p) | |
| 1709 | { | |
| 1710 | __p->~_Tp(); | |
| 1711 | } | |
| 865 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 866 | pointer address(reference __x) const _NOEXCEPT { | |
| 867 | return _VSTD::addressof(__x); | |
| 868 | } | |
| 869 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 870 | const_pointer address(const_reference __x) const _NOEXCEPT { | |
| 871 | return _VSTD::addressof(__x); | |
| 872 | } | |
| 1712 | 873 | |
| 1713 | _LIBCPP_INLINE_VISIBILITY | |
| 1714 | static size_type __max_size(true_type, const allocator_type& __a) _NOEXCEPT | |
| 1715 | { | |
| 1716 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 1717 | return __a.max_size(); | |
| 1718 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 1719 | } | |
| 874 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17 | |
| 875 | _Tp* allocate(size_t __n, const void*) { | |
| 876 | return allocate(__n); | |
| 877 | } | |
| 1720 | 878 | |
| 1721 | _LIBCPP_INLINE_VISIBILITY | |
| 1722 | static size_type __max_size(false_type, const allocator_type&) _NOEXCEPT | |
| 1723 | {return numeric_limits<size_type>::max() / sizeof(value_type);} | |
| 879 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { | |
| 880 | return size_type(~0) / sizeof(_Tp); | |
| 881 | } | |
| 1724 | 882 | |
| 1725 | _LIBCPP_INLINE_VISIBILITY | |
| 1726 | static allocator_type | |
| 1727 | __select_on_container_copy_construction(true_type, const allocator_type& __a) | |
| 1728 | {return __a.select_on_container_copy_construction();} | |
| 1729 | _LIBCPP_INLINE_VISIBILITY | |
| 1730 | static allocator_type | |
| 1731 | __select_on_container_copy_construction(false_type, const allocator_type& __a) | |
| 1732 | {return __a;} | |
| 1733 | }; | |
| 883 | template <class _Up, class... _Args> | |
| 884 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 885 | void construct(_Up* __p, _Args&&... __args) { | |
| 886 | ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); | |
| 887 | } | |
| 1734 | 888 | |
| 1735 | template <class _Traits, class _Tp> | |
| 1736 | struct __rebind_alloc_helper | |
| 1737 | { | |
| 1738 | #ifndef _LIBCPP_CXX03_LANG | |
| 1739 | typedef _LIBCPP_NODEBUG_TYPE typename _Traits::template rebind_alloc<_Tp> type; | |
| 1740 | #else | |
| 1741 | typedef typename _Traits::template rebind_alloc<_Tp>::other type; | |
| 889 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 890 | void destroy(pointer __p) { | |
| 891 | __p->~_Tp(); | |
| 892 | } | |
| 1742 | 893 | #endif |
| 1743 | 894 | }; |
| 1744 | 895 | |
| 1745 | // allocator | |
| 1746 | ||
| 1747 | 896 | template <class _Tp> |
| 1748 | class _LIBCPP_TEMPLATE_VIS allocator | |
| 897 | class _LIBCPP_TEMPLATE_VIS allocator<const _Tp> | |
| 1749 | 898 | { |
| 1750 | 899 | public: |
| 1751 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1752 | _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t size_type; | |
| 1753 | _LIBCPP_DEPRECATED_IN_CXX17 typedef ptrdiff_t difference_type; | |
| 1754 | _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp* pointer; | |
| 1755 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer; | |
| 1756 | _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp& reference; | |
| 1757 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference; | |
| 1758 | ||
| 1759 | template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;}; | |
| 1760 | #endif | |
| 1761 | ||
| 1762 | typedef _Tp value_type; | |
| 1763 | ||
| 1764 | typedef true_type propagate_on_container_move_assignment; | |
| 1765 | typedef true_type is_always_equal; | |
| 900 | typedef size_t size_type; | |
| 901 | typedef ptrdiff_t difference_type; | |
| 902 | typedef const _Tp value_type; | |
| 903 | typedef true_type propagate_on_container_move_assignment; | |
| 904 | typedef true_type is_always_equal; | |
| 1766 | 905 | |
| 1767 | 906 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 1768 | allocator() _NOEXCEPT {} | |
| 907 | allocator() _NOEXCEPT { } | |
| 1769 | 908 | |
| 1770 | 909 | template <class _Up> |
| 1771 | 910 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 |
| 1772 | allocator(const allocator<_Up>&) _NOEXCEPT {} | |
| 911 | allocator(const allocator<_Up>&) _NOEXCEPT { } | |
| 1773 | 912 | |
| 1774 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1775 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 1776 | pointer address(reference __x) const _NOEXCEPT | |
| 1777 | {return _VSTD::addressof(__x);} | |
| 1778 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 1779 | const_pointer address(const_reference __x) const _NOEXCEPT | |
| 1780 | {return _VSTD::addressof(__x);} | |
| 1781 | #endif | |
| 1782 | ||
| 1783 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _Tp* allocate(size_t __n) | |
| 1784 | { | |
| 1785 | // TODO(mpark): Replace with `allocator_traits<allocator>::max_size(*this)`. | |
| 1786 | if (__n > (size_t(~0) / sizeof(_Tp))) | |
| 1787 | __throw_length_error("allocator<T>::allocate(size_t n)" | |
| 913 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 914 | const _Tp* allocate(size_t __n) { | |
| 915 | if (__n > allocator_traits<allocator>::max_size(*this)) | |
| 916 | __throw_length_error("allocator<const T>::allocate(size_t n)" | |
| 1788 | 917 | " 'n' exceeds maximum supported size"); |
| 1789 | return static_cast<_Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); | |
| 918 | if (__libcpp_is_constant_evaluated()) { | |
| 919 | return static_cast<const _Tp*>(::operator new(__n * sizeof(_Tp))); | |
| 920 | } else { | |
| 921 | return static_cast<const _Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); | |
| 1790 | 922 | } |
| 923 | } | |
| 1791 | 924 | |
| 1792 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1793 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17 | |
| 1794 | _Tp* allocate(size_t __n, const void*) { return allocate(__n); } | |
| 1795 | #endif | |
| 1796 | ||
| 1797 | _LIBCPP_INLINE_VISIBILITY void deallocate(_Tp* __p, size_t __n) _NOEXCEPT | |
| 1798 | {_VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));} | |
| 1799 | ||
| 1800 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1801 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT | |
| 1802 | {return size_type(~0) / sizeof(_Tp);} | |
| 1803 | ||
| 1804 | template <class _Up, class... _Args> | |
| 1805 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 1806 | void | |
| 1807 | construct(_Up* __p, _Args&&... __args) | |
| 1808 | { | |
| 1809 | ::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); | |
| 925 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 926 | void deallocate(const _Tp* __p, size_t __n) { | |
| 927 | if (__libcpp_is_constant_evaluated()) { | |
| 928 | ::operator delete(const_cast<_Tp*>(__p)); | |
| 929 | } else { | |
| 930 | _VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); | |
| 1810 | 931 | } |
| 1811 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();} | |
| 1812 | #endif | |
| 1813 | }; | |
| 932 | } | |
| 1814 | 933 | |
| 1815 | template <class _Tp> | |
| 1816 | class _LIBCPP_TEMPLATE_VIS allocator<const _Tp> | |
| 1817 | { | |
| 1818 | public: | |
| 934 | // C++20 Removed members | |
| 1819 | 935 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) |
| 1820 | _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t size_type; | |
| 1821 | _LIBCPP_DEPRECATED_IN_CXX17 typedef ptrdiff_t difference_type; | |
| 1822 | 936 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* pointer; |
| 1823 | 937 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer; |
| 1824 | 938 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& reference; |
| 1825 | 939 | _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference; |
| 1826 | 940 | |
| 1827 | template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;}; | |
| 1828 | #endif | |
| 1829 | ||
| 1830 | typedef const _Tp value_type; | |
| 1831 | ||
| 1832 | typedef true_type propagate_on_container_move_assignment; | |
| 1833 | typedef true_type is_always_equal; | |
| 1834 | ||
| 1835 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1836 | allocator() _NOEXCEPT {} | |
| 1837 | ||
| 1838 | 941 | template <class _Up> |
| 1839 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1840 | allocator(const allocator<_Up>&) _NOEXCEPT {} | |
| 942 | struct _LIBCPP_DEPRECATED_IN_CXX17 rebind { | |
| 943 | typedef allocator<_Up> other; | |
| 944 | }; | |
| 1841 | 945 | |
| 1842 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1843 | 946 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY |
| 1844 | const_pointer address(const_reference __x) const _NOEXCEPT | |
| 1845 | {return _VSTD::addressof(__x);} | |
| 1846 | #endif | |
| 1847 | ||
| 1848 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const _Tp* allocate(size_t __n) | |
| 1849 | { | |
| 1850 | // TODO(mpark): Replace with `allocator_traits<allocator>::max_size(*this)`. | |
| 1851 | if (__n > (size_t(~0) / sizeof(_Tp))) | |
| 1852 | __throw_length_error("allocator<const T>::allocate(size_t n)" | |
| 1853 | " 'n' exceeds maximum supported size"); | |
| 1854 | return static_cast<const _Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); | |
| 947 | const_pointer address(const_reference __x) const _NOEXCEPT { | |
| 948 | return _VSTD::addressof(__x); | |
| 1855 | 949 | } |
| 1856 | 950 | |
| 1857 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1858 | 951 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17 |
| 1859 | const _Tp* allocate(size_t __n, const void*) { return allocate(__n); } | |
| 1860 | #endif | |
| 1861 | ||
| 1862 | _LIBCPP_INLINE_VISIBILITY void deallocate(const _Tp* __p, size_t __n) | |
| 1863 | {_VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));} | |
| 952 | const _Tp* allocate(size_t __n, const void*) { | |
| 953 | return allocate(__n); | |
| 954 | } | |
| 1864 | 955 | |
| 1865 | #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) | |
| 1866 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT | |
| 1867 | {return size_type(~0) / sizeof(_Tp);} | |
| 956 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { | |
| 957 | return size_type(~0) / sizeof(_Tp); | |
| 958 | } | |
| 1868 | 959 | |
| 1869 | #if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) | |
| 1870 | 960 | template <class _Up, class... _Args> |
| 1871 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 1872 | void | |
| 1873 | construct(_Up* __p, _Args&&... __args) | |
| 1874 | { | |
| 1875 | ::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); | |
| 1876 | } | |
| 1877 | #else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) | |
| 1878 | _LIBCPP_INLINE_VISIBILITY | |
| 1879 | void | |
| 1880 | construct(pointer __p) | |
| 1881 | { | |
| 1882 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(); | |
| 1883 | } | |
| 1884 | # if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) | |
| 961 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 962 | void construct(_Up* __p, _Args&&... __args) { | |
| 963 | ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); | |
| 964 | } | |
| 1885 | 965 | |
| 1886 | template <class _A0> | |
| 1887 | _LIBCPP_INLINE_VISIBILITY | |
| 1888 | void | |
| 1889 | construct(pointer __p, _A0& __a0) | |
| 1890 | { | |
| 1891 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0); | |
| 1892 | } | |
| 1893 | template <class _A0> | |
| 1894 | _LIBCPP_INLINE_VISIBILITY | |
| 1895 | void | |
| 1896 | construct(pointer __p, const _A0& __a0) | |
| 1897 | { | |
| 1898 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0); | |
| 1899 | } | |
| 1900 | # endif // defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) | |
| 1901 | template <class _A0, class _A1> | |
| 1902 | _LIBCPP_INLINE_VISIBILITY | |
| 1903 | void | |
| 1904 | construct(pointer __p, _A0& __a0, _A1& __a1) | |
| 1905 | { | |
| 1906 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1); | |
| 1907 | } | |
| 1908 | template <class _A0, class _A1> | |
| 1909 | _LIBCPP_INLINE_VISIBILITY | |
| 1910 | void | |
| 1911 | construct(pointer __p, const _A0& __a0, _A1& __a1) | |
| 1912 | { | |
| 1913 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1); | |
| 1914 | } | |
| 1915 | template <class _A0, class _A1> | |
| 1916 | _LIBCPP_INLINE_VISIBILITY | |
| 1917 | void | |
| 1918 | construct(pointer __p, _A0& __a0, const _A1& __a1) | |
| 1919 | { | |
| 1920 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1); | |
| 1921 | } | |
| 1922 | template <class _A0, class _A1> | |
| 1923 | _LIBCPP_INLINE_VISIBILITY | |
| 1924 | void | |
| 1925 | construct(pointer __p, const _A0& __a0, const _A1& __a1) | |
| 1926 | { | |
| 1927 | ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1); | |
| 1928 | } | |
| 1929 | #endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) | |
| 1930 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();} | |
| 966 | _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY | |
| 967 | void destroy(pointer __p) { | |
| 968 | __p->~_Tp(); | |
| 969 | } | |
| 1931 | 970 | #endif |
| 1932 | 971 | }; |
| 1933 | 972 | |
| 1934 | 973 | template <class _Tp, class _Up> |
| 1935 | inline _LIBCPP_INLINE_VISIBILITY | |
| 974 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1936 | 975 | bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return true;} |
| 1937 | 976 | |
| 1938 | 977 | template <class _Tp, class _Up> |
| 1939 | inline _LIBCPP_INLINE_VISIBILITY | |
| 978 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1940 | 979 | bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;} |
| 1941 | 980 | |
| 981 | template <class _Alloc, class _Ptr> | |
| 982 | _LIBCPP_INLINE_VISIBILITY | |
| 983 | void __construct_forward_with_exception_guarantees(_Alloc& __a, _Ptr __begin1, _Ptr __end1, _Ptr& __begin2) { | |
| 984 | static_assert(__is_cpp17_move_insertable<_Alloc>::value, | |
| 985 | "The specified type does not meet the requirements of Cpp17MoveInsertable"); | |
| 986 | typedef allocator_traits<_Alloc> _Traits; | |
| 987 | for (; __begin1 != __end1; ++__begin1, (void)++__begin2) { | |
| 988 | _Traits::construct(__a, _VSTD::__to_address(__begin2), | |
| 989 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 990 | _VSTD::move(*__begin1) | |
| 991 | #else | |
| 992 | _VSTD::move_if_noexcept(*__begin1) | |
| 993 | #endif | |
| 994 | ); | |
| 995 | } | |
| 996 | } | |
| 997 | ||
| 998 | template <class _Alloc, class _Tp, typename enable_if< | |
| 999 | (__is_default_allocator<_Alloc>::value || !__has_construct<_Alloc, _Tp*, _Tp>::value) && | |
| 1000 | is_trivially_move_constructible<_Tp>::value | |
| 1001 | >::type> | |
| 1002 | _LIBCPP_INLINE_VISIBILITY | |
| 1003 | void __construct_forward_with_exception_guarantees(_Alloc&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) { | |
| 1004 | ptrdiff_t _Np = __end1 - __begin1; | |
| 1005 | if (_Np > 0) { | |
| 1006 | _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp)); | |
| 1007 | __begin2 += _Np; | |
| 1008 | } | |
| 1009 | } | |
| 1010 | ||
| 1011 | template <class _Alloc, class _Iter, class _Ptr> | |
| 1012 | _LIBCPP_INLINE_VISIBILITY | |
| 1013 | void __construct_range_forward(_Alloc& __a, _Iter __begin1, _Iter __end1, _Ptr& __begin2) { | |
| 1014 | typedef allocator_traits<_Alloc> _Traits; | |
| 1015 | for (; __begin1 != __end1; ++__begin1, (void) ++__begin2) { | |
| 1016 | _Traits::construct(__a, _VSTD::__to_address(__begin2), *__begin1); | |
| 1017 | } | |
| 1018 | } | |
| 1019 | ||
| 1020 | template <class _Alloc, class _Source, class _Dest, | |
| 1021 | class _RawSource = typename remove_const<_Source>::type, | |
| 1022 | class _RawDest = typename remove_const<_Dest>::type, | |
| 1023 | class = | |
| 1024 | typename enable_if< | |
| 1025 | is_trivially_copy_constructible<_Dest>::value && | |
| 1026 | is_same<_RawSource, _RawDest>::value && | |
| 1027 | (__is_default_allocator<_Alloc>::value || !__has_construct<_Alloc, _Dest*, _Source&>::value) | |
| 1028 | >::type> | |
| 1029 | _LIBCPP_INLINE_VISIBILITY | |
| 1030 | void __construct_range_forward(_Alloc&, _Source* __begin1, _Source* __end1, _Dest*& __begin2) { | |
| 1031 | ptrdiff_t _Np = __end1 - __begin1; | |
| 1032 | if (_Np > 0) { | |
| 1033 | _VSTD::memcpy(const_cast<_RawDest*>(__begin2), __begin1, _Np * sizeof(_Dest)); | |
| 1034 | __begin2 += _Np; | |
| 1035 | } | |
| 1036 | } | |
| 1037 | ||
| 1038 | template <class _Alloc, class _Ptr> | |
| 1039 | _LIBCPP_INLINE_VISIBILITY | |
| 1040 | void __construct_backward_with_exception_guarantees(_Alloc& __a, _Ptr __begin1, _Ptr __end1, _Ptr& __end2) { | |
| 1041 | static_assert(__is_cpp17_move_insertable<_Alloc>::value, | |
| 1042 | "The specified type does not meet the requirements of Cpp17MoveInsertable"); | |
| 1043 | typedef allocator_traits<_Alloc> _Traits; | |
| 1044 | while (__end1 != __begin1) { | |
| 1045 | _Traits::construct(__a, _VSTD::__to_address(__end2 - 1), | |
| 1046 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 1047 | _VSTD::move(*--__end1) | |
| 1048 | #else | |
| 1049 | _VSTD::move_if_noexcept(*--__end1) | |
| 1050 | #endif | |
| 1051 | ); | |
| 1052 | --__end2; | |
| 1053 | } | |
| 1054 | } | |
| 1055 | ||
| 1056 | template <class _Alloc, class _Tp, class = typename enable_if< | |
| 1057 | (__is_default_allocator<_Alloc>::value || !__has_construct<_Alloc, _Tp*, _Tp>::value) && | |
| 1058 | is_trivially_move_constructible<_Tp>::value | |
| 1059 | >::type> | |
| 1060 | _LIBCPP_INLINE_VISIBILITY | |
| 1061 | void __construct_backward_with_exception_guarantees(_Alloc&, _Tp* __begin1, _Tp* __end1, _Tp*& __end2) { | |
| 1062 | ptrdiff_t _Np = __end1 - __begin1; | |
| 1063 | __end2 -= _Np; | |
| 1064 | if (_Np > 0) | |
| 1065 | _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp)); | |
| 1066 | } | |
| 1067 | ||
| 1942 | 1068 | template <class _OutputIterator, class _Tp> |
| 1943 | 1069 | class _LIBCPP_TEMPLATE_VIS raw_storage_iterator |
| 1944 | 1070 | : public iterator<output_iterator_tag, |
| ... | ... | @@ -1953,10 +1079,10 @@ public: |
| 1953 | 1079 | _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {} |
| 1954 | 1080 | _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;} |
| 1955 | 1081 | _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element) |
| 1956 | {::new(_VSTD::addressof(*__x_)) _Tp(__element); return *this;} | |
| 1082 | {::new ((void*)_VSTD::addressof(*__x_)) _Tp(__element); return *this;} | |
| 1957 | 1083 | #if _LIBCPP_STD_VER >= 14 |
| 1958 | 1084 | _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element) |
| 1959 | {::new(_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;} | |
| 1085 | {::new ((void*)_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;} | |
| 1960 | 1086 | #endif |
| 1961 | 1087 | _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;} |
| 1962 | 1088 | _LIBCPP_INLINE_VISIBILITY raw_storage_iterator operator++(int) |
| ... | ... | @@ -1982,8 +1108,8 @@ get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT |
| 1982 | 1108 | #if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) |
| 1983 | 1109 | if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp))) |
| 1984 | 1110 | { |
| 1985 | std::align_val_t __al = | |
| 1986 | std::align_val_t(std::alignment_of<_Tp>::value); | |
| 1111 | align_val_t __al = | |
| 1112 | align_val_t(alignment_of<_Tp>::value); | |
| 1987 | 1113 | __r.first = static_cast<_Tp*>(::operator new( |
| 1988 | 1114 | __n * sizeof(_Tp), __al, nothrow)); |
| 1989 | 1115 | } else { |
| ... | ... | @@ -2052,7 +1178,7 @@ public: |
| 2052 | 1178 | _LIBCPP_INLINE_VISIBILITY _Tp* release() _NOEXCEPT |
| 2053 | 1179 | { |
| 2054 | 1180 | _Tp* __t = __ptr_; |
| 2055 | __ptr_ = 0; | |
| 1181 | __ptr_ = nullptr; | |
| 2056 | 1182 | return __t; |
| 2057 | 1183 | } |
| 2058 | 1184 | _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT |
| ... | ... | @@ -2160,19 +1286,19 @@ struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp { |
| 2160 | 1286 | template <class _T1, class _T2> |
| 2161 | 1287 | class __compressed_pair : private __compressed_pair_elem<_T1, 0>, |
| 2162 | 1288 | private __compressed_pair_elem<_T2, 1> { |
| 2163 | typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem<_T1, 0> _Base1; | |
| 2164 | typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem<_T2, 1> _Base2; | |
| 2165 | ||
| 1289 | public: | |
| 2166 | 1290 | // NOTE: This static assert should never fire because __compressed_pair |
| 2167 | 1291 | // is *almost never* used in a scenario where it's possible for T1 == T2. |
| 2168 | 1292 | // (The exception is std::function where it is possible that the function |
| 2169 | 1293 | // object and the allocator have the same type). |
| 2170 | 1294 | static_assert((!is_same<_T1, _T2>::value), |
| 2171 | "__compressed_pair cannot be instantated when T1 and T2 are the same type; " | |
| 1295 | "__compressed_pair cannot be instantiated when T1 and T2 are the same type; " | |
| 2172 | 1296 | "The current implementation is NOT ABI-compatible with the previous " |
| 2173 | 1297 | "implementation for this configuration"); |
| 2174 | 1298 | |
| 2175 | public: | |
| 1299 | typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem<_T1, 0> _Base1; | |
| 1300 | typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem<_T2, 1> _Base2; | |
| 1301 | ||
| 2176 | 1302 | template <bool _Dummy = true, |
| 2177 | 1303 | class = typename enable_if< |
| 2178 | 1304 | __dependent_type<is_default_constructible<_T1>, _Dummy>::value && |
| ... | ... | @@ -2185,7 +1311,7 @@ public: |
| 2185 | 1311 | template <class _U1, class _U2> |
| 2186 | 1312 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR |
| 2187 | 1313 | __compressed_pair(_U1&& __t1, _U2&& __t2) |
| 2188 | : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {} | |
| 1314 | : _Base1(_VSTD::forward<_U1>(__t1)), _Base2(_VSTD::forward<_U2>(__t2)) {} | |
| 2189 | 1315 | |
| 2190 | 1316 | #ifndef _LIBCPP_CXX03_LANG |
| 2191 | 1317 | template <class... _Args1, class... _Args2> |
| ... | ... | @@ -2218,12 +1344,21 @@ public: |
| 2218 | 1344 | return static_cast<_Base2 const&>(*this).__get(); |
| 2219 | 1345 | } |
| 2220 | 1346 | |
| 1347 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1348 | static _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT { | |
| 1349 | return static_cast<_Base1*>(__pair); | |
| 1350 | } | |
| 1351 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1352 | static _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT { | |
| 1353 | return static_cast<_Base2*>(__pair); | |
| 1354 | } | |
| 1355 | ||
| 2221 | 1356 | _LIBCPP_INLINE_VISIBILITY |
| 2222 | 1357 | void swap(__compressed_pair& __x) |
| 2223 | 1358 | _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && |
| 2224 | 1359 | __is_nothrow_swappable<_T2>::value) |
| 2225 | 1360 | { |
| 2226 | using std::swap; | |
| 1361 | using _VSTD::swap; | |
| 2227 | 1362 | swap(first(), __x.first()); |
| 2228 | 1363 | swap(second(), __x.second()); |
| 2229 | 1364 | } |
| ... | ... | @@ -2316,12 +1451,18 @@ struct __unique_ptr_deleter_sfinae<_Deleter&> { |
| 2316 | 1451 | typedef false_type __enable_rval_overload; |
| 2317 | 1452 | }; |
| 2318 | 1453 | |
| 1454 | #if defined(_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI) | |
| 1455 | # define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI __attribute__((trivial_abi)) | |
| 1456 | #else | |
| 1457 | # define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI | |
| 1458 | #endif | |
| 1459 | ||
| 2319 | 1460 | template <class _Tp, class _Dp = default_delete<_Tp> > |
| 2320 | class _LIBCPP_TEMPLATE_VIS unique_ptr { | |
| 1461 | class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr { | |
| 2321 | 1462 | public: |
| 2322 | 1463 | typedef _Tp element_type; |
| 2323 | 1464 | typedef _Dp deleter_type; |
| 2324 | typedef _LIBCPP_NODEBUG_TYPE typename __pointer_type<_Tp, deleter_type>::type pointer; | |
| 1465 | typedef _LIBCPP_NODEBUG_TYPE typename __pointer<_Tp, deleter_type>::type pointer; | |
| 2325 | 1466 | |
| 2326 | 1467 | static_assert(!is_rvalue_reference<deleter_type>::value, |
| 2327 | 1468 | "the specified deleter type cannot be an rvalue reference"); |
| ... | ... | @@ -2525,11 +1666,11 @@ public: |
| 2525 | 1666 | |
| 2526 | 1667 | |
| 2527 | 1668 | template <class _Tp, class _Dp> |
| 2528 | class _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> { | |
| 1669 | class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> { | |
| 2529 | 1670 | public: |
| 2530 | 1671 | typedef _Tp element_type; |
| 2531 | 1672 | typedef _Dp deleter_type; |
| 2532 | typedef typename __pointer_type<_Tp, deleter_type>::type pointer; | |
| 1673 | typedef typename __pointer<_Tp, deleter_type>::type pointer; | |
| 2533 | 1674 | |
| 2534 | 1675 | private: |
| 2535 | 1676 | __compressed_pair<pointer, deleter_type> __ptr_; |
| ... | ... | @@ -2987,7 +2128,7 @@ public: |
| 2987 | 2128 | : __size_(__s) {} |
| 2988 | 2129 | |
| 2989 | 2130 | template <class _Tp> |
| 2990 | _LIBCPP_INLINE_VISIBILITY void __incr(_Tp*) _NOEXCEPT | |
| 2131 | _LIBCPP_INLINE_VISIBILITY void __incr() _NOEXCEPT | |
| 2991 | 2132 | {__incr(integral_constant<bool, is_trivially_destructible<_Tp>::value>());} |
| 2992 | 2133 | |
| 2993 | 2134 | template <class _Tp> |
| ... | ... | @@ -3029,7 +2170,7 @@ uninitialized_copy(_InputIterator __f, _InputIterator __l, _ForwardIterator __r) |
| 3029 | 2170 | { |
| 3030 | 2171 | #endif |
| 3031 | 2172 | for (; __f != __l; ++__f, (void) ++__r) |
| 3032 | ::new (static_cast<void*>(_VSTD::addressof(*__r))) value_type(*__f); | |
| 2173 | ::new ((void*)_VSTD::addressof(*__r)) value_type(*__f); | |
| 3033 | 2174 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3034 | 2175 | } |
| 3035 | 2176 | catch (...) |
| ... | ... | @@ -3053,7 +2194,7 @@ uninitialized_copy_n(_InputIterator __f, _Size __n, _ForwardIterator __r) |
| 3053 | 2194 | { |
| 3054 | 2195 | #endif |
| 3055 | 2196 | for (; __n > 0; ++__f, (void) ++__r, (void) --__n) |
| 3056 | ::new (static_cast<void*>(_VSTD::addressof(*__r))) value_type(*__f); | |
| 2197 | ::new ((void*)_VSTD::addressof(*__r)) value_type(*__f); | |
| 3057 | 2198 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3058 | 2199 | } |
| 3059 | 2200 | catch (...) |
| ... | ... | @@ -3077,7 +2218,7 @@ uninitialized_fill(_ForwardIterator __f, _ForwardIterator __l, const _Tp& __x) |
| 3077 | 2218 | { |
| 3078 | 2219 | #endif |
| 3079 | 2220 | for (; __f != __l; ++__f) |
| 3080 | ::new (static_cast<void*>(_VSTD::addressof(*__f))) value_type(__x); | |
| 2221 | ::new ((void*)_VSTD::addressof(*__f)) value_type(__x); | |
| 3081 | 2222 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3082 | 2223 | } |
| 3083 | 2224 | catch (...) |
| ... | ... | @@ -3100,7 +2241,7 @@ uninitialized_fill_n(_ForwardIterator __f, _Size __n, const _Tp& __x) |
| 3100 | 2241 | { |
| 3101 | 2242 | #endif |
| 3102 | 2243 | for (; __n > 0; ++__f, (void) --__n) |
| 3103 | ::new (static_cast<void*>(_VSTD::addressof(*__f))) value_type(__x); | |
| 2244 | ::new ((void*)_VSTD::addressof(*__f)) value_type(__x); | |
| 3104 | 2245 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3105 | 2246 | } |
| 3106 | 2247 | catch (...) |
| ... | ... | @@ -3115,22 +2256,15 @@ uninitialized_fill_n(_ForwardIterator __f, _Size __n, const _Tp& __x) |
| 3115 | 2256 | |
| 3116 | 2257 | #if _LIBCPP_STD_VER > 14 |
| 3117 | 2258 | |
| 3118 | template <class _Tp> | |
| 3119 | inline _LIBCPP_INLINE_VISIBILITY | |
| 3120 | void destroy_at(_Tp* __loc) { | |
| 3121 | _LIBCPP_ASSERT(__loc, "null pointer given to destroy_at"); | |
| 3122 | __loc->~_Tp(); | |
| 3123 | } | |
| 3124 | ||
| 3125 | 2259 | template <class _ForwardIterator> |
| 3126 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2260 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3127 | 2261 | void destroy(_ForwardIterator __first, _ForwardIterator __last) { |
| 3128 | 2262 | for (; __first != __last; ++__first) |
| 3129 | 2263 | _VSTD::destroy_at(_VSTD::addressof(*__first)); |
| 3130 | 2264 | } |
| 3131 | 2265 | |
| 3132 | 2266 | template <class _ForwardIterator, class _Size> |
| 3133 | inline _LIBCPP_INLINE_VISIBILITY | |
| 2267 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 3134 | 2268 | _ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) { |
| 3135 | 2269 | for (; __n > 0; (void)++__first, --__n) |
| 3136 | 2270 | _VSTD::destroy_at(_VSTD::addressof(*__first)); |
| ... | ... | @@ -3146,7 +2280,7 @@ void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator |
| 3146 | 2280 | try { |
| 3147 | 2281 | #endif |
| 3148 | 2282 | for (; __idx != __last; ++__idx) |
| 3149 | ::new((void*)_VSTD::addressof(*__idx)) _Vt; | |
| 2283 | ::new ((void*)_VSTD::addressof(*__idx)) _Vt; | |
| 3150 | 2284 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3151 | 2285 | } catch (...) { |
| 3152 | 2286 | _VSTD::destroy(__first, __idx); |
| ... | ... | @@ -3164,7 +2298,7 @@ _ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Si |
| 3164 | 2298 | try { |
| 3165 | 2299 | #endif |
| 3166 | 2300 | for (; __n > 0; (void)++__idx, --__n) |
| 3167 | ::new((void*)_VSTD::addressof(*__idx)) _Vt; | |
| 2301 | ::new ((void*)_VSTD::addressof(*__idx)) _Vt; | |
| 3168 | 2302 | return __idx; |
| 3169 | 2303 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3170 | 2304 | } catch (...) { |
| ... | ... | @@ -3184,7 +2318,7 @@ void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __ |
| 3184 | 2318 | try { |
| 3185 | 2319 | #endif |
| 3186 | 2320 | for (; __idx != __last; ++__idx) |
| 3187 | ::new((void*)_VSTD::addressof(*__idx)) _Vt(); | |
| 2321 | ::new ((void*)_VSTD::addressof(*__idx)) _Vt(); | |
| 3188 | 2322 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3189 | 2323 | } catch (...) { |
| 3190 | 2324 | _VSTD::destroy(__first, __idx); |
| ... | ... | @@ -3202,7 +2336,7 @@ _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size |
| 3202 | 2336 | try { |
| 3203 | 2337 | #endif |
| 3204 | 2338 | for (; __n > 0; (void)++__idx, --__n) |
| 3205 | ::new((void*)_VSTD::addressof(*__idx)) _Vt(); | |
| 2339 | ::new ((void*)_VSTD::addressof(*__idx)) _Vt(); | |
| 3206 | 2340 | return __idx; |
| 3207 | 2341 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3208 | 2342 | } catch (...) { |
| ... | ... | @@ -3222,7 +2356,7 @@ _ForwardIt uninitialized_move(_InputIt __first, _InputIt __last, _ForwardIt __fi |
| 3222 | 2356 | try { |
| 3223 | 2357 | #endif |
| 3224 | 2358 | for (; __first != __last; (void)++__idx, ++__first) |
| 3225 | ::new((void*)_VSTD::addressof(*__idx)) _Vt(std::move(*__first)); | |
| 2359 | ::new ((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first)); | |
| 3226 | 2360 | return __idx; |
| 3227 | 2361 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3228 | 2362 | } catch (...) { |
| ... | ... | @@ -3242,7 +2376,7 @@ uninitialized_move_n(_InputIt __first, _Size __n, _ForwardIt __first_res) { |
| 3242 | 2376 | try { |
| 3243 | 2377 | #endif |
| 3244 | 2378 | for (; __n > 0; ++__idx, (void)++__first, --__n) |
| 3245 | ::new((void*)_VSTD::addressof(*__idx)) _Vt(std::move(*__first)); | |
| 2379 | ::new ((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first)); | |
| 3246 | 2380 | return {__first, __idx}; |
| 3247 | 2381 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3248 | 2382 | } catch (...) { |
| ... | ... | @@ -3389,13 +2523,7 @@ public: |
| 3389 | 2523 | long use_count() const _NOEXCEPT {return __shared_count::use_count();} |
| 3390 | 2524 | __shared_weak_count* lock() _NOEXCEPT; |
| 3391 | 2525 | |
| 3392 | // Define the function out only if we build static libc++ without RTTI. | |
| 3393 | // Otherwise we may break clients who need to compile their projects with | |
| 3394 | // -fno-rtti and yet link against a libc++.dylib compiled | |
| 3395 | // without -fno-rtti. | |
| 3396 | #if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC) | |
| 3397 | 2526 | virtual const void* __get_deleter(const type_info&) const _NOEXCEPT; |
| 3398 | #endif | |
| 3399 | 2527 | private: |
| 3400 | 2528 | virtual void __on_zero_shared_weak() _NOEXCEPT = 0; |
| 3401 | 2529 | }; |
| ... | ... | @@ -3452,69 +2580,86 @@ __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared_weak() _NOEXCEPT |
| 3452 | 2580 | } |
| 3453 | 2581 | |
| 3454 | 2582 | template <class _Tp, class _Alloc> |
| 3455 | class __shared_ptr_emplace | |
| 3456 | : public __shared_weak_count | |
| 2583 | struct __shared_ptr_emplace | |
| 2584 | : __shared_weak_count | |
| 3457 | 2585 | { |
| 3458 | __compressed_pair<_Alloc, _Tp> __data_; | |
| 3459 | public: | |
| 3460 | ||
| 3461 | _LIBCPP_INLINE_VISIBILITY | |
| 3462 | __shared_ptr_emplace(_Alloc __a) | |
| 3463 | : __data_(_VSTD::move(__a), __value_init_tag()) {} | |
| 3464 | ||
| 2586 | template<class ..._Args> | |
| 2587 | _LIBCPP_HIDE_FROM_ABI | |
| 2588 | explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args) | |
| 2589 | : __storage_(_VSTD::move(__a)) | |
| 2590 | { | |
| 2591 | #if _LIBCPP_STD_VER > 17 | |
| 2592 | using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type; | |
| 2593 | _TpAlloc __tmp(*__get_alloc()); | |
| 2594 | allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), _VSTD::forward<_Args>(__args)...); | |
| 2595 | #else | |
| 2596 | ::new ((void*)__get_elem()) _Tp(_VSTD::forward<_Args>(__args)...); | |
| 2597 | #endif | |
| 2598 | } | |
| 3465 | 2599 | |
| 3466 | #ifndef _LIBCPP_HAS_NO_VARIADICS | |
| 3467 | template <class ..._Args> | |
| 3468 | _LIBCPP_INLINE_VISIBILITY | |
| 3469 | __shared_ptr_emplace(_Alloc __a, _Args&& ...__args) | |
| 3470 | : __data_(piecewise_construct, _VSTD::forward_as_tuple(__a), | |
| 3471 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)) {} | |
| 3472 | #else // _LIBCPP_HAS_NO_VARIADICS | |
| 2600 | _LIBCPP_HIDE_FROM_ABI | |
| 2601 | _Alloc* __get_alloc() _NOEXCEPT { return __storage_.__get_alloc(); } | |
| 3473 | 2602 | |
| 3474 | template <class _A0> | |
| 3475 | _LIBCPP_INLINE_VISIBILITY | |
| 3476 | __shared_ptr_emplace(_Alloc __a, _A0& __a0) | |
| 3477 | : __data_(__a, _Tp(__a0)) {} | |
| 2603 | _LIBCPP_HIDE_FROM_ABI | |
| 2604 | _Tp* __get_elem() _NOEXCEPT { return __storage_.__get_elem(); } | |
| 3478 | 2605 | |
| 3479 | template <class _A0, class _A1> | |
| 3480 | _LIBCPP_INLINE_VISIBILITY | |
| 3481 | __shared_ptr_emplace(_Alloc __a, _A0& __a0, _A1& __a1) | |
| 3482 | : __data_(__a, _Tp(__a0, __a1)) {} | |
| 2606 | private: | |
| 2607 | virtual void __on_zero_shared() _NOEXCEPT { | |
| 2608 | #if _LIBCPP_STD_VER > 17 | |
| 2609 | using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type; | |
| 2610 | _TpAlloc __tmp(*__get_alloc()); | |
| 2611 | allocator_traits<_TpAlloc>::destroy(__tmp, __get_elem()); | |
| 2612 | #else | |
| 2613 | __get_elem()->~_Tp(); | |
| 2614 | #endif | |
| 2615 | } | |
| 3483 | 2616 | |
| 3484 | template <class _A0, class _A1, class _A2> | |
| 3485 | _LIBCPP_INLINE_VISIBILITY | |
| 3486 | __shared_ptr_emplace(_Alloc __a, _A0& __a0, _A1& __a1, _A2& __a2) | |
| 3487 | : __data_(__a, _Tp(__a0, __a1, __a2)) {} | |
| 2617 | virtual void __on_zero_shared_weak() _NOEXCEPT { | |
| 2618 | using _ControlBlockAlloc = typename __allocator_traits_rebind<_Alloc, __shared_ptr_emplace>::type; | |
| 2619 | using _ControlBlockPointer = typename allocator_traits<_ControlBlockAlloc>::pointer; | |
| 2620 | _ControlBlockAlloc __tmp(*__get_alloc()); | |
| 2621 | __storage_.~_Storage(); | |
| 2622 | allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, | |
| 2623 | pointer_traits<_ControlBlockPointer>::pointer_to(*this), 1); | |
| 2624 | } | |
| 3488 | 2625 | |
| 3489 | #endif // _LIBCPP_HAS_NO_VARIADICS | |
| 2626 | // This class implements the control block for non-array shared pointers created | |
| 2627 | // through `std::allocate_shared` and `std::make_shared`. | |
| 2628 | // | |
| 2629 | // In previous versions of the library, we used a compressed pair to store | |
| 2630 | // both the _Alloc and the _Tp. This implies using EBO, which is incompatible | |
| 2631 | // with Allocator construction for _Tp. To allow implementing P0674 in C++20, | |
| 2632 | // we now use a properly aligned char buffer while making sure that we maintain | |
| 2633 | // the same layout that we had when we used a compressed pair. | |
| 2634 | using _CompressedPair = __compressed_pair<_Alloc, _Tp>; | |
| 2635 | struct _ALIGNAS_TYPE(_CompressedPair) _Storage { | |
| 2636 | char __blob_[sizeof(_CompressedPair)]; | |
| 2637 | ||
| 2638 | _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) { | |
| 2639 | ::new ((void*)__get_alloc()) _Alloc(_VSTD::move(__a)); | |
| 2640 | } | |
| 2641 | _LIBCPP_HIDE_FROM_ABI ~_Storage() { | |
| 2642 | __get_alloc()->~_Alloc(); | |
| 2643 | } | |
| 2644 | _Alloc* __get_alloc() _NOEXCEPT { | |
| 2645 | _CompressedPair *__as_pair = reinterpret_cast<_CompressedPair*>(__blob_); | |
| 2646 | typename _CompressedPair::_Base1* __first = _CompressedPair::__get_first_base(__as_pair); | |
| 2647 | _Alloc *__alloc = reinterpret_cast<_Alloc*>(__first); | |
| 2648 | return __alloc; | |
| 2649 | } | |
| 2650 | _LIBCPP_NO_CFI _Tp* __get_elem() _NOEXCEPT { | |
| 2651 | _CompressedPair *__as_pair = reinterpret_cast<_CompressedPair*>(__blob_); | |
| 2652 | typename _CompressedPair::_Base2* __second = _CompressedPair::__get_second_base(__as_pair); | |
| 2653 | _Tp *__elem = reinterpret_cast<_Tp*>(__second); | |
| 2654 | return __elem; | |
| 2655 | } | |
| 2656 | }; | |
| 3490 | 2657 | |
| 3491 | private: | |
| 3492 | virtual void __on_zero_shared() _NOEXCEPT; | |
| 3493 | virtual void __on_zero_shared_weak() _NOEXCEPT; | |
| 3494 | public: | |
| 3495 | _LIBCPP_INLINE_VISIBILITY | |
| 3496 | _Tp* get() _NOEXCEPT {return _VSTD::addressof(__data_.second());} | |
| 2658 | static_assert(_LIBCPP_ALIGNOF(_Storage) == _LIBCPP_ALIGNOF(_CompressedPair), ""); | |
| 2659 | static_assert(sizeof(_Storage) == sizeof(_CompressedPair), ""); | |
| 2660 | _Storage __storage_; | |
| 3497 | 2661 | }; |
| 3498 | 2662 | |
| 3499 | template <class _Tp, class _Alloc> | |
| 3500 | void | |
| 3501 | __shared_ptr_emplace<_Tp, _Alloc>::__on_zero_shared() _NOEXCEPT | |
| 3502 | { | |
| 3503 | __data_.second().~_Tp(); | |
| 3504 | } | |
| 3505 | ||
| 3506 | template <class _Tp, class _Alloc> | |
| 3507 | void | |
| 3508 | __shared_ptr_emplace<_Tp, _Alloc>::__on_zero_shared_weak() _NOEXCEPT | |
| 3509 | { | |
| 3510 | typedef typename __allocator_traits_rebind<_Alloc, __shared_ptr_emplace>::type _Al; | |
| 3511 | typedef allocator_traits<_Al> _ATraits; | |
| 3512 | typedef pointer_traits<typename _ATraits::pointer> _PTraits; | |
| 3513 | _Al __a(__data_.first()); | |
| 3514 | __data_.first().~_Alloc(); | |
| 3515 | __a.deallocate(_PTraits::pointer_to(*this), 1); | |
| 3516 | } | |
| 3517 | ||
| 3518 | 2663 | struct __shared_ptr_dummy_rebind_allocator_type; |
| 3519 | 2664 | template <> |
| 3520 | 2665 | class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type> |
| ... | ... | @@ -3537,8 +2682,14 @@ struct __compatible_with |
| 3537 | 2682 | : is_convertible<_Tp*, _Up*> {}; |
| 3538 | 2683 | #endif // _LIBCPP_STD_VER > 14 |
| 3539 | 2684 | |
| 2685 | #if defined(_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI) | |
| 2686 | # define _LIBCPP_SHARED_PTR_TRIVIAL_ABI __attribute__((trivial_abi)) | |
| 2687 | #else | |
| 2688 | # define _LIBCPP_SHARED_PTR_TRIVIAL_ABI | |
| 2689 | #endif | |
| 2690 | ||
| 3540 | 2691 | template<class _Tp> |
| 3541 | class _LIBCPP_TEMPLATE_VIS shared_ptr | |
| 2692 | class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr | |
| 3542 | 2693 | { |
| 3543 | 2694 | public: |
| 3544 | 2695 | #if _LIBCPP_STD_VER > 14 |
| ... | ... | @@ -3577,25 +2728,17 @@ public: |
| 3577 | 2728 | shared_ptr(const shared_ptr<_Yp>& __r, |
| 3578 | 2729 | typename enable_if<__compatible_with<_Yp, element_type>::value, __nat>::type = __nat()) |
| 3579 | 2730 | _NOEXCEPT; |
| 3580 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3581 | 2731 | _LIBCPP_INLINE_VISIBILITY |
| 3582 | 2732 | shared_ptr(shared_ptr&& __r) _NOEXCEPT; |
| 3583 | 2733 | template<class _Yp> _LIBCPP_INLINE_VISIBILITY shared_ptr(shared_ptr<_Yp>&& __r, |
| 3584 | 2734 | typename enable_if<__compatible_with<_Yp, element_type>::value, __nat>::type = __nat()) |
| 3585 | 2735 | _NOEXCEPT; |
| 3586 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3587 | 2736 | template<class _Yp> explicit shared_ptr(const weak_ptr<_Yp>& __r, |
| 3588 | 2737 | typename enable_if<is_convertible<_Yp*, element_type*>::value, __nat>::type= __nat()); |
| 3589 | 2738 | #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) |
| 3590 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3591 | 2739 | template<class _Yp> |
| 3592 | 2740 | shared_ptr(auto_ptr<_Yp>&& __r, |
| 3593 | 2741 | typename enable_if<is_convertible<_Yp*, element_type*>::value, __nat>::type = __nat()); |
| 3594 | #else | |
| 3595 | template<class _Yp> | |
| 3596 | shared_ptr(auto_ptr<_Yp> __r, | |
| 3597 | typename enable_if<is_convertible<_Yp*, element_type*>::value, __nat>::type = __nat()); | |
| 3598 | #endif | |
| 3599 | 2742 | #endif |
| 3600 | 2743 | template <class _Yp, class _Dp> |
| 3601 | 2744 | shared_ptr(unique_ptr<_Yp, _Dp>&&, |
| ... | ... | @@ -3628,7 +2771,6 @@ public: |
| 3628 | 2771 | >::type |
| 3629 | 2772 | _LIBCPP_INLINE_VISIBILITY |
| 3630 | 2773 | operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT; |
| 3631 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3632 | 2774 | _LIBCPP_INLINE_VISIBILITY |
| 3633 | 2775 | shared_ptr& operator=(shared_ptr&& __r) _NOEXCEPT; |
| 3634 | 2776 | template<class _Yp> |
| ... | ... | @@ -3649,19 +2791,6 @@ public: |
| 3649 | 2791 | shared_ptr |
| 3650 | 2792 | >::type& |
| 3651 | 2793 | operator=(auto_ptr<_Yp>&& __r); |
| 3652 | #endif | |
| 3653 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3654 | #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) | |
| 3655 | template<class _Yp> | |
| 3656 | _LIBCPP_INLINE_VISIBILITY | |
| 3657 | typename enable_if | |
| 3658 | < | |
| 3659 | !is_array<_Yp>::value && | |
| 3660 | is_convertible<_Yp*, element_type*>::value, | |
| 3661 | shared_ptr& | |
| 3662 | >::type | |
| 3663 | operator=(auto_ptr<_Yp> __r); | |
| 3664 | #endif | |
| 3665 | 2794 | #endif |
| 3666 | 2795 | template <class _Yp, class _Dp> |
| 3667 | 2796 | typename enable_if |
| ... | ... | @@ -3670,13 +2799,8 @@ public: |
| 3670 | 2799 | is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>::value, |
| 3671 | 2800 | shared_ptr& |
| 3672 | 2801 | >::type |
| 3673 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3674 | 2802 | _LIBCPP_INLINE_VISIBILITY |
| 3675 | 2803 | operator=(unique_ptr<_Yp, _Dp>&& __r); |
| 3676 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3677 | _LIBCPP_INLINE_VISIBILITY | |
| 3678 | operator=(unique_ptr<_Yp, _Dp> __r); | |
| 3679 | #endif | |
| 3680 | 2804 | |
| 3681 | 2805 | _LIBCPP_INLINE_VISIBILITY |
| 3682 | 2806 | void swap(shared_ptr& __r) _NOEXCEPT; |
| ... | ... | @@ -3724,7 +2848,7 @@ public: |
| 3724 | 2848 | _LIBCPP_INLINE_VISIBILITY |
| 3725 | 2849 | bool unique() const _NOEXCEPT {return use_count() == 1;} |
| 3726 | 2850 | _LIBCPP_INLINE_VISIBILITY |
| 3727 | _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {return get() != 0;} | |
| 2851 | _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {return get() != nullptr;} | |
| 3728 | 2852 | template <class _Up> |
| 3729 | 2853 | _LIBCPP_INLINE_VISIBILITY |
| 3730 | 2854 | bool owner_before(shared_ptr<_Up> const& __p) const _NOEXCEPT |
| ... | ... | @@ -3828,8 +2952,8 @@ template<class _Tp> |
| 3828 | 2952 | inline |
| 3829 | 2953 | _LIBCPP_CONSTEXPR |
| 3830 | 2954 | shared_ptr<_Tp>::shared_ptr() _NOEXCEPT |
| 3831 | : __ptr_(0), | |
| 3832 | __cntrl_(0) | |
| 2955 | : __ptr_(nullptr), | |
| 2956 | __cntrl_(nullptr) | |
| 3833 | 2957 | { |
| 3834 | 2958 | } |
| 3835 | 2959 | |
| ... | ... | @@ -3837,8 +2961,8 @@ template<class _Tp> |
| 3837 | 2961 | inline |
| 3838 | 2962 | _LIBCPP_CONSTEXPR |
| 3839 | 2963 | shared_ptr<_Tp>::shared_ptr(nullptr_t) _NOEXCEPT |
| 3840 | : __ptr_(0), | |
| 3841 | __cntrl_(0) | |
| 2964 | : __ptr_(nullptr), | |
| 2965 | __cntrl_(nullptr) | |
| 3842 | 2966 | { |
| 3843 | 2967 | } |
| 3844 | 2968 | |
| ... | ... | @@ -3883,7 +3007,7 @@ shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d, |
| 3883 | 3007 | template<class _Tp> |
| 3884 | 3008 | template<class _Dp> |
| 3885 | 3009 | shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d) |
| 3886 | : __ptr_(0) | |
| 3010 | : __ptr_(nullptr) | |
| 3887 | 3011 | { |
| 3888 | 3012 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3889 | 3013 | try |
| ... | ... | @@ -3917,8 +3041,7 @@ shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d, _Alloc __a, |
| 3917 | 3041 | typedef __allocator_destructor<_A2> _D2; |
| 3918 | 3042 | _A2 __a2(__a); |
| 3919 | 3043 | unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1)); |
| 3920 | ::new(static_cast<void*>(_VSTD::addressof(*__hold2.get()))) | |
| 3921 | _CntrlBlk(__p, __d, __a); | |
| 3044 | ::new ((void*)_VSTD::addressof(*__hold2.get())) _CntrlBlk(__p, __d, __a); | |
| 3922 | 3045 | __cntrl_ = _VSTD::addressof(*__hold2.release()); |
| 3923 | 3046 | __enable_weak_this(__p, __p); |
| 3924 | 3047 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| ... | ... | @@ -3934,7 +3057,7 @@ shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d, _Alloc __a, |
| 3934 | 3057 | template<class _Tp> |
| 3935 | 3058 | template<class _Dp, class _Alloc> |
| 3936 | 3059 | shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a) |
| 3937 | : __ptr_(0) | |
| 3060 | : __ptr_(nullptr) | |
| 3938 | 3061 | { |
| 3939 | 3062 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3940 | 3063 | try |
| ... | ... | @@ -3945,8 +3068,7 @@ shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a) |
| 3945 | 3068 | typedef __allocator_destructor<_A2> _D2; |
| 3946 | 3069 | _A2 __a2(__a); |
| 3947 | 3070 | unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1)); |
| 3948 | ::new(static_cast<void*>(_VSTD::addressof(*__hold2.get()))) | |
| 3949 | _CntrlBlk(__p, __d, __a); | |
| 3071 | ::new ((void*)_VSTD::addressof(*__hold2.get())) _CntrlBlk(__p, __d, __a); | |
| 3950 | 3072 | __cntrl_ = _VSTD::addressof(*__hold2.release()); |
| 3951 | 3073 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3952 | 3074 | } |
| ... | ... | @@ -3992,16 +3114,14 @@ shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r, |
| 3992 | 3114 | __cntrl_->__add_shared(); |
| 3993 | 3115 | } |
| 3994 | 3116 | |
| 3995 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 3996 | ||
| 3997 | 3117 | template<class _Tp> |
| 3998 | 3118 | inline |
| 3999 | 3119 | shared_ptr<_Tp>::shared_ptr(shared_ptr&& __r) _NOEXCEPT |
| 4000 | 3120 | : __ptr_(__r.__ptr_), |
| 4001 | 3121 | __cntrl_(__r.__cntrl_) |
| 4002 | 3122 | { |
| 4003 | __r.__ptr_ = 0; | |
| 4004 | __r.__cntrl_ = 0; | |
| 3123 | __r.__ptr_ = nullptr; | |
| 3124 | __r.__cntrl_ = nullptr; | |
| 4005 | 3125 | } |
| 4006 | 3126 | |
| 4007 | 3127 | template<class _Tp> |
| ... | ... | @@ -4013,20 +3133,14 @@ shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r, |
| 4013 | 3133 | : __ptr_(__r.__ptr_), |
| 4014 | 3134 | __cntrl_(__r.__cntrl_) |
| 4015 | 3135 | { |
| 4016 | __r.__ptr_ = 0; | |
| 4017 | __r.__cntrl_ = 0; | |
| 3136 | __r.__ptr_ = nullptr; | |
| 3137 | __r.__cntrl_ = nullptr; | |
| 4018 | 3138 | } |
| 4019 | 3139 | |
| 4020 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4021 | ||
| 4022 | 3140 | #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) |
| 4023 | 3141 | template<class _Tp> |
| 4024 | 3142 | template<class _Yp> |
| 4025 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4026 | 3143 | shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp>&& __r, |
| 4027 | #else | |
| 4028 | shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r, | |
| 4029 | #endif | |
| 4030 | 3144 | typename enable_if<is_convertible<_Yp*, element_type*>::value, __nat>::type) |
| 4031 | 3145 | : __ptr_(__r.get()) |
| 4032 | 3146 | { |
| ... | ... | @@ -4121,8 +3235,6 @@ shared_ptr<_Tp>::operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT |
| 4121 | 3235 | return *this; |
| 4122 | 3236 | } |
| 4123 | 3237 | |
| 4124 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4125 | ||
| 4126 | 3238 | template<class _Tp> |
| 4127 | 3239 | inline |
| 4128 | 3240 | shared_ptr<_Tp>& |
| ... | ... | @@ -4179,43 +3291,6 @@ shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r) |
| 4179 | 3291 | return *this; |
| 4180 | 3292 | } |
| 4181 | 3293 | |
| 4182 | #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4183 | ||
| 4184 | #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) | |
| 4185 | template<class _Tp> | |
| 4186 | template<class _Yp> | |
| 4187 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4188 | typename enable_if | |
| 4189 | < | |
| 4190 | !is_array<_Yp>::value && | |
| 4191 | is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, | |
| 4192 | shared_ptr<_Tp>& | |
| 4193 | >::type | |
| 4194 | shared_ptr<_Tp>::operator=(auto_ptr<_Yp> __r) | |
| 4195 | { | |
| 4196 | shared_ptr(__r).swap(*this); | |
| 4197 | return *this; | |
| 4198 | } | |
| 4199 | #endif | |
| 4200 | ||
| 4201 | template<class _Tp> | |
| 4202 | template <class _Yp, class _Dp> | |
| 4203 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4204 | typename enable_if | |
| 4205 | < | |
| 4206 | !is_array<_Yp>::value && | |
| 4207 | is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, | |
| 4208 | typename shared_ptr<_Tp>::element_type*>::value, | |
| 4209 | shared_ptr<_Tp>& | |
| 4210 | >::type | |
| 4211 | shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp> __r) | |
| 4212 | { | |
| 4213 | shared_ptr(_VSTD::move(__r)).swap(*this); | |
| 4214 | return *this; | |
| 4215 | } | |
| 4216 | ||
| 4217 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4218 | ||
| 4219 | 3294 | template<class _Tp> |
| 4220 | 3295 | inline |
| 4221 | 3296 | void |
| ... | ... | @@ -4272,50 +3347,26 @@ shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d, _Alloc __a) |
| 4272 | 3347 | shared_ptr(__p, __d, __a).swap(*this); |
| 4273 | 3348 | } |
| 4274 | 3349 | |
| 4275 | template<class _Tp, class ..._Args> | |
| 4276 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4277 | typename enable_if | |
| 4278 | < | |
| 4279 | !is_array<_Tp>::value, | |
| 4280 | shared_ptr<_Tp> | |
| 4281 | >::type | |
| 4282 | make_shared(_Args&& ...__args) | |
| 3350 | // | |
| 3351 | // std::allocate_shared and std::make_shared | |
| 3352 | // | |
| 3353 | template<class _Tp, class _Alloc, class ..._Args, class = _EnableIf<!is_array<_Tp>::value> > | |
| 3354 | _LIBCPP_HIDE_FROM_ABI | |
| 3355 | shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args) | |
| 4283 | 3356 | { |
| 4284 | static_assert(is_constructible<_Tp, _Args...>::value, "Can't construct object in make_shared"); | |
| 4285 | typedef __shared_ptr_emplace<_Tp, allocator<_Tp> > _CntrlBlk; | |
| 4286 | typedef allocator<_CntrlBlk> _A2; | |
| 4287 | typedef __allocator_destructor<_A2> _D2; | |
| 4288 | ||
| 4289 | _A2 __a2; | |
| 4290 | unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1)); | |
| 4291 | ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...); | |
| 4292 | ||
| 4293 | _Tp *__ptr = __hold2.get()->get(); | |
| 4294 | return shared_ptr<_Tp>::__create_with_control_block(__ptr, __hold2.release()); | |
| 3357 | using _ControlBlock = __shared_ptr_emplace<_Tp, _Alloc>; | |
| 3358 | using _ControlBlockAllocator = typename __allocator_traits_rebind<_Alloc, _ControlBlock>::type; | |
| 3359 | __allocation_guard<_ControlBlockAllocator> __guard(__a, 1); | |
| 3360 | ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...); | |
| 3361 | auto __control_block = __guard.__release_ptr(); | |
| 3362 | return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), _VSTD::addressof(*__control_block)); | |
| 4295 | 3363 | } |
| 4296 | 3364 | |
| 4297 | template<class _Tp, class _Alloc, class ..._Args> | |
| 4298 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4299 | typename enable_if | |
| 4300 | < | |
| 4301 | !is_array<_Tp>::value, | |
| 4302 | shared_ptr<_Tp> | |
| 4303 | >::type | |
| 4304 | allocate_shared(const _Alloc& __a, _Args&& ...__args) | |
| 3365 | template<class _Tp, class ..._Args, class = _EnableIf<!is_array<_Tp>::value> > | |
| 3366 | _LIBCPP_HIDE_FROM_ABI | |
| 3367 | shared_ptr<_Tp> make_shared(_Args&& ...__args) | |
| 4305 | 3368 | { |
| 4306 | static_assert( is_constructible<_Tp, _Args...>::value, "Can't construct object in allocate_shared"); | |
| 4307 | ||
| 4308 | typedef __shared_ptr_emplace<_Tp, _Alloc> _CntrlBlk; | |
| 4309 | typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2; | |
| 4310 | typedef __allocator_destructor<_A2> _D2; | |
| 4311 | ||
| 4312 | _A2 __a2(__a); | |
| 4313 | unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1)); | |
| 4314 | ::new(static_cast<void*>(_VSTD::addressof(*__hold2.get()))) | |
| 4315 | _CntrlBlk(__a, _VSTD::forward<_Args>(__args)...); | |
| 4316 | ||
| 4317 | typename shared_ptr<_Tp>::element_type *__p = __hold2.get()->get(); | |
| 4318 | return shared_ptr<_Tp>::__create_with_control_block(__p, _VSTD::addressof(*__hold2.release())); | |
| 3369 | return _VSTD::allocate_shared<_Tp>(allocator<_Tp>(), _VSTD::forward<_Args>(__args)...); | |
| 4319 | 3370 | } |
| 4320 | 3371 | |
| 4321 | 3372 | template<class _Tp, class _Up> |
| ... | ... | @@ -4526,7 +3577,7 @@ get_deleter(const shared_ptr<_Tp>& __p) _NOEXCEPT |
| 4526 | 3577 | #endif // _LIBCPP_NO_RTTI |
| 4527 | 3578 | |
| 4528 | 3579 | template<class _Tp> |
| 4529 | class _LIBCPP_TEMPLATE_VIS weak_ptr | |
| 3580 | class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr | |
| 4530 | 3581 | { |
| 4531 | 3582 | public: |
| 4532 | 3583 | typedef _Tp element_type; |
| ... | ... | @@ -4546,13 +3597,11 @@ public: |
| 4546 | 3597 | typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat*>::type = 0) |
| 4547 | 3598 | _NOEXCEPT; |
| 4548 | 3599 | |
| 4549 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4550 | 3600 | _LIBCPP_INLINE_VISIBILITY |
| 4551 | 3601 | weak_ptr(weak_ptr&& __r) _NOEXCEPT; |
| 4552 | 3602 | template<class _Yp> _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r, |
| 4553 | 3603 | typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat*>::type = 0) |
| 4554 | 3604 | _NOEXCEPT; |
| 4555 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4556 | 3605 | ~weak_ptr(); |
| 4557 | 3606 | |
| 4558 | 3607 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -4566,8 +3615,6 @@ public: |
| 4566 | 3615 | _LIBCPP_INLINE_VISIBILITY |
| 4567 | 3616 | operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT; |
| 4568 | 3617 | |
| 4569 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4570 | ||
| 4571 | 3618 | _LIBCPP_INLINE_VISIBILITY |
| 4572 | 3619 | weak_ptr& operator=(weak_ptr&& __r) _NOEXCEPT; |
| 4573 | 3620 | template<class _Yp> |
| ... | ... | @@ -4579,8 +3626,6 @@ public: |
| 4579 | 3626 | _LIBCPP_INLINE_VISIBILITY |
| 4580 | 3627 | operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT; |
| 4581 | 3628 | |
| 4582 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4583 | ||
| 4584 | 3629 | template<class _Yp> |
| 4585 | 3630 | typename enable_if |
| 4586 | 3631 | < |
| ... | ... | @@ -4600,7 +3645,7 @@ public: |
| 4600 | 3645 | {return __cntrl_ ? __cntrl_->use_count() : 0;} |
| 4601 | 3646 | _LIBCPP_INLINE_VISIBILITY |
| 4602 | 3647 | bool expired() const _NOEXCEPT |
| 4603 | {return __cntrl_ == 0 || __cntrl_->use_count() == 0;} | |
| 3648 | {return __cntrl_ == nullptr || __cntrl_->use_count() == 0;} | |
| 4604 | 3649 | shared_ptr<_Tp> lock() const _NOEXCEPT; |
| 4605 | 3650 | template<class _Up> |
| 4606 | 3651 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -4624,8 +3669,8 @@ template<class _Tp> |
| 4624 | 3669 | inline |
| 4625 | 3670 | _LIBCPP_CONSTEXPR |
| 4626 | 3671 | weak_ptr<_Tp>::weak_ptr() _NOEXCEPT |
| 4627 | : __ptr_(0), | |
| 4628 | __cntrl_(0) | |
| 3672 | : __ptr_(nullptr), | |
| 3673 | __cntrl_(nullptr) | |
| 4629 | 3674 | { |
| 4630 | 3675 | } |
| 4631 | 3676 | |
| ... | ... | @@ -4665,16 +3710,14 @@ weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp> const& __r, |
| 4665 | 3710 | __cntrl_->__add_weak(); |
| 4666 | 3711 | } |
| 4667 | 3712 | |
| 4668 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4669 | ||
| 4670 | 3713 | template<class _Tp> |
| 4671 | 3714 | inline |
| 4672 | 3715 | weak_ptr<_Tp>::weak_ptr(weak_ptr&& __r) _NOEXCEPT |
| 4673 | 3716 | : __ptr_(__r.__ptr_), |
| 4674 | 3717 | __cntrl_(__r.__cntrl_) |
| 4675 | 3718 | { |
| 4676 | __r.__ptr_ = 0; | |
| 4677 | __r.__cntrl_ = 0; | |
| 3719 | __r.__ptr_ = nullptr; | |
| 3720 | __r.__cntrl_ = nullptr; | |
| 4678 | 3721 | } |
| 4679 | 3722 | |
| 4680 | 3723 | template<class _Tp> |
| ... | ... | @@ -4686,12 +3729,10 @@ weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp>&& __r, |
| 4686 | 3729 | : __ptr_(__r.__ptr_), |
| 4687 | 3730 | __cntrl_(__r.__cntrl_) |
| 4688 | 3731 | { |
| 4689 | __r.__ptr_ = 0; | |
| 4690 | __r.__cntrl_ = 0; | |
| 3732 | __r.__ptr_ = nullptr; | |
| 3733 | __r.__cntrl_ = nullptr; | |
| 4691 | 3734 | } |
| 4692 | 3735 | |
| 4693 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4694 | ||
| 4695 | 3736 | template<class _Tp> |
| 4696 | 3737 | weak_ptr<_Tp>::~weak_ptr() |
| 4697 | 3738 | { |
| ... | ... | @@ -4722,8 +3763,6 @@ weak_ptr<_Tp>::operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT |
| 4722 | 3763 | return *this; |
| 4723 | 3764 | } |
| 4724 | 3765 | |
| 4725 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4726 | ||
| 4727 | 3766 | template<class _Tp> |
| 4728 | 3767 | inline |
| 4729 | 3768 | weak_ptr<_Tp>& |
| ... | ... | @@ -4747,8 +3786,6 @@ weak_ptr<_Tp>::operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT |
| 4747 | 3786 | return *this; |
| 4748 | 3787 | } |
| 4749 | 3788 | |
| 4750 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES | |
| 4751 | ||
| 4752 | 3789 | template<class _Tp> |
| 4753 | 3790 | template<class _Yp> |
| 4754 | 3791 | inline |
| ... | ... | @@ -4795,7 +3832,7 @@ shared_ptr<_Tp>::shared_ptr(const weak_ptr<_Yp>& __r, |
| 4795 | 3832 | : __ptr_(__r.__ptr_), |
| 4796 | 3833 | __cntrl_(__r.__cntrl_ ? __r.__cntrl_->lock() : __r.__cntrl_) |
| 4797 | 3834 | { |
| 4798 | if (__cntrl_ == 0) | |
| 3835 | if (__cntrl_ == nullptr) | |
| 4799 | 3836 | __throw_bad_weak_ptr(); |
| 4800 | 3837 | } |
| 4801 | 3838 | |
| ... | ... | @@ -5130,35 +4167,35 @@ _LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t& |
| 5130 | 4167 | |
| 5131 | 4168 | // --- Helper for container swap -- |
| 5132 | 4169 | template <typename _Alloc> |
| 5133 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5134 | void __swap_allocator(_Alloc & __a1, _Alloc & __a2) | |
| 4170 | _LIBCPP_INLINE_VISIBILITY | |
| 4171 | void __swap_allocator(_Alloc & __a1, _Alloc & __a2, true_type) | |
| 5135 | 4172 | #if _LIBCPP_STD_VER >= 14 |
| 5136 | 4173 | _NOEXCEPT |
| 5137 | 4174 | #else |
| 5138 | 4175 | _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value) |
| 5139 | 4176 | #endif |
| 5140 | 4177 | { |
| 5141 | __swap_allocator(__a1, __a2, | |
| 5142 | integral_constant<bool, _VSTD::allocator_traits<_Alloc>::propagate_on_container_swap::value>()); | |
| 4178 | using _VSTD::swap; | |
| 4179 | swap(__a1, __a2); | |
| 5143 | 4180 | } |
| 5144 | 4181 | |
| 5145 | 4182 | template <typename _Alloc> |
| 5146 | _LIBCPP_INLINE_VISIBILITY | |
| 5147 | void __swap_allocator(_Alloc & __a1, _Alloc & __a2, true_type) | |
| 4183 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4184 | void __swap_allocator(_Alloc &, _Alloc &, false_type) _NOEXCEPT {} | |
| 4185 | ||
| 4186 | template <typename _Alloc> | |
| 4187 | inline _LIBCPP_INLINE_VISIBILITY | |
| 4188 | void __swap_allocator(_Alloc & __a1, _Alloc & __a2) | |
| 5148 | 4189 | #if _LIBCPP_STD_VER >= 14 |
| 5149 | 4190 | _NOEXCEPT |
| 5150 | 4191 | #else |
| 5151 | 4192 | _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value) |
| 5152 | 4193 | #endif |
| 5153 | 4194 | { |
| 5154 | using _VSTD::swap; | |
| 5155 | swap(__a1, __a2); | |
| 4195 | _VSTD::__swap_allocator(__a1, __a2, | |
| 4196 | integral_constant<bool, _VSTD::allocator_traits<_Alloc>::propagate_on_container_swap::value>()); | |
| 5156 | 4197 | } |
| 5157 | 4198 | |
| 5158 | template <typename _Alloc> | |
| 5159 | inline _LIBCPP_INLINE_VISIBILITY | |
| 5160 | void __swap_allocator(_Alloc &, _Alloc &, false_type) _NOEXCEPT {} | |
| 5161 | ||
| 5162 | 4199 | template <typename _Alloc, typename _Traits=allocator_traits<_Alloc> > |
| 5163 | 4200 | struct __noexcept_move_assign_container : public integral_constant<bool, |
| 5164 | 4201 | _Traits::propagate_on_container_move_assignment::value |
| ... | ... | @@ -5170,7 +4207,6 @@ struct __noexcept_move_assign_container : public integral_constant<bool, |
| 5170 | 4207 | > {}; |
| 5171 | 4208 | |
| 5172 | 4209 | |
| 5173 | #ifndef _LIBCPP_HAS_NO_VARIADICS | |
| 5174 | 4210 | template <class _Tp, class _Alloc> |
| 5175 | 4211 | struct __temp_value { |
| 5176 | 4212 | typedef allocator_traits<_Alloc> _Traits; |
| ... | ... | @@ -5190,7 +4226,6 @@ struct __temp_value { |
| 5190 | 4226 | |
| 5191 | 4227 | ~__temp_value() { _Traits::destroy(__a, __addr()); } |
| 5192 | 4228 | }; |
| 5193 | #endif | |
| 5194 | 4229 | |
| 5195 | 4230 | template<typename _Alloc, typename = void, typename = void> |
| 5196 | 4231 | struct __is_allocator : false_type {}; |
| ... | ... | @@ -5214,7 +4249,7 @@ struct __builtin_new_allocator { |
| 5214 | 4249 | : __size_(__size), __align_(__align) {} |
| 5215 | 4250 | |
| 5216 | 4251 | void operator()(void* p) const _NOEXCEPT { |
| 5217 | std::__libcpp_deallocate(p, __size_, __align_); | |
| 4252 | _VSTD::__libcpp_deallocate(p, __size_, __align_); | |
| 5218 | 4253 | } |
| 5219 | 4254 | |
| 5220 | 4255 | private: |
| ... | ... | @@ -5225,13 +4260,13 @@ struct __builtin_new_allocator { |
| 5225 | 4260 | typedef unique_ptr<void, __builtin_new_deleter> __holder_t; |
| 5226 | 4261 | |
| 5227 | 4262 | static __holder_t __allocate_bytes(size_t __s, size_t __align) { |
| 5228 | return __holder_t(std::__libcpp_allocate(__s, __align), | |
| 4263 | return __holder_t(_VSTD::__libcpp_allocate(__s, __align), | |
| 5229 | 4264 | __builtin_new_deleter(__s, __align)); |
| 5230 | 4265 | } |
| 5231 | 4266 | |
| 5232 | 4267 | static void __deallocate_bytes(void* __p, size_t __s, |
| 5233 | 4268 | size_t __align) _NOEXCEPT { |
| 5234 | std::__libcpp_deallocate(__p, __s, __align); | |
| 4269 | _VSTD::__libcpp_deallocate(__p, __s, __align); | |
| 5235 | 4270 | } |
| 5236 | 4271 | |
| 5237 | 4272 | template <class _Tp> |
lib/libcxx/include/module.modulemap+1| ... | ... | @@ -522,6 +522,7 @@ module std [system] { |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | // FIXME: These should be private. |
| 525 | module __bits { header "__bits" export * } | |
| 525 | 526 | module __bit_reference { header "__bit_reference" export * } |
| 526 | 527 | module __debug { header "__debug" export * } |
| 527 | 528 | module __errc { header "__errc" export * } |
lib/libcxx/include/mutex+1-1| ... | ... | @@ -626,7 +626,7 @@ private: |
| 626 | 626 | _LIBCPP_INLINE_VISIBILITY |
| 627 | 627 | void __execute(__tuple_indices<_Indices...>) |
| 628 | 628 | { |
| 629 | __invoke(_VSTD::get<0>(_VSTD::move(__f_)), _VSTD::get<_Indices>(_VSTD::move(__f_))...); | |
| 629 | _VSTD::__invoke(_VSTD::get<0>(_VSTD::move(__f_)), _VSTD::get<_Indices>(_VSTD::move(__f_))...); | |
| 630 | 630 | } |
| 631 | 631 | }; |
| 632 | 632 |
lib/libcxx/include/new+80-93| ... | ... | @@ -49,11 +49,11 @@ new_handler get_new_handler() noexcept; |
| 49 | 49 | template <class T> constexpr T* launder(T* p) noexcept; // C++17 |
| 50 | 50 | } // std |
| 51 | 51 | |
| 52 | void* operator new(std::size_t size); // replaceable, nodiscard in C++2a | |
| 53 | void* operator new(std::size_t size, std::align_val_t alignment); // replaceable, C++17, nodiscard in C++2a | |
| 54 | void* operator new(std::size_t size, const std::nothrow_t&) noexcept; // replaceable, nodiscard in C++2a | |
| 52 | void* operator new(std::size_t size); // replaceable, nodiscard in C++20 | |
| 53 | void* operator new(std::size_t size, std::align_val_t alignment); // replaceable, C++17, nodiscard in C++20 | |
| 54 | void* operator new(std::size_t size, const std::nothrow_t&) noexcept; // replaceable, nodiscard in C++20 | |
| 55 | 55 | void* operator new(std::size_t size, std::align_val_t alignment, |
| 56 | const std::nothrow_t&) noexcept; // replaceable, C++17, nodiscard in C++2a | |
| 56 | const std::nothrow_t&) noexcept; // replaceable, C++17, nodiscard in C++20 | |
| 57 | 57 | void operator delete(void* ptr) noexcept; // replaceable |
| 58 | 58 | void operator delete(void* ptr, std::size_t size) noexcept; // replaceable, C++14 |
| 59 | 59 | void operator delete(void* ptr, std::align_val_t alignment) noexcept; // replaceable, C++17 |
| ... | ... | @@ -63,12 +63,12 @@ void operator delete(void* ptr, const std::nothrow_t&) noexcept; // repla |
| 63 | 63 | void operator delete(void* ptr, std:align_val_t alignment, |
| 64 | 64 | const std::nothrow_t&) noexcept; // replaceable, C++17 |
| 65 | 65 | |
| 66 | void* operator new[](std::size_t size); // replaceable, nodiscard in C++2a | |
| 66 | void* operator new[](std::size_t size); // replaceable, nodiscard in C++20 | |
| 67 | 67 | void* operator new[](std::size_t size, |
| 68 | std::align_val_t alignment) noexcept; // replaceable, C++17, nodiscard in C++2a | |
| 69 | void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; // replaceable, nodiscard in C++2a | |
| 68 | std::align_val_t alignment) noexcept; // replaceable, C++17, nodiscard in C++20 | |
| 69 | void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; // replaceable, nodiscard in C++20 | |
| 70 | 70 | void* operator new[](std::size_t size, std::align_val_t alignment, |
| 71 | const std::nothrow_t&) noexcept; // replaceable, C++17, nodiscard in C++2a | |
| 71 | const std::nothrow_t&) noexcept; // replaceable, C++17, nodiscard in C++20 | |
| 72 | 72 | void operator delete[](void* ptr) noexcept; // replaceable |
| 73 | 73 | void operator delete[](void* ptr, std::size_t size) noexcept; // replaceable, C++14 |
| 74 | 74 | void operator delete[](void* ptr, |
| ... | ... | @@ -79,21 +79,20 @@ void operator delete[](void* ptr, const std::nothrow_t&) noexcept; // repla |
| 79 | 79 | void operator delete[](void* ptr, std::align_val_t alignment, |
| 80 | 80 | const std::nothrow_t&) noexcept; // replaceable, C++17 |
| 81 | 81 | |
| 82 | void* operator new (std::size_t size, void* ptr) noexcept; // nodiscard in C++2a | |
| 83 | void* operator new[](std::size_t size, void* ptr) noexcept; // nodiscard in C++2a | |
| 82 | void* operator new (std::size_t size, void* ptr) noexcept; // nodiscard in C++20 | |
| 83 | void* operator new[](std::size_t size, void* ptr) noexcept; // nodiscard in C++20 | |
| 84 | 84 | void operator delete (void* ptr, void*) noexcept; |
| 85 | 85 | void operator delete[](void* ptr, void*) noexcept; |
| 86 | 86 | |
| 87 | 87 | */ |
| 88 | 88 | |
| 89 | 89 | #include <__config> |
| 90 | #include <__availability> | |
| 91 | #include <cstddef> | |
| 92 | #include <cstdlib> | |
| 90 | 93 | #include <exception> |
| 91 | 94 | #include <type_traits> |
| 92 | #include <cstddef> | |
| 93 | 95 | #include <version> |
| 94 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 95 | #include <cstdlib> | |
| 96 | #endif | |
| 97 | 96 | |
| 98 | 97 | #if defined(_LIBCPP_ABI_VCRUNTIME) |
| 99 | 98 | #include <new.h> |
| ... | ... | @@ -117,11 +116,6 @@ void operator delete[](void* ptr, void*) noexcept; |
| 117 | 116 | # define _LIBCPP_HAS_NO_SIZED_DEALLOCATION |
| 118 | 117 | #endif |
| 119 | 118 | |
| 120 | #if !__has_builtin(__builtin_operator_new) || \ | |
| 121 | __has_builtin(__builtin_operator_new) < 201802L | |
| 122 | #define _LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE | |
| 123 | #endif | |
| 124 | ||
| 125 | 119 | namespace std // purposefully not using versioning namespace |
| 126 | 120 | { |
| 127 | 121 | |
| ... | ... | @@ -234,31 +228,54 @@ _LIBCPP_CONSTEXPR inline _LIBCPP_INLINE_VISIBILITY bool __is_overaligned_for_new |
| 234 | 228 | #endif |
| 235 | 229 | } |
| 236 | 230 | |
| 237 | inline _LIBCPP_INLINE_VISIBILITY void *__libcpp_allocate(size_t __size, size_t __align) { | |
| 231 | template <class ..._Args> | |
| 232 | _LIBCPP_INLINE_VISIBILITY | |
| 233 | void* __libcpp_operator_new(_Args ...__args) { | |
| 234 | #if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete) | |
| 235 | return __builtin_operator_new(__args...); | |
| 236 | #else | |
| 237 | return ::operator new(__args...); | |
| 238 | #endif | |
| 239 | } | |
| 240 | ||
| 241 | template <class ..._Args> | |
| 242 | _LIBCPP_INLINE_VISIBILITY | |
| 243 | void __libcpp_operator_delete(_Args ...__args) { | |
| 244 | #if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete) | |
| 245 | __builtin_operator_delete(__args...); | |
| 246 | #else | |
| 247 | ::operator delete(__args...); | |
| 248 | #endif | |
| 249 | } | |
| 250 | ||
| 251 | inline _LIBCPP_INLINE_VISIBILITY | |
| 252 | void *__libcpp_allocate(size_t __size, size_t __align) { | |
| 238 | 253 | #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION |
| 239 | 254 | if (__is_overaligned_for_new(__align)) { |
| 240 | 255 | const align_val_t __align_val = static_cast<align_val_t>(__align); |
| 241 | # ifdef _LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE | |
| 242 | return ::operator new(__size, __align_val); | |
| 243 | # else | |
| 244 | return __builtin_operator_new(__size, __align_val); | |
| 245 | # endif | |
| 256 | return __libcpp_operator_new(__size, __align_val); | |
| 246 | 257 | } |
| 247 | #else | |
| 248 | ((void)__align); | |
| 249 | 258 | #endif |
| 250 | #ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE | |
| 251 | return ::operator new(__size); | |
| 259 | ||
| 260 | (void)__align; | |
| 261 | return __libcpp_operator_new(__size); | |
| 262 | } | |
| 263 | ||
| 264 | template <class ..._Args> | |
| 265 | _LIBCPP_INLINE_VISIBILITY | |
| 266 | void __do_deallocate_handle_size(void *__ptr, size_t __size, _Args ...__args) { | |
| 267 | #ifdef _LIBCPP_HAS_NO_SIZED_DEALLOCATION | |
| 268 | (void)__size; | |
| 269 | return __libcpp_operator_delete(__ptr, __args...); | |
| 252 | 270 | #else |
| 253 | return __builtin_operator_new(__size); | |
| 271 | return __libcpp_operator_delete(__ptr, __size, __args...); | |
| 254 | 272 | #endif |
| 255 | 273 | } |
| 256 | 274 | |
| 257 | struct _DeallocateCaller { | |
| 258 | static inline _LIBCPP_INLINE_VISIBILITY | |
| 259 | void __do_deallocate_handle_size_align(void *__ptr, size_t __size, size_t __align) { | |
| 275 | inline _LIBCPP_INLINE_VISIBILITY | |
| 276 | void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) { | |
| 260 | 277 | #if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) |
| 261 | ((void)__align); | |
| 278 | (void)__align; | |
| 262 | 279 | return __do_deallocate_handle_size(__ptr, __size); |
| 263 | 280 | #else |
| 264 | 281 | if (__is_overaligned_for_new(__align)) { |
| ... | ... | @@ -268,81 +285,51 @@ struct _DeallocateCaller { |
| 268 | 285 | return __do_deallocate_handle_size(__ptr, __size); |
| 269 | 286 | } |
| 270 | 287 | #endif |
| 271 | } | |
| 288 | } | |
| 272 | 289 | |
| 273 | static inline _LIBCPP_INLINE_VISIBILITY | |
| 274 | void __do_deallocate_handle_align(void *__ptr, size_t __align) { | |
| 290 | inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate_unsized(void* __ptr, size_t __align) { | |
| 275 | 291 | #if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) |
| 276 | ((void)__align); | |
| 277 | return __do_call(__ptr); | |
| 292 | (void)__align; | |
| 293 | return __libcpp_operator_delete(__ptr); | |
| 278 | 294 | #else |
| 279 | 295 | if (__is_overaligned_for_new(__align)) { |
| 280 | 296 | const align_val_t __align_val = static_cast<align_val_t>(__align); |
| 281 | return __do_call(__ptr, __align_val); | |
| 297 | return __libcpp_operator_delete(__ptr, __align_val); | |
| 282 | 298 | } else { |
| 283 | return __do_call(__ptr); | |
| 299 | return __libcpp_operator_delete(__ptr); | |
| 284 | 300 | } |
| 285 | 301 | #endif |
| 286 | } | |
| 287 | ||
| 288 | private: | |
| 289 | static inline void __do_deallocate_handle_size(void *__ptr, size_t __size) { | |
| 290 | #ifdef _LIBCPP_HAS_NO_SIZED_DEALLOCATION | |
| 291 | ((void)__size); | |
| 292 | return __do_call(__ptr); | |
| 293 | #else | |
| 294 | return __do_call(__ptr, __size); | |
| 295 | #endif | |
| 296 | } | |
| 297 | ||
| 298 | #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION | |
| 299 | static inline void __do_deallocate_handle_size(void *__ptr, size_t __size, align_val_t __align) { | |
| 300 | #ifdef _LIBCPP_HAS_NO_SIZED_DEALLOCATION | |
| 301 | ((void)__size); | |
| 302 | return __do_call(__ptr, __align); | |
| 303 | #else | |
| 304 | return __do_call(__ptr, __size, __align); | |
| 305 | #endif | |
| 306 | } | |
| 307 | #endif | |
| 308 | ||
| 309 | private: | |
| 310 | template <class _A1, class _A2> | |
| 311 | static inline void __do_call(void *__ptr, _A1 __a1, _A2 __a2) { | |
| 312 | #if defined(_LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE) || \ | |
| 313 | defined(_LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE) | |
| 314 | return ::operator delete(__ptr, __a1, __a2); | |
| 315 | #else | |
| 316 | return __builtin_operator_delete(__ptr, __a1, __a2); | |
| 317 | #endif | |
| 318 | } | |
| 302 | } | |
| 319 | 303 | |
| 320 | template <class _A1> | |
| 321 | static inline void __do_call(void *__ptr, _A1 __a1) { | |
| 322 | #if defined(_LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE) || \ | |
| 323 | defined(_LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE) | |
| 324 | return ::operator delete(__ptr, __a1); | |
| 304 | #if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) | |
| 305 | // Low-level helpers to call the aligned allocation and deallocation functions | |
| 306 | // on the target platform. This is used to implement libc++'s own memory | |
| 307 | // allocation routines -- if you need to allocate memory inside the library, | |
| 308 | // chances are that you want to use `__libcpp_allocate` instead. | |
| 309 | // | |
| 310 | // Returns the allocated memory, or `nullptr` on failure. | |
| 311 | inline _LIBCPP_INLINE_VISIBILITY | |
| 312 | void* __libcpp_aligned_alloc(std::size_t __alignment, std::size_t __size) { | |
| 313 | #if defined(_LIBCPP_MSVCRT_LIKE) | |
| 314 | return ::_aligned_malloc(__size, __alignment); | |
| 325 | 315 | #else |
| 326 | return __builtin_operator_delete(__ptr, __a1); | |
| 316 | void* __result = nullptr; | |
| 317 | ::posix_memalign(&__result, __alignment, __size); | |
| 318 | // If posix_memalign fails, __result is unmodified so we still return `nullptr`. | |
| 319 | return __result; | |
| 327 | 320 | #endif |
| 328 | } | |
| 321 | } | |
| 329 | 322 | |
| 330 | static inline void __do_call(void *__ptr) { | |
| 331 | #ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE | |
| 332 | return ::operator delete(__ptr); | |
| 323 | inline _LIBCPP_INLINE_VISIBILITY | |
| 324 | void __libcpp_aligned_free(void* __ptr) { | |
| 325 | #if defined(_LIBCPP_MSVCRT_LIKE) | |
| 326 | ::_aligned_free(__ptr); | |
| 333 | 327 | #else |
| 334 | return __builtin_operator_delete(__ptr); | |
| 328 | ::free(__ptr); | |
| 335 | 329 | #endif |
| 336 | } | |
| 337 | }; | |
| 338 | ||
| 339 | inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) { | |
| 340 | _DeallocateCaller::__do_deallocate_handle_size_align(__ptr, __size, __align); | |
| 341 | 330 | } |
| 331 | #endif // !_LIBCPP_HAS_NO_ALIGNED_ALLOCATION | |
| 342 | 332 | |
| 343 | inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate_unsized(void* __ptr, size_t __align) { | |
| 344 | _DeallocateCaller::__do_deallocate_handle_align(__ptr, __align); | |
| 345 | } | |
| 346 | 333 | |
| 347 | 334 | template <class _Tp> |
| 348 | 335 | _LIBCPP_NODISCARD_AFTER_CXX17 inline |
lib/libcxx/include/numbers+1-1| ... | ... | @@ -100,7 +100,7 @@ template <class T> inline constexpr T egamma_v = __illformed<T>{}; |
| 100 | 100 | template <class T> inline constexpr T phi_v = __illformed<T>{}; |
| 101 | 101 | |
| 102 | 102 | template <class T> |
| 103 | concept __floating_point = std::is_floating_point_v<T>; | |
| 103 | concept __floating_point = is_floating_point_v<T>; | |
| 104 | 104 | |
| 105 | 105 | template <__floating_point T> inline constexpr T e_v<T> = 2.718281828459045235360287471352662; |
| 106 | 106 | template <__floating_point T> inline constexpr T log2e_v<T> = 1.442695040888963407359924681001892; |
lib/libcxx/include/numeric+118-73| ... | ... | @@ -17,115 +17,116 @@ namespace std |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | 19 | template <class InputIterator, class T> |
| 20 | T | |
| 20 | constexpr T // constexpr since C++20 | |
| 21 | 21 | accumulate(InputIterator first, InputIterator last, T init); |
| 22 | 22 | |
| 23 | 23 | template <class InputIterator, class T, class BinaryOperation> |
| 24 | T | |
| 24 | constexpr T // constexpr since C++20 | |
| 25 | 25 | accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op); |
| 26 | 26 | |
| 27 | 27 | template<class InputIterator> |
| 28 | typename iterator_traits<InputIterator>::value_type | |
| 28 | constexpr typename iterator_traits<InputIterator>::value_type // constexpr since C++20 | |
| 29 | 29 | reduce(InputIterator first, InputIterator last); // C++17 |
| 30 | 30 | |
| 31 | 31 | template<class InputIterator, class T> |
| 32 | T | |
| 32 | constexpr T // constexpr since C++20 | |
| 33 | 33 | reduce(InputIterator first, InputIterator last, T init); // C++17 |
| 34 | 34 | |
| 35 | 35 | template<class InputIterator, class T, class BinaryOperation> |
| 36 | T | |
| 36 | constexpr T // constexpr since C++20 | |
| 37 | 37 | reduce(InputIterator first, InputIterator last, T init, BinaryOperation binary_op); // C++17 |
| 38 | 38 | |
| 39 | 39 | template <class InputIterator1, class InputIterator2, class T> |
| 40 | T | |
| 40 | constexpr T // constexpr since C++20 | |
| 41 | 41 | inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init); |
| 42 | 42 | |
| 43 | 43 | template <class InputIterator1, class InputIterator2, class T, class BinaryOperation1, class BinaryOperation2> |
| 44 | T | |
| 44 | constexpr T // constexpr since C++20 | |
| 45 | 45 | inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, |
| 46 | 46 | T init, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2); |
| 47 | 47 | |
| 48 | 48 | |
| 49 | 49 | template<class InputIterator1, class InputIterator2, class T> |
| 50 | T | |
| 50 | constexpr T // constexpr since C++20 | |
| 51 | 51 | transform_reduce(InputIterator1 first1, InputIterator1 last1, |
| 52 | 52 | InputIterator2 first2, T init); // C++17 |
| 53 | 53 | |
| 54 | 54 | template<class InputIterator1, class InputIterator2, class T, class BinaryOperation1, class BinaryOperation2> |
| 55 | T | |
| 55 | constexpr T // constexpr since C++20 | |
| 56 | 56 | transform_reduce(InputIterator1 first1, InputIterator1 last1, |
| 57 | 57 | InputIterator2 first2, T init, |
| 58 | 58 | BinaryOperation1 binary_op1, BinaryOperation2 binary_op2); // C++17 |
| 59 | 59 | |
| 60 | 60 | template<class InputIterator, class T, class BinaryOperation, class UnaryOperation> |
| 61 | T | |
| 61 | constexpr T // constexpr since C++20 | |
| 62 | 62 | transform_reduce(InputIterator first, InputIterator last, T init, |
| 63 | 63 | BinaryOperation binary_op, UnaryOperation unary_op); // C++17 |
| 64 | 64 | |
| 65 | 65 | template <class InputIterator, class OutputIterator> |
| 66 | OutputIterator | |
| 66 | constexpr OutputIterator // constexpr since C++20 | |
| 67 | 67 | partial_sum(InputIterator first, InputIterator last, OutputIterator result); |
| 68 | 68 | |
| 69 | 69 | template <class InputIterator, class OutputIterator, class BinaryOperation> |
| 70 | OutputIterator | |
| 70 | constexpr OutputIterator // constexpr since C++20 | |
| 71 | 71 | partial_sum(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op); |
| 72 | 72 | |
| 73 | 73 | template<class InputIterator, class OutputIterator, class T> |
| 74 | OutputIterator | |
| 74 | constexpr OutputIterator // constexpr since C++20 | |
| 75 | 75 | exclusive_scan(InputIterator first, InputIterator last, |
| 76 | 76 | OutputIterator result, T init); // C++17 |
| 77 | 77 | |
| 78 | 78 | template<class InputIterator, class OutputIterator, class T, class BinaryOperation> |
| 79 | OutputIterator | |
| 79 | constexpr OutputIterator // constexpr since C++20 | |
| 80 | 80 | exclusive_scan(InputIterator first, InputIterator last, |
| 81 | 81 | OutputIterator result, T init, BinaryOperation binary_op); // C++17 |
| 82 | 82 | |
| 83 | 83 | template<class InputIterator, class OutputIterator> |
| 84 | OutputIterator | |
| 84 | constexpr OutputIterator // constexpr since C++20 | |
| 85 | 85 | inclusive_scan(InputIterator first, InputIterator last, OutputIterator result); // C++17 |
| 86 | 86 | |
| 87 | 87 | template<class InputIterator, class OutputIterator, class BinaryOperation> |
| 88 | OutputIterator | |
| 88 | constexpr OutputIterator // constexpr since C++20 | |
| 89 | 89 | inclusive_scan(InputIterator first, InputIterator last, |
| 90 | 90 | OutputIterator result, BinaryOperation binary_op); // C++17 |
| 91 | 91 | |
| 92 | 92 | template<class InputIterator, class OutputIterator, class BinaryOperation, class T> |
| 93 | OutputIterator | |
| 93 | constexpr OutputIterator // constexpr since C++20 | |
| 94 | 94 | inclusive_scan(InputIterator first, InputIterator last, |
| 95 | 95 | OutputIterator result, BinaryOperation binary_op, T init); // C++17 |
| 96 | 96 | |
| 97 | 97 | template<class InputIterator, class OutputIterator, class T, |
| 98 | 98 | class BinaryOperation, class UnaryOperation> |
| 99 | OutputIterator | |
| 99 | constexpr OutputIterator // constexpr since C++20 | |
| 100 | 100 | transform_exclusive_scan(InputIterator first, InputIterator last, |
| 101 | 101 | OutputIterator result, T init, |
| 102 | 102 | BinaryOperation binary_op, UnaryOperation unary_op); // C++17 |
| 103 | 103 | |
| 104 | 104 | template<class InputIterator, class OutputIterator, |
| 105 | 105 | class BinaryOperation, class UnaryOperation> |
| 106 | OutputIterator | |
| 106 | constexpr OutputIterator // constexpr since C++20 | |
| 107 | 107 | transform_inclusive_scan(InputIterator first, InputIterator last, |
| 108 | 108 | OutputIterator result, |
| 109 | 109 | BinaryOperation binary_op, UnaryOperation unary_op); // C++17 |
| 110 | 110 | |
| 111 | 111 | template<class InputIterator, class OutputIterator, |
| 112 | 112 | class BinaryOperation, class UnaryOperation, class T> |
| 113 | OutputIterator | |
| 113 | constexpr OutputIterator // constexpr since C++20 | |
| 114 | 114 | transform_inclusive_scan(InputIterator first, InputIterator last, |
| 115 | 115 | OutputIterator result, |
| 116 | 116 | BinaryOperation binary_op, UnaryOperation unary_op, |
| 117 | 117 | T init); // C++17 |
| 118 | 118 | |
| 119 | 119 | template <class InputIterator, class OutputIterator> |
| 120 | OutputIterator | |
| 120 | constexpr OutputIterator // constexpr since C++20 | |
| 121 | 121 | adjacent_difference(InputIterator first, InputIterator last, OutputIterator result); |
| 122 | 122 | |
| 123 | 123 | template <class InputIterator, class OutputIterator, class BinaryOperation> |
| 124 | OutputIterator | |
| 124 | constexpr OutputIterator // constexpr since C++20 | |
| 125 | 125 | adjacent_difference(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op); |
| 126 | 126 | |
| 127 | 127 | template <class ForwardIterator, class T> |
| 128 | void iota(ForwardIterator first, ForwardIterator last, T value); | |
| 128 | constexpr void // constexpr since C++20 | |
| 129 | iota(ForwardIterator first, ForwardIterator last, T value); | |
| 129 | 130 | |
| 130 | 131 | template <class M, class N> |
| 131 | 132 | constexpr common_type_t<M,N> gcd(M m, N n); // C++17 |
| ... | ... | @@ -133,9 +134,11 @@ template <class M, class N> |
| 133 | 134 | template <class M, class N> |
| 134 | 135 | constexpr common_type_t<M,N> lcm(M m, N n); // C++17 |
| 135 | 136 | |
| 136 | integer midpoint(integer a, integer b); // C++20 | |
| 137 | pointer midpoint(pointer a, pointer b); // C++20 | |
| 138 | floating_point midpoint(floating_point a, floating_point b); // C++20 | |
| 137 | template<class T> | |
| 138 | constexpr T midpoint(T a, T b) noexcept; // C++20 | |
| 139 | ||
| 140 | template<class T> | |
| 141 | constexpr T* midpoint(T* a, T* b); // C++20 | |
| 139 | 142 | |
| 140 | 143 | } // std |
| 141 | 144 | |
| ... | ... | @@ -158,28 +161,36 @@ _LIBCPP_PUSH_MACROS |
| 158 | 161 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 159 | 162 | |
| 160 | 163 | template <class _InputIterator, class _Tp> |
| 161 | inline _LIBCPP_INLINE_VISIBILITY | |
| 164 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 162 | 165 | _Tp |
| 163 | 166 | accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) |
| 164 | 167 | { |
| 165 | 168 | for (; __first != __last; ++__first) |
| 169 | #if _LIBCPP_STD_VER > 17 | |
| 170 | __init = _VSTD::move(__init) + *__first; | |
| 171 | #else | |
| 166 | 172 | __init = __init + *__first; |
| 173 | #endif | |
| 167 | 174 | return __init; |
| 168 | 175 | } |
| 169 | 176 | |
| 170 | 177 | template <class _InputIterator, class _Tp, class _BinaryOperation> |
| 171 | inline _LIBCPP_INLINE_VISIBILITY | |
| 178 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 172 | 179 | _Tp |
| 173 | 180 | accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op) |
| 174 | 181 | { |
| 175 | 182 | for (; __first != __last; ++__first) |
| 183 | #if _LIBCPP_STD_VER > 17 | |
| 184 | __init = __binary_op(_VSTD::move(__init), *__first); | |
| 185 | #else | |
| 176 | 186 | __init = __binary_op(__init, *__first); |
| 187 | #endif | |
| 177 | 188 | return __init; |
| 178 | 189 | } |
| 179 | 190 | |
| 180 | 191 | #if _LIBCPP_STD_VER > 14 |
| 181 | 192 | template <class _InputIterator, class _Tp, class _BinaryOp> |
| 182 | inline _LIBCPP_INLINE_VISIBILITY | |
| 193 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 183 | 194 | _Tp |
| 184 | 195 | reduce(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOp __b) |
| 185 | 196 | { |
| ... | ... | @@ -189,7 +200,7 @@ reduce(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOp __b) |
| 189 | 200 | } |
| 190 | 201 | |
| 191 | 202 | template <class _InputIterator, class _Tp> |
| 192 | inline _LIBCPP_INLINE_VISIBILITY | |
| 203 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 193 | 204 | _Tp |
| 194 | 205 | reduce(_InputIterator __first, _InputIterator __last, _Tp __init) |
| 195 | 206 | { |
| ... | ... | @@ -197,7 +208,7 @@ reduce(_InputIterator __first, _InputIterator __last, _Tp __init) |
| 197 | 208 | } |
| 198 | 209 | |
| 199 | 210 | template <class _InputIterator> |
| 200 | inline _LIBCPP_INLINE_VISIBILITY | |
| 211 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 201 | 212 | typename iterator_traits<_InputIterator>::value_type |
| 202 | 213 | reduce(_InputIterator __first, _InputIterator __last) |
| 203 | 214 | { |
| ... | ... | @@ -207,29 +218,37 @@ reduce(_InputIterator __first, _InputIterator __last) |
| 207 | 218 | #endif |
| 208 | 219 | |
| 209 | 220 | template <class _InputIterator1, class _InputIterator2, class _Tp> |
| 210 | inline _LIBCPP_INLINE_VISIBILITY | |
| 221 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 211 | 222 | _Tp |
| 212 | 223 | inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) |
| 213 | 224 | { |
| 214 | 225 | for (; __first1 != __last1; ++__first1, (void) ++__first2) |
| 226 | #if _LIBCPP_STD_VER > 17 | |
| 227 | __init = _VSTD::move(__init) + *__first1 * *__first2; | |
| 228 | #else | |
| 215 | 229 | __init = __init + *__first1 * *__first2; |
| 230 | #endif | |
| 216 | 231 | return __init; |
| 217 | 232 | } |
| 218 | 233 | |
| 219 | 234 | template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2> |
| 220 | inline _LIBCPP_INLINE_VISIBILITY | |
| 235 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 221 | 236 | _Tp |
| 222 | 237 | inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, |
| 223 | 238 | _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2) |
| 224 | 239 | { |
| 225 | 240 | for (; __first1 != __last1; ++__first1, (void) ++__first2) |
| 241 | #if _LIBCPP_STD_VER > 17 | |
| 242 | __init = __binary_op1(_VSTD::move(__init), __binary_op2(*__first1, *__first2)); | |
| 243 | #else | |
| 226 | 244 | __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); |
| 245 | #endif | |
| 227 | 246 | return __init; |
| 228 | 247 | } |
| 229 | 248 | |
| 230 | 249 | #if _LIBCPP_STD_VER > 14 |
| 231 | 250 | template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp> |
| 232 | inline _LIBCPP_INLINE_VISIBILITY | |
| 251 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 233 | 252 | _Tp |
| 234 | 253 | transform_reduce(_InputIterator __first, _InputIterator __last, |
| 235 | 254 | _Tp __init, _BinaryOp __b, _UnaryOp __u) |
| ... | ... | @@ -241,7 +260,7 @@ transform_reduce(_InputIterator __first, _InputIterator __last, |
| 241 | 260 | |
| 242 | 261 | template <class _InputIterator1, class _InputIterator2, |
| 243 | 262 | class _Tp, class _BinaryOp1, class _BinaryOp2> |
| 244 | inline _LIBCPP_INLINE_VISIBILITY | |
| 263 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 245 | 264 | _Tp |
| 246 | 265 | transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, |
| 247 | 266 | _InputIterator2 __first2, _Tp __init, _BinaryOp1 __b1, _BinaryOp2 __b2) |
| ... | ... | @@ -252,7 +271,7 @@ transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, |
| 252 | 271 | } |
| 253 | 272 | |
| 254 | 273 | template <class _InputIterator1, class _InputIterator2, class _Tp> |
| 255 | inline _LIBCPP_INLINE_VISIBILITY | |
| 274 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 256 | 275 | _Tp |
| 257 | 276 | transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, |
| 258 | 277 | _InputIterator2 __first2, _Tp __init) |
| ... | ... | @@ -263,7 +282,7 @@ transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, |
| 263 | 282 | #endif |
| 264 | 283 | |
| 265 | 284 | template <class _InputIterator, class _OutputIterator> |
| 266 | inline _LIBCPP_INLINE_VISIBILITY | |
| 285 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 267 | 286 | _OutputIterator |
| 268 | 287 | partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) |
| 269 | 288 | { |
| ... | ... | @@ -273,7 +292,11 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res |
| 273 | 292 | *__result = __t; |
| 274 | 293 | for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) |
| 275 | 294 | { |
| 295 | #if _LIBCPP_STD_VER > 17 | |
| 296 | __t = _VSTD::move(__t) + *__first; | |
| 297 | #else | |
| 276 | 298 | __t = __t + *__first; |
| 299 | #endif | |
| 277 | 300 | *__result = __t; |
| 278 | 301 | } |
| 279 | 302 | } |
| ... | ... | @@ -281,7 +304,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res |
| 281 | 304 | } |
| 282 | 305 | |
| 283 | 306 | template <class _InputIterator, class _OutputIterator, class _BinaryOperation> |
| 284 | inline _LIBCPP_INLINE_VISIBILITY | |
| 307 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 285 | 308 | _OutputIterator |
| 286 | 309 | partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, |
| 287 | 310 | _BinaryOperation __binary_op) |
| ... | ... | @@ -292,7 +315,11 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res |
| 292 | 315 | *__result = __t; |
| 293 | 316 | for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) |
| 294 | 317 | { |
| 318 | #if _LIBCPP_STD_VER > 17 | |
| 319 | __t = __binary_op(_VSTD::move(__t), *__first); | |
| 320 | #else | |
| 295 | 321 | __t = __binary_op(__t, *__first); |
| 322 | #endif | |
| 296 | 323 | *__result = __t; |
| 297 | 324 | } |
| 298 | 325 | } |
| ... | ... | @@ -301,27 +328,30 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res |
| 301 | 328 | |
| 302 | 329 | #if _LIBCPP_STD_VER > 14 |
| 303 | 330 | template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp> |
| 304 | inline _LIBCPP_INLINE_VISIBILITY | |
| 331 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 305 | 332 | _OutputIterator |
| 306 | 333 | exclusive_scan(_InputIterator __first, _InputIterator __last, |
| 307 | 334 | _OutputIterator __result, _Tp __init, _BinaryOp __b) |
| 308 | 335 | { |
| 309 | 336 | if (__first != __last) |
| 310 | 337 | { |
| 311 | _Tp __saved = __init; | |
| 312 | do | |
| 338 | _Tp __tmp(__b(__init, *__first)); | |
| 339 | while (true) | |
| 313 | 340 | { |
| 314 | __init = __b(__init, *__first); | |
| 315 | *__result = __saved; | |
| 316 | __saved = __init; | |
| 341 | *__result = _VSTD::move(__init); | |
| 317 | 342 | ++__result; |
| 318 | } while (++__first != __last); | |
| 343 | ++__first; | |
| 344 | if (__first == __last) | |
| 345 | break; | |
| 346 | __init = _VSTD::move(__tmp); | |
| 347 | __tmp = __b(__init, *__first); | |
| 348 | } | |
| 319 | 349 | } |
| 320 | 350 | return __result; |
| 321 | 351 | } |
| 322 | 352 | |
| 323 | 353 | template <class _InputIterator, class _OutputIterator, class _Tp> |
| 324 | inline _LIBCPP_INLINE_VISIBILITY | |
| 354 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 325 | 355 | _OutputIterator |
| 326 | 356 | exclusive_scan(_InputIterator __first, _InputIterator __last, |
| 327 | 357 | _OutputIterator __result, _Tp __init) |
| ... | ... | @@ -330,40 +360,43 @@ exclusive_scan(_InputIterator __first, _InputIterator __last, |
| 330 | 360 | } |
| 331 | 361 | |
| 332 | 362 | template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp> |
| 363 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 333 | 364 | _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, |
| 334 | 365 | _OutputIterator __result, _BinaryOp __b, _Tp __init) |
| 335 | 366 | { |
| 336 | 367 | for (; __first != __last; ++__first, (void) ++__result) { |
| 337 | 368 | __init = __b(__init, *__first); |
| 338 | 369 | *__result = __init; |
| 339 | } | |
| 370 | } | |
| 340 | 371 | return __result; |
| 341 | 372 | } |
| 342 | 373 | |
| 343 | 374 | template <class _InputIterator, class _OutputIterator, class _BinaryOp> |
| 375 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 344 | 376 | _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, |
| 345 | 377 | _OutputIterator __result, _BinaryOp __b) |
| 346 | 378 | { |
| 347 | 379 | if (__first != __last) { |
| 348 | typename std::iterator_traits<_InputIterator>::value_type __init = *__first; | |
| 380 | typename iterator_traits<_InputIterator>::value_type __init = *__first; | |
| 349 | 381 | *__result++ = __init; |
| 350 | 382 | if (++__first != __last) |
| 351 | 383 | return _VSTD::inclusive_scan(__first, __last, __result, __b, __init); |
| 352 | } | |
| 384 | } | |
| 353 | 385 | |
| 354 | 386 | return __result; |
| 355 | 387 | } |
| 356 | 388 | |
| 357 | 389 | template <class _InputIterator, class _OutputIterator> |
| 390 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 358 | 391 | _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, |
| 359 | 392 | _OutputIterator __result) |
| 360 | 393 | { |
| 361 | return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>()); | |
| 394 | return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>()); | |
| 362 | 395 | } |
| 363 | 396 | |
| 364 | 397 | template <class _InputIterator, class _OutputIterator, class _Tp, |
| 365 | 398 | class _BinaryOp, class _UnaryOp> |
| 366 | inline _LIBCPP_INLINE_VISIBILITY | |
| 399 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 367 | 400 | _OutputIterator |
| 368 | 401 | transform_exclusive_scan(_InputIterator __first, _InputIterator __last, |
| 369 | 402 | _OutputIterator __result, _Tp __init, |
| ... | ... | @@ -384,7 +417,9 @@ transform_exclusive_scan(_InputIterator __first, _InputIterator __last, |
| 384 | 417 | } |
| 385 | 418 | |
| 386 | 419 | template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp, class _UnaryOp> |
| 387 | _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, | |
| 420 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 421 | _OutputIterator | |
| 422 | transform_inclusive_scan(_InputIterator __first, _InputIterator __last, | |
| 388 | 423 | _OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init) |
| 389 | 424 | { |
| 390 | 425 | for (; __first != __last; ++__first, (void) ++__result) { |
| ... | ... | @@ -396,61 +431,71 @@ _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator |
| 396 | 431 | } |
| 397 | 432 | |
| 398 | 433 | template <class _InputIterator, class _OutputIterator, class _BinaryOp, class _UnaryOp> |
| 399 | _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, | |
| 434 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 435 | _OutputIterator | |
| 436 | transform_inclusive_scan(_InputIterator __first, _InputIterator __last, | |
| 400 | 437 | _OutputIterator __result, _BinaryOp __b, _UnaryOp __u) |
| 401 | 438 | { |
| 402 | 439 | if (__first != __last) { |
| 403 | typename std::iterator_traits<_InputIterator>::value_type __init = __u(*__first); | |
| 440 | typename iterator_traits<_InputIterator>::value_type __init = __u(*__first); | |
| 404 | 441 | *__result++ = __init; |
| 405 | 442 | if (++__first != __last) |
| 406 | 443 | return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); |
| 407 | } | |
| 444 | } | |
| 408 | 445 | |
| 409 | 446 | return __result; |
| 410 | 447 | } |
| 411 | 448 | #endif |
| 412 | 449 | |
| 413 | 450 | template <class _InputIterator, class _OutputIterator> |
| 414 | inline _LIBCPP_INLINE_VISIBILITY | |
| 451 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 415 | 452 | _OutputIterator |
| 416 | 453 | adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result) |
| 417 | 454 | { |
| 418 | 455 | if (__first != __last) |
| 419 | 456 | { |
| 420 | typename iterator_traits<_InputIterator>::value_type __t1(*__first); | |
| 421 | *__result = __t1; | |
| 457 | typename iterator_traits<_InputIterator>::value_type __acc(*__first); | |
| 458 | *__result = __acc; | |
| 422 | 459 | for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) |
| 423 | 460 | { |
| 424 | typename iterator_traits<_InputIterator>::value_type __t2(*__first); | |
| 425 | *__result = __t2 - __t1; | |
| 426 | __t1 = _VSTD::move(__t2); | |
| 461 | typename iterator_traits<_InputIterator>::value_type __val(*__first); | |
| 462 | #if _LIBCPP_STD_VER > 17 | |
| 463 | *__result = __val - _VSTD::move(__acc); | |
| 464 | #else | |
| 465 | *__result = __val - __acc; | |
| 466 | #endif | |
| 467 | __acc = _VSTD::move(__val); | |
| 427 | 468 | } |
| 428 | 469 | } |
| 429 | 470 | return __result; |
| 430 | 471 | } |
| 431 | 472 | |
| 432 | 473 | template <class _InputIterator, class _OutputIterator, class _BinaryOperation> |
| 433 | inline _LIBCPP_INLINE_VISIBILITY | |
| 474 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 434 | 475 | _OutputIterator |
| 435 | 476 | adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, |
| 436 | 477 | _BinaryOperation __binary_op) |
| 437 | 478 | { |
| 438 | 479 | if (__first != __last) |
| 439 | 480 | { |
| 440 | typename iterator_traits<_InputIterator>::value_type __t1(*__first); | |
| 441 | *__result = __t1; | |
| 481 | typename iterator_traits<_InputIterator>::value_type __acc(*__first); | |
| 482 | *__result = __acc; | |
| 442 | 483 | for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) |
| 443 | 484 | { |
| 444 | typename iterator_traits<_InputIterator>::value_type __t2(*__first); | |
| 445 | *__result = __binary_op(__t2, __t1); | |
| 446 | __t1 = _VSTD::move(__t2); | |
| 485 | typename iterator_traits<_InputIterator>::value_type __val(*__first); | |
| 486 | #if _LIBCPP_STD_VER > 17 | |
| 487 | *__result = __binary_op(__val, _VSTD::move(__acc)); | |
| 488 | #else | |
| 489 | *__result = __binary_op(__val, __acc); | |
| 490 | #endif | |
| 491 | __acc = _VSTD::move(__val); | |
| 447 | 492 | } |
| 448 | 493 | } |
| 449 | 494 | return __result; |
| 450 | 495 | } |
| 451 | 496 | |
| 452 | 497 | template <class _ForwardIterator, class _Tp> |
| 453 | inline _LIBCPP_INLINE_VISIBILITY | |
| 498 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 454 | 499 | void |
| 455 | 500 | iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value_) |
| 456 | 501 | { |
| ... | ... | @@ -467,9 +512,9 @@ struct __ct_abs<_Result, _Source, true> { |
| 467 | 512 | _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY |
| 468 | 513 | _Result operator()(_Source __t) const noexcept |
| 469 | 514 | { |
| 470 | if (__t >= 0) return __t; | |
| 471 | if (__t == numeric_limits<_Source>::min()) return -static_cast<_Result>(__t); | |
| 472 | return -__t; | |
| 515 | if (__t >= 0) return __t; | |
| 516 | if (__t == numeric_limits<_Source>::min()) return -static_cast<_Result>(__t); | |
| 517 | return -__t; | |
| 473 | 518 | } |
| 474 | 519 | }; |
| 475 | 520 | |
| ... | ... | @@ -531,8 +576,8 @@ enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_T |
| 531 | 576 | midpoint(_Tp __a, _Tp __b) noexcept |
| 532 | 577 | _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK |
| 533 | 578 | { |
| 534 | using _Up = std::make_unsigned_t<_Tp>; | |
| 535 | constexpr _Up __bitshift = std::numeric_limits<_Up>::digits - 1; | |
| 579 | using _Up = make_unsigned_t<_Tp>; | |
| 580 | constexpr _Up __bitshift = numeric_limits<_Up>::digits - 1; | |
| 536 | 581 | |
| 537 | 582 | _Up __diff = _Up(__b) - _Up(__a); |
| 538 | 583 | _Up __sign_bit = __b < __a; |
lib/libcxx/include/optional+3-2| ... | ... | @@ -147,6 +147,7 @@ template<class T> |
| 147 | 147 | */ |
| 148 | 148 | |
| 149 | 149 | #include <__config> |
| 150 | #include <__availability> | |
| 150 | 151 | #include <__debug> |
| 151 | 152 | #include <__functional_base> |
| 152 | 153 | #include <functional> |
| ... | ... | @@ -320,7 +321,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp> |
| 320 | 321 | void __construct(_Args&&... __args) |
| 321 | 322 | { |
| 322 | 323 | _LIBCPP_ASSERT(!has_value(), "__construct called for engaged __optional_storage"); |
| 323 | ::new((void*)_VSTD::addressof(this->__val_)) value_type(_VSTD::forward<_Args>(__args)...); | |
| 324 | ::new ((void*)_VSTD::addressof(this->__val_)) value_type(_VSTD::forward<_Args>(__args)...); | |
| 324 | 325 | this->__engaged_ = true; |
| 325 | 326 | } |
| 326 | 327 | |
| ... | ... | @@ -656,7 +657,7 @@ private: |
| 656 | 657 | } |
| 657 | 658 | template <class _Up, class _QUp = _QualUp> |
| 658 | 659 | static constexpr bool __enable_assign() { |
| 659 | // Construction and assignability of _Qup to _Tp has already been | |
| 660 | // Construction and assignability of _QUp to _Tp has already been | |
| 660 | 661 | // checked. |
| 661 | 662 | return !__check_constructible_from_opt<_Up>::value && |
| 662 | 663 | !__check_assignable_from_opt<_Up>::value; |
lib/libcxx/include/ostream+15-13| ... | ... | @@ -126,9 +126,8 @@ template <class charT, class traits> |
| 126 | 126 | basic_ostream<charT,traits>& flush(basic_ostream<charT,traits>& os); |
| 127 | 127 | |
| 128 | 128 | // rvalue stream insertion |
| 129 | template <class charT, class traits, class T> | |
| 130 | basic_ostream<charT, traits>& | |
| 131 | operator<<(basic_ostream<charT, traits>&& os, const T& x); | |
| 129 | template <class Stream, class T> | |
| 130 | Stream&& operator<<(Stream&& os, const T& x); | |
| 132 | 131 | |
| 133 | 132 | } // std |
| 134 | 133 | |
| ... | ... | @@ -1028,15 +1027,20 @@ flush(basic_ostream<_CharT, _Traits>& __os) |
| 1028 | 1027 | |
| 1029 | 1028 | #ifndef _LIBCPP_CXX03_LANG |
| 1030 | 1029 | |
| 1030 | template <class _Stream, class _Tp, class = void> | |
| 1031 | struct __is_ostreamable : false_type { }; | |
| 1032 | ||
| 1031 | 1033 | template <class _Stream, class _Tp> |
| 1032 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1033 | typename enable_if | |
| 1034 | < | |
| 1035 | !is_lvalue_reference<_Stream>::value && | |
| 1036 | is_base_of<ios_base, _Stream>::value, | |
| 1037 | _Stream&& | |
| 1038 | >::type | |
| 1039 | operator<<(_Stream&& __os, const _Tp& __x) | |
| 1034 | struct __is_ostreamable<_Stream, _Tp, decltype( | |
| 1035 | _VSTD::declval<_Stream>() << _VSTD::declval<_Tp>(), void() | |
| 1036 | )> : true_type { }; | |
| 1037 | ||
| 1038 | template <class _Stream, class _Tp, class = typename enable_if< | |
| 1039 | _And<is_base_of<ios_base, _Stream>, | |
| 1040 | __is_ostreamable<_Stream&, const _Tp&>>::value | |
| 1041 | >::type> | |
| 1042 | _LIBCPP_INLINE_VISIBILITY | |
| 1043 | _Stream&& operator<<(_Stream&& __os, const _Tp& __x) | |
| 1040 | 1044 | { |
| 1041 | 1045 | __os << __x; |
| 1042 | 1046 | return _VSTD::move(__os); |
| ... | ... | @@ -1097,10 +1101,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x) |
| 1097 | 1101 | use_facet<ctype<_CharT> >(__os.getloc()).widen('1')); |
| 1098 | 1102 | } |
| 1099 | 1103 | |
| 1100 | #ifndef _LIBCPP_DO_NOT_ASSUME_STREAMS_EXPLICIT_INSTANTIATION_IN_DYLIB | |
| 1101 | 1104 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>) |
| 1102 | 1105 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>) |
| 1103 | #endif | |
| 1104 | 1106 | |
| 1105 | 1107 | _LIBCPP_END_NAMESPACE_STD |
| 1106 | 1108 |
lib/libcxx/include/queue+6-13| ... | ... | @@ -112,18 +112,11 @@ protected: |
| 112 | 112 | Compare comp; |
| 113 | 113 | |
| 114 | 114 | public: |
| 115 | priority_queue() = default; | |
| 116 | ~priority_queue() = default; | |
| 117 | ||
| 118 | priority_queue(const priority_queue& q) = default; | |
| 119 | priority_queue(priority_queue&& q) = default; | |
| 120 | ||
| 121 | priority_queue& operator=(const priority_queue& q) = default; | |
| 122 | priority_queue& operator=(priority_queue&& q) = default; | |
| 123 | ||
| 124 | explicit priority_queue(const Compare& comp); | |
| 125 | priority_queue(const Compare& comp, const container_type& c); | |
| 126 | explicit priority_queue(const Compare& comp, container_type&& c); | |
| 115 | priority_queue() : priority_queue(Compare()) {} // C++20 | |
| 116 | explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {} | |
| 117 | priority_queue(const Compare& x, const Container&); | |
| 118 | explicit priority_queue(const Compare& x = Compare(), Container&&= Container()); // before C++20 | |
| 119 | priority_queue(const Compare& x, Container&&); // C++20 | |
| 127 | 120 | template <class InputIterator> |
| 128 | 121 | priority_queue(InputIterator first, InputIterator last, |
| 129 | 122 | const Compare& comp = Compare()); |
| ... | ... | @@ -474,7 +467,7 @@ public: |
| 474 | 467 | priority_queue(const value_compare& __comp, const container_type& __c); |
| 475 | 468 | #ifndef _LIBCPP_CXX03_LANG |
| 476 | 469 | _LIBCPP_INLINE_VISIBILITY |
| 477 | explicit priority_queue(const value_compare& __comp, container_type&& __c); | |
| 470 | priority_queue(const value_compare& __comp, container_type&& __c); | |
| 478 | 471 | #endif |
| 479 | 472 | template <class _InputIter> |
| 480 | 473 | _LIBCPP_INLINE_VISIBILITY |
lib/libcxx/include/random+385-113| ... | ... | @@ -36,7 +36,9 @@ public: |
| 36 | 36 | static constexpr result_type default_seed = 1u; |
| 37 | 37 | |
| 38 | 38 | // constructors and seeding functions |
| 39 | explicit linear_congruential_engine(result_type s = default_seed); | |
| 39 | explicit linear_congruential_engine(result_type s = default_seed); // before C++20 | |
| 40 | linear_congruential_engine() : linear_congruential_engine(default_seed) {} // C++20 | |
| 41 | explicit linear_congruential_engine(result_type s); // C++20 | |
| 40 | 42 | template<class Sseq> explicit linear_congruential_engine(Sseq& q); |
| 41 | 43 | void seed(result_type s = default_seed); |
| 42 | 44 | template<class Sseq> void seed(Sseq& q); |
| ... | ... | @@ -96,7 +98,9 @@ public: |
| 96 | 98 | static constexpr result_type default_seed = 5489u; |
| 97 | 99 | |
| 98 | 100 | // constructors and seeding functions |
| 99 | explicit mersenne_twister_engine(result_type value = default_seed); | |
| 101 | explicit mersenne_twister_engine(result_type s = default_seed); // before C++20 | |
| 102 | mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} // C++20 | |
| 103 | explicit mersenne_twister_engine(result_type s); // C++20 | |
| 100 | 104 | template<class Sseq> explicit mersenne_twister_engine(Sseq& q); |
| 101 | 105 | void seed(result_type value = default_seed); |
| 102 | 106 | template<class Sseq> void seed(Sseq& q); |
| ... | ... | @@ -154,7 +158,9 @@ public: |
| 154 | 158 | static constexpr result_type default_seed = 19780503u; |
| 155 | 159 | |
| 156 | 160 | // constructors and seeding functions |
| 157 | explicit subtract_with_carry_engine(result_type value = default_seed); | |
| 161 | explicit subtract_with_carry_engine(result_type value = default_seed); // before C++20 | |
| 162 | subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} // C++20 | |
| 163 | explicit subtract_with_carry_engine(result_type value); // C++20 | |
| 158 | 164 | template<class Sseq> explicit subtract_with_carry_engine(Sseq& q); |
| 159 | 165 | void seed(result_type value = default_seed); |
| 160 | 166 | template<class Sseq> void seed(Sseq& q); |
| ... | ... | @@ -385,7 +391,9 @@ public: |
| 385 | 391 | static constexpr result_type max() { return numeric_limits<result_type>::max(); } |
| 386 | 392 | |
| 387 | 393 | // constructors |
| 388 | explicit random_device(const string& token = "/dev/urandom"); | |
| 394 | explicit random_device(const string& token = implementation-defined); // before C++20 | |
| 395 | random_device() : random_device(implementation-defined) {} // C++20 | |
| 396 | explicit random_device(const string& token); // C++20 | |
| 389 | 397 | |
| 390 | 398 | // generating functions |
| 391 | 399 | result_type operator()(); |
| ... | ... | @@ -456,7 +464,10 @@ public: |
| 456 | 464 | |
| 457 | 465 | // constructors and reset functions |
| 458 | 466 | explicit uniform_int_distribution(IntType a = 0, |
| 459 | IntType b = numeric_limits<IntType>::max()); | |
| 467 | IntType b = numeric_limits<IntType>::max()); // before C++20 | |
| 468 | uniform_int_distribution() : uniform_int_distribution(0) {} // C++20 | |
| 469 | explicit uniform_int_distribution(IntType a, | |
| 470 | IntType b = numeric_limits<IntType>::max()); // C++20 | |
| 460 | 471 | explicit uniform_int_distribution(const param_type& parm); |
| 461 | 472 | void reset(); |
| 462 | 473 | |
| ... | ... | @@ -515,7 +526,9 @@ public: |
| 515 | 526 | }; |
| 516 | 527 | |
| 517 | 528 | // constructors and reset functions |
| 518 | explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0); | |
| 529 | explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0); // before C++20 | |
| 530 | uniform_real_distribution() : uniform_real_distribution(0.0) {} // C++20 | |
| 531 | explicit uniform_real_distribution(RealType a, RealType b = 1.0); // C++20 | |
| 519 | 532 | explicit uniform_real_distribution(const param_type& parm); |
| 520 | 533 | void reset(); |
| 521 | 534 | |
| ... | ... | @@ -571,7 +584,9 @@ public: |
| 571 | 584 | }; |
| 572 | 585 | |
| 573 | 586 | // constructors and reset functions |
| 574 | explicit bernoulli_distribution(double p = 0.5); | |
| 587 | explicit bernoulli_distribution(double p = 0.5); // before C++20 | |
| 588 | bernoulli_distribution() : bernoulli_distribution(0.5) {} // C++20 | |
| 589 | explicit bernoulli_distribution(double p); // C++20 | |
| 575 | 590 | explicit bernoulli_distribution(const param_type& parm); |
| 576 | 591 | void reset(); |
| 577 | 592 | |
| ... | ... | @@ -628,7 +643,9 @@ public: |
| 628 | 643 | }; |
| 629 | 644 | |
| 630 | 645 | // constructors and reset functions |
| 631 | explicit binomial_distribution(IntType t = 1, double p = 0.5); | |
| 646 | explicit binomial_distribution(IntType t = 1, double p = 0.5); // before C++20 | |
| 647 | binomial_distribution() : binomial_distribution(1) {} // C++20 | |
| 648 | explicit binomial_distribution(IntType t, double p = 0.5); // C++20 | |
| 632 | 649 | explicit binomial_distribution(const param_type& parm); |
| 633 | 650 | void reset(); |
| 634 | 651 | |
| ... | ... | @@ -685,7 +702,9 @@ public: |
| 685 | 702 | }; |
| 686 | 703 | |
| 687 | 704 | // constructors and reset functions |
| 688 | explicit geometric_distribution(double p = 0.5); | |
| 705 | explicit geometric_distribution(double p = 0.5); // before C++20 | |
| 706 | geometric_distribution() : geometric_distribution(0.5) {} // C++20 | |
| 707 | explicit geometric_distribution(double p); // C++20 | |
| 689 | 708 | explicit geometric_distribution(const param_type& parm); |
| 690 | 709 | void reset(); |
| 691 | 710 | |
| ... | ... | @@ -742,7 +761,9 @@ public: |
| 742 | 761 | }; |
| 743 | 762 | |
| 744 | 763 | // constructor and reset functions |
| 745 | explicit negative_binomial_distribution(result_type k = 1, double p = 0.5); | |
| 764 | explicit negative_binomial_distribution(IntType k = 1, double p = 0.5); // before C++20 | |
| 765 | negative_binomial_distribution() : negative_binomial_distribution(1) {} // C++20 | |
| 766 | explicit negative_binomial_distribution(IntType k, double p = 0.5); // C++20 | |
| 746 | 767 | explicit negative_binomial_distribution(const param_type& parm); |
| 747 | 768 | void reset(); |
| 748 | 769 | |
| ... | ... | @@ -799,7 +820,9 @@ public: |
| 799 | 820 | }; |
| 800 | 821 | |
| 801 | 822 | // constructors and reset functions |
| 802 | explicit poisson_distribution(double mean = 1.0); | |
| 823 | explicit poisson_distribution(double mean = 1.0); // before C++20 | |
| 824 | poisson_distribution() : poisson_distribution(1.0) {} // C++20 | |
| 825 | explicit poisson_distribution(double mean); // C++20 | |
| 803 | 826 | explicit poisson_distribution(const param_type& parm); |
| 804 | 827 | void reset(); |
| 805 | 828 | |
| ... | ... | @@ -855,7 +878,9 @@ public: |
| 855 | 878 | }; |
| 856 | 879 | |
| 857 | 880 | // constructors and reset functions |
| 858 | explicit exponential_distribution(result_type lambda = 1.0); | |
| 881 | explicit exponential_distribution(RealType lambda = 1.0); // before C++20 | |
| 882 | exponential_distribution() : exponential_distribution(1.0) {} // C++20 | |
| 883 | explicit exponential_distribution(RealType lambda); // C++20 | |
| 859 | 884 | explicit exponential_distribution(const param_type& parm); |
| 860 | 885 | void reset(); |
| 861 | 886 | |
| ... | ... | @@ -912,7 +937,9 @@ public: |
| 912 | 937 | }; |
| 913 | 938 | |
| 914 | 939 | // constructors and reset functions |
| 915 | explicit gamma_distribution(result_type alpha = 1, result_type beta = 1); | |
| 940 | explicit gamma_distribution(RealType alpha = 0.0, RealType beta = 1.0); // before C++20 | |
| 941 | gamma_distribution() : gamma_distribution(0.0) {} // C++20 | |
| 942 | explicit gamma_distribution(RealType alpha, RealType beta = 1.0); // C++20 | |
| 916 | 943 | explicit gamma_distribution(const param_type& parm); |
| 917 | 944 | void reset(); |
| 918 | 945 | |
| ... | ... | @@ -970,7 +997,9 @@ public: |
| 970 | 997 | }; |
| 971 | 998 | |
| 972 | 999 | // constructor and reset functions |
| 973 | explicit weibull_distribution(result_type a = 1, result_type b = 1); | |
| 1000 | explicit weibull_distribution(RealType a = 1.0, RealType b = 1.0); // before C++20 | |
| 1001 | weibull_distribution() : weibull_distribution(1.0) {} // C++20 | |
| 1002 | explicit weibull_distribution(RealType a, RealType b = 1.0); // C++20 | |
| 974 | 1003 | explicit weibull_distribution(const param_type& parm); |
| 975 | 1004 | void reset(); |
| 976 | 1005 | |
| ... | ... | @@ -1028,7 +1057,9 @@ public: |
| 1028 | 1057 | }; |
| 1029 | 1058 | |
| 1030 | 1059 | // constructor and reset functions |
| 1031 | explicit extreme_value_distribution(result_type a = 0, result_type b = 1); | |
| 1060 | explicit extreme_value_distribution(RealType a = 0.0, RealType b = 1.0); // before C++20 | |
| 1061 | extreme_value_distribution() : extreme_value_distribution(0.0) {} // C++20 | |
| 1062 | explicit extreme_value_distribution(RealType a, RealType b = 1.0); // C++20 | |
| 1032 | 1063 | explicit extreme_value_distribution(const param_type& parm); |
| 1033 | 1064 | void reset(); |
| 1034 | 1065 | |
| ... | ... | @@ -1086,7 +1117,9 @@ public: |
| 1086 | 1117 | }; |
| 1087 | 1118 | |
| 1088 | 1119 | // constructors and reset functions |
| 1089 | explicit normal_distribution(result_type mean = 0, result_type stddev = 1); | |
| 1120 | explicit normal_distribution(RealType mean = 0.0, RealType stddev = 1.0); // before C++20 | |
| 1121 | normal_distribution() : normal_distribution(0.0) {} // C++20 | |
| 1122 | explicit normal_distribution(RealType mean, RealType stddev = 1.0); // C++20 | |
| 1090 | 1123 | explicit normal_distribution(const param_type& parm); |
| 1091 | 1124 | void reset(); |
| 1092 | 1125 | |
| ... | ... | @@ -1144,7 +1177,9 @@ public: |
| 1144 | 1177 | }; |
| 1145 | 1178 | |
| 1146 | 1179 | // constructor and reset functions |
| 1147 | explicit lognormal_distribution(result_type m = 0, result_type s = 1); | |
| 1180 | explicit lognormal_distribution(RealType mean = 0.0, RealType stddev = 1.0); // before C++20 | |
| 1181 | lognormal_distribution() : lognormal_distribution(0.0) {} // C++20 | |
| 1182 | explicit lognormal_distribution(RealType mean, RealType stddev = 1.0); // C++20 | |
| 1148 | 1183 | explicit lognormal_distribution(const param_type& parm); |
| 1149 | 1184 | void reset(); |
| 1150 | 1185 | |
| ... | ... | @@ -1201,7 +1236,9 @@ public: |
| 1201 | 1236 | }; |
| 1202 | 1237 | |
| 1203 | 1238 | // constructor and reset functions |
| 1204 | explicit chi_squared_distribution(result_type n = 1); | |
| 1239 | explicit chi_squared_distribution(RealType n = 1.0); // before C++20 | |
| 1240 | chi_squared_distribution() : chi_squared_distribution(1.0) {} // C++20 | |
| 1241 | explicit chi_squared_distribution(RealType n); // C++20 | |
| 1205 | 1242 | explicit chi_squared_distribution(const param_type& parm); |
| 1206 | 1243 | void reset(); |
| 1207 | 1244 | |
| ... | ... | @@ -1258,7 +1295,9 @@ public: |
| 1258 | 1295 | }; |
| 1259 | 1296 | |
| 1260 | 1297 | // constructor and reset functions |
| 1261 | explicit cauchy_distribution(result_type a = 0, result_type b = 1); | |
| 1298 | explicit cauchy_distribution(RealType a = 0.0, RealType b = 1.0); // before C++20 | |
| 1299 | cauchy_distribution() : cauchy_distribution(0.0) {} // C++20 | |
| 1300 | explicit cauchy_distribution(RealType a, RealType b = 1.0); // C++20 | |
| 1262 | 1301 | explicit cauchy_distribution(const param_type& parm); |
| 1263 | 1302 | void reset(); |
| 1264 | 1303 | |
| ... | ... | @@ -1316,7 +1355,9 @@ public: |
| 1316 | 1355 | }; |
| 1317 | 1356 | |
| 1318 | 1357 | // constructor and reset functions |
| 1319 | explicit fisher_f_distribution(result_type m = 1, result_type n = 1); | |
| 1358 | explicit fisher_f_distribution(RealType m = 1.0, RealType n = 1.0); // before C++20 | |
| 1359 | fisher_f_distribution() : fisher_f_distribution(1.0) {} // C++20 | |
| 1360 | explicit fisher_f_distribution(RealType m, RealType n = 1.0); // C++20 | |
| 1320 | 1361 | explicit fisher_f_distribution(const param_type& parm); |
| 1321 | 1362 | void reset(); |
| 1322 | 1363 | |
| ... | ... | @@ -1373,7 +1414,9 @@ public: |
| 1373 | 1414 | }; |
| 1374 | 1415 | |
| 1375 | 1416 | // constructor and reset functions |
| 1376 | explicit student_t_distribution(result_type n = 1); | |
| 1417 | explicit student_t_distribution(RealType n = 1.0); // before C++20 | |
| 1418 | student_t_distribution() : student_t_distribution(1.0) {} // C++20 | |
| 1419 | explicit student_t_distribution(RealType n); // C++20 | |
| 1377 | 1420 | explicit student_t_distribution(const param_type& parm); |
| 1378 | 1421 | void reset(); |
| 1379 | 1422 | |
| ... | ... | @@ -1642,8 +1685,7 @@ class piecewise_linear_distribution |
| 1642 | 1685 | #include <numeric> |
| 1643 | 1686 | #include <vector> |
| 1644 | 1687 | #include <string> |
| 1645 | #include <istream> | |
| 1646 | #include <ostream> | |
| 1688 | #include <iosfwd> | |
| 1647 | 1689 | |
| 1648 | 1690 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 1649 | 1691 | #pragma GCC system_header |
| ... | ... | @@ -1669,7 +1711,23 @@ struct __is_seed_sequence |
| 1669 | 1711 | |
| 1670 | 1712 | template <unsigned long long __a, unsigned long long __c, |
| 1671 | 1713 | unsigned long long __m, unsigned long long _Mp, |
| 1672 | bool _MightOverflow = (__a != 0 && __m != 0 && __m-1 > (_Mp-__c)/__a)> | |
| 1714 | bool _MightOverflow = (__a != 0 && __m != 0 && __m-1 > (_Mp-__c)/__a), | |
| 1715 | bool _OverflowOK = ((__m|__m-1) > __m), // m = 2^n | |
| 1716 | bool _SchrageOK = (__a != 0 && __m != 0 && __m % __a <= __m / __a)> // r <= q | |
| 1717 | struct __lce_alg_picker | |
| 1718 | { | |
| 1719 | static_assert(__a != 0 || __m != 0 || !_MightOverflow || _OverflowOK || _SchrageOK, | |
| 1720 | "The current values of a, c, and m cannot generate a number " | |
| 1721 | "within bounds of linear_congruential_engine."); | |
| 1722 | ||
| 1723 | static _LIBCPP_CONSTEXPR const bool __use_schrage = _MightOverflow && | |
| 1724 | !_OverflowOK && | |
| 1725 | _SchrageOK; | |
| 1726 | }; | |
| 1727 | ||
| 1728 | template <unsigned long long __a, unsigned long long __c, | |
| 1729 | unsigned long long __m, unsigned long long _Mp, | |
| 1730 | bool _UseSchrage = __lce_alg_picker<__a, __c, __m, _Mp>::__use_schrage> | |
| 1673 | 1731 | struct __lce_ta; |
| 1674 | 1732 | |
| 1675 | 1733 | // 64 |
| ... | ... | @@ -1843,6 +1901,7 @@ private: |
| 1843 | 1901 | |
| 1844 | 1902 | static_assert(__m == 0 || __a < __m, "linear_congruential_engine invalid parameters"); |
| 1845 | 1903 | static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters"); |
| 1904 | static_assert(_VSTD::is_unsigned<_UIntType>::value, "_UIntType must be unsigned type"); | |
| 1846 | 1905 | public: |
| 1847 | 1906 | static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u: 0u; |
| 1848 | 1907 | static _LIBCPP_CONSTEXPR const result_type _Max = __m - 1u; |
| ... | ... | @@ -1859,9 +1918,17 @@ public: |
| 1859 | 1918 | static _LIBCPP_CONSTEXPR const result_type default_seed = 1u; |
| 1860 | 1919 | |
| 1861 | 1920 | // constructors and seeding functions |
| 1921 | #ifndef _LIBCPP_CXX03_LANG | |
| 1922 | _LIBCPP_INLINE_VISIBILITY | |
| 1923 | linear_congruential_engine() : linear_congruential_engine(default_seed) {} | |
| 1924 | _LIBCPP_INLINE_VISIBILITY | |
| 1925 | explicit linear_congruential_engine(result_type __s) { seed(__s); } | |
| 1926 | #else | |
| 1862 | 1927 | _LIBCPP_INLINE_VISIBILITY |
| 1863 | explicit linear_congruential_engine(result_type __s = default_seed) | |
| 1864 | {seed(__s);} | |
| 1928 | explicit linear_congruential_engine(result_type __s = default_seed) { | |
| 1929 | seed(__s); | |
| 1930 | } | |
| 1931 | #endif | |
| 1865 | 1932 | template<class _Sseq> |
| 1866 | 1933 | _LIBCPP_INLINE_VISIBILITY |
| 1867 | 1934 | explicit linear_congruential_engine(_Sseq& __q, |
| ... | ... | @@ -1982,7 +2049,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 1982 | 2049 | const linear_congruential_engine<_UIntType, __a, __c, __m>& __x) |
| 1983 | 2050 | { |
| 1984 | 2051 | __save_flags<_CharT, _Traits> __lx(__os); |
| 1985 | __os.flags(ios_base::dec | ios_base::left); | |
| 2052 | typedef basic_ostream<_CharT, _Traits> _Ostream; | |
| 2053 | __os.flags(_Ostream::dec | _Ostream::left); | |
| 1986 | 2054 | __os.fill(__os.widen(' ')); |
| 1987 | 2055 | return __os << __x.__x_; |
| 1988 | 2056 | } |
| ... | ... | @@ -1994,7 +2062,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 1994 | 2062 | linear_congruential_engine<_UIntType, __a, __c, __m>& __x) |
| 1995 | 2063 | { |
| 1996 | 2064 | __save_flags<_CharT, _Traits> __lx(__is); |
| 1997 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 2065 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 2066 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 1998 | 2067 | _UIntType __t; |
| 1999 | 2068 | __is >> __t; |
| 2000 | 2069 | if (!__is.fail()) |
| ... | ... | @@ -2106,9 +2175,17 @@ public: |
| 2106 | 2175 | static _LIBCPP_CONSTEXPR const result_type default_seed = 5489u; |
| 2107 | 2176 | |
| 2108 | 2177 | // constructors and seeding functions |
| 2178 | #ifndef _LIBCPP_CXX03_LANG | |
| 2109 | 2179 | _LIBCPP_INLINE_VISIBILITY |
| 2110 | explicit mersenne_twister_engine(result_type __sd = default_seed) | |
| 2111 | {seed(__sd);} | |
| 2180 | mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} | |
| 2181 | _LIBCPP_INLINE_VISIBILITY | |
| 2182 | explicit mersenne_twister_engine(result_type __sd) { seed(__sd); } | |
| 2183 | #else | |
| 2184 | _LIBCPP_INLINE_VISIBILITY | |
| 2185 | explicit mersenne_twister_engine(result_type __sd = default_seed) { | |
| 2186 | seed(__sd); | |
| 2187 | } | |
| 2188 | #endif | |
| 2112 | 2189 | template<class _Sseq> |
| 2113 | 2190 | _LIBCPP_INLINE_VISIBILITY |
| 2114 | 2191 | explicit mersenne_twister_engine(_Sseq& __q, |
| ... | ... | @@ -2453,7 +2530,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 2453 | 2530 | _Bp, _Tp, _Cp, _Lp, _Fp>& __x) |
| 2454 | 2531 | { |
| 2455 | 2532 | __save_flags<_CharT, _Traits> __lx(__os); |
| 2456 | __os.flags(ios_base::dec | ios_base::left); | |
| 2533 | typedef basic_ostream<_CharT, _Traits> _Ostream; | |
| 2534 | __os.flags(_Ostream::dec | _Ostream::left); | |
| 2457 | 2535 | _CharT __sp = __os.widen(' '); |
| 2458 | 2536 | __os.fill(__sp); |
| 2459 | 2537 | __os << __x.__x_[__x.__i_]; |
| ... | ... | @@ -2474,7 +2552,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 2474 | 2552 | _Bp, _Tp, _Cp, _Lp, _Fp>& __x) |
| 2475 | 2553 | { |
| 2476 | 2554 | __save_flags<_CharT, _Traits> __lx(__is); |
| 2477 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 2555 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 2556 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 2478 | 2557 | _UInt __t[_Np]; |
| 2479 | 2558 | for (size_t __i = 0; __i < _Np; ++__i) |
| 2480 | 2559 | __is >> __t[__i]; |
| ... | ... | @@ -2562,9 +2641,17 @@ public: |
| 2562 | 2641 | static _LIBCPP_CONSTEXPR const result_type default_seed = 19780503u; |
| 2563 | 2642 | |
| 2564 | 2643 | // constructors and seeding functions |
| 2644 | #ifndef _LIBCPP_CXX03_LANG | |
| 2645 | _LIBCPP_INLINE_VISIBILITY | |
| 2646 | subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} | |
| 2647 | _LIBCPP_INLINE_VISIBILITY | |
| 2648 | explicit subtract_with_carry_engine(result_type __sd) { seed(__sd); } | |
| 2649 | #else | |
| 2565 | 2650 | _LIBCPP_INLINE_VISIBILITY |
| 2566 | explicit subtract_with_carry_engine(result_type __sd = default_seed) | |
| 2567 | {seed(__sd);} | |
| 2651 | explicit subtract_with_carry_engine(result_type __sd = default_seed) { | |
| 2652 | seed(__sd); | |
| 2653 | } | |
| 2654 | #endif | |
| 2568 | 2655 | template<class _Sseq> |
| 2569 | 2656 | _LIBCPP_INLINE_VISIBILITY |
| 2570 | 2657 | explicit subtract_with_carry_engine(_Sseq& __q, |
| ... | ... | @@ -2773,7 +2860,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 2773 | 2860 | const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x) |
| 2774 | 2861 | { |
| 2775 | 2862 | __save_flags<_CharT, _Traits> __lx(__os); |
| 2776 | __os.flags(ios_base::dec | ios_base::left); | |
| 2863 | typedef basic_ostream<_CharT, _Traits> _Ostream; | |
| 2864 | __os.flags(_Ostream::dec | _Ostream::left); | |
| 2777 | 2865 | _CharT __sp = __os.widen(' '); |
| 2778 | 2866 | __os.fill(__sp); |
| 2779 | 2867 | __os << __x.__x_[__x.__i_]; |
| ... | ... | @@ -2792,7 +2880,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 2792 | 2880 | subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x) |
| 2793 | 2881 | { |
| 2794 | 2882 | __save_flags<_CharT, _Traits> __lx(__is); |
| 2795 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 2883 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 2884 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 2796 | 2885 | _UInt __t[_Rp+1]; |
| 2797 | 2886 | for (size_t __i = 0; __i < _Rp+1; ++__i) |
| 2798 | 2887 | __is >> __t[__i]; |
| ... | ... | @@ -2955,7 +3044,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 2955 | 3044 | const discard_block_engine<_Eng, _Pp, _Rp>& __x) |
| 2956 | 3045 | { |
| 2957 | 3046 | __save_flags<_CharT, _Traits> __lx(__os); |
| 2958 | __os.flags(ios_base::dec | ios_base::left); | |
| 3047 | typedef basic_ostream<_CharT, _Traits> _Ostream; | |
| 3048 | __os.flags(_Ostream::dec | _Ostream::left); | |
| 2959 | 3049 | _CharT __sp = __os.widen(' '); |
| 2960 | 3050 | __os.fill(__sp); |
| 2961 | 3051 | return __os << __x.__e_ << __sp << __x.__n_; |
| ... | ... | @@ -2968,7 +3058,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 2968 | 3058 | discard_block_engine<_Eng, _Pp, _Rp>& __x) |
| 2969 | 3059 | { |
| 2970 | 3060 | __save_flags<_CharT, _Traits> __lx(__is); |
| 2971 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 3061 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 3062 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 2972 | 3063 | _Eng __e; |
| 2973 | 3064 | int __n; |
| 2974 | 3065 | __is >> __e >> __n; |
| ... | ... | @@ -3440,7 +3531,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 3440 | 3531 | const shuffle_order_engine<_Eng, _Kp>& __x) |
| 3441 | 3532 | { |
| 3442 | 3533 | __save_flags<_CharT, _Traits> __lx(__os); |
| 3443 | __os.flags(ios_base::dec | ios_base::left); | |
| 3534 | typedef basic_ostream<_CharT, _Traits> _Ostream; | |
| 3535 | __os.flags(_Ostream::dec | _Ostream::left); | |
| 3444 | 3536 | _CharT __sp = __os.widen(' '); |
| 3445 | 3537 | __os.fill(__sp); |
| 3446 | 3538 | __os << __x.__e_ << __sp << __x._V_[0]; |
| ... | ... | @@ -3457,7 +3549,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 3457 | 3549 | { |
| 3458 | 3550 | typedef typename shuffle_order_engine<_Eng, _Kp>::result_type result_type; |
| 3459 | 3551 | __save_flags<_CharT, _Traits> __lx(__is); |
| 3460 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 3552 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 3553 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 3461 | 3554 | _Eng __e; |
| 3462 | 3555 | result_type _Vp[_Kp+1]; |
| 3463 | 3556 | __is >> __e; |
| ... | ... | @@ -3477,6 +3570,8 @@ typedef shuffle_order_engine<minstd_rand0, 256> knuth_b; |
| 3477 | 3570 | |
| 3478 | 3571 | // random_device |
| 3479 | 3572 | |
| 3573 | #if !defined(_LIBCPP_HAS_NO_RANDOM_DEVICE) | |
| 3574 | ||
| 3480 | 3575 | class _LIBCPP_TYPE_VIS random_device |
| 3481 | 3576 | { |
| 3482 | 3577 | #ifdef _LIBCPP_USING_DEV_RANDOM |
| ... | ... | @@ -3496,7 +3591,12 @@ public: |
| 3496 | 3591 | static _LIBCPP_CONSTEXPR result_type max() { return _Max;} |
| 3497 | 3592 | |
| 3498 | 3593 | // constructors |
| 3594 | #ifndef _LIBCPP_CXX03_LANG | |
| 3595 | random_device() : random_device("/dev/urandom") {} | |
| 3596 | explicit random_device(const string& __token); | |
| 3597 | #else | |
| 3499 | 3598 | explicit random_device(const string& __token = "/dev/urandom"); |
| 3599 | #endif | |
| 3500 | 3600 | ~random_device(); |
| 3501 | 3601 | |
| 3502 | 3602 | // generating functions |
| ... | ... | @@ -3511,6 +3611,8 @@ private: |
| 3511 | 3611 | random_device& operator=(const random_device&); // = delete; |
| 3512 | 3612 | }; |
| 3513 | 3613 | |
| 3614 | #endif // !_LIBCPP_HAS_NO_RANDOM_DEVICE | |
| 3615 | ||
| 3514 | 3616 | // seed_seq |
| 3515 | 3617 | |
| 3516 | 3618 | class _LIBCPP_TEMPLATE_VIS seed_seq |
| ... | ... | @@ -3663,7 +3765,8 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 3663 | 3765 | const uniform_int_distribution<_IT>& __x) |
| 3664 | 3766 | { |
| 3665 | 3767 | __save_flags<_CharT, _Traits> __lx(__os); |
| 3666 | __os.flags(ios_base::dec | ios_base::left); | |
| 3768 | typedef basic_ostream<_CharT, _Traits> _Ostream; | |
| 3769 | __os.flags(_Ostream::dec | _Ostream::left); | |
| 3667 | 3770 | _CharT __sp = __os.widen(' '); |
| 3668 | 3771 | __os.fill(__sp); |
| 3669 | 3772 | return __os << __x.a() << __sp << __x.b(); |
| ... | ... | @@ -3678,7 +3781,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 3678 | 3781 | typedef typename _Eng::result_type result_type; |
| 3679 | 3782 | typedef typename _Eng::param_type param_type; |
| 3680 | 3783 | __save_flags<_CharT, _Traits> __lx(__is); |
| 3681 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 3784 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 3785 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 3682 | 3786 | result_type __a; |
| 3683 | 3787 | result_type __b; |
| 3684 | 3788 | __is >> __a >> __b; |
| ... | ... | @@ -3726,9 +3830,16 @@ private: |
| 3726 | 3830 | |
| 3727 | 3831 | public: |
| 3728 | 3832 | // constructors and reset functions |
| 3833 | #ifndef _LIBCPP_CXX03_LANG | |
| 3834 | _LIBCPP_INLINE_VISIBILITY | |
| 3835 | uniform_real_distribution() : uniform_real_distribution(0) {} | |
| 3836 | explicit uniform_real_distribution(result_type __a, result_type __b = 1) | |
| 3837 | : __p_(param_type(__a, __b)) {} | |
| 3838 | #else | |
| 3729 | 3839 | _LIBCPP_INLINE_VISIBILITY |
| 3730 | 3840 | explicit uniform_real_distribution(result_type __a = 0, result_type __b = 1) |
| 3731 | 3841 | : __p_(param_type(__a, __b)) {} |
| 3842 | #endif | |
| 3732 | 3843 | _LIBCPP_INLINE_VISIBILITY |
| 3733 | 3844 | explicit uniform_real_distribution(const param_type& __p) : __p_(__p) {} |
| 3734 | 3845 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -3784,8 +3895,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 3784 | 3895 | const uniform_real_distribution<_RT>& __x) |
| 3785 | 3896 | { |
| 3786 | 3897 | __save_flags<_CharT, _Traits> __lx(__os); |
| 3787 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 3788 | ios_base::scientific); | |
| 3898 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 3899 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 3900 | _OStream::scientific); | |
| 3789 | 3901 | _CharT __sp = __os.widen(' '); |
| 3790 | 3902 | __os.fill(__sp); |
| 3791 | 3903 | return __os << __x.a() << __sp << __x.b(); |
| ... | ... | @@ -3800,7 +3912,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 3800 | 3912 | typedef typename _Eng::result_type result_type; |
| 3801 | 3913 | typedef typename _Eng::param_type param_type; |
| 3802 | 3914 | __save_flags<_CharT, _Traits> __lx(__is); |
| 3803 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 3915 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 3916 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 3804 | 3917 | result_type __a; |
| 3805 | 3918 | result_type __b; |
| 3806 | 3919 | __is >> __a >> __b; |
| ... | ... | @@ -3842,9 +3955,15 @@ private: |
| 3842 | 3955 | |
| 3843 | 3956 | public: |
| 3844 | 3957 | // constructors and reset functions |
| 3958 | #ifndef _LIBCPP_CXX03_LANG | |
| 3959 | _LIBCPP_INLINE_VISIBILITY | |
| 3960 | bernoulli_distribution() : bernoulli_distribution(0.5) {} | |
| 3845 | 3961 | _LIBCPP_INLINE_VISIBILITY |
| 3846 | explicit bernoulli_distribution(double __p = 0.5) | |
| 3847 | : __p_(param_type(__p)) {} | |
| 3962 | explicit bernoulli_distribution(double __p) : __p_(param_type(__p)) {} | |
| 3963 | #else | |
| 3964 | _LIBCPP_INLINE_VISIBILITY | |
| 3965 | explicit bernoulli_distribution(double __p = 0.5) : __p_(param_type(__p)) {} | |
| 3966 | #endif | |
| 3848 | 3967 | _LIBCPP_INLINE_VISIBILITY |
| 3849 | 3968 | explicit bernoulli_distribution(const param_type& __p) : __p_(__p) {} |
| 3850 | 3969 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -3895,8 +4014,9 @@ basic_ostream<_CharT, _Traits>& |
| 3895 | 4014 | operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x) |
| 3896 | 4015 | { |
| 3897 | 4016 | __save_flags<_CharT, _Traits> __lx(__os); |
| 3898 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 3899 | ios_base::scientific); | |
| 4017 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 4018 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 4019 | _OStream::scientific); | |
| 3900 | 4020 | _CharT __sp = __os.widen(' '); |
| 3901 | 4021 | __os.fill(__sp); |
| 3902 | 4022 | return __os << __x.p(); |
| ... | ... | @@ -3909,7 +4029,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bernoulli_distribution& __x) |
| 3909 | 4029 | typedef bernoulli_distribution _Eng; |
| 3910 | 4030 | typedef typename _Eng::param_type param_type; |
| 3911 | 4031 | __save_flags<_CharT, _Traits> __lx(__is); |
| 3912 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 4032 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 4033 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 3913 | 4034 | double __p; |
| 3914 | 4035 | __is >> __p; |
| 3915 | 4036 | if (!__is.fail()) |
| ... | ... | @@ -3958,9 +4079,17 @@ private: |
| 3958 | 4079 | |
| 3959 | 4080 | public: |
| 3960 | 4081 | // constructors and reset functions |
| 4082 | #ifndef _LIBCPP_CXX03_LANG | |
| 4083 | _LIBCPP_INLINE_VISIBILITY | |
| 4084 | binomial_distribution() : binomial_distribution(1) {} | |
| 4085 | _LIBCPP_INLINE_VISIBILITY | |
| 4086 | explicit binomial_distribution(result_type __t, double __p = 0.5) | |
| 4087 | : __p_(param_type(__t, __p)) {} | |
| 4088 | #else | |
| 3961 | 4089 | _LIBCPP_INLINE_VISIBILITY |
| 3962 | 4090 | explicit binomial_distribution(result_type __t = 1, double __p = 0.5) |
| 3963 | 4091 | : __p_(param_type(__t, __p)) {} |
| 4092 | #endif | |
| 3964 | 4093 | _LIBCPP_INLINE_VISIBILITY |
| 3965 | 4094 | explicit binomial_distribution(const param_type& __p) : __p_(__p) {} |
| 3966 | 4095 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -3999,12 +4128,12 @@ public: |
| 3999 | 4128 | {return !(__x == __y);} |
| 4000 | 4129 | }; |
| 4001 | 4130 | |
| 4002 | #ifndef _LIBCPP_MSVCRT | |
| 4131 | #ifndef _LIBCPP_MSVCRT_LIKE | |
| 4003 | 4132 | extern "C" double lgamma_r(double, int *); |
| 4004 | 4133 | #endif |
| 4005 | 4134 | |
| 4006 | 4135 | inline _LIBCPP_INLINE_VISIBILITY double __libcpp_lgamma(double __d) { |
| 4007 | #if defined(_LIBCPP_MSVCRT) | |
| 4136 | #if defined(_LIBCPP_MSVCRT_LIKE) | |
| 4008 | 4137 | return lgamma(__d); |
| 4009 | 4138 | #else |
| 4010 | 4139 | int __sign; |
| ... | ... | @@ -4079,8 +4208,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 4079 | 4208 | const binomial_distribution<_IntType>& __x) |
| 4080 | 4209 | { |
| 4081 | 4210 | __save_flags<_CharT, _Traits> __lx(__os); |
| 4082 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 4083 | ios_base::scientific); | |
| 4211 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 4212 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 4213 | _OStream::scientific); | |
| 4084 | 4214 | _CharT __sp = __os.widen(' '); |
| 4085 | 4215 | __os.fill(__sp); |
| 4086 | 4216 | return __os << __x.t() << __sp << __x.p(); |
| ... | ... | @@ -4095,7 +4225,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 4095 | 4225 | typedef typename _Eng::result_type result_type; |
| 4096 | 4226 | typedef typename _Eng::param_type param_type; |
| 4097 | 4227 | __save_flags<_CharT, _Traits> __lx(__is); |
| 4098 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 4228 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 4229 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 4099 | 4230 | result_type __t; |
| 4100 | 4231 | double __p; |
| 4101 | 4232 | __is >> __t >> __p; |
| ... | ... | @@ -4138,9 +4269,17 @@ private: |
| 4138 | 4269 | |
| 4139 | 4270 | public: |
| 4140 | 4271 | // constructors and reset functions |
| 4272 | #ifndef _LIBCPP_CXX03_LANG | |
| 4273 | _LIBCPP_INLINE_VISIBILITY | |
| 4274 | exponential_distribution() : exponential_distribution(1) {} | |
| 4275 | _LIBCPP_INLINE_VISIBILITY | |
| 4276 | explicit exponential_distribution(result_type __lambda) | |
| 4277 | : __p_(param_type(__lambda)) {} | |
| 4278 | #else | |
| 4141 | 4279 | _LIBCPP_INLINE_VISIBILITY |
| 4142 | 4280 | explicit exponential_distribution(result_type __lambda = 1) |
| 4143 | 4281 | : __p_(param_type(__lambda)) {} |
| 4282 | #endif | |
| 4144 | 4283 | _LIBCPP_INLINE_VISIBILITY |
| 4145 | 4284 | explicit exponential_distribution(const param_type& __p) : __p_(__p) {} |
| 4146 | 4285 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -4197,8 +4336,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 4197 | 4336 | const exponential_distribution<_RealType>& __x) |
| 4198 | 4337 | { |
| 4199 | 4338 | __save_flags<_CharT, _Traits> __lx(__os); |
| 4200 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 4201 | ios_base::scientific); | |
| 4339 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 4340 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 4341 | _OStream::scientific); | |
| 4202 | 4342 | return __os << __x.lambda(); |
| 4203 | 4343 | } |
| 4204 | 4344 | |
| ... | ... | @@ -4211,7 +4351,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 4211 | 4351 | typedef typename _Eng::result_type result_type; |
| 4212 | 4352 | typedef typename _Eng::param_type param_type; |
| 4213 | 4353 | __save_flags<_CharT, _Traits> __lx(__is); |
| 4214 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 4354 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 4355 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 4215 | 4356 | result_type __lambda; |
| 4216 | 4357 | __is >> __lambda; |
| 4217 | 4358 | if (!__is.fail()) |
| ... | ... | @@ -4259,9 +4400,18 @@ private: |
| 4259 | 4400 | |
| 4260 | 4401 | public: |
| 4261 | 4402 | // constructors and reset functions |
| 4403 | #ifndef _LIBCPP_CXX03_LANG | |
| 4404 | _LIBCPP_INLINE_VISIBILITY | |
| 4405 | normal_distribution() : normal_distribution(0) {} | |
| 4262 | 4406 | _LIBCPP_INLINE_VISIBILITY |
| 4263 | explicit normal_distribution(result_type __mean = 0, result_type __stddev = 1) | |
| 4407 | explicit normal_distribution(result_type __mean, result_type __stddev = 1) | |
| 4264 | 4408 | : __p_(param_type(__mean, __stddev)), _V_hot_(false) {} |
| 4409 | #else | |
| 4410 | _LIBCPP_INLINE_VISIBILITY | |
| 4411 | explicit normal_distribution(result_type __mean = 0, | |
| 4412 | result_type __stddev = 1) | |
| 4413 | : __p_(param_type(__mean, __stddev)), _V_hot_(false) {} | |
| 4414 | #endif | |
| 4265 | 4415 | _LIBCPP_INLINE_VISIBILITY |
| 4266 | 4416 | explicit normal_distribution(const param_type& __p) |
| 4267 | 4417 | : __p_(__p), _V_hot_(false) {} |
| ... | ... | @@ -4351,8 +4501,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 4351 | 4501 | const normal_distribution<_RT>& __x) |
| 4352 | 4502 | { |
| 4353 | 4503 | __save_flags<_CharT, _Traits> __lx(__os); |
| 4354 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 4355 | ios_base::scientific); | |
| 4504 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 4505 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 4506 | _OStream::scientific); | |
| 4356 | 4507 | _CharT __sp = __os.widen(' '); |
| 4357 | 4508 | __os.fill(__sp); |
| 4358 | 4509 | __os << __x.mean() << __sp << __x.stddev() << __sp << __x._V_hot_; |
| ... | ... | @@ -4370,7 +4521,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 4370 | 4521 | typedef typename _Eng::result_type result_type; |
| 4371 | 4522 | typedef typename _Eng::param_type param_type; |
| 4372 | 4523 | __save_flags<_CharT, _Traits> __lx(__is); |
| 4373 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 4524 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 4525 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 4374 | 4526 | result_type __mean; |
| 4375 | 4527 | result_type __stddev; |
| 4376 | 4528 | result_type _Vp = 0; |
| ... | ... | @@ -4437,9 +4589,18 @@ private: |
| 4437 | 4589 | |
| 4438 | 4590 | public: |
| 4439 | 4591 | // constructor and reset functions |
| 4592 | #ifndef _LIBCPP_CXX03_LANG | |
| 4593 | _LIBCPP_INLINE_VISIBILITY | |
| 4594 | lognormal_distribution() : lognormal_distribution(0) {} | |
| 4595 | _LIBCPP_INLINE_VISIBILITY | |
| 4596 | explicit lognormal_distribution(result_type __m, result_type __s = 1) | |
| 4597 | : __p_(param_type(__m, __s)) {} | |
| 4598 | #else | |
| 4440 | 4599 | _LIBCPP_INLINE_VISIBILITY |
| 4441 | explicit lognormal_distribution(result_type __m = 0, result_type __s = 1) | |
| 4600 | explicit lognormal_distribution(result_type __m = 0, | |
| 4601 | result_type __s = 1) | |
| 4442 | 4602 | : __p_(param_type(__m, __s)) {} |
| 4603 | #endif | |
| 4443 | 4604 | _LIBCPP_INLINE_VISIBILITY |
| 4444 | 4605 | explicit lognormal_distribution(const param_type& __p) |
| 4445 | 4606 | : __p_(__p) {} |
| ... | ... | @@ -4557,8 +4718,17 @@ private: |
| 4557 | 4718 | |
| 4558 | 4719 | public: |
| 4559 | 4720 | // constructors and reset functions |
| 4721 | #ifndef _LIBCPP_CXX03_LANG | |
| 4722 | _LIBCPP_INLINE_VISIBILITY | |
| 4723 | poisson_distribution() : poisson_distribution(1.0) {} | |
| 4724 | _LIBCPP_INLINE_VISIBILITY | |
| 4725 | explicit poisson_distribution(double __mean) | |
| 4726 | : __p_(__mean) {} | |
| 4727 | #else | |
| 4560 | 4728 | _LIBCPP_INLINE_VISIBILITY |
| 4561 | explicit poisson_distribution(double __mean = 1.0) : __p_(__mean) {} | |
| 4729 | explicit poisson_distribution(double __mean = 1.0) | |
| 4730 | : __p_(__mean) {} | |
| 4731 | #endif | |
| 4562 | 4732 | _LIBCPP_INLINE_VISIBILITY |
| 4563 | 4733 | explicit poisson_distribution(const param_type& __p) : __p_(__p) {} |
| 4564 | 4734 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -4618,7 +4788,7 @@ poisson_distribution<_IntType>::param_type::param_type(double __mean) |
| 4618 | 4788 | { |
| 4619 | 4789 | __s_ = _VSTD::sqrt(__mean_); |
| 4620 | 4790 | __d_ = 6 * __mean_ * __mean_; |
| 4621 | __l_ = std::trunc(__mean_ - 1.1484); | |
| 4791 | __l_ = _VSTD::trunc(__mean_ - 1.1484); | |
| 4622 | 4792 | __omega_ = .3989423 / __s_; |
| 4623 | 4793 | double __b1_ = .4166667E-1 / __mean_; |
| 4624 | 4794 | double __b2_ = .3 * __b1_ * __b1_; |
| ... | ... | @@ -4650,13 +4820,13 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr |
| 4650 | 4820 | double __u; |
| 4651 | 4821 | if (__g > 0) |
| 4652 | 4822 | { |
| 4653 | __tx = std::trunc(__g); | |
| 4823 | __tx = _VSTD::trunc(__g); | |
| 4654 | 4824 | if (__tx >= __pr.__l_) |
| 4655 | return std::__clamp_to_integral<result_type>(__tx); | |
| 4825 | return _VSTD::__clamp_to_integral<result_type>(__tx); | |
| 4656 | 4826 | __difmuk = __pr.__mean_ - __tx; |
| 4657 | 4827 | __u = __urd(__urng); |
| 4658 | 4828 | if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk) |
| 4659 | return std::__clamp_to_integral<result_type>(__tx); | |
| 4829 | return _VSTD::__clamp_to_integral<result_type>(__tx); | |
| 4660 | 4830 | } |
| 4661 | 4831 | exponential_distribution<double> __edist; |
| 4662 | 4832 | for (bool __using_exp_dist = false; true; __using_exp_dist = true) |
| ... | ... | @@ -4672,7 +4842,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr |
| 4672 | 4842 | __u += __u - 1; |
| 4673 | 4843 | __t = 1.8 + (__u < 0 ? -__e : __e); |
| 4674 | 4844 | } while (__t <= -.6744); |
| 4675 | __tx = std::trunc(__pr.__mean_ + __pr.__s_ * __t); | |
| 4845 | __tx = _VSTD::trunc(__pr.__mean_ + __pr.__s_ * __t); | |
| 4676 | 4846 | __difmuk = __pr.__mean_ - __tx; |
| 4677 | 4847 | __using_exp_dist = true; |
| 4678 | 4848 | } |
| ... | ... | @@ -4716,7 +4886,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr |
| 4716 | 4886 | } |
| 4717 | 4887 | } |
| 4718 | 4888 | } |
| 4719 | return std::__clamp_to_integral<result_type>(__tx); | |
| 4889 | return _VSTD::__clamp_to_integral<result_type>(__tx); | |
| 4720 | 4890 | } |
| 4721 | 4891 | |
| 4722 | 4892 | template <class _CharT, class _Traits, class _IntType> |
| ... | ... | @@ -4725,8 +4895,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 4725 | 4895 | const poisson_distribution<_IntType>& __x) |
| 4726 | 4896 | { |
| 4727 | 4897 | __save_flags<_CharT, _Traits> __lx(__os); |
| 4728 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 4729 | ios_base::scientific); | |
| 4898 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 4899 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 4900 | _OStream::scientific); | |
| 4730 | 4901 | return __os << __x.mean(); |
| 4731 | 4902 | } |
| 4732 | 4903 | |
| ... | ... | @@ -4738,7 +4909,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 4738 | 4909 | typedef poisson_distribution<_IntType> _Eng; |
| 4739 | 4910 | typedef typename _Eng::param_type param_type; |
| 4740 | 4911 | __save_flags<_CharT, _Traits> __lx(__is); |
| 4741 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 4912 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 4913 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 4742 | 4914 | double __mean; |
| 4743 | 4915 | __is >> __mean; |
| 4744 | 4916 | if (!__is.fail()) |
| ... | ... | @@ -4784,9 +4956,17 @@ private: |
| 4784 | 4956 | |
| 4785 | 4957 | public: |
| 4786 | 4958 | // constructor and reset functions |
| 4959 | #ifndef _LIBCPP_CXX03_LANG | |
| 4960 | _LIBCPP_INLINE_VISIBILITY | |
| 4961 | weibull_distribution() : weibull_distribution(1) {} | |
| 4962 | _LIBCPP_INLINE_VISIBILITY | |
| 4963 | explicit weibull_distribution(result_type __a, result_type __b = 1) | |
| 4964 | : __p_(param_type(__a, __b)) {} | |
| 4965 | #else | |
| 4787 | 4966 | _LIBCPP_INLINE_VISIBILITY |
| 4788 | 4967 | explicit weibull_distribution(result_type __a = 1, result_type __b = 1) |
| 4789 | 4968 | : __p_(param_type(__a, __b)) {} |
| 4969 | #endif | |
| 4790 | 4970 | _LIBCPP_INLINE_VISIBILITY |
| 4791 | 4971 | explicit weibull_distribution(const param_type& __p) |
| 4792 | 4972 | : __p_(__p) {} |
| ... | ... | @@ -4836,8 +5016,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 4836 | 5016 | const weibull_distribution<_RT>& __x) |
| 4837 | 5017 | { |
| 4838 | 5018 | __save_flags<_CharT, _Traits> __lx(__os); |
| 4839 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 4840 | ios_base::scientific); | |
| 5019 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5020 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5021 | _OStream::scientific); | |
| 4841 | 5022 | _CharT __sp = __os.widen(' '); |
| 4842 | 5023 | __os.fill(__sp); |
| 4843 | 5024 | __os << __x.a() << __sp << __x.b(); |
| ... | ... | @@ -4853,7 +5034,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 4853 | 5034 | typedef typename _Eng::result_type result_type; |
| 4854 | 5035 | typedef typename _Eng::param_type param_type; |
| 4855 | 5036 | __save_flags<_CharT, _Traits> __lx(__is); |
| 4856 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5037 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5038 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 4857 | 5039 | result_type __a; |
| 4858 | 5040 | result_type __b; |
| 4859 | 5041 | __is >> __a >> __b; |
| ... | ... | @@ -4898,9 +5080,18 @@ private: |
| 4898 | 5080 | |
| 4899 | 5081 | public: |
| 4900 | 5082 | // constructor and reset functions |
| 5083 | #ifndef _LIBCPP_CXX03_LANG | |
| 5084 | _LIBCPP_INLINE_VISIBILITY | |
| 5085 | extreme_value_distribution() : extreme_value_distribution(0) {} | |
| 4901 | 5086 | _LIBCPP_INLINE_VISIBILITY |
| 4902 | explicit extreme_value_distribution(result_type __a = 0, result_type __b = 1) | |
| 5087 | explicit extreme_value_distribution(result_type __a, result_type __b = 1) | |
| 4903 | 5088 | : __p_(param_type(__a, __b)) {} |
| 5089 | #else | |
| 5090 | _LIBCPP_INLINE_VISIBILITY | |
| 5091 | explicit extreme_value_distribution(result_type __a = 0, | |
| 5092 | result_type __b = 1) | |
| 5093 | : __p_(param_type(__a, __b)) {} | |
| 5094 | #endif | |
| 4904 | 5095 | _LIBCPP_INLINE_VISIBILITY |
| 4905 | 5096 | explicit extreme_value_distribution(const param_type& __p) |
| 4906 | 5097 | : __p_(__p) {} |
| ... | ... | @@ -4955,8 +5146,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 4955 | 5146 | const extreme_value_distribution<_RT>& __x) |
| 4956 | 5147 | { |
| 4957 | 5148 | __save_flags<_CharT, _Traits> __lx(__os); |
| 4958 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 4959 | ios_base::scientific); | |
| 5149 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5150 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5151 | _OStream::scientific); | |
| 4960 | 5152 | _CharT __sp = __os.widen(' '); |
| 4961 | 5153 | __os.fill(__sp); |
| 4962 | 5154 | __os << __x.a() << __sp << __x.b(); |
| ... | ... | @@ -4972,7 +5164,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 4972 | 5164 | typedef typename _Eng::result_type result_type; |
| 4973 | 5165 | typedef typename _Eng::param_type param_type; |
| 4974 | 5166 | __save_flags<_CharT, _Traits> __lx(__is); |
| 4975 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5167 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5168 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 4976 | 5169 | result_type __a; |
| 4977 | 5170 | result_type __b; |
| 4978 | 5171 | __is >> __a >> __b; |
| ... | ... | @@ -5019,9 +5212,18 @@ private: |
| 5019 | 5212 | |
| 5020 | 5213 | public: |
| 5021 | 5214 | // constructors and reset functions |
| 5215 | #ifndef _LIBCPP_CXX03_LANG | |
| 5216 | _LIBCPP_INLINE_VISIBILITY | |
| 5217 | gamma_distribution() : gamma_distribution(1) {} | |
| 5022 | 5218 | _LIBCPP_INLINE_VISIBILITY |
| 5023 | explicit gamma_distribution(result_type __alpha = 1, result_type __beta = 1) | |
| 5219 | explicit gamma_distribution(result_type __alpha, result_type __beta = 1) | |
| 5024 | 5220 | : __p_(param_type(__alpha, __beta)) {} |
| 5221 | #else | |
| 5222 | _LIBCPP_INLINE_VISIBILITY | |
| 5223 | explicit gamma_distribution(result_type __alpha = 1, | |
| 5224 | result_type __beta = 1) | |
| 5225 | : __p_(param_type(__alpha, __beta)) {} | |
| 5226 | #endif | |
| 5025 | 5227 | _LIBCPP_INLINE_VISIBILITY |
| 5026 | 5228 | explicit gamma_distribution(const param_type& __p) |
| 5027 | 5229 | : __p_(__p) {} |
| ... | ... | @@ -5127,8 +5329,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5127 | 5329 | const gamma_distribution<_RT>& __x) |
| 5128 | 5330 | { |
| 5129 | 5331 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5130 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5131 | ios_base::scientific); | |
| 5332 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5333 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5334 | _OStream::scientific); | |
| 5132 | 5335 | _CharT __sp = __os.widen(' '); |
| 5133 | 5336 | __os.fill(__sp); |
| 5134 | 5337 | __os << __x.alpha() << __sp << __x.beta(); |
| ... | ... | @@ -5144,7 +5347,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5144 | 5347 | typedef typename _Eng::result_type result_type; |
| 5145 | 5348 | typedef typename _Eng::param_type param_type; |
| 5146 | 5349 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5147 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5350 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5351 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5148 | 5352 | result_type __alpha; |
| 5149 | 5353 | result_type __beta; |
| 5150 | 5354 | __is >> __alpha >> __beta; |
| ... | ... | @@ -5191,9 +5395,18 @@ private: |
| 5191 | 5395 | |
| 5192 | 5396 | public: |
| 5193 | 5397 | // constructor and reset functions |
| 5398 | #ifndef _LIBCPP_CXX03_LANG | |
| 5399 | _LIBCPP_INLINE_VISIBILITY | |
| 5400 | negative_binomial_distribution() : negative_binomial_distribution(1) {} | |
| 5194 | 5401 | _LIBCPP_INLINE_VISIBILITY |
| 5195 | explicit negative_binomial_distribution(result_type __k = 1, double __p = 0.5) | |
| 5402 | explicit negative_binomial_distribution(result_type __k, double __p = 0.5) | |
| 5196 | 5403 | : __p_(__k, __p) {} |
| 5404 | #else | |
| 5405 | _LIBCPP_INLINE_VISIBILITY | |
| 5406 | explicit negative_binomial_distribution(result_type __k = 1, | |
| 5407 | double __p = 0.5) | |
| 5408 | : __p_(__k, __p) {} | |
| 5409 | #endif | |
| 5197 | 5410 | _LIBCPP_INLINE_VISIBILITY |
| 5198 | 5411 | explicit negative_binomial_distribution(const param_type& __p) : __p_(__p) {} |
| 5199 | 5412 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -5263,8 +5476,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5263 | 5476 | const negative_binomial_distribution<_IntType>& __x) |
| 5264 | 5477 | { |
| 5265 | 5478 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5266 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5267 | ios_base::scientific); | |
| 5479 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5480 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5481 | _OStream::scientific); | |
| 5268 | 5482 | _CharT __sp = __os.widen(' '); |
| 5269 | 5483 | __os.fill(__sp); |
| 5270 | 5484 | return __os << __x.k() << __sp << __x.p(); |
| ... | ... | @@ -5279,7 +5493,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5279 | 5493 | typedef typename _Eng::result_type result_type; |
| 5280 | 5494 | typedef typename _Eng::param_type param_type; |
| 5281 | 5495 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5282 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5496 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5497 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5283 | 5498 | result_type __k; |
| 5284 | 5499 | double __p; |
| 5285 | 5500 | __is >> __k >> __p; |
| ... | ... | @@ -5322,8 +5537,17 @@ private: |
| 5322 | 5537 | |
| 5323 | 5538 | public: |
| 5324 | 5539 | // constructors and reset functions |
| 5540 | #ifndef _LIBCPP_CXX03_LANG | |
| 5325 | 5541 | _LIBCPP_INLINE_VISIBILITY |
| 5326 | explicit geometric_distribution(double __p = 0.5) : __p_(__p) {} | |
| 5542 | geometric_distribution() : geometric_distribution(0.5) {} | |
| 5543 | _LIBCPP_INLINE_VISIBILITY | |
| 5544 | explicit geometric_distribution(double __p) | |
| 5545 | : __p_(__p) {} | |
| 5546 | #else | |
| 5547 | _LIBCPP_INLINE_VISIBILITY | |
| 5548 | explicit geometric_distribution(double __p = 0.5) | |
| 5549 | : __p_(__p) {} | |
| 5550 | #endif | |
| 5327 | 5551 | _LIBCPP_INLINE_VISIBILITY |
| 5328 | 5552 | explicit geometric_distribution(const param_type& __p) : __p_(__p) {} |
| 5329 | 5553 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -5369,8 +5593,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5369 | 5593 | const geometric_distribution<_IntType>& __x) |
| 5370 | 5594 | { |
| 5371 | 5595 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5372 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5373 | ios_base::scientific); | |
| 5596 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5597 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5598 | _OStream::scientific); | |
| 5374 | 5599 | return __os << __x.p(); |
| 5375 | 5600 | } |
| 5376 | 5601 | |
| ... | ... | @@ -5382,7 +5607,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5382 | 5607 | typedef geometric_distribution<_IntType> _Eng; |
| 5383 | 5608 | typedef typename _Eng::param_type param_type; |
| 5384 | 5609 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5385 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5610 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5611 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5386 | 5612 | double __p; |
| 5387 | 5613 | __is >> __p; |
| 5388 | 5614 | if (!__is.fail()) |
| ... | ... | @@ -5424,9 +5650,17 @@ private: |
| 5424 | 5650 | |
| 5425 | 5651 | public: |
| 5426 | 5652 | // constructor and reset functions |
| 5653 | #ifndef _LIBCPP_CXX03_LANG | |
| 5654 | _LIBCPP_INLINE_VISIBILITY | |
| 5655 | chi_squared_distribution() : chi_squared_distribution(1) {} | |
| 5656 | _LIBCPP_INLINE_VISIBILITY | |
| 5657 | explicit chi_squared_distribution(result_type __n) | |
| 5658 | : __p_(param_type(__n)) {} | |
| 5659 | #else | |
| 5427 | 5660 | _LIBCPP_INLINE_VISIBILITY |
| 5428 | 5661 | explicit chi_squared_distribution(result_type __n = 1) |
| 5429 | 5662 | : __p_(param_type(__n)) {} |
| 5663 | #endif | |
| 5430 | 5664 | _LIBCPP_INLINE_VISIBILITY |
| 5431 | 5665 | explicit chi_squared_distribution(const param_type& __p) |
| 5432 | 5666 | : __p_(__p) {} |
| ... | ... | @@ -5473,8 +5707,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5473 | 5707 | const chi_squared_distribution<_RT>& __x) |
| 5474 | 5708 | { |
| 5475 | 5709 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5476 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5477 | ios_base::scientific); | |
| 5710 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5711 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5712 | _OStream::scientific); | |
| 5478 | 5713 | __os << __x.n(); |
| 5479 | 5714 | return __os; |
| 5480 | 5715 | } |
| ... | ... | @@ -5488,7 +5723,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5488 | 5723 | typedef typename _Eng::result_type result_type; |
| 5489 | 5724 | typedef typename _Eng::param_type param_type; |
| 5490 | 5725 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5491 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5726 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5727 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5492 | 5728 | result_type __n; |
| 5493 | 5729 | __is >> __n; |
| 5494 | 5730 | if (!__is.fail()) |
| ... | ... | @@ -5534,9 +5770,17 @@ private: |
| 5534 | 5770 | |
| 5535 | 5771 | public: |
| 5536 | 5772 | // constructor and reset functions |
| 5773 | #ifndef _LIBCPP_CXX03_LANG | |
| 5774 | _LIBCPP_INLINE_VISIBILITY | |
| 5775 | cauchy_distribution() : cauchy_distribution(0) {} | |
| 5776 | _LIBCPP_INLINE_VISIBILITY | |
| 5777 | explicit cauchy_distribution(result_type __a, result_type __b = 1) | |
| 5778 | : __p_(param_type(__a, __b)) {} | |
| 5779 | #else | |
| 5537 | 5780 | _LIBCPP_INLINE_VISIBILITY |
| 5538 | 5781 | explicit cauchy_distribution(result_type __a = 0, result_type __b = 1) |
| 5539 | 5782 | : __p_(param_type(__a, __b)) {} |
| 5783 | #endif | |
| 5540 | 5784 | _LIBCPP_INLINE_VISIBILITY |
| 5541 | 5785 | explicit cauchy_distribution(const param_type& __p) |
| 5542 | 5786 | : __p_(__p) {} |
| ... | ... | @@ -5593,8 +5837,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5593 | 5837 | const cauchy_distribution<_RT>& __x) |
| 5594 | 5838 | { |
| 5595 | 5839 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5596 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5597 | ios_base::scientific); | |
| 5840 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5841 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5842 | _OStream::scientific); | |
| 5598 | 5843 | _CharT __sp = __os.widen(' '); |
| 5599 | 5844 | __os.fill(__sp); |
| 5600 | 5845 | __os << __x.a() << __sp << __x.b(); |
| ... | ... | @@ -5610,7 +5855,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5610 | 5855 | typedef typename _Eng::result_type result_type; |
| 5611 | 5856 | typedef typename _Eng::param_type param_type; |
| 5612 | 5857 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5613 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5858 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5859 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5614 | 5860 | result_type __a; |
| 5615 | 5861 | result_type __b; |
| 5616 | 5862 | __is >> __a >> __b; |
| ... | ... | @@ -5657,9 +5903,17 @@ private: |
| 5657 | 5903 | |
| 5658 | 5904 | public: |
| 5659 | 5905 | // constructor and reset functions |
| 5906 | #ifndef _LIBCPP_CXX03_LANG | |
| 5907 | _LIBCPP_INLINE_VISIBILITY | |
| 5908 | fisher_f_distribution() : fisher_f_distribution(1) {} | |
| 5909 | _LIBCPP_INLINE_VISIBILITY | |
| 5910 | explicit fisher_f_distribution(result_type __m, result_type __n = 1) | |
| 5911 | : __p_(param_type(__m, __n)) {} | |
| 5912 | #else | |
| 5660 | 5913 | _LIBCPP_INLINE_VISIBILITY |
| 5661 | 5914 | explicit fisher_f_distribution(result_type __m = 1, result_type __n = 1) |
| 5662 | 5915 | : __p_(param_type(__m, __n)) {} |
| 5916 | #endif | |
| 5663 | 5917 | _LIBCPP_INLINE_VISIBILITY |
| 5664 | 5918 | explicit fisher_f_distribution(const param_type& __p) |
| 5665 | 5919 | : __p_(__p) {} |
| ... | ... | @@ -5715,8 +5969,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5715 | 5969 | const fisher_f_distribution<_RT>& __x) |
| 5716 | 5970 | { |
| 5717 | 5971 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5718 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5719 | ios_base::scientific); | |
| 5972 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 5973 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 5974 | _OStream::scientific); | |
| 5720 | 5975 | _CharT __sp = __os.widen(' '); |
| 5721 | 5976 | __os.fill(__sp); |
| 5722 | 5977 | __os << __x.m() << __sp << __x.n(); |
| ... | ... | @@ -5732,7 +5987,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5732 | 5987 | typedef typename _Eng::result_type result_type; |
| 5733 | 5988 | typedef typename _Eng::param_type param_type; |
| 5734 | 5989 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5735 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 5990 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 5991 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5736 | 5992 | result_type __m; |
| 5737 | 5993 | result_type __n; |
| 5738 | 5994 | __is >> __m >> __n; |
| ... | ... | @@ -5776,9 +6032,17 @@ private: |
| 5776 | 6032 | |
| 5777 | 6033 | public: |
| 5778 | 6034 | // constructor and reset functions |
| 6035 | #ifndef _LIBCPP_CXX03_LANG | |
| 6036 | _LIBCPP_INLINE_VISIBILITY | |
| 6037 | student_t_distribution() : student_t_distribution(1) {} | |
| 6038 | _LIBCPP_INLINE_VISIBILITY | |
| 6039 | explicit student_t_distribution(result_type __n) | |
| 6040 | : __p_(param_type(__n)) {} | |
| 6041 | #else | |
| 5779 | 6042 | _LIBCPP_INLINE_VISIBILITY |
| 5780 | 6043 | explicit student_t_distribution(result_type __n = 1) |
| 5781 | 6044 | : __p_(param_type(__n)) {} |
| 6045 | #endif | |
| 5782 | 6046 | _LIBCPP_INLINE_VISIBILITY |
| 5783 | 6047 | explicit student_t_distribution(const param_type& __p) |
| 5784 | 6048 | : __p_(__p) {} |
| ... | ... | @@ -5831,8 +6095,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 5831 | 6095 | const student_t_distribution<_RT>& __x) |
| 5832 | 6096 | { |
| 5833 | 6097 | __save_flags<_CharT, _Traits> __lx(__os); |
| 5834 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 5835 | ios_base::scientific); | |
| 6098 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 6099 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 6100 | _OStream::scientific); | |
| 5836 | 6101 | __os << __x.n(); |
| 5837 | 6102 | return __os; |
| 5838 | 6103 | } |
| ... | ... | @@ -5846,7 +6111,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 5846 | 6111 | typedef typename _Eng::result_type result_type; |
| 5847 | 6112 | typedef typename _Eng::param_type param_type; |
| 5848 | 6113 | __save_flags<_CharT, _Traits> __lx(__is); |
| 5849 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 6114 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 6115 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 5850 | 6116 | result_type __n; |
| 5851 | 6117 | __is >> __n; |
| 5852 | 6118 | if (!__is.fail()) |
| ... | ... | @@ -6054,8 +6320,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 6054 | 6320 | const discrete_distribution<_IT>& __x) |
| 6055 | 6321 | { |
| 6056 | 6322 | __save_flags<_CharT, _Traits> __lx(__os); |
| 6057 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 6058 | ios_base::scientific); | |
| 6323 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 6324 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 6325 | _OStream::scientific); | |
| 6059 | 6326 | _CharT __sp = __os.widen(' '); |
| 6060 | 6327 | __os.fill(__sp); |
| 6061 | 6328 | size_t __n = __x.__p_.__p_.size(); |
| ... | ... | @@ -6071,7 +6338,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 6071 | 6338 | discrete_distribution<_IT>& __x) |
| 6072 | 6339 | { |
| 6073 | 6340 | __save_flags<_CharT, _Traits> __lx(__is); |
| 6074 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 6341 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 6342 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 6075 | 6343 | size_t __n; |
| 6076 | 6344 | __is >> __n; |
| 6077 | 6345 | vector<double> __p(__n); |
| ... | ... | @@ -6356,8 +6624,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 6356 | 6624 | const piecewise_constant_distribution<_RT>& __x) |
| 6357 | 6625 | { |
| 6358 | 6626 | __save_flags<_CharT, _Traits> __lx(__os); |
| 6359 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 6360 | ios_base::scientific); | |
| 6627 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 6628 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 6629 | _OStream::scientific); | |
| 6361 | 6630 | _CharT __sp = __os.widen(' '); |
| 6362 | 6631 | __os.fill(__sp); |
| 6363 | 6632 | size_t __n = __x.__p_.__b_.size(); |
| ... | ... | @@ -6383,7 +6652,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 6383 | 6652 | typedef piecewise_constant_distribution<_RT> _Eng; |
| 6384 | 6653 | typedef typename _Eng::result_type result_type; |
| 6385 | 6654 | __save_flags<_CharT, _Traits> __lx(__is); |
| 6386 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 6655 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 6656 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 6387 | 6657 | size_t __n; |
| 6388 | 6658 | __is >> __n; |
| 6389 | 6659 | vector<result_type> __b(__n); |
| ... | ... | @@ -6696,8 +6966,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 6696 | 6966 | const piecewise_linear_distribution<_RT>& __x) |
| 6697 | 6967 | { |
| 6698 | 6968 | __save_flags<_CharT, _Traits> __lx(__os); |
| 6699 | __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | | |
| 6700 | ios_base::scientific); | |
| 6969 | typedef basic_ostream<_CharT, _Traits> _OStream; | |
| 6970 | __os.flags(_OStream::dec | _OStream::left | _OStream::fixed | | |
| 6971 | _OStream::scientific); | |
| 6701 | 6972 | _CharT __sp = __os.widen(' '); |
| 6702 | 6973 | __os.fill(__sp); |
| 6703 | 6974 | size_t __n = __x.__p_.__b_.size(); |
| ... | ... | @@ -6723,7 +6994,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, |
| 6723 | 6994 | typedef piecewise_linear_distribution<_RT> _Eng; |
| 6724 | 6995 | typedef typename _Eng::result_type result_type; |
| 6725 | 6996 | __save_flags<_CharT, _Traits> __lx(__is); |
| 6726 | __is.flags(ios_base::dec | ios_base::skipws); | |
| 6997 | typedef basic_istream<_CharT, _Traits> _Istream; | |
| 6998 | __is.flags(_Istream::dec | _Istream::skipws); | |
| 6727 | 6999 | size_t __n; |
| 6728 | 7000 | __is >> __n; |
| 6729 | 7001 | vector<result_type> __b(__n); |
lib/libcxx/include/regex+131-52| ... | ... | @@ -32,7 +32,8 @@ enum syntax_option_type |
| 32 | 32 | extended = unspecified, |
| 33 | 33 | awk = unspecified, |
| 34 | 34 | grep = unspecified, |
| 35 | egrep = unspecified | |
| 35 | egrep = unspecified, | |
| 36 | multiline = unspecified | |
| 36 | 37 | }; |
| 37 | 38 | |
| 38 | 39 | constexpr syntax_option_type operator~(syntax_option_type f); |
| ... | ... | @@ -142,6 +143,7 @@ public: |
| 142 | 143 | static constexpr regex_constants::syntax_option_type awk = regex_constants::awk; |
| 143 | 144 | static constexpr regex_constants::syntax_option_type grep = regex_constants::grep; |
| 144 | 145 | static constexpr regex_constants::syntax_option_type egrep = regex_constants::egrep; |
| 146 | static constexpr regex_constants::syntax_option_type multiline = regex_constants::multiline; | |
| 145 | 147 | |
| 146 | 148 | // construct/copy/destroy: |
| 147 | 149 | basic_regex(); |
| ... | ... | @@ -453,7 +455,9 @@ public: |
| 453 | 455 | typedef basic_string<char_type> string_type; |
| 454 | 456 | |
| 455 | 457 | // construct/copy/destroy: |
| 456 | explicit match_results(const Allocator& a = Allocator()); | |
| 458 | explicit match_results(const Allocator& a = Allocator()); // before C++20 | |
| 459 | match_results() : match_results(Allocator()) {} // C++20 | |
| 460 | explicit match_results(const Allocator& a); // C++20 | |
| 457 | 461 | match_results(const match_results& m); |
| 458 | 462 | match_results(match_results&& m) noexcept; |
| 459 | 463 | match_results& operator=(const match_results& m); |
| ... | ... | @@ -802,7 +806,9 @@ enum syntax_option_type |
| 802 | 806 | extended = 1 << 5, |
| 803 | 807 | awk = 1 << 6, |
| 804 | 808 | grep = 1 << 7, |
| 805 | egrep = 1 << 8 | |
| 809 | egrep = 1 << 8, | |
| 810 | // 1 << 9 may be used by ECMAScript | |
| 811 | multiline = 1 << 10 | |
| 806 | 812 | }; |
| 807 | 813 | |
| 808 | 814 | inline _LIBCPP_CONSTEXPR |
| ... | ... | @@ -1982,24 +1988,33 @@ __word_boundary<_CharT, _Traits>::__exec(__state& __s) const |
| 1982 | 1988 | // __l_anchor |
| 1983 | 1989 | |
| 1984 | 1990 | template <class _CharT> |
| 1985 | class __l_anchor | |
| 1991 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR | |
| 1992 | bool __is_eol(_CharT c) | |
| 1993 | { | |
| 1994 | return c == '\r' || c == '\n'; | |
| 1995 | } | |
| 1996 | ||
| 1997 | template <class _CharT> | |
| 1998 | class __l_anchor_multiline | |
| 1986 | 1999 | : public __owns_one_state<_CharT> |
| 1987 | 2000 | { |
| 1988 | 2001 | typedef __owns_one_state<_CharT> base; |
| 1989 | 2002 | |
| 2003 | bool __multiline; | |
| 2004 | ||
| 1990 | 2005 | public: |
| 1991 | 2006 | typedef _VSTD::__state<_CharT> __state; |
| 1992 | 2007 | |
| 1993 | 2008 | _LIBCPP_INLINE_VISIBILITY |
| 1994 | __l_anchor(__node<_CharT>* __s) | |
| 1995 | : base(__s) {} | |
| 2009 | __l_anchor_multiline(bool __multiline, __node<_CharT>* __s) | |
| 2010 | : base(__s), __multiline(__multiline) {} | |
| 1996 | 2011 | |
| 1997 | 2012 | virtual void __exec(__state&) const; |
| 1998 | 2013 | }; |
| 1999 | 2014 | |
| 2000 | 2015 | template <class _CharT> |
| 2001 | 2016 | void |
| 2002 | __l_anchor<_CharT>::__exec(__state& __s) const | |
| 2017 | __l_anchor_multiline<_CharT>::__exec(__state& __s) const | |
| 2003 | 2018 | { |
| 2004 | 2019 | if (__s.__at_first_ && __s.__current_ == __s.__first_ && |
| 2005 | 2020 | !(__s.__flags_ & regex_constants::match_not_bol)) |
| ... | ... | @@ -2007,6 +2022,13 @@ __l_anchor<_CharT>::__exec(__state& __s) const |
| 2007 | 2022 | __s.__do_ = __state::__accept_but_not_consume; |
| 2008 | 2023 | __s.__node_ = this->first(); |
| 2009 | 2024 | } |
| 2025 | else if (__multiline && | |
| 2026 | !__s.__at_first_ && | |
| 2027 | __is_eol(*_VSTD::prev(__s.__current_))) | |
| 2028 | { | |
| 2029 | __s.__do_ = __state::__accept_but_not_consume; | |
| 2030 | __s.__node_ = this->first(); | |
| 2031 | } | |
| 2010 | 2032 | else |
| 2011 | 2033 | { |
| 2012 | 2034 | __s.__do_ = __state::__reject; |
| ... | ... | @@ -2017,24 +2039,26 @@ __l_anchor<_CharT>::__exec(__state& __s) const |
| 2017 | 2039 | // __r_anchor |
| 2018 | 2040 | |
| 2019 | 2041 | template <class _CharT> |
| 2020 | class __r_anchor | |
| 2042 | class __r_anchor_multiline | |
| 2021 | 2043 | : public __owns_one_state<_CharT> |
| 2022 | 2044 | { |
| 2023 | 2045 | typedef __owns_one_state<_CharT> base; |
| 2024 | 2046 | |
| 2047 | bool __multiline; | |
| 2048 | ||
| 2025 | 2049 | public: |
| 2026 | 2050 | typedef _VSTD::__state<_CharT> __state; |
| 2027 | 2051 | |
| 2028 | 2052 | _LIBCPP_INLINE_VISIBILITY |
| 2029 | __r_anchor(__node<_CharT>* __s) | |
| 2030 | : base(__s) {} | |
| 2053 | __r_anchor_multiline(bool __multiline, __node<_CharT>* __s) | |
| 2054 | : base(__s), __multiline(__multiline) {} | |
| 2031 | 2055 | |
| 2032 | 2056 | virtual void __exec(__state&) const; |
| 2033 | 2057 | }; |
| 2034 | 2058 | |
| 2035 | 2059 | template <class _CharT> |
| 2036 | 2060 | void |
| 2037 | __r_anchor<_CharT>::__exec(__state& __s) const | |
| 2061 | __r_anchor_multiline<_CharT>::__exec(__state& __s) const | |
| 2038 | 2062 | { |
| 2039 | 2063 | if (__s.__current_ == __s.__last_ && |
| 2040 | 2064 | !(__s.__flags_ & regex_constants::match_not_eol)) |
| ... | ... | @@ -2042,6 +2066,11 @@ __r_anchor<_CharT>::__exec(__state& __s) const |
| 2042 | 2066 | __s.__do_ = __state::__accept_but_not_consume; |
| 2043 | 2067 | __s.__node_ = this->first(); |
| 2044 | 2068 | } |
| 2069 | else if (__multiline && __is_eol(*__s.__current_)) | |
| 2070 | { | |
| 2071 | __s.__do_ = __state::__accept_but_not_consume; | |
| 2072 | __s.__node_ = this->first(); | |
| 2073 | } | |
| 2045 | 2074 | else |
| 2046 | 2075 | { |
| 2047 | 2076 | __s.__do_ = __state::__reject; |
| ... | ... | @@ -2448,7 +2477,7 @@ __bracket_expression<_CharT, _Traits>::__exec(__state& __s) const |
| 2448 | 2477 | { |
| 2449 | 2478 | const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_); |
| 2450 | 2479 | const bool __in_neg_chars = |
| 2451 | std::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != | |
| 2480 | _VSTD::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != | |
| 2452 | 2481 | __neg_chars_.end(); |
| 2453 | 2482 | if (!(__in_neg_mask || __in_neg_chars)) |
| 2454 | 2483 | { |
| ... | ... | @@ -2507,7 +2536,17 @@ __exit: |
| 2507 | 2536 | template <class _CharT, class _Traits> class __lookahead; |
| 2508 | 2537 | |
| 2509 | 2538 | template <class _CharT, class _Traits = regex_traits<_CharT> > |
| 2510 | class _LIBCPP_TEMPLATE_VIS basic_regex | |
| 2539 | class _LIBCPP_TEMPLATE_VIS basic_regex; | |
| 2540 | ||
| 2541 | typedef basic_regex<char> regex; | |
| 2542 | typedef basic_regex<wchar_t> wregex; | |
| 2543 | ||
| 2544 | template <class _CharT, class _Traits> | |
| 2545 | class | |
| 2546 | _LIBCPP_TEMPLATE_VIS | |
| 2547 | _LIBCPP_PREFERRED_NAME(regex) | |
| 2548 | _LIBCPP_PREFERRED_NAME(wregex) | |
| 2549 | basic_regex | |
| 2511 | 2550 | { |
| 2512 | 2551 | public: |
| 2513 | 2552 | // types: |
| ... | ... | @@ -2541,17 +2580,18 @@ public: |
| 2541 | 2580 | static const regex_constants::syntax_option_type awk = regex_constants::awk; |
| 2542 | 2581 | static const regex_constants::syntax_option_type grep = regex_constants::grep; |
| 2543 | 2582 | static const regex_constants::syntax_option_type egrep = regex_constants::egrep; |
| 2583 | static const regex_constants::syntax_option_type multiline = regex_constants::multiline; | |
| 2544 | 2584 | |
| 2545 | 2585 | // construct/copy/destroy: |
| 2546 | 2586 | _LIBCPP_INLINE_VISIBILITY |
| 2547 | 2587 | basic_regex() |
| 2548 | 2588 | : __flags_(regex_constants::ECMAScript), __marked_count_(0), __loop_count_(0), __open_count_(0), |
| 2549 | __end_(0) | |
| 2589 | __end_(nullptr) | |
| 2550 | 2590 | {} |
| 2551 | 2591 | _LIBCPP_INLINE_VISIBILITY |
| 2552 | 2592 | explicit basic_regex(const value_type* __p, flag_type __f = regex_constants::ECMAScript) |
| 2553 | 2593 | : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), |
| 2554 | __end_(0) | |
| 2594 | __end_(nullptr) | |
| 2555 | 2595 | { |
| 2556 | 2596 | __init(__p, __p + __traits_.length(__p)); |
| 2557 | 2597 | } |
| ... | ... | @@ -2559,7 +2599,7 @@ public: |
| 2559 | 2599 | _LIBCPP_INLINE_VISIBILITY |
| 2560 | 2600 | basic_regex(const value_type* __p, size_t __len, flag_type __f = regex_constants::ECMAScript) |
| 2561 | 2601 | : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), |
| 2562 | __end_(0) | |
| 2602 | __end_(nullptr) | |
| 2563 | 2603 | { |
| 2564 | 2604 | __init(__p, __p + __len); |
| 2565 | 2605 | } |
| ... | ... | @@ -2571,7 +2611,7 @@ public: |
| 2571 | 2611 | explicit basic_regex(const basic_string<value_type, _ST, _SA>& __p, |
| 2572 | 2612 | flag_type __f = regex_constants::ECMAScript) |
| 2573 | 2613 | : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), |
| 2574 | __end_(0) | |
| 2614 | __end_(nullptr) | |
| 2575 | 2615 | { |
| 2576 | 2616 | __init(__p.begin(), __p.end()); |
| 2577 | 2617 | } |
| ... | ... | @@ -2581,7 +2621,7 @@ public: |
| 2581 | 2621 | basic_regex(_ForwardIterator __first, _ForwardIterator __last, |
| 2582 | 2622 | flag_type __f = regex_constants::ECMAScript) |
| 2583 | 2623 | : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), |
| 2584 | __end_(0) | |
| 2624 | __end_(nullptr) | |
| 2585 | 2625 | { |
| 2586 | 2626 | __init(__first, __last); |
| 2587 | 2627 | } |
| ... | ... | @@ -2590,7 +2630,7 @@ public: |
| 2590 | 2630 | basic_regex(initializer_list<value_type> __il, |
| 2591 | 2631 | flag_type __f = regex_constants::ECMAScript) |
| 2592 | 2632 | : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), |
| 2593 | __end_(0) | |
| 2633 | __end_(nullptr) | |
| 2594 | 2634 | { |
| 2595 | 2635 | __init(__il.begin(), __il.end()); |
| 2596 | 2636 | } |
| ... | ... | @@ -2707,6 +2747,12 @@ private: |
| 2707 | 2747 | _LIBCPP_INLINE_VISIBILITY |
| 2708 | 2748 | unsigned __loop_count() const {return __loop_count_;} |
| 2709 | 2749 | |
| 2750 | _LIBCPP_INLINE_VISIBILITY | |
| 2751 | bool __use_multiline() const | |
| 2752 | { | |
| 2753 | return __get_grammar(__flags_) == ECMAScript && (__flags_ & multiline); | |
| 2754 | } | |
| 2755 | ||
| 2710 | 2756 | template <class _ForwardIterator> |
| 2711 | 2757 | void |
| 2712 | 2758 | __init(_ForwardIterator __first, _ForwardIterator __last); |
| ... | ... | @@ -4119,7 +4165,7 @@ basic_regex<_CharT, _Traits>::__parse_DUP_COUNT(_ForwardIterator __first, |
| 4119 | 4165 | __first != __last && ( __val = __traits_.value(*__first, 10)) != -1; |
| 4120 | 4166 | ++__first) |
| 4121 | 4167 | { |
| 4122 | if (__c >= std::numeric_limits<int>::max() / 10) | |
| 4168 | if (__c >= numeric_limits<int>::max() / 10) | |
| 4123 | 4169 | __throw_regex_error<regex_constants::error_badbrace>(); |
| 4124 | 4170 | __c *= 10; |
| 4125 | 4171 | __c += __val; |
| ... | ... | @@ -4383,7 +4429,7 @@ basic_regex<_CharT, _Traits>::__parse_decimal_escape(_ForwardIterator __first, |
| 4383 | 4429 | for (++__first; |
| 4384 | 4430 | __first != __last && '0' <= *__first && *__first <= '9'; ++__first) |
| 4385 | 4431 | { |
| 4386 | if (__v >= std::numeric_limits<unsigned>::max() / 10) | |
| 4432 | if (__v >= numeric_limits<unsigned>::max() / 10) | |
| 4387 | 4433 | __throw_regex_error<regex_constants::error_backref>(); |
| 4388 | 4434 | __v = 10 * __v + *__first - '0'; |
| 4389 | 4435 | } |
| ... | ... | @@ -4746,7 +4792,7 @@ template <class _CharT, class _Traits> |
| 4746 | 4792 | void |
| 4747 | 4793 | basic_regex<_CharT, _Traits>::__push_l_anchor() |
| 4748 | 4794 | { |
| 4749 | __end_->first() = new __l_anchor<_CharT>(__end_->first()); | |
| 4795 | __end_->first() = new __l_anchor_multiline<_CharT>(__use_multiline(), __end_->first()); | |
| 4750 | 4796 | __end_ = static_cast<__owns_one_state<_CharT>*>(__end_->first()); |
| 4751 | 4797 | } |
| 4752 | 4798 | |
| ... | ... | @@ -4754,7 +4800,7 @@ template <class _CharT, class _Traits> |
| 4754 | 4800 | void |
| 4755 | 4801 | basic_regex<_CharT, _Traits>::__push_r_anchor() |
| 4756 | 4802 | { |
| 4757 | __end_->first() = new __r_anchor<_CharT>(__end_->first()); | |
| 4803 | __end_->first() = new __r_anchor_multiline<_CharT>(__use_multiline(), __end_->first()); | |
| 4758 | 4804 | __end_ = static_cast<__owns_one_state<_CharT>*>(__end_->first()); |
| 4759 | 4805 | } |
| 4760 | 4806 | |
| ... | ... | @@ -4845,13 +4891,21 @@ basic_regex<_CharT, _Traits>::__push_lookahead(const basic_regex& __exp, |
| 4845 | 4891 | __end_ = static_cast<__owns_one_state<_CharT>*>(__end_->first()); |
| 4846 | 4892 | } |
| 4847 | 4893 | |
| 4848 | typedef basic_regex<char> regex; | |
| 4849 | typedef basic_regex<wchar_t> wregex; | |
| 4850 | ||
| 4851 | 4894 | // sub_match |
| 4852 | 4895 | |
| 4896 | typedef sub_match<const char*> csub_match; | |
| 4897 | typedef sub_match<const wchar_t*> wcsub_match; | |
| 4898 | typedef sub_match<string::const_iterator> ssub_match; | |
| 4899 | typedef sub_match<wstring::const_iterator> wssub_match; | |
| 4900 | ||
| 4853 | 4901 | template <class _BidirectionalIterator> |
| 4854 | class _LIBCPP_TEMPLATE_VIS sub_match | |
| 4902 | class | |
| 4903 | _LIBCPP_TEMPLATE_VIS | |
| 4904 | _LIBCPP_PREFERRED_NAME(csub_match) | |
| 4905 | _LIBCPP_PREFERRED_NAME(wcsub_match) | |
| 4906 | _LIBCPP_PREFERRED_NAME(ssub_match) | |
| 4907 | _LIBCPP_PREFERRED_NAME(wssub_match) | |
| 4908 | sub_match | |
| 4855 | 4909 | : public pair<_BidirectionalIterator, _BidirectionalIterator> |
| 4856 | 4910 | { |
| 4857 | 4911 | public: |
| ... | ... | @@ -4886,11 +4940,6 @@ public: |
| 4886 | 4940 | {return str().compare(__s);} |
| 4887 | 4941 | }; |
| 4888 | 4942 | |
| 4889 | typedef sub_match<const char*> csub_match; | |
| 4890 | typedef sub_match<const wchar_t*> wcsub_match; | |
| 4891 | typedef sub_match<string::const_iterator> ssub_match; | |
| 4892 | typedef sub_match<wstring::const_iterator> wssub_match; | |
| 4893 | ||
| 4894 | 4943 | template <class _BiIter> |
| 4895 | 4944 | inline _LIBCPP_INLINE_VISIBILITY |
| 4896 | 4945 | bool |
| ... | ... | @@ -5273,8 +5322,19 @@ operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m) |
| 5273 | 5322 | return __os << __m.str(); |
| 5274 | 5323 | } |
| 5275 | 5324 | |
| 5325 | typedef match_results<const char*> cmatch; | |
| 5326 | typedef match_results<const wchar_t*> wcmatch; | |
| 5327 | typedef match_results<string::const_iterator> smatch; | |
| 5328 | typedef match_results<wstring::const_iterator> wsmatch; | |
| 5329 | ||
| 5276 | 5330 | template <class _BidirectionalIterator, class _Allocator> |
| 5277 | class _LIBCPP_TEMPLATE_VIS match_results | |
| 5331 | class | |
| 5332 | _LIBCPP_TEMPLATE_VIS | |
| 5333 | _LIBCPP_PREFERRED_NAME(cmatch) | |
| 5334 | _LIBCPP_PREFERRED_NAME(wcmatch) | |
| 5335 | _LIBCPP_PREFERRED_NAME(smatch) | |
| 5336 | _LIBCPP_PREFERRED_NAME(wsmatch) | |
| 5337 | match_results | |
| 5278 | 5338 | { |
| 5279 | 5339 | public: |
| 5280 | 5340 | typedef _Allocator allocator_type; |
| ... | ... | @@ -5299,7 +5359,13 @@ public: |
| 5299 | 5359 | typedef basic_string<char_type> string_type; |
| 5300 | 5360 | |
| 5301 | 5361 | // construct/copy/destroy: |
| 5362 | #ifndef _LIBCPP_CXX03_LANG | |
| 5363 | match_results() : match_results(allocator_type()) {} | |
| 5364 | explicit match_results(const allocator_type& __a); | |
| 5365 | #else | |
| 5302 | 5366 | explicit match_results(const allocator_type& __a = allocator_type()); |
| 5367 | #endif | |
| 5368 | ||
| 5303 | 5369 | // match_results(const match_results&) = default; |
| 5304 | 5370 | // match_results& operator=(const match_results&) = default; |
| 5305 | 5371 | // match_results(match_results&& __m) = default; |
| ... | ... | @@ -5556,7 +5622,7 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_i |
| 5556 | 5622 | '0' <= __fmt_first[1] && __fmt_first[1] <= '9') |
| 5557 | 5623 | { |
| 5558 | 5624 | ++__fmt_first; |
| 5559 | if (__idx >= std::numeric_limits<size_t>::max() / 10) | |
| 5625 | if (__idx >= numeric_limits<size_t>::max() / 10) | |
| 5560 | 5626 | __throw_regex_error<regex_constants::error_escape>(); |
| 5561 | 5627 | __idx = 10 * __idx + *__fmt_first - '0'; |
| 5562 | 5628 | } |
| ... | ... | @@ -5594,11 +5660,6 @@ match_results<_BidirectionalIterator, _Allocator>::swap(match_results& __m) |
| 5594 | 5660 | swap(__ready_, __m.__ready_); |
| 5595 | 5661 | } |
| 5596 | 5662 | |
| 5597 | typedef match_results<const char*> cmatch; | |
| 5598 | typedef match_results<const wchar_t*> wcmatch; | |
| 5599 | typedef match_results<string::const_iterator> smatch; | |
| 5600 | typedef match_results<wstring::const_iterator> wsmatch; | |
| 5601 | ||
| 5602 | 5663 | template <class _BidirectionalIterator, class _Allocator> |
| 5603 | 5664 | bool |
| 5604 | 5665 | operator==(const match_results<_BidirectionalIterator, _Allocator>& __x, |
| ... | ... | @@ -6182,7 +6243,21 @@ regex_match(const basic_string<_CharT, _ST, _SA>& __s, |
| 6182 | 6243 | template <class _BidirectionalIterator, |
| 6183 | 6244 | class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type, |
| 6184 | 6245 | class _Traits = regex_traits<_CharT> > |
| 6185 | class _LIBCPP_TEMPLATE_VIS regex_iterator | |
| 6246 | class _LIBCPP_TEMPLATE_VIS regex_iterator; | |
| 6247 | ||
| 6248 | typedef regex_iterator<const char*> cregex_iterator; | |
| 6249 | typedef regex_iterator<const wchar_t*> wcregex_iterator; | |
| 6250 | typedef regex_iterator<string::const_iterator> sregex_iterator; | |
| 6251 | typedef regex_iterator<wstring::const_iterator> wsregex_iterator; | |
| 6252 | ||
| 6253 | template <class _BidirectionalIterator, class _CharT, class _Traits> | |
| 6254 | class | |
| 6255 | _LIBCPP_TEMPLATE_VIS | |
| 6256 | _LIBCPP_PREFERRED_NAME(cregex_iterator) | |
| 6257 | _LIBCPP_PREFERRED_NAME(wcregex_iterator) | |
| 6258 | _LIBCPP_PREFERRED_NAME(sregex_iterator) | |
| 6259 | _LIBCPP_PREFERRED_NAME(wsregex_iterator) | |
| 6260 | regex_iterator | |
| 6186 | 6261 | { |
| 6187 | 6262 | public: |
| 6188 | 6263 | typedef basic_regex<_CharT, _Traits> regex_type; |
| ... | ... | @@ -6291,17 +6366,26 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++() |
| 6291 | 6366 | return *this; |
| 6292 | 6367 | } |
| 6293 | 6368 | |
| 6294 | typedef regex_iterator<const char*> cregex_iterator; | |
| 6295 | typedef regex_iterator<const wchar_t*> wcregex_iterator; | |
| 6296 | typedef regex_iterator<string::const_iterator> sregex_iterator; | |
| 6297 | typedef regex_iterator<wstring::const_iterator> wsregex_iterator; | |
| 6298 | ||
| 6299 | 6369 | // regex_token_iterator |
| 6300 | 6370 | |
| 6301 | 6371 | template <class _BidirectionalIterator, |
| 6302 | 6372 | class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type, |
| 6303 | 6373 | class _Traits = regex_traits<_CharT> > |
| 6304 | class _LIBCPP_TEMPLATE_VIS regex_token_iterator | |
| 6374 | class _LIBCPP_TEMPLATE_VIS regex_token_iterator; | |
| 6375 | ||
| 6376 | typedef regex_token_iterator<const char*> cregex_token_iterator; | |
| 6377 | typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator; | |
| 6378 | typedef regex_token_iterator<string::const_iterator> sregex_token_iterator; | |
| 6379 | typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; | |
| 6380 | ||
| 6381 | template <class _BidirectionalIterator, class _CharT, class _Traits> | |
| 6382 | class | |
| 6383 | _LIBCPP_TEMPLATE_VIS | |
| 6384 | _LIBCPP_PREFERRED_NAME(cregex_token_iterator) | |
| 6385 | _LIBCPP_PREFERRED_NAME(wcregex_token_iterator) | |
| 6386 | _LIBCPP_PREFERRED_NAME(sregex_token_iterator) | |
| 6387 | _LIBCPP_PREFERRED_NAME(wsregex_token_iterator) | |
| 6388 | regex_token_iterator | |
| 6305 | 6389 | { |
| 6306 | 6390 | public: |
| 6307 | 6391 | typedef basic_regex<_CharT, _Traits> regex_type; |
| ... | ... | @@ -6367,7 +6451,7 @@ public: |
| 6367 | 6451 | regex_constants::match_flag_type __m = |
| 6368 | 6452 | regex_constants::match_default); |
| 6369 | 6453 | #if _LIBCPP_STD_VER > 11 |
| 6370 | template <std::size_t _Np> | |
| 6454 | template <size_t _Np> | |
| 6371 | 6455 | regex_token_iterator(_BidirectionalIterator __a, |
| 6372 | 6456 | _BidirectionalIterator __b, |
| 6373 | 6457 | const regex_type&& __re, |
| ... | ... | @@ -6579,11 +6663,6 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++() |
| 6579 | 6663 | return *this; |
| 6580 | 6664 | } |
| 6581 | 6665 | |
| 6582 | typedef regex_token_iterator<const char*> cregex_token_iterator; | |
| 6583 | typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator; | |
| 6584 | typedef regex_token_iterator<string::const_iterator> sregex_token_iterator; | |
| 6585 | typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; | |
| 6586 | ||
| 6587 | 6666 | // regex_replace |
| 6588 | 6667 | |
| 6589 | 6668 | template <class _OutputIterator, class _BidirectionalIterator, |
lib/libcxx/include/semaphore+7-2| ... | ... | @@ -46,9 +46,9 @@ using binary_semaphore = counting_semaphore<1>; |
| 46 | 46 | */ |
| 47 | 47 | |
| 48 | 48 | #include <__config> |
| 49 | #include <__availability> | |
| 49 | 50 | #include <__threading_support> |
| 50 | 51 | #include <atomic> |
| 51 | #include <cassert> | |
| 52 | 52 | |
| 53 | 53 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 54 | 54 | #pragma GCC system_header |
| ... | ... | @@ -58,6 +58,9 @@ using binary_semaphore = counting_semaphore<1>; |
| 58 | 58 | # error <semaphore> is not supported on this single threaded system |
| 59 | 59 | #endif |
| 60 | 60 | |
| 61 | _LIBCPP_PUSH_MACROS | |
| 62 | #include <__undef_macros> | |
| 63 | ||
| 61 | 64 | #if _LIBCPP_STD_VER >= 14 |
| 62 | 65 | |
| 63 | 66 | _LIBCPP_BEGIN_NAMESPACE_STD |
| ... | ... | @@ -68,7 +71,7 @@ __atomic_semaphore_base is the general-case implementation, to be used for |
| 68 | 71 | user-requested least-max values that exceed the OS implementation support |
| 69 | 72 | (incl. when the OS has no support of its own) and for binary semaphores. |
| 70 | 73 | |
| 71 | It is a typical Dijsktra semaphore algorithm over atomics, wait and notify | |
| 74 | It is a typical Dijkstra semaphore algorithm over atomics, wait and notify | |
| 72 | 75 | functions. It avoids contention against users' own use of those facilities. |
| 73 | 76 | |
| 74 | 77 | */ |
| ... | ... | @@ -232,4 +235,6 @@ _LIBCPP_END_NAMESPACE_STD |
| 232 | 235 | |
| 233 | 236 | #endif // _LIBCPP_STD_VER >= 14 |
| 234 | 237 | |
| 238 | _LIBCPP_POP_MACROS | |
| 239 | ||
| 235 | 240 | #endif //_LIBCPP_SEMAPHORE |
lib/libcxx/include/shared_mutex+1| ... | ... | @@ -123,6 +123,7 @@ template <class Mutex> |
| 123 | 123 | */ |
| 124 | 124 | |
| 125 | 125 | #include <__config> |
| 126 | #include <__availability> | |
| 126 | 127 | #include <version> |
| 127 | 128 | |
| 128 | 129 | _LIBCPP_PUSH_MACROS |
lib/libcxx/include/span+6-1| ... | ... | @@ -132,11 +132,14 @@ template<class Container> |
| 132 | 132 | #pragma GCC system_header |
| 133 | 133 | #endif |
| 134 | 134 | |
| 135 | _LIBCPP_PUSH_MACROS | |
| 136 | #include <__undef_macros> | |
| 137 | ||
| 135 | 138 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 136 | 139 | |
| 137 | 140 | #if _LIBCPP_STD_VER > 17 |
| 138 | 141 | |
| 139 | inline constexpr size_t dynamic_extent = (numeric_limits<size_t>::max)(); | |
| 142 | inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max(); | |
| 140 | 143 | template <typename _Tp, size_t _Extent = dynamic_extent> class span; |
| 141 | 144 | |
| 142 | 145 | |
| ... | ... | @@ -546,4 +549,6 @@ template<class _Container> |
| 546 | 549 | |
| 547 | 550 | _LIBCPP_END_NAMESPACE_STD |
| 548 | 551 | |
| 552 | _LIBCPP_POP_MACROS | |
| 553 | ||
| 549 | 554 | #endif // _LIBCPP_SPAN |
lib/libcxx/include/sstream+202-292| ... | ... | @@ -25,8 +25,10 @@ public: |
| 25 | 25 | typedef typename traits_type::off_type off_type; |
| 26 | 26 | typedef Allocator allocator_type; |
| 27 | 27 | |
| 28 | // 27.8.1.1 Constructors: | |
| 29 | explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out); | |
| 28 | // 27.8.1.1 [stringbuf.cons], constructors: | |
| 29 | explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out); // before C++20 | |
| 30 | basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} // C++20 | |
| 31 | explicit basic_stringbuf(ios_base::openmode which); // C++20 | |
| 30 | 32 | explicit basic_stringbuf(const basic_string<char_type, traits_type, allocator_type>& str, |
| 31 | 33 | ios_base::openmode which = ios_base::in | ios_base::out); |
| 32 | 34 | basic_stringbuf(basic_stringbuf&& rhs); |
| ... | ... | @@ -71,7 +73,10 @@ public: |
| 71 | 73 | typedef Allocator allocator_type; |
| 72 | 74 | |
| 73 | 75 | // 27.8.2.1 Constructors: |
| 74 | explicit basic_istringstream(ios_base::openmode which = ios_base::in); | |
| 76 | explicit basic_istringstream(ios_base::openmode which = ios_base::in); // before C++20 | |
| 77 | basic_istringstream() : basic_istringstream(ios_base::in) {} // C++20 | |
| 78 | explicit basic_istringstream(ios_base::openmode which); // C++20 | |
| 79 | ||
| 75 | 80 | explicit basic_istringstream(const basic_string<char_type, traits_type,allocator_type>& str, |
| 76 | 81 | ios_base::openmode which = ios_base::in); |
| 77 | 82 | basic_istringstream(basic_istringstream&& rhs); |
| ... | ... | @@ -107,7 +112,10 @@ public: |
| 107 | 112 | typedef Allocator allocator_type; |
| 108 | 113 | |
| 109 | 114 | // 27.8.3.1 Constructors/destructor: |
| 110 | explicit basic_ostringstream(ios_base::openmode which = ios_base::out); | |
| 115 | explicit basic_ostringstream(ios_base::openmode which = ios_base::out); // before C++20 | |
| 116 | basic_ostringstream() : basic_ostringstream(ios_base::out) {} // C++20 | |
| 117 | explicit basic_ostringstream(ios_base::openmode which); // C++20 | |
| 118 | ||
| 111 | 119 | explicit basic_ostringstream(const basic_string<char_type, traits_type, allocator_type>& str, |
| 112 | 120 | ios_base::openmode which = ios_base::out); |
| 113 | 121 | basic_ostringstream(basic_ostringstream&& rhs); |
| ... | ... | @@ -143,7 +151,10 @@ public: |
| 143 | 151 | typedef Allocator allocator_type; |
| 144 | 152 | |
| 145 | 153 | // constructors/destructor |
| 146 | explicit basic_stringstream(ios_base::openmode which = ios_base::out|ios_base::in); | |
| 154 | explicit basic_stringstream(ios_base::openmode which = ios_base::out | ios_base::in); // before C++20 | |
| 155 | basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {} // C++20 | |
| 156 | explicit basic_stringstream(ios_base::openmode which); // C++20 | |
| 157 | ||
| 147 | 158 | explicit basic_stringstream(const basic_string<char_type, traits_type, allocator_type>& str, |
| 148 | 159 | ios_base::openmode which = ios_base::out|ios_base::in); |
| 149 | 160 | basic_stringstream(basic_stringstream&& rhs); |
| ... | ... | @@ -207,18 +218,33 @@ private: |
| 207 | 218 | ios_base::openmode __mode_; |
| 208 | 219 | |
| 209 | 220 | public: |
| 210 | // 27.8.1.1 Constructors: | |
| 211 | inline _LIBCPP_INLINE_VISIBILITY | |
| 212 | explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in | ios_base::out); | |
| 213 | inline _LIBCPP_INLINE_VISIBILITY | |
| 214 | explicit basic_stringbuf(const string_type& __s, | |
| 215 | ios_base::openmode __wch = ios_base::in | ios_base::out); | |
| 221 | // 30.8.2.1 [stringbuf.cons], constructors | |
| 216 | 222 | #ifndef _LIBCPP_CXX03_LANG |
| 223 | _LIBCPP_INLINE_VISIBILITY | |
| 224 | basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} | |
| 225 | ||
| 226 | _LIBCPP_INLINE_VISIBILITY | |
| 227 | explicit basic_stringbuf(ios_base::openmode __wch) | |
| 228 | : __hm_(nullptr), __mode_(__wch) {} | |
| 229 | #else | |
| 230 | _LIBCPP_INLINE_VISIBILITY | |
| 231 | explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in | | |
| 232 | ios_base::out) | |
| 233 | : __hm_(nullptr), __mode_(__wch) {} | |
| 234 | #endif | |
| 235 | ||
| 236 | _LIBCPP_INLINE_VISIBILITY | |
| 237 | explicit basic_stringbuf(const string_type& __s, | |
| 238 | ios_base::openmode __wch = ios_base::in | ios_base::out) | |
| 239 | : __str_(__s.get_allocator()), __hm_(nullptr), __mode_(__wch) | |
| 240 | { | |
| 241 | str(__s); | |
| 242 | } | |
| 243 | ||
| 217 | 244 | basic_stringbuf(basic_stringbuf&& __rhs); |
| 218 | 245 | |
| 219 | 246 | // 27.8.1.2 Assign and swap: |
| 220 | 247 | basic_stringbuf& operator=(basic_stringbuf&& __rhs); |
| 221 | #endif | |
| 222 | 248 | void swap(basic_stringbuf& __rhs); |
| 223 | 249 | |
| 224 | 250 | // 27.8.1.3 Get and set: |
| ... | ... | @@ -232,30 +258,13 @@ protected: |
| 232 | 258 | virtual int_type overflow (int_type __c = traits_type::eof()); |
| 233 | 259 | virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, |
| 234 | 260 | ios_base::openmode __wch = ios_base::in | ios_base::out); |
| 235 | inline _LIBCPP_INLINE_VISIBILITY | |
| 261 | _LIBCPP_INLINE_VISIBILITY | |
| 236 | 262 | virtual pos_type seekpos(pos_type __sp, |
| 237 | ios_base::openmode __wch = ios_base::in | ios_base::out); | |
| 263 | ios_base::openmode __wch = ios_base::in | ios_base::out) { | |
| 264 | return seekoff(__sp, ios_base::beg, __wch); | |
| 265 | } | |
| 238 | 266 | }; |
| 239 | 267 | |
| 240 | template <class _CharT, class _Traits, class _Allocator> | |
| 241 | basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(ios_base::openmode __wch) | |
| 242 | : __hm_(0), | |
| 243 | __mode_(__wch) | |
| 244 | { | |
| 245 | } | |
| 246 | ||
| 247 | template <class _CharT, class _Traits, class _Allocator> | |
| 248 | basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type& __s, | |
| 249 | ios_base::openmode __wch) | |
| 250 | : __str_(__s.get_allocator()), | |
| 251 | __hm_(0), | |
| 252 | __mode_(__wch) | |
| 253 | { | |
| 254 | str(__s); | |
| 255 | } | |
| 256 | ||
| 257 | #ifndef _LIBCPP_CXX03_LANG | |
| 258 | ||
| 259 | 268 | template <class _CharT, class _Traits, class _Allocator> |
| 260 | 269 | basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs) |
| 261 | 270 | : __mode_(__rhs.__mode_) |
| ... | ... | @@ -345,8 +354,6 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs) |
| 345 | 354 | return *this; |
| 346 | 355 | } |
| 347 | 356 | |
| 348 | #endif // _LIBCPP_CXX03_LANG | |
| 349 | ||
| 350 | 357 | template <class _CharT, class _Traits, class _Allocator> |
| 351 | 358 | void |
| 352 | 359 | basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs) |
| ... | ... | @@ -453,7 +460,7 @@ void |
| 453 | 460 | basic_stringbuf<_CharT, _Traits, _Allocator>::str(const string_type& __s) |
| 454 | 461 | { |
| 455 | 462 | __str_ = __s; |
| 456 | __hm_ = 0; | |
| 463 | __hm_ = nullptr; | |
| 457 | 464 | if (__mode_ & ios_base::in) |
| 458 | 465 | { |
| 459 | 466 | __hm_ = const_cast<char_type*>(__str_.data()) + __str_.size(); |
| ... | ... | @@ -600,9 +607,9 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(off_type __off, |
| 600 | 607 | return pos_type(-1); |
| 601 | 608 | if (__noff != 0) |
| 602 | 609 | { |
| 603 | if ((__wch & ios_base::in) && this->gptr() == 0) | |
| 610 | if ((__wch & ios_base::in) && this->gptr() == nullptr) | |
| 604 | 611 | return pos_type(-1); |
| 605 | if ((__wch & ios_base::out) && this->pptr() == 0) | |
| 612 | if ((__wch & ios_base::out) && this->pptr() == nullptr) | |
| 606 | 613 | return pos_type(-1); |
| 607 | 614 | } |
| 608 | 615 | if (__wch & ios_base::in) |
| ... | ... | @@ -615,14 +622,6 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(off_type __off, |
| 615 | 622 | return pos_type(__noff); |
| 616 | 623 | } |
| 617 | 624 | |
| 618 | template <class _CharT, class _Traits, class _Allocator> | |
| 619 | typename basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type | |
| 620 | basic_stringbuf<_CharT, _Traits, _Allocator>::seekpos(pos_type __sp, | |
| 621 | ios_base::openmode __wch) | |
| 622 | { | |
| 623 | return seekoff(__sp, ios_base::beg, __wch); | |
| 624 | } | |
| 625 | ||
| 626 | 625 | // basic_istringstream |
| 627 | 626 | |
| 628 | 627 | template <class _CharT, class _Traits, class _Allocator> |
| ... | ... | @@ -643,74 +642,62 @@ private: |
| 643 | 642 | basic_stringbuf<char_type, traits_type, allocator_type> __sb_; |
| 644 | 643 | |
| 645 | 644 | public: |
| 646 | // 27.8.2.1 Constructors: | |
| 647 | inline _LIBCPP_INLINE_VISIBILITY | |
| 648 | explicit basic_istringstream(ios_base::openmode __wch = ios_base::in); | |
| 649 | inline _LIBCPP_INLINE_VISIBILITY | |
| 650 | explicit basic_istringstream(const string_type& __s, | |
| 651 | ios_base::openmode __wch = ios_base::in); | |
| 645 | // 30.8.3.1 [istringstream.cons], constructors | |
| 652 | 646 | #ifndef _LIBCPP_CXX03_LANG |
| 653 | inline _LIBCPP_INLINE_VISIBILITY | |
| 654 | basic_istringstream(basic_istringstream&& __rhs); | |
| 647 | _LIBCPP_INLINE_VISIBILITY | |
| 648 | basic_istringstream() : basic_istringstream(ios_base::in) {} | |
| 649 | ||
| 650 | _LIBCPP_INLINE_VISIBILITY | |
| 651 | explicit basic_istringstream(ios_base::openmode __wch) | |
| 652 | : basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) {} | |
| 653 | #else | |
| 654 | _LIBCPP_INLINE_VISIBILITY | |
| 655 | explicit basic_istringstream(ios_base::openmode __wch = ios_base::in) | |
| 656 | : basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) {} | |
| 657 | #endif | |
| 658 | ||
| 659 | _LIBCPP_INLINE_VISIBILITY | |
| 660 | explicit basic_istringstream(const string_type& __s, | |
| 661 | ios_base::openmode __wch = ios_base::in) | |
| 662 | : basic_istream<_CharT, _Traits>(&__sb_) | |
| 663 | , __sb_(__s, __wch | ios_base::in) | |
| 664 | { } | |
| 665 | ||
| 666 | _LIBCPP_INLINE_VISIBILITY | |
| 667 | basic_istringstream(basic_istringstream&& __rhs) | |
| 668 | : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)) | |
| 669 | , __sb_(_VSTD::move(__rhs.__sb_)) | |
| 670 | { | |
| 671 | basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_); | |
| 672 | } | |
| 655 | 673 | |
| 656 | 674 | // 27.8.2.2 Assign and swap: |
| 657 | basic_istringstream& operator=(basic_istringstream&& __rhs); | |
| 658 | #endif // _LIBCPP_CXX03_LANG | |
| 659 | inline _LIBCPP_INLINE_VISIBILITY | |
| 660 | void swap(basic_istringstream& __rhs); | |
| 675 | basic_istringstream& operator=(basic_istringstream&& __rhs) { | |
| 676 | basic_istream<char_type, traits_type>::operator=(_VSTD::move(__rhs)); | |
| 677 | __sb_ = _VSTD::move(__rhs.__sb_); | |
| 678 | return *this; | |
| 679 | } | |
| 680 | _LIBCPP_INLINE_VISIBILITY | |
| 681 | void swap(basic_istringstream& __rhs) { | |
| 682 | basic_istream<char_type, traits_type>::swap(__rhs); | |
| 683 | __sb_.swap(__rhs.__sb_); | |
| 684 | } | |
| 661 | 685 | |
| 662 | 686 | // 27.8.2.3 Members: |
| 663 | inline _LIBCPP_INLINE_VISIBILITY | |
| 664 | basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const; | |
| 665 | inline _LIBCPP_INLINE_VISIBILITY | |
| 666 | string_type str() const; | |
| 667 | inline _LIBCPP_INLINE_VISIBILITY | |
| 668 | void str(const string_type& __s); | |
| 687 | _LIBCPP_INLINE_VISIBILITY | |
| 688 | basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const { | |
| 689 | return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_); | |
| 690 | } | |
| 691 | _LIBCPP_INLINE_VISIBILITY | |
| 692 | string_type str() const { | |
| 693 | return __sb_.str(); | |
| 694 | } | |
| 695 | _LIBCPP_INLINE_VISIBILITY | |
| 696 | void str(const string_type& __s) { | |
| 697 | __sb_.str(__s); | |
| 698 | } | |
| 669 | 699 | }; |
| 670 | 700 | |
| 671 | template <class _CharT, class _Traits, class _Allocator> | |
| 672 | basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(ios_base::openmode __wch) | |
| 673 | : basic_istream<_CharT, _Traits>(&__sb_), | |
| 674 | __sb_(__wch | ios_base::in) | |
| 675 | { | |
| 676 | } | |
| 677 | ||
| 678 | template <class _CharT, class _Traits, class _Allocator> | |
| 679 | basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const string_type& __s, | |
| 680 | ios_base::openmode __wch) | |
| 681 | : basic_istream<_CharT, _Traits>(&__sb_), | |
| 682 | __sb_(__s, __wch | ios_base::in) | |
| 683 | { | |
| 684 | } | |
| 685 | ||
| 686 | #ifndef _LIBCPP_CXX03_LANG | |
| 687 | ||
| 688 | template <class _CharT, class _Traits, class _Allocator> | |
| 689 | basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(basic_istringstream&& __rhs) | |
| 690 | : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)), | |
| 691 | __sb_(_VSTD::move(__rhs.__sb_)) | |
| 692 | { | |
| 693 | basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_); | |
| 694 | } | |
| 695 | ||
| 696 | template <class _CharT, class _Traits, class _Allocator> | |
| 697 | basic_istringstream<_CharT, _Traits, _Allocator>& | |
| 698 | basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream&& __rhs) | |
| 699 | { | |
| 700 | basic_istream<char_type, traits_type>::operator=(_VSTD::move(__rhs)); | |
| 701 | __sb_ = _VSTD::move(__rhs.__sb_); | |
| 702 | return *this; | |
| 703 | } | |
| 704 | ||
| 705 | #endif // _LIBCPP_CXX03_LANG | |
| 706 | ||
| 707 | template <class _CharT, class _Traits, class _Allocator> | |
| 708 | void basic_istringstream<_CharT, _Traits, _Allocator>::swap(basic_istringstream& __rhs) | |
| 709 | { | |
| 710 | basic_istream<char_type, traits_type>::swap(__rhs); | |
| 711 | __sb_.swap(__rhs.__sb_); | |
| 712 | } | |
| 713 | ||
| 714 | 701 | template <class _CharT, class _Traits, class _Allocator> |
| 715 | 702 | inline _LIBCPP_INLINE_VISIBILITY |
| 716 | 703 | void |
| ... | ... | @@ -720,26 +707,6 @@ swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, |
| 720 | 707 | __x.swap(__y); |
| 721 | 708 | } |
| 722 | 709 | |
| 723 | template <class _CharT, class _Traits, class _Allocator> | |
| 724 | basic_stringbuf<_CharT, _Traits, _Allocator>* | |
| 725 | basic_istringstream<_CharT, _Traits, _Allocator>::rdbuf() const | |
| 726 | { | |
| 727 | return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_); | |
| 728 | } | |
| 729 | ||
| 730 | template <class _CharT, class _Traits, class _Allocator> | |
| 731 | basic_string<_CharT, _Traits, _Allocator> | |
| 732 | basic_istringstream<_CharT, _Traits, _Allocator>::str() const | |
| 733 | { | |
| 734 | return __sb_.str(); | |
| 735 | } | |
| 736 | ||
| 737 | template <class _CharT, class _Traits, class _Allocator> | |
| 738 | void basic_istringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s) | |
| 739 | { | |
| 740 | __sb_.str(__s); | |
| 741 | } | |
| 742 | ||
| 743 | 710 | // basic_ostringstream |
| 744 | 711 | |
| 745 | 712 | template <class _CharT, class _Traits, class _Allocator> |
| ... | ... | @@ -760,75 +727,65 @@ private: |
| 760 | 727 | basic_stringbuf<char_type, traits_type, allocator_type> __sb_; |
| 761 | 728 | |
| 762 | 729 | public: |
| 763 | // 27.8.2.1 Constructors: | |
| 764 | inline _LIBCPP_INLINE_VISIBILITY | |
| 765 | explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out); | |
| 766 | inline _LIBCPP_INLINE_VISIBILITY | |
| 767 | explicit basic_ostringstream(const string_type& __s, | |
| 768 | ios_base::openmode __wch = ios_base::out); | |
| 730 | // 30.8.4.1 [ostringstream.cons], constructors | |
| 769 | 731 | #ifndef _LIBCPP_CXX03_LANG |
| 770 | inline _LIBCPP_INLINE_VISIBILITY | |
| 771 | basic_ostringstream(basic_ostringstream&& __rhs); | |
| 732 | _LIBCPP_INLINE_VISIBILITY | |
| 733 | basic_ostringstream() : basic_ostringstream(ios_base::out) {} | |
| 734 | ||
| 735 | _LIBCPP_INLINE_VISIBILITY | |
| 736 | explicit basic_ostringstream(ios_base::openmode __wch) | |
| 737 | : basic_ostream<_CharT, _Traits>(&__sb_), | |
| 738 | __sb_(__wch | ios_base::out) {} | |
| 739 | #else | |
| 740 | _LIBCPP_INLINE_VISIBILITY | |
| 741 | explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out) | |
| 742 | : basic_ostream<_CharT, _Traits>(&__sb_), | |
| 743 | __sb_(__wch | ios_base::out) {} | |
| 744 | #endif | |
| 745 | ||
| 746 | _LIBCPP_INLINE_VISIBILITY | |
| 747 | explicit basic_ostringstream(const string_type& __s, | |
| 748 | ios_base::openmode __wch = ios_base::out) | |
| 749 | : basic_ostream<_CharT, _Traits>(&__sb_) | |
| 750 | , __sb_(__s, __wch | ios_base::out) | |
| 751 | { } | |
| 752 | ||
| 753 | _LIBCPP_INLINE_VISIBILITY | |
| 754 | basic_ostringstream(basic_ostringstream&& __rhs) | |
| 755 | : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs)) | |
| 756 | , __sb_(_VSTD::move(__rhs.__sb_)) | |
| 757 | { | |
| 758 | basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_); | |
| 759 | } | |
| 772 | 760 | |
| 773 | 761 | // 27.8.2.2 Assign and swap: |
| 774 | basic_ostringstream& operator=(basic_ostringstream&& __rhs); | |
| 775 | #endif // _LIBCPP_CXX03_LANG | |
| 776 | inline _LIBCPP_INLINE_VISIBILITY | |
| 777 | void swap(basic_ostringstream& __rhs); | |
| 762 | basic_ostringstream& operator=(basic_ostringstream&& __rhs) { | |
| 763 | basic_ostream<char_type, traits_type>::operator=(_VSTD::move(__rhs)); | |
| 764 | __sb_ = _VSTD::move(__rhs.__sb_); | |
| 765 | return *this; | |
| 766 | } | |
| 767 | ||
| 768 | _LIBCPP_INLINE_VISIBILITY | |
| 769 | void swap(basic_ostringstream& __rhs) { | |
| 770 | basic_ostream<char_type, traits_type>::swap(__rhs); | |
| 771 | __sb_.swap(__rhs.__sb_); | |
| 772 | } | |
| 778 | 773 | |
| 779 | 774 | // 27.8.2.3 Members: |
| 780 | inline _LIBCPP_INLINE_VISIBILITY | |
| 781 | basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const; | |
| 782 | inline _LIBCPP_INLINE_VISIBILITY | |
| 783 | string_type str() const; | |
| 784 | inline _LIBCPP_INLINE_VISIBILITY | |
| 785 | void str(const string_type& __s); | |
| 775 | _LIBCPP_INLINE_VISIBILITY | |
| 776 | basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const { | |
| 777 | return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_); | |
| 778 | } | |
| 779 | _LIBCPP_INLINE_VISIBILITY | |
| 780 | string_type str() const { | |
| 781 | return __sb_.str(); | |
| 782 | } | |
| 783 | _LIBCPP_INLINE_VISIBILITY | |
| 784 | void str(const string_type& __s) { | |
| 785 | __sb_.str(__s); | |
| 786 | } | |
| 786 | 787 | }; |
| 787 | 788 | |
| 788 | template <class _CharT, class _Traits, class _Allocator> | |
| 789 | basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(ios_base::openmode __wch) | |
| 790 | : basic_ostream<_CharT, _Traits>(&__sb_), | |
| 791 | __sb_(__wch | ios_base::out) | |
| 792 | { | |
| 793 | } | |
| 794 | ||
| 795 | template <class _CharT, class _Traits, class _Allocator> | |
| 796 | basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const string_type& __s, | |
| 797 | ios_base::openmode __wch) | |
| 798 | : basic_ostream<_CharT, _Traits>(&__sb_), | |
| 799 | __sb_(__s, __wch | ios_base::out) | |
| 800 | { | |
| 801 | } | |
| 802 | ||
| 803 | #ifndef _LIBCPP_CXX03_LANG | |
| 804 | ||
| 805 | template <class _CharT, class _Traits, class _Allocator> | |
| 806 | basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(basic_ostringstream&& __rhs) | |
| 807 | : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs)), | |
| 808 | __sb_(_VSTD::move(__rhs.__sb_)) | |
| 809 | { | |
| 810 | basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_); | |
| 811 | } | |
| 812 | ||
| 813 | template <class _CharT, class _Traits, class _Allocator> | |
| 814 | basic_ostringstream<_CharT, _Traits, _Allocator>& | |
| 815 | basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream&& __rhs) | |
| 816 | { | |
| 817 | basic_ostream<char_type, traits_type>::operator=(_VSTD::move(__rhs)); | |
| 818 | __sb_ = _VSTD::move(__rhs.__sb_); | |
| 819 | return *this; | |
| 820 | } | |
| 821 | ||
| 822 | #endif // _LIBCPP_CXX03_LANG | |
| 823 | ||
| 824 | template <class _CharT, class _Traits, class _Allocator> | |
| 825 | void | |
| 826 | basic_ostringstream<_CharT, _Traits, _Allocator>::swap(basic_ostringstream& __rhs) | |
| 827 | { | |
| 828 | basic_ostream<char_type, traits_type>::swap(__rhs); | |
| 829 | __sb_.swap(__rhs.__sb_); | |
| 830 | } | |
| 831 | ||
| 832 | 789 | template <class _CharT, class _Traits, class _Allocator> |
| 833 | 790 | inline _LIBCPP_INLINE_VISIBILITY |
| 834 | 791 | void |
| ... | ... | @@ -838,27 +795,6 @@ swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, |
| 838 | 795 | __x.swap(__y); |
| 839 | 796 | } |
| 840 | 797 | |
| 841 | template <class _CharT, class _Traits, class _Allocator> | |
| 842 | basic_stringbuf<_CharT, _Traits, _Allocator>* | |
| 843 | basic_ostringstream<_CharT, _Traits, _Allocator>::rdbuf() const | |
| 844 | { | |
| 845 | return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_); | |
| 846 | } | |
| 847 | ||
| 848 | template <class _CharT, class _Traits, class _Allocator> | |
| 849 | basic_string<_CharT, _Traits, _Allocator> | |
| 850 | basic_ostringstream<_CharT, _Traits, _Allocator>::str() const | |
| 851 | { | |
| 852 | return __sb_.str(); | |
| 853 | } | |
| 854 | ||
| 855 | template <class _CharT, class _Traits, class _Allocator> | |
| 856 | void | |
| 857 | basic_ostringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s) | |
| 858 | { | |
| 859 | __sb_.str(__s); | |
| 860 | } | |
| 861 | ||
| 862 | 798 | // basic_stringstream |
| 863 | 799 | |
| 864 | 800 | template <class _CharT, class _Traits, class _Allocator> |
| ... | ... | @@ -879,75 +815,63 @@ private: |
| 879 | 815 | basic_stringbuf<char_type, traits_type, allocator_type> __sb_; |
| 880 | 816 | |
| 881 | 817 | public: |
| 882 | // 27.8.2.1 Constructors: | |
| 883 | inline _LIBCPP_INLINE_VISIBILITY | |
| 884 | explicit basic_stringstream(ios_base::openmode __wch = ios_base::in | ios_base::out); | |
| 885 | inline _LIBCPP_INLINE_VISIBILITY | |
| 886 | explicit basic_stringstream(const string_type& __s, | |
| 887 | ios_base::openmode __wch = ios_base::in | ios_base::out); | |
| 818 | // 30.8.5.1 [stringstream.cons], constructors | |
| 888 | 819 | #ifndef _LIBCPP_CXX03_LANG |
| 889 | inline _LIBCPP_INLINE_VISIBILITY | |
| 890 | basic_stringstream(basic_stringstream&& __rhs); | |
| 820 | _LIBCPP_INLINE_VISIBILITY | |
| 821 | basic_stringstream() : basic_stringstream(ios_base::in | ios_base::out) {} | |
| 822 | ||
| 823 | _LIBCPP_INLINE_VISIBILITY | |
| 824 | explicit basic_stringstream(ios_base::openmode __wch) | |
| 825 | : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) {} | |
| 826 | #else | |
| 827 | _LIBCPP_INLINE_VISIBILITY | |
| 828 | explicit basic_stringstream(ios_base::openmode __wch = ios_base::in | | |
| 829 | ios_base::out) | |
| 830 | : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) {} | |
| 831 | #endif | |
| 832 | ||
| 833 | _LIBCPP_INLINE_VISIBILITY | |
| 834 | explicit basic_stringstream(const string_type& __s, | |
| 835 | ios_base::openmode __wch = ios_base::in | ios_base::out) | |
| 836 | : basic_iostream<_CharT, _Traits>(&__sb_) | |
| 837 | , __sb_(__s, __wch) | |
| 838 | { } | |
| 839 | ||
| 840 | _LIBCPP_INLINE_VISIBILITY | |
| 841 | basic_stringstream(basic_stringstream&& __rhs) | |
| 842 | : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs)) | |
| 843 | , __sb_(_VSTD::move(__rhs.__sb_)) | |
| 844 | { | |
| 845 | basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_); | |
| 846 | } | |
| 891 | 847 | |
| 892 | 848 | // 27.8.2.2 Assign and swap: |
| 893 | basic_stringstream& operator=(basic_stringstream&& __rhs); | |
| 894 | #endif // _LIBCPP_CXX03_LANG | |
| 895 | inline _LIBCPP_INLINE_VISIBILITY | |
| 896 | void swap(basic_stringstream& __rhs); | |
| 849 | basic_stringstream& operator=(basic_stringstream&& __rhs) { | |
| 850 | basic_iostream<char_type, traits_type>::operator=(_VSTD::move(__rhs)); | |
| 851 | __sb_ = _VSTD::move(__rhs.__sb_); | |
| 852 | return *this; | |
| 853 | } | |
| 854 | _LIBCPP_INLINE_VISIBILITY | |
| 855 | void swap(basic_stringstream& __rhs) { | |
| 856 | basic_iostream<char_type, traits_type>::swap(__rhs); | |
| 857 | __sb_.swap(__rhs.__sb_); | |
| 858 | } | |
| 897 | 859 | |
| 898 | 860 | // 27.8.2.3 Members: |
| 899 | inline _LIBCPP_INLINE_VISIBILITY | |
| 900 | basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const; | |
| 901 | inline _LIBCPP_INLINE_VISIBILITY | |
| 902 | string_type str() const; | |
| 903 | inline _LIBCPP_INLINE_VISIBILITY | |
| 904 | void str(const string_type& __s); | |
| 861 | _LIBCPP_INLINE_VISIBILITY | |
| 862 | basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const { | |
| 863 | return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_); | |
| 864 | } | |
| 865 | _LIBCPP_INLINE_VISIBILITY | |
| 866 | string_type str() const { | |
| 867 | return __sb_.str(); | |
| 868 | } | |
| 869 | _LIBCPP_INLINE_VISIBILITY | |
| 870 | void str(const string_type& __s) { | |
| 871 | __sb_.str(__s); | |
| 872 | } | |
| 905 | 873 | }; |
| 906 | 874 | |
| 907 | template <class _CharT, class _Traits, class _Allocator> | |
| 908 | basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(ios_base::openmode __wch) | |
| 909 | : basic_iostream<_CharT, _Traits>(&__sb_), | |
| 910 | __sb_(__wch) | |
| 911 | { | |
| 912 | } | |
| 913 | ||
| 914 | template <class _CharT, class _Traits, class _Allocator> | |
| 915 | basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string_type& __s, | |
| 916 | ios_base::openmode __wch) | |
| 917 | : basic_iostream<_CharT, _Traits>(&__sb_), | |
| 918 | __sb_(__s, __wch) | |
| 919 | { | |
| 920 | } | |
| 921 | ||
| 922 | #ifndef _LIBCPP_CXX03_LANG | |
| 923 | ||
| 924 | template <class _CharT, class _Traits, class _Allocator> | |
| 925 | basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(basic_stringstream&& __rhs) | |
| 926 | : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs)), | |
| 927 | __sb_(_VSTD::move(__rhs.__sb_)) | |
| 928 | { | |
| 929 | basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_); | |
| 930 | } | |
| 931 | ||
| 932 | template <class _CharT, class _Traits, class _Allocator> | |
| 933 | basic_stringstream<_CharT, _Traits, _Allocator>& | |
| 934 | basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&& __rhs) | |
| 935 | { | |
| 936 | basic_iostream<char_type, traits_type>::operator=(_VSTD::move(__rhs)); | |
| 937 | __sb_ = _VSTD::move(__rhs.__sb_); | |
| 938 | return *this; | |
| 939 | } | |
| 940 | ||
| 941 | #endif // _LIBCPP_CXX03_LANG | |
| 942 | ||
| 943 | template <class _CharT, class _Traits, class _Allocator> | |
| 944 | void | |
| 945 | basic_stringstream<_CharT, _Traits, _Allocator>::swap(basic_stringstream& __rhs) | |
| 946 | { | |
| 947 | basic_iostream<char_type, traits_type>::swap(__rhs); | |
| 948 | __sb_.swap(__rhs.__sb_); | |
| 949 | } | |
| 950 | ||
| 951 | 875 | template <class _CharT, class _Traits, class _Allocator> |
| 952 | 876 | inline _LIBCPP_INLINE_VISIBILITY |
| 953 | 877 | void |
| ... | ... | @@ -957,26 +881,12 @@ swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, |
| 957 | 881 | __x.swap(__y); |
| 958 | 882 | } |
| 959 | 883 | |
| 960 | template <class _CharT, class _Traits, class _Allocator> | |
| 961 | basic_stringbuf<_CharT, _Traits, _Allocator>* | |
| 962 | basic_stringstream<_CharT, _Traits, _Allocator>::rdbuf() const | |
| 963 | { | |
| 964 | return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_); | |
| 965 | } | |
| 966 | ||
| 967 | template <class _CharT, class _Traits, class _Allocator> | |
| 968 | basic_string<_CharT, _Traits, _Allocator> | |
| 969 | basic_stringstream<_CharT, _Traits, _Allocator>::str() const | |
| 970 | { | |
| 971 | return __sb_.str(); | |
| 972 | } | |
| 973 | ||
| 974 | template <class _CharT, class _Traits, class _Allocator> | |
| 975 | void | |
| 976 | basic_stringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s) | |
| 977 | { | |
| 978 | __sb_.str(__s); | |
| 979 | } | |
| 884 | #if defined(_LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1) | |
| 885 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringbuf<char>) | |
| 886 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringstream<char>) | |
| 887 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostringstream<char>) | |
| 888 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istringstream<char>) | |
| 889 | #endif | |
| 980 | 890 | |
| 981 | 891 | _LIBCPP_END_NAMESPACE_STD |
| 982 | 892 |
lib/libcxx/include/stdexcept+1-3| ... | ... | @@ -42,11 +42,9 @@ public: |
| 42 | 42 | */ |
| 43 | 43 | |
| 44 | 44 | #include <__config> |
| 45 | #include <cstdlib> | |
| 45 | 46 | #include <exception> |
| 46 | 47 | #include <iosfwd> // for string forward decl |
| 47 | #ifdef _LIBCPP_NO_EXCEPTIONS | |
| 48 | #include <cstdlib> | |
| 49 | #endif | |
| 50 | 48 | |
| 51 | 49 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 52 | 50 | #pragma GCC system_header |
lib/libcxx/include/streambuf+6-8| ... | ... | @@ -308,12 +308,12 @@ basic_streambuf<_CharT, _Traits>::~basic_streambuf() |
| 308 | 308 | |
| 309 | 309 | template <class _CharT, class _Traits> |
| 310 | 310 | basic_streambuf<_CharT, _Traits>::basic_streambuf() |
| 311 | : __binp_(0), | |
| 312 | __ninp_(0), | |
| 313 | __einp_(0), | |
| 314 | __bout_(0), | |
| 315 | __nout_(0), | |
| 316 | __eout_(0) | |
| 311 | : __binp_(nullptr), | |
| 312 | __ninp_(nullptr), | |
| 313 | __einp_(nullptr), | |
| 314 | __bout_(nullptr), | |
| 315 | __nout_(nullptr), | |
| 316 | __eout_(nullptr) | |
| 317 | 317 | { |
| 318 | 318 | } |
| 319 | 319 | |
| ... | ... | @@ -485,13 +485,11 @@ basic_streambuf<_CharT, _Traits>::overflow(int_type) |
| 485 | 485 | return traits_type::eof(); |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | #ifndef _LIBCPP_DO_NOT_ASSUME_STREAMS_EXPLICIT_INSTANTIATION_IN_DYLIB | |
| 489 | 488 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>) |
| 490 | 489 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>) |
| 491 | 490 | |
| 492 | 491 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>) |
| 493 | 492 | _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>) |
| 494 | #endif | |
| 495 | 493 | |
| 496 | 494 | _LIBCPP_END_NAMESPACE_STD |
| 497 | 495 |
lib/libcxx/include/string+198-144| ... | ... | @@ -153,7 +153,8 @@ public: |
| 153 | 153 | void resize(size_type n, value_type c); |
| 154 | 154 | void resize(size_type n); |
| 155 | 155 | |
| 156 | void reserve(size_type res_arg = 0); | |
| 156 | void reserve(size_type res_arg); | |
| 157 | void reserve(); // deprecated in C++20 | |
| 157 | 158 | void shrink_to_fit(); |
| 158 | 159 | void clear() noexcept; |
| 159 | 160 | bool empty() const noexcept; |
| ... | ... | @@ -316,12 +317,16 @@ public: |
| 316 | 317 | int compare(size_type pos1, size_type n1, const value_type* s) const; |
| 317 | 318 | int compare(size_type pos1, size_type n1, const value_type* s, size_type n2) const; |
| 318 | 319 | |
| 319 | bool starts_with(basic_string_view<charT, traits> sv) const noexcept; // C++2a | |
| 320 | bool starts_with(charT c) const noexcept; // C++2a | |
| 321 | bool starts_with(const charT* s) const; // C++2a | |
| 322 | bool ends_with(basic_string_view<charT, traits> sv) const noexcept; // C++2a | |
| 323 | bool ends_with(charT c) const noexcept; // C++2a | |
| 324 | bool ends_with(const charT* s) const; // C++2a | |
| 320 | bool starts_with(basic_string_view<charT, traits> sv) const noexcept; // C++20 | |
| 321 | bool starts_with(charT c) const noexcept; // C++20 | |
| 322 | bool starts_with(const charT* s) const; // C++20 | |
| 323 | bool ends_with(basic_string_view<charT, traits> sv) const noexcept; // C++20 | |
| 324 | bool ends_with(charT c) const noexcept; // C++20 | |
| 325 | bool ends_with(const charT* s) const; // C++20 | |
| 326 | ||
| 327 | constexpr bool contains(basic_string_view<charT, traits> sv) const noexcept; // C++2b | |
| 328 | constexpr bool contains(charT c) const noexcept; // C++2b | |
| 329 | constexpr bool contains(const charT* s) const; // C++2b | |
| 325 | 330 | |
| 326 | 331 | bool __invariants() const; |
| 327 | 332 | }; |
| ... | ... | @@ -448,15 +453,15 @@ typedef basic_string<wchar_t> wstring; |
| 448 | 453 | typedef basic_string<char16_t> u16string; |
| 449 | 454 | typedef basic_string<char32_t> u32string; |
| 450 | 455 | |
| 451 | int stoi (const string& str, size_t* idx = 0, int base = 10); | |
| 452 | long stol (const string& str, size_t* idx = 0, int base = 10); | |
| 453 | unsigned long stoul (const string& str, size_t* idx = 0, int base = 10); | |
| 454 | long long stoll (const string& str, size_t* idx = 0, int base = 10); | |
| 455 | unsigned long long stoull(const string& str, size_t* idx = 0, int base = 10); | |
| 456 | int stoi (const string& str, size_t* idx = nullptr, int base = 10); | |
| 457 | long stol (const string& str, size_t* idx = nullptr, int base = 10); | |
| 458 | unsigned long stoul (const string& str, size_t* idx = nullptr, int base = 10); | |
| 459 | long long stoll (const string& str, size_t* idx = nullptr, int base = 10); | |
| 460 | unsigned long long stoull(const string& str, size_t* idx = nullptr, int base = 10); | |
| 456 | 461 | |
| 457 | float stof (const string& str, size_t* idx = 0); | |
| 458 | double stod (const string& str, size_t* idx = 0); | |
| 459 | long double stold(const string& str, size_t* idx = 0); | |
| 462 | float stof (const string& str, size_t* idx = nullptr); | |
| 463 | double stod (const string& str, size_t* idx = nullptr); | |
| 464 | long double stold(const string& str, size_t* idx = nullptr); | |
| 460 | 465 | |
| 461 | 466 | string to_string(int val); |
| 462 | 467 | string to_string(unsigned val); |
| ... | ... | @@ -468,15 +473,15 @@ string to_string(float val); |
| 468 | 473 | string to_string(double val); |
| 469 | 474 | string to_string(long double val); |
| 470 | 475 | |
| 471 | int stoi (const wstring& str, size_t* idx = 0, int base = 10); | |
| 472 | long stol (const wstring& str, size_t* idx = 0, int base = 10); | |
| 473 | unsigned long stoul (const wstring& str, size_t* idx = 0, int base = 10); | |
| 474 | long long stoll (const wstring& str, size_t* idx = 0, int base = 10); | |
| 475 | unsigned long long stoull(const wstring& str, size_t* idx = 0, int base = 10); | |
| 476 | int stoi (const wstring& str, size_t* idx = nullptr, int base = 10); | |
| 477 | long stol (const wstring& str, size_t* idx = nullptr, int base = 10); | |
| 478 | unsigned long stoul (const wstring& str, size_t* idx = nullptr, int base = 10); | |
| 479 | long long stoll (const wstring& str, size_t* idx = nullptr, int base = 10); | |
| 480 | unsigned long long stoull(const wstring& str, size_t* idx = nullptr, int base = 10); | |
| 476 | 481 | |
| 477 | float stof (const wstring& str, size_t* idx = 0); | |
| 478 | double stod (const wstring& str, size_t* idx = 0); | |
| 479 | long double stold(const wstring& str, size_t* idx = 0); | |
| 482 | float stof (const wstring& str, size_t* idx = nullptr); | |
| 483 | double stod (const wstring& str, size_t* idx = nullptr); | |
| 484 | long double stold(const wstring& str, size_t* idx = nullptr); | |
| 480 | 485 | |
| 481 | 486 | wstring to_wstring(int val); |
| 482 | 487 | wstring to_wstring(unsigned val); |
| ... | ... | @@ -665,8 +670,26 @@ struct __padding<_CharT, 1> |
| 665 | 670 | |
| 666 | 671 | #endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT |
| 667 | 672 | |
| 673 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 674 | typedef basic_string<char8_t> u8string; | |
| 675 | #endif | |
| 676 | ||
| 677 | #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS | |
| 678 | typedef basic_string<char16_t> u16string; | |
| 679 | typedef basic_string<char32_t> u32string; | |
| 680 | #endif // _LIBCPP_HAS_NO_UNICODE_CHARS | |
| 681 | ||
| 668 | 682 | template<class _CharT, class _Traits, class _Allocator> |
| 669 | class _LIBCPP_TEMPLATE_VIS basic_string | |
| 683 | class | |
| 684 | _LIBCPP_TEMPLATE_VIS | |
| 685 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 686 | _LIBCPP_PREFERRED_NAME(u8string) | |
| 687 | #endif | |
| 688 | #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS | |
| 689 | _LIBCPP_PREFERRED_NAME(u16string) | |
| 690 | _LIBCPP_PREFERRED_NAME(u32string) | |
| 691 | #endif | |
| 692 | basic_string | |
| 670 | 693 | : private __basic_string_common<true> |
| 671 | 694 | { |
| 672 | 695 | public: |
| ... | ... | @@ -816,7 +839,7 @@ public: |
| 816 | 839 | basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) { |
| 817 | 840 | _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr"); |
| 818 | 841 | __init(__s, traits_type::length(__s)); |
| 819 | # if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 842 | # if _LIBCPP_DEBUG_LEVEL == 2 | |
| 820 | 843 | __get_db()->__insert_c(this); |
| 821 | 844 | # endif |
| 822 | 845 | } |
| ... | ... | @@ -890,7 +913,7 @@ public: |
| 890 | 913 | _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const value_type* __s) {return assign(__s);} |
| 891 | 914 | basic_string& operator=(value_type __c); |
| 892 | 915 | |
| 893 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 916 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 894 | 917 | _LIBCPP_INLINE_VISIBILITY |
| 895 | 918 | iterator begin() _NOEXCEPT |
| 896 | 919 | {return iterator(this, __get_pointer());} |
| ... | ... | @@ -916,7 +939,7 @@ public: |
| 916 | 939 | _LIBCPP_INLINE_VISIBILITY |
| 917 | 940 | const_iterator end() const _NOEXCEPT |
| 918 | 941 | {return const_iterator(__get_pointer() + size());} |
| 919 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 942 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 920 | 943 | _LIBCPP_INLINE_VISIBILITY |
| 921 | 944 | reverse_iterator rbegin() _NOEXCEPT |
| 922 | 945 | {return reverse_iterator(end());} |
| ... | ... | @@ -954,13 +977,13 @@ public: |
| 954 | 977 | void resize(size_type __n, value_type __c); |
| 955 | 978 | _LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());} |
| 956 | 979 | |
| 957 | void reserve(size_type __res_arg); | |
| 980 | void reserve(size_type __requested_capacity); | |
| 958 | 981 | _LIBCPP_INLINE_VISIBILITY void __resize_default_init(size_type __n); |
| 959 | 982 | |
| 983 | _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_INLINE_VISIBILITY | |
| 984 | void reserve() _NOEXCEPT {shrink_to_fit();} | |
| 960 | 985 | _LIBCPP_INLINE_VISIBILITY |
| 961 | void reserve() _NOEXCEPT {reserve(0);} | |
| 962 | _LIBCPP_INLINE_VISIBILITY | |
| 963 | void shrink_to_fit() _NOEXCEPT {reserve();} | |
| 986 | void shrink_to_fit() _NOEXCEPT; | |
| 964 | 987 | _LIBCPP_INLINE_VISIBILITY |
| 965 | 988 | void clear() _NOEXCEPT; |
| 966 | 989 | _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1414,22 +1437,38 @@ public: |
| 1414 | 1437 | { return ends_with(__self_view(__s)); } |
| 1415 | 1438 | #endif |
| 1416 | 1439 | |
| 1440 | #if _LIBCPP_STD_VER > 20 | |
| 1441 | constexpr _LIBCPP_INLINE_VISIBILITY | |
| 1442 | bool contains(__self_view __sv) const noexcept | |
| 1443 | { return __self_view(data(), size()).contains(__sv); } | |
| 1444 | ||
| 1445 | constexpr _LIBCPP_INLINE_VISIBILITY | |
| 1446 | bool contains(value_type __c) const noexcept | |
| 1447 | { return __self_view(data(), size()).contains(__c); } | |
| 1448 | ||
| 1449 | constexpr _LIBCPP_INLINE_VISIBILITY | |
| 1450 | bool contains(const value_type* __s) const | |
| 1451 | { return __self_view(data(), size()).contains(__s); } | |
| 1452 | #endif | |
| 1453 | ||
| 1417 | 1454 | _LIBCPP_INLINE_VISIBILITY bool __invariants() const; |
| 1418 | 1455 | |
| 1419 | 1456 | _LIBCPP_INLINE_VISIBILITY void __clear_and_shrink() _NOEXCEPT; |
| 1420 | 1457 | |
| 1458 | _LIBCPP_INLINE_VISIBILITY void __shrink_or_extend(size_type __target_capacity); | |
| 1459 | ||
| 1421 | 1460 | _LIBCPP_INLINE_VISIBILITY |
| 1422 | 1461 | bool __is_long() const _NOEXCEPT |
| 1423 | 1462 | {return bool(__r_.first().__s.__size_ & __short_mask);} |
| 1424 | 1463 | |
| 1425 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1464 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1426 | 1465 | |
| 1427 | 1466 | bool __dereferenceable(const const_iterator* __i) const; |
| 1428 | 1467 | bool __decrementable(const const_iterator* __i) const; |
| 1429 | 1468 | bool __addable(const const_iterator* __i, ptrdiff_t __n) const; |
| 1430 | 1469 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const; |
| 1431 | 1470 | |
| 1432 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1471 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 1433 | 1472 | |
| 1434 | 1473 | private: |
| 1435 | 1474 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1726,21 +1765,21 @@ inline |
| 1726 | 1765 | void |
| 1727 | 1766 | basic_string<_CharT, _Traits, _Allocator>::__invalidate_all_iterators() |
| 1728 | 1767 | { |
| 1729 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1768 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1730 | 1769 | __get_db()->__invalidate_all(this); |
| 1731 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1770 | #endif | |
| 1732 | 1771 | } |
| 1733 | 1772 | |
| 1734 | 1773 | template <class _CharT, class _Traits, class _Allocator> |
| 1735 | 1774 | inline |
| 1736 | 1775 | void |
| 1737 | 1776 | basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type |
| 1738 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1777 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1739 | 1778 | __pos |
| 1740 | 1779 | #endif |
| 1741 | 1780 | ) |
| 1742 | 1781 | { |
| 1743 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1782 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1744 | 1783 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 1745 | 1784 | if (__c) |
| 1746 | 1785 | { |
| ... | ... | @@ -1753,12 +1792,12 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type |
| 1753 | 1792 | { |
| 1754 | 1793 | (*__p)->__c_ = nullptr; |
| 1755 | 1794 | if (--__c->end_ != __p) |
| 1756 | memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1795 | _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 1757 | 1796 | } |
| 1758 | 1797 | } |
| 1759 | 1798 | __get_db()->unlock(); |
| 1760 | 1799 | } |
| 1761 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1800 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 1762 | 1801 | } |
| 1763 | 1802 | |
| 1764 | 1803 | template <class _CharT, class _Traits, class _Allocator> |
| ... | ... | @@ -1767,7 +1806,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string() |
| 1767 | 1806 | _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) |
| 1768 | 1807 | : __r_(__default_init_tag(), __default_init_tag()) |
| 1769 | 1808 | { |
| 1770 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1809 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1771 | 1810 | __get_db()->__insert_c(this); |
| 1772 | 1811 | #endif |
| 1773 | 1812 | __zero(); |
| ... | ... | @@ -1783,7 +1822,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __ |
| 1783 | 1822 | #endif |
| 1784 | 1823 | : __r_(__default_init_tag(), __a) |
| 1785 | 1824 | { |
| 1786 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1825 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1787 | 1826 | __get_db()->__insert_c(this); |
| 1788 | 1827 | #endif |
| 1789 | 1828 | __zero(); |
| ... | ... | @@ -1845,7 +1884,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const |
| 1845 | 1884 | { |
| 1846 | 1885 | _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr"); |
| 1847 | 1886 | __init(__s, traits_type::length(__s)); |
| 1848 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1887 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1849 | 1888 | __get_db()->__insert_c(this); |
| 1850 | 1889 | #endif |
| 1851 | 1890 | } |
| ... | ... | @@ -1857,7 +1896,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_ |
| 1857 | 1896 | { |
| 1858 | 1897 | _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr"); |
| 1859 | 1898 | __init(__s, __n); |
| 1860 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1899 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1861 | 1900 | __get_db()->__insert_c(this); |
| 1862 | 1901 | #endif |
| 1863 | 1902 | } |
| ... | ... | @@ -1869,7 +1908,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_ |
| 1869 | 1908 | { |
| 1870 | 1909 | _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr"); |
| 1871 | 1910 | __init(__s, __n); |
| 1872 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1911 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1873 | 1912 | __get_db()->__insert_c(this); |
| 1874 | 1913 | #endif |
| 1875 | 1914 | } |
| ... | ... | @@ -1884,7 +1923,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st |
| 1884 | 1923 | __init_copy_ctor_external(_VSTD::__to_address(__str.__get_long_pointer()), |
| 1885 | 1924 | __str.__get_long_size()); |
| 1886 | 1925 | |
| 1887 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1926 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1888 | 1927 | __get_db()->__insert_c(this); |
| 1889 | 1928 | #endif |
| 1890 | 1929 | } |
| ... | ... | @@ -1899,7 +1938,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string( |
| 1899 | 1938 | else |
| 1900 | 1939 | __init_copy_ctor_external(_VSTD::__to_address(__str.__get_long_pointer()), |
| 1901 | 1940 | __str.__get_long_size()); |
| 1902 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1941 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1903 | 1942 | __get_db()->__insert_c(this); |
| 1904 | 1943 | #endif |
| 1905 | 1944 | } |
| ... | ... | @@ -1936,7 +1975,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str) |
| 1936 | 1975 | : __r_(_VSTD::move(__str.__r_)) |
| 1937 | 1976 | { |
| 1938 | 1977 | __str.__zero(); |
| 1939 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1978 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1940 | 1979 | __get_db()->__insert_c(this); |
| 1941 | 1980 | if (__is_long()) |
| 1942 | 1981 | __get_db()->swap(this, &__str); |
| ... | ... | @@ -1955,7 +1994,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, co |
| 1955 | 1994 | __r_.first().__r = __str.__r_.first().__r; |
| 1956 | 1995 | __str.__zero(); |
| 1957 | 1996 | } |
| 1958 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1997 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1959 | 1998 | __get_db()->__insert_c(this); |
| 1960 | 1999 | if (__is_long()) |
| 1961 | 2000 | __get_db()->swap(this, &__str); |
| ... | ... | @@ -1994,7 +2033,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __ |
| 1994 | 2033 | : __r_(__default_init_tag(), __default_init_tag()) |
| 1995 | 2034 | { |
| 1996 | 2035 | __init(__n, __c); |
| 1997 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2036 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1998 | 2037 | __get_db()->__insert_c(this); |
| 1999 | 2038 | #endif |
| 2000 | 2039 | } |
| ... | ... | @@ -2005,7 +2044,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __ |
| 2005 | 2044 | : __r_(__default_init_tag(), __a) |
| 2006 | 2045 | { |
| 2007 | 2046 | __init(__n, __c); |
| 2008 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2047 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2009 | 2048 | __get_db()->__insert_c(this); |
| 2010 | 2049 | #endif |
| 2011 | 2050 | } |
| ... | ... | @@ -2020,7 +2059,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st |
| 2020 | 2059 | if (__pos > __str_sz) |
| 2021 | 2060 | this->__throw_out_of_range(); |
| 2022 | 2061 | __init(__str.data() + __pos, _VSTD::min(__n, __str_sz - __pos)); |
| 2023 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2062 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2024 | 2063 | __get_db()->__insert_c(this); |
| 2025 | 2064 | #endif |
| 2026 | 2065 | } |
| ... | ... | @@ -2035,7 +2074,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st |
| 2035 | 2074 | if (__pos > __str_sz) |
| 2036 | 2075 | this->__throw_out_of_range(); |
| 2037 | 2076 | __init(__str.data() + __pos, __str_sz - __pos); |
| 2038 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2077 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2039 | 2078 | __get_db()->__insert_c(this); |
| 2040 | 2079 | #endif |
| 2041 | 2080 | } |
| ... | ... | @@ -2049,7 +2088,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string( |
| 2049 | 2088 | __self_view __sv0 = __t; |
| 2050 | 2089 | __self_view __sv = __sv0.substr(__pos, __n); |
| 2051 | 2090 | __init(__sv.data(), __sv.size()); |
| 2052 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2091 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2053 | 2092 | __get_db()->__insert_c(this); |
| 2054 | 2093 | #endif |
| 2055 | 2094 | } |
| ... | ... | @@ -2061,7 +2100,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t) |
| 2061 | 2100 | { |
| 2062 | 2101 | __self_view __sv = __t; |
| 2063 | 2102 | __init(__sv.data(), __sv.size()); |
| 2064 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2103 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2065 | 2104 | __get_db()->__insert_c(this); |
| 2066 | 2105 | #endif |
| 2067 | 2106 | } |
| ... | ... | @@ -2073,7 +2112,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t, const _ |
| 2073 | 2112 | { |
| 2074 | 2113 | __self_view __sv = __t; |
| 2075 | 2114 | __init(__sv.data(), __sv.size()); |
| 2076 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2115 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2077 | 2116 | __get_db()->__insert_c(this); |
| 2078 | 2117 | #endif |
| 2079 | 2118 | } |
| ... | ... | @@ -2141,7 +2180,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, |
| 2141 | 2180 | : __r_(__default_init_tag(), __default_init_tag()) |
| 2142 | 2181 | { |
| 2143 | 2182 | __init(__first, __last); |
| 2144 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2183 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2145 | 2184 | __get_db()->__insert_c(this); |
| 2146 | 2185 | #endif |
| 2147 | 2186 | } |
| ... | ... | @@ -2154,7 +2193,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, |
| 2154 | 2193 | : __r_(__default_init_tag(), __a) |
| 2155 | 2194 | { |
| 2156 | 2195 | __init(__first, __last); |
| 2157 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2196 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2158 | 2197 | __get_db()->__insert_c(this); |
| 2159 | 2198 | #endif |
| 2160 | 2199 | } |
| ... | ... | @@ -2168,7 +2207,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string( |
| 2168 | 2207 | : __r_(__default_init_tag(), __default_init_tag()) |
| 2169 | 2208 | { |
| 2170 | 2209 | __init(__il.begin(), __il.end()); |
| 2171 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2210 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2172 | 2211 | __get_db()->__insert_c(this); |
| 2173 | 2212 | #endif |
| 2174 | 2213 | } |
| ... | ... | @@ -2181,7 +2220,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string( |
| 2181 | 2220 | : __r_(__default_init_tag(), __a) |
| 2182 | 2221 | { |
| 2183 | 2222 | __init(__il.begin(), __il.end()); |
| 2184 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2223 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2185 | 2224 | __get_db()->__insert_c(this); |
| 2186 | 2225 | #endif |
| 2187 | 2226 | } |
| ... | ... | @@ -2191,7 +2230,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string( |
| 2191 | 2230 | template <class _CharT, class _Traits, class _Allocator> |
| 2192 | 2231 | basic_string<_CharT, _Traits, _Allocator>::~basic_string() |
| 2193 | 2232 | { |
| 2194 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2233 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2195 | 2234 | __get_db()->__erase_c(this); |
| 2196 | 2235 | #endif |
| 2197 | 2236 | if (__is_long()) |
| ... | ... | @@ -2768,7 +2807,7 @@ _EnableIf |
| 2768 | 2807 | > |
| 2769 | 2808 | basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIterator __first, _InputIterator __last) |
| 2770 | 2809 | { |
| 2771 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2810 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2772 | 2811 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this, |
| 2773 | 2812 | "string::insert(iterator, range) called with an iterator not" |
| 2774 | 2813 | " referring to this string"); |
| ... | ... | @@ -2787,7 +2826,7 @@ _EnableIf |
| 2787 | 2826 | > |
| 2788 | 2827 | basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last) |
| 2789 | 2828 | { |
| 2790 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2829 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2791 | 2830 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this, |
| 2792 | 2831 | "string::insert(iterator, range) called with an iterator not" |
| 2793 | 2832 | " referring to this string"); |
| ... | ... | @@ -2903,7 +2942,7 @@ inline |
| 2903 | 2942 | typename basic_string<_CharT, _Traits, _Allocator>::iterator |
| 2904 | 2943 | basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_type __n, value_type __c) |
| 2905 | 2944 | { |
| 2906 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2945 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2907 | 2946 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this, |
| 2908 | 2947 | "string::insert(iterator, n, value) called with an iterator not" |
| 2909 | 2948 | " referring to this string"); |
| ... | ... | @@ -3137,7 +3176,7 @@ inline |
| 3137 | 3176 | typename basic_string<_CharT, _Traits, _Allocator>::iterator |
| 3138 | 3177 | basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos) |
| 3139 | 3178 | { |
| 3140 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 3179 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 3141 | 3180 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this, |
| 3142 | 3181 | "string::erase(iterator) called with an iterator not" |
| 3143 | 3182 | " referring to this string"); |
| ... | ... | @@ -3155,7 +3194,7 @@ inline |
| 3155 | 3194 | typename basic_string<_CharT, _Traits, _Allocator>::iterator |
| 3156 | 3195 | basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_iterator __last) |
| 3157 | 3196 | { |
| 3158 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 3197 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 3159 | 3198 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__first) == this, |
| 3160 | 3199 | "string::erase(iterator, iterator) called with an iterator not" |
| 3161 | 3200 | " referring to this string"); |
| ... | ... | @@ -3262,65 +3301,88 @@ basic_string<_CharT, _Traits, _Allocator>::max_size() const _NOEXCEPT |
| 3262 | 3301 | |
| 3263 | 3302 | template <class _CharT, class _Traits, class _Allocator> |
| 3264 | 3303 | void |
| 3265 | basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __res_arg) | |
| 3304 | basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacity) | |
| 3266 | 3305 | { |
| 3267 | if (__res_arg > max_size()) | |
| 3306 | if (__requested_capacity > max_size()) | |
| 3268 | 3307 | this->__throw_length_error(); |
| 3308 | ||
| 3309 | #if _LIBCPP_STD_VER > 17 | |
| 3310 | // Reserve never shrinks as of C++20. | |
| 3311 | if (__requested_capacity <= capacity()) return; | |
| 3312 | #endif | |
| 3313 | ||
| 3314 | size_type __target_capacity = _VSTD::max(__requested_capacity, size()); | |
| 3315 | __target_capacity = __recommend(__target_capacity); | |
| 3316 | if (__target_capacity == capacity()) return; | |
| 3317 | ||
| 3318 | __shrink_or_extend(__target_capacity); | |
| 3319 | } | |
| 3320 | ||
| 3321 | template <class _CharT, class _Traits, class _Allocator> | |
| 3322 | void | |
| 3323 | basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT | |
| 3324 | { | |
| 3325 | size_type __target_capacity = __recommend(size()); | |
| 3326 | if (__target_capacity == capacity()) return; | |
| 3327 | ||
| 3328 | __shrink_or_extend(__target_capacity); | |
| 3329 | } | |
| 3330 | ||
| 3331 | template <class _CharT, class _Traits, class _Allocator> | |
| 3332 | void | |
| 3333 | basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target_capacity) | |
| 3334 | { | |
| 3269 | 3335 | size_type __cap = capacity(); |
| 3270 | 3336 | size_type __sz = size(); |
| 3271 | __res_arg = _VSTD::max(__res_arg, __sz); | |
| 3272 | __res_arg = __recommend(__res_arg); | |
| 3273 | if (__res_arg != __cap) | |
| 3337 | ||
| 3338 | pointer __new_data, __p; | |
| 3339 | bool __was_long, __now_long; | |
| 3340 | if (__target_capacity == __min_cap - 1) | |
| 3274 | 3341 | { |
| 3275 | pointer __new_data, __p; | |
| 3276 | bool __was_long, __now_long; | |
| 3277 | if (__res_arg == __min_cap - 1) | |
| 3278 | { | |
| 3279 | __was_long = true; | |
| 3280 | __now_long = false; | |
| 3281 | __new_data = __get_short_pointer(); | |
| 3282 | __p = __get_long_pointer(); | |
| 3283 | } | |
| 3342 | __was_long = true; | |
| 3343 | __now_long = false; | |
| 3344 | __new_data = __get_short_pointer(); | |
| 3345 | __p = __get_long_pointer(); | |
| 3346 | } | |
| 3347 | else | |
| 3348 | { | |
| 3349 | if (__target_capacity > __cap) | |
| 3350 | __new_data = __alloc_traits::allocate(__alloc(), __target_capacity+1); | |
| 3284 | 3351 | else |
| 3285 | 3352 | { |
| 3286 | if (__res_arg > __cap) | |
| 3287 | __new_data = __alloc_traits::allocate(__alloc(), __res_arg+1); | |
| 3288 | else | |
| 3353 | #ifndef _LIBCPP_NO_EXCEPTIONS | |
| 3354 | try | |
| 3289 | 3355 | { |
| 3290 | #ifndef _LIBCPP_NO_EXCEPTIONS | |
| 3291 | try | |
| 3292 | { | |
| 3293 | #endif // _LIBCPP_NO_EXCEPTIONS | |
| 3294 | __new_data = __alloc_traits::allocate(__alloc(), __res_arg+1); | |
| 3295 | #ifndef _LIBCPP_NO_EXCEPTIONS | |
| 3296 | } | |
| 3297 | catch (...) | |
| 3298 | { | |
| 3299 | return; | |
| 3300 | } | |
| 3301 | #else // _LIBCPP_NO_EXCEPTIONS | |
| 3302 | if (__new_data == nullptr) | |
| 3303 | return; | |
| 3304 | #endif // _LIBCPP_NO_EXCEPTIONS | |
| 3356 | #endif // _LIBCPP_NO_EXCEPTIONS | |
| 3357 | __new_data = __alloc_traits::allocate(__alloc(), __target_capacity+1); | |
| 3358 | #ifndef _LIBCPP_NO_EXCEPTIONS | |
| 3305 | 3359 | } |
| 3306 | __now_long = true; | |
| 3307 | __was_long = __is_long(); | |
| 3308 | __p = __get_pointer(); | |
| 3309 | } | |
| 3310 | traits_type::copy(_VSTD::__to_address(__new_data), | |
| 3311 | _VSTD::__to_address(__p), size()+1); | |
| 3312 | if (__was_long) | |
| 3313 | __alloc_traits::deallocate(__alloc(), __p, __cap+1); | |
| 3314 | if (__now_long) | |
| 3315 | { | |
| 3316 | __set_long_cap(__res_arg+1); | |
| 3317 | __set_long_size(__sz); | |
| 3318 | __set_long_pointer(__new_data); | |
| 3360 | catch (...) | |
| 3361 | { | |
| 3362 | return; | |
| 3363 | } | |
| 3364 | #else // _LIBCPP_NO_EXCEPTIONS | |
| 3365 | if (__new_data == nullptr) | |
| 3366 | return; | |
| 3367 | #endif // _LIBCPP_NO_EXCEPTIONS | |
| 3319 | 3368 | } |
| 3320 | else | |
| 3321 | __set_short_size(__sz); | |
| 3322 | __invalidate_all_iterators(); | |
| 3369 | __now_long = true; | |
| 3370 | __was_long = __is_long(); | |
| 3371 | __p = __get_pointer(); | |
| 3323 | 3372 | } |
| 3373 | traits_type::copy(_VSTD::__to_address(__new_data), | |
| 3374 | _VSTD::__to_address(__p), size()+1); | |
| 3375 | if (__was_long) | |
| 3376 | __alloc_traits::deallocate(__alloc(), __p, __cap+1); | |
| 3377 | if (__now_long) | |
| 3378 | { | |
| 3379 | __set_long_cap(__target_capacity+1); | |
| 3380 | __set_long_size(__sz); | |
| 3381 | __set_long_pointer(__new_data); | |
| 3382 | } | |
| 3383 | else | |
| 3384 | __set_short_size(__sz); | |
| 3385 | __invalidate_all_iterators(); | |
| 3324 | 3386 | } |
| 3325 | 3387 | |
| 3326 | 3388 | template <class _CharT, class _Traits, class _Allocator> |
| ... | ... | @@ -3426,7 +3488,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str) |
| 3426 | 3488 | __is_nothrow_swappable<allocator_type>::value) |
| 3427 | 3489 | #endif |
| 3428 | 3490 | { |
| 3429 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 3491 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 3430 | 3492 | if (!__is_long()) |
| 3431 | 3493 | __get_db()->__invalidate_all(this); |
| 3432 | 3494 | if (!__str.__is_long()) |
| ... | ... | @@ -3438,7 +3500,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str) |
| 3438 | 3500 | __alloc_traits::is_always_equal::value || |
| 3439 | 3501 | __alloc() == __str.__alloc(), "swapping non-equal allocators"); |
| 3440 | 3502 | _VSTD::swap(__r_.first(), __str.__r_.first()); |
| 3441 | __swap_allocator(__alloc(), __str.__alloc()); | |
| 3503 | _VSTD::__swap_allocator(__alloc(), __str.__alloc()); | |
| 3442 | 3504 | } |
| 3443 | 3505 | |
| 3444 | 3506 | // find |
| ... | ... | @@ -3939,9 +4001,9 @@ basic_string<_CharT, _Traits, _Allocator>::__invariants() const |
| 3939 | 4001 | return false; |
| 3940 | 4002 | if (capacity() < __min_cap - 1) |
| 3941 | 4003 | return false; |
| 3942 | if (data() == 0) | |
| 4004 | if (data() == nullptr) | |
| 3943 | 4005 | return false; |
| 3944 | if (data()[size()] != value_type(0)) | |
| 4006 | if (data()[size()] != value_type()) | |
| 3945 | 4007 | return false; |
| 3946 | 4008 | return true; |
| 3947 | 4009 | } |
| ... | ... | @@ -3959,6 +4021,7 @@ basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT |
| 3959 | 4021 | __alloc_traits::deallocate(__alloc(), __get_long_pointer(), capacity() + 1); |
| 3960 | 4022 | __set_long_cap(0); |
| 3961 | 4023 | __set_short_size(0); |
| 4024 | traits_type::assign(*__get_short_pointer(), value_type()); | |
| 3962 | 4025 | } |
| 3963 | 4026 | } |
| 3964 | 4027 | |
| ... | ... | @@ -4300,24 +4363,15 @@ swap(basic_string<_CharT, _Traits, _Allocator>& __lhs, |
| 4300 | 4363 | __lhs.swap(__rhs); |
| 4301 | 4364 | } |
| 4302 | 4365 | |
| 4303 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 4304 | typedef basic_string<char8_t> u8string; | |
| 4305 | #endif | |
| 4306 | ||
| 4307 | #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS | |
| 4308 | typedef basic_string<char16_t> u16string; | |
| 4309 | typedef basic_string<char32_t> u32string; | |
| 4310 | #endif // _LIBCPP_HAS_NO_UNICODE_CHARS | |
| 4311 | ||
| 4312 | _LIBCPP_FUNC_VIS int stoi (const string& __str, size_t* __idx = 0, int __base = 10); | |
| 4313 | _LIBCPP_FUNC_VIS long stol (const string& __str, size_t* __idx = 0, int __base = 10); | |
| 4314 | _LIBCPP_FUNC_VIS unsigned long stoul (const string& __str, size_t* __idx = 0, int __base = 10); | |
| 4315 | _LIBCPP_FUNC_VIS long long stoll (const string& __str, size_t* __idx = 0, int __base = 10); | |
| 4316 | _LIBCPP_FUNC_VIS unsigned long long stoull(const string& __str, size_t* __idx = 0, int __base = 10); | |
| 4366 | _LIBCPP_FUNC_VIS int stoi (const string& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4367 | _LIBCPP_FUNC_VIS long stol (const string& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4368 | _LIBCPP_FUNC_VIS unsigned long stoul (const string& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4369 | _LIBCPP_FUNC_VIS long long stoll (const string& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4370 | _LIBCPP_FUNC_VIS unsigned long long stoull(const string& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4317 | 4371 | |
| 4318 | _LIBCPP_FUNC_VIS float stof (const string& __str, size_t* __idx = 0); | |
| 4319 | _LIBCPP_FUNC_VIS double stod (const string& __str, size_t* __idx = 0); | |
| 4320 | _LIBCPP_FUNC_VIS long double stold(const string& __str, size_t* __idx = 0); | |
| 4372 | _LIBCPP_FUNC_VIS float stof (const string& __str, size_t* __idx = nullptr); | |
| 4373 | _LIBCPP_FUNC_VIS double stod (const string& __str, size_t* __idx = nullptr); | |
| 4374 | _LIBCPP_FUNC_VIS long double stold(const string& __str, size_t* __idx = nullptr); | |
| 4321 | 4375 | |
| 4322 | 4376 | _LIBCPP_FUNC_VIS string to_string(int __val); |
| 4323 | 4377 | _LIBCPP_FUNC_VIS string to_string(unsigned __val); |
| ... | ... | @@ -4329,15 +4383,15 @@ _LIBCPP_FUNC_VIS string to_string(float __val); |
| 4329 | 4383 | _LIBCPP_FUNC_VIS string to_string(double __val); |
| 4330 | 4384 | _LIBCPP_FUNC_VIS string to_string(long double __val); |
| 4331 | 4385 | |
| 4332 | _LIBCPP_FUNC_VIS int stoi (const wstring& __str, size_t* __idx = 0, int __base = 10); | |
| 4333 | _LIBCPP_FUNC_VIS long stol (const wstring& __str, size_t* __idx = 0, int __base = 10); | |
| 4334 | _LIBCPP_FUNC_VIS unsigned long stoul (const wstring& __str, size_t* __idx = 0, int __base = 10); | |
| 4335 | _LIBCPP_FUNC_VIS long long stoll (const wstring& __str, size_t* __idx = 0, int __base = 10); | |
| 4336 | _LIBCPP_FUNC_VIS unsigned long long stoull(const wstring& __str, size_t* __idx = 0, int __base = 10); | |
| 4386 | _LIBCPP_FUNC_VIS int stoi (const wstring& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4387 | _LIBCPP_FUNC_VIS long stol (const wstring& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4388 | _LIBCPP_FUNC_VIS unsigned long stoul (const wstring& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4389 | _LIBCPP_FUNC_VIS long long stoll (const wstring& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4390 | _LIBCPP_FUNC_VIS unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, int __base = 10); | |
| 4337 | 4391 | |
| 4338 | _LIBCPP_FUNC_VIS float stof (const wstring& __str, size_t* __idx = 0); | |
| 4339 | _LIBCPP_FUNC_VIS double stod (const wstring& __str, size_t* __idx = 0); | |
| 4340 | _LIBCPP_FUNC_VIS long double stold(const wstring& __str, size_t* __idx = 0); | |
| 4392 | _LIBCPP_FUNC_VIS float stof (const wstring& __str, size_t* __idx = nullptr); | |
| 4393 | _LIBCPP_FUNC_VIS double stod (const wstring& __str, size_t* __idx = nullptr); | |
| 4394 | _LIBCPP_FUNC_VIS long double stold(const wstring& __str, size_t* __idx = nullptr); | |
| 4341 | 4395 | |
| 4342 | 4396 | _LIBCPP_FUNC_VIS wstring to_wstring(int __val); |
| 4343 | 4397 | _LIBCPP_FUNC_VIS wstring to_wstring(unsigned __val); |
| ... | ... | @@ -4425,7 +4479,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 4425 | 4479 | } |
| 4426 | 4480 | #endif |
| 4427 | 4481 | |
| 4428 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 4482 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 4429 | 4483 | |
| 4430 | 4484 | template<class _CharT, class _Traits, class _Allocator> |
| 4431 | 4485 | bool |
| ... | ... | @@ -4459,7 +4513,7 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* |
| 4459 | 4513 | return this->data() <= __p && __p < this->data() + this->size(); |
| 4460 | 4514 | } |
| 4461 | 4515 | |
| 4462 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 4516 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 4463 | 4517 | |
| 4464 | 4518 | #if _LIBCPP_STD_VER > 11 |
| 4465 | 4519 | // Literal suffixes for basic_string [basic.string.literals] |
lib/libcxx/include/string_view+48-17| ... | ... | @@ -142,12 +142,16 @@ namespace std { |
| 142 | 142 | constexpr size_type find_last_not_of(const charT* s, size_type pos, size_type n) const; |
| 143 | 143 | constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const; |
| 144 | 144 | |
| 145 | constexpr bool starts_with(basic_string_view s) const noexcept; // C++2a | |
| 146 | constexpr bool starts_with(charT c) const noexcept; // C++2a | |
| 147 | constexpr bool starts_with(const charT* s) const; // C++2a | |
| 148 | constexpr bool ends_with(basic_string_view s) const noexcept; // C++2a | |
| 149 | constexpr bool ends_with(charT c) const noexcept; // C++2a | |
| 150 | constexpr bool ends_with(const charT* s) const; // C++2a | |
| 145 | constexpr bool starts_with(basic_string_view s) const noexcept; // C++20 | |
| 146 | constexpr bool starts_with(charT c) const noexcept; // C++20 | |
| 147 | constexpr bool starts_with(const charT* s) const; // C++20 | |
| 148 | constexpr bool ends_with(basic_string_view s) const noexcept; // C++20 | |
| 149 | constexpr bool ends_with(charT c) const noexcept; // C++20 | |
| 150 | constexpr bool ends_with(const charT* s) const; // C++20 | |
| 151 | ||
| 152 | constexpr bool contains(basic_string_view s) const noexcept; // C++2b | |
| 153 | constexpr bool contains(charT c) const noexcept; // C++2b | |
| 154 | constexpr bool contains(const charT* s) const; // C++2b | |
| 151 | 155 | |
| 152 | 156 | private: |
| 153 | 157 | const_pointer data_; // exposition only |
| ... | ... | @@ -192,7 +196,26 @@ _LIBCPP_PUSH_MACROS |
| 192 | 196 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 193 | 197 | |
| 194 | 198 | template<class _CharT, class _Traits = char_traits<_CharT> > |
| 195 | class _LIBCPP_TEMPLATE_VIS basic_string_view { | |
| 199 | class _LIBCPP_TEMPLATE_VIS basic_string_view; | |
| 200 | ||
| 201 | typedef basic_string_view<char> string_view; | |
| 202 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 203 | typedef basic_string_view<char8_t> u8string_view; | |
| 204 | #endif | |
| 205 | typedef basic_string_view<char16_t> u16string_view; | |
| 206 | typedef basic_string_view<char32_t> u32string_view; | |
| 207 | typedef basic_string_view<wchar_t> wstring_view; | |
| 208 | ||
| 209 | template<class _CharT, class _Traits> | |
| 210 | class | |
| 211 | _LIBCPP_PREFERRED_NAME(string_view) | |
| 212 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 213 | _LIBCPP_PREFERRED_NAME(u8string_view) | |
| 214 | #endif | |
| 215 | _LIBCPP_PREFERRED_NAME(u16string_view) | |
| 216 | _LIBCPP_PREFERRED_NAME(u32string_view) | |
| 217 | _LIBCPP_PREFERRED_NAME(wstring_view) | |
| 218 | basic_string_view { | |
| 196 | 219 | public: |
| 197 | 220 | // types |
| 198 | 221 | typedef _Traits traits_type; |
| ... | ... | @@ -236,7 +259,7 @@ public: |
| 236 | 259 | |
| 237 | 260 | _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY |
| 238 | 261 | basic_string_view(const _CharT* __s) |
| 239 | : __data(__s), __size(std::__char_traits_length_checked<_Traits>(__s)) {} | |
| 262 | : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {} | |
| 240 | 263 | |
| 241 | 264 | // [string.view.iterators], iterators |
| 242 | 265 | _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -278,7 +301,9 @@ public: |
| 278 | 301 | |
| 279 | 302 | // [string.view.access], element access |
| 280 | 303 | _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY |
| 281 | const_reference operator[](size_type __pos) const _NOEXCEPT { return __data[__pos]; } | |
| 304 | const_reference operator[](size_type __pos) const _NOEXCEPT { | |
| 305 | return _LIBCPP_ASSERT(__pos < size(), "string_view[] index out of bounds"), __data[__pos]; | |
| 306 | } | |
| 282 | 307 | |
| 283 | 308 | _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY |
| 284 | 309 | const_reference at(size_type __pos) const |
| ... | ... | @@ -601,6 +626,20 @@ public: |
| 601 | 626 | { return ends_with(basic_string_view(__s)); } |
| 602 | 627 | #endif |
| 603 | 628 | |
| 629 | #if _LIBCPP_STD_VER > 20 | |
| 630 | constexpr _LIBCPP_INLINE_VISIBILITY | |
| 631 | bool contains(basic_string_view __sv) const noexcept | |
| 632 | { return find(__sv) != npos; } | |
| 633 | ||
| 634 | constexpr _LIBCPP_INLINE_VISIBILITY | |
| 635 | bool contains(value_type __c) const noexcept | |
| 636 | { return find(__c) != npos; } | |
| 637 | ||
| 638 | constexpr _LIBCPP_INLINE_VISIBILITY | |
| 639 | bool contains(const value_type* __s) const | |
| 640 | { return find(__s) != npos; } | |
| 641 | #endif | |
| 642 | ||
| 604 | 643 | private: |
| 605 | 644 | const value_type* __data; |
| 606 | 645 | size_type __size; |
| ... | ... | @@ -774,14 +813,6 @@ basic_ostream<_CharT, _Traits>& |
| 774 | 813 | operator<<(basic_ostream<_CharT, _Traits>& __os, |
| 775 | 814 | basic_string_view<_CharT, _Traits> __str); |
| 776 | 815 | |
| 777 | typedef basic_string_view<char> string_view; | |
| 778 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 779 | typedef basic_string_view<char8_t> u8string_view; | |
| 780 | #endif | |
| 781 | typedef basic_string_view<char16_t> u16string_view; | |
| 782 | typedef basic_string_view<char32_t> u32string_view; | |
| 783 | typedef basic_string_view<wchar_t> wstring_view; | |
| 784 | ||
| 785 | 816 | // [string.view.hash] |
| 786 | 817 | template<class _CharT> |
| 787 | 818 | struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, char_traits<_CharT> > > |
lib/libcxx/include/strstream+17-9| ... | ... | @@ -17,14 +17,17 @@ class strstreambuf |
| 17 | 17 | : public basic_streambuf<char> |
| 18 | 18 | { |
| 19 | 19 | public: |
| 20 | explicit strstreambuf(streamsize alsize_arg = 0); | |
| 20 | explicit strstreambuf(streamsize alsize_arg = 0); // before C++20 | |
| 21 | strstreambuf() : strstreambuf(0) {} // C++20 | |
| 22 | explicit strstreambuf(streamsize alsize_arg); // C++20 | |
| 23 | ||
| 21 | 24 | strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*)); |
| 22 | strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0); | |
| 25 | strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr); | |
| 23 | 26 | strstreambuf(const char* gnext_arg, streamsize n); |
| 24 | 27 | |
| 25 | strstreambuf(signed char* gnext_arg, streamsize n, signed char* pbeg_arg = 0); | |
| 28 | strstreambuf(signed char* gnext_arg, streamsize n, signed char* pbeg_arg = nullptr); | |
| 26 | 29 | strstreambuf(const signed char* gnext_arg, streamsize n); |
| 27 | strstreambuf(unsigned char* gnext_arg, streamsize n, unsigned char* pbeg_arg = 0); | |
| 30 | strstreambuf(unsigned char* gnext_arg, streamsize n, unsigned char* pbeg_arg = nullptr); | |
| 28 | 31 | strstreambuf(const unsigned char* gnext_arg, streamsize n); |
| 29 | 32 | |
| 30 | 33 | strstreambuf(strstreambuf&& rhs); |
| ... | ... | @@ -140,14 +143,19 @@ class _LIBCPP_TYPE_VIS strstreambuf |
| 140 | 143 | : public streambuf |
| 141 | 144 | { |
| 142 | 145 | public: |
| 146 | #ifndef _LIBCPP_CXX03_LANG | |
| 147 | strstreambuf() : strstreambuf(0) {} | |
| 148 | explicit strstreambuf(streamsize __alsize); | |
| 149 | #else | |
| 143 | 150 | explicit strstreambuf(streamsize __alsize = 0); |
| 151 | #endif | |
| 144 | 152 | strstreambuf(void* (*__palloc)(size_t), void (*__pfree)(void*)); |
| 145 | strstreambuf(char* __gnext, streamsize __n, char* __pbeg = 0); | |
| 153 | strstreambuf(char* __gnext, streamsize __n, char* __pbeg = nullptr); | |
| 146 | 154 | strstreambuf(const char* __gnext, streamsize __n); |
| 147 | 155 | |
| 148 | strstreambuf(signed char* __gnext, streamsize __n, signed char* __pbeg = 0); | |
| 156 | strstreambuf(signed char* __gnext, streamsize __n, signed char* __pbeg = nullptr); | |
| 149 | 157 | strstreambuf(const signed char* __gnext, streamsize __n); |
| 150 | strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = 0); | |
| 158 | strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = nullptr); | |
| 151 | 159 | strstreambuf(const unsigned char* __gnext, streamsize __n); |
| 152 | 160 | |
| 153 | 161 | #ifndef _LIBCPP_CXX03_LANG |
| ... | ... | @@ -290,7 +298,7 @@ public: |
| 290 | 298 | _LIBCPP_INLINE_VISIBILITY |
| 291 | 299 | ostrstream(char* __s, int __n, ios_base::openmode __mode = ios_base::out) |
| 292 | 300 | : ostream(&__sb_), |
| 293 | __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0)) | |
| 301 | __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0)) | |
| 294 | 302 | {} |
| 295 | 303 | |
| 296 | 304 | #ifndef _LIBCPP_CXX03_LANG |
| ... | ... | @@ -350,7 +358,7 @@ public: |
| 350 | 358 | _LIBCPP_INLINE_VISIBILITY |
| 351 | 359 | strstream(char* __s, int __n, ios_base::openmode __mode = ios_base::in | ios_base::out) |
| 352 | 360 | : iostream(&__sb_), |
| 353 | __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0)) | |
| 361 | __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0)) | |
| 354 | 362 | {} |
| 355 | 363 | |
| 356 | 364 | #ifndef _LIBCPP_CXX03_LANG |
lib/libcxx/include/support/android/locale_bionic.h deleted-69| ... | ... | @@ -1,69 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===------------------- support/android/locale_bionic.h ------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H | |
| 11 | #define _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H | |
| 12 | ||
| 13 | #if defined(__BIONIC__) | |
| 14 | ||
| 15 | #ifdef __cplusplus | |
| 16 | extern "C" { | |
| 17 | #endif | |
| 18 | ||
| 19 | #include <stdlib.h> | |
| 20 | #include <xlocale.h> | |
| 21 | ||
| 22 | #ifdef __cplusplus | |
| 23 | } | |
| 24 | #endif | |
| 25 | ||
| 26 | #if defined(__ANDROID__) | |
| 27 | ||
| 28 | #include <android/api-level.h> | |
| 29 | #include <android/ndk-version.h> | |
| 30 | #if __ANDROID_API__ < 21 | |
| 31 | #include <support/xlocale/__posix_l_fallback.h> | |
| 32 | #endif | |
| 33 | // In NDK versions later than 16, locale-aware functions are provided by | |
| 34 | // legacy_stdlib_inlines.h | |
| 35 | #if __NDK_MAJOR__ <= 16 | |
| 36 | #if __ANDROID_API__ < 21 | |
| 37 | #include <support/xlocale/__strtonum_fallback.h> | |
| 38 | #elif __ANDROID_API__ < 26 | |
| 39 | ||
| 40 | #if defined(__cplusplus) | |
| 41 | extern "C" { | |
| 42 | #endif | |
| 43 | ||
| 44 | inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char* __nptr, char** __endptr, | |
| 45 | locale_t) { | |
| 46 | return ::strtof(__nptr, __endptr); | |
| 47 | } | |
| 48 | ||
| 49 | inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char* __nptr, | |
| 50 | char** __endptr, locale_t) { | |
| 51 | return ::strtod(__nptr, __endptr); | |
| 52 | } | |
| 53 | ||
| 54 | inline _LIBCPP_INLINE_VISIBILITY long strtol_l(const char* __nptr, char** __endptr, | |
| 55 | int __base, locale_t) { | |
| 56 | return ::strtol(__nptr, __endptr, __base); | |
| 57 | } | |
| 58 | ||
| 59 | #if defined(__cplusplus) | |
| 60 | } | |
| 61 | #endif | |
| 62 | ||
| 63 | #endif // __ANDROID_API__ < 26 | |
| 64 | ||
| 65 | #endif // __NDK_MAJOR__ <= 16 | |
| 66 | #endif // defined(__ANDROID__) | |
| 67 | ||
| 68 | #endif // defined(__BIONIC__) | |
| 69 | #endif // _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H |
lib/libcxx/include/support/fuchsia/xlocale.h deleted-22| ... | ... | @@ -1,22 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===------------------- support/fuchsia/xlocale.h ------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H | |
| 11 | #define _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H | |
| 12 | ||
| 13 | #if defined(__Fuchsia__) | |
| 14 | ||
| 15 | #include <cstdlib> | |
| 16 | #include <cwchar> | |
| 17 | #include <support/xlocale/__posix_l_fallback.h> | |
| 18 | #include <support/xlocale/__strtonum_fallback.h> | |
| 19 | ||
| 20 | #endif // defined(__Fuchsia__) | |
| 21 | ||
| 22 | #endif // _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H |
lib/libcxx/include/support/ibm/limits.h deleted-98| ... | ... | @@ -1,98 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===--------------------- support/ibm/limits.h ---------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_LIMITS_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_LIMITS_H | |
| 12 | ||
| 13 | #if !defined(_AIX) // Linux | |
| 14 | #include <math.h> // for HUGE_VAL, HUGE_VALF, HUGE_VALL, and NAN | |
| 15 | ||
| 16 | static const unsigned int _QNAN_F = 0x7fc00000; | |
| 17 | #define NANF (*((float *)(&_QNAN_F))) | |
| 18 | static const unsigned int _QNAN_LDBL128[4] = {0x7ff80000, 0x0, 0x0, 0x0}; | |
| 19 | #define NANL (*((long double *)(&_QNAN_LDBL128))) | |
| 20 | static const unsigned int _SNAN_F= 0x7f855555; | |
| 21 | #define NANSF (*((float *)(&_SNAN_F))) | |
| 22 | static const unsigned int _SNAN_D[2] = {0x7ff55555, 0x55555555}; | |
| 23 | #define NANS (*((double *)(&_SNAN_D))) | |
| 24 | static const unsigned int _SNAN_LDBL128[4] = {0x7ff55555, 0x55555555, 0x0, 0x0}; | |
| 25 | #define NANSL (*((long double *)(&_SNAN_LDBL128))) | |
| 26 | ||
| 27 | #define __builtin_huge_val() HUGE_VAL | |
| 28 | #define __builtin_huge_valf() HUGE_VALF | |
| 29 | #define __builtin_huge_vall() HUGE_VALL | |
| 30 | #define __builtin_nan(__dummy) NAN | |
| 31 | #define __builtin_nanf(__dummy) NANF | |
| 32 | #define __builtin_nanl(__dummy) NANL | |
| 33 | #define __builtin_nans(__dummy) NANS | |
| 34 | #define __builtin_nansf(__dummy) NANSF | |
| 35 | #define __builtin_nansl(__dummy) NANSL | |
| 36 | ||
| 37 | #else | |
| 38 | ||
| 39 | #include <math.h> | |
| 40 | #include <float.h> // limit constants | |
| 41 | ||
| 42 | #define __builtin_huge_val() HUGE_VAL //0x7ff0000000000000 | |
| 43 | #define __builtin_huge_valf() HUGE_VALF //0x7f800000 | |
| 44 | #define __builtin_huge_vall() HUGE_VALL //0x7ff0000000000000 | |
| 45 | #define __builtin_nan(__dummy) nan(__dummy) //0x7ff8000000000000 | |
| 46 | #define __builtin_nanf(__dummy) nanf(__dummy) // 0x7ff80000 | |
| 47 | #define __builtin_nanl(__dummy) nanl(__dummy) //0x7ff8000000000000 | |
| 48 | #define __builtin_nans(__dummy) DBL_SNAN //0x7ff5555555555555 | |
| 49 | #define __builtin_nansf(__dummy) FLT_SNAN //0x7f855555 | |
| 50 | #define __builtin_nansl(__dummy) DBL_SNAN //0x7ff5555555555555 | |
| 51 | ||
| 52 | #define __FLT_MANT_DIG__ FLT_MANT_DIG | |
| 53 | #define __FLT_DIG__ FLT_DIG | |
| 54 | #define __FLT_RADIX__ FLT_RADIX | |
| 55 | #define __FLT_MIN_EXP__ FLT_MIN_EXP | |
| 56 | #define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP | |
| 57 | #define __FLT_MAX_EXP__ FLT_MAX_EXP | |
| 58 | #define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP | |
| 59 | #define __FLT_MIN__ FLT_MIN | |
| 60 | #define __FLT_MAX__ FLT_MAX | |
| 61 | #define __FLT_EPSILON__ FLT_EPSILON | |
| 62 | // predefined by XLC on LoP | |
| 63 | #define __FLT_DENORM_MIN__ 1.40129846e-45F | |
| 64 | ||
| 65 | #define __DBL_MANT_DIG__ DBL_MANT_DIG | |
| 66 | #define __DBL_DIG__ DBL_DIG | |
| 67 | #define __DBL_MIN_EXP__ DBL_MIN_EXP | |
| 68 | #define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP | |
| 69 | #define __DBL_MAX_EXP__ DBL_MAX_EXP | |
| 70 | #define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP | |
| 71 | #define __DBL_MIN__ DBL_MIN | |
| 72 | #define __DBL_MAX__ DBL_MAX | |
| 73 | #define __DBL_EPSILON__ DBL_EPSILON | |
| 74 | // predefined by XLC on LoP | |
| 75 | #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 | |
| 76 | ||
| 77 | #define __LDBL_MANT_DIG__ LDBL_MANT_DIG | |
| 78 | #define __LDBL_DIG__ LDBL_DIG | |
| 79 | #define __LDBL_MIN_EXP__ LDBL_MIN_EXP | |
| 80 | #define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP | |
| 81 | #define __LDBL_MAX_EXP__ LDBL_MAX_EXP | |
| 82 | #define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP | |
| 83 | #define __LDBL_MIN__ LDBL_MIN | |
| 84 | #define __LDBL_MAX__ LDBL_MAX | |
| 85 | #define __LDBL_EPSILON__ LDBL_EPSILON | |
| 86 | // predefined by XLC on LoP | |
| 87 | #if __LONGDOUBLE128 | |
| 88 | #define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L | |
| 89 | #else | |
| 90 | #define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L | |
| 91 | #endif | |
| 92 | ||
| 93 | // predefined by XLC on LoP | |
| 94 | #define __CHAR_BIT__ 8 | |
| 95 | ||
| 96 | #endif // _AIX | |
| 97 | ||
| 98 | #endif // _LIBCPP_SUPPORT_IBM_LIMITS_H |
lib/libcxx/include/support/ibm/locale_mgmt_aix.h deleted-84| ... | ... | @@ -1,84 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===------------------- support/ibm/locale_mgmt_aix.h --------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H | |
| 12 | ||
| 13 | #if defined(_AIX) | |
| 14 | #include "cstdlib" | |
| 15 | ||
| 16 | #ifdef __cplusplus | |
| 17 | extern "C" { | |
| 18 | #endif | |
| 19 | ||
| 20 | #if !defined(_AIX71) | |
| 21 | // AIX 7.1 and higher has these definitions. Definitions and stubs | |
| 22 | // are provied here as a temporary workaround on AIX 6.1. | |
| 23 | ||
| 24 | #define LC_COLLATE_MASK 1 | |
| 25 | #define LC_CTYPE_MASK 2 | |
| 26 | #define LC_MESSAGES_MASK 4 | |
| 27 | #define LC_MONETARY_MASK 8 | |
| 28 | #define LC_NUMERIC_MASK 16 | |
| 29 | #define LC_TIME_MASK 32 | |
| 30 | #define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | \ | |
| 31 | LC_MESSAGES_MASK | LC_MONETARY_MASK |\ | |
| 32 | LC_NUMERIC_MASK | LC_TIME_MASK) | |
| 33 | ||
| 34 | typedef void* locale_t; | |
| 35 | ||
| 36 | // The following are stubs. They are not supported on AIX 6.1. | |
| 37 | static inline | |
| 38 | locale_t newlocale(int category_mask, const char *locale, locale_t base) | |
| 39 | { | |
| 40 | _LC_locale_t *newloc, *loc; | |
| 41 | if ((loc = (_LC_locale_t *)__xopen_locale(locale)) == NULL) | |
| 42 | { | |
| 43 | errno = EINVAL; | |
| 44 | return (locale_t)0; | |
| 45 | } | |
| 46 | if ((newloc = (_LC_locale_t *)calloc(1, sizeof(_LC_locale_t))) == NULL) | |
| 47 | { | |
| 48 | errno = ENOMEM; | |
| 49 | return (locale_t)0; | |
| 50 | } | |
| 51 | if (!base) | |
| 52 | base = (_LC_locale_t *)__xopen_locale("C"); | |
| 53 | memcpy(newloc, base, sizeof (_LC_locale_t)); | |
| 54 | if (category_mask & LC_COLLATE_MASK) | |
| 55 | newloc->lc_collate = loc->lc_collate; | |
| 56 | if (category_mask & LC_CTYPE_MASK) | |
| 57 | newloc->lc_ctype = loc->lc_ctype; | |
| 58 | //if (category_mask & LC_MESSAGES_MASK) | |
| 59 | // newloc->lc_messages = loc->lc_messages; | |
| 60 | if (category_mask & LC_MONETARY_MASK) | |
| 61 | newloc->lc_monetary = loc->lc_monetary; | |
| 62 | if (category_mask & LC_TIME_MASK) | |
| 63 | newloc->lc_time = loc->lc_time; | |
| 64 | if (category_mask & LC_NUMERIC_MASK) | |
| 65 | newloc->lc_numeric = loc->lc_numeric; | |
| 66 | return (locale_t)newloc; | |
| 67 | } | |
| 68 | static inline | |
| 69 | void freelocale(locale_t locobj) | |
| 70 | { | |
| 71 | free(locobj); | |
| 72 | } | |
| 73 | static inline | |
| 74 | locale_t uselocale(locale_t newloc) | |
| 75 | { | |
| 76 | return (locale_t)0; | |
| 77 | } | |
| 78 | #endif // !defined(_AIX71) | |
| 79 | ||
| 80 | #ifdef __cplusplus | |
| 81 | } | |
| 82 | #endif | |
| 83 | #endif // defined(_AIX) | |
| 84 | #endif // _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H |
lib/libcxx/include/support/ibm/support.h deleted-53| ... | ... | @@ -1,53 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===----------------------- support/ibm/support.h ----------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_SUPPORT_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_SUPPORT_H | |
| 12 | ||
| 13 | extern "builtin" int __popcnt4(unsigned int); | |
| 14 | extern "builtin" int __popcnt8(unsigned long long); | |
| 15 | extern "builtin" unsigned int __cnttz4(unsigned int); | |
| 16 | extern "builtin" unsigned int __cnttz8(unsigned long long); | |
| 17 | extern "builtin" unsigned int __cntlz4(unsigned int); | |
| 18 | extern "builtin" unsigned int __cntlz8(unsigned long long); | |
| 19 | ||
| 20 | // Builtin functions for counting population | |
| 21 | #define __builtin_popcount(x) __popcnt4(x) | |
| 22 | #define __builtin_popcountll(x) __popcnt8(x) | |
| 23 | #if defined(__64BIT__) | |
| 24 | #define __builtin_popcountl(x) __builtin_popcountll(x) | |
| 25 | #else | |
| 26 | #define __builtin_popcountl(x) __builtin_popcount(x) | |
| 27 | #endif | |
| 28 | ||
| 29 | // Builtin functions for counting trailing zeros | |
| 30 | #define __builtin_ctz(x) __cnttz4(x) | |
| 31 | #define __builtin_ctzll(x) __cnttz8(x) | |
| 32 | #if defined(__64BIT__) | |
| 33 | #define __builtin_ctzl(x) __builtin_ctzll(x) | |
| 34 | #else | |
| 35 | #define __builtin_ctzl(x) __builtin_ctz(x) | |
| 36 | #endif | |
| 37 | ||
| 38 | // Builtin functions for counting leading zeros | |
| 39 | #define __builtin_clz(x) __cntlz4(x) | |
| 40 | #define __builtin_clzll(x) __cntlz8(x) | |
| 41 | #if defined(__64BIT__) | |
| 42 | #define __builtin_clzl(x) __builtin_clzll(x) | |
| 43 | #else | |
| 44 | #define __builtin_clzl(x) __builtin_clz(x) | |
| 45 | #endif | |
| 46 | ||
| 47 | #if defined(__64BIT__) | |
| 48 | #define __SIZE_WIDTH__ 64 | |
| 49 | #else | |
| 50 | #define __SIZE_WIDTH__ 32 | |
| 51 | #endif | |
| 52 | ||
| 53 | #endif // _LIBCPP_SUPPORT_IBM_SUPPORT_H |
lib/libcxx/include/support/ibm/xlocale.h deleted-270| ... | ... | @@ -1,270 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===--------------------- support/ibm/xlocale.h -------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H | |
| 11 | #define _LIBCPP_SUPPORT_IBM_XLOCALE_H | |
| 12 | #include <support/ibm/locale_mgmt_aix.h> | |
| 13 | ||
| 14 | #if defined(_AIX) | |
| 15 | #include "cstdlib" | |
| 16 | ||
| 17 | #ifdef __cplusplus | |
| 18 | extern "C" { | |
| 19 | #endif | |
| 20 | ||
| 21 | #if !defined(_AIX71) | |
| 22 | // AIX 7.1 and higher has these definitions. Definitions and stubs | |
| 23 | // are provied here as a temporary workaround on AIX 6.1. | |
| 24 | static inline | |
| 25 | int isalnum_l(int c, locale_t locale) | |
| 26 | { | |
| 27 | return __xisalnum(locale, c); | |
| 28 | } | |
| 29 | static inline | |
| 30 | int isalpha_l(int c, locale_t locale) | |
| 31 | { | |
| 32 | return __xisalpha(locale, c); | |
| 33 | } | |
| 34 | static inline | |
| 35 | int isblank_l(int c, locale_t locale) | |
| 36 | { | |
| 37 | return __xisblank(locale, c); | |
| 38 | } | |
| 39 | static inline | |
| 40 | int iscntrl_l(int c, locale_t locale) | |
| 41 | { | |
| 42 | return __xiscntrl(locale, c); | |
| 43 | } | |
| 44 | static inline | |
| 45 | int isdigit_l(int c, locale_t locale) | |
| 46 | { | |
| 47 | return __xisdigit(locale, c); | |
| 48 | } | |
| 49 | static inline | |
| 50 | int isgraph_l(int c, locale_t locale) | |
| 51 | { | |
| 52 | return __xisgraph(locale, c); | |
| 53 | } | |
| 54 | static inline | |
| 55 | int islower_l(int c, locale_t locale) | |
| 56 | { | |
| 57 | return __xislower(locale, c); | |
| 58 | } | |
| 59 | static inline | |
| 60 | int isprint_l(int c, locale_t locale) | |
| 61 | { | |
| 62 | return __xisprint(locale, c); | |
| 63 | } | |
| 64 | ||
| 65 | static inline | |
| 66 | int ispunct_l(int c, locale_t locale) | |
| 67 | { | |
| 68 | return __xispunct(locale, c); | |
| 69 | } | |
| 70 | static inline | |
| 71 | int isspace_l(int c, locale_t locale) | |
| 72 | { | |
| 73 | return __xisspace(locale, c); | |
| 74 | } | |
| 75 | static inline | |
| 76 | int isupper_l(int c, locale_t locale) | |
| 77 | { | |
| 78 | return __xisupper(locale, c); | |
| 79 | } | |
| 80 | ||
| 81 | static inline | |
| 82 | int isxdigit_l(int c, locale_t locale) | |
| 83 | { | |
| 84 | return __xisxdigit(locale, c); | |
| 85 | } | |
| 86 | ||
| 87 | static inline | |
| 88 | int iswalnum_l(wchar_t wc, locale_t locale) | |
| 89 | { | |
| 90 | return __xiswalnum(locale, wc); | |
| 91 | } | |
| 92 | ||
| 93 | static inline | |
| 94 | int iswalpha_l(wchar_t wc, locale_t locale) | |
| 95 | { | |
| 96 | return __xiswalpha(locale, wc); | |
| 97 | } | |
| 98 | ||
| 99 | static inline | |
| 100 | int iswblank_l(wchar_t wc, locale_t locale) | |
| 101 | { | |
| 102 | return __xiswblank(locale, wc); | |
| 103 | } | |
| 104 | ||
| 105 | static inline | |
| 106 | int iswcntrl_l(wchar_t wc, locale_t locale) | |
| 107 | { | |
| 108 | return __xiswcntrl(locale, wc); | |
| 109 | } | |
| 110 | ||
| 111 | static inline | |
| 112 | int iswdigit_l(wchar_t wc, locale_t locale) | |
| 113 | { | |
| 114 | return __xiswdigit(locale, wc); | |
| 115 | } | |
| 116 | ||
| 117 | static inline | |
| 118 | int iswgraph_l(wchar_t wc, locale_t locale) | |
| 119 | { | |
| 120 | return __xiswgraph(locale, wc); | |
| 121 | } | |
| 122 | ||
| 123 | static inline | |
| 124 | int iswlower_l(wchar_t wc, locale_t locale) | |
| 125 | { | |
| 126 | return __xiswlower(locale, wc); | |
| 127 | } | |
| 128 | ||
| 129 | static inline | |
| 130 | int iswprint_l(wchar_t wc, locale_t locale) | |
| 131 | { | |
| 132 | return __xiswprint(locale, wc); | |
| 133 | } | |
| 134 | ||
| 135 | static inline | |
| 136 | int iswpunct_l(wchar_t wc, locale_t locale) | |
| 137 | { | |
| 138 | return __xiswpunct(locale, wc); | |
| 139 | } | |
| 140 | ||
| 141 | static inline | |
| 142 | int iswspace_l(wchar_t wc, locale_t locale) | |
| 143 | { | |
| 144 | return __xiswspace(locale, wc); | |
| 145 | } | |
| 146 | ||
| 147 | static inline | |
| 148 | int iswupper_l(wchar_t wc, locale_t locale) | |
| 149 | { | |
| 150 | return __xiswupper(locale, wc); | |
| 151 | } | |
| 152 | ||
| 153 | static inline | |
| 154 | int iswxdigit_l(wchar_t wc, locale_t locale) | |
| 155 | { | |
| 156 | return __xiswxdigit(locale, wc); | |
| 157 | } | |
| 158 | ||
| 159 | static inline | |
| 160 | int iswctype_l(wint_t wc, wctype_t desc, locale_t locale) | |
| 161 | { | |
| 162 | return __xiswctype(locale, wc, desc); | |
| 163 | } | |
| 164 | ||
| 165 | static inline | |
| 166 | int toupper_l(int c, locale_t locale) | |
| 167 | { | |
| 168 | return __xtoupper(locale, c); | |
| 169 | } | |
| 170 | static inline | |
| 171 | int tolower_l(int c, locale_t locale) | |
| 172 | { | |
| 173 | return __xtolower(locale, c); | |
| 174 | } | |
| 175 | static inline | |
| 176 | wint_t towupper_l(wint_t wc, locale_t locale) | |
| 177 | { | |
| 178 | return __xtowupper(locale, wc); | |
| 179 | } | |
| 180 | static inline | |
| 181 | wint_t towlower_l(wint_t wc, locale_t locale) | |
| 182 | { | |
| 183 | return __xtowlower(locale, wc); | |
| 184 | } | |
| 185 | ||
| 186 | static inline | |
| 187 | int strcoll_l(const char *__s1, const char *__s2, locale_t locale) | |
| 188 | { | |
| 189 | return __xstrcoll(locale, __s1, __s2); | |
| 190 | } | |
| 191 | static inline | |
| 192 | int wcscoll_l(const wchar_t *__s1, const wchar_t *__s2, locale_t locale) | |
| 193 | { | |
| 194 | return __xwcscoll(locale, __s1, __s2); | |
| 195 | } | |
| 196 | static inline | |
| 197 | size_t strxfrm_l(char *__s1, const char *__s2, size_t __n, locale_t locale) | |
| 198 | { | |
| 199 | return __xstrxfrm(locale, __s1, __s2, __n); | |
| 200 | } | |
| 201 | ||
| 202 | static inline | |
| 203 | size_t wcsxfrm_l(wchar_t *__ws1, const wchar_t *__ws2, size_t __n, | |
| 204 | locale_t locale) | |
| 205 | { | |
| 206 | return __xwcsxfrm(locale, __ws1, __ws2, __n); | |
| 207 | } | |
| 208 | #endif // !defined(_AIX71) | |
| 209 | ||
| 210 | // strftime_l() is defined by POSIX. However, AIX 7.1 does not have it | |
| 211 | // implemented yet. | |
| 212 | static inline | |
| 213 | size_t strftime_l(char *__s, size_t __size, const char *__fmt, | |
| 214 | const struct tm *__tm, locale_t locale) { | |
| 215 | return __xstrftime(locale, __s, __size, __fmt, __tm); | |
| 216 | } | |
| 217 | ||
| 218 | // The following are not POSIX routines. These are quick-and-dirty hacks | |
| 219 | // to make things pretend to work | |
| 220 | static inline | |
| 221 | long long strtoll_l(const char *__nptr, char **__endptr, | |
| 222 | int __base, locale_t locale) { | |
| 223 | return strtoll(__nptr, __endptr, __base); | |
| 224 | } | |
| 225 | static inline | |
| 226 | long strtol_l(const char *__nptr, char **__endptr, | |
| 227 | int __base, locale_t locale) { | |
| 228 | return strtol(__nptr, __endptr, __base); | |
| 229 | } | |
| 230 | static inline | |
| 231 | long double strtold_l(const char *__nptr, char **__endptr, | |
| 232 | locale_t locale) { | |
| 233 | return strtold(__nptr, __endptr); | |
| 234 | } | |
| 235 | static inline | |
| 236 | unsigned long long strtoull_l(const char *__nptr, char **__endptr, | |
| 237 | int __base, locale_t locale) { | |
| 238 | return strtoull(__nptr, __endptr, __base); | |
| 239 | } | |
| 240 | static inline | |
| 241 | unsigned long strtoul_l(const char *__nptr, char **__endptr, | |
| 242 | int __base, locale_t locale) { | |
| 243 | return strtoul(__nptr, __endptr, __base); | |
| 244 | } | |
| 245 | ||
| 246 | static inline | |
| 247 | int vasprintf(char **strp, const char *fmt, va_list ap) | |
| 248 | { | |
| 249 | const size_t buff_size = 256; | |
| 250 | int str_size; | |
| 251 | if ((*strp = (char *)malloc(buff_size)) == NULL) | |
| 252 | { | |
| 253 | return -1; | |
| 254 | } | |
| 255 | if ((str_size = vsnprintf(*strp, buff_size, fmt, ap)) >= buff_size) | |
| 256 | { | |
| 257 | if ((*strp = (char *)realloc(*strp, str_size + 1)) == NULL) | |
| 258 | { | |
| 259 | return -1; | |
| 260 | } | |
| 261 | str_size = vsnprintf(*strp, str_size + 1, fmt, ap); | |
| 262 | } | |
| 263 | return str_size; | |
| 264 | } | |
| 265 | ||
| 266 | #ifdef __cplusplus | |
| 267 | } | |
| 268 | #endif | |
| 269 | #endif // defined(_AIX) | |
| 270 | #endif // _LIBCPP_SUPPORT_IBM_XLOCALE_H |
lib/libcxx/include/support/musl/xlocale.h deleted-57| ... | ... | @@ -1,57 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===------------------- support/musl/xlocale.h ------------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | // This adds support for the extended locale functions that are currently | |
| 10 | // missing from the Musl C library. | |
| 11 | // | |
| 12 | // This only works when the specified locale is "C" or "POSIX", but that's | |
| 13 | // about as good as we can do without implementing full xlocale support | |
| 14 | // in Musl. | |
| 15 | //===----------------------------------------------------------------------===// | |
| 16 | ||
| 17 | #ifndef _LIBCPP_SUPPORT_MUSL_XLOCALE_H | |
| 18 | #define _LIBCPP_SUPPORT_MUSL_XLOCALE_H | |
| 19 | ||
| 20 | #include <cstdlib> | |
| 21 | #include <cwchar> | |
| 22 | ||
| 23 | #ifdef __cplusplus | |
| 24 | extern "C" { | |
| 25 | #endif | |
| 26 | ||
| 27 | static inline long long strtoll_l(const char *nptr, char **endptr, int base, | |
| 28 | locale_t) { | |
| 29 | return strtoll(nptr, endptr, base); | |
| 30 | } | |
| 31 | ||
| 32 | static inline unsigned long long strtoull_l(const char *nptr, char **endptr, | |
| 33 | int base, locale_t) { | |
| 34 | return strtoull(nptr, endptr, base); | |
| 35 | } | |
| 36 | ||
| 37 | static inline long long wcstoll_l(const wchar_t *nptr, wchar_t **endptr, | |
| 38 | int base, locale_t) { | |
| 39 | return wcstoll(nptr, endptr, base); | |
| 40 | } | |
| 41 | ||
| 42 | static inline unsigned long long wcstoull_l(const wchar_t *nptr, | |
| 43 | wchar_t **endptr, int base, | |
| 44 | locale_t) { | |
| 45 | return wcstoull(nptr, endptr, base); | |
| 46 | } | |
| 47 | ||
| 48 | static inline long double wcstold_l(const wchar_t *nptr, wchar_t **endptr, | |
| 49 | locale_t) { | |
| 50 | return wcstold(nptr, endptr); | |
| 51 | } | |
| 52 | ||
| 53 | #ifdef __cplusplus | |
| 54 | } | |
| 55 | #endif | |
| 56 | ||
| 57 | #endif // _LIBCPP_SUPPORT_MUSL_XLOCALE_H |
lib/libcxx/include/support/newlib/xlocale.h deleted-27| ... | ... | @@ -1,27 +0,0 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #ifndef _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H | |
| 10 | #define _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H | |
| 11 | ||
| 12 | #if defined(_NEWLIB_VERSION) | |
| 13 | ||
| 14 | #include <cstdlib> | |
| 15 | #include <clocale> | |
| 16 | #include <cwctype> | |
| 17 | #include <ctype.h> | |
| 18 | #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \ | |
| 19 | __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5 | |
| 20 | #include <support/xlocale/__nop_locale_mgmt.h> | |
| 21 | #include <support/xlocale/__posix_l_fallback.h> | |
| 22 | #include <support/xlocale/__strtonum_fallback.h> | |
| 23 | #endif | |
| 24 | ||
| 25 | #endif // _NEWLIB_VERSION | |
| 26 | ||
| 27 | #endif |
lib/libcxx/include/support/solaris/floatingpoint.h deleted-13| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #define atof sun_atof | |
| 10 | #define strtod sun_strtod | |
| 11 | #include_next "floatingpoint.h" | |
| 12 | #undef atof | |
| 13 | #undef strtod |
lib/libcxx/include/support/solaris/wchar.h deleted-46| ... | ... | @@ -1,46 +0,0 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #define iswalpha sun_iswalpha | |
| 10 | #define iswupper sun_iswupper | |
| 11 | #define iswlower sun_iswlower | |
| 12 | #define iswdigit sun_iswdigit | |
| 13 | #define iswxdigit sun_iswxdigit | |
| 14 | #define iswalnum sun_iswalnum | |
| 15 | #define iswspace sun_iswspace | |
| 16 | #define iswpunct sun_iswpunct | |
| 17 | #define iswprint sun_iswprint | |
| 18 | #define iswgraph sun_iswgraph | |
| 19 | #define iswcntrl sun_iswcntrl | |
| 20 | #define iswctype sun_iswctype | |
| 21 | #define towlower sun_towlower | |
| 22 | #define towupper sun_towupper | |
| 23 | #define wcswcs sun_wcswcs | |
| 24 | #define wcswidth sun_wcswidth | |
| 25 | #define wcwidth sun_wcwidth | |
| 26 | #define wctype sun_wctype | |
| 27 | #define _WCHAR_T 1 | |
| 28 | #include_next "wchar.h" | |
| 29 | #undef iswalpha | |
| 30 | #undef iswupper | |
| 31 | #undef iswlower | |
| 32 | #undef iswdigit | |
| 33 | #undef iswxdigit | |
| 34 | #undef iswalnum | |
| 35 | #undef iswspace | |
| 36 | #undef iswpunct | |
| 37 | #undef iswprint | |
| 38 | #undef iswgraph | |
| 39 | #undef iswcntrl | |
| 40 | #undef iswctype | |
| 41 | #undef towlower | |
| 42 | #undef towupper | |
| 43 | #undef wcswcs | |
| 44 | #undef wcswidth | |
| 45 | #undef wcwidth | |
| 46 | #undef wctype |
lib/libcxx/include/support/solaris/xlocale.h deleted-76| ... | ... | @@ -1,76 +0,0 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | //////////////////////////////////////////////////////////////////////////////// | |
| 10 | // Minimal xlocale implementation for Solaris. This implements the subset of | |
| 11 | // the xlocale APIs that libc++ depends on. | |
| 12 | //////////////////////////////////////////////////////////////////////////////// | |
| 13 | #ifndef __XLOCALE_H_INCLUDED | |
| 14 | #define __XLOCALE_H_INCLUDED | |
| 15 | ||
| 16 | #include <stdlib.h> | |
| 17 | ||
| 18 | #ifdef __cplusplus | |
| 19 | extern "C" { | |
| 20 | #endif | |
| 21 | ||
| 22 | ||
| 23 | int snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...); | |
| 24 | int asprintf_l(char **__s, locale_t __l, const char *__format, ...); | |
| 25 | ||
| 26 | int sscanf_l(const char *__s, locale_t __l, const char *__format, ...); | |
| 27 | ||
| 28 | int toupper_l(int __c, locale_t __l); | |
| 29 | int tolower_l(int __c, locale_t __l); | |
| 30 | ||
| 31 | struct lconv *localeconv(void); | |
| 32 | struct lconv *localeconv_l(locale_t __l); | |
| 33 | ||
| 34 | // FIXME: These are quick-and-dirty hacks to make things pretend to work | |
| 35 | static inline | |
| 36 | long long strtoll_l(const char *__nptr, char **__endptr, | |
| 37 | int __base, locale_t __loc) { | |
| 38 | return strtoll(__nptr, __endptr, __base); | |
| 39 | } | |
| 40 | static inline | |
| 41 | long strtol_l(const char *__nptr, char **__endptr, | |
| 42 | int __base, locale_t __loc) { | |
| 43 | return strtol(__nptr, __endptr, __base); | |
| 44 | } | |
| 45 | static inline | |
| 46 | unsigned long long strtoull_l(const char *__nptr, char **__endptr, | |
| 47 | int __base, locale_t __loc) { | |
| 48 | return strtoull(__nptr, __endptr, __base); | |
| 49 | } | |
| 50 | static inline | |
| 51 | unsigned long strtoul_l(const char *__nptr, char **__endptr, | |
| 52 | int __base, locale_t __loc) { | |
| 53 | return strtoul(__nptr, __endptr, __base); | |
| 54 | } | |
| 55 | static inline | |
| 56 | float strtof_l(const char *__nptr, char **__endptr, | |
| 57 | locale_t __loc) { | |
| 58 | return strtof(__nptr, __endptr); | |
| 59 | } | |
| 60 | static inline | |
| 61 | double strtod_l(const char *__nptr, char **__endptr, | |
| 62 | locale_t __loc) { | |
| 63 | return strtod(__nptr, __endptr); | |
| 64 | } | |
| 65 | static inline | |
| 66 | long double strtold_l(const char *__nptr, char **__endptr, | |
| 67 | locale_t __loc) { | |
| 68 | return strtold(__nptr, __endptr); | |
| 69 | } | |
| 70 | ||
| 71 | ||
| 72 | #ifdef __cplusplus | |
| 73 | } | |
| 74 | #endif | |
| 75 | ||
| 76 | #endif |
lib/libcxx/include/support/win32/limits_msvc_win32.h deleted-71| ... | ... | @@ -1,71 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===------------------ support/win32/limits_msvc_win32.h -----------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H | |
| 11 | #define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H | |
| 12 | ||
| 13 | #if !defined(_LIBCPP_MSVCRT) | |
| 14 | #error "This header complements the Microsoft C Runtime library, and should not be included otherwise." | |
| 15 | #endif | |
| 16 | #if defined(__clang__) | |
| 17 | #error "This header should only be included when using Microsofts C1XX frontend" | |
| 18 | #endif | |
| 19 | ||
| 20 | #include <limits.h> // CHAR_BIT | |
| 21 | #include <float.h> // limit constants | |
| 22 | #include <math.h> // HUGE_VAL | |
| 23 | #include <ymath.h> // internal MSVC header providing the needed functionality | |
| 24 | ||
| 25 | #define __CHAR_BIT__ CHAR_BIT | |
| 26 | ||
| 27 | #define __FLT_MANT_DIG__ FLT_MANT_DIG | |
| 28 | #define __FLT_DIG__ FLT_DIG | |
| 29 | #define __FLT_RADIX__ FLT_RADIX | |
| 30 | #define __FLT_MIN_EXP__ FLT_MIN_EXP | |
| 31 | #define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP | |
| 32 | #define __FLT_MAX_EXP__ FLT_MAX_EXP | |
| 33 | #define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP | |
| 34 | #define __FLT_MIN__ FLT_MIN | |
| 35 | #define __FLT_MAX__ FLT_MAX | |
| 36 | #define __FLT_EPSILON__ FLT_EPSILON | |
| 37 | // predefined by MinGW GCC | |
| 38 | #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F | |
| 39 | ||
| 40 | #define __DBL_MANT_DIG__ DBL_MANT_DIG | |
| 41 | #define __DBL_DIG__ DBL_DIG | |
| 42 | #define __DBL_RADIX__ DBL_RADIX | |
| 43 | #define __DBL_MIN_EXP__ DBL_MIN_EXP | |
| 44 | #define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP | |
| 45 | #define __DBL_MAX_EXP__ DBL_MAX_EXP | |
| 46 | #define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP | |
| 47 | #define __DBL_MIN__ DBL_MIN | |
| 48 | #define __DBL_MAX__ DBL_MAX | |
| 49 | #define __DBL_EPSILON__ DBL_EPSILON | |
| 50 | // predefined by MinGW GCC | |
| 51 | #define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L) | |
| 52 | ||
| 53 | #define __LDBL_MANT_DIG__ LDBL_MANT_DIG | |
| 54 | #define __LDBL_DIG__ LDBL_DIG | |
| 55 | #define __LDBL_RADIX__ LDBL_RADIX | |
| 56 | #define __LDBL_MIN_EXP__ LDBL_MIN_EXP | |
| 57 | #define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP | |
| 58 | #define __LDBL_MAX_EXP__ LDBL_MAX_EXP | |
| 59 | #define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP | |
| 60 | #define __LDBL_MIN__ LDBL_MIN | |
| 61 | #define __LDBL_MAX__ LDBL_MAX | |
| 62 | #define __LDBL_EPSILON__ LDBL_EPSILON | |
| 63 | // predefined by MinGW GCC | |
| 64 | #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L | |
| 65 | ||
| 66 | // __builtin replacements/workarounds | |
| 67 | #define __builtin_huge_vall() _LInf._Long_double | |
| 68 | #define __builtin_nanl(__dummmy) _LNan._Long_double | |
| 69 | #define __builtin_nansl(__dummy) _LSnan._Long_double | |
| 70 | ||
| 71 | #endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H |
lib/libcxx/include/support/win32/locale_win32.h deleted-264| ... | ... | @@ -1,264 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===--------------------- support/win32/locale_win32.h -------------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H | |
| 11 | #define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H | |
| 12 | ||
| 13 | #include <__config> | |
| 14 | #include <stdio.h> | |
| 15 | #include <xlocinfo.h> // _locale_t | |
| 16 | #include <__nullptr> | |
| 17 | ||
| 18 | #define LC_COLLATE_MASK _M_COLLATE | |
| 19 | #define LC_CTYPE_MASK _M_CTYPE | |
| 20 | #define LC_MONETARY_MASK _M_MONETARY | |
| 21 | #define LC_NUMERIC_MASK _M_NUMERIC | |
| 22 | #define LC_TIME_MASK _M_TIME | |
| 23 | #define LC_MESSAGES_MASK _M_MESSAGES | |
| 24 | #define LC_ALL_MASK ( LC_COLLATE_MASK \ | |
| 25 | | LC_CTYPE_MASK \ | |
| 26 | | LC_MESSAGES_MASK \ | |
| 27 | | LC_MONETARY_MASK \ | |
| 28 | | LC_NUMERIC_MASK \ | |
| 29 | | LC_TIME_MASK ) | |
| 30 | ||
| 31 | class __lconv_storage { | |
| 32 | public: | |
| 33 | __lconv_storage(const lconv *__lc_input) { | |
| 34 | __lc = *__lc_input; | |
| 35 | ||
| 36 | __decimal_point = __lc_input->decimal_point; | |
| 37 | __thousands_sep = __lc_input->thousands_sep; | |
| 38 | __grouping = __lc_input->grouping; | |
| 39 | __int_curr_symbol = __lc_input->int_curr_symbol; | |
| 40 | __currency_symbol = __lc_input->currency_symbol; | |
| 41 | __mon_decimal_point = __lc_input->mon_decimal_point; | |
| 42 | __mon_thousands_sep = __lc_input->mon_thousands_sep; | |
| 43 | __mon_grouping = __lc_input->mon_grouping; | |
| 44 | __positive_sign = __lc_input->positive_sign; | |
| 45 | __negative_sign = __lc_input->negative_sign; | |
| 46 | ||
| 47 | __lc.decimal_point = const_cast<char *>(__decimal_point.c_str()); | |
| 48 | __lc.thousands_sep = const_cast<char *>(__thousands_sep.c_str()); | |
| 49 | __lc.grouping = const_cast<char *>(__grouping.c_str()); | |
| 50 | __lc.int_curr_symbol = const_cast<char *>(__int_curr_symbol.c_str()); | |
| 51 | __lc.currency_symbol = const_cast<char *>(__currency_symbol.c_str()); | |
| 52 | __lc.mon_decimal_point = const_cast<char *>(__mon_decimal_point.c_str()); | |
| 53 | __lc.mon_thousands_sep = const_cast<char *>(__mon_thousands_sep.c_str()); | |
| 54 | __lc.mon_grouping = const_cast<char *>(__mon_grouping.c_str()); | |
| 55 | __lc.positive_sign = const_cast<char *>(__positive_sign.c_str()); | |
| 56 | __lc.negative_sign = const_cast<char *>(__negative_sign.c_str()); | |
| 57 | } | |
| 58 | ||
| 59 | lconv *__get() { | |
| 60 | return &__lc; | |
| 61 | } | |
| 62 | private: | |
| 63 | lconv __lc; | |
| 64 | std::string __decimal_point; | |
| 65 | std::string __thousands_sep; | |
| 66 | std::string __grouping; | |
| 67 | std::string __int_curr_symbol; | |
| 68 | std::string __currency_symbol; | |
| 69 | std::string __mon_decimal_point; | |
| 70 | std::string __mon_thousands_sep; | |
| 71 | std::string __mon_grouping; | |
| 72 | std::string __positive_sign; | |
| 73 | std::string __negative_sign; | |
| 74 | }; | |
| 75 | ||
| 76 | class locale_t { | |
| 77 | public: | |
| 78 | locale_t() | |
| 79 | : __locale(nullptr), __locale_str(nullptr), __lc(nullptr) {} | |
| 80 | locale_t(std::nullptr_t) | |
| 81 | : __locale(nullptr), __locale_str(nullptr), __lc(nullptr) {} | |
| 82 | locale_t(_locale_t __xlocale, const char* __xlocale_str) | |
| 83 | : __locale(__xlocale), __locale_str(__xlocale_str), __lc(nullptr) {} | |
| 84 | locale_t(const locale_t &__l) | |
| 85 | : __locale(__l.__locale), __locale_str(__l.__locale_str), __lc(nullptr) {} | |
| 86 | ||
| 87 | ~locale_t() { | |
| 88 | delete __lc; | |
| 89 | } | |
| 90 | ||
| 91 | locale_t &operator =(const locale_t &__l) { | |
| 92 | __locale = __l.__locale; | |
| 93 | __locale_str = __l.__locale_str; | |
| 94 | // __lc not copied | |
| 95 | return *this; | |
| 96 | } | |
| 97 | ||
| 98 | friend bool operator==(const locale_t& __left, const locale_t& __right) { | |
| 99 | return __left.__locale == __right.__locale; | |
| 100 | } | |
| 101 | ||
| 102 | friend bool operator==(const locale_t& __left, int __right) { | |
| 103 | return __left.__locale == nullptr && __right == 0; | |
| 104 | } | |
| 105 | ||
| 106 | friend bool operator==(const locale_t& __left, long long __right) { | |
| 107 | return __left.__locale == nullptr && __right == 0; | |
| 108 | } | |
| 109 | ||
| 110 | friend bool operator==(const locale_t& __left, std::nullptr_t) { | |
| 111 | return __left.__locale == nullptr; | |
| 112 | } | |
| 113 | ||
| 114 | friend bool operator==(int __left, const locale_t& __right) { | |
| 115 | return __left == 0 && nullptr == __right.__locale; | |
| 116 | } | |
| 117 | ||
| 118 | friend bool operator==(std::nullptr_t, const locale_t& __right) { | |
| 119 | return nullptr == __right.__locale; | |
| 120 | } | |
| 121 | ||
| 122 | friend bool operator!=(const locale_t& __left, const locale_t& __right) { | |
| 123 | return !(__left == __right); | |
| 124 | } | |
| 125 | ||
| 126 | friend bool operator!=(const locale_t& __left, int __right) { | |
| 127 | return !(__left == __right); | |
| 128 | } | |
| 129 | ||
| 130 | friend bool operator!=(const locale_t& __left, long long __right) { | |
| 131 | return !(__left == __right); | |
| 132 | } | |
| 133 | ||
| 134 | friend bool operator!=(const locale_t& __left, std::nullptr_t __right) { | |
| 135 | return !(__left == __right); | |
| 136 | } | |
| 137 | ||
| 138 | friend bool operator!=(int __left, const locale_t& __right) { | |
| 139 | return !(__left == __right); | |
| 140 | } | |
| 141 | ||
| 142 | friend bool operator!=(std::nullptr_t __left, const locale_t& __right) { | |
| 143 | return !(__left == __right); | |
| 144 | } | |
| 145 | ||
| 146 | operator bool() const { | |
| 147 | return __locale != nullptr; | |
| 148 | } | |
| 149 | ||
| 150 | const char* __get_locale() const { return __locale_str; } | |
| 151 | ||
| 152 | operator _locale_t() const { | |
| 153 | return __locale; | |
| 154 | } | |
| 155 | ||
| 156 | lconv *__store_lconv(const lconv *__input_lc) { | |
| 157 | delete __lc; | |
| 158 | __lc = new __lconv_storage(__input_lc); | |
| 159 | return __lc->__get(); | |
| 160 | } | |
| 161 | private: | |
| 162 | _locale_t __locale; | |
| 163 | const char* __locale_str; | |
| 164 | __lconv_storage *__lc = nullptr; | |
| 165 | }; | |
| 166 | ||
| 167 | // Locale management functions | |
| 168 | #define freelocale _free_locale | |
| 169 | // FIXME: base currently unused. Needs manual work to construct the new locale | |
| 170 | locale_t newlocale( int mask, const char * locale, locale_t base ); | |
| 171 | // uselocale can't be implemented on Windows because Windows allows partial modification | |
| 172 | // of thread-local locale and so _get_current_locale() returns a copy while uselocale does | |
| 173 | // not create any copies. | |
| 174 | // We can still implement raii even without uselocale though. | |
| 175 | ||
| 176 | ||
| 177 | lconv *localeconv_l( locale_t &loc ); | |
| 178 | size_t mbrlen_l( const char *__restrict s, size_t n, | |
| 179 | mbstate_t *__restrict ps, locale_t loc); | |
| 180 | size_t mbsrtowcs_l( wchar_t *__restrict dst, const char **__restrict src, | |
| 181 | size_t len, mbstate_t *__restrict ps, locale_t loc ); | |
| 182 | size_t wcrtomb_l( char *__restrict s, wchar_t wc, mbstate_t *__restrict ps, | |
| 183 | locale_t loc); | |
| 184 | size_t mbrtowc_l( wchar_t *__restrict pwc, const char *__restrict s, | |
| 185 | size_t n, mbstate_t *__restrict ps, locale_t loc); | |
| 186 | size_t mbsnrtowcs_l( wchar_t *__restrict dst, const char **__restrict src, | |
| 187 | size_t nms, size_t len, mbstate_t *__restrict ps, locale_t loc); | |
| 188 | size_t wcsnrtombs_l( char *__restrict dst, const wchar_t **__restrict src, | |
| 189 | size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc); | |
| 190 | wint_t btowc_l( int c, locale_t loc ); | |
| 191 | int wctob_l( wint_t c, locale_t loc ); | |
| 192 | ||
| 193 | decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ); | |
| 194 | ||
| 195 | // the *_l functions are prefixed on Windows, only available for msvcr80+, VS2005+ | |
| 196 | #define mbtowc_l _mbtowc_l | |
| 197 | #define strtoll_l _strtoi64_l | |
| 198 | #define strtoull_l _strtoui64_l | |
| 199 | #define strtod_l _strtod_l | |
| 200 | #if defined(_LIBCPP_MSVCRT) | |
| 201 | #define strtof_l _strtof_l | |
| 202 | #define strtold_l _strtold_l | |
| 203 | #else | |
| 204 | float strtof_l(const char*, char**, locale_t); | |
| 205 | long double strtold_l(const char*, char**, locale_t); | |
| 206 | #endif | |
| 207 | inline _LIBCPP_INLINE_VISIBILITY | |
| 208 | int | |
| 209 | islower_l(int c, _locale_t loc) | |
| 210 | { | |
| 211 | return _islower_l((int)c, loc); | |
| 212 | } | |
| 213 | ||
| 214 | inline _LIBCPP_INLINE_VISIBILITY | |
| 215 | int | |
| 216 | isupper_l(int c, _locale_t loc) | |
| 217 | { | |
| 218 | return _isupper_l((int)c, loc); | |
| 219 | } | |
| 220 | ||
| 221 | #define isdigit_l _isdigit_l | |
| 222 | #define isxdigit_l _isxdigit_l | |
| 223 | #define strcoll_l _strcoll_l | |
| 224 | #define strxfrm_l _strxfrm_l | |
| 225 | #define wcscoll_l _wcscoll_l | |
| 226 | #define wcsxfrm_l _wcsxfrm_l | |
| 227 | #define toupper_l _toupper_l | |
| 228 | #define tolower_l _tolower_l | |
| 229 | #define iswspace_l _iswspace_l | |
| 230 | #define iswprint_l _iswprint_l | |
| 231 | #define iswcntrl_l _iswcntrl_l | |
| 232 | #define iswupper_l _iswupper_l | |
| 233 | #define iswlower_l _iswlower_l | |
| 234 | #define iswalpha_l _iswalpha_l | |
| 235 | #define iswdigit_l _iswdigit_l | |
| 236 | #define iswpunct_l _iswpunct_l | |
| 237 | #define iswxdigit_l _iswxdigit_l | |
| 238 | #define towupper_l _towupper_l | |
| 239 | #define towlower_l _towlower_l | |
| 240 | #if defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x0800 | |
| 241 | _LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format, | |
| 242 | const struct tm *tm, locale_t loc); | |
| 243 | #else | |
| 244 | #define strftime_l _strftime_l | |
| 245 | #endif | |
| 246 | #define sscanf_l( __s, __l, __f, ...) _sscanf_l( __s, __f, __l, __VA_ARGS__ ) | |
| 247 | #define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ ) | |
| 248 | #define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ ) | |
| 249 | #define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ ) | |
| 250 | _LIBCPP_FUNC_VIS int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...); | |
| 251 | _LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... ); | |
| 252 | _LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap ); | |
| 253 | ||
| 254 | // not-so-pressing FIXME: use locale to determine blank characters | |
| 255 | inline int isblank_l( int c, locale_t /*loc*/ ) | |
| 256 | { | |
| 257 | return ( c == ' ' || c == '\t' ); | |
| 258 | } | |
| 259 | inline int iswblank_l( wint_t c, locale_t /*loc*/ ) | |
| 260 | { | |
| 261 | return ( c == L' ' || c == L'\t' ); | |
| 262 | } | |
| 263 | ||
| 264 | #endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H |
lib/libcxx/include/support/xlocale/__nop_locale_mgmt.h deleted-51| ... | ... | @@ -1,51 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===------------ support/xlocale/__nop_locale_mgmt.h -----------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | ||
| 10 | #ifndef _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H | |
| 11 | #define _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H | |
| 12 | ||
| 13 | #ifdef __cplusplus | |
| 14 | extern "C" { | |
| 15 | #endif | |
| 16 | ||
| 17 | // Patch over lack of extended locale support | |
| 18 | typedef void *locale_t; | |
| 19 | static inline locale_t duplocale(locale_t) { | |
| 20 | return NULL; | |
| 21 | } | |
| 22 | ||
| 23 | static inline void freelocale(locale_t) { | |
| 24 | } | |
| 25 | ||
| 26 | static inline locale_t newlocale(int, const char *, locale_t) { | |
| 27 | return NULL; | |
| 28 | } | |
| 29 | ||
| 30 | static inline locale_t uselocale(locale_t) { | |
| 31 | return NULL; | |
| 32 | } | |
| 33 | ||
| 34 | #define LC_COLLATE_MASK (1 << LC_COLLATE) | |
| 35 | #define LC_CTYPE_MASK (1 << LC_CTYPE) | |
| 36 | #define LC_MESSAGES_MASK (1 << LC_MESSAGES) | |
| 37 | #define LC_MONETARY_MASK (1 << LC_MONETARY) | |
| 38 | #define LC_NUMERIC_MASK (1 << LC_NUMERIC) | |
| 39 | #define LC_TIME_MASK (1 << LC_TIME) | |
| 40 | #define LC_ALL_MASK (LC_COLLATE_MASK|\ | |
| 41 | LC_CTYPE_MASK|\ | |
| 42 | LC_MONETARY_MASK|\ | |
| 43 | LC_NUMERIC_MASK|\ | |
| 44 | LC_TIME_MASK|\ | |
| 45 | LC_MESSAGES_MASK) | |
| 46 | ||
| 47 | #ifdef __cplusplus | |
| 48 | } // extern "C" | |
| 49 | #endif | |
| 50 | ||
| 51 | #endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H |
lib/libcxx/include/support/xlocale/__posix_l_fallback.h deleted-164| ... | ... | @@ -1,164 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===--------------- support/xlocale/__posix_l_fallback.h -----------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | // These are reimplementations of some extended locale functions ( *_l ) that | |
| 10 | // are normally part of POSIX. This shared implementation provides parts of the | |
| 11 | // extended locale support for libc's that normally don't have any (like | |
| 12 | // Android's bionic and Newlib). | |
| 13 | //===----------------------------------------------------------------------===// | |
| 14 | ||
| 15 | #ifndef _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H | |
| 16 | #define _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H | |
| 17 | ||
| 18 | #ifdef __cplusplus | |
| 19 | extern "C" { | |
| 20 | #endif | |
| 21 | ||
| 22 | inline _LIBCPP_INLINE_VISIBILITY int isalnum_l(int c, locale_t) { | |
| 23 | return ::isalnum(c); | |
| 24 | } | |
| 25 | ||
| 26 | inline _LIBCPP_INLINE_VISIBILITY int isalpha_l(int c, locale_t) { | |
| 27 | return ::isalpha(c); | |
| 28 | } | |
| 29 | ||
| 30 | inline _LIBCPP_INLINE_VISIBILITY int isblank_l(int c, locale_t) { | |
| 31 | return ::isblank(c); | |
| 32 | } | |
| 33 | ||
| 34 | inline _LIBCPP_INLINE_VISIBILITY int iscntrl_l(int c, locale_t) { | |
| 35 | return ::iscntrl(c); | |
| 36 | } | |
| 37 | ||
| 38 | inline _LIBCPP_INLINE_VISIBILITY int isdigit_l(int c, locale_t) { | |
| 39 | return ::isdigit(c); | |
| 40 | } | |
| 41 | ||
| 42 | inline _LIBCPP_INLINE_VISIBILITY int isgraph_l(int c, locale_t) { | |
| 43 | return ::isgraph(c); | |
| 44 | } | |
| 45 | ||
| 46 | inline _LIBCPP_INLINE_VISIBILITY int islower_l(int c, locale_t) { | |
| 47 | return ::islower(c); | |
| 48 | } | |
| 49 | ||
| 50 | inline _LIBCPP_INLINE_VISIBILITY int isprint_l(int c, locale_t) { | |
| 51 | return ::isprint(c); | |
| 52 | } | |
| 53 | ||
| 54 | inline _LIBCPP_INLINE_VISIBILITY int ispunct_l(int c, locale_t) { | |
| 55 | return ::ispunct(c); | |
| 56 | } | |
| 57 | ||
| 58 | inline _LIBCPP_INLINE_VISIBILITY int isspace_l(int c, locale_t) { | |
| 59 | return ::isspace(c); | |
| 60 | } | |
| 61 | ||
| 62 | inline _LIBCPP_INLINE_VISIBILITY int isupper_l(int c, locale_t) { | |
| 63 | return ::isupper(c); | |
| 64 | } | |
| 65 | ||
| 66 | inline _LIBCPP_INLINE_VISIBILITY int isxdigit_l(int c, locale_t) { | |
| 67 | return ::isxdigit(c); | |
| 68 | } | |
| 69 | ||
| 70 | inline _LIBCPP_INLINE_VISIBILITY int iswalnum_l(wint_t c, locale_t) { | |
| 71 | return ::iswalnum(c); | |
| 72 | } | |
| 73 | ||
| 74 | inline _LIBCPP_INLINE_VISIBILITY int iswalpha_l(wint_t c, locale_t) { | |
| 75 | return ::iswalpha(c); | |
| 76 | } | |
| 77 | ||
| 78 | inline _LIBCPP_INLINE_VISIBILITY int iswblank_l(wint_t c, locale_t) { | |
| 79 | return ::iswblank(c); | |
| 80 | } | |
| 81 | ||
| 82 | inline _LIBCPP_INLINE_VISIBILITY int iswcntrl_l(wint_t c, locale_t) { | |
| 83 | return ::iswcntrl(c); | |
| 84 | } | |
| 85 | ||
| 86 | inline _LIBCPP_INLINE_VISIBILITY int iswdigit_l(wint_t c, locale_t) { | |
| 87 | return ::iswdigit(c); | |
| 88 | } | |
| 89 | ||
| 90 | inline _LIBCPP_INLINE_VISIBILITY int iswgraph_l(wint_t c, locale_t) { | |
| 91 | return ::iswgraph(c); | |
| 92 | } | |
| 93 | ||
| 94 | inline _LIBCPP_INLINE_VISIBILITY int iswlower_l(wint_t c, locale_t) { | |
| 95 | return ::iswlower(c); | |
| 96 | } | |
| 97 | ||
| 98 | inline _LIBCPP_INLINE_VISIBILITY int iswprint_l(wint_t c, locale_t) { | |
| 99 | return ::iswprint(c); | |
| 100 | } | |
| 101 | ||
| 102 | inline _LIBCPP_INLINE_VISIBILITY int iswpunct_l(wint_t c, locale_t) { | |
| 103 | return ::iswpunct(c); | |
| 104 | } | |
| 105 | ||
| 106 | inline _LIBCPP_INLINE_VISIBILITY int iswspace_l(wint_t c, locale_t) { | |
| 107 | return ::iswspace(c); | |
| 108 | } | |
| 109 | ||
| 110 | inline _LIBCPP_INLINE_VISIBILITY int iswupper_l(wint_t c, locale_t) { | |
| 111 | return ::iswupper(c); | |
| 112 | } | |
| 113 | ||
| 114 | inline _LIBCPP_INLINE_VISIBILITY int iswxdigit_l(wint_t c, locale_t) { | |
| 115 | return ::iswxdigit(c); | |
| 116 | } | |
| 117 | ||
| 118 | inline _LIBCPP_INLINE_VISIBILITY int toupper_l(int c, locale_t) { | |
| 119 | return ::toupper(c); | |
| 120 | } | |
| 121 | ||
| 122 | inline _LIBCPP_INLINE_VISIBILITY int tolower_l(int c, locale_t) { | |
| 123 | return ::tolower(c); | |
| 124 | } | |
| 125 | ||
| 126 | inline _LIBCPP_INLINE_VISIBILITY wint_t towupper_l(wint_t c, locale_t) { | |
| 127 | return ::towupper(c); | |
| 128 | } | |
| 129 | ||
| 130 | inline _LIBCPP_INLINE_VISIBILITY wint_t towlower_l(wint_t c, locale_t) { | |
| 131 | return ::towlower(c); | |
| 132 | } | |
| 133 | ||
| 134 | inline _LIBCPP_INLINE_VISIBILITY int strcoll_l(const char *s1, const char *s2, | |
| 135 | locale_t) { | |
| 136 | return ::strcoll(s1, s2); | |
| 137 | } | |
| 138 | ||
| 139 | inline _LIBCPP_INLINE_VISIBILITY size_t strxfrm_l(char *dest, const char *src, | |
| 140 | size_t n, locale_t) { | |
| 141 | return ::strxfrm(dest, src, n); | |
| 142 | } | |
| 143 | ||
| 144 | inline _LIBCPP_INLINE_VISIBILITY size_t strftime_l(char *s, size_t max, | |
| 145 | const char *format, | |
| 146 | const struct tm *tm, locale_t) { | |
| 147 | return ::strftime(s, max, format, tm); | |
| 148 | } | |
| 149 | ||
| 150 | inline _LIBCPP_INLINE_VISIBILITY int wcscoll_l(const wchar_t *ws1, | |
| 151 | const wchar_t *ws2, locale_t) { | |
| 152 | return ::wcscoll(ws1, ws2); | |
| 153 | } | |
| 154 | ||
| 155 | inline _LIBCPP_INLINE_VISIBILITY size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, | |
| 156 | size_t n, locale_t) { | |
| 157 | return ::wcsxfrm(dest, src, n); | |
| 158 | } | |
| 159 | ||
| 160 | #ifdef __cplusplus | |
| 161 | } | |
| 162 | #endif | |
| 163 | ||
| 164 | #endif // _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H |
lib/libcxx/include/support/xlocale/__strtonum_fallback.h deleted-66| ... | ... | @@ -1,66 +0,0 @@ |
| 1 | // -*- C++ -*- | |
| 2 | //===-------------- support/xlocale/__strtonum_fallback.h -----------------===// | |
| 3 | // | |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 5 | // See https://llvm.org/LICENSE.txt for license information. | |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 7 | // | |
| 8 | //===----------------------------------------------------------------------===// | |
| 9 | // These are reimplementations of some extended locale functions ( *_l ) that | |
| 10 | // aren't part of POSIX. They are widely available though (GLIBC, BSD, maybe | |
| 11 | // others). The unifying aspect in this case is that all of these functions | |
| 12 | // convert strings to some numeric type. | |
| 13 | //===----------------------------------------------------------------------===// | |
| 14 | ||
| 15 | #ifndef _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H | |
| 16 | #define _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H | |
| 17 | ||
| 18 | #ifdef __cplusplus | |
| 19 | extern "C" { | |
| 20 | #endif | |
| 21 | ||
| 22 | inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char *nptr, | |
| 23 | char **endptr, locale_t) { | |
| 24 | return ::strtof(nptr, endptr); | |
| 25 | } | |
| 26 | ||
| 27 | inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char *nptr, | |
| 28 | char **endptr, locale_t) { | |
| 29 | return ::strtod(nptr, endptr); | |
| 30 | } | |
| 31 | ||
| 32 | inline _LIBCPP_INLINE_VISIBILITY long double strtold_l(const char *nptr, | |
| 33 | char **endptr, locale_t) { | |
| 34 | return ::strtold(nptr, endptr); | |
| 35 | } | |
| 36 | ||
| 37 | inline _LIBCPP_INLINE_VISIBILITY long long | |
| 38 | strtoll_l(const char *nptr, char **endptr, int base, locale_t) { | |
| 39 | return ::strtoll(nptr, endptr, base); | |
| 40 | } | |
| 41 | ||
| 42 | inline _LIBCPP_INLINE_VISIBILITY unsigned long long | |
| 43 | strtoull_l(const char *nptr, char **endptr, int base, locale_t) { | |
| 44 | return ::strtoull(nptr, endptr, base); | |
| 45 | } | |
| 46 | ||
| 47 | inline _LIBCPP_INLINE_VISIBILITY long long | |
| 48 | wcstoll_l(const wchar_t *nptr, wchar_t **endptr, int base, locale_t) { | |
| 49 | return ::wcstoll(nptr, endptr, base); | |
| 50 | } | |
| 51 | ||
| 52 | inline _LIBCPP_INLINE_VISIBILITY unsigned long long | |
| 53 | wcstoull_l(const wchar_t *nptr, wchar_t **endptr, int base, locale_t) { | |
| 54 | return ::wcstoull(nptr, endptr, base); | |
| 55 | } | |
| 56 | ||
| 57 | inline _LIBCPP_INLINE_VISIBILITY long double wcstold_l(const wchar_t *nptr, | |
| 58 | wchar_t **endptr, locale_t) { | |
| 59 | return ::wcstold(nptr, endptr); | |
| 60 | } | |
| 61 | ||
| 62 | #ifdef __cplusplus | |
| 63 | } | |
| 64 | #endif | |
| 65 | ||
| 66 | #endif // _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H |
lib/libcxx/include/system_error+2-2| ... | ... | @@ -253,7 +253,7 @@ public: |
| 253 | 253 | template <class _Ep> |
| 254 | 254 | _LIBCPP_INLINE_VISIBILITY |
| 255 | 255 | error_condition(_Ep __e, |
| 256 | typename enable_if<is_error_condition_enum<_Ep>::value>::type* = 0 | |
| 256 | typename enable_if<is_error_condition_enum<_Ep>::value>::type* = nullptr | |
| 257 | 257 | ) _NOEXCEPT |
| 258 | 258 | {*this = make_error_condition(__e);} |
| 259 | 259 | |
| ... | ... | @@ -325,7 +325,7 @@ public: |
| 325 | 325 | template <class _Ep> |
| 326 | 326 | _LIBCPP_INLINE_VISIBILITY |
| 327 | 327 | error_code(_Ep __e, |
| 328 | typename enable_if<is_error_code_enum<_Ep>::value>::type* = 0 | |
| 328 | typename enable_if<is_error_code_enum<_Ep>::value>::type* = nullptr | |
| 329 | 329 | ) _NOEXCEPT |
| 330 | 330 | {*this = make_error_code(__e);} |
| 331 | 331 |
lib/libcxx/include/thread+21-24| ... | ... | @@ -277,18 +277,18 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 277 | 277 | void |
| 278 | 278 | __thread_execute(tuple<_TSp, _Fp, _Args...>& __t, __tuple_indices<_Indices...>) |
| 279 | 279 | { |
| 280 | __invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...); | |
| 280 | _VSTD::__invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...); | |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | template <class _Fp> |
| 284 | 284 | _LIBCPP_INLINE_VISIBILITY |
| 285 | 285 | void* __thread_proxy(void* __vp) |
| 286 | 286 | { |
| 287 | // _Fp = std::tuple< unique_ptr<__thread_struct>, Functor, Args...> | |
| 288 | std::unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp)); | |
| 289 | __thread_local_data().set_pointer(_VSTD::get<0>(*__p).release()); | |
| 287 | // _Fp = tuple< unique_ptr<__thread_struct>, Functor, Args...> | |
| 288 | unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp)); | |
| 289 | __thread_local_data().set_pointer(_VSTD::get<0>(*__p.get()).release()); | |
| 290 | 290 | typedef typename __make_tuple_indices<tuple_size<_Fp>::value, 2>::type _Index; |
| 291 | __thread_execute(*__p, _Index()); | |
| 291 | _VSTD::__thread_execute(*__p.get(), _Index()); | |
| 292 | 292 | return nullptr; |
| 293 | 293 | } |
| 294 | 294 | |
| ... | ... | @@ -300,11 +300,11 @@ thread::thread(_Fp&& __f, _Args&&... __args) |
| 300 | 300 | typedef unique_ptr<__thread_struct> _TSPtr; |
| 301 | 301 | _TSPtr __tsp(new __thread_struct); |
| 302 | 302 | typedef tuple<_TSPtr, typename decay<_Fp>::type, typename decay<_Args>::type...> _Gp; |
| 303 | _VSTD::unique_ptr<_Gp> __p( | |
| 304 | new _Gp(std::move(__tsp), | |
| 305 | __decay_copy(_VSTD::forward<_Fp>(__f)), | |
| 306 | __decay_copy(_VSTD::forward<_Args>(__args))...)); | |
| 307 | int __ec = __libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get()); | |
| 303 | unique_ptr<_Gp> __p( | |
| 304 | new _Gp(_VSTD::move(__tsp), | |
| 305 | _VSTD::__decay_copy(_VSTD::forward<_Fp>(__f)), | |
| 306 | _VSTD::__decay_copy(_VSTD::forward<_Args>(__args))...)); | |
| 307 | int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get()); | |
| 308 | 308 | if (__ec == 0) |
| 309 | 309 | __p.release(); |
| 310 | 310 | else |
| ... | ... | @@ -326,7 +326,7 @@ struct __thread_invoke_pair { |
| 326 | 326 | template <class _Fp> |
| 327 | 327 | void* __thread_proxy_cxx03(void* __vp) |
| 328 | 328 | { |
| 329 | std::unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp)); | |
| 329 | unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp)); | |
| 330 | 330 | __thread_local_data().set_pointer(__p->__tsp_.release()); |
| 331 | 331 | (__p->__fn_)(); |
| 332 | 332 | return nullptr; |
| ... | ... | @@ -337,9 +337,9 @@ thread::thread(_Fp __f) |
| 337 | 337 | { |
| 338 | 338 | |
| 339 | 339 | typedef __thread_invoke_pair<_Fp> _InvokePair; |
| 340 | typedef std::unique_ptr<_InvokePair> _PairPtr; | |
| 340 | typedef unique_ptr<_InvokePair> _PairPtr; | |
| 341 | 341 | _PairPtr __pp(new _InvokePair(__f)); |
| 342 | int __ec = __libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get()); | |
| 342 | int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get()); | |
| 343 | 343 | if (__ec == 0) |
| 344 | 344 | __pp.release(); |
| 345 | 345 | else |
| ... | ... | @@ -360,25 +360,24 @@ template <class _Rep, class _Period> |
| 360 | 360 | void |
| 361 | 361 | sleep_for(const chrono::duration<_Rep, _Period>& __d) |
| 362 | 362 | { |
| 363 | using namespace chrono; | |
| 364 | if (__d > duration<_Rep, _Period>::zero()) | |
| 363 | if (__d > chrono::duration<_Rep, _Period>::zero()) | |
| 365 | 364 | { |
| 366 | 365 | #if defined(_LIBCPP_COMPILER_GCC) && (__powerpc__ || __POWERPC__) |
| 367 | 366 | // GCC's long double const folding is incomplete for IBM128 long doubles. |
| 368 | _LIBCPP_CONSTEXPR duration<long double> _Max = duration<long double>(ULLONG_MAX/1000000000ULL) ; | |
| 367 | _LIBCPP_CONSTEXPR chrono::duration<long double> _Max = chrono::duration<long double>(ULLONG_MAX/1000000000ULL) ; | |
| 369 | 368 | #else |
| 370 | _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max(); | |
| 369 | _LIBCPP_CONSTEXPR chrono::duration<long double> _Max = chrono::nanoseconds::max(); | |
| 371 | 370 | #endif |
| 372 | nanoseconds __ns; | |
| 371 | chrono::nanoseconds __ns; | |
| 373 | 372 | if (__d < _Max) |
| 374 | 373 | { |
| 375 | __ns = duration_cast<nanoseconds>(__d); | |
| 374 | __ns = chrono::duration_cast<chrono::nanoseconds>(__d); | |
| 376 | 375 | if (__ns < __d) |
| 377 | 376 | ++__ns; |
| 378 | 377 | } |
| 379 | 378 | else |
| 380 | __ns = nanoseconds::max(); | |
| 381 | sleep_for(__ns); | |
| 379 | __ns = chrono::nanoseconds::max(); | |
| 380 | this_thread::sleep_for(__ns); | |
| 382 | 381 | } |
| 383 | 382 | } |
| 384 | 383 | |
| ... | ... | @@ -386,7 +385,6 @@ template <class _Clock, class _Duration> |
| 386 | 385 | void |
| 387 | 386 | sleep_until(const chrono::time_point<_Clock, _Duration>& __t) |
| 388 | 387 | { |
| 389 | using namespace chrono; | |
| 390 | 388 | mutex __mut; |
| 391 | 389 | condition_variable __cv; |
| 392 | 390 | unique_lock<mutex> __lk(__mut); |
| ... | ... | @@ -399,8 +397,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 399 | 397 | void |
| 400 | 398 | sleep_until(const chrono::time_point<chrono::steady_clock, _Duration>& __t) |
| 401 | 399 | { |
| 402 | using namespace chrono; | |
| 403 | sleep_for(__t - steady_clock::now()); | |
| 400 | this_thread::sleep_for(__t - chrono::steady_clock::now()); | |
| 404 | 401 | } |
| 405 | 402 | |
| 406 | 403 | inline _LIBCPP_INLINE_VISIBILITY |
lib/libcxx/include/tuple+1-1| ... | ... | @@ -1393,7 +1393,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc> |
| 1393 | 1393 | |
| 1394 | 1394 | template <class _T1, class _T2> |
| 1395 | 1395 | template <class... _Args1, class... _Args2, size_t ..._I1, size_t ..._I2> |
| 1396 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1396 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 1397 | 1397 | pair<_T1, _T2>::pair(piecewise_construct_t, |
| 1398 | 1398 | tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args, |
| 1399 | 1399 | __tuple_indices<_I1...>, __tuple_indices<_I2...>) |
lib/libcxx/include/type_traits+137-245| ... | ... | @@ -51,6 +51,7 @@ namespace std |
| 51 | 51 | template <class T> struct is_arithmetic; |
| 52 | 52 | template <class T> struct is_fundamental; |
| 53 | 53 | template <class T> struct is_member_pointer; |
| 54 | template <class T> struct is_scoped_enum; // C++2b | |
| 54 | 55 | template <class T> struct is_scalar; |
| 55 | 56 | template <class T> struct is_object; |
| 56 | 57 | template <class T> struct is_compound; |
| ... | ... | @@ -284,6 +285,8 @@ namespace std |
| 284 | 285 | = is_compound<T>::value; // C++17 |
| 285 | 286 | template <class T> inline constexpr bool is_member_pointer_v |
| 286 | 287 | = is_member_pointer<T>::value; // C++17 |
| 288 | template <class T> inline constexpr bool is_scoped_enum_v | |
| 289 | = is_scoped_enum<T>::value; // C++2b | |
| 287 | 290 | |
| 288 | 291 | // See C++14 20.10.4.3, type properties |
| 289 | 292 | template <class T> inline constexpr bool is_const_v |
| ... | ... | @@ -514,7 +517,7 @@ template <template <class...> class, class ...> |
| 514 | 517 | false_type __sfinae_test_impl(...); |
| 515 | 518 | |
| 516 | 519 | template <template <class ...> class _Templ, class ..._Args> |
| 517 | using _IsValidExpansion _LIBCPP_NODEBUG_TYPE = decltype(std::__sfinae_test_impl<_Templ, _Args...>(0)); | |
| 520 | using _IsValidExpansion _LIBCPP_NODEBUG_TYPE = decltype(__sfinae_test_impl<_Templ, _Args...>(0)); | |
| 518 | 521 | |
| 519 | 522 | template <class> |
| 520 | 523 | struct __void_t { typedef void type; }; |
| ... | ... | @@ -595,75 +598,6 @@ using __is_primary_template = _IsValidExpansion< |
| 595 | 598 | __test_for_primary_template, _Tp |
| 596 | 599 | >; |
| 597 | 600 | |
| 598 | // addressof | |
| 599 | #ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF | |
| 600 | ||
| 601 | template <class _Tp> | |
| 602 | inline _LIBCPP_CONSTEXPR_AFTER_CXX14 | |
| 603 | _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY | |
| 604 | _Tp* | |
| 605 | addressof(_Tp& __x) _NOEXCEPT | |
| 606 | { | |
| 607 | return __builtin_addressof(__x); | |
| 608 | } | |
| 609 | ||
| 610 | #else | |
| 611 | ||
| 612 | template <class _Tp> | |
| 613 | inline _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY | |
| 614 | _Tp* | |
| 615 | addressof(_Tp& __x) _NOEXCEPT | |
| 616 | { | |
| 617 | return reinterpret_cast<_Tp *>( | |
| 618 | const_cast<char *>(&reinterpret_cast<const volatile char &>(__x))); | |
| 619 | } | |
| 620 | ||
| 621 | #endif // _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF | |
| 622 | ||
| 623 | #if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF) | |
| 624 | // Objective-C++ Automatic Reference Counting uses qualified pointers | |
| 625 | // that require special addressof() signatures. When | |
| 626 | // _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler | |
| 627 | // itself is providing these definitions. Otherwise, we provide them. | |
| 628 | template <class _Tp> | |
| 629 | inline _LIBCPP_INLINE_VISIBILITY | |
| 630 | __strong _Tp* | |
| 631 | addressof(__strong _Tp& __x) _NOEXCEPT | |
| 632 | { | |
| 633 | return &__x; | |
| 634 | } | |
| 635 | ||
| 636 | #ifdef _LIBCPP_HAS_OBJC_ARC_WEAK | |
| 637 | template <class _Tp> | |
| 638 | inline _LIBCPP_INLINE_VISIBILITY | |
| 639 | __weak _Tp* | |
| 640 | addressof(__weak _Tp& __x) _NOEXCEPT | |
| 641 | { | |
| 642 | return &__x; | |
| 643 | } | |
| 644 | #endif | |
| 645 | ||
| 646 | template <class _Tp> | |
| 647 | inline _LIBCPP_INLINE_VISIBILITY | |
| 648 | __autoreleasing _Tp* | |
| 649 | addressof(__autoreleasing _Tp& __x) _NOEXCEPT | |
| 650 | { | |
| 651 | return &__x; | |
| 652 | } | |
| 653 | ||
| 654 | template <class _Tp> | |
| 655 | inline _LIBCPP_INLINE_VISIBILITY | |
| 656 | __unsafe_unretained _Tp* | |
| 657 | addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT | |
| 658 | { | |
| 659 | return &__x; | |
| 660 | } | |
| 661 | #endif | |
| 662 | ||
| 663 | #if !defined(_LIBCPP_CXX03_LANG) | |
| 664 | template <class _Tp> _Tp* addressof(const _Tp&&) noexcept = delete; | |
| 665 | #endif | |
| 666 | ||
| 667 | 601 | struct __two {char __lx[2];}; |
| 668 | 602 | |
| 669 | 603 | // helper class: |
| ... | ... | @@ -1731,6 +1665,21 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_base_of_v |
| 1731 | 1665 | = is_base_of<_Bp, _Dp>::value; |
| 1732 | 1666 | #endif |
| 1733 | 1667 | |
| 1668 | // __is_core_convertible | |
| 1669 | ||
| 1670 | // [conv.general]/3 says "E is convertible to T" whenever "T t=E;" is well-formed. | |
| 1671 | // We can't test for that, but we can test implicit convertibility by passing it | |
| 1672 | // to a function. Notice that __is_core_convertible<void,void> is false, | |
| 1673 | // and __is_core_convertible<immovable-type,immovable-type> is true in C++17 and later. | |
| 1674 | ||
| 1675 | template <class _Tp, class _Up, class = void> | |
| 1676 | struct __is_core_convertible : public false_type {}; | |
| 1677 | ||
| 1678 | template <class _Tp, class _Up> | |
| 1679 | struct __is_core_convertible<_Tp, _Up, decltype( | |
| 1680 | static_cast<void(*)(_Up)>(0) ( static_cast<_Tp(*)()>(0)() ) | |
| 1681 | )> : public true_type {}; | |
| 1682 | ||
| 1734 | 1683 | // is_convertible |
| 1735 | 1684 | |
| 1736 | 1685 | #if __has_feature(is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) |
| ... | ... | @@ -1821,7 +1770,7 @@ template <typename _Tp> |
| 1821 | 1770 | static void __test_noexcept(_Tp) noexcept; |
| 1822 | 1771 | |
| 1823 | 1772 | template<typename _Fm, typename _To> |
| 1824 | static bool_constant<noexcept(__test_noexcept<_To>(declval<_Fm>()))> | |
| 1773 | static bool_constant<noexcept(_VSTD::__test_noexcept<_To>(declval<_Fm>()))> | |
| 1825 | 1774 | __is_nothrow_convertible_test(); |
| 1826 | 1775 | |
| 1827 | 1776 | template <typename _Fm, typename _To> |
| ... | ... | @@ -2550,7 +2499,7 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_destructible_v = __is_destructible( |
| 2550 | 2499 | // if it's a function, return false |
| 2551 | 2500 | // if it's void, return false |
| 2552 | 2501 | // if it's an array of unknown bound, return false |
| 2553 | // Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed | |
| 2502 | // Otherwise, return "declval<_Up&>().~_Up()" is well-formed | |
| 2554 | 2503 | // where _Up is remove_all_extents<_Tp>::type |
| 2555 | 2504 | |
| 2556 | 2505 | template <class> |
| ... | ... | @@ -2876,167 +2825,13 @@ struct __member_pointer_class_type<_Ret _ClassType::*> { |
| 2876 | 2825 | typedef _ClassType type; |
| 2877 | 2826 | }; |
| 2878 | 2827 | |
| 2879 | // result_of | |
| 2880 | ||
| 2881 | template <class _Callable> class result_of; | |
| 2882 | ||
| 2883 | #ifdef _LIBCPP_HAS_NO_VARIADICS | |
| 2884 | ||
| 2885 | template <class _Fn, bool, bool> | |
| 2886 | class __result_of | |
| 2887 | { | |
| 2888 | }; | |
| 2889 | ||
| 2890 | template <class _Fn> | |
| 2891 | class __result_of<_Fn(), true, false> | |
| 2892 | { | |
| 2893 | public: | |
| 2894 | typedef decltype(declval<_Fn>()()) type; | |
| 2895 | }; | |
| 2896 | ||
| 2897 | template <class _Fn, class _A0> | |
| 2898 | class __result_of<_Fn(_A0), true, false> | |
| 2899 | { | |
| 2900 | public: | |
| 2901 | typedef decltype(declval<_Fn>()(declval<_A0>())) type; | |
| 2902 | }; | |
| 2903 | ||
| 2904 | template <class _Fn, class _A0, class _A1> | |
| 2905 | class __result_of<_Fn(_A0, _A1), true, false> | |
| 2906 | { | |
| 2907 | public: | |
| 2908 | typedef decltype(declval<_Fn>()(declval<_A0>(), declval<_A1>())) type; | |
| 2909 | }; | |
| 2910 | ||
| 2911 | template <class _Fn, class _A0, class _A1, class _A2> | |
| 2912 | class __result_of<_Fn(_A0, _A1, _A2), true, false> | |
| 2913 | { | |
| 2914 | public: | |
| 2915 | typedef decltype(declval<_Fn>()(declval<_A0>(), declval<_A1>(), declval<_A2>())) type; | |
| 2916 | }; | |
| 2917 | ||
| 2918 | template <class _MP, class _Tp, bool _IsMemberFunctionPtr> | |
| 2919 | struct __result_of_mp; | |
| 2920 | ||
| 2921 | // member function pointer | |
| 2922 | ||
| 2923 | template <class _MP, class _Tp> | |
| 2924 | struct __result_of_mp<_MP, _Tp, true> | |
| 2925 | : public __identity<typename __member_pointer_traits<_MP>::_ReturnType> | |
| 2926 | { | |
| 2927 | }; | |
| 2928 | ||
| 2929 | // member data pointer | |
| 2930 | ||
| 2931 | template <class _MP, class _Tp, bool> | |
| 2932 | struct __result_of_mdp; | |
| 2933 | ||
| 2934 | template <class _Rp, class _Class, class _Tp> | |
| 2935 | struct __result_of_mdp<_Rp _Class::*, _Tp, false> | |
| 2936 | { | |
| 2937 | typedef typename __apply_cv<decltype(*_VSTD::declval<_Tp>()), _Rp>::type& type; | |
| 2938 | }; | |
| 2939 | ||
| 2940 | template <class _Rp, class _Class, class _Tp> | |
| 2941 | struct __result_of_mdp<_Rp _Class::*, _Tp, true> | |
| 2942 | { | |
| 2943 | typedef typename __apply_cv<_Tp, _Rp>::type& type; | |
| 2944 | }; | |
| 2945 | ||
| 2946 | template <class _Rp, class _Class, class _Tp> | |
| 2947 | struct __result_of_mp<_Rp _Class::*, _Tp, false> | |
| 2948 | : public __result_of_mdp<_Rp _Class::*, _Tp, | |
| 2949 | is_base_of<_Class, typename remove_reference<_Tp>::type>::value> | |
| 2950 | { | |
| 2951 | }; | |
| 2952 | ||
| 2953 | ||
| 2954 | ||
| 2955 | template <class _Fn, class _Tp> | |
| 2956 | class __result_of<_Fn(_Tp), false, true> // _Fn must be member pointer | |
| 2957 | : public __result_of_mp<typename remove_reference<_Fn>::type, | |
| 2958 | _Tp, | |
| 2959 | is_member_function_pointer<typename remove_reference<_Fn>::type>::value> | |
| 2960 | { | |
| 2961 | }; | |
| 2962 | ||
| 2963 | template <class _Fn, class _Tp, class _A0> | |
| 2964 | class __result_of<_Fn(_Tp, _A0), false, true> // _Fn must be member pointer | |
| 2965 | : public __result_of_mp<typename remove_reference<_Fn>::type, | |
| 2966 | _Tp, | |
| 2967 | is_member_function_pointer<typename remove_reference<_Fn>::type>::value> | |
| 2968 | { | |
| 2969 | }; | |
| 2970 | ||
| 2971 | template <class _Fn, class _Tp, class _A0, class _A1> | |
| 2972 | class __result_of<_Fn(_Tp, _A0, _A1), false, true> // _Fn must be member pointer | |
| 2973 | : public __result_of_mp<typename remove_reference<_Fn>::type, | |
| 2974 | _Tp, | |
| 2975 | is_member_function_pointer<typename remove_reference<_Fn>::type>::value> | |
| 2976 | { | |
| 2977 | }; | |
| 2978 | ||
| 2979 | template <class _Fn, class _Tp, class _A0, class _A1, class _A2> | |
| 2980 | class __result_of<_Fn(_Tp, _A0, _A1, _A2), false, true> // _Fn must be member pointer | |
| 2981 | : public __result_of_mp<typename remove_reference<_Fn>::type, | |
| 2982 | _Tp, | |
| 2983 | is_member_function_pointer<typename remove_reference<_Fn>::type>::value> | |
| 2984 | { | |
| 2985 | }; | |
| 2986 | ||
| 2987 | // result_of | |
| 2988 | ||
| 2989 | template <class _Fn> | |
| 2990 | class _LIBCPP_TEMPLATE_VIS result_of<_Fn()> | |
| 2991 | : public __result_of<_Fn(), | |
| 2992 | is_class<typename remove_reference<_Fn>::type>::value || | |
| 2993 | is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, | |
| 2994 | is_member_pointer<typename remove_reference<_Fn>::type>::value | |
| 2995 | > | |
| 2996 | { | |
| 2997 | }; | |
| 2998 | ||
| 2999 | template <class _Fn, class _A0> | |
| 3000 | class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0)> | |
| 3001 | : public __result_of<_Fn(_A0), | |
| 3002 | is_class<typename remove_reference<_Fn>::type>::value || | |
| 3003 | is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, | |
| 3004 | is_member_pointer<typename remove_reference<_Fn>::type>::value | |
| 3005 | > | |
| 3006 | { | |
| 3007 | }; | |
| 3008 | ||
| 3009 | template <class _Fn, class _A0, class _A1> | |
| 3010 | class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0, _A1)> | |
| 3011 | : public __result_of<_Fn(_A0, _A1), | |
| 3012 | is_class<typename remove_reference<_Fn>::type>::value || | |
| 3013 | is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, | |
| 3014 | is_member_pointer<typename remove_reference<_Fn>::type>::value | |
| 3015 | > | |
| 3016 | { | |
| 3017 | }; | |
| 3018 | ||
| 3019 | template <class _Fn, class _A0, class _A1, class _A2> | |
| 3020 | class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0, _A1, _A2)> | |
| 3021 | : public __result_of<_Fn(_A0, _A1, _A2), | |
| 3022 | is_class<typename remove_reference<_Fn>::type>::value || | |
| 3023 | is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, | |
| 3024 | is_member_pointer<typename remove_reference<_Fn>::type>::value | |
| 3025 | > | |
| 3026 | { | |
| 3027 | }; | |
| 3028 | ||
| 3029 | #endif // _LIBCPP_HAS_NO_VARIADICS | |
| 3030 | ||
| 3031 | 2828 | // template <class T, class... Args> struct is_constructible; |
| 3032 | 2829 | |
| 3033 | namespace __is_construct | |
| 3034 | { | |
| 3035 | struct __nat {}; | |
| 3036 | } | |
| 2830 | #if defined(_LIBCPP_COMPILER_GCC) && _GNUC_VER_NEW >= 10000 | |
| 2831 | # define _LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE | |
| 2832 | #endif | |
| 3037 | 2833 | |
| 3038 | #if !defined(_LIBCPP_CXX03_LANG) && (!__has_feature(is_constructible) || \ | |
| 3039 | defined(_LIBCPP_TESTING_FALLBACK_IS_CONSTRUCTIBLE)) | |
| 2834 | #if !defined(_LIBCPP_CXX03_LANG) && !__has_feature(is_constructible) && !defined(_LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE) | |
| 3040 | 2835 | |
| 3041 | 2836 | template <class _Tp, class... _Args> |
| 3042 | 2837 | struct __libcpp_is_constructible; |
| ... | ... | @@ -3151,7 +2946,7 @@ struct __libcpp_is_constructible<_Tp&&, _A0> |
| 3151 | 2946 | |
| 3152 | 2947 | #endif |
| 3153 | 2948 | |
| 3154 | #if __has_feature(is_constructible) | |
| 2949 | #if __has_feature(is_constructible) || defined(_LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE) | |
| 3155 | 2950 | template <class _Tp, class ..._Args> |
| 3156 | 2951 | struct _LIBCPP_TEMPLATE_VIS is_constructible |
| 3157 | 2952 | : public integral_constant<bool, __is_constructible(_Tp, _Args...)> |
| ... | ... | @@ -3442,7 +3237,7 @@ void __implicit_conversion_to(_Tp) noexcept { } |
| 3442 | 3237 | |
| 3443 | 3238 | template <class _Tp, class _Arg> |
| 3444 | 3239 | struct __libcpp_is_nothrow_constructible</*is constructible*/true, /*is reference*/true, _Tp, _Arg> |
| 3445 | : public integral_constant<bool, noexcept(__implicit_conversion_to<_Tp>(declval<_Arg>()))> | |
| 3240 | : public integral_constant<bool, noexcept(_VSTD::__implicit_conversion_to<_Tp>(declval<_Arg>()))> | |
| 3446 | 3241 | { |
| 3447 | 3242 | }; |
| 3448 | 3243 | |
| ... | ... | @@ -3807,7 +3602,7 @@ auto __invoke_constexpr(__any, _Args&& ...__args) -> __nat; |
| 3807 | 3602 | template <class _Fp, class _A0, class ..._Args, |
| 3808 | 3603 | class = __enable_if_bullet1<_Fp, _A0>> |
| 3809 | 3604 | inline _LIBCPP_INLINE_VISIBILITY |
| 3810 | auto | |
| 3605 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3811 | 3606 | __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) |
| 3812 | 3607 | _LIBCPP_INVOKE_RETURN((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...)) |
| 3813 | 3608 | |
| ... | ... | @@ -3821,7 +3616,7 @@ _LIBCPP_INVOKE_RETURN((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__a |
| 3821 | 3616 | template <class _Fp, class _A0, class ..._Args, |
| 3822 | 3617 | class = __enable_if_bullet2<_Fp, _A0>> |
| 3823 | 3618 | inline _LIBCPP_INLINE_VISIBILITY |
| 3824 | auto | |
| 3619 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3825 | 3620 | __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) |
| 3826 | 3621 | _LIBCPP_INVOKE_RETURN((__a0.get().*__f)(_VSTD::forward<_Args>(__args)...)) |
| 3827 | 3622 | |
| ... | ... | @@ -3835,7 +3630,7 @@ _LIBCPP_INVOKE_RETURN((__a0.get().*__f)(_VSTD::forward<_Args>(__args)...)) |
| 3835 | 3630 | template <class _Fp, class _A0, class ..._Args, |
| 3836 | 3631 | class = __enable_if_bullet3<_Fp, _A0>> |
| 3837 | 3632 | inline _LIBCPP_INLINE_VISIBILITY |
| 3838 | auto | |
| 3633 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3839 | 3634 | __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) |
| 3840 | 3635 | _LIBCPP_INVOKE_RETURN(((*_VSTD::forward<_A0>(__a0)).*__f)(_VSTD::forward<_Args>(__args)...)) |
| 3841 | 3636 | |
| ... | ... | @@ -3851,7 +3646,7 @@ _LIBCPP_INVOKE_RETURN(((*_VSTD::forward<_A0>(__a0)).*__f)(_VSTD::forward<_Args>( |
| 3851 | 3646 | template <class _Fp, class _A0, |
| 3852 | 3647 | class = __enable_if_bullet4<_Fp, _A0>> |
| 3853 | 3648 | inline _LIBCPP_INLINE_VISIBILITY |
| 3854 | auto | |
| 3649 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3855 | 3650 | __invoke(_Fp&& __f, _A0&& __a0) |
| 3856 | 3651 | _LIBCPP_INVOKE_RETURN(_VSTD::forward<_A0>(__a0).*__f) |
| 3857 | 3652 | |
| ... | ... | @@ -3865,7 +3660,7 @@ _LIBCPP_INVOKE_RETURN(_VSTD::forward<_A0>(__a0).*__f) |
| 3865 | 3660 | template <class _Fp, class _A0, |
| 3866 | 3661 | class = __enable_if_bullet5<_Fp, _A0>> |
| 3867 | 3662 | inline _LIBCPP_INLINE_VISIBILITY |
| 3868 | auto | |
| 3663 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3869 | 3664 | __invoke(_Fp&& __f, _A0&& __a0) |
| 3870 | 3665 | _LIBCPP_INVOKE_RETURN(__a0.get().*__f) |
| 3871 | 3666 | |
| ... | ... | @@ -3879,7 +3674,7 @@ _LIBCPP_INVOKE_RETURN(__a0.get().*__f) |
| 3879 | 3674 | template <class _Fp, class _A0, |
| 3880 | 3675 | class = __enable_if_bullet6<_Fp, _A0>> |
| 3881 | 3676 | inline _LIBCPP_INLINE_VISIBILITY |
| 3882 | auto | |
| 3677 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3883 | 3678 | __invoke(_Fp&& __f, _A0&& __a0) |
| 3884 | 3679 | _LIBCPP_INVOKE_RETURN((*_VSTD::forward<_A0>(__a0)).*__f) |
| 3885 | 3680 | |
| ... | ... | @@ -3894,7 +3689,7 @@ _LIBCPP_INVOKE_RETURN((*_VSTD::forward<_A0>(__a0)).*__f) |
| 3894 | 3689 | |
| 3895 | 3690 | template <class _Fp, class ..._Args> |
| 3896 | 3691 | inline _LIBCPP_INLINE_VISIBILITY |
| 3897 | auto | |
| 3692 | _LIBCPP_CONSTEXPR_AFTER_CXX17 auto | |
| 3898 | 3693 | __invoke(_Fp&& __f, _Args&& ...__args) |
| 3899 | 3694 | _LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...)) |
| 3900 | 3695 | |
| ... | ... | @@ -3982,14 +3777,97 @@ struct __invoke_of |
| 3982 | 3777 | { |
| 3983 | 3778 | }; |
| 3984 | 3779 | |
| 3780 | #endif // _LIBCPP_CXX03_LANG | |
| 3781 | ||
| 3985 | 3782 | // result_of |
| 3986 | 3783 | |
| 3784 | template <class _Callable> class result_of; | |
| 3785 | ||
| 3786 | #ifndef _LIBCPP_CXX03_LANG | |
| 3787 | ||
| 3987 | 3788 | template <class _Fp, class ..._Args> |
| 3988 | 3789 | class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> |
| 3989 | 3790 | : public __invoke_of<_Fp, _Args...> |
| 3990 | 3791 | { |
| 3991 | 3792 | }; |
| 3992 | 3793 | |
| 3794 | #else // C++03 | |
| 3795 | ||
| 3796 | template <class _Fn, bool, bool> | |
| 3797 | class __result_of | |
| 3798 | { | |
| 3799 | }; | |
| 3800 | ||
| 3801 | template <class _Fn, class ..._Args> | |
| 3802 | class __result_of<_Fn(_Args...), true, false> | |
| 3803 | { | |
| 3804 | public: | |
| 3805 | typedef decltype(declval<_Fn>()(declval<_Args>()...)) type; | |
| 3806 | }; | |
| 3807 | ||
| 3808 | template <class _MP, class _Tp, bool _IsMemberFunctionPtr> | |
| 3809 | struct __result_of_mp; | |
| 3810 | ||
| 3811 | // member function pointer | |
| 3812 | ||
| 3813 | template <class _MP, class _Tp> | |
| 3814 | struct __result_of_mp<_MP, _Tp, true> | |
| 3815 | : public __identity<typename __member_pointer_traits<_MP>::_ReturnType> | |
| 3816 | { | |
| 3817 | }; | |
| 3818 | ||
| 3819 | // member data pointer | |
| 3820 | ||
| 3821 | template <class _MP, class _Tp, bool> | |
| 3822 | struct __result_of_mdp; | |
| 3823 | ||
| 3824 | template <class _Rp, class _Class, class _Tp> | |
| 3825 | struct __result_of_mdp<_Rp _Class::*, _Tp, false> | |
| 3826 | { | |
| 3827 | typedef typename __apply_cv<decltype(*_VSTD::declval<_Tp>()), _Rp>::type& type; | |
| 3828 | }; | |
| 3829 | ||
| 3830 | template <class _Rp, class _Class, class _Tp> | |
| 3831 | struct __result_of_mdp<_Rp _Class::*, _Tp, true> | |
| 3832 | { | |
| 3833 | typedef typename __apply_cv<_Tp, _Rp>::type& type; | |
| 3834 | }; | |
| 3835 | ||
| 3836 | template <class _Rp, class _Class, class _Tp> | |
| 3837 | struct __result_of_mp<_Rp _Class::*, _Tp, false> | |
| 3838 | : public __result_of_mdp<_Rp _Class::*, _Tp, | |
| 3839 | is_base_of<_Class, typename remove_reference<_Tp>::type>::value> | |
| 3840 | { | |
| 3841 | }; | |
| 3842 | ||
| 3843 | template <class _Fn, class _Tp> | |
| 3844 | class __result_of<_Fn(_Tp), false, true> // _Fn must be member pointer | |
| 3845 | : public __result_of_mp<typename remove_reference<_Fn>::type, | |
| 3846 | _Tp, | |
| 3847 | is_member_function_pointer<typename remove_reference<_Fn>::type>::value> | |
| 3848 | { | |
| 3849 | }; | |
| 3850 | ||
| 3851 | template <class _Fn, class _Tp, class ..._Args> | |
| 3852 | class __result_of<_Fn(_Tp, _Args...), false, true> // _Fn must be member pointer | |
| 3853 | : public __result_of_mp<typename remove_reference<_Fn>::type, | |
| 3854 | _Tp, | |
| 3855 | is_member_function_pointer<typename remove_reference<_Fn>::type>::value> | |
| 3856 | { | |
| 3857 | }; | |
| 3858 | ||
| 3859 | template <class _Fn, class ..._Args> | |
| 3860 | class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_Args...)> | |
| 3861 | : public __result_of<_Fn(_Args...), | |
| 3862 | is_class<typename remove_reference<_Fn>::type>::value || | |
| 3863 | is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, | |
| 3864 | is_member_pointer<typename remove_reference<_Fn>::type>::value | |
| 3865 | > | |
| 3866 | { | |
| 3867 | }; | |
| 3868 | ||
| 3869 | #endif // C++03 | |
| 3870 | ||
| 3993 | 3871 | #if _LIBCPP_STD_VER > 11 |
| 3994 | 3872 | template <class _Tp> using result_of_t = typename result_of<_Tp>::type; |
| 3995 | 3873 | #endif |
| ... | ... | @@ -4045,8 +3923,6 @@ _LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_r_v |
| 4045 | 3923 | |
| 4046 | 3924 | #endif // _LIBCPP_STD_VER > 14 |
| 4047 | 3925 | |
| 4048 | #endif // !defined(_LIBCPP_CXX03_LANG) | |
| 4049 | ||
| 4050 | 3926 | template <class _Tp> struct __is_swappable; |
| 4051 | 3927 | template <class _Tp> struct __is_nothrow_swappable; |
| 4052 | 3928 | |
| ... | ... | @@ -4319,6 +4195,25 @@ struct __has_operator_addressof |
| 4319 | 4195 | |
| 4320 | 4196 | #endif // _LIBCPP_CXX03_LANG |
| 4321 | 4197 | |
| 4198 | // is_scoped_enum [meta.unary.prop] | |
| 4199 | ||
| 4200 | #if _LIBCPP_STD_VER > 20 | |
| 4201 | template <class _Tp, bool = is_enum_v<_Tp> > | |
| 4202 | struct __is_scoped_enum_helper : false_type {}; | |
| 4203 | ||
| 4204 | template <class _Tp> | |
| 4205 | struct __is_scoped_enum_helper<_Tp, true> | |
| 4206 | : public bool_constant<!is_convertible_v<_Tp, underlying_type_t<_Tp> > > {}; | |
| 4207 | ||
| 4208 | template <class _Tp> | |
| 4209 | struct _LIBCPP_TEMPLATE_VIS is_scoped_enum | |
| 4210 | : public __is_scoped_enum_helper<_Tp> {}; | |
| 4211 | ||
| 4212 | template <class _Tp> | |
| 4213 | _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scoped_enum_v = | |
| 4214 | is_scoped_enum<_Tp>::value; | |
| 4215 | #endif | |
| 4216 | ||
| 4322 | 4217 | #if _LIBCPP_STD_VER > 14 |
| 4323 | 4218 | |
| 4324 | 4219 | template <class... _Args> |
| ... | ... | @@ -4341,7 +4236,6 @@ _LIBCPP_INLINE_VAR constexpr bool negation_v |
| 4341 | 4236 | #endif // _LIBCPP_STD_VER > 14 |
| 4342 | 4237 | |
| 4343 | 4238 | // These traits are used in __tree and __hash_table |
| 4344 | #ifndef _LIBCPP_CXX03_LANG | |
| 4345 | 4239 | struct __extract_key_fail_tag {}; |
| 4346 | 4240 | struct __extract_key_self_tag {}; |
| 4347 | 4241 | struct __extract_key_first_tag {}; |
| ... | ... | @@ -4353,7 +4247,7 @@ struct __can_extract_key |
| 4353 | 4247 | __extract_key_fail_tag>::type {}; |
| 4354 | 4248 | |
| 4355 | 4249 | template <class _Pair, class _Key, class _First, class _Second> |
| 4356 | struct __can_extract_key<_Pair, _Key, pair<_First, _Second>> | |
| 4250 | struct __can_extract_key<_Pair, _Key, pair<_First, _Second> > | |
| 4357 | 4251 | : conditional<_IsSame<typename remove_const<_First>::type, _Key>::value, |
| 4358 | 4252 | __extract_key_first_tag, __extract_key_fail_tag>::type {}; |
| 4359 | 4253 | |
| ... | ... | @@ -4371,8 +4265,6 @@ template <class _ValTy, class _Key, class _RawValTy> |
| 4371 | 4265 | struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy> |
| 4372 | 4266 | : false_type {}; |
| 4373 | 4267 | |
| 4374 | #endif | |
| 4375 | ||
| 4376 | 4268 | #ifndef _LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED |
| 4377 | 4269 | #if _LIBCPP_STD_VER > 17 |
| 4378 | 4270 | _LIBCPP_INLINE_VISIBILITY |
lib/libcxx/include/typeinfo+24-5| ... | ... | @@ -57,6 +57,7 @@ public: |
| 57 | 57 | */ |
| 58 | 58 | |
| 59 | 59 | #include <__config> |
| 60 | #include <__availability> | |
| 60 | 61 | #include <exception> |
| 61 | 62 | #include <cstddef> |
| 62 | 63 | #include <cstdint> |
| ... | ... | @@ -141,7 +142,7 @@ public: |
| 141 | 142 | // comparison is equal. |
| 142 | 143 | // -------------------------------------------------------------------------- // |
| 143 | 144 | // NonUniqueARMRTTIBit |
| 144 | // (selected on ARM64 regardless of _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION) | |
| 145 | // (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 3) | |
| 145 | 146 | // -------------------------------------------------------------------------- // |
| 146 | 147 | // This implementation of type_info does not assume always a unique copy of |
| 147 | 148 | // the RTTI for a given type inside a program. It packs the pointer to the |
| ... | ... | @@ -160,6 +161,24 @@ public: |
| 160 | 161 | // the pointer when it constructs the type_info, depending on whether it can |
| 161 | 162 | // guarantee uniqueness for that specific type_info. |
| 162 | 163 | |
| 164 | // This value can be overriden in the __config_site. When it's not overriden, | |
| 165 | // we pick a default implementation based on the platform here. | |
| 166 | #ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION | |
| 167 | ||
| 168 | // Windows binaries can't merge typeinfos, so use the NonUnique implementation. | |
| 169 | # ifdef _LIBCPP_OBJECT_FORMAT_COFF | |
| 170 | # define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 2 | |
| 171 | ||
| 172 | // On arm64 on Apple platforms, use the special NonUniqueARMRTTIBit implementation. | |
| 173 | # elif defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) | |
| 174 | # define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 3 | |
| 175 | ||
| 176 | // On all other platforms, assume the Itanium C++ ABI and use the Unique implementation. | |
| 177 | # else | |
| 178 | # define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 1 | |
| 179 | # endif | |
| 180 | #endif | |
| 181 | ||
| 163 | 182 | struct __type_info_implementations { |
| 164 | 183 | struct __string_impl_base { |
| 165 | 184 | typedef const char* __type_name_t; |
| ... | ... | @@ -243,7 +262,7 @@ struct __type_info_implementations { |
| 243 | 262 | private: |
| 244 | 263 | // The unique bit is the top bit. It is expected that __type_name_t is 64 bits when |
| 245 | 264 | // this implementation is actually used. |
| 246 | typedef std::integral_constant<__type_name_t, | |
| 265 | typedef integral_constant<__type_name_t, | |
| 247 | 266 | (1ULL << ((__CHAR_BIT__ * sizeof(__type_name_t)) - 1))> __non_unique_rtti_bit; |
| 248 | 267 | |
| 249 | 268 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -257,12 +276,12 @@ struct __type_info_implementations { |
| 257 | 276 | }; |
| 258 | 277 | |
| 259 | 278 | typedef |
| 260 | #if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) | |
| 261 | __non_unique_arm_rtti_bit_impl | |
| 262 | #elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 1 | |
| 279 | #if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 1 | |
| 263 | 280 | __unique_impl |
| 264 | 281 | #elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 2 |
| 265 | 282 | __non_unique_impl |
| 283 | #elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 3 | |
| 284 | __non_unique_arm_rtti_bit_impl | |
| 266 | 285 | #else |
| 267 | 286 | # error invalid configuration for _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION |
| 268 | 287 | #endif |
lib/libcxx/include/unordered_map+203-67| ... | ... | @@ -173,10 +173,22 @@ public: |
| 173 | 173 | |
| 174 | 174 | iterator find(const key_type& k); |
| 175 | 175 | const_iterator find(const key_type& k) const; |
| 176 | template<typename K> | |
| 177 | iterator find(const K& x); // C++20 | |
| 178 | template<typename K> | |
| 179 | const_iterator find(const K& x) const; // C++20 | |
| 176 | 180 | size_type count(const key_type& k) const; |
| 181 | template<typename K> | |
| 182 | size_type count(const K& k) const; // C++20 | |
| 177 | 183 | bool contains(const key_type& k) const; // C++20 |
| 184 | template<typename K> | |
| 185 | bool contains(const K& k) const; // C++20 | |
| 178 | 186 | pair<iterator, iterator> equal_range(const key_type& k); |
| 179 | 187 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 188 | template<typename K> | |
| 189 | pair<iterator, iterator> equal_range(const K& k); // C++20 | |
| 190 | template<typename K> | |
| 191 | pair<const_iterator, const_iterator> equal_range(const K& k) const; // C++20 | |
| 180 | 192 | |
| 181 | 193 | mapped_type& operator[](const key_type& k); |
| 182 | 194 | mapped_type& operator[](key_type&& k); |
| ... | ... | @@ -355,10 +367,22 @@ public: |
| 355 | 367 | |
| 356 | 368 | iterator find(const key_type& k); |
| 357 | 369 | const_iterator find(const key_type& k) const; |
| 370 | template<typename K> | |
| 371 | iterator find(const K& x); // C++20 | |
| 372 | template<typename K> | |
| 373 | const_iterator find(const K& x) const; // C++20 | |
| 358 | 374 | size_type count(const key_type& k) const; |
| 375 | template<typename K> | |
| 376 | size_type count(const K& k) const; // C++20 | |
| 359 | 377 | bool contains(const key_type& k) const; // C++20 |
| 378 | template<typename K> | |
| 379 | bool contains(const K& k) const; // C++20 | |
| 360 | 380 | pair<iterator, iterator> equal_range(const key_type& k); |
| 361 | 381 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 382 | template<typename K> | |
| 383 | pair<iterator, iterator> equal_range(const K& k); // C++20 | |
| 384 | template<typename K> | |
| 385 | pair<const_iterator, const_iterator> equal_range(const K& k) const; // C++20 | |
| 362 | 386 | |
| 363 | 387 | size_type bucket_count() const noexcept; |
| 364 | 388 | size_type max_bucket_count() const noexcept; |
| ... | ... | @@ -423,7 +447,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc> |
| 423 | 447 | |
| 424 | 448 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 425 | 449 | |
| 426 | template <class _Key, class _Cp, class _Hash, | |
| 450 | template <class _Key, class _Cp, class _Hash, class _Pred, | |
| 427 | 451 | bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value> |
| 428 | 452 | class __unordered_map_hasher |
| 429 | 453 | : private _Hash |
| ... | ... | @@ -445,6 +469,12 @@ public: |
| 445 | 469 | _LIBCPP_INLINE_VISIBILITY |
| 446 | 470 | size_t operator()(const _Key& __x) const |
| 447 | 471 | {return static_cast<const _Hash&>(*this)(__x);} |
| 472 | #if _LIBCPP_STD_VER > 17 | |
| 473 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 474 | _LIBCPP_INLINE_VISIBILITY | |
| 475 | size_t operator()(const _K2& __x) const | |
| 476 | {return static_cast<const _Hash&>(*this)(__x);} | |
| 477 | #endif | |
| 448 | 478 | void swap(__unordered_map_hasher&__y) |
| 449 | 479 | _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value) |
| 450 | 480 | { |
| ... | ... | @@ -453,8 +483,8 @@ public: |
| 453 | 483 | } |
| 454 | 484 | }; |
| 455 | 485 | |
| 456 | template <class _Key, class _Cp, class _Hash> | |
| 457 | class __unordered_map_hasher<_Key, _Cp, _Hash, false> | |
| 486 | template <class _Key, class _Cp, class _Hash, class _Pred> | |
| 487 | class __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, false> | |
| 458 | 488 | { |
| 459 | 489 | _Hash __hash_; |
| 460 | 490 | public: |
| ... | ... | @@ -474,6 +504,12 @@ public: |
| 474 | 504 | _LIBCPP_INLINE_VISIBILITY |
| 475 | 505 | size_t operator()(const _Key& __x) const |
| 476 | 506 | {return __hash_(__x);} |
| 507 | #if _LIBCPP_STD_VER > 17 | |
| 508 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 509 | _LIBCPP_INLINE_VISIBILITY | |
| 510 | size_t operator()(const _K2& __x) const | |
| 511 | {return __hash_(__x);} | |
| 512 | #endif | |
| 477 | 513 | void swap(__unordered_map_hasher&__y) |
| 478 | 514 | _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value) |
| 479 | 515 | { |
| ... | ... | @@ -482,17 +518,17 @@ public: |
| 482 | 518 | } |
| 483 | 519 | }; |
| 484 | 520 | |
| 485 | template <class _Key, class _Cp, class _Hash, bool __b> | |
| 521 | template <class _Key, class _Cp, class _Hash, class _Pred, bool __b> | |
| 486 | 522 | inline _LIBCPP_INLINE_VISIBILITY |
| 487 | 523 | void |
| 488 | swap(__unordered_map_hasher<_Key, _Cp, _Hash, __b>& __x, | |
| 489 | __unordered_map_hasher<_Key, _Cp, _Hash, __b>& __y) | |
| 524 | swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x, | |
| 525 | __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y) | |
| 490 | 526 | _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) |
| 491 | 527 | { |
| 492 | 528 | __x.swap(__y); |
| 493 | 529 | } |
| 494 | 530 | |
| 495 | template <class _Key, class _Cp, class _Pred, | |
| 531 | template <class _Key, class _Cp, class _Pred, class _Hash, | |
| 496 | 532 | bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value> |
| 497 | 533 | class __unordered_map_equal |
| 498 | 534 | : private _Pred |
| ... | ... | @@ -517,6 +553,24 @@ public: |
| 517 | 553 | _LIBCPP_INLINE_VISIBILITY |
| 518 | 554 | bool operator()(const _Key& __x, const _Cp& __y) const |
| 519 | 555 | {return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);} |
| 556 | #if _LIBCPP_STD_VER > 17 | |
| 557 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 558 | _LIBCPP_INLINE_VISIBILITY | |
| 559 | bool operator()(const _Cp& __x, const _K2& __y) const | |
| 560 | {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);} | |
| 561 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 562 | _LIBCPP_INLINE_VISIBILITY | |
| 563 | bool operator()(const _K2& __x, const _Cp& __y) const | |
| 564 | {return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);} | |
| 565 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 566 | _LIBCPP_INLINE_VISIBILITY | |
| 567 | bool operator()(const _Key& __x, const _K2& __y) const | |
| 568 | {return static_cast<const _Pred&>(*this)(__x, __y);} | |
| 569 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 570 | _LIBCPP_INLINE_VISIBILITY | |
| 571 | bool operator()(const _K2& __x, const _Key& __y) const | |
| 572 | {return static_cast<const _Pred&>(*this)(__x, __y);} | |
| 573 | #endif | |
| 520 | 574 | void swap(__unordered_map_equal&__y) |
| 521 | 575 | _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value) |
| 522 | 576 | { |
| ... | ... | @@ -525,8 +579,8 @@ public: |
| 525 | 579 | } |
| 526 | 580 | }; |
| 527 | 581 | |
| 528 | template <class _Key, class _Cp, class _Pred> | |
| 529 | class __unordered_map_equal<_Key, _Cp, _Pred, false> | |
| 582 | template <class _Key, class _Cp, class _Pred, class _Hash> | |
| 583 | class __unordered_map_equal<_Key, _Cp, _Pred, _Hash, false> | |
| 530 | 584 | { |
| 531 | 585 | _Pred __pred_; |
| 532 | 586 | public: |
| ... | ... | @@ -549,6 +603,24 @@ public: |
| 549 | 603 | _LIBCPP_INLINE_VISIBILITY |
| 550 | 604 | bool operator()(const _Key& __x, const _Cp& __y) const |
| 551 | 605 | {return __pred_(__x, __y.__get_value().first);} |
| 606 | #if _LIBCPP_STD_VER > 17 | |
| 607 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 608 | _LIBCPP_INLINE_VISIBILITY | |
| 609 | bool operator()(const _Cp& __x, const _K2& __y) const | |
| 610 | {return __pred_(__x.__get_value().first, __y);} | |
| 611 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 612 | _LIBCPP_INLINE_VISIBILITY | |
| 613 | bool operator()(const _K2& __x, const _Cp& __y) const | |
| 614 | {return __pred_(__x, __y.__get_value().first);} | |
| 615 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 616 | _LIBCPP_INLINE_VISIBILITY | |
| 617 | bool operator()(const _Key& __x, const _K2& __y) const | |
| 618 | {return __pred_(__x, __y);} | |
| 619 | template <typename _K2, typename = _EnableIf<__is_transparent<_Hash, _K2>::value && __is_transparent<_Pred, _K2>::value>> | |
| 620 | _LIBCPP_INLINE_VISIBILITY | |
| 621 | bool operator()(const _K2& __x, const _Key& __y) const | |
| 622 | {return __pred_(__x, __y);} | |
| 623 | #endif | |
| 552 | 624 | void swap(__unordered_map_equal&__y) |
| 553 | 625 | _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value) |
| 554 | 626 | { |
| ... | ... | @@ -557,11 +629,11 @@ public: |
| 557 | 629 | } |
| 558 | 630 | }; |
| 559 | 631 | |
| 560 | template <class _Key, class _Cp, class _Pred, bool __b> | |
| 632 | template <class _Key, class _Cp, class _Pred, class _Hash, bool __b> | |
| 561 | 633 | inline _LIBCPP_INLINE_VISIBILITY |
| 562 | 634 | void |
| 563 | swap(__unordered_map_equal<_Key, _Cp, _Pred, __b>& __x, | |
| 564 | __unordered_map_equal<_Key, _Cp, _Pred, __b>& __y) | |
| 635 | swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x, | |
| 636 | __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y) | |
| 565 | 637 | _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) |
| 566 | 638 | { |
| 567 | 639 | __x.swap(__y); |
| ... | ... | @@ -858,11 +930,11 @@ public: |
| 858 | 930 | "Invalid allocator::value_type"); |
| 859 | 931 | |
| 860 | 932 | private: |
| 861 | typedef __hash_value_type<key_type, mapped_type> __value_type; | |
| 862 | typedef __unordered_map_hasher<key_type, __value_type, hasher> __hasher; | |
| 863 | typedef __unordered_map_equal<key_type, __value_type, key_equal> __key_equal; | |
| 933 | typedef __hash_value_type<key_type, mapped_type> __value_type; | |
| 934 | typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher; | |
| 935 | typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher> __key_equal; | |
| 864 | 936 | typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, |
| 865 | __value_type>::type __allocator_type; | |
| 937 | __value_type>::type __allocator_type; | |
| 866 | 938 | |
| 867 | 939 | typedef __hash_table<__value_type, __hasher, |
| 868 | 940 | __key_equal, __allocator_type> __table; |
| ... | ... | @@ -906,7 +978,7 @@ public: |
| 906 | 978 | unordered_map() |
| 907 | 979 | _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) |
| 908 | 980 | { |
| 909 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 981 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 910 | 982 | __get_db()->__insert_c(this); |
| 911 | 983 | #endif |
| 912 | 984 | } |
| ... | ... | @@ -1025,7 +1097,7 @@ public: |
| 1025 | 1097 | {return __table_.__insert_unique(__x);} |
| 1026 | 1098 | |
| 1027 | 1099 | iterator insert(const_iterator __p, const value_type& __x) { |
| 1028 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1100 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1029 | 1101 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1030 | 1102 | "unordered_map::insert(const_iterator, const value_type&) called with an iterator not" |
| 1031 | 1103 | " referring to this unordered_map"); |
| ... | ... | @@ -1049,7 +1121,7 @@ public: |
| 1049 | 1121 | {return __table_.__insert_unique(_VSTD::move(__x));} |
| 1050 | 1122 | |
| 1051 | 1123 | iterator insert(const_iterator __p, value_type&& __x) { |
| 1052 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1124 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1053 | 1125 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1054 | 1126 | "unordered_map::insert(const_iterator, const value_type&) called with an iterator not" |
| 1055 | 1127 | " referring to this unordered_map"); |
| ... | ... | @@ -1070,7 +1142,7 @@ public: |
| 1070 | 1142 | _LIBCPP_INLINE_VISIBILITY |
| 1071 | 1143 | iterator insert(const_iterator __p, _Pp&& __x) |
| 1072 | 1144 | { |
| 1073 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1145 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1074 | 1146 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1075 | 1147 | "unordered_map::insert(const_iterator, value_type&&) called with an iterator not" |
| 1076 | 1148 | " referring to this unordered_map"); |
| ... | ... | @@ -1089,7 +1161,7 @@ public: |
| 1089 | 1161 | template <class... _Args> |
| 1090 | 1162 | _LIBCPP_INLINE_VISIBILITY |
| 1091 | 1163 | iterator emplace_hint(const_iterator __p, _Args&&... __args) { |
| 1092 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1164 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1093 | 1165 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| 1094 | 1166 | "unordered_map::emplace_hint(const_iterator, args...) called with an iterator not" |
| 1095 | 1167 | " referring to this unordered_map"); |
| ... | ... | @@ -1106,7 +1178,7 @@ public: |
| 1106 | 1178 | _LIBCPP_INLINE_VISIBILITY |
| 1107 | 1179 | pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args) |
| 1108 | 1180 | { |
| 1109 | return __table_.__emplace_unique_key_args(__k, _VSTD::piecewise_construct, | |
| 1181 | return __table_.__emplace_unique_key_args(__k, piecewise_construct, | |
| 1110 | 1182 | _VSTD::forward_as_tuple(__k), |
| 1111 | 1183 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); |
| 1112 | 1184 | } |
| ... | ... | @@ -1115,7 +1187,7 @@ public: |
| 1115 | 1187 | _LIBCPP_INLINE_VISIBILITY |
| 1116 | 1188 | pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args) |
| 1117 | 1189 | { |
| 1118 | return __table_.__emplace_unique_key_args(__k, _VSTD::piecewise_construct, | |
| 1190 | return __table_.__emplace_unique_key_args(__k, piecewise_construct, | |
| 1119 | 1191 | _VSTD::forward_as_tuple(_VSTD::move(__k)), |
| 1120 | 1192 | _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); |
| 1121 | 1193 | } |
| ... | ... | @@ -1124,7 +1196,7 @@ public: |
| 1124 | 1196 | _LIBCPP_INLINE_VISIBILITY |
| 1125 | 1197 | iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args) |
| 1126 | 1198 | { |
| 1127 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1199 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1128 | 1200 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this, |
| 1129 | 1201 | "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not" |
| 1130 | 1202 | " referring to this unordered_map"); |
| ... | ... | @@ -1138,7 +1210,7 @@ public: |
| 1138 | 1210 | _LIBCPP_INLINE_VISIBILITY |
| 1139 | 1211 | iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args) |
| 1140 | 1212 | { |
| 1141 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1213 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1142 | 1214 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this, |
| 1143 | 1215 | "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not" |
| 1144 | 1216 | " referring to this unordered_map"); |
| ... | ... | @@ -1280,11 +1352,34 @@ public: |
| 1280 | 1352 | iterator find(const key_type& __k) {return __table_.find(__k);} |
| 1281 | 1353 | _LIBCPP_INLINE_VISIBILITY |
| 1282 | 1354 | const_iterator find(const key_type& __k) const {return __table_.find(__k);} |
| 1355 | ||
| 1356 | #if _LIBCPP_STD_VER > 17 | |
| 1357 | template <typename _K2> | |
| 1358 | _LIBCPP_INLINE_VISIBILITY | |
| 1359 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, iterator> | |
| 1360 | find(const _K2& __k) {return __table_.find(__k);} | |
| 1361 | template <typename _K2> | |
| 1362 | _LIBCPP_INLINE_VISIBILITY | |
| 1363 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, const_iterator> | |
| 1364 | find(const _K2& __k) const {return __table_.find(__k);} | |
| 1365 | #endif // _LIBCPP_STD_VER > 17 | |
| 1366 | ||
| 1283 | 1367 | _LIBCPP_INLINE_VISIBILITY |
| 1284 | 1368 | size_type count(const key_type& __k) const {return __table_.__count_unique(__k);} |
| 1369 | #if _LIBCPP_STD_VER > 17 | |
| 1370 | template <typename _K2> | |
| 1371 | _LIBCPP_INLINE_VISIBILITY | |
| 1372 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, size_type> | |
| 1373 | count(const _K2& __k) const {return __table_.__count_unique(__k);} | |
| 1374 | #endif // _LIBCPP_STD_VER > 17 | |
| 1285 | 1375 | #if _LIBCPP_STD_VER > 17 |
| 1286 | 1376 | _LIBCPP_INLINE_VISIBILITY |
| 1287 | 1377 | bool contains(const key_type& __k) const {return find(__k) != end();} |
| 1378 | ||
| 1379 | template <typename _K2> | |
| 1380 | _LIBCPP_INLINE_VISIBILITY | |
| 1381 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, bool> | |
| 1382 | contains(const _K2& __k) const {return find(__k) != end();} | |
| 1288 | 1383 | #endif // _LIBCPP_STD_VER > 17 |
| 1289 | 1384 | _LIBCPP_INLINE_VISIBILITY |
| 1290 | 1385 | pair<iterator, iterator> equal_range(const key_type& __k) |
| ... | ... | @@ -1292,6 +1387,16 @@ public: |
| 1292 | 1387 | _LIBCPP_INLINE_VISIBILITY |
| 1293 | 1388 | pair<const_iterator, const_iterator> equal_range(const key_type& __k) const |
| 1294 | 1389 | {return __table_.__equal_range_unique(__k);} |
| 1390 | #if _LIBCPP_STD_VER > 17 | |
| 1391 | template <typename _K2> | |
| 1392 | _LIBCPP_INLINE_VISIBILITY | |
| 1393 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<iterator, iterator>> | |
| 1394 | equal_range(const _K2& __k) {return __table_.__equal_range_unique(__k);} | |
| 1395 | template <typename _K2> | |
| 1396 | _LIBCPP_INLINE_VISIBILITY | |
| 1397 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<const_iterator, const_iterator>> | |
| 1398 | equal_range(const _K2& __k) const {return __table_.__equal_range_unique(__k);} | |
| 1399 | #endif // _LIBCPP_STD_VER > 17 | |
| 1295 | 1400 | |
| 1296 | 1401 | mapped_type& operator[](const key_type& __k); |
| 1297 | 1402 | #ifndef _LIBCPP_CXX03_LANG |
| ... | ... | @@ -1336,7 +1441,7 @@ public: |
| 1336 | 1441 | _LIBCPP_INLINE_VISIBILITY |
| 1337 | 1442 | void reserve(size_type __n) {__table_.reserve(__n);} |
| 1338 | 1443 | |
| 1339 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1444 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1340 | 1445 | |
| 1341 | 1446 | bool __dereferenceable(const const_iterator* __i) const |
| 1342 | 1447 | {return __table_.__dereferenceable(&__i->__i_);} |
| ... | ... | @@ -1347,7 +1452,7 @@ public: |
| 1347 | 1452 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const |
| 1348 | 1453 | {return __table_.__addable(&__i->__i_, __n);} |
| 1349 | 1454 | |
| 1350 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1455 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 1351 | 1456 | |
| 1352 | 1457 | private: |
| 1353 | 1458 | |
| ... | ... | @@ -1428,7 +1533,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1428 | 1533 | size_type __n, const hasher& __hf, const key_equal& __eql) |
| 1429 | 1534 | : __table_(__hf, __eql) |
| 1430 | 1535 | { |
| 1431 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1536 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1432 | 1537 | __get_db()->__insert_c(this); |
| 1433 | 1538 | #endif |
| 1434 | 1539 | __table_.rehash(__n); |
| ... | ... | @@ -1440,7 +1545,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1440 | 1545 | const allocator_type& __a) |
| 1441 | 1546 | : __table_(__hf, __eql, typename __table::allocator_type(__a)) |
| 1442 | 1547 | { |
| 1443 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1548 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1444 | 1549 | __get_db()->__insert_c(this); |
| 1445 | 1550 | #endif |
| 1446 | 1551 | __table_.rehash(__n); |
| ... | ... | @@ -1452,7 +1557,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1452 | 1557 | const allocator_type& __a) |
| 1453 | 1558 | : __table_(typename __table::allocator_type(__a)) |
| 1454 | 1559 | { |
| 1455 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1560 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1456 | 1561 | __get_db()->__insert_c(this); |
| 1457 | 1562 | #endif |
| 1458 | 1563 | } |
| ... | ... | @@ -1462,7 +1567,7 @@ template <class _InputIterator> |
| 1462 | 1567 | unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1463 | 1568 | _InputIterator __first, _InputIterator __last) |
| 1464 | 1569 | { |
| 1465 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1570 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1466 | 1571 | __get_db()->__insert_c(this); |
| 1467 | 1572 | #endif |
| 1468 | 1573 | insert(__first, __last); |
| ... | ... | @@ -1475,7 +1580,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1475 | 1580 | const hasher& __hf, const key_equal& __eql) |
| 1476 | 1581 | : __table_(__hf, __eql) |
| 1477 | 1582 | { |
| 1478 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1583 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1479 | 1584 | __get_db()->__insert_c(this); |
| 1480 | 1585 | #endif |
| 1481 | 1586 | __table_.rehash(__n); |
| ... | ... | @@ -1489,7 +1594,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1489 | 1594 | const hasher& __hf, const key_equal& __eql, const allocator_type& __a) |
| 1490 | 1595 | : __table_(__hf, __eql, typename __table::allocator_type(__a)) |
| 1491 | 1596 | { |
| 1492 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1597 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1493 | 1598 | __get_db()->__insert_c(this); |
| 1494 | 1599 | #endif |
| 1495 | 1600 | __table_.rehash(__n); |
| ... | ... | @@ -1501,7 +1606,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1501 | 1606 | const unordered_map& __u) |
| 1502 | 1607 | : __table_(__u.__table_) |
| 1503 | 1608 | { |
| 1504 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1609 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1505 | 1610 | __get_db()->__insert_c(this); |
| 1506 | 1611 | #endif |
| 1507 | 1612 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -1513,7 +1618,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1513 | 1618 | const unordered_map& __u, const allocator_type& __a) |
| 1514 | 1619 | : __table_(__u.__table_, typename __table::allocator_type(__a)) |
| 1515 | 1620 | { |
| 1516 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1621 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1517 | 1622 | __get_db()->__insert_c(this); |
| 1518 | 1623 | #endif |
| 1519 | 1624 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -1529,7 +1634,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1529 | 1634 | _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) |
| 1530 | 1635 | : __table_(_VSTD::move(__u.__table_)) |
| 1531 | 1636 | { |
| 1532 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1637 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1533 | 1638 | __get_db()->__insert_c(this); |
| 1534 | 1639 | __get_db()->swap(this, &__u); |
| 1535 | 1640 | #endif |
| ... | ... | @@ -1540,7 +1645,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1540 | 1645 | unordered_map&& __u, const allocator_type& __a) |
| 1541 | 1646 | : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a)) |
| 1542 | 1647 | { |
| 1543 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1648 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1544 | 1649 | __get_db()->__insert_c(this); |
| 1545 | 1650 | #endif |
| 1546 | 1651 | if (__a != __u.get_allocator()) |
| ... | ... | @@ -1551,7 +1656,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1551 | 1656 | __u.__table_.remove((__i++).__i_)->__value_.__move()); |
| 1552 | 1657 | } |
| 1553 | 1658 | } |
| 1554 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1659 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1555 | 1660 | else |
| 1556 | 1661 | __get_db()->swap(this, &__u); |
| 1557 | 1662 | #endif |
| ... | ... | @@ -1561,7 +1666,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> |
| 1561 | 1666 | unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1562 | 1667 | initializer_list<value_type> __il) |
| 1563 | 1668 | { |
| 1564 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1669 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1565 | 1670 | __get_db()->__insert_c(this); |
| 1566 | 1671 | #endif |
| 1567 | 1672 | insert(__il.begin(), __il.end()); |
| ... | ... | @@ -1573,7 +1678,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1573 | 1678 | const key_equal& __eql) |
| 1574 | 1679 | : __table_(__hf, __eql) |
| 1575 | 1680 | { |
| 1576 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1681 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1577 | 1682 | __get_db()->__insert_c(this); |
| 1578 | 1683 | #endif |
| 1579 | 1684 | __table_.rehash(__n); |
| ... | ... | @@ -1586,7 +1691,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( |
| 1586 | 1691 | const key_equal& __eql, const allocator_type& __a) |
| 1587 | 1692 | : __table_(__hf, __eql, typename __table::allocator_type(__a)) |
| 1588 | 1693 | { |
| 1589 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1694 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1590 | 1695 | __get_db()->__insert_c(this); |
| 1591 | 1696 | #endif |
| 1592 | 1697 | __table_.rehash(__n); |
| ... | ... | @@ -1633,8 +1738,8 @@ _Tp& |
| 1633 | 1738 | unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k) |
| 1634 | 1739 | { |
| 1635 | 1740 | return __table_.__emplace_unique_key_args(__k, |
| 1636 | std::piecewise_construct, std::forward_as_tuple(__k), | |
| 1637 | std::forward_as_tuple()).first->__get_value().second; | |
| 1741 | piecewise_construct, _VSTD::forward_as_tuple(__k), | |
| 1742 | _VSTD::forward_as_tuple()).first->__get_value().second; | |
| 1638 | 1743 | } |
| 1639 | 1744 | |
| 1640 | 1745 | template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> |
| ... | ... | @@ -1642,8 +1747,8 @@ _Tp& |
| 1642 | 1747 | unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k) |
| 1643 | 1748 | { |
| 1644 | 1749 | return __table_.__emplace_unique_key_args(__k, |
| 1645 | std::piecewise_construct, std::forward_as_tuple(std::move(__k)), | |
| 1646 | std::forward_as_tuple()).first->__get_value().second; | |
| 1750 | piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__k)), | |
| 1751 | _VSTD::forward_as_tuple()).first->__get_value().second; | |
| 1647 | 1752 | } |
| 1648 | 1753 | #else // _LIBCPP_CXX03_LANG |
| 1649 | 1754 | |
| ... | ... | @@ -1657,7 +1762,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node_with_key(const |
| 1657 | 1762 | __h.get_deleter().__first_constructed = true; |
| 1658 | 1763 | __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second)); |
| 1659 | 1764 | __h.get_deleter().__second_constructed = true; |
| 1660 | return _LIBCPP_EXPLICIT_MOVE(__h); // explicitly moved for C++03 | |
| 1765 | return __h; | |
| 1661 | 1766 | } |
| 1662 | 1767 | |
| 1663 | 1768 | template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> |
| ... | ... | @@ -1762,11 +1867,11 @@ public: |
| 1762 | 1867 | "Invalid allocator::value_type"); |
| 1763 | 1868 | |
| 1764 | 1869 | private: |
| 1765 | typedef __hash_value_type<key_type, mapped_type> __value_type; | |
| 1766 | typedef __unordered_map_hasher<key_type, __value_type, hasher> __hasher; | |
| 1767 | typedef __unordered_map_equal<key_type, __value_type, key_equal> __key_equal; | |
| 1870 | typedef __hash_value_type<key_type, mapped_type> __value_type; | |
| 1871 | typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher; | |
| 1872 | typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher> __key_equal; | |
| 1768 | 1873 | typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, |
| 1769 | __value_type>::type __allocator_type; | |
| 1874 | __value_type>::type __allocator_type; | |
| 1770 | 1875 | |
| 1771 | 1876 | typedef __hash_table<__value_type, __hasher, |
| 1772 | 1877 | __key_equal, __allocator_type> __table; |
| ... | ... | @@ -1807,7 +1912,7 @@ public: |
| 1807 | 1912 | unordered_multimap() |
| 1808 | 1913 | _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) |
| 1809 | 1914 | { |
| 1810 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1915 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1811 | 1916 | __get_db()->__insert_c(this); |
| 1812 | 1917 | #endif |
| 1813 | 1918 | } |
| ... | ... | @@ -2059,11 +2164,32 @@ public: |
| 2059 | 2164 | iterator find(const key_type& __k) {return __table_.find(__k);} |
| 2060 | 2165 | _LIBCPP_INLINE_VISIBILITY |
| 2061 | 2166 | const_iterator find(const key_type& __k) const {return __table_.find(__k);} |
| 2167 | #if _LIBCPP_STD_VER > 17 | |
| 2168 | template <typename _K2> | |
| 2169 | _LIBCPP_INLINE_VISIBILITY | |
| 2170 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, iterator> | |
| 2171 | find(const _K2& __k) {return __table_.find(__k);} | |
| 2172 | template <typename _K2> | |
| 2173 | _LIBCPP_INLINE_VISIBILITY | |
| 2174 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, const_iterator> | |
| 2175 | find(const _K2& __k) const {return __table_.find(__k);} | |
| 2176 | #endif // _LIBCPP_STD_VER > 17 | |
| 2062 | 2177 | _LIBCPP_INLINE_VISIBILITY |
| 2063 | 2178 | size_type count(const key_type& __k) const {return __table_.__count_multi(__k);} |
| 2179 | #if _LIBCPP_STD_VER > 17 | |
| 2180 | template <typename _K2> | |
| 2181 | _LIBCPP_INLINE_VISIBILITY | |
| 2182 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, size_type> | |
| 2183 | count(const _K2& __k) const {return __table_.__count_multi(__k);} | |
| 2184 | #endif // _LIBCPP_STD_VER > 17 | |
| 2064 | 2185 | #if _LIBCPP_STD_VER > 17 |
| 2065 | 2186 | _LIBCPP_INLINE_VISIBILITY |
| 2066 | 2187 | bool contains(const key_type& __k) const {return find(__k) != end();} |
| 2188 | ||
| 2189 | template <typename _K2> | |
| 2190 | _LIBCPP_INLINE_VISIBILITY | |
| 2191 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, bool> | |
| 2192 | contains(const _K2& __k) const {return find(__k) != end();} | |
| 2067 | 2193 | #endif // _LIBCPP_STD_VER > 17 |
| 2068 | 2194 | _LIBCPP_INLINE_VISIBILITY |
| 2069 | 2195 | pair<iterator, iterator> equal_range(const key_type& __k) |
| ... | ... | @@ -2071,6 +2197,16 @@ public: |
| 2071 | 2197 | _LIBCPP_INLINE_VISIBILITY |
| 2072 | 2198 | pair<const_iterator, const_iterator> equal_range(const key_type& __k) const |
| 2073 | 2199 | {return __table_.__equal_range_multi(__k);} |
| 2200 | #if _LIBCPP_STD_VER > 17 | |
| 2201 | template <typename _K2> | |
| 2202 | _LIBCPP_INLINE_VISIBILITY | |
| 2203 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<iterator, iterator>> | |
| 2204 | equal_range(const _K2& __k) {return __table_.__equal_range_multi(__k);} | |
| 2205 | template <typename _K2> | |
| 2206 | _LIBCPP_INLINE_VISIBILITY | |
| 2207 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<const_iterator, const_iterator>> | |
| 2208 | equal_range(const _K2& __k) const {return __table_.__equal_range_multi(__k);} | |
| 2209 | #endif // _LIBCPP_STD_VER > 17 | |
| 2074 | 2210 | |
| 2075 | 2211 | _LIBCPP_INLINE_VISIBILITY |
| 2076 | 2212 | size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();} |
| ... | ... | @@ -2108,7 +2244,7 @@ public: |
| 2108 | 2244 | _LIBCPP_INLINE_VISIBILITY |
| 2109 | 2245 | void reserve(size_type __n) {__table_.reserve(__n);} |
| 2110 | 2246 | |
| 2111 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2247 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2112 | 2248 | |
| 2113 | 2249 | bool __dereferenceable(const const_iterator* __i) const |
| 2114 | 2250 | {return __table_.__dereferenceable(&__i->__i_);} |
| ... | ... | @@ -2119,7 +2255,7 @@ public: |
| 2119 | 2255 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const |
| 2120 | 2256 | {return __table_.__addable(&__i->__i_, __n);} |
| 2121 | 2257 | |
| 2122 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2258 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 2123 | 2259 | |
| 2124 | 2260 | |
| 2125 | 2261 | }; |
| ... | ... | @@ -2196,7 +2332,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2196 | 2332 | size_type __n, const hasher& __hf, const key_equal& __eql) |
| 2197 | 2333 | : __table_(__hf, __eql) |
| 2198 | 2334 | { |
| 2199 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2335 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2200 | 2336 | __get_db()->__insert_c(this); |
| 2201 | 2337 | #endif |
| 2202 | 2338 | __table_.rehash(__n); |
| ... | ... | @@ -2208,7 +2344,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2208 | 2344 | const allocator_type& __a) |
| 2209 | 2345 | : __table_(__hf, __eql, typename __table::allocator_type(__a)) |
| 2210 | 2346 | { |
| 2211 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2347 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2212 | 2348 | __get_db()->__insert_c(this); |
| 2213 | 2349 | #endif |
| 2214 | 2350 | __table_.rehash(__n); |
| ... | ... | @@ -2219,7 +2355,7 @@ template <class _InputIterator> |
| 2219 | 2355 | unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2220 | 2356 | _InputIterator __first, _InputIterator __last) |
| 2221 | 2357 | { |
| 2222 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2358 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2223 | 2359 | __get_db()->__insert_c(this); |
| 2224 | 2360 | #endif |
| 2225 | 2361 | insert(__first, __last); |
| ... | ... | @@ -2232,7 +2368,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2232 | 2368 | const hasher& __hf, const key_equal& __eql) |
| 2233 | 2369 | : __table_(__hf, __eql) |
| 2234 | 2370 | { |
| 2235 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2371 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2236 | 2372 | __get_db()->__insert_c(this); |
| 2237 | 2373 | #endif |
| 2238 | 2374 | __table_.rehash(__n); |
| ... | ... | @@ -2246,7 +2382,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2246 | 2382 | const hasher& __hf, const key_equal& __eql, const allocator_type& __a) |
| 2247 | 2383 | : __table_(__hf, __eql, typename __table::allocator_type(__a)) |
| 2248 | 2384 | { |
| 2249 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2385 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2250 | 2386 | __get_db()->__insert_c(this); |
| 2251 | 2387 | #endif |
| 2252 | 2388 | __table_.rehash(__n); |
| ... | ... | @@ -2259,7 +2395,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2259 | 2395 | const allocator_type& __a) |
| 2260 | 2396 | : __table_(typename __table::allocator_type(__a)) |
| 2261 | 2397 | { |
| 2262 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2398 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2263 | 2399 | __get_db()->__insert_c(this); |
| 2264 | 2400 | #endif |
| 2265 | 2401 | } |
| ... | ... | @@ -2269,7 +2405,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2269 | 2405 | const unordered_multimap& __u) |
| 2270 | 2406 | : __table_(__u.__table_) |
| 2271 | 2407 | { |
| 2272 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2408 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2273 | 2409 | __get_db()->__insert_c(this); |
| 2274 | 2410 | #endif |
| 2275 | 2411 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -2281,7 +2417,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2281 | 2417 | const unordered_multimap& __u, const allocator_type& __a) |
| 2282 | 2418 | : __table_(__u.__table_, typename __table::allocator_type(__a)) |
| 2283 | 2419 | { |
| 2284 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2420 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2285 | 2421 | __get_db()->__insert_c(this); |
| 2286 | 2422 | #endif |
| 2287 | 2423 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -2297,7 +2433,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2297 | 2433 | _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) |
| 2298 | 2434 | : __table_(_VSTD::move(__u.__table_)) |
| 2299 | 2435 | { |
| 2300 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2436 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2301 | 2437 | __get_db()->__insert_c(this); |
| 2302 | 2438 | __get_db()->swap(this, &__u); |
| 2303 | 2439 | #endif |
| ... | ... | @@ -2308,7 +2444,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2308 | 2444 | unordered_multimap&& __u, const allocator_type& __a) |
| 2309 | 2445 | : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a)) |
| 2310 | 2446 | { |
| 2311 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2447 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2312 | 2448 | __get_db()->__insert_c(this); |
| 2313 | 2449 | #endif |
| 2314 | 2450 | if (__a != __u.get_allocator()) |
| ... | ... | @@ -2320,7 +2456,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2320 | 2456 | __u.__table_.remove((__i++).__i_)->__value_.__move()); |
| 2321 | 2457 | } |
| 2322 | 2458 | } |
| 2323 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2459 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2324 | 2460 | else |
| 2325 | 2461 | __get_db()->swap(this, &__u); |
| 2326 | 2462 | #endif |
| ... | ... | @@ -2330,7 +2466,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> |
| 2330 | 2466 | unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2331 | 2467 | initializer_list<value_type> __il) |
| 2332 | 2468 | { |
| 2333 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2469 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2334 | 2470 | __get_db()->__insert_c(this); |
| 2335 | 2471 | #endif |
| 2336 | 2472 | insert(__il.begin(), __il.end()); |
| ... | ... | @@ -2342,7 +2478,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2342 | 2478 | const key_equal& __eql) |
| 2343 | 2479 | : __table_(__hf, __eql) |
| 2344 | 2480 | { |
| 2345 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2481 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2346 | 2482 | __get_db()->__insert_c(this); |
| 2347 | 2483 | #endif |
| 2348 | 2484 | __table_.rehash(__n); |
| ... | ... | @@ -2355,7 +2491,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( |
| 2355 | 2491 | const key_equal& __eql, const allocator_type& __a) |
| 2356 | 2492 | : __table_(__hf, __eql, typename __table::allocator_type(__a)) |
| 2357 | 2493 | { |
| 2358 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2494 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2359 | 2495 | __get_db()->__insert_c(this); |
| 2360 | 2496 | #endif |
| 2361 | 2497 | __table_.rehash(__n); |
lib/libcxx/include/unordered_set+123-37| ... | ... | @@ -145,10 +145,22 @@ public: |
| 145 | 145 | |
| 146 | 146 | iterator find(const key_type& k); |
| 147 | 147 | const_iterator find(const key_type& k) const; |
| 148 | template<typename K> | |
| 149 | iterator find(const K& x); // C++20 | |
| 150 | template<typename K> | |
| 151 | const_iterator find(const K& x) const; // C++20 | |
| 148 | 152 | size_type count(const key_type& k) const; |
| 153 | template<typename K> | |
| 154 | size_type count(const K& k) const; // C++20 | |
| 149 | 155 | bool contains(const key_type& k) const; // C++20 |
| 156 | template<typename K> | |
| 157 | bool contains(const K& k) const; // C++20 | |
| 150 | 158 | pair<iterator, iterator> equal_range(const key_type& k); |
| 151 | 159 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 160 | template<typename K> | |
| 161 | pair<iterator, iterator> equal_range(const K& k); // C++20 | |
| 162 | template<typename K> | |
| 163 | pair<const_iterator, const_iterator> equal_range(const K& k) const; // C++20 | |
| 152 | 164 | |
| 153 | 165 | size_type bucket_count() const noexcept; |
| 154 | 166 | size_type max_bucket_count() const noexcept; |
| ... | ... | @@ -310,10 +322,22 @@ public: |
| 310 | 322 | |
| 311 | 323 | iterator find(const key_type& k); |
| 312 | 324 | const_iterator find(const key_type& k) const; |
| 325 | template<typename K> | |
| 326 | iterator find(const K& x); // C++20 | |
| 327 | template<typename K> | |
| 328 | const_iterator find(const K& x) const; // C++20 | |
| 313 | 329 | size_type count(const key_type& k) const; |
| 330 | template<typename K> | |
| 331 | size_type count(const K& k) const; // C++20 | |
| 314 | 332 | bool contains(const key_type& k) const; // C++20 |
| 333 | template<typename K> | |
| 334 | bool contains(const K& k) const; // C++20 | |
| 315 | 335 | pair<iterator, iterator> equal_range(const key_type& k); |
| 316 | 336 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 337 | template<typename K> | |
| 338 | pair<iterator, iterator> equal_range(const K& k); // C++20 | |
| 339 | template<typename K> | |
| 340 | pair<const_iterator, const_iterator> equal_range(const K& k) const; // C++20 | |
| 317 | 341 | |
| 318 | 342 | size_type bucket_count() const noexcept; |
| 319 | 343 | size_type max_bucket_count() const noexcept; |
| ... | ... | @@ -425,7 +449,7 @@ public: |
| 425 | 449 | unordered_set() |
| 426 | 450 | _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) |
| 427 | 451 | { |
| 428 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 452 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 429 | 453 | __get_db()->__insert_c(this); |
| 430 | 454 | #endif |
| 431 | 455 | } |
| ... | ... | @@ -539,7 +563,7 @@ public: |
| 539 | 563 | {return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...);} |
| 540 | 564 | template <class... _Args> |
| 541 | 565 | _LIBCPP_INLINE_VISIBILITY |
| 542 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 566 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 543 | 567 | iterator emplace_hint(const_iterator __p, _Args&&... __args) |
| 544 | 568 | { |
| 545 | 569 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| ... | ... | @@ -556,7 +580,7 @@ public: |
| 556 | 580 | pair<iterator, bool> insert(value_type&& __x) |
| 557 | 581 | {return __table_.__insert_unique(_VSTD::move(__x));} |
| 558 | 582 | _LIBCPP_INLINE_VISIBILITY |
| 559 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 583 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 560 | 584 | iterator insert(const_iterator __p, value_type&& __x) |
| 561 | 585 | { |
| 562 | 586 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| ... | ... | @@ -577,7 +601,7 @@ public: |
| 577 | 601 | {return __table_.__insert_unique(__x);} |
| 578 | 602 | |
| 579 | 603 | _LIBCPP_INLINE_VISIBILITY |
| 580 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 604 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 581 | 605 | iterator insert(const_iterator __p, const value_type& __x) |
| 582 | 606 | { |
| 583 | 607 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, |
| ... | ... | @@ -679,11 +703,32 @@ public: |
| 679 | 703 | iterator find(const key_type& __k) {return __table_.find(__k);} |
| 680 | 704 | _LIBCPP_INLINE_VISIBILITY |
| 681 | 705 | const_iterator find(const key_type& __k) const {return __table_.find(__k);} |
| 706 | #if _LIBCPP_STD_VER > 17 | |
| 707 | template <typename _K2> | |
| 708 | _LIBCPP_INLINE_VISIBILITY | |
| 709 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, iterator> | |
| 710 | find(const _K2& __k) {return __table_.find(__k);} | |
| 711 | template <typename _K2> | |
| 712 | _LIBCPP_INLINE_VISIBILITY | |
| 713 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, const_iterator> | |
| 714 | find(const _K2& __k) const {return __table_.find(__k);} | |
| 715 | #endif // _LIBCPP_STD_VER > 17 | |
| 682 | 716 | _LIBCPP_INLINE_VISIBILITY |
| 683 | 717 | size_type count(const key_type& __k) const {return __table_.__count_unique(__k);} |
| 718 | #if _LIBCPP_STD_VER > 17 | |
| 719 | template <typename _K2> | |
| 720 | _LIBCPP_INLINE_VISIBILITY | |
| 721 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, size_type> | |
| 722 | count(const _K2& __k) const {return __table_.__count_unique(__k);} | |
| 723 | #endif // _LIBCPP_STD_VER > 17 | |
| 684 | 724 | #if _LIBCPP_STD_VER > 17 |
| 685 | 725 | _LIBCPP_INLINE_VISIBILITY |
| 686 | 726 | bool contains(const key_type& __k) const {return find(__k) != end();} |
| 727 | ||
| 728 | template <typename _K2> | |
| 729 | _LIBCPP_INLINE_VISIBILITY | |
| 730 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, bool> | |
| 731 | contains(const _K2& __k) const {return find(__k) != end();} | |
| 687 | 732 | #endif // _LIBCPP_STD_VER > 17 |
| 688 | 733 | _LIBCPP_INLINE_VISIBILITY |
| 689 | 734 | pair<iterator, iterator> equal_range(const key_type& __k) |
| ... | ... | @@ -691,6 +736,16 @@ public: |
| 691 | 736 | _LIBCPP_INLINE_VISIBILITY |
| 692 | 737 | pair<const_iterator, const_iterator> equal_range(const key_type& __k) const |
| 693 | 738 | {return __table_.__equal_range_unique(__k);} |
| 739 | #if _LIBCPP_STD_VER > 17 | |
| 740 | template <typename _K2> | |
| 741 | _LIBCPP_INLINE_VISIBILITY | |
| 742 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<iterator, iterator>> | |
| 743 | equal_range(const _K2& __k) {return __table_.__equal_range_unique(__k);} | |
| 744 | template <typename _K2> | |
| 745 | _LIBCPP_INLINE_VISIBILITY | |
| 746 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<const_iterator, const_iterator>> | |
| 747 | equal_range(const _K2& __k) const {return __table_.__equal_range_unique(__k);} | |
| 748 | #endif // _LIBCPP_STD_VER > 17 | |
| 694 | 749 | |
| 695 | 750 | _LIBCPP_INLINE_VISIBILITY |
| 696 | 751 | size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();} |
| ... | ... | @@ -726,7 +781,7 @@ public: |
| 726 | 781 | _LIBCPP_INLINE_VISIBILITY |
| 727 | 782 | void reserve(size_type __n) {__table_.reserve(__n);} |
| 728 | 783 | |
| 729 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 784 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 730 | 785 | |
| 731 | 786 | bool __dereferenceable(const const_iterator* __i) const |
| 732 | 787 | {return __table_.__dereferenceable(__i);} |
| ... | ... | @@ -737,7 +792,7 @@ public: |
| 737 | 792 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const |
| 738 | 793 | {return __table_.__addable(__i, __n);} |
| 739 | 794 | |
| 740 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 795 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 741 | 796 | |
| 742 | 797 | }; |
| 743 | 798 | |
| ... | ... | @@ -802,7 +857,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(size_type __n, |
| 802 | 857 | const hasher& __hf, const key_equal& __eql) |
| 803 | 858 | : __table_(__hf, __eql) |
| 804 | 859 | { |
| 805 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 860 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 806 | 861 | __get_db()->__insert_c(this); |
| 807 | 862 | #endif |
| 808 | 863 | __table_.rehash(__n); |
| ... | ... | @@ -813,7 +868,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(size_type __n, |
| 813 | 868 | const hasher& __hf, const key_equal& __eql, const allocator_type& __a) |
| 814 | 869 | : __table_(__hf, __eql, __a) |
| 815 | 870 | { |
| 816 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 871 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 817 | 872 | __get_db()->__insert_c(this); |
| 818 | 873 | #endif |
| 819 | 874 | __table_.rehash(__n); |
| ... | ... | @@ -824,7 +879,7 @@ template <class _InputIterator> |
| 824 | 879 | unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 825 | 880 | _InputIterator __first, _InputIterator __last) |
| 826 | 881 | { |
| 827 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 882 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 828 | 883 | __get_db()->__insert_c(this); |
| 829 | 884 | #endif |
| 830 | 885 | insert(__first, __last); |
| ... | ... | @@ -837,7 +892,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 837 | 892 | const hasher& __hf, const key_equal& __eql) |
| 838 | 893 | : __table_(__hf, __eql) |
| 839 | 894 | { |
| 840 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 895 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 841 | 896 | __get_db()->__insert_c(this); |
| 842 | 897 | #endif |
| 843 | 898 | __table_.rehash(__n); |
| ... | ... | @@ -851,7 +906,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 851 | 906 | const hasher& __hf, const key_equal& __eql, const allocator_type& __a) |
| 852 | 907 | : __table_(__hf, __eql, __a) |
| 853 | 908 | { |
| 854 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 909 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 855 | 910 | __get_db()->__insert_c(this); |
| 856 | 911 | #endif |
| 857 | 912 | __table_.rehash(__n); |
| ... | ... | @@ -864,7 +919,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 864 | 919 | const allocator_type& __a) |
| 865 | 920 | : __table_(__a) |
| 866 | 921 | { |
| 867 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 922 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 868 | 923 | __get_db()->__insert_c(this); |
| 869 | 924 | #endif |
| 870 | 925 | } |
| ... | ... | @@ -874,7 +929,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 874 | 929 | const unordered_set& __u) |
| 875 | 930 | : __table_(__u.__table_) |
| 876 | 931 | { |
| 877 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 932 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 878 | 933 | __get_db()->__insert_c(this); |
| 879 | 934 | #endif |
| 880 | 935 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -886,7 +941,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 886 | 941 | const unordered_set& __u, const allocator_type& __a) |
| 887 | 942 | : __table_(__u.__table_, __a) |
| 888 | 943 | { |
| 889 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 944 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 890 | 945 | __get_db()->__insert_c(this); |
| 891 | 946 | #endif |
| 892 | 947 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -902,7 +957,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 902 | 957 | _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) |
| 903 | 958 | : __table_(_VSTD::move(__u.__table_)) |
| 904 | 959 | { |
| 905 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 960 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 906 | 961 | __get_db()->__insert_c(this); |
| 907 | 962 | __get_db()->swap(this, &__u); |
| 908 | 963 | #endif |
| ... | ... | @@ -913,7 +968,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 913 | 968 | unordered_set&& __u, const allocator_type& __a) |
| 914 | 969 | : __table_(_VSTD::move(__u.__table_), __a) |
| 915 | 970 | { |
| 916 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 971 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 917 | 972 | __get_db()->__insert_c(this); |
| 918 | 973 | #endif |
| 919 | 974 | if (__a != __u.get_allocator()) |
| ... | ... | @@ -922,7 +977,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 922 | 977 | while (__u.size() != 0) |
| 923 | 978 | __table_.__insert_unique(_VSTD::move(__u.__table_.remove(__i++)->__value_)); |
| 924 | 979 | } |
| 925 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 980 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 926 | 981 | else |
| 927 | 982 | __get_db()->swap(this, &__u); |
| 928 | 983 | #endif |
| ... | ... | @@ -932,7 +987,7 @@ template <class _Value, class _Hash, class _Pred, class _Alloc> |
| 932 | 987 | unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 933 | 988 | initializer_list<value_type> __il) |
| 934 | 989 | { |
| 935 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 990 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 936 | 991 | __get_db()->__insert_c(this); |
| 937 | 992 | #endif |
| 938 | 993 | insert(__il.begin(), __il.end()); |
| ... | ... | @@ -944,7 +999,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 944 | 999 | const key_equal& __eql) |
| 945 | 1000 | : __table_(__hf, __eql) |
| 946 | 1001 | { |
| 947 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1002 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 948 | 1003 | __get_db()->__insert_c(this); |
| 949 | 1004 | #endif |
| 950 | 1005 | __table_.rehash(__n); |
| ... | ... | @@ -957,7 +1012,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( |
| 957 | 1012 | const key_equal& __eql, const allocator_type& __a) |
| 958 | 1013 | : __table_(__hf, __eql, __a) |
| 959 | 1014 | { |
| 960 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1015 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 961 | 1016 | __get_db()->__insert_c(this); |
| 962 | 1017 | #endif |
| 963 | 1018 | __table_.rehash(__n); |
| ... | ... | @@ -1091,7 +1146,7 @@ public: |
| 1091 | 1146 | unordered_multiset() |
| 1092 | 1147 | _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) |
| 1093 | 1148 | { |
| 1094 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1149 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1095 | 1150 | __get_db()->__insert_c(this); |
| 1096 | 1151 | #endif |
| 1097 | 1152 | } |
| ... | ... | @@ -1314,11 +1369,32 @@ public: |
| 1314 | 1369 | iterator find(const key_type& __k) {return __table_.find(__k);} |
| 1315 | 1370 | _LIBCPP_INLINE_VISIBILITY |
| 1316 | 1371 | const_iterator find(const key_type& __k) const {return __table_.find(__k);} |
| 1372 | #if _LIBCPP_STD_VER > 17 | |
| 1373 | template <typename _K2> | |
| 1374 | _LIBCPP_INLINE_VISIBILITY | |
| 1375 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, iterator> | |
| 1376 | find(const _K2& __k) {return __table_.find(__k);} | |
| 1377 | template <typename _K2> | |
| 1378 | _LIBCPP_INLINE_VISIBILITY | |
| 1379 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, const_iterator> | |
| 1380 | find(const _K2& __k) const {return __table_.find(__k);} | |
| 1381 | #endif // _LIBCPP_STD_VER > 17 | |
| 1317 | 1382 | _LIBCPP_INLINE_VISIBILITY |
| 1318 | 1383 | size_type count(const key_type& __k) const {return __table_.__count_multi(__k);} |
| 1384 | #if _LIBCPP_STD_VER > 17 | |
| 1385 | template <typename _K2> | |
| 1386 | _LIBCPP_INLINE_VISIBILITY | |
| 1387 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, size_type> | |
| 1388 | count(const _K2& __k) const {return __table_.__count_multi(__k);} | |
| 1389 | #endif // _LIBCPP_STD_VER > 17 | |
| 1319 | 1390 | #if _LIBCPP_STD_VER > 17 |
| 1320 | 1391 | _LIBCPP_INLINE_VISIBILITY |
| 1321 | 1392 | bool contains(const key_type& __k) const {return find(__k) != end();} |
| 1393 | ||
| 1394 | template <typename _K2> | |
| 1395 | _LIBCPP_INLINE_VISIBILITY | |
| 1396 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, bool> | |
| 1397 | contains(const _K2& __k) const {return find(__k) != end();} | |
| 1322 | 1398 | #endif // _LIBCPP_STD_VER > 17 |
| 1323 | 1399 | _LIBCPP_INLINE_VISIBILITY |
| 1324 | 1400 | pair<iterator, iterator> equal_range(const key_type& __k) |
| ... | ... | @@ -1326,6 +1402,16 @@ public: |
| 1326 | 1402 | _LIBCPP_INLINE_VISIBILITY |
| 1327 | 1403 | pair<const_iterator, const_iterator> equal_range(const key_type& __k) const |
| 1328 | 1404 | {return __table_.__equal_range_multi(__k);} |
| 1405 | #if _LIBCPP_STD_VER > 17 | |
| 1406 | template <typename _K2> | |
| 1407 | _LIBCPP_INLINE_VISIBILITY | |
| 1408 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<iterator, iterator>> | |
| 1409 | equal_range(const _K2& __k) {return __table_.__equal_range_multi(__k);} | |
| 1410 | template <typename _K2> | |
| 1411 | _LIBCPP_INLINE_VISIBILITY | |
| 1412 | _EnableIf<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value, pair<const_iterator, const_iterator>> | |
| 1413 | equal_range(const _K2& __k) const {return __table_.__equal_range_multi(__k);} | |
| 1414 | #endif // _LIBCPP_STD_VER > 17 | |
| 1329 | 1415 | |
| 1330 | 1416 | _LIBCPP_INLINE_VISIBILITY |
| 1331 | 1417 | size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();} |
| ... | ... | @@ -1361,7 +1447,7 @@ public: |
| 1361 | 1447 | _LIBCPP_INLINE_VISIBILITY |
| 1362 | 1448 | void reserve(size_type __n) {__table_.reserve(__n);} |
| 1363 | 1449 | |
| 1364 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1450 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1365 | 1451 | |
| 1366 | 1452 | bool __dereferenceable(const const_iterator* __i) const |
| 1367 | 1453 | {return __table_.__dereferenceable(__i);} |
| ... | ... | @@ -1372,7 +1458,7 @@ public: |
| 1372 | 1458 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const |
| 1373 | 1459 | {return __table_.__addable(__i, __n);} |
| 1374 | 1460 | |
| 1375 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1461 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 1376 | 1462 | |
| 1377 | 1463 | }; |
| 1378 | 1464 | |
| ... | ... | @@ -1435,7 +1521,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1435 | 1521 | size_type __n, const hasher& __hf, const key_equal& __eql) |
| 1436 | 1522 | : __table_(__hf, __eql) |
| 1437 | 1523 | { |
| 1438 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1524 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1439 | 1525 | __get_db()->__insert_c(this); |
| 1440 | 1526 | #endif |
| 1441 | 1527 | __table_.rehash(__n); |
| ... | ... | @@ -1447,7 +1533,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1447 | 1533 | const allocator_type& __a) |
| 1448 | 1534 | : __table_(__hf, __eql, __a) |
| 1449 | 1535 | { |
| 1450 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1536 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1451 | 1537 | __get_db()->__insert_c(this); |
| 1452 | 1538 | #endif |
| 1453 | 1539 | __table_.rehash(__n); |
| ... | ... | @@ -1458,7 +1544,7 @@ template <class _InputIterator> |
| 1458 | 1544 | unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1459 | 1545 | _InputIterator __first, _InputIterator __last) |
| 1460 | 1546 | { |
| 1461 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1547 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1462 | 1548 | __get_db()->__insert_c(this); |
| 1463 | 1549 | #endif |
| 1464 | 1550 | insert(__first, __last); |
| ... | ... | @@ -1471,7 +1557,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1471 | 1557 | const hasher& __hf, const key_equal& __eql) |
| 1472 | 1558 | : __table_(__hf, __eql) |
| 1473 | 1559 | { |
| 1474 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1560 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1475 | 1561 | __get_db()->__insert_c(this); |
| 1476 | 1562 | #endif |
| 1477 | 1563 | __table_.rehash(__n); |
| ... | ... | @@ -1485,7 +1571,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1485 | 1571 | const hasher& __hf, const key_equal& __eql, const allocator_type& __a) |
| 1486 | 1572 | : __table_(__hf, __eql, __a) |
| 1487 | 1573 | { |
| 1488 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1574 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1489 | 1575 | __get_db()->__insert_c(this); |
| 1490 | 1576 | #endif |
| 1491 | 1577 | __table_.rehash(__n); |
| ... | ... | @@ -1498,7 +1584,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1498 | 1584 | const allocator_type& __a) |
| 1499 | 1585 | : __table_(__a) |
| 1500 | 1586 | { |
| 1501 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1587 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1502 | 1588 | __get_db()->__insert_c(this); |
| 1503 | 1589 | #endif |
| 1504 | 1590 | } |
| ... | ... | @@ -1508,7 +1594,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1508 | 1594 | const unordered_multiset& __u) |
| 1509 | 1595 | : __table_(__u.__table_) |
| 1510 | 1596 | { |
| 1511 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1597 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1512 | 1598 | __get_db()->__insert_c(this); |
| 1513 | 1599 | #endif |
| 1514 | 1600 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -1520,7 +1606,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1520 | 1606 | const unordered_multiset& __u, const allocator_type& __a) |
| 1521 | 1607 | : __table_(__u.__table_, __a) |
| 1522 | 1608 | { |
| 1523 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1609 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1524 | 1610 | __get_db()->__insert_c(this); |
| 1525 | 1611 | #endif |
| 1526 | 1612 | __table_.rehash(__u.bucket_count()); |
| ... | ... | @@ -1536,7 +1622,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1536 | 1622 | _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) |
| 1537 | 1623 | : __table_(_VSTD::move(__u.__table_)) |
| 1538 | 1624 | { |
| 1539 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1625 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1540 | 1626 | __get_db()->__insert_c(this); |
| 1541 | 1627 | __get_db()->swap(this, &__u); |
| 1542 | 1628 | #endif |
| ... | ... | @@ -1547,7 +1633,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1547 | 1633 | unordered_multiset&& __u, const allocator_type& __a) |
| 1548 | 1634 | : __table_(_VSTD::move(__u.__table_), __a) |
| 1549 | 1635 | { |
| 1550 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1636 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1551 | 1637 | __get_db()->__insert_c(this); |
| 1552 | 1638 | #endif |
| 1553 | 1639 | if (__a != __u.get_allocator()) |
| ... | ... | @@ -1556,7 +1642,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1556 | 1642 | while (__u.size() != 0) |
| 1557 | 1643 | __table_.__insert_multi(_VSTD::move(__u.__table_.remove(__i++)->__value_)); |
| 1558 | 1644 | } |
| 1559 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1645 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1560 | 1646 | else |
| 1561 | 1647 | __get_db()->swap(this, &__u); |
| 1562 | 1648 | #endif |
| ... | ... | @@ -1566,7 +1652,7 @@ template <class _Value, class _Hash, class _Pred, class _Alloc> |
| 1566 | 1652 | unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1567 | 1653 | initializer_list<value_type> __il) |
| 1568 | 1654 | { |
| 1569 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1655 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1570 | 1656 | __get_db()->__insert_c(this); |
| 1571 | 1657 | #endif |
| 1572 | 1658 | insert(__il.begin(), __il.end()); |
| ... | ... | @@ -1578,7 +1664,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1578 | 1664 | const key_equal& __eql) |
| 1579 | 1665 | : __table_(__hf, __eql) |
| 1580 | 1666 | { |
| 1581 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1667 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1582 | 1668 | __get_db()->__insert_c(this); |
| 1583 | 1669 | #endif |
| 1584 | 1670 | __table_.rehash(__n); |
| ... | ... | @@ -1591,7 +1677,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( |
| 1591 | 1677 | const key_equal& __eql, const allocator_type& __a) |
| 1592 | 1678 | : __table_(__hf, __eql, __a) |
| 1593 | 1679 | { |
| 1594 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1680 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1595 | 1681 | __get_db()->__insert_c(this); |
| 1596 | 1682 | #endif |
| 1597 | 1683 | __table_.rehash(__n); |
lib/libcxx/include/utility+24-14| ... | ... | @@ -499,7 +499,7 @@ struct _LIBCPP_TEMPLATE_VIS pair |
| 499 | 499 | second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {} |
| 500 | 500 | |
| 501 | 501 | template <class... _Args1, class... _Args2> |
| 502 | _LIBCPP_INLINE_VISIBILITY | |
| 502 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 503 | 503 | pair(piecewise_construct_t __pc, |
| 504 | 504 | tuple<_Args1...> __first_args, tuple<_Args2...> __second_args) |
| 505 | 505 | _NOEXCEPT_((is_nothrow_constructible<first_type, _Args1...>::value && |
| ... | ... | @@ -508,7 +508,7 @@ struct _LIBCPP_TEMPLATE_VIS pair |
| 508 | 508 | typename __make_tuple_indices<sizeof...(_Args1)>::type(), |
| 509 | 509 | typename __make_tuple_indices<sizeof...(_Args2) >::type()) {} |
| 510 | 510 | |
| 511 | _LIBCPP_INLINE_VISIBILITY | |
| 511 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 512 | 512 | pair& operator=(typename conditional< |
| 513 | 513 | is_copy_assignable<first_type>::value && |
| 514 | 514 | is_copy_assignable<second_type>::value, |
| ... | ... | @@ -521,7 +521,7 @@ struct _LIBCPP_TEMPLATE_VIS pair |
| 521 | 521 | return *this; |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | _LIBCPP_INLINE_VISIBILITY | |
| 524 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 525 | 525 | pair& operator=(typename conditional< |
| 526 | 526 | is_move_assignable<first_type>::value && |
| 527 | 527 | is_move_assignable<second_type>::value, |
| ... | ... | @@ -537,7 +537,7 @@ struct _LIBCPP_TEMPLATE_VIS pair |
| 537 | 537 | template <class _Tuple, _EnableB< |
| 538 | 538 | _CheckTLC<_Tuple>::template __enable_assign<_Tuple>() |
| 539 | 539 | > = false> |
| 540 | _LIBCPP_INLINE_VISIBILITY | |
| 540 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 541 | 541 | pair& operator=(_Tuple&& __p) { |
| 542 | 542 | first = _VSTD::get<0>(_VSTD::forward<_Tuple>(__p)); |
| 543 | 543 | second = _VSTD::get<1>(_VSTD::forward<_Tuple>(__p)); |
| ... | ... | @@ -545,7 +545,7 @@ struct _LIBCPP_TEMPLATE_VIS pair |
| 545 | 545 | } |
| 546 | 546 | #endif |
| 547 | 547 | |
| 548 | _LIBCPP_INLINE_VISIBILITY | |
| 548 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 549 | 549 | void |
| 550 | 550 | swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable<first_type>::value && |
| 551 | 551 | __is_nothrow_swappable<second_type>::value) |
| ... | ... | @@ -558,10 +558,10 @@ private: |
| 558 | 558 | |
| 559 | 559 | #ifndef _LIBCPP_CXX03_LANG |
| 560 | 560 | template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2> |
| 561 | _LIBCPP_INLINE_VISIBILITY | |
| 562 | pair(piecewise_construct_t, | |
| 563 | tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args, | |
| 564 | __tuple_indices<_I1...>, __tuple_indices<_I2...>); | |
| 561 | _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 562 | pair(piecewise_construct_t, | |
| 563 | tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args, | |
| 564 | __tuple_indices<_I1...>, __tuple_indices<_I2...>); | |
| 565 | 565 | #endif |
| 566 | 566 | }; |
| 567 | 567 | |
| ... | ... | @@ -619,7 +619,7 @@ operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y) |
| 619 | 619 | } |
| 620 | 620 | |
| 621 | 621 | template <class _T1, class _T2> |
| 622 | inline _LIBCPP_INLINE_VISIBILITY | |
| 622 | inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 | |
| 623 | 623 | typename enable_if |
| 624 | 624 | < |
| 625 | 625 | __is_swappable<_T1>::value && |
| ... | ... | @@ -970,7 +970,7 @@ _Size |
| 970 | 970 | __loadword(const void* __p) |
| 971 | 971 | { |
| 972 | 972 | _Size __r; |
| 973 | std::memcpy(&__r, __p, sizeof(__r)); | |
| 973 | _VSTD::memcpy(&__r, __p, sizeof(__r)); | |
| 974 | 974 | return __r; |
| 975 | 975 | } |
| 976 | 976 | |
| ... | ... | @@ -1189,7 +1189,7 @@ __murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len) |
| 1189 | 1189 | __v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first); |
| 1190 | 1190 | __w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second, |
| 1191 | 1191 | __y + __loadword<_Size>(__s + 16)); |
| 1192 | std::swap(__z, __x); | |
| 1192 | _VSTD::swap(__z, __x); | |
| 1193 | 1193 | __s += 64; |
| 1194 | 1194 | __len -= 64; |
| 1195 | 1195 | } while (__len != 0); |
| ... | ... | @@ -1364,6 +1364,16 @@ struct _LIBCPP_TEMPLATE_VIS hash<unsigned char> |
| 1364 | 1364 | size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast<size_t>(__v);} |
| 1365 | 1365 | }; |
| 1366 | 1366 | |
| 1367 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 1368 | template <> | |
| 1369 | struct _LIBCPP_TEMPLATE_VIS hash<char8_t> | |
| 1370 | : public unary_function<char8_t, size_t> | |
| 1371 | { | |
| 1372 | _LIBCPP_INLINE_VISIBILITY | |
| 1373 | size_t operator()(char8_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);} | |
| 1374 | }; | |
| 1375 | #endif // !_LIBCPP_NO_HAS_CHAR8_T | |
| 1376 | ||
| 1367 | 1377 | #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS |
| 1368 | 1378 | |
| 1369 | 1379 | template <> |
| ... | ... | @@ -1506,7 +1516,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<long double> |
| 1506 | 1516 | // -0.0 and 0.0 should return same hash |
| 1507 | 1517 | if (__v == 0.0L) |
| 1508 | 1518 | return 0; |
| 1509 | #if defined(__i386__) | |
| 1519 | #if defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__)) | |
| 1510 | 1520 | // Zero out padding bits |
| 1511 | 1521 | union |
| 1512 | 1522 | { |
| ... | ... | @@ -1593,7 +1603,7 @@ using __check_hash_requirements _LIBCPP_NODEBUG_TYPE = integral_constant<bool, |
| 1593 | 1603 | __invokable_r<size_t, _Hash, _Key const&>::value |
| 1594 | 1604 | >; |
| 1595 | 1605 | |
| 1596 | template <class _Key, class _Hash = std::hash<_Key> > | |
| 1606 | template <class _Key, class _Hash = hash<_Key> > | |
| 1597 | 1607 | using __has_enabled_hash _LIBCPP_NODEBUG_TYPE = integral_constant<bool, |
| 1598 | 1608 | __check_hash_requirements<_Key, _Hash>::value && |
| 1599 | 1609 | is_default_constructible<_Hash>::value |
lib/libcxx/include/valarray+73-95| ... | ... | @@ -136,6 +136,7 @@ public: |
| 136 | 136 | void operator>>=(const valarray<value_type>& v) const; |
| 137 | 137 | |
| 138 | 138 | void operator=(const value_type& x) const; |
| 139 | void operator=(const valarray<T>& val_arr) const; | |
| 139 | 140 | |
| 140 | 141 | slice_array() = delete; |
| 141 | 142 | }; |
| ... | ... | @@ -802,7 +803,7 @@ private: |
| 802 | 803 | public: |
| 803 | 804 | // construct/destroy: |
| 804 | 805 | _LIBCPP_INLINE_VISIBILITY |
| 805 | valarray() : __begin_(0), __end_(0) {} | |
| 806 | valarray() : __begin_(nullptr), __end_(nullptr) {} | |
| 806 | 807 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 |
| 807 | 808 | explicit valarray(size_t __n); |
| 808 | 809 | _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -1264,6 +1265,9 @@ public: |
| 1264 | 1265 | _LIBCPP_INLINE_VISIBILITY |
| 1265 | 1266 | void operator=(const value_type& __x) const; |
| 1266 | 1267 | |
| 1268 | _LIBCPP_INLINE_VISIBILITY | |
| 1269 | void operator=(const valarray<value_type>& __va) const; | |
| 1270 | ||
| 1267 | 1271 | private: |
| 1268 | 1272 | _LIBCPP_INLINE_VISIBILITY |
| 1269 | 1273 | slice_array(const slice& __sl, const valarray<value_type>& __v) |
| ... | ... | @@ -1303,6 +1307,15 @@ slice_array<_Tp>::operator=(const _Expr& __v) const |
| 1303 | 1307 | *__t = __v[__i]; |
| 1304 | 1308 | } |
| 1305 | 1309 | |
| 1310 | template <class _Tp> | |
| 1311 | inline void | |
| 1312 | slice_array<_Tp>::operator=(const valarray<value_type>& __va) const | |
| 1313 | { | |
| 1314 | value_type* __t = __vp_; | |
| 1315 | for (size_t __i = 0; __i < __va.size(); ++__i, __t += __stride_) | |
| 1316 | *__t = __va[__i]; | |
| 1317 | } | |
| 1318 | ||
| 1306 | 1319 | template <class _Tp> |
| 1307 | 1320 | template <class _Expr> |
| 1308 | 1321 | inline |
| ... | ... | @@ -2738,11 +2751,9 @@ __val_expr<_ValExpr>::operator valarray<__val_expr::result_type>() const |
| 2738 | 2751 | if (__n) |
| 2739 | 2752 | { |
| 2740 | 2753 | __r.__begin_ = |
| 2741 | __r.__end_ = | |
| 2742 | static_cast<result_type*>( | |
| 2743 | _VSTD::__libcpp_allocate(__n * sizeof(result_type), _LIBCPP_ALIGNOF(result_type))); | |
| 2754 | __r.__end_ = allocator<result_type>().allocate(__n); | |
| 2744 | 2755 | for (size_t __i = 0; __i != __n; ++__r.__end_, ++__i) |
| 2745 | ::new (__r.__end_) result_type(__expr_[__i]); | |
| 2756 | ::new ((void*)__r.__end_) result_type(__expr_[__i]); | |
| 2746 | 2757 | } |
| 2747 | 2758 | return __r; |
| 2748 | 2759 | } |
| ... | ... | @@ -2752,19 +2763,18 @@ __val_expr<_ValExpr>::operator valarray<__val_expr::result_type>() const |
| 2752 | 2763 | template <class _Tp> |
| 2753 | 2764 | inline |
| 2754 | 2765 | valarray<_Tp>::valarray(size_t __n) |
| 2755 | : __begin_(0), | |
| 2756 | __end_(0) | |
| 2766 | : __begin_(nullptr), | |
| 2767 | __end_(nullptr) | |
| 2757 | 2768 | { |
| 2758 | 2769 | if (__n) |
| 2759 | 2770 | { |
| 2760 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2761 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2771 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2762 | 2772 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2763 | 2773 | try |
| 2764 | 2774 | { |
| 2765 | 2775 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 2766 | 2776 | for (size_t __n_left = __n; __n_left; --__n_left, ++__end_) |
| 2767 | ::new (__end_) value_type(); | |
| 2777 | ::new ((void*)__end_) value_type(); | |
| 2768 | 2778 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2769 | 2779 | } |
| 2770 | 2780 | catch (...) |
| ... | ... | @@ -2779,27 +2789,26 @@ valarray<_Tp>::valarray(size_t __n) |
| 2779 | 2789 | template <class _Tp> |
| 2780 | 2790 | inline |
| 2781 | 2791 | valarray<_Tp>::valarray(const value_type& __x, size_t __n) |
| 2782 | : __begin_(0), | |
| 2783 | __end_(0) | |
| 2792 | : __begin_(nullptr), | |
| 2793 | __end_(nullptr) | |
| 2784 | 2794 | { |
| 2785 | 2795 | resize(__n, __x); |
| 2786 | 2796 | } |
| 2787 | 2797 | |
| 2788 | 2798 | template <class _Tp> |
| 2789 | 2799 | valarray<_Tp>::valarray(const value_type* __p, size_t __n) |
| 2790 | : __begin_(0), | |
| 2791 | __end_(0) | |
| 2800 | : __begin_(nullptr), | |
| 2801 | __end_(nullptr) | |
| 2792 | 2802 | { |
| 2793 | 2803 | if (__n) |
| 2794 | 2804 | { |
| 2795 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2796 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2805 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2797 | 2806 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2798 | 2807 | try |
| 2799 | 2808 | { |
| 2800 | 2809 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 2801 | 2810 | for (size_t __n_left = __n; __n_left; ++__end_, ++__p, --__n_left) |
| 2802 | ::new (__end_) value_type(*__p); | |
| 2811 | ::new ((void*)__end_) value_type(*__p); | |
| 2803 | 2812 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2804 | 2813 | } |
| 2805 | 2814 | catch (...) |
| ... | ... | @@ -2813,19 +2822,18 @@ valarray<_Tp>::valarray(const value_type* __p, size_t __n) |
| 2813 | 2822 | |
| 2814 | 2823 | template <class _Tp> |
| 2815 | 2824 | valarray<_Tp>::valarray(const valarray& __v) |
| 2816 | : __begin_(0), | |
| 2817 | __end_(0) | |
| 2825 | : __begin_(nullptr), | |
| 2826 | __end_(nullptr) | |
| 2818 | 2827 | { |
| 2819 | 2828 | if (__v.size()) |
| 2820 | 2829 | { |
| 2821 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2822 | _VSTD::__libcpp_allocate(__v.size() * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2830 | __begin_ = __end_ = allocator<value_type>().allocate(__v.size()); | |
| 2823 | 2831 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2824 | 2832 | try |
| 2825 | 2833 | { |
| 2826 | 2834 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 2827 | 2835 | for (value_type* __p = __v.__begin_; __p != __v.__end_; ++__end_, ++__p) |
| 2828 | ::new (__end_) value_type(*__p); | |
| 2836 | ::new ((void*)__end_) value_type(*__p); | |
| 2829 | 2837 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2830 | 2838 | } |
| 2831 | 2839 | catch (...) |
| ... | ... | @@ -2850,21 +2858,20 @@ valarray<_Tp>::valarray(valarray&& __v) _NOEXCEPT |
| 2850 | 2858 | |
| 2851 | 2859 | template <class _Tp> |
| 2852 | 2860 | valarray<_Tp>::valarray(initializer_list<value_type> __il) |
| 2853 | : __begin_(0), | |
| 2854 | __end_(0) | |
| 2861 | : __begin_(nullptr), | |
| 2862 | __end_(nullptr) | |
| 2855 | 2863 | { |
| 2856 | 2864 | const size_t __n = __il.size(); |
| 2857 | 2865 | if (__n) |
| 2858 | 2866 | { |
| 2859 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2860 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2867 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2861 | 2868 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2862 | 2869 | try |
| 2863 | 2870 | { |
| 2864 | 2871 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 2865 | 2872 | size_t __n_left = __n; |
| 2866 | 2873 | for (const value_type* __p = __il.begin(); __n_left; ++__end_, ++__p, --__n_left) |
| 2867 | ::new (__end_) value_type(*__p); | |
| 2874 | ::new ((void*)__end_) value_type(*__p); | |
| 2868 | 2875 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2869 | 2876 | } |
| 2870 | 2877 | catch (...) |
| ... | ... | @@ -2880,21 +2887,20 @@ _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))) |
| 2880 | 2887 | |
| 2881 | 2888 | template <class _Tp> |
| 2882 | 2889 | valarray<_Tp>::valarray(const slice_array<value_type>& __sa) |
| 2883 | : __begin_(0), | |
| 2884 | __end_(0) | |
| 2890 | : __begin_(nullptr), | |
| 2891 | __end_(nullptr) | |
| 2885 | 2892 | { |
| 2886 | 2893 | const size_t __n = __sa.__size_; |
| 2887 | 2894 | if (__n) |
| 2888 | 2895 | { |
| 2889 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2890 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2896 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2891 | 2897 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2892 | 2898 | try |
| 2893 | 2899 | { |
| 2894 | 2900 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 2895 | 2901 | size_t __n_left = __n; |
| 2896 | 2902 | for (const value_type* __p = __sa.__vp_; __n_left; ++__end_, __p += __sa.__stride_, --__n_left) |
| 2897 | ::new (__end_) value_type(*__p); | |
| 2903 | ::new ((void*)__end_) value_type(*__p); | |
| 2898 | 2904 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2899 | 2905 | } |
| 2900 | 2906 | catch (...) |
| ... | ... | @@ -2908,14 +2914,13 @@ valarray<_Tp>::valarray(const slice_array<value_type>& __sa) |
| 2908 | 2914 | |
| 2909 | 2915 | template <class _Tp> |
| 2910 | 2916 | valarray<_Tp>::valarray(const gslice_array<value_type>& __ga) |
| 2911 | : __begin_(0), | |
| 2912 | __end_(0) | |
| 2917 | : __begin_(nullptr), | |
| 2918 | __end_(nullptr) | |
| 2913 | 2919 | { |
| 2914 | 2920 | const size_t __n = __ga.__1d_.size(); |
| 2915 | 2921 | if (__n) |
| 2916 | 2922 | { |
| 2917 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2918 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2923 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2919 | 2924 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2920 | 2925 | try |
| 2921 | 2926 | { |
| ... | ... | @@ -2924,7 +2929,7 @@ valarray<_Tp>::valarray(const gslice_array<value_type>& __ga) |
| 2924 | 2929 | const value_type* __s = __ga.__vp_; |
| 2925 | 2930 | for (_Ip __i = __ga.__1d_.__begin_, __e = __ga.__1d_.__end_; |
| 2926 | 2931 | __i != __e; ++__i, ++__end_) |
| 2927 | ::new (__end_) value_type(__s[*__i]); | |
| 2932 | ::new ((void*)__end_) value_type(__s[*__i]); | |
| 2928 | 2933 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2929 | 2934 | } |
| 2930 | 2935 | catch (...) |
| ... | ... | @@ -2938,14 +2943,13 @@ valarray<_Tp>::valarray(const gslice_array<value_type>& __ga) |
| 2938 | 2943 | |
| 2939 | 2944 | template <class _Tp> |
| 2940 | 2945 | valarray<_Tp>::valarray(const mask_array<value_type>& __ma) |
| 2941 | : __begin_(0), | |
| 2942 | __end_(0) | |
| 2946 | : __begin_(nullptr), | |
| 2947 | __end_(nullptr) | |
| 2943 | 2948 | { |
| 2944 | 2949 | const size_t __n = __ma.__1d_.size(); |
| 2945 | 2950 | if (__n) |
| 2946 | 2951 | { |
| 2947 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2948 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2952 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2949 | 2953 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2950 | 2954 | try |
| 2951 | 2955 | { |
| ... | ... | @@ -2954,7 +2958,7 @@ valarray<_Tp>::valarray(const mask_array<value_type>& __ma) |
| 2954 | 2958 | const value_type* __s = __ma.__vp_; |
| 2955 | 2959 | for (_Ip __i = __ma.__1d_.__begin_, __e = __ma.__1d_.__end_; |
| 2956 | 2960 | __i != __e; ++__i, ++__end_) |
| 2957 | ::new (__end_) value_type(__s[*__i]); | |
| 2961 | ::new ((void*)__end_) value_type(__s[*__i]); | |
| 2958 | 2962 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2959 | 2963 | } |
| 2960 | 2964 | catch (...) |
| ... | ... | @@ -2968,14 +2972,13 @@ valarray<_Tp>::valarray(const mask_array<value_type>& __ma) |
| 2968 | 2972 | |
| 2969 | 2973 | template <class _Tp> |
| 2970 | 2974 | valarray<_Tp>::valarray(const indirect_array<value_type>& __ia) |
| 2971 | : __begin_(0), | |
| 2972 | __end_(0) | |
| 2975 | : __begin_(nullptr), | |
| 2976 | __end_(nullptr) | |
| 2973 | 2977 | { |
| 2974 | 2978 | const size_t __n = __ia.__1d_.size(); |
| 2975 | 2979 | if (__n) |
| 2976 | 2980 | { |
| 2977 | __begin_ = __end_ = static_cast<value_type*>( | |
| 2978 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 2981 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 2979 | 2982 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2980 | 2983 | try |
| 2981 | 2984 | { |
| ... | ... | @@ -2984,7 +2987,7 @@ valarray<_Tp>::valarray(const indirect_array<value_type>& __ia) |
| 2984 | 2987 | const value_type* __s = __ia.__vp_; |
| 2985 | 2988 | for (_Ip __i = __ia.__1d_.__begin_, __e = __ia.__1d_.__end_; |
| 2986 | 2989 | __i != __e; ++__i, ++__end_) |
| 2987 | ::new (__end_) value_type(__s[*__i]); | |
| 2990 | ::new ((void*)__end_) value_type(__s[*__i]); | |
| 2988 | 2991 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 2989 | 2992 | } |
| 2990 | 2993 | catch (...) |
| ... | ... | @@ -3011,8 +3014,7 @@ valarray<_Tp>::__assign_range(const value_type* __f, const value_type* __l) |
| 3011 | 3014 | if (size() != __n) |
| 3012 | 3015 | { |
| 3013 | 3016 | __clear(size()); |
| 3014 | __begin_ = static_cast<value_type*>( | |
| 3015 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3017 | __begin_ = allocator<value_type>().allocate(__n); | |
| 3016 | 3018 | __end_ = __begin_ + __n; |
| 3017 | 3019 | _VSTD::uninitialized_copy(__f, __l, __begin_); |
| 3018 | 3020 | } else { |
| ... | ... | @@ -3265,12 +3267,9 @@ valarray<_Tp>::operator+() const |
| 3265 | 3267 | size_t __n = size(); |
| 3266 | 3268 | if (__n) |
| 3267 | 3269 | { |
| 3268 | __r.__begin_ = | |
| 3269 | __r.__end_ = | |
| 3270 | static_cast<value_type*>( | |
| 3271 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3270 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3272 | 3271 | for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n) |
| 3273 | ::new (__r.__end_) value_type(+*__p); | |
| 3272 | ::new ((void*)__r.__end_) value_type(+*__p); | |
| 3274 | 3273 | } |
| 3275 | 3274 | return __r; |
| 3276 | 3275 | } |
| ... | ... | @@ -3283,12 +3282,9 @@ valarray<_Tp>::operator-() const |
| 3283 | 3282 | size_t __n = size(); |
| 3284 | 3283 | if (__n) |
| 3285 | 3284 | { |
| 3286 | __r.__begin_ = | |
| 3287 | __r.__end_ = | |
| 3288 | static_cast<value_type*>( | |
| 3289 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3285 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3290 | 3286 | for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n) |
| 3291 | ::new (__r.__end_) value_type(-*__p); | |
| 3287 | ::new ((void*)__r.__end_) value_type(-*__p); | |
| 3292 | 3288 | } |
| 3293 | 3289 | return __r; |
| 3294 | 3290 | } |
| ... | ... | @@ -3301,12 +3297,9 @@ valarray<_Tp>::operator~() const |
| 3301 | 3297 | size_t __n = size(); |
| 3302 | 3298 | if (__n) |
| 3303 | 3299 | { |
| 3304 | __r.__begin_ = | |
| 3305 | __r.__end_ = | |
| 3306 | static_cast<value_type*>( | |
| 3307 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3300 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3308 | 3301 | for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n) |
| 3309 | ::new (__r.__end_) value_type(~*__p); | |
| 3302 | ::new ((void*)__r.__end_) value_type(~*__p); | |
| 3310 | 3303 | } |
| 3311 | 3304 | return __r; |
| 3312 | 3305 | } |
| ... | ... | @@ -3319,11 +3312,9 @@ valarray<_Tp>::operator!() const |
| 3319 | 3312 | size_t __n = size(); |
| 3320 | 3313 | if (__n) |
| 3321 | 3314 | { |
| 3322 | __r.__begin_ = | |
| 3323 | __r.__end_ = | |
| 3324 | static_cast<bool*>(_VSTD::__libcpp_allocate(__n * sizeof(bool), _LIBCPP_ALIGNOF(bool))); | |
| 3315 | __r.__begin_ = __r.__end_ = allocator<bool>().allocate(__n); | |
| 3325 | 3316 | for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n) |
| 3326 | ::new (__r.__end_) bool(!*__p); | |
| 3317 | ::new ((void*)__r.__end_) bool(!*__p); | |
| 3327 | 3318 | } |
| 3328 | 3319 | return __r; |
| 3329 | 3320 | } |
| ... | ... | @@ -3639,10 +3630,7 @@ valarray<_Tp>::shift(int __i) const |
| 3639 | 3630 | size_t __n = size(); |
| 3640 | 3631 | if (__n) |
| 3641 | 3632 | { |
| 3642 | __r.__begin_ = | |
| 3643 | __r.__end_ = | |
| 3644 | static_cast<value_type*>( | |
| 3645 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3633 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3646 | 3634 | const value_type* __sb; |
| 3647 | 3635 | value_type* __tb; |
| 3648 | 3636 | value_type* __te; |
| ... | ... | @@ -3661,11 +3649,11 @@ valarray<_Tp>::shift(int __i) const |
| 3661 | 3649 | __te = __r.__begin_ + __n; |
| 3662 | 3650 | } |
| 3663 | 3651 | for (; __r.__end_ != __tb; ++__r.__end_) |
| 3664 | ::new (__r.__end_) value_type(); | |
| 3652 | ::new ((void*)__r.__end_) value_type(); | |
| 3665 | 3653 | for (; __r.__end_ != __te; ++__r.__end_, ++__sb) |
| 3666 | ::new (__r.__end_) value_type(*__sb); | |
| 3654 | ::new ((void*)__r.__end_) value_type(*__sb); | |
| 3667 | 3655 | for (__te = __r.__begin_ + __n; __r.__end_ != __te; ++__r.__end_) |
| 3668 | ::new (__r.__end_) value_type(); | |
| 3656 | ::new ((void*)__r.__end_) value_type(); | |
| 3669 | 3657 | } |
| 3670 | 3658 | return __r; |
| 3671 | 3659 | } |
| ... | ... | @@ -3678,16 +3666,13 @@ valarray<_Tp>::cshift(int __i) const |
| 3678 | 3666 | size_t __n = size(); |
| 3679 | 3667 | if (__n) |
| 3680 | 3668 | { |
| 3681 | __r.__begin_ = | |
| 3682 | __r.__end_ = | |
| 3683 | static_cast<value_type*>( | |
| 3684 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3669 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3685 | 3670 | __i %= static_cast<int>(__n); |
| 3686 | 3671 | const value_type* __m = __i >= 0 ? __begin_ + __i : __end_ + __i; |
| 3687 | 3672 | for (const value_type* __s = __m; __s != __end_; ++__r.__end_, ++__s) |
| 3688 | ::new (__r.__end_) value_type(*__s); | |
| 3673 | ::new ((void*)__r.__end_) value_type(*__s); | |
| 3689 | 3674 | for (const value_type* __s = __begin_; __s != __m; ++__r.__end_, ++__s) |
| 3690 | ::new (__r.__end_) value_type(*__s); | |
| 3675 | ::new ((void*)__r.__end_) value_type(*__s); | |
| 3691 | 3676 | } |
| 3692 | 3677 | return __r; |
| 3693 | 3678 | } |
| ... | ... | @@ -3700,12 +3685,9 @@ valarray<_Tp>::apply(value_type __f(value_type)) const |
| 3700 | 3685 | size_t __n = size(); |
| 3701 | 3686 | if (__n) |
| 3702 | 3687 | { |
| 3703 | __r.__begin_ = | |
| 3704 | __r.__end_ = | |
| 3705 | static_cast<value_type*>( | |
| 3706 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3688 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3707 | 3689 | for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n) |
| 3708 | ::new (__r.__end_) value_type(__f(*__p)); | |
| 3690 | ::new ((void*)__r.__end_) value_type(__f(*__p)); | |
| 3709 | 3691 | } |
| 3710 | 3692 | return __r; |
| 3711 | 3693 | } |
| ... | ... | @@ -3718,12 +3700,9 @@ valarray<_Tp>::apply(value_type __f(const value_type&)) const |
| 3718 | 3700 | size_t __n = size(); |
| 3719 | 3701 | if (__n) |
| 3720 | 3702 | { |
| 3721 | __r.__begin_ = | |
| 3722 | __r.__end_ = | |
| 3723 | static_cast<value_type*>( | |
| 3724 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3703 | __r.__begin_ = __r.__end_ = allocator<value_type>().allocate(__n); | |
| 3725 | 3704 | for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n) |
| 3726 | ::new (__r.__end_) value_type(__f(*__p)); | |
| 3705 | ::new ((void*)__r.__end_) value_type(__f(*__p)); | |
| 3727 | 3706 | } |
| 3728 | 3707 | return __r; |
| 3729 | 3708 | } |
| ... | ... | @@ -3736,7 +3715,7 @@ void valarray<_Tp>::__clear(size_t __capacity) |
| 3736 | 3715 | { |
| 3737 | 3716 | while (__end_ != __begin_) |
| 3738 | 3717 | (--__end_)->~value_type(); |
| 3739 | _VSTD::__libcpp_deallocate(__begin_, __capacity * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)); | |
| 3718 | allocator<value_type>().deallocate(__begin_, __capacity); | |
| 3740 | 3719 | __begin_ = __end_ = nullptr; |
| 3741 | 3720 | } |
| 3742 | 3721 | } |
| ... | ... | @@ -3748,14 +3727,13 @@ valarray<_Tp>::resize(size_t __n, value_type __x) |
| 3748 | 3727 | __clear(size()); |
| 3749 | 3728 | if (__n) |
| 3750 | 3729 | { |
| 3751 | __begin_ = __end_ = static_cast<value_type*>( | |
| 3752 | _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type))); | |
| 3730 | __begin_ = __end_ = allocator<value_type>().allocate(__n); | |
| 3753 | 3731 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3754 | 3732 | try |
| 3755 | 3733 | { |
| 3756 | 3734 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 3757 | 3735 | for (size_t __n_left = __n; __n_left; --__n_left, ++__end_) |
| 3758 | ::new (__end_) value_type(__x); | |
| 3736 | ::new ((void*)__end_) value_type(__x); | |
| 3759 | 3737 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 3760 | 3738 | } |
| 3761 | 3739 | catch (...) |
lib/libcxx/include/variant+96-31| ... | ... | @@ -169,6 +169,9 @@ namespace std { |
| 169 | 169 | template <class Visitor, class... Variants> |
| 170 | 170 | constexpr see below visit(Visitor&&, Variants&&...); |
| 171 | 171 | |
| 172 | template <class R, class Visitor, class... Variants> | |
| 173 | constexpr R visit(Visitor&&, Variants&&...); // since C++20 | |
| 174 | ||
| 172 | 175 | // 20.7.7, class monostate |
| 173 | 176 | struct monostate; |
| 174 | 177 | |
| ... | ... | @@ -197,6 +200,7 @@ namespace std { |
| 197 | 200 | */ |
| 198 | 201 | |
| 199 | 202 | #include <__config> |
| 203 | #include <__availability> | |
| 200 | 204 | #include <__tuple> |
| 201 | 205 | #include <array> |
| 202 | 206 | #include <exception> |
| ... | ... | @@ -227,7 +231,10 @@ public: |
| 227 | 231 | |
| 228 | 232 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 229 | 233 | |
| 230 | #if _LIBCPP_STD_VER > 14 | |
| 234 | // TODO: GCC 5 lies about its support for C++17 (it says it supports it but it | |
| 235 | // really doesn't). That breaks variant, which uses some C++17 features. | |
| 236 | // Remove this once we drop support for GCC 5. | |
| 237 | #if _LIBCPP_STD_VER > 14 && !(defined(_LIBCPP_COMPILER_GCC) && _GNUC_VER_NEW < 6000) | |
| 231 | 238 | |
| 232 | 239 | _LIBCPP_NORETURN |
| 233 | 240 | inline _LIBCPP_INLINE_VISIBILITY |
| ... | ... | @@ -290,9 +297,9 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> { |
| 290 | 297 | _LIBCPP_INLINE_VAR constexpr size_t variant_npos = static_cast<size_t>(-1); |
| 291 | 298 | |
| 292 | 299 | constexpr int __choose_index_type(unsigned int __num_elem) { |
| 293 | if (__num_elem < std::numeric_limits<unsigned char>::max()) | |
| 300 | if (__num_elem < numeric_limits<unsigned char>::max()) | |
| 294 | 301 | return 0; |
| 295 | if (__num_elem < std::numeric_limits<unsigned short>::max()) | |
| 302 | if (__num_elem < numeric_limits<unsigned short>::max()) | |
| 296 | 303 | return 1; |
| 297 | 304 | return 2; |
| 298 | 305 | } |
| ... | ... | @@ -482,12 +489,12 @@ private: |
| 482 | 489 | return __result{{_VSTD::forward<_Fs>(__fs)...}}; |
| 483 | 490 | } |
| 484 | 491 | |
| 485 | template <std::size_t... _Is> | |
| 492 | template <size_t... _Is> | |
| 486 | 493 | struct __dispatcher { |
| 487 | 494 | template <class _Fp, class... _Vs> |
| 488 | 495 | inline _LIBCPP_INLINE_VISIBILITY |
| 489 | 496 | static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) { |
| 490 | return __invoke_constexpr( | |
| 497 | return _VSTD::__invoke_constexpr( | |
| 491 | 498 | static_cast<_Fp>(__f), |
| 492 | 499 | __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...); |
| 493 | 500 | } |
| ... | ... | @@ -579,6 +586,16 @@ struct __variant { |
| 579 | 586 | __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)), |
| 580 | 587 | _VSTD::forward<_Vs>(__vs)...); |
| 581 | 588 | } |
| 589 | #if _LIBCPP_STD_VER > 17 | |
| 590 | template <class _Rp, class _Visitor, class... _Vs> | |
| 591 | inline _LIBCPP_INLINE_VISIBILITY | |
| 592 | static constexpr _Rp __visit_value(_Visitor&& __visitor, | |
| 593 | _Vs&&... __vs) { | |
| 594 | return __visit_alt( | |
| 595 | __make_value_visitor<_Rp>(_VSTD::forward<_Visitor>(__visitor)), | |
| 596 | _VSTD::forward<_Vs>(__vs)...); | |
| 597 | } | |
| 598 | #endif | |
| 582 | 599 | |
| 583 | 600 | private: |
| 584 | 601 | template <class _Visitor, class... _Values> |
| ... | ... | @@ -595,17 +612,48 @@ private: |
| 595 | 612 | __std_visit_exhaustive_visitor_check< |
| 596 | 613 | _Visitor, |
| 597 | 614 | decltype((_VSTD::forward<_Alts>(__alts).__value))...>(); |
| 598 | return __invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), | |
| 615 | return _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), | |
| 599 | 616 | _VSTD::forward<_Alts>(__alts).__value...); |
| 600 | 617 | } |
| 601 | 618 | _Visitor&& __visitor; |
| 602 | 619 | }; |
| 603 | 620 | |
| 621 | #if _LIBCPP_STD_VER > 17 | |
| 622 | template <class _Rp, class _Visitor> | |
| 623 | struct __value_visitor_return_type { | |
| 624 | template <class... _Alts> | |
| 625 | inline _LIBCPP_INLINE_VISIBILITY | |
| 626 | constexpr _Rp operator()(_Alts&&... __alts) const { | |
| 627 | __std_visit_exhaustive_visitor_check< | |
| 628 | _Visitor, | |
| 629 | decltype((_VSTD::forward<_Alts>(__alts).__value))...>(); | |
| 630 | if constexpr (is_void_v<_Rp>) { | |
| 631 | _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), | |
| 632 | _VSTD::forward<_Alts>(__alts).__value...); | |
| 633 | } | |
| 634 | else { | |
| 635 | return _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), | |
| 636 | _VSTD::forward<_Alts>(__alts).__value...); | |
| 637 | } | |
| 638 | } | |
| 639 | ||
| 640 | _Visitor&& __visitor; | |
| 641 | }; | |
| 642 | #endif | |
| 643 | ||
| 604 | 644 | template <class _Visitor> |
| 605 | 645 | inline _LIBCPP_INLINE_VISIBILITY |
| 606 | 646 | static constexpr auto __make_value_visitor(_Visitor&& __visitor) { |
| 607 | 647 | return __value_visitor<_Visitor>{_VSTD::forward<_Visitor>(__visitor)}; |
| 608 | 648 | } |
| 649 | ||
| 650 | #if _LIBCPP_STD_VER > 17 | |
| 651 | template <class _Rp, class _Visitor> | |
| 652 | inline _LIBCPP_INLINE_VISIBILITY | |
| 653 | static constexpr auto __make_value_visitor(_Visitor&& __visitor) { | |
| 654 | return __value_visitor_return_type<_Rp, _Visitor>{_VSTD::forward<_Visitor>(__visitor)}; | |
| 655 | } | |
| 656 | #endif | |
| 609 | 657 | }; |
| 610 | 658 | |
| 611 | 659 | } // namespace __visitation |
| ... | ... | @@ -720,12 +768,12 @@ protected: |
| 720 | 768 | }; |
| 721 | 769 | |
| 722 | 770 | template <class _Traits, _Trait = _Traits::__destructible_trait> |
| 723 | class _LIBCPP_TEMPLATE_VIS __destructor; | |
| 771 | class _LIBCPP_TEMPLATE_VIS __dtor; | |
| 724 | 772 | |
| 725 | 773 | #define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor, destroy) \ |
| 726 | 774 | template <class... _Types> \ |
| 727 | class _LIBCPP_TEMPLATE_VIS __destructor<__traits<_Types...>, \ | |
| 728 | destructible_trait> \ | |
| 775 | class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>, \ | |
| 776 | destructible_trait> \ | |
| 729 | 777 | : public __base<destructible_trait, _Types...> { \ |
| 730 | 778 | using __base_type = __base<destructible_trait, _Types...>; \ |
| 731 | 779 | using __index_t = typename __base_type::__index_t; \ |
| ... | ... | @@ -734,11 +782,11 @@ class _LIBCPP_TEMPLATE_VIS __destructor; |
| 734 | 782 | using __base_type::__base_type; \ |
| 735 | 783 | using __base_type::operator=; \ |
| 736 | 784 | \ |
| 737 | __destructor(const __destructor&) = default; \ | |
| 738 | __destructor(__destructor&&) = default; \ | |
| 785 | __dtor(const __dtor&) = default; \ | |
| 786 | __dtor(__dtor&&) = default; \ | |
| 739 | 787 | destructor \ |
| 740 | __destructor& operator=(const __destructor&) = default; \ | |
| 741 | __destructor& operator=(__destructor&&) = default; \ | |
| 788 | __dtor& operator=(const __dtor&) = default; \ | |
| 789 | __dtor& operator=(__dtor&&) = default; \ | |
| 742 | 790 | \ |
| 743 | 791 | protected: \ |
| 744 | 792 | inline _LIBCPP_INLINE_VISIBILITY \ |
| ... | ... | @@ -747,12 +795,12 @@ class _LIBCPP_TEMPLATE_VIS __destructor; |
| 747 | 795 | |
| 748 | 796 | _LIBCPP_VARIANT_DESTRUCTOR( |
| 749 | 797 | _Trait::_TriviallyAvailable, |
| 750 | ~__destructor() = default;, | |
| 798 | ~__dtor() = default;, | |
| 751 | 799 | void __destroy() noexcept { this->__index = __variant_npos<__index_t>; }); |
| 752 | 800 | |
| 753 | 801 | _LIBCPP_VARIANT_DESTRUCTOR( |
| 754 | 802 | _Trait::_Available, |
| 755 | ~__destructor() { __destroy(); }, | |
| 803 | ~__dtor() { __destroy(); }, | |
| 756 | 804 | void __destroy() noexcept { |
| 757 | 805 | if (!this->valueless_by_exception()) { |
| 758 | 806 | __visitation::__base::__visit_alt( |
| ... | ... | @@ -767,14 +815,14 @@ _LIBCPP_VARIANT_DESTRUCTOR( |
| 767 | 815 | |
| 768 | 816 | _LIBCPP_VARIANT_DESTRUCTOR( |
| 769 | 817 | _Trait::_Unavailable, |
| 770 | ~__destructor() = delete;, | |
| 818 | ~__dtor() = delete;, | |
| 771 | 819 | void __destroy() noexcept = delete;); |
| 772 | 820 | |
| 773 | 821 | #undef _LIBCPP_VARIANT_DESTRUCTOR |
| 774 | 822 | |
| 775 | 823 | template <class _Traits> |
| 776 | class _LIBCPP_TEMPLATE_VIS __constructor : public __destructor<_Traits> { | |
| 777 | using __base_type = __destructor<_Traits>; | |
| 824 | class _LIBCPP_TEMPLATE_VIS __ctor : public __dtor<_Traits> { | |
| 825 | using __base_type = __dtor<_Traits>; | |
| 778 | 826 | |
| 779 | 827 | public: |
| 780 | 828 | using __base_type::__base_type; |
| ... | ... | @@ -791,7 +839,7 @@ protected: |
| 791 | 839 | |
| 792 | 840 | template <class _Rhs> |
| 793 | 841 | inline _LIBCPP_INLINE_VISIBILITY |
| 794 | static void __generic_construct(__constructor& __lhs, _Rhs&& __rhs) { | |
| 842 | static void __generic_construct(__ctor& __lhs, _Rhs&& __rhs) { | |
| 795 | 843 | __lhs.__destroy(); |
| 796 | 844 | if (!__rhs.valueless_by_exception()) { |
| 797 | 845 | __visitation::__base::__visit_alt_at( |
| ... | ... | @@ -813,10 +861,10 @@ class _LIBCPP_TEMPLATE_VIS __move_constructor; |
| 813 | 861 | #define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait, \ |
| 814 | 862 | move_constructor) \ |
| 815 | 863 | template <class... _Types> \ |
| 816 | class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, \ | |
| 817 | move_constructible_trait> \ | |
| 818 | : public __constructor<__traits<_Types...>> { \ | |
| 819 | using __base_type = __constructor<__traits<_Types...>>; \ | |
| 864 | class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, \ | |
| 865 | move_constructible_trait> \ | |
| 866 | : public __ctor<__traits<_Types...>> { \ | |
| 867 | using __base_type = __ctor<__traits<_Types...>>; \ | |
| 820 | 868 | \ |
| 821 | 869 | public: \ |
| 822 | 870 | using __base_type::__base_type; \ |
| ... | ... | @@ -1104,7 +1152,7 @@ struct __narrowing_check { |
| 1104 | 1152 | template <class _Dest> |
| 1105 | 1153 | static auto __test_impl(_Dest (&&)[1]) -> __identity<_Dest>; |
| 1106 | 1154 | template <class _Dest, class _Source> |
| 1107 | using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({std::declval<_Source>()})); | |
| 1155 | using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({_VSTD::declval<_Source>()})); | |
| 1108 | 1156 | }; |
| 1109 | 1157 | |
| 1110 | 1158 | template <class _Dest, class _Source> |
| ... | ... | @@ -1510,7 +1558,7 @@ template <class _Operator> |
| 1510 | 1558 | struct __convert_to_bool { |
| 1511 | 1559 | template <class _T1, class _T2> |
| 1512 | 1560 | _LIBCPP_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const { |
| 1513 | static_assert(std::is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value, | |
| 1561 | static_assert(is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value, | |
| 1514 | 1562 | "the relational operator does not return a type which is implicitly convertible to bool"); |
| 1515 | 1563 | return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2)); |
| 1516 | 1564 | } |
| ... | ... | @@ -1587,21 +1635,38 @@ constexpr bool operator>=(const variant<_Types...>& __lhs, |
| 1587 | 1635 | __lhs.index(), __convert_to_bool<greater_equal<>>{}, __lhs, __rhs); |
| 1588 | 1636 | } |
| 1589 | 1637 | |
| 1638 | template <class... _Vs> | |
| 1639 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1640 | _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS | |
| 1641 | constexpr void __throw_if_valueless(_Vs&&... __vs) { | |
| 1642 | const bool __valueless = (... || __vs.valueless_by_exception()); | |
| 1643 | if (__valueless) { | |
| 1644 | __throw_bad_variant_access(); | |
| 1645 | } | |
| 1646 | } | |
| 1647 | ||
| 1590 | 1648 | template <class _Visitor, class... _Vs> |
| 1591 | 1649 | inline _LIBCPP_INLINE_VISIBILITY |
| 1592 | 1650 | _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS |
| 1593 | 1651 | constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) { |
| 1594 | 1652 | using __variant_detail::__visitation::__variant; |
| 1595 | bool __results[] = {__vs.valueless_by_exception()...}; | |
| 1596 | for (bool __result : __results) { | |
| 1597 | if (__result) { | |
| 1598 | __throw_bad_variant_access(); | |
| 1599 | } | |
| 1600 | } | |
| 1653 | _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...); | |
| 1601 | 1654 | return __variant::__visit_value(_VSTD::forward<_Visitor>(__visitor), |
| 1602 | 1655 | _VSTD::forward<_Vs>(__vs)...); |
| 1603 | 1656 | } |
| 1604 | 1657 | |
| 1658 | #if _LIBCPP_STD_VER > 17 | |
| 1659 | template <class _Rp, class _Visitor, class... _Vs> | |
| 1660 | inline _LIBCPP_INLINE_VISIBILITY | |
| 1661 | _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS | |
| 1662 | constexpr _Rp visit(_Visitor&& __visitor, _Vs&&... __vs) { | |
| 1663 | using __variant_detail::__visitation::__variant; | |
| 1664 | _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...); | |
| 1665 | return __variant::__visit_value<_Rp>(_VSTD::forward<_Visitor>(__visitor), | |
| 1666 | _VSTD::forward<_Vs>(__vs)...); | |
| 1667 | } | |
| 1668 | #endif | |
| 1669 | ||
| 1605 | 1670 | struct _LIBCPP_TEMPLATE_VIS monostate {}; |
| 1606 | 1671 | |
| 1607 | 1672 | inline _LIBCPP_INLINE_VISIBILITY |
lib/libcxx/include/vector+48-51| ... | ... | @@ -454,7 +454,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 454 | 454 | __vector_base<_Tp, _Allocator>::__vector_base(allocator_type&& __a) _NOEXCEPT |
| 455 | 455 | : __begin_(nullptr), |
| 456 | 456 | __end_(nullptr), |
| 457 | __end_cap_(nullptr, std::move(__a)) {} | |
| 457 | __end_cap_(nullptr, _VSTD::move(__a)) {} | |
| 458 | 458 | #endif |
| 459 | 459 | |
| 460 | 460 | template <class _Tp, class _Allocator> |
| ... | ... | @@ -496,7 +496,7 @@ public: |
| 496 | 496 | _LIBCPP_INLINE_VISIBILITY |
| 497 | 497 | vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) |
| 498 | 498 | { |
| 499 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 499 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 500 | 500 | __get_db()->__insert_c(this); |
| 501 | 501 | #endif |
| 502 | 502 | } |
| ... | ... | @@ -508,7 +508,7 @@ public: |
| 508 | 508 | #endif |
| 509 | 509 | : __base(__a) |
| 510 | 510 | { |
| 511 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 511 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 512 | 512 | __get_db()->__insert_c(this); |
| 513 | 513 | #endif |
| 514 | 514 | } |
| ... | ... | @@ -551,7 +551,7 @@ public: |
| 551 | 551 | ~vector() |
| 552 | 552 | { |
| 553 | 553 | __annotate_delete(); |
| 554 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 554 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 555 | 555 | __get_db()->__erase_c(this); |
| 556 | 556 | #endif |
| 557 | 557 | } |
| ... | ... | @@ -789,14 +789,14 @@ public: |
| 789 | 789 | |
| 790 | 790 | bool __invariants() const; |
| 791 | 791 | |
| 792 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 792 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 793 | 793 | |
| 794 | 794 | bool __dereferenceable(const const_iterator* __i) const; |
| 795 | 795 | bool __decrementable(const const_iterator* __i) const; |
| 796 | 796 | bool __addable(const const_iterator* __i, ptrdiff_t __n) const; |
| 797 | 797 | bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const; |
| 798 | 798 | |
| 799 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 799 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 800 | 800 | |
| 801 | 801 | private: |
| 802 | 802 | _LIBCPP_INLINE_VISIBILITY void __invalidate_all_iterators(); |
| ... | ... | @@ -931,7 +931,7 @@ private: |
| 931 | 931 | |
| 932 | 932 | #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES |
| 933 | 933 | template<class _InputIterator, |
| 934 | class _Alloc = typename std::allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 934 | class _Alloc = allocator<typename iterator_traits<_InputIterator>::value_type>, | |
| 935 | 935 | class = typename enable_if<__is_allocator<_Alloc>::value, void>::type |
| 936 | 936 | > |
| 937 | 937 | vector(_InputIterator, _InputIterator) |
| ... | ... | @@ -951,8 +951,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a |
| 951 | 951 | { |
| 952 | 952 | |
| 953 | 953 | __annotate_delete(); |
| 954 | __alloc_traits::__construct_backward_with_exception_guarantees( | |
| 955 | this->__alloc(), this->__begin_, this->__end_, __v.__begin_); | |
| 954 | _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_); | |
| 956 | 955 | _VSTD::swap(this->__begin_, __v.__begin_); |
| 957 | 956 | _VSTD::swap(this->__end_, __v.__end_); |
| 958 | 957 | _VSTD::swap(this->__end_cap(), __v.__end_cap()); |
| ... | ... | @@ -967,10 +966,8 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a |
| 967 | 966 | { |
| 968 | 967 | __annotate_delete(); |
| 969 | 968 | pointer __r = __v.__begin_; |
| 970 | __alloc_traits::__construct_backward_with_exception_guarantees( | |
| 971 | this->__alloc(), this->__begin_, __p, __v.__begin_); | |
| 972 | __alloc_traits::__construct_forward_with_exception_guarantees( | |
| 973 | this->__alloc(), __p, this->__end_, __v.__end_); | |
| 969 | _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, __p, __v.__begin_); | |
| 970 | _VSTD::__construct_forward_with_exception_guarantees(this->__alloc(), __p, this->__end_, __v.__end_); | |
| 974 | 971 | _VSTD::swap(this->__begin_, __v.__begin_); |
| 975 | 972 | _VSTD::swap(this->__end_, __v.__end_); |
| 976 | 973 | _VSTD::swap(this->__end_cap(), __v.__end_cap()); |
| ... | ... | @@ -1077,7 +1074,7 @@ typename enable_if |
| 1077 | 1074 | vector<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n) |
| 1078 | 1075 | { |
| 1079 | 1076 | _ConstructTransaction __tx(*this, __n); |
| 1080 | __alloc_traits::__construct_range_forward(this->__alloc(), __first, __last, __tx.__pos_); | |
| 1077 | _VSTD::__construct_range_forward(this->__alloc(), __first, __last, __tx.__pos_); | |
| 1081 | 1078 | } |
| 1082 | 1079 | |
| 1083 | 1080 | // Default constructs __n objects starting at __end_ |
| ... | ... | @@ -1121,7 +1118,7 @@ vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x) |
| 1121 | 1118 | template <class _Tp, class _Allocator> |
| 1122 | 1119 | vector<_Tp, _Allocator>::vector(size_type __n) |
| 1123 | 1120 | { |
| 1124 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1121 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1125 | 1122 | __get_db()->__insert_c(this); |
| 1126 | 1123 | #endif |
| 1127 | 1124 | if (__n > 0) |
| ... | ... | @@ -1136,7 +1133,7 @@ template <class _Tp, class _Allocator> |
| 1136 | 1133 | vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a) |
| 1137 | 1134 | : __base(__a) |
| 1138 | 1135 | { |
| 1139 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1136 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1140 | 1137 | __get_db()->__insert_c(this); |
| 1141 | 1138 | #endif |
| 1142 | 1139 | if (__n > 0) |
| ... | ... | @@ -1150,7 +1147,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a) |
| 1150 | 1147 | template <class _Tp, class _Allocator> |
| 1151 | 1148 | vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x) |
| 1152 | 1149 | { |
| 1153 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1150 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1154 | 1151 | __get_db()->__insert_c(this); |
| 1155 | 1152 | #endif |
| 1156 | 1153 | if (__n > 0) |
| ... | ... | @@ -1164,7 +1161,7 @@ template <class _Tp, class _Allocator> |
| 1164 | 1161 | vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a) |
| 1165 | 1162 | : __base(__a) |
| 1166 | 1163 | { |
| 1167 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1164 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1168 | 1165 | __get_db()->__insert_c(this); |
| 1169 | 1166 | #endif |
| 1170 | 1167 | if (__n > 0) |
| ... | ... | @@ -1184,7 +1181,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first, |
| 1184 | 1181 | typename iterator_traits<_InputIterator>::reference>::value, |
| 1185 | 1182 | _InputIterator>::type __last) |
| 1186 | 1183 | { |
| 1187 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1184 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1188 | 1185 | __get_db()->__insert_c(this); |
| 1189 | 1186 | #endif |
| 1190 | 1187 | for (; __first != __last; ++__first) |
| ... | ... | @@ -1201,7 +1198,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, c |
| 1201 | 1198 | typename iterator_traits<_InputIterator>::reference>::value>::type*) |
| 1202 | 1199 | : __base(__a) |
| 1203 | 1200 | { |
| 1204 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1201 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1205 | 1202 | __get_db()->__insert_c(this); |
| 1206 | 1203 | #endif |
| 1207 | 1204 | for (; __first != __last; ++__first) |
| ... | ... | @@ -1217,7 +1214,7 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, |
| 1217 | 1214 | typename iterator_traits<_ForwardIterator>::reference>::value, |
| 1218 | 1215 | _ForwardIterator>::type __last) |
| 1219 | 1216 | { |
| 1220 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1217 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1221 | 1218 | __get_db()->__insert_c(this); |
| 1222 | 1219 | #endif |
| 1223 | 1220 | size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last)); |
| ... | ... | @@ -1237,7 +1234,7 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las |
| 1237 | 1234 | typename iterator_traits<_ForwardIterator>::reference>::value>::type*) |
| 1238 | 1235 | : __base(__a) |
| 1239 | 1236 | { |
| 1240 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1237 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1241 | 1238 | __get_db()->__insert_c(this); |
| 1242 | 1239 | #endif |
| 1243 | 1240 | size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last)); |
| ... | ... | @@ -1252,7 +1249,7 @@ template <class _Tp, class _Allocator> |
| 1252 | 1249 | vector<_Tp, _Allocator>::vector(const vector& __x) |
| 1253 | 1250 | : __base(__alloc_traits::select_on_container_copy_construction(__x.__alloc())) |
| 1254 | 1251 | { |
| 1255 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1252 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1256 | 1253 | __get_db()->__insert_c(this); |
| 1257 | 1254 | #endif |
| 1258 | 1255 | size_type __n = __x.size(); |
| ... | ... | @@ -1267,7 +1264,7 @@ template <class _Tp, class _Allocator> |
| 1267 | 1264 | vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a) |
| 1268 | 1265 | : __base(__a) |
| 1269 | 1266 | { |
| 1270 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1267 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1271 | 1268 | __get_db()->__insert_c(this); |
| 1272 | 1269 | #endif |
| 1273 | 1270 | size_type __n = __x.size(); |
| ... | ... | @@ -1290,7 +1287,7 @@ vector<_Tp, _Allocator>::vector(vector&& __x) |
| 1290 | 1287 | #endif |
| 1291 | 1288 | : __base(_VSTD::move(__x.__alloc())) |
| 1292 | 1289 | { |
| 1293 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1290 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1294 | 1291 | __get_db()->__insert_c(this); |
| 1295 | 1292 | __get_db()->swap(this, &__x); |
| 1296 | 1293 | #endif |
| ... | ... | @@ -1305,7 +1302,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1305 | 1302 | vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a) |
| 1306 | 1303 | : __base(__a) |
| 1307 | 1304 | { |
| 1308 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1305 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1309 | 1306 | __get_db()->__insert_c(this); |
| 1310 | 1307 | #endif |
| 1311 | 1308 | if (__a == __x.__alloc()) |
| ... | ... | @@ -1314,7 +1311,7 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a) |
| 1314 | 1311 | this->__end_ = __x.__end_; |
| 1315 | 1312 | this->__end_cap() = __x.__end_cap(); |
| 1316 | 1313 | __x.__begin_ = __x.__end_ = __x.__end_cap() = nullptr; |
| 1317 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1314 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1318 | 1315 | __get_db()->swap(this, &__x); |
| 1319 | 1316 | #endif |
| 1320 | 1317 | } |
| ... | ... | @@ -1329,7 +1326,7 @@ template <class _Tp, class _Allocator> |
| 1329 | 1326 | inline _LIBCPP_INLINE_VISIBILITY |
| 1330 | 1327 | vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il) |
| 1331 | 1328 | { |
| 1332 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1329 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1333 | 1330 | __get_db()->__insert_c(this); |
| 1334 | 1331 | #endif |
| 1335 | 1332 | if (__il.size() > 0) |
| ... | ... | @@ -1344,7 +1341,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1344 | 1341 | vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a) |
| 1345 | 1342 | : __base(__a) |
| 1346 | 1343 | { |
| 1347 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1344 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1348 | 1345 | __get_db()->__insert_c(this); |
| 1349 | 1346 | #endif |
| 1350 | 1347 | if (__il.size() > 0) |
| ... | ... | @@ -1390,7 +1387,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type) |
| 1390 | 1387 | this->__end_ = __c.__end_; |
| 1391 | 1388 | this->__end_cap() = __c.__end_cap(); |
| 1392 | 1389 | __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr; |
| 1393 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1390 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1394 | 1391 | __get_db()->swap(this, &__c); |
| 1395 | 1392 | #endif |
| 1396 | 1393 | } |
| ... | ... | @@ -1493,7 +1490,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1493 | 1490 | typename vector<_Tp, _Allocator>::iterator |
| 1494 | 1491 | vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT |
| 1495 | 1492 | { |
| 1496 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1493 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1497 | 1494 | return iterator(this, __p); |
| 1498 | 1495 | #else |
| 1499 | 1496 | return iterator(__p); |
| ... | ... | @@ -1505,7 +1502,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1505 | 1502 | typename vector<_Tp, _Allocator>::const_iterator |
| 1506 | 1503 | vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const _NOEXCEPT |
| 1507 | 1504 | { |
| 1508 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1505 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1509 | 1506 | return const_iterator(this, __p); |
| 1510 | 1507 | #else |
| 1511 | 1508 | return const_iterator(__p); |
| ... | ... | @@ -1709,7 +1706,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1709 | 1706 | typename vector<_Tp, _Allocator>::iterator |
| 1710 | 1707 | vector<_Tp, _Allocator>::erase(const_iterator __position) |
| 1711 | 1708 | { |
| 1712 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1709 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1713 | 1710 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1714 | 1711 | "vector::erase(iterator) called with an iterator not" |
| 1715 | 1712 | " referring to this vector"); |
| ... | ... | @@ -1728,7 +1725,7 @@ template <class _Tp, class _Allocator> |
| 1728 | 1725 | typename vector<_Tp, _Allocator>::iterator |
| 1729 | 1726 | vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last) |
| 1730 | 1727 | { |
| 1731 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1728 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1732 | 1729 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__first) == this, |
| 1733 | 1730 | "vector::erase(iterator, iterator) called with an iterator not" |
| 1734 | 1731 | " referring to this vector"); |
| ... | ... | @@ -1769,7 +1766,7 @@ template <class _Tp, class _Allocator> |
| 1769 | 1766 | typename vector<_Tp, _Allocator>::iterator |
| 1770 | 1767 | vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x) |
| 1771 | 1768 | { |
| 1772 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1769 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1773 | 1770 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1774 | 1771 | "vector::insert(iterator, x) called with an iterator not" |
| 1775 | 1772 | " referring to this vector"); |
| ... | ... | @@ -1806,7 +1803,7 @@ template <class _Tp, class _Allocator> |
| 1806 | 1803 | typename vector<_Tp, _Allocator>::iterator |
| 1807 | 1804 | vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x) |
| 1808 | 1805 | { |
| 1809 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1806 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1810 | 1807 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1811 | 1808 | "vector::insert(iterator, x) called with an iterator not" |
| 1812 | 1809 | " referring to this vector"); |
| ... | ... | @@ -1839,7 +1836,7 @@ template <class... _Args> |
| 1839 | 1836 | typename vector<_Tp, _Allocator>::iterator |
| 1840 | 1837 | vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) |
| 1841 | 1838 | { |
| 1842 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1839 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1843 | 1840 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1844 | 1841 | "vector::emplace(iterator, x) called with an iterator not" |
| 1845 | 1842 | " referring to this vector"); |
| ... | ... | @@ -1874,7 +1871,7 @@ template <class _Tp, class _Allocator> |
| 1874 | 1871 | typename vector<_Tp, _Allocator>::iterator |
| 1875 | 1872 | vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x) |
| 1876 | 1873 | { |
| 1877 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1874 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1878 | 1875 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1879 | 1876 | "vector::insert(iterator, n, x) called with an iterator not" |
| 1880 | 1877 | " referring to this vector"); |
| ... | ... | @@ -1925,7 +1922,7 @@ typename enable_if |
| 1925 | 1922 | >::type |
| 1926 | 1923 | vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last) |
| 1927 | 1924 | { |
| 1928 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1925 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1929 | 1926 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1930 | 1927 | "vector::insert(iterator, range) called with an iterator not" |
| 1931 | 1928 | " referring to this vector"); |
| ... | ... | @@ -1978,7 +1975,7 @@ typename enable_if |
| 1978 | 1975 | >::type |
| 1979 | 1976 | vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) |
| 1980 | 1977 | { |
| 1981 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 1978 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 1982 | 1979 | _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this, |
| 1983 | 1980 | "vector::insert(iterator, range) called with an iterator not" |
| 1984 | 1981 | " referring to this vector"); |
| ... | ... | @@ -2057,11 +2054,11 @@ vector<_Tp, _Allocator>::swap(vector& __x) |
| 2057 | 2054 | _VSTD::swap(this->__begin_, __x.__begin_); |
| 2058 | 2055 | _VSTD::swap(this->__end_, __x.__end_); |
| 2059 | 2056 | _VSTD::swap(this->__end_cap(), __x.__end_cap()); |
| 2060 | __swap_allocator(this->__alloc(), __x.__alloc(), | |
| 2057 | _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(), | |
| 2061 | 2058 | integral_constant<bool,__alloc_traits::propagate_on_container_swap::value>()); |
| 2062 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2059 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2063 | 2060 | __get_db()->swap(this, &__x); |
| 2064 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2061 | #endif | |
| 2065 | 2062 | } |
| 2066 | 2063 | |
| 2067 | 2064 | template <class _Tp, class _Allocator> |
| ... | ... | @@ -2085,7 +2082,7 @@ vector<_Tp, _Allocator>::__invariants() const |
| 2085 | 2082 | return true; |
| 2086 | 2083 | } |
| 2087 | 2084 | |
| 2088 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2085 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2089 | 2086 | |
| 2090 | 2087 | template <class _Tp, class _Allocator> |
| 2091 | 2088 | bool |
| ... | ... | @@ -2117,16 +2114,16 @@ vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __ |
| 2117 | 2114 | return this->__begin_ <= __p && __p < this->__end_; |
| 2118 | 2115 | } |
| 2119 | 2116 | |
| 2120 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2117 | #endif // _LIBCPP_DEBUG_LEVEL == 2 | |
| 2121 | 2118 | |
| 2122 | 2119 | template <class _Tp, class _Allocator> |
| 2123 | 2120 | inline _LIBCPP_INLINE_VISIBILITY |
| 2124 | 2121 | void |
| 2125 | 2122 | vector<_Tp, _Allocator>::__invalidate_all_iterators() |
| 2126 | 2123 | { |
| 2127 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2124 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2128 | 2125 | __get_db()->__invalidate_all(this); |
| 2129 | #endif // _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2126 | #endif | |
| 2130 | 2127 | } |
| 2131 | 2128 | |
| 2132 | 2129 | |
| ... | ... | @@ -2134,7 +2131,7 @@ template <class _Tp, class _Allocator> |
| 2134 | 2131 | inline _LIBCPP_INLINE_VISIBILITY |
| 2135 | 2132 | void |
| 2136 | 2133 | vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) { |
| 2137 | #if _LIBCPP_DEBUG_LEVEL >= 2 | |
| 2134 | #if _LIBCPP_DEBUG_LEVEL == 2 | |
| 2138 | 2135 | __c_node* __c = __get_db()->__find_c_and_lock(this); |
| 2139 | 2136 | for (__i_node** __p = __c->end_; __p != __c->beg_; ) { |
| 2140 | 2137 | --__p; |
| ... | ... | @@ -2142,7 +2139,7 @@ vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) { |
| 2142 | 2139 | if (__i->base() > __new_last) { |
| 2143 | 2140 | (*__p)->__c_ = nullptr; |
| 2144 | 2141 | if (--__c->end_ != __p) |
| 2145 | memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 2142 | _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); | |
| 2146 | 2143 | } |
| 2147 | 2144 | } |
| 2148 | 2145 | __get_db()->unlock(); |
| ... | ... | @@ -2883,7 +2880,7 @@ inline _LIBCPP_INLINE_VISIBILITY vector<bool, _Allocator>::vector(vector&& __v) |
| 2883 | 2880 | #endif |
| 2884 | 2881 | : __begin_(__v.__begin_), |
| 2885 | 2882 | __size_(__v.__size_), |
| 2886 | __cap_alloc_(std::move(__v.__cap_alloc_)) { | |
| 2883 | __cap_alloc_(_VSTD::move(__v.__cap_alloc_)) { | |
| 2887 | 2884 | __v.__begin_ = nullptr; |
| 2888 | 2885 | __v.__size_ = 0; |
| 2889 | 2886 | __v.__cap() = 0; |
| ... | ... | @@ -3235,7 +3232,7 @@ vector<bool, _Allocator>::swap(vector& __x) |
| 3235 | 3232 | _VSTD::swap(this->__begin_, __x.__begin_); |
| 3236 | 3233 | _VSTD::swap(this->__size_, __x.__size_); |
| 3237 | 3234 | _VSTD::swap(this->__cap(), __x.__cap()); |
| 3238 | __swap_allocator(this->__alloc(), __x.__alloc(), | |
| 3235 | _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(), | |
| 3239 | 3236 | integral_constant<bool, __alloc_traits::propagate_on_container_swap::value>()); |
| 3240 | 3237 | } |
| 3241 | 3238 |
lib/libcxx/include/version+142-28| ... | ... | @@ -15,20 +15,30 @@ |
| 15 | 15 | |
| 16 | 16 | Macro name Value Headers |
| 17 | 17 | __cpp_lib_addressof_constexpr 201603L <memory> |
| 18 | __cpp_lib_allocator_traits_is_always_equal 201411L <memory> <scoped_allocator> <string> | |
| 19 | <deque> <forward_list> <list> | |
| 20 | <vector> <map> <set> | |
| 21 | <unordered_map> <unordered_set> | |
| 18 | __cpp_lib_allocator_traits_is_always_equal 201411L <deque> <forward_list> <list> | |
| 19 | <map> <memory> <scoped_allocator> | |
| 20 | <set> <string> <unordered_map> | |
| 21 | <unordered_set> <vector> | |
| 22 | 22 | __cpp_lib_any 201606L <any> |
| 23 | 23 | __cpp_lib_apply 201603L <tuple> |
| 24 | __cpp_lib_array_constexpr 201811L <iterator> <array> | |
| 24 | __cpp_lib_array_constexpr 201811L <array> <iterator> | |
| 25 | 25 | 201603L // C++17 |
| 26 | 26 | __cpp_lib_as_const 201510L <utility> |
| 27 | __cpp_lib_assume_aligned 201811L <memory> | |
| 28 | __cpp_lib_atomic_flag_test 201907L <atomic> | |
| 29 | __cpp_lib_atomic_float 201711L <atomic> | |
| 27 | 30 | __cpp_lib_atomic_is_always_lock_free 201603L <atomic> |
| 31 | __cpp_lib_atomic_lock_free_type_aliases 201907L <atomic> | |
| 28 | 32 | __cpp_lib_atomic_ref 201806L <atomic> |
| 29 | __cpp_lib_bind_front 201811L <functional> | |
| 33 | __cpp_lib_atomic_shared_ptr 201711L <atomic> | |
| 34 | __cpp_lib_atomic_value_initialization 201911L <atomic> <memory> | |
| 35 | __cpp_lib_atomic_wait 201907L <atomic> | |
| 36 | __cpp_lib_barrier 201907L <barrier> | |
| 37 | __cpp_lib_bind_front 201907L <functional> | |
| 30 | 38 | __cpp_lib_bit_cast 201806L <bit> |
| 39 | __cpp_lib_bitops 201907L <bit> | |
| 31 | 40 | __cpp_lib_bool_constant 201505L <type_traits> |
| 41 | __cpp_lib_bounded_array_traits 201902L <type_traits> | |
| 32 | 42 | __cpp_lib_boyer_moore_searcher 201603L <functional> |
| 33 | 43 | __cpp_lib_byte 201603L <cstddef> |
| 34 | 44 | __cpp_lib_char8_t 201811L <atomic> <filesystem> <istream> |
| ... | ... | @@ -38,18 +48,29 @@ __cpp_lib_chrono 201611L <chrono> |
| 38 | 48 | __cpp_lib_chrono_udls 201304L <chrono> |
| 39 | 49 | __cpp_lib_clamp 201603L <algorithm> |
| 40 | 50 | __cpp_lib_complex_udls 201309L <complex> |
| 41 | __cpp_lib_concepts 201806L <concepts> | |
| 42 | __cpp_lib_constexpr_misc 201811L <array> <functional> <iterator> | |
| 43 | <string_view> <tuple> <utility> | |
| 44 | __cpp_lib_constexpr_swap_algorithms 201806L <algorithm> | |
| 51 | __cpp_lib_concepts 202002L <concepts> | |
| 52 | __cpp_lib_constexpr_algorithms 201806L <algorithm> | |
| 53 | __cpp_lib_constexpr_complex 201711L <complex> | |
| 54 | __cpp_lib_constexpr_dynamic_alloc 201907L <memory> | |
| 55 | __cpp_lib_constexpr_functional 201907L <functional> | |
| 56 | __cpp_lib_constexpr_iterator 201811L <iterator> | |
| 57 | __cpp_lib_constexpr_memory 201811L <memory> | |
| 58 | __cpp_lib_constexpr_numeric 201911L <numeric> | |
| 59 | __cpp_lib_constexpr_string 201907L <string> | |
| 60 | __cpp_lib_constexpr_string_view 201811L <string_view> | |
| 61 | __cpp_lib_constexpr_tuple 201811L <tuple> | |
| 62 | __cpp_lib_constexpr_utility 201811L <utility> | |
| 63 | __cpp_lib_constexpr_vector 201907L <vector> | |
| 64 | __cpp_lib_coroutine 201902L <coroutine> | |
| 45 | 65 | __cpp_lib_destroying_delete 201806L <new> |
| 46 | 66 | __cpp_lib_enable_shared_from_this 201603L <memory> |
| 47 | 67 | __cpp_lib_endian 201907L <bit> |
| 48 | __cpp_lib_erase_if 202002L <string> <deque> <forward_list> | |
| 49 | <list> <vector> <map> | |
| 50 | <set> <unordered_map> <unordered_set> | |
| 68 | __cpp_lib_erase_if 202002L <deque> <forward_list> <list> | |
| 69 | <map> <set> <string> | |
| 70 | <unordered_map> <unordered_set> <vector> | |
| 51 | 71 | __cpp_lib_exchange_function 201304L <utility> |
| 52 | __cpp_lib_execution 201603L <execution> | |
| 72 | __cpp_lib_execution 201902L <execution> | |
| 73 | 201603L // C++17 | |
| 53 | 74 | __cpp_lib_filesystem 201703L <filesystem> |
| 54 | 75 | __cpp_lib_gcd_lcm 201606L <numeric> |
| 55 | 76 | __cpp_lib_generic_associative_lookup 201304L <map> <set> |
| ... | ... | @@ -58,16 +79,24 @@ __cpp_lib_hardware_interference_size 201703L <new> |
| 58 | 79 | __cpp_lib_has_unique_object_representations 201606L <type_traits> |
| 59 | 80 | __cpp_lib_hypot 201603L <cmath> |
| 60 | 81 | __cpp_lib_incomplete_container_elements 201505L <forward_list> <list> <vector> |
| 82 | __cpp_lib_int_pow2 202002L <bit> | |
| 83 | __cpp_lib_integer_comparison_functions 202002L <utility> | |
| 61 | 84 | __cpp_lib_integer_sequence 201304L <utility> |
| 62 | 85 | __cpp_lib_integral_constant_callable 201304L <type_traits> |
| 63 | __cpp_lib_interpolate 201902L <numeric> | |
| 86 | __cpp_lib_interpolate 201902L <cmath> <numeric> | |
| 64 | 87 | __cpp_lib_invoke 201411L <functional> |
| 65 | 88 | __cpp_lib_is_aggregate 201703L <type_traits> |
| 66 | 89 | __cpp_lib_is_constant_evaluated 201811L <type_traits> |
| 67 | 90 | __cpp_lib_is_final 201402L <type_traits> |
| 68 | 91 | __cpp_lib_is_invocable 201703L <type_traits> |
| 92 | __cpp_lib_is_layout_compatible 201907L <type_traits> | |
| 93 | __cpp_lib_is_nothrow_convertible 201806L <type_traits> | |
| 69 | 94 | __cpp_lib_is_null_pointer 201309L <type_traits> |
| 95 | __cpp_lib_is_pointer_interconvertible 201907L <type_traits> | |
| 96 | __cpp_lib_is_scoped_enum 202011L <type_traits> | |
| 70 | 97 | __cpp_lib_is_swappable 201603L <type_traits> |
| 98 | __cpp_lib_jthread 201911L <stop_token> <thread> | |
| 99 | __cpp_lib_latch 201907L <latch> | |
| 71 | 100 | __cpp_lib_launder 201606L <new> |
| 72 | 101 | __cpp_lib_list_remove_return_type 201806L <forward_list> <list> |
| 73 | 102 | __cpp_lib_logical_traits 201510L <type_traits> |
| ... | ... | @@ -80,40 +109,55 @@ __cpp_lib_math_special_functions 201603L <cmath> |
| 80 | 109 | __cpp_lib_memory_resource 201603L <memory_resource> |
| 81 | 110 | __cpp_lib_node_extract 201606L <map> <set> <unordered_map> |
| 82 | 111 | <unordered_set> |
| 83 | __cpp_lib_nonmember_container_access 201411L <iterator> <array> <deque> | |
| 84 | <forward_list> <list> <map> | |
| 112 | __cpp_lib_nonmember_container_access 201411L <array> <deque> <forward_list> | |
| 113 | <iterator> <list> <map> | |
| 85 | 114 | <regex> <set> <string> |
| 86 | 115 | <unordered_map> <unordered_set> <vector> |
| 87 | 116 | __cpp_lib_not_fn 201603L <functional> |
| 88 | 117 | __cpp_lib_null_iterators 201304L <iterator> |
| 89 | 118 | __cpp_lib_optional 201606L <optional> |
| 90 | 119 | __cpp_lib_parallel_algorithm 201603L <algorithm> <numeric> |
| 120 | __cpp_lib_polymorphic_allocator 201902L <memory> | |
| 91 | 121 | __cpp_lib_quoted_string_io 201304L <iomanip> |
| 92 | 122 | __cpp_lib_ranges 201811L <algorithm> <functional> <iterator> |
| 93 | 123 | <memory> <ranges> |
| 94 | 124 | __cpp_lib_raw_memory_algorithms 201606L <memory> |
| 125 | __cpp_lib_remove_cvref 201711L <type_traits> | |
| 95 | 126 | __cpp_lib_result_of_sfinae 201210L <functional> <type_traits> |
| 96 | 127 | __cpp_lib_robust_nonmodifying_seq_ops 201304L <algorithm> |
| 97 | 128 | __cpp_lib_sample 201603L <algorithm> |
| 98 | 129 | __cpp_lib_scoped_lock 201703L <mutex> |
| 130 | __cpp_lib_semaphore 201907L <semaphore> | |
| 99 | 131 | __cpp_lib_shared_mutex 201505L <shared_mutex> |
| 100 | 132 | __cpp_lib_shared_ptr_arrays 201611L <memory> |
| 101 | 133 | __cpp_lib_shared_ptr_weak_type 201606L <memory> |
| 102 | 134 | __cpp_lib_shared_timed_mutex 201402L <shared_mutex> |
| 135 | __cpp_lib_shift 201806L <algorithm> | |
| 136 | __cpp_lib_smart_ptr_for_overwrite 202002L <memory> | |
| 137 | __cpp_lib_source_location 201907L <source_location> | |
| 103 | 138 | __cpp_lib_span 202002L <span> |
| 139 | __cpp_lib_ssize 201902L <iterator> | |
| 140 | __cpp_lib_stacktrace 202011L <stacktrace> | |
| 141 | __cpp_lib_starts_ends_with 201711L <string> <string_view> | |
| 142 | __cpp_lib_stdatomic_h 202011L <stdatomic.h> | |
| 143 | __cpp_lib_string_contains 202011L <string> <string_view> | |
| 104 | 144 | __cpp_lib_string_udls 201304L <string> |
| 105 | __cpp_lib_string_view 201606L <string> <string_view> | |
| 106 | __cpp_lib_three_way_comparison 201711L <compare> | |
| 145 | __cpp_lib_string_view 201803L <string> <string_view> | |
| 146 | 201606L // C++17 | |
| 147 | __cpp_lib_syncbuf 201803L <syncstream> | |
| 148 | __cpp_lib_three_way_comparison 201907L <compare> | |
| 149 | __cpp_lib_to_address 201711L <memory> | |
| 107 | 150 | __cpp_lib_to_array 201907L <array> |
| 108 | 151 | __cpp_lib_to_chars 201611L <utility> |
| 109 | 152 | __cpp_lib_transformation_trait_aliases 201304L <type_traits> |
| 110 | __cpp_lib_transparent_operators 201510L <functional> | |
| 153 | __cpp_lib_transparent_operators 201510L <functional> <memory> | |
| 111 | 154 | 201210L // C++14 |
| 112 | 155 | __cpp_lib_tuple_element_t 201402L <tuple> |
| 113 | __cpp_lib_tuples_by_type 201304L <utility> <tuple> | |
| 156 | __cpp_lib_tuples_by_type 201304L <tuple> <utility> | |
| 114 | 157 | __cpp_lib_type_trait_variable_templates 201510L <type_traits> |
| 115 | 158 | __cpp_lib_uncaught_exceptions 201411L <exception> |
| 116 | 159 | __cpp_lib_unordered_map_try_emplace 201411L <unordered_map> |
| 160 | __cpp_lib_unwrap_ref 201811L <functional> | |
| 117 | 161 | __cpp_lib_variant 201606L <variant> |
| 118 | 162 | __cpp_lib_void_t 201411L <type_traits> |
| 119 | 163 | |
| ... | ... | @@ -200,7 +244,7 @@ __cpp_lib_void_t 201411L <type_traits> |
| 200 | 244 | # if !defined(_LIBCPP_HAS_NO_THREADS) |
| 201 | 245 | # define __cpp_lib_shared_mutex 201505L |
| 202 | 246 | # endif |
| 203 | // # define __cpp_lib_shared_ptr_arrays 201611L | |
| 247 | # define __cpp_lib_shared_ptr_arrays 201611L | |
| 204 | 248 | # define __cpp_lib_shared_ptr_weak_type 201606L |
| 205 | 249 | # define __cpp_lib_string_view 201606L |
| 206 | 250 | // # define __cpp_lib_to_chars 201611L |
| ... | ... | @@ -216,35 +260,105 @@ __cpp_lib_void_t 201411L <type_traits> |
| 216 | 260 | #if _LIBCPP_STD_VER > 17 |
| 217 | 261 | # undef __cpp_lib_array_constexpr |
| 218 | 262 | # define __cpp_lib_array_constexpr 201811L |
| 263 | // # define __cpp_lib_assume_aligned 201811L | |
| 264 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 265 | # define __cpp_lib_atomic_flag_test 201907L | |
| 266 | # endif | |
| 267 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 268 | // # define __cpp_lib_atomic_float 201711L | |
| 269 | # endif | |
| 270 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 271 | # define __cpp_lib_atomic_lock_free_type_aliases 201907L | |
| 272 | # endif | |
| 219 | 273 | # if !defined(_LIBCPP_HAS_NO_THREADS) |
| 220 | 274 | // # define __cpp_lib_atomic_ref 201806L |
| 221 | 275 | # endif |
| 222 | // # define __cpp_lib_bind_front 201811L | |
| 276 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 277 | // # define __cpp_lib_atomic_shared_ptr 201711L | |
| 278 | # endif | |
| 279 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 280 | // # define __cpp_lib_atomic_value_initialization 201911L | |
| 281 | # endif | |
| 282 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 283 | # define __cpp_lib_atomic_wait 201907L | |
| 284 | # endif | |
| 285 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 286 | # define __cpp_lib_barrier 201907L | |
| 287 | # endif | |
| 288 | // # define __cpp_lib_bind_front 201907L | |
| 223 | 289 | // # define __cpp_lib_bit_cast 201806L |
| 290 | // # define __cpp_lib_bitops 201907L | |
| 291 | # define __cpp_lib_bounded_array_traits 201902L | |
| 224 | 292 | # if !defined(_LIBCPP_NO_HAS_CHAR8_T) |
| 225 | 293 | # define __cpp_lib_char8_t 201811L |
| 226 | 294 | # endif |
| 227 | // # define __cpp_lib_concepts 201806L | |
| 228 | // # define __cpp_lib_constexpr_misc 201811L | |
| 229 | // # define __cpp_lib_constexpr_swap_algorithms 201806L | |
| 295 | // # define __cpp_lib_concepts 202002L | |
| 296 | // # define __cpp_lib_constexpr_algorithms 201806L | |
| 297 | // # define __cpp_lib_constexpr_complex 201711L | |
| 298 | # define __cpp_lib_constexpr_dynamic_alloc 201907L | |
| 299 | # define __cpp_lib_constexpr_functional 201907L | |
| 300 | // # define __cpp_lib_constexpr_iterator 201811L | |
| 301 | // # define __cpp_lib_constexpr_memory 201811L | |
| 302 | # define __cpp_lib_constexpr_numeric 201911L | |
| 303 | // # define __cpp_lib_constexpr_string 201907L | |
| 304 | // # define __cpp_lib_constexpr_string_view 201811L | |
| 305 | // # define __cpp_lib_constexpr_tuple 201811L | |
| 306 | # define __cpp_lib_constexpr_utility 201811L | |
| 307 | // # define __cpp_lib_constexpr_vector 201907L | |
| 308 | // # define __cpp_lib_coroutine 201902L | |
| 230 | 309 | # if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L |
| 231 | 310 | # define __cpp_lib_destroying_delete 201806L |
| 232 | 311 | # endif |
| 233 | 312 | # define __cpp_lib_endian 201907L |
| 234 | 313 | # define __cpp_lib_erase_if 202002L |
| 235 | // # define __cpp_lib_generic_unordered_lookup 201811L | |
| 314 | # undef __cpp_lib_execution | |
| 315 | // # define __cpp_lib_execution 201902L | |
| 316 | # define __cpp_lib_generic_unordered_lookup 201811L | |
| 317 | # define __cpp_lib_int_pow2 202002L | |
| 318 | // # define __cpp_lib_integer_comparison_functions 202002L | |
| 236 | 319 | # define __cpp_lib_interpolate 201902L |
| 237 | 320 | # if !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED) |
| 238 | 321 | # define __cpp_lib_is_constant_evaluated 201811L |
| 239 | 322 | # endif |
| 323 | // # define __cpp_lib_is_layout_compatible 201907L | |
| 324 | # define __cpp_lib_is_nothrow_convertible 201806L | |
| 325 | // # define __cpp_lib_is_pointer_interconvertible 201907L | |
| 326 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 327 | // # define __cpp_lib_jthread 201911L | |
| 328 | # endif | |
| 329 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 330 | # define __cpp_lib_latch 201907L | |
| 331 | # endif | |
| 240 | 332 | # define __cpp_lib_list_remove_return_type 201806L |
| 241 | 333 | # if defined(__cpp_concepts) && __cpp_concepts >= 201811L |
| 242 | 334 | # define __cpp_lib_math_constants 201907L |
| 243 | 335 | # endif |
| 336 | // # define __cpp_lib_polymorphic_allocator 201902L | |
| 244 | 337 | // # define __cpp_lib_ranges 201811L |
| 338 | # define __cpp_lib_remove_cvref 201711L | |
| 339 | # if !defined(_LIBCPP_HAS_NO_THREADS) | |
| 340 | # define __cpp_lib_semaphore 201907L | |
| 341 | # endif | |
| 342 | # define __cpp_lib_shift 201806L | |
| 343 | // # define __cpp_lib_smart_ptr_for_overwrite 202002L | |
| 344 | // # define __cpp_lib_source_location 201907L | |
| 245 | 345 | # define __cpp_lib_span 202002L |
| 246 | // # define __cpp_lib_three_way_comparison 201711L | |
| 346 | # define __cpp_lib_ssize 201902L | |
| 347 | # define __cpp_lib_starts_ends_with 201711L | |
| 348 | # undef __cpp_lib_string_view | |
| 349 | # define __cpp_lib_string_view 201803L | |
| 350 | // # define __cpp_lib_syncbuf 201803L | |
| 351 | // # define __cpp_lib_three_way_comparison 201907L | |
| 352 | # define __cpp_lib_to_address 201711L | |
| 247 | 353 | # define __cpp_lib_to_array 201907L |
| 354 | # define __cpp_lib_unwrap_ref 201811L | |
| 355 | #endif | |
| 356 | ||
| 357 | #if _LIBCPP_STD_VER > 20 | |
| 358 | # define __cpp_lib_is_scoped_enum 202011L | |
| 359 | // # define __cpp_lib_stacktrace 202011L | |
| 360 | // # define __cpp_lib_stdatomic_h 202011L | |
| 361 | # define __cpp_lib_string_contains 202011L | |
| 248 | 362 | #endif |
| 249 | 363 | |
| 250 | 364 | #endif // _LIBCPP_VERSIONH |
lib/libcxx/include/wctype.h+3-1| ... | ... | @@ -50,7 +50,9 @@ wctrans_t wctrans(const char* property); |
| 50 | 50 | #pragma GCC system_header |
| 51 | 51 | #endif |
| 52 | 52 | |
| 53 | #include_next <wctype.h> | |
| 53 | #if __has_include_next(<wctype.h>) | |
| 54 | # include_next <wctype.h> | |
| 55 | #endif | |
| 54 | 56 | |
| 55 | 57 | #ifdef __cplusplus |
| 56 | 58 |
lib/libcxx/src/atomic.cpp+6-2| ... | ... | @@ -13,14 +13,18 @@ |
| 13 | 13 | #include <atomic> |
| 14 | 14 | #include <functional> |
| 15 | 15 | |
| 16 | #include <iostream> | |
| 17 | ||
| 18 | 16 | #ifdef __linux__ |
| 19 | 17 | |
| 20 | 18 | #include <unistd.h> |
| 21 | 19 | #include <linux/futex.h> |
| 22 | 20 | #include <sys/syscall.h> |
| 23 | 21 | |
| 22 | // libc++ uses SYS_futex as a universal syscall name. However, on 32 bit architectures | |
| 23 | // with a 64 bit time_t, we need to specify SYS_futex_time64. | |
| 24 | #if !defined(SYS_futex) && defined(SYS_futex_time64) | |
| 25 | # define SYS_futex SYS_futex_time64 | |
| 26 | #endif | |
| 27 | ||
| 24 | 28 | #else // <- Add other operating systems here |
| 25 | 29 | |
| 26 | 30 | // Baseline needs no new headers |
lib/libcxx/src/barrier.cpp+3-9| ... | ... | @@ -26,21 +26,15 @@ public: |
| 26 | 26 | } __tickets[64]; |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | ptrdiff_t& __expected; | |
| 30 | unique_ptr<char[]> __state_allocation; | |
| 31 | __state_t* __state; | |
| 29 | ptrdiff_t& __expected; | |
| 30 | unique_ptr<__state_t[]> __state; | |
| 32 | 31 | |
| 33 | 32 | _LIBCPP_HIDDEN |
| 34 | 33 | __barrier_algorithm_base(ptrdiff_t& __expected) |
| 35 | 34 | : __expected(__expected) |
| 36 | 35 | { |
| 37 | 36 | size_t const __count = (__expected + 1) >> 1; |
| 38 | size_t const __size = sizeof(__state_t) * __count; | |
| 39 | size_t __allocation_size = __size + alignof(__state_t); | |
| 40 | __state_allocation = unique_ptr<char[]>(new char[__allocation_size]); | |
| 41 | void* __allocation = __state_allocation.get(); | |
| 42 | void* const __state_ = align(alignof(__state_t), __size, __allocation, __allocation_size); | |
| 43 | __state = new (__state_) __barrier_algorithm_base::__state_t[__count]; | |
| 37 | __state = unique_ptr<__state_t[]>(new __state_t[__count]); | |
| 44 | 38 | } |
| 45 | 39 | _LIBCPP_HIDDEN |
| 46 | 40 | bool __arrive(__barrier_phase_t __old_phase) |
lib/libcxx/src/chrono.cpp+113-42| ... | ... | @@ -13,11 +13,15 @@ |
| 13 | 13 | #include "include/apple_availability.h" |
| 14 | 14 | |
| 15 | 15 | #if __has_include(<unistd.h>) |
| 16 | #include <unistd.h> | |
| 16 | # include <unistd.h> | |
| 17 | #endif | |
| 18 | ||
| 19 | #if __has_include(<sys/time.h>) | |
| 20 | # include <sys/time.h> // for gettimeofday and timeval | |
| 17 | 21 | #endif |
| 18 | 22 | |
| 19 | 23 | #if !defined(__APPLE__) && _POSIX_TIMERS > 0 |
| 20 | #define _LIBCPP_USE_CLOCK_GETTIME | |
| 24 | # define _LIBCPP_USE_CLOCK_GETTIME | |
| 21 | 25 | #endif |
| 22 | 26 | |
| 23 | 27 | #if defined(_LIBCPP_WIN32API) |
| ... | ... | @@ -27,12 +31,12 @@ |
| 27 | 31 | # if _WIN32_WINNT >= _WIN32_WINNT_WIN8 |
| 28 | 32 | # include <winapifamily.h> |
| 29 | 33 | # endif |
| 30 | #else | |
| 31 | # if !defined(CLOCK_REALTIME) | |
| 32 | # include <sys/time.h> // for gettimeofday and timeval | |
| 33 | # endif // !defined(CLOCK_REALTIME) | |
| 34 | 34 | #endif // defined(_LIBCPP_WIN32API) |
| 35 | 35 | |
| 36 | #if __has_include(<mach/mach_time.h>) | |
| 37 | # include <mach/mach_time.h> | |
| 38 | #endif | |
| 39 | ||
| 36 | 40 | #if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB) |
| 37 | 41 | # pragma comment(lib, "rt") |
| 38 | 42 | #endif |
| ... | ... | @@ -42,14 +46,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD |
| 42 | 46 | namespace chrono |
| 43 | 47 | { |
| 44 | 48 | |
| 49 | // | |
| 45 | 50 | // system_clock |
| 51 | // | |
| 46 | 52 | |
| 47 | const bool system_clock::is_steady; | |
| 48 | ||
| 49 | system_clock::time_point | |
| 50 | system_clock::now() _NOEXCEPT | |
| 51 | { | |
| 52 | 53 | #if defined(_LIBCPP_WIN32API) |
| 54 | ||
| 55 | static system_clock::time_point __libcpp_system_clock_now() { | |
| 53 | 56 | // FILETIME is in 100ns units |
| 54 | 57 | using filetime_duration = |
| 55 | 58 | _VSTD::chrono::duration<__int64, |
| ... | ... | @@ -60,31 +63,42 @@ system_clock::now() _NOEXCEPT |
| 60 | 63 | static _LIBCPP_CONSTEXPR const seconds nt_to_unix_epoch{11644473600}; |
| 61 | 64 | |
| 62 | 65 | FILETIME ft; |
| 63 | #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 | |
| 64 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) | |
| 66 | #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) | |
| 65 | 67 | GetSystemTimePreciseAsFileTime(&ft); |
| 66 | #else | |
| 67 | GetSystemTimeAsFileTime(&ft); | |
| 68 | #endif | |
| 69 | 68 | #else |
| 70 | 69 | GetSystemTimeAsFileTime(&ft); |
| 71 | 70 | #endif |
| 72 | 71 | |
| 73 | 72 | filetime_duration d{(static_cast<__int64>(ft.dwHighDateTime) << 32) | |
| 74 | 73 | static_cast<__int64>(ft.dwLowDateTime)}; |
| 75 | return time_point(duration_cast<duration>(d - nt_to_unix_epoch)); | |
| 76 | #else | |
| 77 | #if defined(CLOCK_REALTIME) | |
| 74 | return system_clock::time_point(duration_cast<system_clock::duration>(d - nt_to_unix_epoch)); | |
| 75 | } | |
| 76 | ||
| 77 | #elif defined(CLOCK_REALTIME) && defined(_LIBCPP_USE_CLOCK_GETTIME) | |
| 78 | ||
| 79 | static system_clock::time_point __libcpp_system_clock_now() { | |
| 78 | 80 | struct timespec tp; |
| 79 | 81 | if (0 != clock_gettime(CLOCK_REALTIME, &tp)) |
| 80 | 82 | __throw_system_error(errno, "clock_gettime(CLOCK_REALTIME) failed"); |
| 81 | return time_point(seconds(tp.tv_sec) + microseconds(tp.tv_nsec / 1000)); | |
| 83 | return system_clock::time_point(seconds(tp.tv_sec) + microseconds(tp.tv_nsec / 1000)); | |
| 84 | } | |
| 85 | ||
| 82 | 86 | #else |
| 87 | ||
| 88 | static system_clock::time_point __libcpp_system_clock_now() { | |
| 83 | 89 | timeval tv; |
| 84 | 90 | gettimeofday(&tv, 0); |
| 85 | return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec)); | |
| 86 | #endif // CLOCK_REALTIME | |
| 91 | return system_clock::time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec)); | |
| 92 | } | |
| 93 | ||
| 87 | 94 | #endif |
| 95 | ||
| 96 | const bool system_clock::is_steady; | |
| 97 | ||
| 98 | system_clock::time_point | |
| 99 | system_clock::now() _NOEXCEPT | |
| 100 | { | |
| 101 | return __libcpp_system_clock_now(); | |
| 88 | 102 | } |
| 89 | 103 | |
| 90 | 104 | time_t |
| ... | ... | @@ -99,35 +113,85 @@ system_clock::from_time_t(time_t t) _NOEXCEPT |
| 99 | 113 | return system_clock::time_point(seconds(t)); |
| 100 | 114 | } |
| 101 | 115 | |
| 102 | #ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK | |
| 116 | // | |
| 103 | 117 | // steady_clock |
| 104 | 118 | // |
| 105 | 119 | // Warning: If this is not truly steady, then it is non-conforming. It is |
| 106 | 120 | // better for it to not exist and have the rest of libc++ use system_clock |
| 107 | 121 | // instead. |
| 122 | // | |
| 108 | 123 | |
| 109 | const bool steady_clock::is_steady; | |
| 124 | #ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK | |
| 110 | 125 | |
| 111 | 126 | #if defined(__APPLE__) |
| 112 | 127 | |
| 113 | #if !defined(CLOCK_MONOTONIC_RAW) | |
| 114 | # error "Building libc++ on Apple platforms requires CLOCK_MONOTONIC_RAW" | |
| 128 | // TODO(ldionne): | |
| 129 | // This old implementation of steady_clock is retained until Chrome drops supports | |
| 130 | // for macOS < 10.12. The issue is that they link libc++ statically into their | |
| 131 | // application, which means that libc++ must support being built for such deployment | |
| 132 | // targets. See https://llvm.org/D74489 for details. | |
| 133 | #if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \ | |
| 134 | (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \ | |
| 135 | (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \ | |
| 136 | (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000) | |
| 137 | # define _LIBCPP_USE_OLD_MACH_ABSOLUTE_TIME | |
| 115 | 138 | #endif |
| 116 | 139 | |
| 140 | #if defined(_LIBCPP_USE_OLD_MACH_ABSOLUTE_TIME) | |
| 141 | ||
| 142 | // mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of | |
| 143 | // nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom | |
| 144 | // are run time constants supplied by the OS. This clock has no relationship | |
| 145 | // to the Gregorian calendar. It's main use is as a high resolution timer. | |
| 146 | ||
| 147 | // MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize | |
| 148 | // for that case as an optimization. | |
| 149 | ||
| 150 | static steady_clock::rep steady_simplified() { | |
| 151 | return static_cast<steady_clock::rep>(mach_absolute_time()); | |
| 152 | } | |
| 153 | static double compute_steady_factor() { | |
| 154 | mach_timebase_info_data_t MachInfo; | |
| 155 | mach_timebase_info(&MachInfo); | |
| 156 | return static_cast<double>(MachInfo.numer) / MachInfo.denom; | |
| 157 | } | |
| 158 | ||
| 159 | static steady_clock::rep steady_full() { | |
| 160 | static const double factor = compute_steady_factor(); | |
| 161 | return static_cast<steady_clock::rep>(mach_absolute_time() * factor); | |
| 162 | } | |
| 163 | ||
| 164 | typedef steady_clock::rep (*FP)(); | |
| 165 | ||
| 166 | static FP init_steady_clock() { | |
| 167 | mach_timebase_info_data_t MachInfo; | |
| 168 | mach_timebase_info(&MachInfo); | |
| 169 | if (MachInfo.numer == MachInfo.denom) | |
| 170 | return &steady_simplified; | |
| 171 | return &steady_full; | |
| 172 | } | |
| 173 | ||
| 174 | static steady_clock::time_point __libcpp_steady_clock_now() { | |
| 175 | static FP fp = init_steady_clock(); | |
| 176 | return steady_clock::time_point(steady_clock::duration(fp())); | |
| 177 | } | |
| 178 | ||
| 179 | #else // vvvvv default behavior for Apple platforms vvvvv | |
| 180 | ||
| 117 | 181 | // On Apple platforms, only CLOCK_UPTIME_RAW, CLOCK_MONOTONIC_RAW or |
| 118 | 182 | // mach_absolute_time are able to time functions in the nanosecond range. |
| 119 | 183 | // Furthermore, only CLOCK_MONOTONIC_RAW is truly monotonic, because it |
| 120 | 184 | // also counts cycles when the system is asleep. Thus, it is the only |
| 121 | 185 | // acceptable implementation of steady_clock. |
| 122 | steady_clock::time_point | |
| 123 | steady_clock::now() _NOEXCEPT | |
| 124 | { | |
| 186 | static steady_clock::time_point __libcpp_steady_clock_now() { | |
| 125 | 187 | struct timespec tp; |
| 126 | 188 | if (0 != clock_gettime(CLOCK_MONOTONIC_RAW, &tp)) |
| 127 | 189 | __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC_RAW) failed"); |
| 128 | return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); | |
| 190 | return steady_clock::time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); | |
| 129 | 191 | } |
| 130 | 192 | |
| 193 | #endif | |
| 194 | ||
| 131 | 195 | #elif defined(_LIBCPP_WIN32API) |
| 132 | 196 | |
| 133 | 197 | // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx says: |
| ... | ... | @@ -138,36 +202,43 @@ steady_clock::now() _NOEXCEPT |
| 138 | 202 | static LARGE_INTEGER |
| 139 | 203 | __QueryPerformanceFrequency() |
| 140 | 204 | { |
| 141 | 	LARGE_INTEGER val; | |
| 142 | 	(void) QueryPerformanceFrequency(&val); | |
| 143 | 	return val; | |
| 205 | LARGE_INTEGER val; | |
| 206 | (void) QueryPerformanceFrequency(&val); | |
| 207 | return val; | |
| 144 | 208 | } |
| 145 | 209 | |
| 146 | steady_clock::time_point | |
| 147 | steady_clock::now() _NOEXCEPT | |
| 148 | { | |
| 210 | static steady_clock::time_point __libcpp_steady_clock_now() { | |
| 149 | 211 | static const LARGE_INTEGER freq = __QueryPerformanceFrequency(); |
| 150 | 212 | |
| 151 | 213 | LARGE_INTEGER counter; |
| 152 | 214 | (void) QueryPerformanceCounter(&counter); |
| 153 | return time_point(duration(counter.QuadPart * nano::den / freq.QuadPart)); | |
| 215 | auto seconds = counter.QuadPart / freq.QuadPart; | |
| 216 | auto fractions = counter.QuadPart % freq.QuadPart; | |
| 217 | auto dur = seconds * nano::den + fractions * nano::den / freq.QuadPart; | |
| 218 | return steady_clock::time_point(steady_clock::duration(dur)); | |
| 154 | 219 | } |
| 155 | 220 | |
| 156 | 221 | #elif defined(CLOCK_MONOTONIC) |
| 157 | 222 | |
| 158 | steady_clock::time_point | |
| 159 | steady_clock::now() _NOEXCEPT | |
| 160 | { | |
| 223 | static steady_clock::time_point __libcpp_steady_clock_now() { | |
| 161 | 224 | struct timespec tp; |
| 162 | 225 | if (0 != clock_gettime(CLOCK_MONOTONIC, &tp)) |
| 163 | 226 | __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC) failed"); |
| 164 | return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); | |
| 227 | return steady_clock::time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); | |
| 165 | 228 | } |
| 166 | 229 | |
| 167 | 230 | #else |
| 168 | # error "Monotonic clock not implemented" | |
| 231 | # error "Monotonic clock not implemented on this platform" | |
| 169 | 232 | #endif |
| 170 | 233 | |
| 234 | const bool steady_clock::is_steady; | |
| 235 | ||
| 236 | steady_clock::time_point | |
| 237 | steady_clock::now() _NOEXCEPT | |
| 238 | { | |
| 239 | return __libcpp_steady_clock_now(); | |
| 240 | } | |
| 241 | ||
| 171 | 242 | #endif // !_LIBCPP_HAS_NO_MONOTONIC_CLOCK |
| 172 | 243 | |
| 173 | 244 | } |
lib/libcxx/src/experimental/memory_resource.cpp-10| ... | ... | @@ -76,16 +76,6 @@ union ResourceInitHelper { |
| 76 | 76 | ~ResourceInitHelper() {} |
| 77 | 77 | }; |
| 78 | 78 | |
| 79 | // Detect if the init_priority attribute is supported. | |
| 80 | #if (defined(_LIBCPP_COMPILER_GCC) && defined(__APPLE__)) \ | |
| 81 | || defined(_LIBCPP_COMPILER_MSVC) | |
| 82 | // GCC on Apple doesn't support the init priority attribute, | |
| 83 | // and MSVC doesn't support any GCC attributes. | |
| 84 | # define _LIBCPP_INIT_PRIORITY_MAX | |
| 85 | #else | |
| 86 | # define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(101))) | |
| 87 | #endif | |
| 88 | ||
| 89 | 79 | // When compiled in C++14 this initialization should be a constant expression. |
| 90 | 80 | // Only in C++11 is "init_priority" needed to ensure initialization order. |
| 91 | 81 | #if _LIBCPP_STD_VER > 11 |
lib/libcxx/src/filesystem/directory_iterator.cpp+39-24| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | #include "__config" |
| 11 | 11 | #if defined(_LIBCPP_WIN32API) |
| 12 | 12 | #define WIN32_LEAN_AND_MEAN |
| 13 | #define NOMINMAX | |
| 13 | 14 | #include <windows.h> |
| 14 | 15 | #else |
| 15 | 16 | #include <dirent.h> |
| ... | ... | @@ -72,16 +73,20 @@ static pair<string_view, file_type> posix_readdir(DIR* dir_stream, |
| 72 | 73 | } |
| 73 | 74 | } |
| 74 | 75 | #else |
| 76 | // defined(_LIBCPP_WIN32API) | |
| 75 | 77 | |
| 76 | static file_type get_file_type(const WIN32_FIND_DATA& data) { | |
| 77 | //auto attrs = data.dwFileAttributes; | |
| 78 | // FIXME(EricWF) | |
| 79 | return file_type::unknown; | |
| 78 | static file_type get_file_type(const WIN32_FIND_DATAW& data) { | |
| 79 | if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && | |
| 80 | data.dwReserved0 == IO_REPARSE_TAG_SYMLINK) | |
| 81 | return file_type::symlink; | |
| 82 | if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) | |
| 83 | return file_type::directory; | |
| 84 | return file_type::regular; | |
| 80 | 85 | } |
| 81 | static uintmax_t get_file_size(const WIN32_FIND_DATA& data) { | |
| 82 | return (data.nFileSizeHigh * (MAXDWORD + 1)) + data.nFileSizeLow; | |
| 86 | static uintmax_t get_file_size(const WIN32_FIND_DATAW& data) { | |
| 87 | return (static_cast<uint64_t>(data.nFileSizeHigh) << 32) + data.nFileSizeLow; | |
| 83 | 88 | } |
| 84 | static file_time_type get_write_time(const WIN32_FIND_DATA& data) { | |
| 89 | static file_time_type get_write_time(const WIN32_FIND_DATAW& data) { | |
| 85 | 90 | ULARGE_INTEGER tmp; |
| 86 | 91 | const FILETIME& time = data.ftLastWriteTime; |
| 87 | 92 | tmp.u.LowPart = time.dwLowDateTime; |
| ... | ... | @@ -110,15 +115,21 @@ public: |
| 110 | 115 | |
| 111 | 116 | __dir_stream(const path& root, directory_options opts, error_code& ec) |
| 112 | 117 | : __stream_(INVALID_HANDLE_VALUE), __root_(root) { |
| 113 | __stream_ = ::FindFirstFile(root.c_str(), &__data_); | |
| 118 | if (root.native().empty()) { | |
| 119 | ec = make_error_code(errc::no_such_file_or_directory); | |
| 120 | return; | |
| 121 | } | |
| 122 | __stream_ = ::FindFirstFileW((root / "*").c_str(), &__data_); | |
| 114 | 123 | if (__stream_ == INVALID_HANDLE_VALUE) { |
| 115 | ec = error_code(::GetLastError(), generic_category()); | |
| 124 | ec = detail::make_windows_error(GetLastError()); | |
| 116 | 125 | const bool ignore_permission_denied = |
| 117 | 126 | bool(opts & directory_options::skip_permission_denied); |
| 118 | 127 | if (ignore_permission_denied && ec.value() == ERROR_ACCESS_DENIED) |
| 119 | 128 | ec.clear(); |
| 120 | 129 | return; |
| 121 | 130 | } |
| 131 | if (!assign()) | |
| 132 | advance(ec); | |
| 122 | 133 | } |
| 123 | 134 | |
| 124 | 135 | ~__dir_stream() noexcept { |
| ... | ... | @@ -130,35 +141,39 @@ public: |
| 130 | 141 | bool good() const noexcept { return __stream_ != INVALID_HANDLE_VALUE; } |
| 131 | 142 | |
| 132 | 143 | bool advance(error_code& ec) { |
| 133 | while (::FindNextFile(__stream_, &__data_)) { | |
| 134 | if (!strcmp(__data_.cFileName, ".") || strcmp(__data_.cFileName, "..")) | |
| 135 | continue; | |
| 136 | // FIXME: Cache more of this | |
| 137 | //directory_entry::__cached_data cdata; | |
| 138 | //cdata.__type_ = get_file_type(__data_); | |
| 139 | //cdata.__size_ = get_file_size(__data_); | |
| 140 | //cdata.__write_time_ = get_write_time(__data_); | |
| 141 | __entry_.__assign_iter_entry( | |
| 142 | __root_ / __data_.cFileName, | |
| 143 | directory_entry::__create_iter_result(detail::get_file_type(__data))); | |
| 144 | return true; | |
| 144 | while (::FindNextFileW(__stream_, &__data_)) { | |
| 145 | if (assign()) | |
| 146 | return true; | |
| 145 | 147 | } |
| 146 | ec = error_code(::GetLastError(), generic_category()); | |
| 147 | 148 | close(); |
| 148 | 149 | return false; |
| 149 | 150 | } |
| 150 | 151 | |
| 152 | bool assign() { | |
| 153 | if (!wcscmp(__data_.cFileName, L".") || !wcscmp(__data_.cFileName, L"..")) | |
| 154 | return false; | |
| 155 | // FIXME: Cache more of this | |
| 156 | //directory_entry::__cached_data cdata; | |
| 157 | //cdata.__type_ = get_file_type(__data_); | |
| 158 | //cdata.__size_ = get_file_size(__data_); | |
| 159 | //cdata.__write_time_ = get_write_time(__data_); | |
| 160 | __entry_.__assign_iter_entry( | |
| 161 | __root_ / __data_.cFileName, | |
| 162 | directory_entry::__create_iter_result(detail::get_file_type(__data_))); | |
| 163 | return true; | |
| 164 | } | |
| 165 | ||
| 151 | 166 | private: |
| 152 | 167 | error_code close() noexcept { |
| 153 | 168 | error_code ec; |
| 154 | 169 | if (!::FindClose(__stream_)) |
| 155 | ec = error_code(::GetLastError(), generic_category()); | |
| 170 | ec = detail::make_windows_error(GetLastError()); | |
| 156 | 171 | __stream_ = INVALID_HANDLE_VALUE; |
| 157 | 172 | return ec; |
| 158 | 173 | } |
| 159 | 174 | |
| 160 | 175 | HANDLE __stream_{INVALID_HANDLE_VALUE}; |
| 161 | WIN32_FIND_DATA __data_; | |
| 176 | WIN32_FIND_DATAW __data_; | |
| 162 | 177 | |
| 163 | 178 | public: |
| 164 | 179 | path __root_; |
lib/libcxx/src/filesystem/filesystem_common.h+87-47| ... | ... | @@ -13,14 +13,17 @@ |
| 13 | 13 | #include "filesystem" |
| 14 | 14 | #include "array" |
| 15 | 15 | #include "chrono" |
| 16 | #include "cstdlib" | |
| 17 | 16 | #include "climits" |
| 18 | ||
| 19 | #include <unistd.h> | |
| 20 | #include <sys/stat.h> | |
| 21 | #include <sys/statvfs.h> | |
| 22 | #include <sys/time.h> // for ::utimes as used in __last_write_time | |
| 23 | #include <fcntl.h> /* values for fchmodat */ | |
| 17 | #include "cstdlib" | |
| 18 | #include "ctime" | |
| 19 | ||
| 20 | #if !defined(_LIBCPP_WIN32API) | |
| 21 | # include <unistd.h> | |
| 22 | # include <sys/stat.h> | |
| 23 | # include <sys/statvfs.h> | |
| 24 | # include <sys/time.h> // for ::utimes as used in __last_write_time | |
| 25 | # include <fcntl.h> /* values for fchmodat */ | |
| 26 | #endif | |
| 24 | 27 | |
| 25 | 28 | #include "../include/apple_availability.h" |
| 26 | 29 | |
| ... | ... | @@ -37,9 +40,21 @@ |
| 37 | 40 | #pragma GCC diagnostic ignored "-Wunused-function" |
| 38 | 41 | #endif |
| 39 | 42 | |
| 43 | #if defined(_LIBCPP_WIN32API) | |
| 44 | #define PS(x) (L##x) | |
| 45 | #else | |
| 46 | #define PS(x) (x) | |
| 47 | #endif | |
| 48 | ||
| 40 | 49 | _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM |
| 41 | 50 | |
| 42 | 51 | namespace detail { |
| 52 | ||
| 53 | #if defined(_LIBCPP_WIN32API) | |
| 54 | // Non anonymous, to allow access from two translation units. | |
| 55 | errc __win_err_to_errc(int err); | |
| 56 | #endif | |
| 57 | ||
| 43 | 58 | namespace { |
| 44 | 59 | |
| 45 | 60 | static string format_string_imp(const char* msg, ...) { |
| ... | ... | @@ -47,7 +62,7 @@ static string format_string_imp(const char* msg, ...) { |
| 47 | 62 | struct GuardVAList { |
| 48 | 63 | va_list& target; |
| 49 | 64 | bool active = true; |
| 50 | GuardVAList(va_list& target) : target(target), active(true) {} | |
| 65 | GuardVAList(va_list& tgt) : target(tgt), active(true) {} | |
| 51 | 66 | void clear() { |
| 52 | 67 | if (active) |
| 53 | 68 | va_end(target); |
| ... | ... | @@ -93,8 +108,8 @@ static string format_string_imp(const char* msg, ...) { |
| 93 | 108 | return result; |
| 94 | 109 | } |
| 95 | 110 | |
| 96 | const char* unwrap(string const& s) { return s.c_str(); } | |
| 97 | const char* unwrap(path const& p) { return p.native().c_str(); } | |
| 111 | const path::value_type* unwrap(path::string_type const& s) { return s.c_str(); } | |
| 112 | const path::value_type* unwrap(path const& p) { return p.native().c_str(); } | |
| 98 | 113 | template <class Arg> |
| 99 | 114 | Arg const& unwrap(Arg const& a) { |
| 100 | 115 | static_assert(!is_class<Arg>::value, "cannot pass class here"); |
| ... | ... | @@ -111,6 +126,12 @@ error_code capture_errno() { |
| 111 | 126 | return error_code(errno, generic_category()); |
| 112 | 127 | } |
| 113 | 128 | |
| 129 | #if defined(_LIBCPP_WIN32API) | |
| 130 | error_code make_windows_error(int err) { | |
| 131 | return make_error_code(__win_err_to_errc(err)); | |
| 132 | } | |
| 133 | #endif | |
| 134 | ||
| 114 | 135 | template <class T> |
| 115 | 136 | T error_value(); |
| 116 | 137 | template <> |
| ... | ... | @@ -119,6 +140,12 @@ template <> |
| 119 | 140 | bool error_value<bool>() { |
| 120 | 141 | return false; |
| 121 | 142 | } |
| 143 | #if __SIZEOF_SIZE_T__ != __SIZEOF_LONG_LONG__ | |
| 144 | template <> | |
| 145 | size_t error_value<size_t>() { | |
| 146 | return size_t(-1); | |
| 147 | } | |
| 148 | #endif | |
| 122 | 149 | template <> |
| 123 | 150 | uintmax_t error_value<uintmax_t>() { |
| 124 | 151 | return uintmax_t(-1); |
| ... | ... | @@ -134,50 +161,50 @@ path error_value<path>() { |
| 134 | 161 | |
| 135 | 162 | template <class T> |
| 136 | 163 | struct ErrorHandler { |
| 137 | const char* func_name; | |
| 138 | error_code* ec = nullptr; | |
| 139 | const path* p1 = nullptr; | |
| 140 | const path* p2 = nullptr; | |
| 164 | const char* func_name_; | |
| 165 | error_code* ec_ = nullptr; | |
| 166 | const path* p1_ = nullptr; | |
| 167 | const path* p2_ = nullptr; | |
| 141 | 168 | |
| 142 | 169 | ErrorHandler(const char* fname, error_code* ec, const path* p1 = nullptr, |
| 143 | 170 | const path* p2 = nullptr) |
| 144 | : func_name(fname), ec(ec), p1(p1), p2(p2) { | |
| 145 | if (ec) | |
| 146 | ec->clear(); | |
| 171 | : func_name_(fname), ec_(ec), p1_(p1), p2_(p2) { | |
| 172 | if (ec_) | |
| 173 | ec_->clear(); | |
| 147 | 174 | } |
| 148 | 175 | |
| 149 | T report(const error_code& m_ec) const { | |
| 150 | if (ec) { | |
| 151 | *ec = m_ec; | |
| 176 | T report(const error_code& ec) const { | |
| 177 | if (ec_) { | |
| 178 | *ec_ = ec; | |
| 152 | 179 | return error_value<T>(); |
| 153 | 180 | } |
| 154 | string what = string("in ") + func_name; | |
| 155 | switch (bool(p1) + bool(p2)) { | |
| 181 | string what = string("in ") + func_name_; | |
| 182 | switch (bool(p1_) + bool(p2_)) { | |
| 156 | 183 | case 0: |
| 157 | __throw_filesystem_error(what, m_ec); | |
| 184 | __throw_filesystem_error(what, ec); | |
| 158 | 185 | case 1: |
| 159 | __throw_filesystem_error(what, *p1, m_ec); | |
| 186 | __throw_filesystem_error(what, *p1_, ec); | |
| 160 | 187 | case 2: |
| 161 | __throw_filesystem_error(what, *p1, *p2, m_ec); | |
| 188 | __throw_filesystem_error(what, *p1_, *p2_, ec); | |
| 162 | 189 | } |
| 163 | 190 | _LIBCPP_UNREACHABLE(); |
| 164 | 191 | } |
| 165 | 192 | |
| 166 | 193 | template <class... Args> |
| 167 | T report(const error_code& m_ec, const char* msg, Args const&... args) const { | |
| 168 | if (ec) { | |
| 169 | *ec = m_ec; | |
| 194 | T report(const error_code& ec, const char* msg, Args const&... args) const { | |
| 195 | if (ec_) { | |
| 196 | *ec_ = ec; | |
| 170 | 197 | return error_value<T>(); |
| 171 | 198 | } |
| 172 | 199 | string what = |
| 173 | string("in ") + func_name + ": " + format_string(msg, args...); | |
| 174 | switch (bool(p1) + bool(p2)) { | |
| 200 | string("in ") + func_name_ + ": " + format_string(msg, args...); | |
| 201 | switch (bool(p1_) + bool(p2_)) { | |
| 175 | 202 | case 0: |
| 176 | __throw_filesystem_error(what, m_ec); | |
| 203 | __throw_filesystem_error(what, ec); | |
| 177 | 204 | case 1: |
| 178 | __throw_filesystem_error(what, *p1, m_ec); | |
| 205 | __throw_filesystem_error(what, *p1_, ec); | |
| 179 | 206 | case 2: |
| 180 | __throw_filesystem_error(what, *p1, *p2, m_ec); | |
| 207 | __throw_filesystem_error(what, *p1_, *p2_, ec); | |
| 181 | 208 | } |
| 182 | 209 | _LIBCPP_UNREACHABLE(); |
| 183 | 210 | } |
| ... | ... | @@ -197,8 +224,9 @@ private: |
| 197 | 224 | using chrono::duration; |
| 198 | 225 | using chrono::duration_cast; |
| 199 | 226 | |
| 200 | using TimeSpec = struct ::timespec; | |
| 201 | using StatT = struct ::stat; | |
| 227 | using TimeSpec = struct timespec; | |
| 228 | using TimeVal = struct timeval; | |
| 229 | using StatT = struct stat; | |
| 202 | 230 | |
| 203 | 231 | template <class FileTimeT, class TimeT, |
| 204 | 232 | bool IsFloat = is_floating_point<typename FileTimeT::rep>::value> |
| ... | ... | @@ -380,26 +408,38 @@ public: |
| 380 | 408 | using fs_time = time_util<file_time_type, time_t, TimeSpec>; |
| 381 | 409 | |
| 382 | 410 | #if defined(__APPLE__) |
| 383 | TimeSpec extract_mtime(StatT const& st) { return st.st_mtimespec; } | |
| 384 | TimeSpec extract_atime(StatT const& st) { return st.st_atimespec; } | |
| 411 | inline TimeSpec extract_mtime(StatT const& st) { return st.st_mtimespec; } | |
| 412 | inline TimeSpec extract_atime(StatT const& st) { return st.st_atimespec; } | |
| 413 | #elif defined(__MVS__) | |
| 414 | inline TimeSpec extract_mtime(StatT const& st) { | |
| 415 | TimeSpec TS = {st.st_mtime, 0}; | |
| 416 | return TS; | |
| 417 | } | |
| 418 | inline TimeSpec extract_atime(StatT const& st) { | |
| 419 | TimeSpec TS = {st.st_atime, 0}; | |
| 420 | return TS; | |
| 421 | } | |
| 385 | 422 | #else |
| 386 | TimeSpec extract_mtime(StatT const& st) { return st.st_mtim; } | |
| 387 | TimeSpec extract_atime(StatT const& st) { return st.st_atim; } | |
| 423 | inline TimeSpec extract_mtime(StatT const& st) { return st.st_mtim; } | |
| 424 | inline TimeSpec extract_atime(StatT const& st) { return st.st_atim; } | |
| 388 | 425 | #endif |
| 389 | 426 | |
| 390 | // allow the utimes implementation to compile even it we're not going | |
| 391 | // to use it. | |
| 392 | ||
| 393 | bool posix_utimes(const path& p, std::array<TimeSpec, 2> const& TS, | |
| 394 | error_code& ec) { | |
| 427 | inline TimeVal make_timeval(TimeSpec const& ts) { | |
| 395 | 428 | using namespace chrono; |
| 396 | 429 | auto Convert = [](long nsec) { |
| 397 | using int_type = decltype(std::declval< ::timeval>().tv_usec); | |
| 430 | using int_type = decltype(std::declval<TimeVal>().tv_usec); | |
| 398 | 431 | auto dur = duration_cast<microseconds>(nanoseconds(nsec)).count(); |
| 399 | 432 | return static_cast<int_type>(dur); |
| 400 | 433 | }; |
| 401 | struct ::timeval ConvertedTS[2] = {{TS[0].tv_sec, Convert(TS[0].tv_nsec)}, | |
| 402 | {TS[1].tv_sec, Convert(TS[1].tv_nsec)}}; | |
| 434 | TimeVal TV = {}; | |
| 435 | TV.tv_sec = ts.tv_sec; | |
| 436 | TV.tv_usec = Convert(ts.tv_nsec); | |
| 437 | return TV; | |
| 438 | } | |
| 439 | ||
| 440 | inline bool posix_utimes(const path& p, std::array<TimeSpec, 2> const& TS, | |
| 441 | error_code& ec) { | |
| 442 | TimeVal ConvertedTS[2] = {make_timeval(TS[0]), make_timeval(TS[1])}; | |
| 403 | 443 | if (::utimes(p.c_str(), ConvertedTS) == -1) { |
| 404 | 444 | ec = capture_errno(); |
| 405 | 445 | return true; |
lib/libcxx/src/filesystem/operations.cpp+263-135| ... | ... | @@ -9,8 +9,6 @@ |
| 9 | 9 | #include "filesystem" |
| 10 | 10 | #include "array" |
| 11 | 11 | #include "iterator" |
| 12 | #include "fstream" | |
| 13 | #include "random" /* for unique_path */ | |
| 14 | 12 | #include "string_view" |
| 15 | 13 | #include "type_traits" |
| 16 | 14 | #include "vector" |
| ... | ... | @@ -19,40 +17,51 @@ |
| 19 | 17 | |
| 20 | 18 | #include "filesystem_common.h" |
| 21 | 19 | |
| 22 | #include <unistd.h> | |
| 23 | #include <sys/stat.h> | |
| 24 | #include <sys/statvfs.h> | |
| 20 | #if defined(_LIBCPP_WIN32API) | |
| 21 | # define WIN32_LEAN_AND_MEAN | |
| 22 | # define NOMINMAX | |
| 23 | # include <windows.h> | |
| 24 | #else | |
| 25 | # include <unistd.h> | |
| 26 | # include <sys/stat.h> | |
| 27 | # include <sys/statvfs.h> | |
| 28 | #endif | |
| 25 | 29 | #include <time.h> |
| 26 | 30 | #include <fcntl.h> /* values for fchmodat */ |
| 27 | 31 | |
| 28 | #if defined(__linux__) | |
| 29 | #include <linux/version.h> | |
| 30 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) | |
| 31 | #include <sys/sendfile.h> | |
| 32 | #define _LIBCPP_USE_SENDFILE | |
| 33 | #endif | |
| 32 | #if __has_include(<sys/sendfile.h>) | |
| 33 | # include <sys/sendfile.h> | |
| 34 | # define _LIBCPP_FILESYSTEM_USE_SENDFILE | |
| 34 | 35 | #elif defined(__APPLE__) || __has_include(<copyfile.h>) |
| 35 | #include <copyfile.h> | |
| 36 | #define _LIBCPP_USE_COPYFILE | |
| 36 | # include <copyfile.h> | |
| 37 | # define _LIBCPP_FILESYSTEM_USE_COPYFILE | |
| 38 | #else | |
| 39 | # include "fstream" | |
| 40 | # define _LIBCPP_FILESYSTEM_USE_FSTREAM | |
| 37 | 41 | #endif |
| 38 | 42 | |
| 39 | 43 | #if !defined(CLOCK_REALTIME) |
| 40 | #include <sys/time.h> // for gettimeofday and timeval | |
| 41 | #endif // !defined(CLOCK_REALTIME) | |
| 42 | ||
| 43 | #if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB) | |
| 44 | #pragma comment(lib, "rt") | |
| 44 | # include <sys/time.h> // for gettimeofday and timeval | |
| 45 | 45 | #endif |
| 46 | 46 | |
| 47 | #if defined(_LIBCPP_COMPILER_GCC) | |
| 48 | #if _GNUC_VER < 500 | |
| 49 | #pragma GCC diagnostic ignored "-Wmissing-field-initializers" | |
| 50 | #endif | |
| 47 | #if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB) | |
| 48 | # pragma comment(lib, "rt") | |
| 51 | 49 | #endif |
| 52 | 50 | |
| 53 | 51 | _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM |
| 54 | 52 | |
| 55 | 53 | namespace { |
| 54 | ||
| 55 | bool isSeparator(path::value_type C) { | |
| 56 | if (C == '/') | |
| 57 | return true; | |
| 58 | #if defined(_LIBCPP_WIN32API) | |
| 59 | if (C == '\\') | |
| 60 | return true; | |
| 61 | #endif | |
| 62 | return false; | |
| 63 | } | |
| 64 | ||
| 56 | 65 | namespace parser { |
| 57 | 66 | |
| 58 | 67 | using string_view_t = path::__string_view; |
| ... | ... | @@ -179,11 +188,14 @@ public: |
| 179 | 188 | switch (State) { |
| 180 | 189 | case PS_BeforeBegin: |
| 181 | 190 | case PS_AtEnd: |
| 182 | return ""; | |
| 191 | return PS(""); | |
| 183 | 192 | case PS_InRootDir: |
| 184 | return "/"; | |
| 193 | if (RawEntry[0] == '\\') | |
| 194 | return PS("\\"); | |
| 195 | else | |
| 196 | return PS("/"); | |
| 185 | 197 | case PS_InTrailingSep: |
| 186 | return ""; | |
| 198 | return PS(""); | |
| 187 | 199 | case PS_InRootName: |
| 188 | 200 | case PS_InFilenames: |
| 189 | 201 | return RawEntry; |
| ... | ... | @@ -270,29 +282,29 @@ private: |
| 270 | 282 | } |
| 271 | 283 | |
| 272 | 284 | PosPtr consumeSeparator(PosPtr P, PosPtr End) const noexcept { |
| 273 | if (P == End || *P != '/') | |
| 285 | if (P == End || !isSeparator(*P)) | |
| 274 | 286 | return nullptr; |
| 275 | 287 | const int Inc = P < End ? 1 : -1; |
| 276 | 288 | P += Inc; |
| 277 | while (P != End && *P == '/') | |
| 289 | while (P != End && isSeparator(*P)) | |
| 278 | 290 | P += Inc; |
| 279 | 291 | return P; |
| 280 | 292 | } |
| 281 | 293 | |
| 282 | 294 | PosPtr consumeName(PosPtr P, PosPtr End) const noexcept { |
| 283 | if (P == End || *P == '/') | |
| 295 | if (P == End || isSeparator(*P)) | |
| 284 | 296 | return nullptr; |
| 285 | 297 | const int Inc = P < End ? 1 : -1; |
| 286 | 298 | P += Inc; |
| 287 | while (P != End && *P != '/') | |
| 299 | while (P != End && !isSeparator(*P)) | |
| 288 | 300 | P += Inc; |
| 289 | 301 | return P; |
| 290 | 302 | } |
| 291 | 303 | }; |
| 292 | 304 | |
| 293 | 305 | string_view_pair separate_filename(string_view_t const& s) { |
| 294 | if (s == "." || s == ".." || s.empty()) | |
| 295 | return string_view_pair{s, ""}; | |
| 306 | if (s == PS(".") || s == PS("..") || s.empty()) | |
| 307 | return string_view_pair{s, PS("")}; | |
| 296 | 308 | auto pos = s.find_last_of('.'); |
| 297 | 309 | if (pos == string_view_t::npos || pos == 0) |
| 298 | 310 | return string_view_pair{s, string_view_t{}}; |
| ... | ... | @@ -308,6 +320,73 @@ string_view_t createView(PosPtr S, PosPtr E) noexcept { |
| 308 | 320 | |
| 309 | 321 | // POSIX HELPERS |
| 310 | 322 | |
| 323 | #if defined(_LIBCPP_WIN32API) | |
| 324 | namespace detail { | |
| 325 | ||
| 326 | errc __win_err_to_errc(int err) { | |
| 327 | constexpr struct { | |
| 328 | DWORD win; | |
| 329 | errc errc; | |
| 330 | } win_error_mapping[] = { | |
| 331 | {ERROR_ACCESS_DENIED, errc::permission_denied}, | |
| 332 | {ERROR_ALREADY_EXISTS, errc::file_exists}, | |
| 333 | {ERROR_BAD_NETPATH, errc::no_such_file_or_directory}, | |
| 334 | {ERROR_BAD_UNIT, errc::no_such_device}, | |
| 335 | {ERROR_BROKEN_PIPE, errc::broken_pipe}, | |
| 336 | {ERROR_BUFFER_OVERFLOW, errc::filename_too_long}, | |
| 337 | {ERROR_BUSY, errc::device_or_resource_busy}, | |
| 338 | {ERROR_BUSY_DRIVE, errc::device_or_resource_busy}, | |
| 339 | {ERROR_CANNOT_MAKE, errc::permission_denied}, | |
| 340 | {ERROR_CANTOPEN, errc::io_error}, | |
| 341 | {ERROR_CANTREAD, errc::io_error}, | |
| 342 | {ERROR_CANTWRITE, errc::io_error}, | |
| 343 | {ERROR_CURRENT_DIRECTORY, errc::permission_denied}, | |
| 344 | {ERROR_DEV_NOT_EXIST, errc::no_such_device}, | |
| 345 | {ERROR_DEVICE_IN_USE, errc::device_or_resource_busy}, | |
| 346 | {ERROR_DIR_NOT_EMPTY, errc::directory_not_empty}, | |
| 347 | {ERROR_DIRECTORY, errc::invalid_argument}, | |
| 348 | {ERROR_DISK_FULL, errc::no_space_on_device}, | |
| 349 | {ERROR_FILE_EXISTS, errc::file_exists}, | |
| 350 | {ERROR_FILE_NOT_FOUND, errc::no_such_file_or_directory}, | |
| 351 | {ERROR_HANDLE_DISK_FULL, errc::no_space_on_device}, | |
| 352 | {ERROR_INVALID_ACCESS, errc::permission_denied}, | |
| 353 | {ERROR_INVALID_DRIVE, errc::no_such_device}, | |
| 354 | {ERROR_INVALID_FUNCTION, errc::function_not_supported}, | |
| 355 | {ERROR_INVALID_HANDLE, errc::invalid_argument}, | |
| 356 | {ERROR_INVALID_NAME, errc::no_such_file_or_directory}, | |
| 357 | {ERROR_INVALID_PARAMETER, errc::invalid_argument}, | |
| 358 | {ERROR_LOCK_VIOLATION, errc::no_lock_available}, | |
| 359 | {ERROR_LOCKED, errc::no_lock_available}, | |
| 360 | {ERROR_NEGATIVE_SEEK, errc::invalid_argument}, | |
| 361 | {ERROR_NOACCESS, errc::permission_denied}, | |
| 362 | {ERROR_NOT_ENOUGH_MEMORY, errc::not_enough_memory}, | |
| 363 | {ERROR_NOT_READY, errc::resource_unavailable_try_again}, | |
| 364 | {ERROR_NOT_SAME_DEVICE, errc::cross_device_link}, | |
| 365 | {ERROR_NOT_SUPPORTED, errc::not_supported}, | |
| 366 | {ERROR_OPEN_FAILED, errc::io_error}, | |
| 367 | {ERROR_OPEN_FILES, errc::device_or_resource_busy}, | |
| 368 | {ERROR_OPERATION_ABORTED, errc::operation_canceled}, | |
| 369 | {ERROR_OUTOFMEMORY, errc::not_enough_memory}, | |
| 370 | {ERROR_PATH_NOT_FOUND, errc::no_such_file_or_directory}, | |
| 371 | {ERROR_READ_FAULT, errc::io_error}, | |
| 372 | {ERROR_REPARSE_TAG_INVALID, errc::invalid_argument}, | |
| 373 | {ERROR_RETRY, errc::resource_unavailable_try_again}, | |
| 374 | {ERROR_SEEK, errc::io_error}, | |
| 375 | {ERROR_SHARING_VIOLATION, errc::permission_denied}, | |
| 376 | {ERROR_TOO_MANY_OPEN_FILES, errc::too_many_files_open}, | |
| 377 | {ERROR_WRITE_FAULT, errc::io_error}, | |
| 378 | {ERROR_WRITE_PROTECT, errc::permission_denied}, | |
| 379 | }; | |
| 380 | ||
| 381 | for (const auto &pair : win_error_mapping) | |
| 382 | if (pair.win == static_cast<DWORD>(err)) | |
| 383 | return pair.errc; | |
| 384 | return errc::invalid_argument; | |
| 385 | } | |
| 386 | ||
| 387 | } // namespace detail | |
| 388 | #endif | |
| 389 | ||
| 311 | 390 | namespace detail { |
| 312 | 391 | namespace { |
| 313 | 392 | |
| ... | ... | @@ -503,19 +582,25 @@ _FilesystemClock::time_point _FilesystemClock::now() noexcept { |
| 503 | 582 | |
| 504 | 583 | filesystem_error::~filesystem_error() {} |
| 505 | 584 | |
| 585 | #if defined(_LIBCPP_WIN32API) | |
| 586 | #define PS_FMT "%ls" | |
| 587 | #else | |
| 588 | #define PS_FMT "%s" | |
| 589 | #endif | |
| 590 | ||
| 506 | 591 | void filesystem_error::__create_what(int __num_paths) { |
| 507 | 592 | const char* derived_what = system_error::what(); |
| 508 | 593 | __storage_->__what_ = [&]() -> string { |
| 509 | const char* p1 = path1().native().empty() ? "\"\"" : path1().c_str(); | |
| 510 | const char* p2 = path2().native().empty() ? "\"\"" : path2().c_str(); | |
| 594 | const path::value_type* p1 = path1().native().empty() ? PS("\"\"") : path1().c_str(); | |
| 595 | const path::value_type* p2 = path2().native().empty() ? PS("\"\"") : path2().c_str(); | |
| 511 | 596 | switch (__num_paths) { |
| 512 | 597 | default: |
| 513 | 598 | return detail::format_string("filesystem error: %s", derived_what); |
| 514 | 599 | case 1: |
| 515 | return detail::format_string("filesystem error: %s [%s]", derived_what, | |
| 600 | return detail::format_string("filesystem error: %s [" PS_FMT "]", derived_what, | |
| 516 | 601 | p1); |
| 517 | 602 | case 2: |
| 518 | return detail::format_string("filesystem error: %s [%s] [%s]", | |
| 603 | return detail::format_string("filesystem error: %s [" PS_FMT "] [" PS_FMT "]", | |
| 519 | 604 | derived_what, p1, p2); |
| 520 | 605 | } |
| 521 | 606 | }(); |
| ... | ... | @@ -542,14 +627,18 @@ path __canonical(path const& orig_p, error_code* ec) { |
| 542 | 627 | ErrorHandler<path> err("canonical", ec, &orig_p, &cwd); |
| 543 | 628 | |
| 544 | 629 | path p = __do_absolute(orig_p, &cwd, ec); |
| 545 | #if _POSIX_VERSION >= 200112 | |
| 630 | #if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112 | |
| 546 | 631 | std::unique_ptr<char, decltype(&::free)> |
| 547 | 632 | hold(::realpath(p.c_str(), nullptr), &::free); |
| 548 | 633 | if (hold.get() == nullptr) |
| 549 | 634 | return err.report(capture_errno()); |
| 550 | 635 | return {hold.get()}; |
| 551 | 636 | #else |
| 552 | char buff[PATH_MAX + 1]; | |
| 637 | #if defined(__MVS__) && !defined(PATH_MAX) | |
| 638 | char buff[ _XOPEN_PATH_MAX + 1 ]; | |
| 639 | #else | |
| 640 | char buff[PATH_MAX + 1]; | |
| 641 | #endif | |
| 553 | 642 | char* ret; |
| 554 | 643 | if ((ret = ::realpath(p.c_str(), buff)) == nullptr) |
| 555 | 644 | return err.report(capture_errno()); |
| ... | ... | @@ -646,96 +735,83 @@ void __copy(const path& from, const path& to, copy_options options, |
| 646 | 735 | namespace detail { |
| 647 | 736 | namespace { |
| 648 | 737 | |
| 649 | #ifdef _LIBCPP_USE_SENDFILE | |
| 650 | bool copy_file_impl_sendfile(FileDescriptor& read_fd, FileDescriptor& write_fd, | |
| 651 | error_code& ec) { | |
| 652 | ||
| 653 | size_t count = read_fd.get_stat().st_size; | |
| 654 | do { | |
| 655 | ssize_t res; | |
| 656 | if ((res = ::sendfile(write_fd.fd, read_fd.fd, nullptr, count)) == -1) { | |
| 657 | ec = capture_errno(); | |
| 658 | return false; | |
| 659 | } | |
| 660 | count -= res; | |
| 661 | } while (count > 0); | |
| 662 | ||
| 663 | ec.clear(); | |
| 738 | #if defined(_LIBCPP_FILESYSTEM_USE_SENDFILE) | |
| 739 | bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) { | |
| 740 | size_t count = read_fd.get_stat().st_size; | |
| 741 | do { | |
| 742 | ssize_t res; | |
| 743 | if ((res = ::sendfile(write_fd.fd, read_fd.fd, nullptr, count)) == -1) { | |
| 744 | ec = capture_errno(); | |
| 745 | return false; | |
| 746 | } | |
| 747 | count -= res; | |
| 748 | } while (count > 0); | |
| 664 | 749 | |
| 665 | return true; | |
| 666 | } | |
| 667 | #elif defined(_LIBCPP_USE_COPYFILE) | |
| 668 | bool copy_file_impl_copyfile(FileDescriptor& read_fd, FileDescriptor& write_fd, | |
| 669 | error_code& ec) { | |
| 670 | struct CopyFileState { | |
| 671 | copyfile_state_t state; | |
| 672 | CopyFileState() { state = copyfile_state_alloc(); } | |
| 673 | ~CopyFileState() { copyfile_state_free(state); } | |
| 674 | ||
| 675 | private: | |
| 676 | CopyFileState(CopyFileState const&) = delete; | |
| 677 | CopyFileState& operator=(CopyFileState const&) = delete; | |
| 678 | }; | |
| 750 | ec.clear(); | |
| 679 | 751 | |
| 680 | CopyFileState cfs; | |
| 681 | if (fcopyfile(read_fd.fd, write_fd.fd, cfs.state, COPYFILE_DATA) < 0) { | |
| 682 | ec = capture_errno(); | |
| 683 | return false; | |
| 752 | return true; | |
| 684 | 753 | } |
| 754 | #elif defined(_LIBCPP_FILESYSTEM_USE_COPYFILE) | |
| 755 | bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) { | |
| 756 | struct CopyFileState { | |
| 757 | copyfile_state_t state; | |
| 758 | CopyFileState() { state = copyfile_state_alloc(); } | |
| 759 | ~CopyFileState() { copyfile_state_free(state); } | |
| 685 | 760 | |
| 686 | ec.clear(); | |
| 687 | return true; | |
| 688 | } | |
| 689 | #endif | |
| 761 | private: | |
| 762 | CopyFileState(CopyFileState const&) = delete; | |
| 763 | CopyFileState& operator=(CopyFileState const&) = delete; | |
| 764 | }; | |
| 690 | 765 | |
| 691 | // Note: This function isn't guarded by ifdef's even though it may be unused | |
| 692 | // in order to assure it still compiles. | |
| 693 | __attribute__((unused)) bool copy_file_impl_default(FileDescriptor& read_fd, | |
| 694 | FileDescriptor& write_fd, | |
| 695 | error_code& ec) { | |
| 696 | ifstream in; | |
| 697 | in.__open(read_fd.fd, ios::binary); | |
| 698 | if (!in.is_open()) { | |
| 699 | // This assumes that __open didn't reset the error code. | |
| 700 | ec = capture_errno(); | |
| 701 | return false; | |
| 702 | } | |
| 703 | ofstream out; | |
| 704 | out.__open(write_fd.fd, ios::binary); | |
| 705 | if (!out.is_open()) { | |
| 706 | ec = capture_errno(); | |
| 707 | return false; | |
| 708 | } | |
| 766 | CopyFileState cfs; | |
| 767 | if (fcopyfile(read_fd.fd, write_fd.fd, cfs.state, COPYFILE_DATA) < 0) { | |
| 768 | ec = capture_errno(); | |
| 769 | return false; | |
| 770 | } | |
| 709 | 771 | |
| 710 | if (in.good() && out.good()) { | |
| 711 | using InIt = istreambuf_iterator<char>; | |
| 712 | using OutIt = ostreambuf_iterator<char>; | |
| 713 | InIt bin(in); | |
| 714 | InIt ein; | |
| 715 | OutIt bout(out); | |
| 716 | copy(bin, ein, bout); | |
| 717 | } | |
| 718 | if (out.fail() || in.fail()) { | |
| 719 | ec = make_error_code(errc::io_error); | |
| 720 | return false; | |
| 772 | ec.clear(); | |
| 773 | return true; | |
| 721 | 774 | } |
| 775 | #elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM) | |
| 776 | bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) { | |
| 777 | ifstream in; | |
| 778 | in.__open(read_fd.fd, ios::binary); | |
| 779 | if (!in.is_open()) { | |
| 780 | // This assumes that __open didn't reset the error code. | |
| 781 | ec = capture_errno(); | |
| 782 | return false; | |
| 783 | } | |
| 784 | read_fd.fd = -1; | |
| 785 | ofstream out; | |
| 786 | out.__open(write_fd.fd, ios::binary); | |
| 787 | if (!out.is_open()) { | |
| 788 | ec = capture_errno(); | |
| 789 | return false; | |
| 790 | } | |
| 791 | write_fd.fd = -1; | |
| 792 | ||
| 793 | if (in.good() && out.good()) { | |
| 794 | using InIt = istreambuf_iterator<char>; | |
| 795 | using OutIt = ostreambuf_iterator<char>; | |
| 796 | InIt bin(in); | |
| 797 | InIt ein; | |
| 798 | OutIt bout(out); | |
| 799 | copy(bin, ein, bout); | |
| 800 | } | |
| 801 | if (out.fail() || in.fail()) { | |
| 802 | ec = make_error_code(errc::io_error); | |
| 803 | return false; | |
| 804 | } | |
| 722 | 805 | |
| 723 | ec.clear(); | |
| 724 | return true; | |
| 725 | } | |
| 726 | ||
| 727 | bool copy_file_impl(FileDescriptor& from, FileDescriptor& to, error_code& ec) { | |
| 728 | #if defined(_LIBCPP_USE_SENDFILE) | |
| 729 | return copy_file_impl_sendfile(from, to, ec); | |
| 730 | #elif defined(_LIBCPP_USE_COPYFILE) | |
| 731 | return copy_file_impl_copyfile(from, to, ec); | |
| 806 | ec.clear(); | |
| 807 | return true; | |
| 808 | } | |
| 732 | 809 | #else |
| 733 | return copy_file_impl_default(from, to, ec); | |
| 734 | #endif | |
| 735 | } | |
| 810 | # error "Unknown implementation for copy_file_impl" | |
| 811 | #endif // copy_file_impl implementation | |
| 736 | 812 | |
| 737 | } // namespace | |
| 738 | } // namespace detail | |
| 813 | } // end anonymous namespace | |
| 814 | } // end namespace detail | |
| 739 | 815 | |
| 740 | 816 | bool __copy_file(const path& from, const path& to, copy_options options, |
| 741 | 817 | error_code* ec) { |
| ... | ... | @@ -870,8 +946,17 @@ bool __create_directory(const path& p, error_code* ec) { |
| 870 | 946 | |
| 871 | 947 | if (::mkdir(p.c_str(), static_cast<int>(perms::all)) == 0) |
| 872 | 948 | return true; |
| 873 | if (errno != EEXIST) | |
| 949 | ||
| 950 | if (errno == EEXIST) { | |
| 951 | error_code mec = capture_errno(); | |
| 952 | error_code ignored_ec; | |
| 953 | const file_status st = status(p, ignored_ec); | |
| 954 | if (!is_directory(st)) { | |
| 955 | err.report(mec); | |
| 956 | } | |
| 957 | } else { | |
| 874 | 958 | err.report(capture_errno()); |
| 959 | } | |
| 875 | 960 | return false; |
| 876 | 961 | } |
| 877 | 962 | |
| ... | ... | @@ -889,8 +974,17 @@ bool __create_directory(path const& p, path const& attributes, error_code* ec) { |
| 889 | 974 | |
| 890 | 975 | if (::mkdir(p.c_str(), attr_stat.st_mode) == 0) |
| 891 | 976 | return true; |
| 892 | if (errno != EEXIST) | |
| 977 | ||
| 978 | if (errno == EEXIST) { | |
| 979 | error_code mec = capture_errno(); | |
| 980 | error_code ignored_ec; | |
| 981 | const file_status st = status(p, ignored_ec); | |
| 982 | if (!is_directory(st)) { | |
| 983 | err.report(mec); | |
| 984 | } | |
| 985 | } else { | |
| 893 | 986 | err.report(capture_errno()); |
| 987 | } | |
| 894 | 988 | return false; |
| 895 | 989 | } |
| 896 | 990 | |
| ... | ... | @@ -1225,10 +1319,10 @@ path __temp_directory_path(error_code* ec) { |
| 1225 | 1319 | error_code m_ec; |
| 1226 | 1320 | file_status st = detail::posix_stat(p, &m_ec); |
| 1227 | 1321 | if (!status_known(st)) |
| 1228 | return err.report(m_ec, "cannot access path \"%s\"", p); | |
| 1322 | return err.report(m_ec, "cannot access path \"" PS_FMT "\"", p); | |
| 1229 | 1323 | |
| 1230 | 1324 | if (!exists(st) || !is_directory(st)) |
| 1231 | return err.report(errc::not_a_directory, "path \"%s\" is not a directory", | |
| 1325 | return err.report(errc::not_a_directory, "path \"" PS_FMT "\" is not a directory", | |
| 1232 | 1326 | p); |
| 1233 | 1327 | |
| 1234 | 1328 | return p; |
| ... | ... | @@ -1284,7 +1378,7 @@ path& path::replace_extension(path const& replacement) { |
| 1284 | 1378 | } |
| 1285 | 1379 | if (!replacement.empty()) { |
| 1286 | 1380 | if (replacement.native()[0] != '.') { |
| 1287 | __pn_ += "."; | |
| 1381 | __pn_ += PS("."); | |
| 1288 | 1382 | } |
| 1289 | 1383 | __pn_.append(replacement.__pn_); |
| 1290 | 1384 | } |
| ... | ... | @@ -1314,7 +1408,7 @@ string_view_t path::__root_path_raw() const { |
| 1314 | 1408 | auto PP = PathParser::CreateBegin(__pn_); |
| 1315 | 1409 | if (PP.State == PathParser::PS_InRootName) { |
| 1316 | 1410 | auto NextCh = PP.peek(); |
| 1317 | if (NextCh && *NextCh == '/') { | |
| 1411 | if (NextCh && isSeparator(*NextCh)) { | |
| 1318 | 1412 | ++PP; |
| 1319 | 1413 | return createView(__pn_.data(), &PP.RawEntry.back()); |
| 1320 | 1414 | } |
| ... | ... | @@ -1406,12 +1500,16 @@ enum PathPartKind : unsigned char { |
| 1406 | 1500 | static PathPartKind ClassifyPathPart(string_view_t Part) { |
| 1407 | 1501 | if (Part.empty()) |
| 1408 | 1502 | return PK_TrailingSep; |
| 1409 | if (Part == ".") | |
| 1503 | if (Part == PS(".")) | |
| 1410 | 1504 | return PK_Dot; |
| 1411 | if (Part == "..") | |
| 1505 | if (Part == PS("..")) | |
| 1412 | 1506 | return PK_DotDot; |
| 1413 | if (Part == "/") | |
| 1507 | if (Part == PS("/")) | |
| 1508 | return PK_RootSep; | |
| 1509 | #if defined(_LIBCPP_WIN32API) | |
| 1510 | if (Part == PS("\\")) | |
| 1414 | 1511 | return PK_RootSep; |
| 1512 | #endif | |
| 1415 | 1513 | return PK_Filename; |
| 1416 | 1514 | } |
| 1417 | 1515 | |
| ... | ... | @@ -1459,7 +1557,7 @@ path path::lexically_normal() const { |
| 1459 | 1557 | NewPathSize -= Parts.back().first.size(); |
| 1460 | 1558 | Parts.pop_back(); |
| 1461 | 1559 | } else if (LastKind != PK_RootSep) |
| 1462 | AddPart(PK_DotDot, ".."); | |
| 1560 | AddPart(PK_DotDot, PS("..")); | |
| 1463 | 1561 | MaybeNeedTrailingSep = LastKind == PK_Filename; |
| 1464 | 1562 | break; |
| 1465 | 1563 | } |
| ... | ... | @@ -1474,7 +1572,7 @@ path path::lexically_normal() const { |
| 1474 | 1572 | } |
| 1475 | 1573 | // [fs.path.generic]p6.8: If the path is empty, add a dot. |
| 1476 | 1574 | if (Parts.empty()) |
| 1477 | return "."; | |
| 1575 | return PS("."); | |
| 1478 | 1576 | |
| 1479 | 1577 | // [fs.path.generic]p6.7: If the last filename is dot-dot, remove any |
| 1480 | 1578 | // trailing directory-separator. |
| ... | ... | @@ -1486,7 +1584,7 @@ path path::lexically_normal() const { |
| 1486 | 1584 | Result /= PK.first; |
| 1487 | 1585 | |
| 1488 | 1586 | if (NeedTrailingSep) |
| 1489 | Result /= ""; | |
| 1587 | Result /= PS(""); | |
| 1490 | 1588 | |
| 1491 | 1589 | return Result; |
| 1492 | 1590 | } |
| ... | ... | @@ -1495,9 +1593,9 @@ static int DetermineLexicalElementCount(PathParser PP) { |
| 1495 | 1593 | int Count = 0; |
| 1496 | 1594 | for (; PP; ++PP) { |
| 1497 | 1595 | auto Elem = *PP; |
| 1498 | if (Elem == "..") | |
| 1596 | if (Elem == PS("..")) | |
| 1499 | 1597 | --Count; |
| 1500 | else if (Elem != "." && Elem != "") | |
| 1598 | else if (Elem != PS(".") && Elem != PS("")) | |
| 1501 | 1599 | ++Count; |
| 1502 | 1600 | } |
| 1503 | 1601 | return Count; |
| ... | ... | @@ -1544,15 +1642,15 @@ path path::lexically_relative(const path& base) const { |
| 1544 | 1642 | return {}; |
| 1545 | 1643 | |
| 1546 | 1644 | // if n == 0 and (a == end() || a->empty()), returns path("."); otherwise |
| 1547 | if (ElemCount == 0 && (PP.atEnd() || *PP == "")) | |
| 1548 | return "."; | |
| 1645 | if (ElemCount == 0 && (PP.atEnd() || *PP == PS(""))) | |
| 1646 | return PS("."); | |
| 1549 | 1647 | |
| 1550 | 1648 | // return a path constructed with 'n' dot-dot elements, followed by the the |
| 1551 | 1649 | // elements of '*this' after the mismatch. |
| 1552 | 1650 | path Result; |
| 1553 | 1651 | // FIXME: Reserve enough room in Result that it won't have to re-allocate. |
| 1554 | 1652 | while (ElemCount--) |
| 1555 | Result /= ".."; | |
| 1653 | Result /= PS(".."); | |
| 1556 | 1654 | for (; PP; ++PP) |
| 1557 | 1655 | Result /= *PP; |
| 1558 | 1656 | return Result; |
| ... | ... | @@ -1565,7 +1663,7 @@ static int CompareRootName(PathParser *LHS, PathParser *RHS) { |
| 1565 | 1663 | return 0; |
| 1566 | 1664 | |
| 1567 | 1665 | auto GetRootName = [](PathParser *Parser) -> string_view_t { |
| 1568 | return Parser->inRootName() ? **Parser : ""; | |
| 1666 | return Parser->inRootName() ? **Parser : PS(""); | |
| 1569 | 1667 | }; |
| 1570 | 1668 | int res = GetRootName(LHS).compare(GetRootName(RHS)); |
| 1571 | 1669 | ConsumeRootName(LHS); |
| ... | ... | @@ -1674,6 +1772,36 @@ path::iterator& path::iterator::__decrement() { |
| 1674 | 1772 | return *this; |
| 1675 | 1773 | } |
| 1676 | 1774 | |
| 1775 | #if defined(_LIBCPP_WIN32API) | |
| 1776 | //////////////////////////////////////////////////////////////////////////// | |
| 1777 | // Windows path conversions | |
| 1778 | size_t __wide_to_char(const wstring &str, char *out, size_t outlen) { | |
| 1779 | if (str.empty()) | |
| 1780 | return 0; | |
| 1781 | ErrorHandler<size_t> err("__wide_to_char", nullptr); | |
| 1782 | UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; | |
| 1783 | BOOL used_default = FALSE; | |
| 1784 | int ret = WideCharToMultiByte(codepage, 0, str.data(), str.size(), out, | |
| 1785 | outlen, nullptr, &used_default); | |
| 1786 | if (ret <= 0 || used_default) | |
| 1787 | return err.report(errc::illegal_byte_sequence); | |
| 1788 | return ret; | |
| 1789 | } | |
| 1790 | ||
| 1791 | size_t __char_to_wide(const string &str, wchar_t *out, size_t outlen) { | |
| 1792 | if (str.empty()) | |
| 1793 | return 0; | |
| 1794 | ErrorHandler<size_t> err("__char_to_wide", nullptr); | |
| 1795 | UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; | |
| 1796 | int ret = MultiByteToWideChar(codepage, MB_ERR_INVALID_CHARS, str.data(), | |
| 1797 | str.size(), out, outlen); | |
| 1798 | if (ret <= 0) | |
| 1799 | return err.report(errc::illegal_byte_sequence); | |
| 1800 | return ret; | |
| 1801 | } | |
| 1802 | #endif | |
| 1803 | ||
| 1804 | ||
| 1677 | 1805 | /////////////////////////////////////////////////////////////////////////////// |
| 1678 | 1806 | // directory entry definitions |
| 1679 | 1807 | /////////////////////////////////////////////////////////////////////////////// |
lib/libcxx/src/include/config_elast.h+4| ... | ... | @@ -17,10 +17,14 @@ |
| 17 | 17 | #include <errno.h> |
| 18 | 18 | #endif |
| 19 | 19 | |
| 20 | // Note: _LIBCPP_ELAST needs to be defined only on platforms | |
| 21 | // where strerror/strerror_r can't handle out-of-range errno values. | |
| 20 | 22 | #if defined(ELAST) |
| 21 | 23 | #define _LIBCPP_ELAST ELAST |
| 22 | 24 | #elif defined(_NEWLIB_VERSION) |
| 23 | 25 | #define _LIBCPP_ELAST __ELASTERROR |
| 26 | #elif defined(__NuttX__) | |
| 27 | // No _LIBCPP_ELAST needed on NuttX | |
| 24 | 28 | #elif defined(__Fuchsia__) |
| 25 | 29 | // No _LIBCPP_ELAST needed on Fuchsia |
| 26 | 30 | #elif defined(__wasi__) |
lib/libcxx/src/include/refstring.h+19-6| ... | ... | @@ -13,12 +13,25 @@ |
| 13 | 13 | #include <stdexcept> |
| 14 | 14 | #include <cstddef> |
| 15 | 15 | #include <cstring> |
| 16 | #ifdef __APPLE__ | |
| 17 | #include <dlfcn.h> | |
| 18 | #include <mach-o/dyld.h> | |
| 19 | #endif | |
| 20 | 16 | #include "atomic_support.h" |
| 21 | 17 | |
| 18 | // MacOS and iOS used to ship with libstdc++, and still support old applications | |
| 19 | // linking against libstdc++. The libc++ and libstdc++ exceptions are supposed | |
| 20 | // to be ABI compatible, such that they can be thrown from one library and caught | |
| 21 | // in the other. | |
| 22 | // | |
| 23 | // For that reason, we must look for libstdc++ in the same process and if found, | |
| 24 | // check the string stored in the exception object to see if it is the GCC empty | |
| 25 | // string singleton before manipulating the reference count. This is done so that | |
| 26 | // if an exception is created with a zero-length string in libstdc++, libc++abi | |
| 27 | // won't try to delete the memory. | |
| 28 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \ | |
| 29 | defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) | |
| 30 | # define _LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE | |
| 31 | # include <dlfcn.h> | |
| 32 | # include <mach-o/dyld.h> | |
| 33 | #endif | |
| 34 | ||
| 22 | 35 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 23 | 36 | |
| 24 | 37 | namespace __refstring_imp { namespace { |
| ... | ... | @@ -40,7 +53,7 @@ inline char * data_from_rep(_Rep_base *rep) noexcept { |
| 40 | 53 | return data + sizeof(*rep); |
| 41 | 54 | } |
| 42 | 55 | |
| 43 | #if defined(__APPLE__) | |
| 56 | #if defined(_LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE) | |
| 44 | 57 | inline |
| 45 | 58 | const char* compute_gcc_empty_string_storage() _NOEXCEPT |
| 46 | 59 | { |
| ... | ... | @@ -115,7 +128,7 @@ __libcpp_refstring::~__libcpp_refstring() { |
| 115 | 128 | |
| 116 | 129 | inline |
| 117 | 130 | bool __libcpp_refstring::__uses_refcount() const { |
| 118 | #ifdef __APPLE__ | |
| 131 | #if defined(_LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE) | |
| 119 | 132 | return __imp_ != get_gcc_empty_string_storage(); |
| 120 | 133 | #else |
| 121 | 134 | return true; |
lib/libcxx/src/ios.cpp-16| ... | ... | @@ -15,30 +15,14 @@ |
| 15 | 15 | #include "__locale" |
| 16 | 16 | #include "algorithm" |
| 17 | 17 | #include "include/config_elast.h" |
| 18 | #include "istream" | |
| 19 | 18 | #include "limits" |
| 20 | 19 | #include "memory" |
| 21 | 20 | #include "new" |
| 22 | #include "streambuf" | |
| 23 | 21 | #include "string" |
| 24 | 22 | #include "__undef_macros" |
| 25 | 23 | |
| 26 | 24 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 27 | 25 | |
| 28 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>; | |
| 29 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>; | |
| 30 | ||
| 31 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>; | |
| 32 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>; | |
| 33 | ||
| 34 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>; | |
| 35 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>; | |
| 36 | ||
| 37 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>; | |
| 38 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>; | |
| 39 | ||
| 40 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>; | |
| 41 | ||
| 42 | 26 | class _LIBCPP_HIDDEN __iostream_category |
| 43 | 27 | : public __do_message |
| 44 | 28 | { |
lib/libcxx/src/ios.instantiations.cpp created+43| ... | ... | @@ -0,0 +1,43 @@ |
| 1 | //===----------------------------------------------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | #include "__config" | |
| 10 | #include "fstream" | |
| 11 | #include "ios" | |
| 12 | #include "istream" | |
| 13 | #include "ostream" | |
| 14 | #include "sstream" | |
| 15 | #include "streambuf" | |
| 16 | ||
| 17 | ||
| 18 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 19 | ||
| 20 | // Original explicit instantiations provided in the library | |
| 21 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>; | |
| 22 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>; | |
| 23 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>; | |
| 24 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>; | |
| 25 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>; | |
| 26 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>; | |
| 27 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>; | |
| 28 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>; | |
| 29 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>; | |
| 30 | ||
| 31 | // Additional instantiations added later. Whether programs rely on these being | |
| 32 | // available is protected by _LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1. | |
| 33 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringbuf<char>; | |
| 34 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringstream<char>; | |
| 35 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostringstream<char>; | |
| 36 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istringstream<char>; | |
| 37 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ifstream<char>; | |
| 38 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ofstream<char>; | |
| 39 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_filebuf<char>; | |
| 40 | ||
| 41 | // Add more here if needed... | |
| 42 | ||
| 43 | _LIBCPP_END_NAMESPACE_STD |
lib/libcxx/src/iostream.cpp+1-1| ... | ... | @@ -77,7 +77,7 @@ __asm__("?wclog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream@_WU?$char_t |
| 77 | 77 | #endif |
| 78 | 78 | ; |
| 79 | 79 | |
| 80 | _LIBCPP_HIDDEN ios_base::Init __start_std_streams; | |
| 80 | _LIBCPP_HIDDEN ios_base::Init __start_std_streams _LIBCPP_INIT_PRIORITY_MAX; | |
| 81 | 81 | |
| 82 | 82 | // On Windows the TLS storage for locales needs to be initialized before we create |
| 83 | 83 | // the standard streams, otherwise it may not be alive during program termination |
lib/libcxx/src/locale.cpp+200-10| ... | ... | @@ -29,8 +29,8 @@ |
| 29 | 29 | #include "cwctype" |
| 30 | 30 | #include "__sso_allocator" |
| 31 | 31 | #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) |
| 32 | #include "support/win32/locale_win32.h" | |
| 33 | #elif !defined(__BIONIC__) | |
| 32 | #include "__support/win32/locale_win32.h" | |
| 33 | #elif !defined(__BIONIC__) && !defined(__NuttX__) | |
| 34 | 34 | #include <langinfo.h> |
| 35 | 35 | #endif |
| 36 | 36 | #include <stdlib.h> |
| ... | ... | @@ -158,7 +158,7 @@ const locale::category locale::all; |
| 158 | 158 | class _LIBCPP_HIDDEN locale::__imp |
| 159 | 159 | : public facet |
| 160 | 160 | { |
| 161 | enum {N = 28}; | |
| 161 | enum {N = 30}; | |
| 162 | 162 | #if defined(_LIBCPP_COMPILER_MSVC) |
| 163 | 163 | // FIXME: MSVC doesn't support aligned parameters by value. |
| 164 | 164 | // I can't get the __sso_allocator to work here |
| ... | ... | @@ -202,8 +202,14 @@ locale::__imp::__imp(size_t refs) |
| 202 | 202 | install(&make<_VSTD::ctype<wchar_t> >(1u)); |
| 203 | 203 | install(&make<codecvt<char, char, mbstate_t> >(1u)); |
| 204 | 204 | install(&make<codecvt<wchar_t, char, mbstate_t> >(1u)); |
| 205 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 205 | 206 | install(&make<codecvt<char16_t, char, mbstate_t> >(1u)); |
| 206 | 207 | install(&make<codecvt<char32_t, char, mbstate_t> >(1u)); |
| 208 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 209 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 210 | install(&make<codecvt<char16_t, char8_t, mbstate_t> >(1u)); | |
| 211 | install(&make<codecvt<char32_t, char8_t, mbstate_t> >(1u)); | |
| 212 | #endif | |
| 207 | 213 | install(&make<numpunct<char> >(1u)); |
| 208 | 214 | install(&make<numpunct<wchar_t> >(1u)); |
| 209 | 215 | install(&make<num_get<char> >(1u)); |
| ... | ... | @@ -245,8 +251,14 @@ locale::__imp::__imp(const string& name, size_t refs) |
| 245 | 251 | install(new ctype_byname<wchar_t>(name_)); |
| 246 | 252 | install(new codecvt_byname<char, char, mbstate_t>(name_)); |
| 247 | 253 | install(new codecvt_byname<wchar_t, char, mbstate_t>(name_)); |
| 254 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 248 | 255 | install(new codecvt_byname<char16_t, char, mbstate_t>(name_)); |
| 249 | 256 | install(new codecvt_byname<char32_t, char, mbstate_t>(name_)); |
| 257 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 258 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 259 | install(new codecvt_byname<char16_t, char8_t, mbstate_t>(name_)); | |
| 260 | install(new codecvt_byname<char32_t, char8_t, mbstate_t>(name_)); | |
| 261 | #endif | |
| 250 | 262 | install(new numpunct_byname<char>(name_)); |
| 251 | 263 | install(new numpunct_byname<wchar_t>(name_)); |
| 252 | 264 | install(new moneypunct_byname<char, false>(name_)); |
| ... | ... | @@ -315,8 +327,14 @@ locale::__imp::__imp(const __imp& other, const string& name, locale::category c) |
| 315 | 327 | install(new ctype_byname<wchar_t>(name)); |
| 316 | 328 | install(new codecvt_byname<char, char, mbstate_t>(name)); |
| 317 | 329 | install(new codecvt_byname<wchar_t, char, mbstate_t>(name)); |
| 330 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 318 | 331 | install(new codecvt_byname<char16_t, char, mbstate_t>(name)); |
| 319 | 332 | install(new codecvt_byname<char32_t, char, mbstate_t>(name)); |
| 333 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 334 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 335 | install(new codecvt_byname<char16_t, char8_t, mbstate_t>(name)); | |
| 336 | install(new codecvt_byname<char32_t, char8_t, mbstate_t>(name)); | |
| 337 | #endif | |
| 320 | 338 | } |
| 321 | 339 | if (c & locale::monetary) |
| 322 | 340 | { |
| ... | ... | @@ -385,8 +403,14 @@ locale::__imp::__imp(const __imp& other, const __imp& one, locale::category c) |
| 385 | 403 | install_from<_VSTD::ctype<char> >(one); |
| 386 | 404 | install_from<_VSTD::ctype<wchar_t> >(one); |
| 387 | 405 | install_from<_VSTD::codecvt<char, char, mbstate_t> >(one); |
| 406 | _LIBCPP_SUPPRESS_DEPRECATED_PUSH | |
| 388 | 407 | install_from<_VSTD::codecvt<char16_t, char, mbstate_t> >(one); |
| 389 | 408 | install_from<_VSTD::codecvt<char32_t, char, mbstate_t> >(one); |
| 409 | _LIBCPP_SUPPRESS_DEPRECATED_POP | |
| 410 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 411 | install_from<_VSTD::codecvt<char16_t, char8_t, mbstate_t> >(one); | |
| 412 | install_from<_VSTD::codecvt<char32_t, char8_t, mbstate_t> >(one); | |
| 413 | #endif | |
| 390 | 414 | install_from<_VSTD::codecvt<wchar_t, char, mbstate_t> >(one); |
| 391 | 415 | } |
| 392 | 416 | if (c & locale::monetary) |
| ... | ... | @@ -1149,7 +1173,7 @@ ctype<char>::__classic_upper_table() _NOEXCEPT |
| 1149 | 1173 | { |
| 1150 | 1174 | return _LIBCPP_GET_C_LOCALE->__ctype_toupper; |
| 1151 | 1175 | } |
| 1152 | #elif __NetBSD__ | |
| 1176 | #elif defined(__NetBSD__) | |
| 1153 | 1177 | const short* |
| 1154 | 1178 | ctype<char>::__classic_lower_table() _NOEXCEPT |
| 1155 | 1179 | { |
| ... | ... | @@ -3171,6 +3195,87 @@ codecvt<char16_t, char, mbstate_t>::do_max_length() const _NOEXCEPT |
| 3171 | 3195 | return 4; |
| 3172 | 3196 | } |
| 3173 | 3197 | |
| 3198 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 3199 | ||
| 3200 | // template <> class codecvt<char16_t, char8_t, mbstate_t> | |
| 3201 | ||
| 3202 | locale::id codecvt<char16_t, char8_t, mbstate_t>::id; | |
| 3203 | ||
| 3204 | codecvt<char16_t, char8_t, mbstate_t>::~codecvt() | |
| 3205 | { | |
| 3206 | } | |
| 3207 | ||
| 3208 | codecvt<char16_t, char8_t, mbstate_t>::result | |
| 3209 | codecvt<char16_t, char8_t, mbstate_t>::do_out(state_type&, | |
| 3210 | const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt, | |
| 3211 | extern_type* to, extern_type* to_end, extern_type*& to_nxt) const | |
| 3212 | { | |
| 3213 | const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm); | |
| 3214 | const uint16_t* _frm_end = reinterpret_cast<const uint16_t*>(frm_end); | |
| 3215 | const uint16_t* _frm_nxt = _frm; | |
| 3216 | uint8_t* _to = reinterpret_cast<uint8_t*>(to); | |
| 3217 | uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end); | |
| 3218 | uint8_t* _to_nxt = _to; | |
| 3219 | result r = utf16_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt); | |
| 3220 | frm_nxt = frm + (_frm_nxt - _frm); | |
| 3221 | to_nxt = to + (_to_nxt - _to); | |
| 3222 | return r; | |
| 3223 | } | |
| 3224 | ||
| 3225 | codecvt<char16_t, char8_t, mbstate_t>::result | |
| 3226 | codecvt<char16_t, char8_t, mbstate_t>::do_in(state_type&, | |
| 3227 | const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt, | |
| 3228 | intern_type* to, intern_type* to_end, intern_type*& to_nxt) const | |
| 3229 | { | |
| 3230 | const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm); | |
| 3231 | const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end); | |
| 3232 | const uint8_t* _frm_nxt = _frm; | |
| 3233 | uint16_t* _to = reinterpret_cast<uint16_t*>(to); | |
| 3234 | uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end); | |
| 3235 | uint16_t* _to_nxt = _to; | |
| 3236 | result r = utf8_to_utf16(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt); | |
| 3237 | frm_nxt = frm + (_frm_nxt - _frm); | |
| 3238 | to_nxt = to + (_to_nxt - _to); | |
| 3239 | return r; | |
| 3240 | } | |
| 3241 | ||
| 3242 | codecvt<char16_t, char8_t, mbstate_t>::result | |
| 3243 | codecvt<char16_t, char8_t, mbstate_t>::do_unshift(state_type&, | |
| 3244 | extern_type* to, extern_type*, extern_type*& to_nxt) const | |
| 3245 | { | |
| 3246 | to_nxt = to; | |
| 3247 | return noconv; | |
| 3248 | } | |
| 3249 | ||
| 3250 | int | |
| 3251 | codecvt<char16_t, char8_t, mbstate_t>::do_encoding() const _NOEXCEPT | |
| 3252 | { | |
| 3253 | return 0; | |
| 3254 | } | |
| 3255 | ||
| 3256 | bool | |
| 3257 | codecvt<char16_t, char8_t, mbstate_t>::do_always_noconv() const _NOEXCEPT | |
| 3258 | { | |
| 3259 | return false; | |
| 3260 | } | |
| 3261 | ||
| 3262 | int | |
| 3263 | codecvt<char16_t, char8_t, mbstate_t>::do_length(state_type&, | |
| 3264 | const extern_type* frm, const extern_type* frm_end, size_t mx) const | |
| 3265 | { | |
| 3266 | const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm); | |
| 3267 | const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end); | |
| 3268 | return utf8_to_utf16_length(_frm, _frm_end, mx); | |
| 3269 | } | |
| 3270 | ||
| 3271 | int | |
| 3272 | codecvt<char16_t, char8_t, mbstate_t>::do_max_length() const _NOEXCEPT | |
| 3273 | { | |
| 3274 | return 4; | |
| 3275 | } | |
| 3276 | ||
| 3277 | #endif | |
| 3278 | ||
| 3174 | 3279 | // template <> class codecvt<char32_t, char, mbstate_t> |
| 3175 | 3280 | |
| 3176 | 3281 | locale::id codecvt<char32_t, char, mbstate_t>::id; |
| ... | ... | @@ -3248,6 +3353,87 @@ codecvt<char32_t, char, mbstate_t>::do_max_length() const _NOEXCEPT |
| 3248 | 3353 | return 4; |
| 3249 | 3354 | } |
| 3250 | 3355 | |
| 3356 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 3357 | ||
| 3358 | // template <> class codecvt<char32_t, char8_t, mbstate_t> | |
| 3359 | ||
| 3360 | locale::id codecvt<char32_t, char8_t, mbstate_t>::id; | |
| 3361 | ||
| 3362 | codecvt<char32_t, char8_t, mbstate_t>::~codecvt() | |
| 3363 | { | |
| 3364 | } | |
| 3365 | ||
| 3366 | codecvt<char32_t, char8_t, mbstate_t>::result | |
| 3367 | codecvt<char32_t, char8_t, mbstate_t>::do_out(state_type&, | |
| 3368 | const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt, | |
| 3369 | extern_type* to, extern_type* to_end, extern_type*& to_nxt) const | |
| 3370 | { | |
| 3371 | const uint32_t* _frm = reinterpret_cast<const uint32_t*>(frm); | |
| 3372 | const uint32_t* _frm_end = reinterpret_cast<const uint32_t*>(frm_end); | |
| 3373 | const uint32_t* _frm_nxt = _frm; | |
| 3374 | uint8_t* _to = reinterpret_cast<uint8_t*>(to); | |
| 3375 | uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end); | |
| 3376 | uint8_t* _to_nxt = _to; | |
| 3377 | result r = ucs4_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt); | |
| 3378 | frm_nxt = frm + (_frm_nxt - _frm); | |
| 3379 | to_nxt = to + (_to_nxt - _to); | |
| 3380 | return r; | |
| 3381 | } | |
| 3382 | ||
| 3383 | codecvt<char32_t, char8_t, mbstate_t>::result | |
| 3384 | codecvt<char32_t, char8_t, mbstate_t>::do_in(state_type&, | |
| 3385 | const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt, | |
| 3386 | intern_type* to, intern_type* to_end, intern_type*& to_nxt) const | |
| 3387 | { | |
| 3388 | const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm); | |
| 3389 | const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end); | |
| 3390 | const uint8_t* _frm_nxt = _frm; | |
| 3391 | uint32_t* _to = reinterpret_cast<uint32_t*>(to); | |
| 3392 | uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end); | |
| 3393 | uint32_t* _to_nxt = _to; | |
| 3394 | result r = utf8_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt); | |
| 3395 | frm_nxt = frm + (_frm_nxt - _frm); | |
| 3396 | to_nxt = to + (_to_nxt - _to); | |
| 3397 | return r; | |
| 3398 | } | |
| 3399 | ||
| 3400 | codecvt<char32_t, char8_t, mbstate_t>::result | |
| 3401 | codecvt<char32_t, char8_t, mbstate_t>::do_unshift(state_type&, | |
| 3402 | extern_type* to, extern_type*, extern_type*& to_nxt) const | |
| 3403 | { | |
| 3404 | to_nxt = to; | |
| 3405 | return noconv; | |
| 3406 | } | |
| 3407 | ||
| 3408 | int | |
| 3409 | codecvt<char32_t, char8_t, mbstate_t>::do_encoding() const _NOEXCEPT | |
| 3410 | { | |
| 3411 | return 0; | |
| 3412 | } | |
| 3413 | ||
| 3414 | bool | |
| 3415 | codecvt<char32_t, char8_t, mbstate_t>::do_always_noconv() const _NOEXCEPT | |
| 3416 | { | |
| 3417 | return false; | |
| 3418 | } | |
| 3419 | ||
| 3420 | int | |
| 3421 | codecvt<char32_t, char8_t, mbstate_t>::do_length(state_type&, | |
| 3422 | const extern_type* frm, const extern_type* frm_end, size_t mx) const | |
| 3423 | { | |
| 3424 | const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm); | |
| 3425 | const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end); | |
| 3426 | return utf8_to_ucs4_length(_frm, _frm_end, mx); | |
| 3427 | } | |
| 3428 | ||
| 3429 | int | |
| 3430 | codecvt<char32_t, char8_t, mbstate_t>::do_max_length() const _NOEXCEPT | |
| 3431 | { | |
| 3432 | return 4; | |
| 3433 | } | |
| 3434 | ||
| 3435 | #endif | |
| 3436 | ||
| 3251 | 3437 | // __codecvt_utf8<wchar_t> |
| 3252 | 3438 | |
| 3253 | 3439 | __codecvt_utf8<wchar_t>::result |
| ... | ... | @@ -5128,7 +5314,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct) |
| 5128 | 5314 | mb = mbstate_t(); |
| 5129 | 5315 | const char* bb = buf; |
| 5130 | 5316 | size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_); |
| 5131 | if (j == size_t(-1)) | |
| 5317 | if (j == size_t(-1) || j == 0) | |
| 5132 | 5318 | __throw_runtime_error("locale not supported"); |
| 5133 | 5319 | wbe = wbuf + j; |
| 5134 | 5320 | __weeks_[i].assign(wbuf, wbe); |
| ... | ... | @@ -5136,7 +5322,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct) |
| 5136 | 5322 | mb = mbstate_t(); |
| 5137 | 5323 | bb = buf; |
| 5138 | 5324 | j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_); |
| 5139 | if (j == size_t(-1)) | |
| 5325 | if (j == size_t(-1) || j == 0) | |
| 5140 | 5326 | __throw_runtime_error("locale not supported"); |
| 5141 | 5327 | wbe = wbuf + j; |
| 5142 | 5328 | __weeks_[i+7].assign(wbuf, wbe); |
| ... | ... | @@ -5149,7 +5335,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct) |
| 5149 | 5335 | mb = mbstate_t(); |
| 5150 | 5336 | const char* bb = buf; |
| 5151 | 5337 | size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_); |
| 5152 | if (j == size_t(-1)) | |
| 5338 | if (j == size_t(-1) || j == 0) | |
| 5153 | 5339 | __throw_runtime_error("locale not supported"); |
| 5154 | 5340 | wbe = wbuf + j; |
| 5155 | 5341 | __months_[i].assign(wbuf, wbe); |
| ... | ... | @@ -5157,7 +5343,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct) |
| 5157 | 5343 | mb = mbstate_t(); |
| 5158 | 5344 | bb = buf; |
| 5159 | 5345 | j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_); |
| 5160 | if (j == size_t(-1)) | |
| 5346 | if (j == size_t(-1) || j == 0) | |
| 5161 | 5347 | __throw_runtime_error("locale not supported"); |
| 5162 | 5348 | wbe = wbuf + j; |
| 5163 | 5349 | __months_[i+12].assign(wbuf, wbe); |
| ... | ... | @@ -6148,7 +6334,11 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<wchar_t> |
| 6148 | 6334 | |
| 6149 | 6335 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char, char, mbstate_t>; |
| 6150 | 6336 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<wchar_t, char, mbstate_t>; |
| 6151 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>; | |
| 6152 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>; | |
| 6337 | template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>; | |
| 6338 | template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>; | |
| 6339 | #ifndef _LIBCPP_NO_HAS_CHAR8_T | |
| 6340 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; | |
| 6341 | template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char8_t, mbstate_t>; | |
| 6342 | #endif | |
| 6153 | 6343 | |
| 6154 | 6344 | _LIBCPP_END_NAMESPACE_STD |
lib/libcxx/src/memory.cpp-4| ... | ... | @@ -124,16 +124,12 @@ __shared_weak_count::lock() _NOEXCEPT |
| 124 | 124 | return nullptr; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | #if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC) | |
| 128 | ||
| 129 | 127 | const void* |
| 130 | 128 | __shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT |
| 131 | 129 | { |
| 132 | 130 | return nullptr; |
| 133 | 131 | } |
| 134 | 132 | |
| 135 | #endif // _LIBCPP_NO_RTTI | |
| 136 | ||
| 137 | 133 | #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) |
| 138 | 134 | |
| 139 | 135 | _LIBCPP_SAFE_STATIC static const std::size_t __sp_mut_count = 16; |
lib/libcxx/src/new.cpp+14-18| ... | ... | @@ -64,7 +64,7 @@ operator new(std::size_t size) _THROW_BAD_ALLOC |
| 64 | 64 | if (size == 0) |
| 65 | 65 | size = 1; |
| 66 | 66 | void* p; |
| 67 | while ((p = ::malloc(size)) == 0) | |
| 67 | while ((p = ::malloc(size)) == nullptr) | |
| 68 | 68 | { |
| 69 | 69 | // If malloc fails and there is a new_handler, |
| 70 | 70 | // call it to try free up memory. |
| ... | ... | @@ -85,7 +85,7 @@ _LIBCPP_WEAK |
| 85 | 85 | void* |
| 86 | 86 | operator new(size_t size, const std::nothrow_t&) _NOEXCEPT |
| 87 | 87 | { |
| 88 | void* p = 0; | |
| 88 | void* p = nullptr; | |
| 89 | 89 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 90 | 90 | try |
| 91 | 91 | { |
| ... | ... | @@ -111,7 +111,7 @@ _LIBCPP_WEAK |
| 111 | 111 | void* |
| 112 | 112 | operator new[](size_t size, const std::nothrow_t&) _NOEXCEPT |
| 113 | 113 | { |
| 114 | void* p = 0; | |
| 114 | void* p = nullptr; | |
| 115 | 115 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 116 | 116 | try |
| 117 | 117 | { |
| ... | ... | @@ -178,15 +178,16 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC |
| 178 | 178 | size = 1; |
| 179 | 179 | if (static_cast<size_t>(alignment) < sizeof(void*)) |
| 180 | 180 | alignment = std::align_val_t(sizeof(void*)); |
| 181 | ||
| 182 | // Try allocating memory. If allocation fails and there is a new_handler, | |
| 183 | // call it to try free up memory, and try again until it succeeds, or until | |
| 184 | // the new_handler decides to terminate. | |
| 185 | // | |
| 186 | // If allocation fails and there is no new_handler, we throw bad_alloc | |
| 187 | // (or return nullptr if exceptions are disabled). | |
| 181 | 188 | void* p; |
| 182 | #if defined(_LIBCPP_MSVCRT_LIKE) | |
| 183 | while ((p = _aligned_malloc(size, static_cast<size_t>(alignment))) == nullptr) | |
| 184 | #else | |
| 185 | while (::posix_memalign(&p, static_cast<size_t>(alignment), size) != 0) | |
| 186 | #endif | |
| 189 | while ((p = std::__libcpp_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr) | |
| 187 | 190 | { |
| 188 | // If posix_memalign fails and there is a new_handler, | |
| 189 | // call it to try free up memory. | |
| 190 | 191 | std::new_handler nh = std::get_new_handler(); |
| 191 | 192 | if (nh) |
| 192 | 193 | nh(); |
| ... | ... | @@ -194,7 +195,6 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC |
| 194 | 195 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 195 | 196 | throw std::bad_alloc(); |
| 196 | 197 | #else |
| 197 | p = nullptr; // posix_memalign doesn't initialize 'p' on failure | |
| 198 | 198 | break; |
| 199 | 199 | #endif |
| 200 | 200 | } |
| ... | ... | @@ -206,7 +206,7 @@ _LIBCPP_WEAK |
| 206 | 206 | void* |
| 207 | 207 | operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) _NOEXCEPT |
| 208 | 208 | { |
| 209 | void* p = 0; | |
| 209 | void* p = nullptr; | |
| 210 | 210 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 211 | 211 | try |
| 212 | 212 | { |
| ... | ... | @@ -232,7 +232,7 @@ _LIBCPP_WEAK |
| 232 | 232 | void* |
| 233 | 233 | operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) _NOEXCEPT |
| 234 | 234 | { |
| 235 | void* p = 0; | |
| 235 | void* p = nullptr; | |
| 236 | 236 | #ifndef _LIBCPP_NO_EXCEPTIONS |
| 237 | 237 | try |
| 238 | 238 | { |
| ... | ... | @@ -251,11 +251,7 @@ _LIBCPP_WEAK |
| 251 | 251 | void |
| 252 | 252 | operator delete(void* ptr, std::align_val_t) _NOEXCEPT |
| 253 | 253 | { |
| 254 | #if defined(_LIBCPP_MSVCRT_LIKE) | |
| 255 | ::_aligned_free(ptr); | |
| 256 | #else | |
| 257 | ::free(ptr); | |
| 258 | #endif | |
| 254 | std::__libcpp_aligned_free(ptr); | |
| 259 | 255 | } |
| 260 | 256 | |
| 261 | 257 | _LIBCPP_WEAK |
lib/libcxx/src/optional.cpp+1| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | //===----------------------------------------------------------------------===// |
| 8 | 8 | |
| 9 | 9 | #include "optional" |
| 10 | #include "__availability" | |
| 10 | 11 | |
| 11 | 12 | namespace std |
| 12 | 13 | { |
lib/libcxx/src/random.cpp+21| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | #define _CRT_RAND_S |
| 14 | 14 | #endif // defined(_LIBCPP_USING_WIN32_RANDOM) |
| 15 | 15 | |
| 16 | #include "limits" | |
| 16 | 17 | #include "random" |
| 17 | 18 | #include "system_error" |
| 18 | 19 | |
| ... | ... | @@ -29,6 +30,10 @@ |
| 29 | 30 | #elif defined(_LIBCPP_USING_DEV_RANDOM) |
| 30 | 31 | #include <fcntl.h> |
| 31 | 32 | #include <unistd.h> |
| 33 | #if __has_include(<sys/ioctl.h>) && __has_include(<linux/random.h>) | |
| 34 | #include <sys/ioctl.h> | |
| 35 | #include <linux/random.h> | |
| 36 | #endif | |
| 32 | 37 | #elif defined(_LIBCPP_USING_NACL_RANDOM) |
| 33 | 38 | #include <nacl/nacl_random.h> |
| 34 | 39 | #endif |
| ... | ... | @@ -172,7 +177,23 @@ random_device::operator()() |
| 172 | 177 | double |
| 173 | 178 | random_device::entropy() const _NOEXCEPT |
| 174 | 179 | { |
| 180 | #if defined(_LIBCPP_USING_DEV_RANDOM) && defined(RNDGETENTCNT) | |
| 181 | int ent; | |
| 182 | if (::ioctl(__f_, RNDGETENTCNT, &ent) < 0) | |
| 183 | return 0; | |
| 184 | ||
| 185 | if (ent < 0) | |
| 175 | 186 | return 0; |
| 187 | ||
| 188 | if (ent > std::numeric_limits<result_type>::digits) | |
| 189 | return std::numeric_limits<result_type>::digits; | |
| 190 | ||
| 191 | return ent; | |
| 192 | #elif defined(__OpenBSD__) | |
| 193 | return std::numeric_limits<result_type>::digits; | |
| 194 | #else | |
| 195 | return 0; | |
| 196 | #endif | |
| 176 | 197 | } |
| 177 | 198 | |
| 178 | 199 | _LIBCPP_END_NAMESPACE_STD |
lib/libcxx/src/support/runtime/exception_fallback.ipp-4| ... | ... | @@ -49,7 +49,6 @@ get_terminate() _NOEXCEPT |
| 49 | 49 | return __libcpp_atomic_load(&__terminate_handler); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | #ifndef __EMSCRIPTEN__ // We provide this in JS | |
| 53 | 52 | _LIBCPP_NORETURN |
| 54 | 53 | void |
| 55 | 54 | terminate() _NOEXCEPT |
| ... | ... | @@ -72,9 +71,7 @@ terminate() _NOEXCEPT |
| 72 | 71 | } |
| 73 | 72 | #endif // _LIBCPP_NO_EXCEPTIONS |
| 74 | 73 | } |
| 75 | #endif // !__EMSCRIPTEN__ | |
| 76 | 74 | |
| 77 | #if !defined(__EMSCRIPTEN__) | |
| 78 | 75 | bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; } |
| 79 | 76 | |
| 80 | 77 | int uncaught_exceptions() _NOEXCEPT |
| ... | ... | @@ -83,7 +80,6 @@ int uncaught_exceptions() _NOEXCEPT |
| 83 | 80 | fprintf(stderr, "uncaught_exceptions not yet implemented\n"); |
| 84 | 81 | ::abort(); |
| 85 | 82 | } |
| 86 | #endif // !__EMSCRIPTEN__ | |
| 87 | 83 | |
| 88 | 84 | |
| 89 | 85 | exception::~exception() _NOEXCEPT |
lib/libcxx/src/support/solaris/xlocale.cpp+1-1| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | #ifdef __sun__ |
| 10 | 10 | |
| 11 | #include "support/solaris/xlocale.h" | |
| 11 | #include "__support/solaris/xlocale.h" | |
| 12 | 12 | #include <stdarg.h> |
| 13 | 13 | #include <stdio.h> |
| 14 | 14 | #include <sys/localedef.h> |
lib/libcxx/src/support/win32/locale_win32.cpp+1-1| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | // -*- C++ -*- |
| 2 | //===-------------------- support/win32/locale_win32.cpp ------------------===// | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | 3 | // |
| 4 | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | 5 | // See https://llvm.org/LICENSE.txt for license information. |
lib/libcxx/src/support/win32/support.cpp+1-1| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | // -*- C++ -*- |
| 2 | //===----------------------- support/win32/support.h ----------------------===// | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | 3 | // |
| 4 | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | 5 | // See https://llvm.org/LICENSE.txt for license information. |
lib/libcxx/src/support/win32/thread_win32.cpp+1-1| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | // -*- C++ -*- |
| 2 | //===-------------------- support/win32/thread_win32.cpp ------------------===// | |
| 2 | //===----------------------------------------------------------------------===// | |
| 3 | 3 | // |
| 4 | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | 5 | // See https://llvm.org/LICENSE.txt for license information. |
lib/libcxx/src/thread.cpp+2-16| ... | ... | @@ -14,17 +14,9 @@ |
| 14 | 14 | #include "vector" |
| 15 | 15 | #include "future" |
| 16 | 16 | #include "limits" |
| 17 | #include <sys/types.h> | |
| 18 | ||
| 19 | #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) | |
| 20 | # include <sys/param.h> | |
| 21 | # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) | |
| 22 | # include <sys/sysctl.h> | |
| 23 | # endif | |
| 24 | #endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) | |
| 25 | 17 | |
| 26 | 18 | #if __has_include(<unistd.h>) |
| 27 | #include <unistd.h> | |
| 19 | # include <unistd.h> // for sysconf | |
| 28 | 20 | #endif |
| 29 | 21 | |
| 30 | 22 | #if defined(__NetBSD__) |
| ... | ... | @@ -80,13 +72,7 @@ thread::detach() |
| 80 | 72 | unsigned |
| 81 | 73 | thread::hardware_concurrency() _NOEXCEPT |
| 82 | 74 | { |
| 83 | #if defined(CTL_HW) && defined(HW_NCPU) | |
| 84 | unsigned n; | |
| 85 | int mib[2] = {CTL_HW, HW_NCPU}; | |
| 86 | std::size_t s = sizeof(n); | |
| 87 | sysctl(mib, 2, &n, &s, 0, 0); | |
| 88 | return n; | |
| 89 | #elif defined(_SC_NPROCESSORS_ONLN) | |
| 75 | #if defined(_SC_NPROCESSORS_ONLN) | |
| 90 | 76 | long result = sysconf(_SC_NPROCESSORS_ONLN); |
| 91 | 77 | // sysconf returns -1 if the name is invalid, the option does not exist or |
| 92 | 78 | // does not have a definite limit. |
lib/libcxxabi/include/__cxxabi_config.h+15-2| ... | ... | @@ -18,6 +18,19 @@ |
| 18 | 18 | #define __has_attribute(_attribute_) 0 |
| 19 | 19 | #endif |
| 20 | 20 | |
| 21 | #if defined(__clang__) | |
| 22 | # define _LIBCXXABI_COMPILER_CLANG | |
| 23 | # ifndef __apple_build_version__ | |
| 24 | # define _LIBCXXABI_CLANG_VER (__clang_major__ * 100 + __clang_minor__) | |
| 25 | # endif | |
| 26 | #elif defined(__GNUC__) | |
| 27 | # define _LIBCXXABI_COMPILER_GCC | |
| 28 | #elif defined(_MSC_VER) | |
| 29 | # define _LIBCXXABI_COMPILER_MSVC | |
| 30 | #elif defined(__IBMCPP__) | |
| 31 | # define _LIBCXXABI_COMPILER_IBM | |
| 32 | #endif | |
| 33 | ||
| 21 | 34 | #if defined(_WIN32) |
| 22 | 35 | #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS) |
| 23 | 36 | #define _LIBCXXABI_HIDDEN |
| ... | ... | @@ -53,7 +66,7 @@ |
| 53 | 66 | #endif |
| 54 | 67 | #endif |
| 55 | 68 | |
| 56 | #if defined(_WIN32) | |
| 69 | #if defined(_LIBCXXABI_COMPILER_MSVC) | |
| 57 | 70 | #define _LIBCXXABI_WEAK |
| 58 | 71 | #else |
| 59 | 72 | #define _LIBCXXABI_WEAK __attribute__((__weak__)) |
| ... | ... | @@ -72,7 +85,7 @@ |
| 72 | 85 | #endif |
| 73 | 86 | |
| 74 | 87 | // wasm32 follows the arm32 ABI convention of using 32-bit guard. |
| 75 | #if defined(__arm__) || defined(__wasm32__) | |
| 88 | #if defined(__arm__) || defined(__wasm32__) || defined(__ARM64_ARCH_8_32__) | |
| 76 | 89 | # define _LIBCXXABI_GUARD_ABI_ARM |
| 77 | 90 | #endif |
| 78 | 91 |
lib/libcxxabi/include/cxxabi.h+10-9| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | |
| 22 | 22 | #define _LIBCPPABI_VERSION 1002 |
| 23 | 23 | #define _LIBCXXABI_NORETURN __attribute__((noreturn)) |
| 24 | #define _LIBCXXABI_ALWAYS_COLD __attribute__((cold)) | |
| 24 | 25 | |
| 25 | 26 | #ifdef __cplusplus |
| 26 | 27 | |
| ... | ... | @@ -78,13 +79,13 @@ extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_deleted_virtual(void); |
| 78 | 79 | |
| 79 | 80 | // 3.3.2 One-time Construction API |
| 80 | 81 | #if defined(_LIBCXXABI_GUARD_ABI_ARM) |
| 81 | extern _LIBCXXABI_FUNC_VIS int __cxa_guard_acquire(uint32_t *); | |
| 82 | extern _LIBCXXABI_FUNC_VIS void __cxa_guard_release(uint32_t *); | |
| 83 | extern _LIBCXXABI_FUNC_VIS void __cxa_guard_abort(uint32_t *); | |
| 82 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD int __cxa_guard_acquire(uint32_t *); | |
| 83 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_release(uint32_t *); | |
| 84 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_abort(uint32_t *); | |
| 84 | 85 | #else |
| 85 | extern _LIBCXXABI_FUNC_VIS int __cxa_guard_acquire(uint64_t *); | |
| 86 | extern _LIBCXXABI_FUNC_VIS void __cxa_guard_release(uint64_t *); | |
| 87 | extern _LIBCXXABI_FUNC_VIS void __cxa_guard_abort(uint64_t *); | |
| 86 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD int __cxa_guard_acquire(uint64_t *); | |
| 87 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_release(uint64_t *); | |
| 88 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_abort(uint64_t *); | |
| 88 | 89 | #endif |
| 89 | 90 | |
| 90 | 91 | // 3.3.3 Array Construction and Destruction API |
| ... | ... | @@ -136,9 +137,9 @@ __cxa_vec_cctor(void *dest_array, void *src_array, size_t element_count, |
| 136 | 137 | void (*destructor)(void *)); |
| 137 | 138 | |
| 138 | 139 | // 3.3.5.3 Runtime API |
| 139 | extern _LIBCXXABI_FUNC_VIS int __cxa_atexit(void (*f)(void *), void *p, | |
| 140 | void *d); | |
| 141 | extern _LIBCXXABI_FUNC_VIS int __cxa_finalize(void *); | |
| 140 | // These functions are part of the C++ ABI, but they are not defined in libc++abi: | |
| 141 | // int __cxa_atexit(void (*)(void *), void *, void *); | |
| 142 | // void __cxa_finalize(void *); | |
| 142 | 143 | |
| 143 | 144 | // 3.4 Demangler API |
| 144 | 145 | extern _LIBCXXABI_FUNC_VIS char *__cxa_demangle(const char *mangled_name, |
lib/libcxxabi/src/cxa_default_handlers.cpp+4| ... | ... | @@ -45,6 +45,7 @@ static void demangling_terminate_handler() |
| 45 | 45 | exception_header + 1; |
| 46 | 46 | const __shim_type_info* thrown_type = |
| 47 | 47 | static_cast<const __shim_type_info*>(exception_header->exceptionType); |
| 48 | #if !defined(LIBCXXABI_NON_DEMANGLING_TERMINATE) | |
| 48 | 49 | // Try to get demangled name of thrown_type |
| 49 | 50 | int status; |
| 50 | 51 | char buf[1024]; |
| ... | ... | @@ -52,6 +53,9 @@ static void demangling_terminate_handler() |
| 52 | 53 | const char* name = __cxa_demangle(thrown_type->name(), buf, &len, &status); |
| 53 | 54 | if (status != 0) |
| 54 | 55 | name = thrown_type->name(); |
| 56 | #else | |
| 57 | const char* name = thrown_type->name(); | |
| 58 | #endif | |
| 55 | 59 | // If the uncaught exception can be caught with std::exception& |
| 56 | 60 | const __shim_type_info* catch_type = |
| 57 | 61 | static_cast<const __shim_type_info*>(&typeid(std::exception)); |
lib/libcxxabi/src/cxa_guard_impl.h+24-24| ... | ... | @@ -54,6 +54,14 @@ |
| 54 | 54 | #endif |
| 55 | 55 | #endif |
| 56 | 56 | |
| 57 | #if defined(__clang__) | |
| 58 | # pragma clang diagnostic push | |
| 59 | # pragma clang diagnostic ignored "-Wtautological-pointer-compare" | |
| 60 | #elif defined(__GNUC__) | |
| 61 | # pragma GCC diagnostic push | |
| 62 | # pragma GCC diagnostic ignored "-Waddress" | |
| 63 | #endif | |
| 64 | ||
| 57 | 65 | // To make testing possible, this header is included from both cxa_guard.cpp |
| 58 | 66 | // and a number of tests. |
| 59 | 67 | // |
| ... | ... | @@ -112,25 +120,25 @@ class AtomicInt { |
| 112 | 120 | public: |
| 113 | 121 | using MemoryOrder = std::__libcpp_atomic_order; |
| 114 | 122 | |
| 115 | explicit AtomicInt(IntType *b) : b(b) {} | |
| 123 | explicit AtomicInt(IntType *b) : b_(b) {} | |
| 116 | 124 | AtomicInt(AtomicInt const&) = delete; |
| 117 | 125 | AtomicInt& operator=(AtomicInt const&) = delete; |
| 118 | 126 | |
| 119 | 127 | IntType load(MemoryOrder ord) { |
| 120 | return std::__libcpp_atomic_load(b, ord); | |
| 128 | return std::__libcpp_atomic_load(b_, ord); | |
| 121 | 129 | } |
| 122 | 130 | void store(IntType val, MemoryOrder ord) { |
| 123 | std::__libcpp_atomic_store(b, val, ord); | |
| 131 | std::__libcpp_atomic_store(b_, val, ord); | |
| 124 | 132 | } |
| 125 | 133 | IntType exchange(IntType new_val, MemoryOrder ord) { |
| 126 | return std::__libcpp_atomic_exchange(b, new_val, ord); | |
| 134 | return std::__libcpp_atomic_exchange(b_, new_val, ord); | |
| 127 | 135 | } |
| 128 | 136 | bool compare_exchange(IntType *expected, IntType desired, MemoryOrder ord_success, MemoryOrder ord_failure) { |
| 129 | return std::__libcpp_atomic_compare_exchange(b, expected, desired, ord_success, ord_failure); | |
| 137 | return std::__libcpp_atomic_compare_exchange(b_, expected, desired, ord_success, ord_failure); | |
| 130 | 138 | } |
| 131 | 139 | |
| 132 | 140 | private: |
| 133 | IntType *b; | |
| 141 | IntType *b_; | |
| 134 | 142 | }; |
| 135 | 143 | |
| 136 | 144 | //===----------------------------------------------------------------------===// |
| ... | ... | @@ -154,14 +162,7 @@ constexpr uint32_t (*PlatformThreadID)() = nullptr; |
| 154 | 162 | |
| 155 | 163 | |
| 156 | 164 | constexpr bool PlatformSupportsThreadID() { |
| 157 | #ifdef __clang__ | |
| 158 | #pragma clang diagnostic push | |
| 159 | #pragma clang diagnostic ignored "-Wtautological-pointer-compare" | |
| 160 | #endif | |
| 161 | 165 | return +PlatformThreadID != nullptr; |
| 162 | #ifdef __clang__ | |
| 163 | #pragma clang diagnostic pop | |
| 164 | #endif | |
| 165 | 166 | } |
| 166 | 167 | |
| 167 | 168 | //===----------------------------------------------------------------------===// |
| ... | ... | @@ -375,18 +376,18 @@ private: |
| 375 | 376 | LockGuard& operator=(LockGuard const&) = delete; |
| 376 | 377 | |
| 377 | 378 | explicit LockGuard(const char* calling_func) |
| 378 | : calling_func(calling_func) { | |
| 379 | : calling_func_(calling_func) { | |
| 379 | 380 | if (global_mutex.lock()) |
| 380 | ABORT_WITH_MESSAGE("%s failed to acquire mutex", calling_func); | |
| 381 | ABORT_WITH_MESSAGE("%s failed to acquire mutex", calling_func_); | |
| 381 | 382 | } |
| 382 | 383 | |
| 383 | 384 | ~LockGuard() { |
| 384 | 385 | if (global_mutex.unlock()) |
| 385 | ABORT_WITH_MESSAGE("%s failed to release mutex", calling_func); | |
| 386 | ABORT_WITH_MESSAGE("%s failed to release mutex", calling_func_); | |
| 386 | 387 | } |
| 387 | 388 | |
| 388 | 389 | private: |
| 389 | const char* const calling_func; | |
| 390 | const char* const calling_func_; | |
| 390 | 391 | }; |
| 391 | 392 | }; |
| 392 | 393 | |
| ... | ... | @@ -411,14 +412,7 @@ constexpr void (*PlatformFutexWake)(int*) = nullptr; |
| 411 | 412 | #endif |
| 412 | 413 | |
| 413 | 414 | constexpr bool PlatformSupportsFutex() { |
| 414 | #ifdef __clang__ | |
| 415 | #pragma clang diagnostic push | |
| 416 | #pragma clang diagnostic ignored "-Wtautological-pointer-compare" | |
| 417 | #endif | |
| 418 | 415 | return +PlatformFutexWait != nullptr; |
| 419 | #ifdef __clang__ | |
| 420 | #pragma clang diagnostic pop | |
| 421 | #endif | |
| 422 | 416 | } |
| 423 | 417 | |
| 424 | 418 | /// InitByteFutex - Manages initialization using atomics and the futex syscall |
| ... | ... | @@ -589,4 +583,10 @@ using SelectedImplementation = |
| 589 | 583 | } // end namespace |
| 590 | 584 | } // end namespace __cxxabiv1 |
| 591 | 585 | |
| 586 | #if defined(__clang__) | |
| 587 | # pragma clang diagnostic pop | |
| 588 | #elif defined(__GNUC__) | |
| 589 | # pragma GCC diagnostic pop | |
| 590 | #endif | |
| 591 | ||
| 592 | 592 | #endif // LIBCXXABI_SRC_INCLUDE_CXA_GUARD_IMPL_H |
lib/libcxxabi/src/cxa_personality.cpp+85-178| ... | ... | @@ -684,27 +684,21 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, |
| 684 | 684 | return; |
| 685 | 685 | } |
| 686 | 686 | landingPad = (uintptr_t)lpStart + landingPad; |
| 687 | results.landingPad = landingPad; | |
| 687 | 688 | #else // __USING_SJLJ_EXCEPTIONS__ |
| 688 | 689 | ++landingPad; |
| 689 | 690 | #endif // __USING_SJLJ_EXCEPTIONS__ |
| 690 | 691 | if (actionEntry == 0) |
| 691 | 692 | { |
| 692 | 693 | // Found a cleanup |
| 693 | // If this is a type 1 or type 2 search, there are no handlers | |
| 694 | // If this is a type 3 search, you want to install the cleanup. | |
| 695 | if ((actions & _UA_CLEANUP_PHASE) && !(actions & _UA_HANDLER_FRAME)) | |
| 696 | { | |
| 697 | results.ttypeIndex = 0; // Redundant but clarifying | |
| 698 | results.landingPad = landingPad; | |
| 699 | results.reason = _URC_HANDLER_FOUND; | |
| 700 | return; | |
| 701 | } | |
| 702 | // No handler here | |
| 703 | results.reason = _URC_CONTINUE_UNWIND; | |
| 694 | results.reason = actions & _UA_SEARCH_PHASE | |
| 695 | ? _URC_CONTINUE_UNWIND | |
| 696 | : _URC_HANDLER_FOUND; | |
| 704 | 697 | return; |
| 705 | 698 | } |
| 706 | 699 | // Convert 1-based byte offset into |
| 707 | 700 | const uint8_t* action = actionTableStart + (actionEntry - 1); |
| 701 | bool hasCleanup = false; | |
| 708 | 702 | // Scan action entries until you find a matching handler, cleanup, or the end of action list |
| 709 | 703 | while (true) |
| 710 | 704 | { |
| ... | ... | @@ -720,27 +714,17 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, |
| 720 | 714 | native_exception, unwind_exception); |
| 721 | 715 | if (catchType == 0) |
| 722 | 716 | { |
| 723 | // Found catch (...) catches everything, including foreign exceptions | |
| 724 | // If this is a type 1 search save state and return _URC_HANDLER_FOUND | |
| 725 | // If this is a type 2 search save state and return _URC_HANDLER_FOUND | |
| 726 | // If this is a type 3 search !_UA_FORCE_UNWIND, we should have found this in phase 1! | |
| 727 | // If this is a type 3 search _UA_FORCE_UNWIND, ignore handler and continue scan | |
| 728 | if ((actions & _UA_SEARCH_PHASE) || (actions & _UA_HANDLER_FRAME)) | |
| 729 | { | |
| 730 | // Save state and return _URC_HANDLER_FOUND | |
| 731 | results.ttypeIndex = ttypeIndex; | |
| 732 | results.actionRecord = actionRecord; | |
| 733 | results.landingPad = landingPad; | |
| 734 | results.adjustedPtr = get_thrown_object_ptr(unwind_exception); | |
| 735 | results.reason = _URC_HANDLER_FOUND; | |
| 736 | return; | |
| 737 | } | |
| 738 | else if (!(actions & _UA_FORCE_UNWIND)) | |
| 739 | { | |
| 740 | // It looks like the exception table has changed | |
| 741 | // on us. Likely stack corruption! | |
| 742 | call_terminate(native_exception, unwind_exception); | |
| 743 | } | |
| 717 | // Found catch (...) catches everything, including | |
| 718 | // foreign exceptions. This is search phase, cleanup | |
| 719 | // phase with foreign exception, or forced unwinding. | |
| 720 | assert(actions & (_UA_SEARCH_PHASE | _UA_HANDLER_FRAME | | |
| 721 | _UA_FORCE_UNWIND)); | |
| 722 | results.ttypeIndex = ttypeIndex; | |
| 723 | results.actionRecord = actionRecord; | |
| 724 | results.adjustedPtr = | |
| 725 | get_thrown_object_ptr(unwind_exception); | |
| 726 | results.reason = _URC_HANDLER_FOUND; | |
| 727 | return; | |
| 744 | 728 | } |
| 745 | 729 | // Else this is a catch (T) clause and will never |
| 746 | 730 | // catch a foreign exception |
| ... | ... | @@ -757,36 +741,25 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, |
| 757 | 741 | } |
| 758 | 742 | if (catchType->can_catch(excpType, adjustedPtr)) |
| 759 | 743 | { |
| 760 | // Found a matching handler | |
| 761 | // If this is a type 1 search save state and return _URC_HANDLER_FOUND | |
| 762 | // If this is a type 3 search and !_UA_FORCE_UNWIND, we should have found this in phase 1! | |
| 763 | // If this is a type 3 search and _UA_FORCE_UNWIND, ignore handler and continue scan | |
| 764 | if (actions & _UA_SEARCH_PHASE) | |
| 765 | { | |
| 766 | // Save state and return _URC_HANDLER_FOUND | |
| 767 | results.ttypeIndex = ttypeIndex; | |
| 768 | results.actionRecord = actionRecord; | |
| 769 | results.landingPad = landingPad; | |
| 770 | results.adjustedPtr = adjustedPtr; | |
| 771 | results.reason = _URC_HANDLER_FOUND; | |
| 772 | return; | |
| 773 | } | |
| 774 | else if (!(actions & _UA_FORCE_UNWIND)) | |
| 775 | { | |
| 776 | // It looks like the exception table has changed | |
| 777 | // on us. Likely stack corruption! | |
| 778 | call_terminate(native_exception, unwind_exception); | |
| 779 | } | |
| 744 | // Found a matching handler. This is either search | |
| 745 | // phase or forced unwinding. | |
| 746 | assert(actions & | |
| 747 | (_UA_SEARCH_PHASE | _UA_FORCE_UNWIND)); | |
| 748 | results.ttypeIndex = ttypeIndex; | |
| 749 | results.actionRecord = actionRecord; | |
| 750 | results.adjustedPtr = adjustedPtr; | |
| 751 | results.reason = _URC_HANDLER_FOUND; | |
| 752 | return; | |
| 780 | 753 | } |
| 781 | 754 | } |
| 782 | 755 | // Scan next action ... |
| 783 | 756 | } |
| 784 | 757 | else if (ttypeIndex < 0) |
| 785 | 758 | { |
| 786 | // Found an exception spec. If this is a foreign exception, | |
| 787 | // it is always caught. | |
| 788 | if (native_exception) | |
| 789 | { | |
| 759 | // Found an exception specification. | |
| 760 | if (actions & _UA_FORCE_UNWIND) { | |
| 761 | // Skip if forced unwinding. | |
| 762 | } else if (native_exception) { | |
| 790 | 763 | // Does the exception spec catch this native exception? |
| 791 | 764 | __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1; |
| 792 | 765 | void* adjustedPtr = get_thrown_object_ptr(unwind_exception); |
| ... | ... | @@ -801,77 +774,38 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, |
| 801 | 774 | ttypeEncoding, excpType, |
| 802 | 775 | adjustedPtr, unwind_exception)) |
| 803 | 776 | { |
| 804 | // native exception caught by exception spec | |
| 805 | // If this is a type 1 search, save state and return _URC_HANDLER_FOUND | |
| 806 | // If this is a type 3 search !_UA_FORCE_UNWIND, we should have found this in phase 1! | |
| 807 | // If this is a type 3 search _UA_FORCE_UNWIND, ignore handler and continue scan | |
| 808 | if (actions & _UA_SEARCH_PHASE) | |
| 809 | { | |
| 810 | // Save state and return _URC_HANDLER_FOUND | |
| 811 | results.ttypeIndex = ttypeIndex; | |
| 812 | results.actionRecord = actionRecord; | |
| 813 | results.landingPad = landingPad; | |
| 814 | results.adjustedPtr = adjustedPtr; | |
| 815 | results.reason = _URC_HANDLER_FOUND; | |
| 816 | return; | |
| 817 | } | |
| 818 | else if (!(actions & _UA_FORCE_UNWIND)) | |
| 819 | { | |
| 820 | // It looks like the exception table has changed | |
| 821 | // on us. Likely stack corruption! | |
| 822 | call_terminate(native_exception, unwind_exception); | |
| 823 | } | |
| 824 | } | |
| 825 | } | |
| 826 | else | |
| 827 | { | |
| 828 | // foreign exception caught by exception spec | |
| 829 | // If this is a type 1 search, save state and return _URC_HANDLER_FOUND | |
| 830 | // If this is a type 2 search, save state and return _URC_HANDLER_FOUND | |
| 831 | // If this is a type 3 search !_UA_FORCE_UNWIND, we should have found this in phase 1! | |
| 832 | // If this is a type 3 search _UA_FORCE_UNWIND, ignore handler and continue scan | |
| 833 | if ((actions & _UA_SEARCH_PHASE) || (actions & _UA_HANDLER_FRAME)) | |
| 834 | { | |
| 835 | // Save state and return _URC_HANDLER_FOUND | |
| 777 | // Native exception caught by exception | |
| 778 | // specification. | |
| 779 | assert(actions & _UA_SEARCH_PHASE); | |
| 836 | 780 | results.ttypeIndex = ttypeIndex; |
| 837 | 781 | results.actionRecord = actionRecord; |
| 838 | results.landingPad = landingPad; | |
| 839 | results.adjustedPtr = get_thrown_object_ptr(unwind_exception); | |
| 782 | results.adjustedPtr = adjustedPtr; | |
| 840 | 783 | results.reason = _URC_HANDLER_FOUND; |
| 841 | 784 | return; |
| 842 | 785 | } |
| 843 | else if (!(actions & _UA_FORCE_UNWIND)) | |
| 844 | { | |
| 845 | // It looks like the exception table has changed | |
| 846 | // on us. Likely stack corruption! | |
| 847 | call_terminate(native_exception, unwind_exception); | |
| 848 | } | |
| 849 | } | |
| 850 | // Scan next action ... | |
| 851 | } | |
| 852 | else // ttypeIndex == 0 | |
| 853 | { | |
| 854 | // Found a cleanup | |
| 855 | // If this is a type 1 search, ignore it and continue scan | |
| 856 | // If this is a type 2 search, ignore it and continue scan | |
| 857 | // If this is a type 3 search, save state and return _URC_HANDLER_FOUND | |
| 858 | if ((actions & _UA_CLEANUP_PHASE) && !(actions & _UA_HANDLER_FRAME)) | |
| 859 | { | |
| 860 | // Save state and return _URC_HANDLER_FOUND | |
| 786 | } else { | |
| 787 | // foreign exception caught by exception spec | |
| 861 | 788 | results.ttypeIndex = ttypeIndex; |
| 862 | 789 | results.actionRecord = actionRecord; |
| 863 | results.landingPad = landingPad; | |
| 864 | results.adjustedPtr = get_thrown_object_ptr(unwind_exception); | |
| 790 | results.adjustedPtr = | |
| 791 | get_thrown_object_ptr(unwind_exception); | |
| 865 | 792 | results.reason = _URC_HANDLER_FOUND; |
| 866 | 793 | return; |
| 867 | 794 | } |
| 795 | // Scan next action ... | |
| 796 | } else { | |
| 797 | hasCleanup = true; | |
| 868 | 798 | } |
| 869 | 799 | const uint8_t* temp = action; |
| 870 | 800 | int64_t actionOffset = readSLEB128(&temp); |
| 871 | 801 | if (actionOffset == 0) |
| 872 | 802 | { |
| 873 | // End of action list, no matching handler or cleanup found | |
| 874 | results.reason = _URC_CONTINUE_UNWIND; | |
| 803 | // End of action list. If this is phase 2 and we have found | |
| 804 | // a cleanup (ttypeIndex=0), return _URC_HANDLER_FOUND; | |
| 805 | // otherwise return _URC_CONTINUE_UNWIND. | |
| 806 | results.reason = hasCleanup && actions & _UA_CLEANUP_PHASE | |
| 807 | ? _URC_HANDLER_FOUND | |
| 808 | : _URC_CONTINUE_UNWIND; | |
| 875 | 809 | return; |
| 876 | 810 | } |
| 877 | 811 | // Go to next action |
| ... | ... | @@ -962,78 +896,51 @@ __gxx_personality_v0 |
| 962 | 896 | bool native_exception = (exceptionClass & get_vendor_and_language) == |
| 963 | 897 | (kOurExceptionClass & get_vendor_and_language); |
| 964 | 898 | scan_results results; |
| 899 | // Process a catch handler for a native exception first. | |
| 900 | if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME) && | |
| 901 | native_exception) { | |
| 902 | // Reload the results from the phase 1 cache. | |
| 903 | __cxa_exception* exception_header = | |
| 904 | (__cxa_exception*)(unwind_exception + 1) - 1; | |
| 905 | results.ttypeIndex = exception_header->handlerSwitchValue; | |
| 906 | results.actionRecord = exception_header->actionRecord; | |
| 907 | results.languageSpecificData = exception_header->languageSpecificData; | |
| 908 | results.landingPad = | |
| 909 | reinterpret_cast<uintptr_t>(exception_header->catchTemp); | |
| 910 | results.adjustedPtr = exception_header->adjustedPtr; | |
| 911 | ||
| 912 | // Jump to the handler. | |
| 913 | set_registers(unwind_exception, context, results); | |
| 914 | return _URC_INSTALL_CONTEXT; | |
| 915 | } | |
| 916 | ||
| 917 | // In other cases we need to scan LSDA. | |
| 918 | scan_eh_tab(results, actions, native_exception, unwind_exception, context); | |
| 919 | if (results.reason == _URC_CONTINUE_UNWIND || | |
| 920 | results.reason == _URC_FATAL_PHASE1_ERROR) | |
| 921 | return results.reason; | |
| 922 | ||
| 965 | 923 | if (actions & _UA_SEARCH_PHASE) |
| 966 | 924 | { |
| 967 | 925 | // Phase 1 search: All we're looking for in phase 1 is a handler that |
| 968 | 926 | // halts unwinding |
| 969 | scan_eh_tab(results, actions, native_exception, unwind_exception, context); | |
| 970 | if (results.reason == _URC_HANDLER_FOUND) | |
| 971 | { | |
| 972 | // Found one. Can we cache the results somewhere to optimize phase 2? | |
| 973 | if (native_exception) | |
| 974 | { | |
| 975 | __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1; | |
| 976 | exception_header->handlerSwitchValue = static_cast<int>(results.ttypeIndex); | |
| 977 | exception_header->actionRecord = results.actionRecord; | |
| 978 | exception_header->languageSpecificData = results.languageSpecificData; | |
| 979 | exception_header->catchTemp = reinterpret_cast<void*>(results.landingPad); | |
| 980 | exception_header->adjustedPtr = results.adjustedPtr; | |
| 981 | } | |
| 982 | return _URC_HANDLER_FOUND; | |
| 983 | } | |
| 984 | // Did not find a catching-handler. Return the results of the scan | |
| 985 | // (normally _URC_CONTINUE_UNWIND, but could have been _URC_FATAL_PHASE1_ERROR | |
| 986 | // if we were called improperly). | |
| 987 | return results.reason; | |
| 988 | } | |
| 989 | if (actions & _UA_CLEANUP_PHASE) | |
| 990 | { | |
| 991 | // Phase 2 search: | |
| 992 | // Did we find a catching handler in phase 1? | |
| 993 | if (actions & _UA_HANDLER_FRAME) | |
| 994 | { | |
| 995 | // Yes, phase 1 said we have a catching handler here. | |
| 996 | // Did we cache the results of the scan? | |
| 997 | if (native_exception) | |
| 998 | { | |
| 999 | // Yes, reload the results from the cache. | |
| 1000 | __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1; | |
| 1001 | results.ttypeIndex = exception_header->handlerSwitchValue; | |
| 1002 | results.actionRecord = exception_header->actionRecord; | |
| 1003 | results.languageSpecificData = exception_header->languageSpecificData; | |
| 1004 | results.landingPad = reinterpret_cast<uintptr_t>(exception_header->catchTemp); | |
| 1005 | results.adjustedPtr = exception_header->adjustedPtr; | |
| 1006 | } | |
| 1007 | else | |
| 1008 | { | |
| 1009 | // No, do the scan again to reload the results. | |
| 1010 | scan_eh_tab(results, actions, native_exception, unwind_exception, context); | |
| 1011 | // Phase 1 told us we would find a handler. Now in Phase 2 we | |
| 1012 | // didn't find a handler. The eh table should not be changing! | |
| 1013 | if (results.reason != _URC_HANDLER_FOUND) | |
| 1014 | call_terminate(native_exception, unwind_exception); | |
| 1015 | } | |
| 1016 | // Jump to the handler | |
| 1017 | set_registers(unwind_exception, context, results); | |
| 1018 | return _URC_INSTALL_CONTEXT; | |
| 1019 | } | |
| 1020 | // Either we didn't do a phase 1 search (due to forced unwinding), or | |
| 1021 | // phase 1 reported no catching-handlers. | |
| 1022 | // Search for a (non-catching) cleanup | |
| 1023 | scan_eh_tab(results, actions, native_exception, unwind_exception, context); | |
| 1024 | if (results.reason == _URC_HANDLER_FOUND) | |
| 1025 | { | |
| 1026 | // Found a non-catching handler. Jump to it: | |
| 1027 | set_registers(unwind_exception, context, results); | |
| 1028 | return _URC_INSTALL_CONTEXT; | |
| 927 | assert(results.reason == _URC_HANDLER_FOUND); | |
| 928 | if (native_exception) { | |
| 929 | // For a native exception, cache the LSDA result. | |
| 930 | __cxa_exception* exc = (__cxa_exception*)(unwind_exception + 1) - 1; | |
| 931 | exc->handlerSwitchValue = static_cast<int>(results.ttypeIndex); | |
| 932 | exc->actionRecord = results.actionRecord; | |
| 933 | exc->languageSpecificData = results.languageSpecificData; | |
| 934 | exc->catchTemp = reinterpret_cast<void*>(results.landingPad); | |
| 935 | exc->adjustedPtr = results.adjustedPtr; | |
| 1029 | 936 | } |
| 1030 | // Did not find a cleanup. Return the results of the scan | |
| 1031 | // (normally _URC_CONTINUE_UNWIND, but could have been _URC_FATAL_PHASE2_ERROR | |
| 1032 | // if we were called improperly). | |
| 1033 | return results.reason; | |
| 937 | return _URC_HANDLER_FOUND; | |
| 1034 | 938 | } |
| 1035 | // We were called improperly: neither a phase 1 or phase 2 search | |
| 1036 | return _URC_FATAL_PHASE1_ERROR; | |
| 939 | ||
| 940 | assert(actions & _UA_CLEANUP_PHASE); | |
| 941 | assert(results.reason == _URC_HANDLER_FOUND); | |
| 942 | set_registers(unwind_exception, context, results); | |
| 943 | return _URC_INSTALL_CONTEXT; | |
| 1037 | 944 | } |
| 1038 | 945 | |
| 1039 | 946 | #if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) |
lib/libcxxabi/src/demangle/ItaniumDemangle.h+167-36| ... | ... | @@ -82,6 +82,7 @@ |
| 82 | 82 | X(PostfixExpr) \ |
| 83 | 83 | X(ConditionalExpr) \ |
| 84 | 84 | X(MemberExpr) \ |
| 85 | X(SubobjectExpr) \ | |
| 85 | 86 | X(EnclosingExpr) \ |
| 86 | 87 | X(CastExpr) \ |
| 87 | 88 | X(SizeofParamPackExpr) \ |
| ... | ... | @@ -91,10 +92,10 @@ |
| 91 | 92 | X(PrefixExpr) \ |
| 92 | 93 | X(FunctionParam) \ |
| 93 | 94 | X(ConversionExpr) \ |
| 95 | X(PointerToMemberConversionExpr) \ | |
| 94 | 96 | X(InitListExpr) \ |
| 95 | 97 | X(FoldExpr) \ |
| 96 | 98 | X(ThrowExpr) \ |
| 97 | X(UUIDOfExpr) \ | |
| 98 | 99 | X(BoolExpr) \ |
| 99 | 100 | X(StringLiteral) \ |
| 100 | 101 | X(LambdaExpr) \ |
| ... | ... | @@ -1656,6 +1657,40 @@ public: |
| 1656 | 1657 | } |
| 1657 | 1658 | }; |
| 1658 | 1659 | |
| 1660 | class SubobjectExpr : public Node { | |
| 1661 | const Node *Type; | |
| 1662 | const Node *SubExpr; | |
| 1663 | StringView Offset; | |
| 1664 | NodeArray UnionSelectors; | |
| 1665 | bool OnePastTheEnd; | |
| 1666 | ||
| 1667 | public: | |
| 1668 | SubobjectExpr(const Node *Type_, const Node *SubExpr_, StringView Offset_, | |
| 1669 | NodeArray UnionSelectors_, bool OnePastTheEnd_) | |
| 1670 | : Node(KSubobjectExpr), Type(Type_), SubExpr(SubExpr_), Offset(Offset_), | |
| 1671 | UnionSelectors(UnionSelectors_), OnePastTheEnd(OnePastTheEnd_) {} | |
| 1672 | ||
| 1673 | template<typename Fn> void match(Fn F) const { | |
| 1674 | F(Type, SubExpr, Offset, UnionSelectors, OnePastTheEnd); | |
| 1675 | } | |
| 1676 | ||
| 1677 | void printLeft(OutputStream &S) const override { | |
| 1678 | SubExpr->print(S); | |
| 1679 | S += ".<"; | |
| 1680 | Type->print(S); | |
| 1681 | S += " at offset "; | |
| 1682 | if (Offset.empty()) { | |
| 1683 | S += "0"; | |
| 1684 | } else if (Offset[0] == 'n') { | |
| 1685 | S += "-"; | |
| 1686 | S += Offset.dropFront(); | |
| 1687 | } else { | |
| 1688 | S += Offset; | |
| 1689 | } | |
| 1690 | S += ">"; | |
| 1691 | } | |
| 1692 | }; | |
| 1693 | ||
| 1659 | 1694 | class EnclosingExpr : public Node { |
| 1660 | 1695 | const StringView Prefix; |
| 1661 | 1696 | const Node *Infix; |
| ... | ... | @@ -1843,6 +1878,28 @@ public: |
| 1843 | 1878 | } |
| 1844 | 1879 | }; |
| 1845 | 1880 | |
| 1881 | class PointerToMemberConversionExpr : public Node { | |
| 1882 | const Node *Type; | |
| 1883 | const Node *SubExpr; | |
| 1884 | StringView Offset; | |
| 1885 | ||
| 1886 | public: | |
| 1887 | PointerToMemberConversionExpr(const Node *Type_, const Node *SubExpr_, | |
| 1888 | StringView Offset_) | |
| 1889 | : Node(KPointerToMemberConversionExpr), Type(Type_), SubExpr(SubExpr_), | |
| 1890 | Offset(Offset_) {} | |
| 1891 | ||
| 1892 | template<typename Fn> void match(Fn F) const { F(Type, SubExpr, Offset); } | |
| 1893 | ||
| 1894 | void printLeft(OutputStream &S) const override { | |
| 1895 | S += "("; | |
| 1896 | Type->print(S); | |
| 1897 | S += ")("; | |
| 1898 | SubExpr->print(S); | |
| 1899 | S += ")"; | |
| 1900 | } | |
| 1901 | }; | |
| 1902 | ||
| 1846 | 1903 | class InitListExpr : public Node { |
| 1847 | 1904 | const Node *Ty; |
| 1848 | 1905 | NodeArray Inits; |
| ... | ... | @@ -1977,21 +2034,6 @@ public: |
| 1977 | 2034 | } |
| 1978 | 2035 | }; |
| 1979 | 2036 | |
| 1980 | // MSVC __uuidof extension, generated by clang in -fms-extensions mode. | |
| 1981 | class UUIDOfExpr : public Node { | |
| 1982 | Node *Operand; | |
| 1983 | public: | |
| 1984 | UUIDOfExpr(Node *Operand_) : Node(KUUIDOfExpr), Operand(Operand_) {} | |
| 1985 | ||
| 1986 | template<typename Fn> void match(Fn F) const { F(Operand); } | |
| 1987 | ||
| 1988 | void printLeft(OutputStream &S) const override { | |
| 1989 | S << "__uuidof("; | |
| 1990 | Operand->print(S); | |
| 1991 | S << ")"; | |
| 1992 | } | |
| 1993 | }; | |
| 1994 | ||
| 1995 | 2037 | class BoolExpr : public Node { |
| 1996 | 2038 | bool Value; |
| 1997 | 2039 | |
| ... | ... | @@ -2313,9 +2355,9 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser { |
| 2313 | 2355 | TemplateParamList Params; |
| 2314 | 2356 | |
| 2315 | 2357 | public: |
| 2316 | ScopedTemplateParamList(AbstractManglingParser *Parser) | |
| 2317 | : Parser(Parser), | |
| 2318 | OldNumTemplateParamLists(Parser->TemplateParams.size()) { | |
| 2358 | ScopedTemplateParamList(AbstractManglingParser *TheParser) | |
| 2359 | : Parser(TheParser), | |
| 2360 | OldNumTemplateParamLists(TheParser->TemplateParams.size()) { | |
| 2319 | 2361 | Parser->TemplateParams.push_back(&Params); |
| 2320 | 2362 | } |
| 2321 | 2363 | ~ScopedTemplateParamList() { |
| ... | ... | @@ -2437,6 +2479,8 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser { |
| 2437 | 2479 | Node *parseConversionExpr(); |
| 2438 | 2480 | Node *parseBracedExpr(); |
| 2439 | 2481 | Node *parseFoldExpr(); |
| 2482 | Node *parsePointerToMemberConversionExpr(); | |
| 2483 | Node *parseSubobjectExpr(); | |
| 2440 | 2484 | |
| 2441 | 2485 | /// Parse the <type> production. |
| 2442 | 2486 | Node *parseType(); |
| ... | ... | @@ -4404,6 +4448,50 @@ Node *AbstractManglingParser<Derived, Alloc>::parseFoldExpr() { |
| 4404 | 4448 | return make<FoldExpr>(IsLeftFold, OperatorName, Pack, Init); |
| 4405 | 4449 | } |
| 4406 | 4450 | |
| 4451 | // <expression> ::= mc <parameter type> <expr> [<offset number>] E | |
| 4452 | // | |
| 4453 | // Not yet in the spec: https://github.com/itanium-cxx-abi/cxx-abi/issues/47 | |
| 4454 | template <typename Derived, typename Alloc> | |
| 4455 | Node *AbstractManglingParser<Derived, Alloc>::parsePointerToMemberConversionExpr() { | |
| 4456 | Node *Ty = getDerived().parseType(); | |
| 4457 | if (!Ty) | |
| 4458 | return nullptr; | |
| 4459 | Node *Expr = getDerived().parseExpr(); | |
| 4460 | if (!Expr) | |
| 4461 | return nullptr; | |
| 4462 | StringView Offset = getDerived().parseNumber(true); | |
| 4463 | if (!consumeIf('E')) | |
| 4464 | return nullptr; | |
| 4465 | return make<PointerToMemberConversionExpr>(Ty, Expr, Offset); | |
| 4466 | } | |
| 4467 | ||
| 4468 | // <expression> ::= so <referent type> <expr> [<offset number>] <union-selector>* [p] E | |
| 4469 | // <union-selector> ::= _ [<number>] | |
| 4470 | // | |
| 4471 | // Not yet in the spec: https://github.com/itanium-cxx-abi/cxx-abi/issues/47 | |
| 4472 | template <typename Derived, typename Alloc> | |
| 4473 | Node *AbstractManglingParser<Derived, Alloc>::parseSubobjectExpr() { | |
| 4474 | Node *Ty = getDerived().parseType(); | |
| 4475 | if (!Ty) | |
| 4476 | return nullptr; | |
| 4477 | Node *Expr = getDerived().parseExpr(); | |
| 4478 | if (!Expr) | |
| 4479 | return nullptr; | |
| 4480 | StringView Offset = getDerived().parseNumber(true); | |
| 4481 | size_t SelectorsBegin = Names.size(); | |
| 4482 | while (consumeIf('_')) { | |
| 4483 | Node *Selector = make<NameType>(parseNumber()); | |
| 4484 | if (!Selector) | |
| 4485 | return nullptr; | |
| 4486 | Names.push_back(Selector); | |
| 4487 | } | |
| 4488 | bool OnePastTheEnd = consumeIf('p'); | |
| 4489 | if (!consumeIf('E')) | |
| 4490 | return nullptr; | |
| 4491 | return make<SubobjectExpr>( | |
| 4492 | Ty, Expr, Offset, popTrailingNodeArray(SelectorsBegin), OnePastTheEnd); | |
| 4493 | } | |
| 4494 | ||
| 4407 | 4495 | // <expression> ::= <unary operator-name> <expression> |
| 4408 | 4496 | // ::= <binary operator-name> <expression> <expression> |
| 4409 | 4497 | // ::= <ternary operator-name> <expression> <expression> <expression> |
| ... | ... | @@ -4661,6 +4749,9 @@ Node *AbstractManglingParser<Derived, Alloc>::parseExpr() { |
| 4661 | 4749 | return nullptr; |
| 4662 | 4750 | case 'm': |
| 4663 | 4751 | switch (First[1]) { |
| 4752 | case 'c': | |
| 4753 | First += 2; | |
| 4754 | return parsePointerToMemberConversionExpr(); | |
| 4664 | 4755 | case 'i': |
| 4665 | 4756 | First += 2; |
| 4666 | 4757 | return getDerived().parseBinaryExpr("-"); |
| ... | ... | @@ -4808,6 +4899,9 @@ Node *AbstractManglingParser<Derived, Alloc>::parseExpr() { |
| 4808 | 4899 | return Ex; |
| 4809 | 4900 | return make<CastExpr>("static_cast", T, Ex); |
| 4810 | 4901 | } |
| 4902 | case 'o': | |
| 4903 | First += 2; | |
| 4904 | return parseSubobjectExpr(); | |
| 4811 | 4905 | case 'p': { |
| 4812 | 4906 | First += 2; |
| 4813 | 4907 | Node *Child = getDerived().parseExpr(); |
| ... | ... | @@ -4903,6 +4997,43 @@ Node *AbstractManglingParser<Derived, Alloc>::parseExpr() { |
| 4903 | 4997 | } |
| 4904 | 4998 | } |
| 4905 | 4999 | return nullptr; |
| 5000 | case 'u': { | |
| 5001 | ++First; | |
| 5002 | Node *Name = getDerived().parseSourceName(/*NameState=*/nullptr); | |
| 5003 | if (!Name) | |
| 5004 | return nullptr; | |
| 5005 | // Special case legacy __uuidof mangling. The 't' and 'z' appear where the | |
| 5006 | // standard encoding expects a <template-arg>, and would be otherwise be | |
| 5007 | // interpreted as <type> node 'short' or 'ellipsis'. However, neither | |
| 5008 | // __uuidof(short) nor __uuidof(...) can actually appear, so there is no | |
| 5009 | // actual conflict here. | |
| 5010 | if (Name->getBaseName() == "__uuidof") { | |
| 5011 | if (numLeft() < 2) | |
| 5012 | return nullptr; | |
| 5013 | if (*First == 't') { | |
| 5014 | ++First; | |
| 5015 | Node *Ty = getDerived().parseType(); | |
| 5016 | if (!Ty) | |
| 5017 | return nullptr; | |
| 5018 | return make<CallExpr>(Name, makeNodeArray(&Ty, &Ty + 1)); | |
| 5019 | } | |
| 5020 | if (*First == 'z') { | |
| 5021 | ++First; | |
| 5022 | Node *Ex = getDerived().parseExpr(); | |
| 5023 | if (!Ex) | |
| 5024 | return nullptr; | |
| 5025 | return make<CallExpr>(Name, makeNodeArray(&Ex, &Ex + 1)); | |
| 5026 | } | |
| 5027 | } | |
| 5028 | size_t ExprsBegin = Names.size(); | |
| 5029 | while (!consumeIf('E')) { | |
| 5030 | Node *E = getDerived().parseTemplateArg(); | |
| 5031 | if (E == nullptr) | |
| 5032 | return E; | |
| 5033 | Names.push_back(E); | |
| 5034 | } | |
| 5035 | return make<CallExpr>(Name, popTrailingNodeArray(ExprsBegin)); | |
| 5036 | } | |
| 4906 | 5037 | case '1': |
| 4907 | 5038 | case '2': |
| 4908 | 5039 | case '3': |
| ... | ... | @@ -4914,21 +5045,6 @@ Node *AbstractManglingParser<Derived, Alloc>::parseExpr() { |
| 4914 | 5045 | case '9': |
| 4915 | 5046 | return getDerived().parseUnresolvedName(); |
| 4916 | 5047 | } |
| 4917 | ||
| 4918 | if (consumeIf("u8__uuidoft")) { | |
| 4919 | Node *Ty = getDerived().parseType(); | |
| 4920 | if (!Ty) | |
| 4921 | return nullptr; | |
| 4922 | return make<UUIDOfExpr>(Ty); | |
| 4923 | } | |
| 4924 | ||
| 4925 | if (consumeIf("u8__uuidofz")) { | |
| 4926 | Node *Ex = getDerived().parseExpr(); | |
| 4927 | if (!Ex) | |
| 4928 | return nullptr; | |
| 4929 | return make<UUIDOfExpr>(Ex); | |
| 4930 | } | |
| 4931 | ||
| 4932 | 5048 | return nullptr; |
| 4933 | 5049 | } |
| 4934 | 5050 | |
| ... | ... | @@ -4975,6 +5091,16 @@ Node *AbstractManglingParser<Derived, Alloc>::parseSpecialName() { |
| 4975 | 5091 | switch (look()) { |
| 4976 | 5092 | case 'T': |
| 4977 | 5093 | switch (look(1)) { |
| 5094 | // TA <template-arg> # template parameter object | |
| 5095 | // | |
| 5096 | // Not yet in the spec: https://github.com/itanium-cxx-abi/cxx-abi/issues/63 | |
| 5097 | case 'A': { | |
| 5098 | First += 2; | |
| 5099 | Node *Arg = getDerived().parseTemplateArg(); | |
| 5100 | if (Arg == nullptr) | |
| 5101 | return nullptr; | |
| 5102 | return make<SpecialName>("template parameter object for ", Arg); | |
| 5103 | } | |
| 4978 | 5104 | // TV <type> # virtual table |
| 4979 | 5105 | case 'V': { |
| 4980 | 5106 | First += 2; |
| ... | ... | @@ -5103,7 +5229,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseEncoding() { |
| 5103 | 5229 | decltype(TemplateParams) OldParams; |
| 5104 | 5230 | |
| 5105 | 5231 | public: |
| 5106 | SaveTemplateParams(AbstractManglingParser *Parser) : Parser(Parser) { | |
| 5232 | SaveTemplateParams(AbstractManglingParser *TheParser) : Parser(TheParser) { | |
| 5107 | 5233 | OldParams = std::move(Parser->TemplateParams); |
| 5108 | 5234 | Parser->TemplateParams.clear(); |
| 5109 | 5235 | } |
| ... | ... | @@ -5203,7 +5329,12 @@ struct FloatData<long double> |
| 5203 | 5329 | #else |
| 5204 | 5330 | static const size_t mangled_size = 20; // May need to be adjusted to 16 or 24 on other platforms |
| 5205 | 5331 | #endif |
| 5206 | static const size_t max_demangled_size = 40; | |
| 5332 | // `-0x1.ffffffffffffffffffffffffffffp+16383` + 'L' + '\0' == 42 bytes. | |
| 5333 | // 28 'f's * 4 bits == 112 bits, which is the number of mantissa bits. | |
| 5334 | // Negatives are one character longer than positives. | |
| 5335 | // `0x1.` and `p` are constant, and exponents `+16383` and `-16382` are the | |
| 5336 | // same length. 1 sign bit, 112 mantissa bits, and 15 exponent bits == 128. | |
| 5337 | static const size_t max_demangled_size = 42; | |
| 5207 | 5338 | static constexpr const char *spec = "%LaL"; |
| 5208 | 5339 | }; |
| 5209 | 5340 |
lib/libcxxabi/src/demangle/Utility.h+1-1| ... | ... | @@ -52,7 +52,7 @@ class OutputStream { |
| 52 | 52 | char *TempPtr = std::end(Temp); |
| 53 | 53 | |
| 54 | 54 | while (N) { |
| 55 | *--TempPtr = '0' + char(N % 10); | |
| 55 | *--TempPtr = char('0' + N % 10); | |
| 56 | 56 | N /= 10; |
| 57 | 57 | } |
| 58 | 58 |
lib/libcxxabi/src/fallback_malloc.cpp+16-23| ... | ... | @@ -6,9 +6,6 @@ |
| 6 | 6 | // |
| 7 | 7 | //===----------------------------------------------------------------------===// |
| 8 | 8 | |
| 9 | // Define _LIBCPP_BUILDING_LIBRARY to ensure _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION | |
| 10 | // is only defined when libc aligned allocation is not available. | |
| 11 | #define _LIBCPP_BUILDING_LIBRARY | |
| 12 | 9 | #include "fallback_malloc.h" |
| 13 | 10 | |
| 14 | 11 | #include <__threading_support> |
| ... | ... | @@ -20,6 +17,7 @@ |
| 20 | 17 | |
| 21 | 18 | #include <stdlib.h> // for malloc, calloc, free |
| 22 | 19 | #include <string.h> // for memset |
| 20 | #include <new> // for std::__libcpp_aligned_{alloc,free} | |
| 23 | 21 | |
| 24 | 22 | // A small, simple heap manager based (loosely) on |
| 25 | 23 | // the startup heap manager from FreeBSD, optimized for space. |
| ... | ... | @@ -144,29 +142,26 @@ void fallback_free(void* ptr) { |
| 144 | 142 | mutexor mtx(&heap_mutex); |
| 145 | 143 | |
| 146 | 144 | #ifdef DEBUG_FALLBACK_MALLOC |
| 147 | std::cout << "Freeing item at " << offset_from_node(cp) << " of size " | |
| 148 | << cp->len << std::endl; | |
| 145 | std::printf("Freeing item at %d of size %d\n", offset_from_node(cp), cp->len); | |
| 149 | 146 | #endif |
| 150 | 147 | |
| 151 | 148 | for (p = freelist, prev = 0; p && p != list_end; |
| 152 | 149 | prev = p, p = node_from_offset(p->next_node)) { |
| 153 | 150 | #ifdef DEBUG_FALLBACK_MALLOC |
| 154 | std::cout << " p, cp, after (p), after(cp) " << offset_from_node(p) << ' ' | |
| 155 | << offset_from_node(cp) << ' ' << offset_from_node(after(p)) | |
| 156 | << ' ' << offset_from_node(after(cp)) << std::endl; | |
| 151 | std::printf(" p=%d, cp=%d, after(p)=%d, after(cp)=%d\n", | |
| 152 | offset_from_node(p), offset_from_node(cp), | |
| 153 | offset_from_node(after(p)), offset_from_node(after(cp))); | |
| 157 | 154 | #endif |
| 158 | 155 | if (after(p) == cp) { |
| 159 | 156 | #ifdef DEBUG_FALLBACK_MALLOC |
| 160 | std::cout << " Appending onto chunk at " << offset_from_node(p) | |
| 161 | << std::endl; | |
| 157 | std::printf(" Appending onto chunk at %d\n", offset_from_node(p)); | |
| 162 | 158 | #endif |
| 163 | 159 | p->len = static_cast<heap_size>( |
| 164 | 160 | p->len + cp->len); // make the free heap_node larger |
| 165 | 161 | return; |
| 166 | 162 | } else if (after(cp) == p) { // there's a free heap_node right after |
| 167 | 163 | #ifdef DEBUG_FALLBACK_MALLOC |
| 168 | std::cout << " Appending free chunk at " << offset_from_node(p) | |
| 169 | << std::endl; | |
| 164 | std::printf(" Appending free chunk at %d\n", offset_from_node(p)); | |
| 170 | 165 | #endif |
| 171 | 166 | cp->len = static_cast<heap_size>(cp->len + p->len); |
| 172 | 167 | if (prev == 0) { |
| ... | ... | @@ -179,8 +174,7 @@ void fallback_free(void* ptr) { |
| 179 | 174 | } |
| 180 | 175 | // Nothing to merge with, add it to the start of the free list |
| 181 | 176 | #ifdef DEBUG_FALLBACK_MALLOC |
| 182 | std::cout << " Making new free list entry " << offset_from_node(cp) | |
| 183 | << std::endl; | |
| 177 | std::printf(" Making new free list entry %d\n", offset_from_node(cp)); | |
| 184 | 178 | #endif |
| 185 | 179 | cp->next_node = offset_from_node(freelist); |
| 186 | 180 | freelist = cp; |
| ... | ... | @@ -195,11 +189,11 @@ size_t print_free_list() { |
| 195 | 189 | |
| 196 | 190 | for (p = freelist, prev = 0; p && p != list_end; |
| 197 | 191 | prev = p, p = node_from_offset(p->next_node)) { |
| 198 | std::cout << (prev == 0 ? "" : " ") << "Offset: " << offset_from_node(p) | |
| 199 | << "\tsize: " << p->len << " Next: " << p->next_node << std::endl; | |
| 192 | std::printf("%sOffset: %d\tsize: %d Next: %d\n", | |
| 193 | (prev == 0 ? "" : " "), offset_from_node(p), p->len, p->next_node); | |
| 200 | 194 | total_free += p->len; |
| 201 | 195 | } |
| 202 | std::cout << "Total Free space: " << total_free << std::endl; | |
| 196 | std::printf("Total Free space: %d\n", total_free); | |
| 203 | 197 | return total_free; |
| 204 | 198 | } |
| 205 | 199 | #endif |
| ... | ... | @@ -211,7 +205,7 @@ struct __attribute__((aligned)) __aligned_type {}; |
| 211 | 205 | |
| 212 | 206 | void* __aligned_malloc_with_fallback(size_t size) { |
| 213 | 207 | #if defined(_WIN32) |
| 214 | if (void* dest = _aligned_malloc(size, alignof(__aligned_type))) | |
| 208 | if (void* dest = std::__libcpp_aligned_alloc(alignof(__aligned_type), size)) | |
| 215 | 209 | return dest; |
| 216 | 210 | #elif defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) |
| 217 | 211 | if (void* dest = ::malloc(size)) |
| ... | ... | @@ -219,8 +213,7 @@ void* __aligned_malloc_with_fallback(size_t size) { |
| 219 | 213 | #else |
| 220 | 214 | if (size == 0) |
| 221 | 215 | size = 1; |
| 222 | void* dest; | |
| 223 | if (::posix_memalign(&dest, __alignof(__aligned_type), size) == 0) | |
| 216 | if (void* dest = std::__libcpp_aligned_alloc(__alignof(__aligned_type), size)) | |
| 224 | 217 | return dest; |
| 225 | 218 | #endif |
| 226 | 219 | return fallback_malloc(size); |
| ... | ... | @@ -241,10 +234,10 @@ void __aligned_free_with_fallback(void* ptr) { |
| 241 | 234 | if (is_fallback_ptr(ptr)) |
| 242 | 235 | fallback_free(ptr); |
| 243 | 236 | else { |
| 244 | #if defined(_WIN32) | |
| 245 | ::_aligned_free(ptr); | |
| 246 | #else | |
| 237 | #if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) | |
| 247 | 238 | ::free(ptr); |
| 239 | #else | |
| 240 | std::__libcpp_aligned_free(ptr); | |
| 248 | 241 | #endif |
| 249 | 242 | } |
| 250 | 243 | } |
lib/libcxxabi/src/include/refstring.h deleted-131| ... | ... | @@ -1,131 +0,0 @@ |
| 1 | //===------------------------ __refstring ---------------------------------===// | |
| 2 | // | |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| 4 | // See https://llvm.org/LICENSE.txt for license information. | |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| 6 | // | |
| 7 | //===----------------------------------------------------------------------===// | |
| 8 | ||
| 9 | // FIXME: This file is copied from libcxx/src/include/refstring.h. Instead of | |
| 10 | // duplicating the file in libc++abi we should require that the libc++ sources | |
| 11 | // are available when building libc++abi. | |
| 12 | ||
| 13 | #ifndef _LIBCPPABI_REFSTRING_H | |
| 14 | #define _LIBCPPABI_REFSTRING_H | |
| 15 | ||
| 16 | #include <__config> | |
| 17 | #include <stdexcept> | |
| 18 | #include <cstddef> | |
| 19 | #include <cstring> | |
| 20 | #ifdef __APPLE__ | |
| 21 | #include <dlfcn.h> | |
| 22 | #include <mach-o/dyld.h> | |
| 23 | #endif | |
| 24 | #include "atomic_support.h" | |
| 25 | ||
| 26 | _LIBCPP_BEGIN_NAMESPACE_STD | |
| 27 | ||
| 28 | namespace __refstring_imp { namespace { | |
| 29 | typedef int count_t; | |
| 30 | ||
| 31 | struct _Rep_base { | |
| 32 | std::size_t len; | |
| 33 | std::size_t cap; | |
| 34 | count_t count; | |
| 35 | }; | |
| 36 | ||
| 37 | inline _Rep_base* rep_from_data(const char *data_) noexcept { | |
| 38 | char *data = const_cast<char *>(data_); | |
| 39 | return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base)); | |
| 40 | } | |
| 41 | ||
| 42 | inline char * data_from_rep(_Rep_base *rep) noexcept { | |
| 43 | char *data = reinterpret_cast<char *>(rep); | |
| 44 | return data + sizeof(*rep); | |
| 45 | } | |
| 46 | ||
| 47 | #if defined(__APPLE__) | |
| 48 | inline | |
| 49 | const char* compute_gcc_empty_string_storage() _NOEXCEPT | |
| 50 | { | |
| 51 | void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); | |
| 52 | if (handle == nullptr) | |
| 53 | return nullptr; | |
| 54 | void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE"); | |
| 55 | if (sym == nullptr) | |
| 56 | return nullptr; | |
| 57 | return data_from_rep(reinterpret_cast<_Rep_base *>(sym)); | |
| 58 | } | |
| 59 | ||
| 60 | inline | |
| 61 | const char* | |
| 62 | get_gcc_empty_string_storage() _NOEXCEPT | |
| 63 | { | |
| 64 | static const char* p = compute_gcc_empty_string_storage(); | |
| 65 | return p; | |
| 66 | } | |
| 67 | #endif | |
| 68 | ||
| 69 | }} // namespace __refstring_imp | |
| 70 | ||
| 71 | using namespace __refstring_imp; | |
| 72 | ||
| 73 | inline | |
| 74 | __libcpp_refstring::__libcpp_refstring(const char* msg) { | |
| 75 | std::size_t len = strlen(msg); | |
| 76 | _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1)); | |
| 77 | rep->len = len; | |
| 78 | rep->cap = len; | |
| 79 | rep->count = 0; | |
| 80 | char *data = data_from_rep(rep); | |
| 81 | std::memcpy(data, msg, len + 1); | |
| 82 | __imp_ = data; | |
| 83 | } | |
| 84 | ||
| 85 | inline | |
| 86 | __libcpp_refstring::__libcpp_refstring(const __libcpp_refstring &s) _NOEXCEPT | |
| 87 | : __imp_(s.__imp_) | |
| 88 | { | |
| 89 | if (__uses_refcount()) | |
| 90 | __libcpp_atomic_add(&rep_from_data(__imp_)->count, 1); | |
| 91 | } | |
| 92 | ||
| 93 | inline | |
| 94 | __libcpp_refstring& __libcpp_refstring::operator=(__libcpp_refstring const& s) _NOEXCEPT { | |
| 95 | bool adjust_old_count = __uses_refcount(); | |
| 96 | struct _Rep_base *old_rep = rep_from_data(__imp_); | |
| 97 | __imp_ = s.__imp_; | |
| 98 | if (__uses_refcount()) | |
| 99 | __libcpp_atomic_add(&rep_from_data(__imp_)->count, 1); | |
| 100 | if (adjust_old_count) | |
| 101 | { | |
| 102 | if (__libcpp_atomic_add(&old_rep->count, count_t(-1)) < 0) | |
| 103 | { | |
| 104 | ::operator delete(old_rep); | |
| 105 | } | |
| 106 | } | |
| 107 | return *this; | |
| 108 | } | |
| 109 | ||
| 110 | inline | |
| 111 | __libcpp_refstring::~__libcpp_refstring() { | |
| 112 | if (__uses_refcount()) { | |
| 113 | _Rep_base* rep = rep_from_data(__imp_); | |
| 114 | if (__libcpp_atomic_add(&rep->count, count_t(-1)) < 0) { | |
| 115 | ::operator delete(rep); | |
| 116 | } | |
| 117 | } | |
| 118 | } | |
| 119 | ||
| 120 | inline | |
| 121 | bool __libcpp_refstring::__uses_refcount() const { | |
| 122 | #ifdef __APPLE__ | |
| 123 | return __imp_ != get_gcc_empty_string_storage(); | |
| 124 | #else | |
| 125 | return true; | |
| 126 | #endif | |
| 127 | } | |
| 128 | ||
| 129 | _LIBCPP_END_NAMESPACE_STD | |
| 130 | ||
| 131 | #endif //_LIBCPPABI_REFSTRING_H |
lib/libcxxabi/src/private_typeinfo.cpp+31-3| ... | ... | @@ -61,6 +61,16 @@ is_equal(const std::type_info* x, const std::type_info* y, bool use_strcmp) |
| 61 | 61 | return x == y || strcmp(x->name(), y->name()) == 0; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | static inline ptrdiff_t update_offset_to_base(const char* vtable, | |
| 65 | ptrdiff_t offset_to_base) { | |
| 66 | #if __has_feature(cxx_abi_relative_vtable) | |
| 67 | // VTable components are 32 bits in the relative vtables ABI. | |
| 68 | return *reinterpret_cast<const int32_t*>(vtable + offset_to_base); | |
| 69 | #else | |
| 70 | return *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base); | |
| 71 | #endif | |
| 72 | } | |
| 73 | ||
| 64 | 74 | namespace __cxxabiv1 |
| 65 | 75 | { |
| 66 | 76 | |
| ... | ... | @@ -297,7 +307,7 @@ __base_class_type_info::has_unambiguous_public_base(__dynamic_cast_info* info, |
| 297 | 307 | if (__offset_flags & __virtual_mask) |
| 298 | 308 | { |
| 299 | 309 | const char* vtable = *static_cast<const char*const*>(adjustedPtr); |
| 300 | offset_to_base = *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base); | |
| 310 | offset_to_base = update_offset_to_base(vtable, offset_to_base); | |
| 301 | 311 | } |
| 302 | 312 | } |
| 303 | 313 | __base_type->has_unambiguous_public_base( |
| ... | ... | @@ -615,10 +625,26 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, |
| 615 | 625 | // Possible future optimization: Take advantage of src2dst_offset |
| 616 | 626 | |
| 617 | 627 | // Get (dynamic_ptr, dynamic_type) from static_ptr |
| 628 | #if __has_feature(cxx_abi_relative_vtable) | |
| 629 | // The vtable address will point to the first virtual function, which is 8 | |
| 630 | // bytes after the start of the vtable (4 for the offset from top + 4 for the typeinfo component). | |
| 631 | const int32_t* vtable = | |
| 632 | *reinterpret_cast<const int32_t* const*>(static_ptr); | |
| 633 | int32_t offset_to_derived = vtable[-2]; | |
| 634 | const void* dynamic_ptr = static_cast<const char*>(static_ptr) + offset_to_derived; | |
| 635 | ||
| 636 | // The typeinfo component is now a relative offset to a proxy. | |
| 637 | int32_t offset_to_ti_proxy = vtable[-1]; | |
| 638 | const uint8_t* ptr_to_ti_proxy = | |
| 639 | reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy; | |
| 640 | const __class_type_info* dynamic_type = | |
| 641 | *(reinterpret_cast<const __class_type_info* const*>(ptr_to_ti_proxy)); | |
| 642 | #else | |
| 618 | 643 | void **vtable = *static_cast<void ** const *>(static_ptr); |
| 619 | 644 | ptrdiff_t offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]); |
| 620 | 645 | const void* dynamic_ptr = static_cast<const char*>(static_ptr) + offset_to_derived; |
| 621 | 646 | const __class_type_info* dynamic_type = static_cast<const __class_type_info*>(vtable[-1]); |
| 647 | #endif | |
| 622 | 648 | |
| 623 | 649 | // Initialize answer to nullptr. This will be changed from the search |
| 624 | 650 | // results if a non-null answer is found. Regardless, this is what will |
| ... | ... | @@ -641,6 +667,7 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, |
| 641 | 667 | { |
| 642 | 668 | // We get here only if there is some kind of visibility problem |
| 643 | 669 | // in client code. |
| 670 | static_assert(std::atomic<size_t>::is_always_lock_free, ""); | |
| 644 | 671 | static std::atomic<size_t> error_count(0); |
| 645 | 672 | size_t error_count_snapshot = error_count.fetch_add(1, std::memory_order_relaxed); |
| 646 | 673 | if ((error_count_snapshot & (error_count_snapshot-1)) == 0) |
| ... | ... | @@ -667,6 +694,7 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, |
| 667 | 694 | if (info.path_dst_ptr_to_static_ptr == unknown && |
| 668 | 695 | info.path_dynamic_ptr_to_static_ptr == unknown) |
| 669 | 696 | { |
| 697 | static_assert(std::atomic<size_t>::is_always_lock_free, ""); | |
| 670 | 698 | static std::atomic<size_t> error_count(0); |
| 671 | 699 | size_t error_count_snapshot = error_count.fetch_add(1, std::memory_order_relaxed); |
| 672 | 700 | if ((error_count_snapshot & (error_count_snapshot-1)) == 0) |
| ... | ... | @@ -1265,7 +1293,7 @@ __base_class_type_info::search_above_dst(__dynamic_cast_info* info, |
| 1265 | 1293 | if (__offset_flags & __virtual_mask) |
| 1266 | 1294 | { |
| 1267 | 1295 | const char* vtable = *static_cast<const char*const*>(current_ptr); |
| 1268 | offset_to_base = *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base); | |
| 1296 | offset_to_base = update_offset_to_base(vtable, offset_to_base); | |
| 1269 | 1297 | } |
| 1270 | 1298 | __base_type->search_above_dst(info, dst_ptr, |
| 1271 | 1299 | static_cast<const char*>(current_ptr) + offset_to_base, |
| ... | ... | @@ -1285,7 +1313,7 @@ __base_class_type_info::search_below_dst(__dynamic_cast_info* info, |
| 1285 | 1313 | if (__offset_flags & __virtual_mask) |
| 1286 | 1314 | { |
| 1287 | 1315 | const char* vtable = *static_cast<const char*const*>(current_ptr); |
| 1288 | offset_to_base = *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base); | |
| 1316 | offset_to_base = update_offset_to_base(vtable, offset_to_base); | |
| 1289 | 1317 | } |
| 1290 | 1318 | __base_type->search_below_dst(info, |
| 1291 | 1319 | static_cast<const char*>(current_ptr) + offset_to_base, |
lib/libcxxabi/src/stdlib_exception.cpp-1| ... | ... | @@ -6,7 +6,6 @@ |
| 6 | 6 | // |
| 7 | 7 | //===----------------------------------------------------------------------===// |
| 8 | 8 | |
| 9 | #define _LIBCPP_BUILDING_LIBRARY | |
| 10 | 9 | #include <new> |
| 11 | 10 | #include <exception> |
| 12 | 11 |
lib/libcxxabi/src/stdlib_new_delete.cpp+15-22| ... | ... | @@ -8,7 +8,6 @@ |
| 8 | 8 | // This file implements the new and delete operators. |
| 9 | 9 | //===----------------------------------------------------------------------===// |
| 10 | 10 | |
| 11 | #define _LIBCPP_BUILDING_LIBRARY | |
| 12 | 11 | #include "__cxxabi_config.h" |
| 13 | 12 | #include <new> |
| 14 | 13 | #include <cstdlib> |
| ... | ... | @@ -28,7 +27,7 @@ operator new(std::size_t size) _THROW_BAD_ALLOC |
| 28 | 27 | if (size == 0) |
| 29 | 28 | size = 1; |
| 30 | 29 | void* p; |
| 31 | while ((p = ::malloc(size)) == 0) | |
| 30 | while ((p = ::malloc(size)) == nullptr) | |
| 32 | 31 | { |
| 33 | 32 | // If malloc fails and there is a new_handler, |
| 34 | 33 | // call it to try free up memory. |
| ... | ... | @@ -49,7 +48,7 @@ _LIBCXXABI_WEAK |
| 49 | 48 | void* |
| 50 | 49 | operator new(size_t size, const std::nothrow_t&) _NOEXCEPT |
| 51 | 50 | { |
| 52 | void* p = 0; | |
| 51 | void* p = nullptr; | |
| 53 | 52 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 54 | 53 | try |
| 55 | 54 | { |
| ... | ... | @@ -75,7 +74,7 @@ _LIBCXXABI_WEAK |
| 75 | 74 | void* |
| 76 | 75 | operator new[](size_t size, const std::nothrow_t&) _NOEXCEPT |
| 77 | 76 | { |
| 78 | void* p = 0; | |
| 77 | void* p = nullptr; | |
| 79 | 78 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 80 | 79 | try |
| 81 | 80 | { |
| ... | ... | @@ -94,8 +93,7 @@ _LIBCXXABI_WEAK |
| 94 | 93 | void |
| 95 | 94 | operator delete(void* ptr) _NOEXCEPT |
| 96 | 95 | { |
| 97 | if (ptr) | |
| 98 | ::free(ptr); | |
| 96 | ::free(ptr); | |
| 99 | 97 | } |
| 100 | 98 | |
| 101 | 99 | _LIBCXXABI_WEAK |
| ... | ... | @@ -143,15 +141,16 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC |
| 143 | 141 | size = 1; |
| 144 | 142 | if (static_cast<size_t>(alignment) < sizeof(void*)) |
| 145 | 143 | alignment = std::align_val_t(sizeof(void*)); |
| 144 | ||
| 145 | // Try allocating memory. If allocation fails and there is a new_handler, | |
| 146 | // call it to try free up memory, and try again until it succeeds, or until | |
| 147 | // the new_handler decides to terminate. | |
| 148 | // | |
| 149 | // If allocation fails and there is no new_handler, we throw bad_alloc | |
| 150 | // (or return nullptr if exceptions are disabled). | |
| 146 | 151 | void* p; |
| 147 | #if defined(_LIBCPP_WIN32API) | |
| 148 | while ((p = _aligned_malloc(size, static_cast<size_t>(alignment))) == nullptr) | |
| 149 | #else | |
| 150 | while (::posix_memalign(&p, static_cast<size_t>(alignment), size) != 0) | |
| 151 | #endif | |
| 152 | while ((p = std::__libcpp_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr) | |
| 152 | 153 | { |
| 153 | // If posix_memalign fails and there is a new_handler, | |
| 154 | // call it to try free up memory. | |
| 155 | 154 | std::new_handler nh = std::get_new_handler(); |
| 156 | 155 | if (nh) |
| 157 | 156 | nh(); |
| ... | ... | @@ -159,7 +158,6 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC |
| 159 | 158 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 160 | 159 | throw std::bad_alloc(); |
| 161 | 160 | #else |
| 162 | p = nullptr; // posix_memalign doesn't initialize 'p' on failure | |
| 163 | 161 | break; |
| 164 | 162 | #endif |
| 165 | 163 | } |
| ... | ... | @@ -171,7 +169,7 @@ _LIBCXXABI_WEAK |
| 171 | 169 | void* |
| 172 | 170 | operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) _NOEXCEPT |
| 173 | 171 | { |
| 174 | void* p = 0; | |
| 172 | void* p = nullptr; | |
| 175 | 173 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 176 | 174 | try |
| 177 | 175 | { |
| ... | ... | @@ -197,7 +195,7 @@ _LIBCXXABI_WEAK |
| 197 | 195 | void* |
| 198 | 196 | operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) _NOEXCEPT |
| 199 | 197 | { |
| 200 | void* p = 0; | |
| 198 | void* p = nullptr; | |
| 201 | 199 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 202 | 200 | try |
| 203 | 201 | { |
| ... | ... | @@ -216,12 +214,7 @@ _LIBCXXABI_WEAK |
| 216 | 214 | void |
| 217 | 215 | operator delete(void* ptr, std::align_val_t) _NOEXCEPT |
| 218 | 216 | { |
| 219 | if (ptr) | |
| 220 | #if defined(_LIBCPP_WIN32API) | |
| 221 | ::_aligned_free(ptr); | |
| 222 | #else | |
| 223 | ::free(ptr); | |
| 224 | #endif | |
| 217 | std::__libcpp_aligned_free(ptr); | |
| 225 | 218 | } |
| 226 | 219 | |
| 227 | 220 | _LIBCXXABI_WEAK |
lib/libcxxabi/src/stdlib_stdexcept.cpp+1-1| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | // |
| 7 | 7 | //===----------------------------------------------------------------------===// |
| 8 | 8 | |
| 9 | #include "include/refstring.h" | |
| 9 | #include "../../libcxx/src/include/refstring.h" | |
| 10 | 10 | #include "stdexcept" |
| 11 | 11 | #include "new" |
| 12 | 12 | #include <cstdlib> |
lib/libunwind/include/__libunwind_config.h+10| ... | ... | @@ -25,8 +25,12 @@ |
| 25 | 25 | #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 31 |
| 26 | 26 | #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON 34 |
| 27 | 27 | #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 64 |
| 28 | #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_VE 143 | |
| 28 | 29 | |
| 29 | 30 | #if defined(_LIBUNWIND_IS_NATIVE_ONLY) |
| 31 | # if defined(__linux__) | |
| 32 | # define _LIBUNWIND_TARGET_LINUX 1 | |
| 33 | # endif | |
| 30 | 34 | # if defined(__i386__) |
| 31 | 35 | # define _LIBUNWIND_TARGET_I386 |
| 32 | 36 | # define _LIBUNWIND_CONTEXT_SIZE 8 |
| ... | ... | @@ -135,6 +139,11 @@ |
| 135 | 139 | # error "Unsupported RISC-V ABI" |
| 136 | 140 | # endif |
| 137 | 141 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV |
| 142 | # elif defined(__ve__) | |
| 143 | # define _LIBUNWIND_TARGET_VE 1 | |
| 144 | # define _LIBUNWIND_CONTEXT_SIZE 67 | |
| 145 | # define _LIBUNWIND_CURSOR_SIZE 79 | |
| 146 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_VE | |
| 138 | 147 | # else |
| 139 | 148 | # error "Unsupported architecture." |
| 140 | 149 | # endif |
| ... | ... | @@ -151,6 +160,7 @@ |
| 151 | 160 | # define _LIBUNWIND_TARGET_SPARC 1 |
| 152 | 161 | # define _LIBUNWIND_TARGET_HEXAGON 1 |
| 153 | 162 | # define _LIBUNWIND_TARGET_RISCV 1 |
| 163 | # define _LIBUNWIND_TARGET_VE 1 | |
| 154 | 164 | # define _LIBUNWIND_CONTEXT_SIZE 167 |
| 155 | 165 | # define _LIBUNWIND_CURSOR_SIZE 179 |
| 156 | 166 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 287 |
lib/libunwind/include/libunwind.h+159-1| ... | ... | @@ -43,6 +43,12 @@ |
| 43 | 43 | #define LIBUNWIND_AVAIL |
| 44 | 44 | #endif |
| 45 | 45 | |
| 46 | #if defined(_WIN32) && defined(__SEH__) | |
| 47 | #define LIBUNWIND_CURSOR_ALIGNMENT_ATTR __attribute__((__aligned__(16))) | |
| 48 | #else | |
| 49 | #define LIBUNWIND_CURSOR_ALIGNMENT_ATTR | |
| 50 | #endif | |
| 51 | ||
| 46 | 52 | /* error codes */ |
| 47 | 53 | enum { |
| 48 | 54 | UNW_ESUCCESS = 0, /* no error */ |
| ... | ... | @@ -68,7 +74,7 @@ typedef struct unw_context_t unw_context_t; |
| 68 | 74 | |
| 69 | 75 | struct unw_cursor_t { |
| 70 | 76 | uint64_t data[_LIBUNWIND_CURSOR_SIZE]; |
| 71 | }; | |
| 77 | } LIBUNWIND_CURSOR_ALIGNMENT_ATTR; | |
| 72 | 78 | typedef struct unw_cursor_t unw_cursor_t; |
| 73 | 79 | |
| 74 | 80 | typedef struct unw_addr_space *unw_addr_space_t; |
| ... | ... | @@ -941,4 +947,156 @@ enum { |
| 941 | 947 | UNW_RISCV_F31 = 63, |
| 942 | 948 | }; |
| 943 | 949 | |
| 950 | // VE register numbers | |
| 951 | enum { | |
| 952 | UNW_VE_S0 = 0, | |
| 953 | UNW_VE_S1 = 1, | |
| 954 | UNW_VE_S2 = 2, | |
| 955 | UNW_VE_S3 = 3, | |
| 956 | UNW_VE_S4 = 4, | |
| 957 | UNW_VE_S5 = 5, | |
| 958 | UNW_VE_S6 = 6, | |
| 959 | UNW_VE_S7 = 7, | |
| 960 | UNW_VE_S8 = 8, | |
| 961 | UNW_VE_S9 = 9, | |
| 962 | UNW_VE_S10 = 10, | |
| 963 | UNW_VE_S11 = 11, | |
| 964 | UNW_VE_S12 = 12, | |
| 965 | UNW_VE_S13 = 13, | |
| 966 | UNW_VE_S14 = 14, | |
| 967 | UNW_VE_S15 = 15, | |
| 968 | UNW_VE_S16 = 16, | |
| 969 | UNW_VE_S17 = 17, | |
| 970 | UNW_VE_S18 = 18, | |
| 971 | UNW_VE_S19 = 19, | |
| 972 | UNW_VE_S20 = 20, | |
| 973 | UNW_VE_S21 = 21, | |
| 974 | UNW_VE_S22 = 22, | |
| 975 | UNW_VE_S23 = 23, | |
| 976 | UNW_VE_S24 = 24, | |
| 977 | UNW_VE_S25 = 25, | |
| 978 | UNW_VE_S26 = 26, | |
| 979 | UNW_VE_S27 = 27, | |
| 980 | UNW_VE_S28 = 28, | |
| 981 | UNW_VE_S29 = 29, | |
| 982 | UNW_VE_S30 = 30, | |
| 983 | UNW_VE_S31 = 31, | |
| 984 | UNW_VE_S32 = 32, | |
| 985 | UNW_VE_S33 = 33, | |
| 986 | UNW_VE_S34 = 34, | |
| 987 | UNW_VE_S35 = 35, | |
| 988 | UNW_VE_S36 = 36, | |
| 989 | UNW_VE_S37 = 37, | |
| 990 | UNW_VE_S38 = 38, | |
| 991 | UNW_VE_S39 = 39, | |
| 992 | UNW_VE_S40 = 40, | |
| 993 | UNW_VE_S41 = 41, | |
| 994 | UNW_VE_S42 = 42, | |
| 995 | UNW_VE_S43 = 43, | |
| 996 | UNW_VE_S44 = 44, | |
| 997 | UNW_VE_S45 = 45, | |
| 998 | UNW_VE_S46 = 46, | |
| 999 | UNW_VE_S47 = 47, | |
| 1000 | UNW_VE_S48 = 48, | |
| 1001 | UNW_VE_S49 = 49, | |
| 1002 | UNW_VE_S50 = 50, | |
| 1003 | UNW_VE_S51 = 51, | |
| 1004 | UNW_VE_S52 = 52, | |
| 1005 | UNW_VE_S53 = 53, | |
| 1006 | UNW_VE_S54 = 54, | |
| 1007 | UNW_VE_S55 = 55, | |
| 1008 | UNW_VE_S56 = 56, | |
| 1009 | UNW_VE_S57 = 57, | |
| 1010 | UNW_VE_S58 = 58, | |
| 1011 | UNW_VE_S59 = 59, | |
| 1012 | UNW_VE_S60 = 60, | |
| 1013 | UNW_VE_S61 = 61, | |
| 1014 | UNW_VE_S62 = 62, | |
| 1015 | UNW_VE_S63 = 63, | |
| 1016 | UNW_VE_V0 = 64 + 0, | |
| 1017 | UNW_VE_V1 = 64 + 1, | |
| 1018 | UNW_VE_V2 = 64 + 2, | |
| 1019 | UNW_VE_V3 = 64 + 3, | |
| 1020 | UNW_VE_V4 = 64 + 4, | |
| 1021 | UNW_VE_V5 = 64 + 5, | |
| 1022 | UNW_VE_V6 = 64 + 6, | |
| 1023 | UNW_VE_V7 = 64 + 7, | |
| 1024 | UNW_VE_V8 = 64 + 8, | |
| 1025 | UNW_VE_V9 = 64 + 9, | |
| 1026 | UNW_VE_V10 = 64 + 10, | |
| 1027 | UNW_VE_V11 = 64 + 11, | |
| 1028 | UNW_VE_V12 = 64 + 12, | |
| 1029 | UNW_VE_V13 = 64 + 13, | |
| 1030 | UNW_VE_V14 = 64 + 14, | |
| 1031 | UNW_VE_V15 = 64 + 15, | |
| 1032 | UNW_VE_V16 = 64 + 16, | |
| 1033 | UNW_VE_V17 = 64 + 17, | |
| 1034 | UNW_VE_V18 = 64 + 18, | |
| 1035 | UNW_VE_V19 = 64 + 19, | |
| 1036 | UNW_VE_V20 = 64 + 20, | |
| 1037 | UNW_VE_V21 = 64 + 21, | |
| 1038 | UNW_VE_V22 = 64 + 22, | |
| 1039 | UNW_VE_V23 = 64 + 23, | |
| 1040 | UNW_VE_V24 = 64 + 24, | |
| 1041 | UNW_VE_V25 = 64 + 25, | |
| 1042 | UNW_VE_V26 = 64 + 26, | |
| 1043 | UNW_VE_V27 = 64 + 27, | |
| 1044 | UNW_VE_V28 = 64 + 28, | |
| 1045 | UNW_VE_V29 = 64 + 29, | |
| 1046 | UNW_VE_V30 = 64 + 30, | |
| 1047 | UNW_VE_V31 = 64 + 31, | |
| 1048 | UNW_VE_V32 = 64 + 32, | |
| 1049 | UNW_VE_V33 = 64 + 33, | |
| 1050 | UNW_VE_V34 = 64 + 34, | |
| 1051 | UNW_VE_V35 = 64 + 35, | |
| 1052 | UNW_VE_V36 = 64 + 36, | |
| 1053 | UNW_VE_V37 = 64 + 37, | |
| 1054 | UNW_VE_V38 = 64 + 38, | |
| 1055 | UNW_VE_V39 = 64 + 39, | |
| 1056 | UNW_VE_V40 = 64 + 40, | |
| 1057 | UNW_VE_V41 = 64 + 41, | |
| 1058 | UNW_VE_V42 = 64 + 42, | |
| 1059 | UNW_VE_V43 = 64 + 43, | |
| 1060 | UNW_VE_V44 = 64 + 44, | |
| 1061 | UNW_VE_V45 = 64 + 45, | |
| 1062 | UNW_VE_V46 = 64 + 46, | |
| 1063 | UNW_VE_V47 = 64 + 47, | |
| 1064 | UNW_VE_V48 = 64 + 48, | |
| 1065 | UNW_VE_V49 = 64 + 49, | |
| 1066 | UNW_VE_V50 = 64 + 50, | |
| 1067 | UNW_VE_V51 = 64 + 51, | |
| 1068 | UNW_VE_V52 = 64 + 52, | |
| 1069 | UNW_VE_V53 = 64 + 53, | |
| 1070 | UNW_VE_V54 = 64 + 54, | |
| 1071 | UNW_VE_V55 = 64 + 55, | |
| 1072 | UNW_VE_V56 = 64 + 56, | |
| 1073 | UNW_VE_V57 = 64 + 57, | |
| 1074 | UNW_VE_V58 = 64 + 58, | |
| 1075 | UNW_VE_V59 = 64 + 59, | |
| 1076 | UNW_VE_V60 = 64 + 60, | |
| 1077 | UNW_VE_V61 = 64 + 61, | |
| 1078 | UNW_VE_V62 = 64 + 62, | |
| 1079 | UNW_VE_V63 = 64 + 63, | |
| 1080 | UNW_VE_VM0 = 128 + 0, | |
| 1081 | UNW_VE_VM1 = 128 + 1, | |
| 1082 | UNW_VE_VM2 = 128 + 2, | |
| 1083 | UNW_VE_VM3 = 128 + 3, | |
| 1084 | UNW_VE_VM4 = 128 + 4, | |
| 1085 | UNW_VE_VM5 = 128 + 5, | |
| 1086 | UNW_VE_VM6 = 128 + 6, | |
| 1087 | UNW_VE_VM7 = 128 + 7, | |
| 1088 | UNW_VE_VM8 = 128 + 8, | |
| 1089 | UNW_VE_VM9 = 128 + 9, | |
| 1090 | UNW_VE_VM10 = 128 + 10, | |
| 1091 | UNW_VE_VM11 = 128 + 11, | |
| 1092 | UNW_VE_VM12 = 128 + 12, | |
| 1093 | UNW_VE_VM13 = 128 + 13, | |
| 1094 | UNW_VE_VM14 = 128 + 14, | |
| 1095 | UNW_VE_VM15 = 128 + 15, // = 143 | |
| 1096 | ||
| 1097 | // Following registers don't have DWARF register numbers. | |
| 1098 | UNW_VE_VIXR = 144, | |
| 1099 | UNW_VE_VL = 145, | |
| 1100 | }; | |
| 1101 | ||
| 944 | 1102 | #endif |
lib/libunwind/src/AddressSpace.hpp+98-162| ... | ... | @@ -17,6 +17,12 @@ |
| 17 | 17 | #include <stdlib.h> |
| 18 | 18 | #include <string.h> |
| 19 | 19 | |
| 20 | #include "libunwind.h" | |
| 21 | #include "config.h" | |
| 22 | #include "dwarf2.h" | |
| 23 | #include "EHHeaderParser.hpp" | |
| 24 | #include "Registers.hpp" | |
| 25 | ||
| 20 | 26 | #ifndef _LIBUNWIND_USE_DLADDR |
| 21 | 27 | #if !defined(_LIBUNWIND_IS_BAREMETAL) && !defined(_WIN32) |
| 22 | 28 | #define _LIBUNWIND_USE_DLADDR 1 |
| ... | ... | @@ -39,19 +45,6 @@ struct EHABIIndexEntry { |
| 39 | 45 | }; |
| 40 | 46 | #endif |
| 41 | 47 | |
| 42 | #ifdef __APPLE__ | |
| 43 | #include <mach-o/getsect.h> | |
| 44 | namespace libunwind { | |
| 45 | bool checkKeyMgrRegisteredFDEs(uintptr_t targetAddr, void *&fde); | |
| 46 | } | |
| 47 | #endif | |
| 48 | ||
| 49 | #include "libunwind.h" | |
| 50 | #include "config.h" | |
| 51 | #include "dwarf2.h" | |
| 52 | #include "EHHeaderParser.hpp" | |
| 53 | #include "Registers.hpp" | |
| 54 | ||
| 55 | 48 | #ifdef __APPLE__ |
| 56 | 49 | |
| 57 | 50 | struct dyld_unwind_sections |
| ... | ... | @@ -62,43 +55,9 @@ namespace libunwind { |
| 62 | 55 | const void* compact_unwind_section; |
| 63 | 56 | uintptr_t compact_unwind_section_length; |
| 64 | 57 | }; |
| 65 | #if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \ | |
| 66 | && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)) \ | |
| 67 | || defined(__IPHONE_OS_VERSION_MIN_REQUIRED) | |
| 68 | // In 10.7.0 or later, libSystem.dylib implements this function. | |
| 69 | extern "C" bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *); | |
| 70 | #else | |
| 71 | // In 10.6.x and earlier, we need to implement this functionality. Note | |
| 72 | // that this requires a newer version of libmacho (from cctools) than is | |
| 73 | // present in libSystem on 10.6.x (for getsectiondata). | |
| 74 | static inline bool _dyld_find_unwind_sections(void* addr, | |
| 75 | dyld_unwind_sections* info) { | |
| 76 | // Find mach-o image containing address. | |
| 77 | Dl_info dlinfo; | |
| 78 | if (!dladdr(addr, &dlinfo)) | |
| 79 | return false; | |
| 80 | #if __LP64__ | |
| 81 | const struct mach_header_64 *mh = (const struct mach_header_64 *)dlinfo.dli_fbase; | |
| 82 | #else | |
| 83 | const struct mach_header *mh = (const struct mach_header *)dlinfo.dli_fbase; | |
| 84 | #endif | |
| 85 | 58 | |
| 86 | // Initialize the return struct | |
| 87 | info->mh = (const struct mach_header *)mh; | |
| 88 | info->dwarf_section = getsectiondata(mh, "__TEXT", "__eh_frame", &info->dwarf_section_length); | |
| 89 | info->compact_unwind_section = getsectiondata(mh, "__TEXT", "__unwind_info", &info->compact_unwind_section_length); | |
| 90 | ||
| 91 | if (!info->dwarf_section) { | |
| 92 | info->dwarf_section_length = 0; | |
| 93 | } | |
| 94 | ||
| 95 | if (!info->compact_unwind_section) { | |
| 96 | info->compact_unwind_section_length = 0; | |
| 97 | } | |
| 98 | ||
| 99 | return true; | |
| 100 | } | |
| 101 | #endif | |
| 59 | // In 10.7.0 or later, libSystem.dylib implements this function. | |
| 60 | extern "C" bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *); | |
| 102 | 61 | |
| 103 | 62 | #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_LIBUNWIND_IS_BAREMETAL) |
| 104 | 63 | |
| ... | ... | @@ -139,22 +98,15 @@ extern char __eh_frame_hdr_end; |
| 139 | 98 | extern char __exidx_start; |
| 140 | 99 | extern char __exidx_end; |
| 141 | 100 | |
| 142 | #elif defined(_LIBUNWIND_ARM_EHABI) || defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 101 | #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_WIN32) | |
| 143 | 102 | |
| 144 | // ELF-based systems may use dl_iterate_phdr() to access sections | |
| 145 | // containing unwinding information. The ElfW() macro for pointer-size | |
| 146 | // independent ELF header traversal is not provided by <link.h> on some | |
| 147 | // systems (e.g., FreeBSD). On these systems the data structures are | |
| 148 | // just called Elf_XXX. Define ElfW() locally. | |
| 149 | #ifndef _WIN32 | |
| 150 | #include <link.h> | |
| 151 | #else | |
| 152 | 103 | #include <windows.h> |
| 153 | 104 | #include <psapi.h> |
| 154 | #endif | |
| 155 | #if !defined(ElfW) | |
| 156 | #define ElfW(type) Elf_##type | |
| 157 | #endif | |
| 105 | ||
| 106 | #elif defined(_LIBUNWIND_USE_DL_ITERATE_PHDR) || \ | |
| 107 | defined(_LIBUNWIND_USE_DL_UNWIND_FIND_EXIDX) | |
| 108 | ||
| 109 | #include <link.h> | |
| 158 | 110 | |
| 159 | 111 | #endif |
| 160 | 112 | |
| ... | ... | @@ -162,11 +114,15 @@ namespace libunwind { |
| 162 | 114 | |
| 163 | 115 | /// Used by findUnwindSections() to return info about needed sections. |
| 164 | 116 | struct UnwindInfoSections { |
| 165 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) || defined(_LIBUNWIND_SUPPORT_DWARF_INDEX) || \ | |
| 166 | defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND) | |
| 167 | // No dso_base for SEH or ARM EHABI. | |
| 117 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) || \ | |
| 118 | defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND) || \ | |
| 119 | defined(_LIBUNWIND_USE_DL_ITERATE_PHDR) | |
| 120 | // No dso_base for SEH. | |
| 168 | 121 | uintptr_t dso_base; |
| 169 | 122 | #endif |
| 123 | #if defined(_LIBUNWIND_USE_DL_ITERATE_PHDR) | |
| 124 | uintptr_t text_segment_length; | |
| 125 | #endif | |
| 170 | 126 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) |
| 171 | 127 | uintptr_t dwarf_section; |
| 172 | 128 | uintptr_t dwarf_section_length; |
| ... | ... | @@ -290,11 +246,11 @@ inline int64_t LocalAddressSpace::getSLEB128(pint_t &addr, pint_t end) { |
| 290 | 246 | if (p == pend) |
| 291 | 247 | _LIBUNWIND_ABORT("truncated sleb128 expression"); |
| 292 | 248 | byte = *p++; |
| 293 | result |= ((byte & 0x7f) << bit); | |
| 249 | result |= (uint64_t)(byte & 0x7f) << bit; | |
| 294 | 250 | bit += 7; |
| 295 | 251 | } while (byte & 0x80); |
| 296 | 252 | // sign extend negative numbers |
| 297 | if ((byte & 0x40) != 0) | |
| 253 | if ((byte & 0x40) != 0 && bit < 64) | |
| 298 | 254 | result |= (-1ULL) << bit; |
| 299 | 255 | addr = (pint_t) p; |
| 300 | 256 | return result; |
| ... | ... | @@ -392,23 +348,14 @@ LocalAddressSpace::getEncodedP(pint_t &addr, pint_t end, uint8_t encoding, |
| 392 | 348 | return result; |
| 393 | 349 | } |
| 394 | 350 | |
| 395 | #ifdef __APPLE__ | |
| 396 | #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_LIBUNWIND_IS_BAREMETAL) | |
| 397 | #elif defined(_LIBUNWIND_ARM_EHABI) && defined(_LIBUNWIND_IS_BAREMETAL) | |
| 398 | #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_WIN32) | |
| 399 | #elif defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) && defined(_WIN32) | |
| 400 | #elif defined(_LIBUNWIND_ARM_EHABI) && defined(__BIONIC__) | |
| 401 | // Code inside findUnwindSections handles all these cases. | |
| 402 | // | |
| 403 | // Although the above ifdef chain is ugly, there doesn't seem to be a cleaner | |
| 404 | // way to handle it. The generalized boolean expression is: | |
| 405 | // | |
| 406 | // A OR (B AND C) OR (D AND C) OR (B AND E) OR (F AND E) OR (D AND G) | |
| 407 | // | |
| 408 | // Running it through various boolean expression simplifiers gives expressions | |
| 409 | // that don't help at all. | |
| 410 | #elif defined(_LIBUNWIND_ARM_EHABI) || defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 351 | #if defined(_LIBUNWIND_USE_DL_ITERATE_PHDR) | |
| 411 | 352 | |
| 353 | // The ElfW() macro for pointer-size independent ELF header traversal is not | |
| 354 | // provided by <link.h> on some systems (e.g., FreeBSD). On these systems the | |
| 355 | // data structures are just called Elf_XXX. Define ElfW() locally. | |
| 356 | #if !defined(ElfW) | |
| 357 | #define ElfW(type) Elf_##type | |
| 358 | #endif | |
| 412 | 359 | #if !defined(Elf_Half) |
| 413 | 360 | typedef ElfW(Half) Elf_Half; |
| 414 | 361 | #endif |
| ... | ... | @@ -447,16 +394,12 @@ struct _LIBUNWIND_HIDDEN dl_iterate_cb_data { |
| 447 | 394 | uintptr_t targetAddr; |
| 448 | 395 | }; |
| 449 | 396 | |
| 450 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 451 | #if !defined(_LIBUNWIND_SUPPORT_DWARF_INDEX) | |
| 452 | #error "_LIBUNWIND_SUPPORT_DWARF_UNWIND requires _LIBUNWIND_SUPPORT_DWARF_INDEX on this platform." | |
| 453 | #endif | |
| 454 | ||
| 455 | 397 | #if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) |
| 456 | 398 | #include "FrameHeaderCache.hpp" |
| 457 | 399 | |
| 458 | // There should be just one of these per process. | |
| 459 | static FrameHeaderCache ProcessFrameHeaderCache; | |
| 400 | // Typically there is one cache per process, but when libunwind is built as a | |
| 401 | // hermetic static library, then each shared object may have its own cache. | |
| 402 | static FrameHeaderCache TheFrameHeaderCache; | |
| 460 | 403 | #endif |
| 461 | 404 | |
| 462 | 405 | static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base, |
| ... | ... | @@ -466,95 +409,93 @@ static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base, |
| 466 | 409 | uintptr_t end = begin + phdr->p_memsz; |
| 467 | 410 | if (cbdata->targetAddr >= begin && cbdata->targetAddr < end) { |
| 468 | 411 | cbdata->sects->dso_base = begin; |
| 469 | cbdata->sects->dwarf_section_length = phdr->p_memsz; | |
| 412 | cbdata->sects->text_segment_length = phdr->p_memsz; | |
| 470 | 413 | return true; |
| 471 | 414 | } |
| 472 | 415 | } |
| 473 | 416 | return false; |
| 474 | 417 | } |
| 475 | 418 | |
| 419 | static bool checkForUnwindInfoSegment(const Elf_Phdr *phdr, size_t image_base, | |
| 420 | dl_iterate_cb_data *cbdata) { | |
| 421 | #if defined(_LIBUNWIND_SUPPORT_DWARF_INDEX) | |
| 422 | if (phdr->p_type == PT_GNU_EH_FRAME) { | |
| 423 | EHHeaderParser<LocalAddressSpace>::EHHeaderInfo hdrInfo; | |
| 424 | uintptr_t eh_frame_hdr_start = image_base + phdr->p_vaddr; | |
| 425 | cbdata->sects->dwarf_index_section = eh_frame_hdr_start; | |
| 426 | cbdata->sects->dwarf_index_section_length = phdr->p_memsz; | |
| 427 | if (EHHeaderParser<LocalAddressSpace>::decodeEHHdr( | |
| 428 | *cbdata->addressSpace, eh_frame_hdr_start, phdr->p_memsz, | |
| 429 | hdrInfo)) { | |
| 430 | // .eh_frame_hdr records the start of .eh_frame, but not its size. | |
| 431 | // Rely on a zero terminator to find the end of the section. | |
| 432 | cbdata->sects->dwarf_section = hdrInfo.eh_frame_ptr; | |
| 433 | cbdata->sects->dwarf_section_length = UINTPTR_MAX; | |
| 434 | return true; | |
| 435 | } | |
| 436 | } | |
| 437 | return false; | |
| 438 | #elif defined(_LIBUNWIND_ARM_EHABI) | |
| 439 | if (phdr->p_type == PT_ARM_EXIDX) { | |
| 440 | uintptr_t exidx_start = image_base + phdr->p_vaddr; | |
| 441 | cbdata->sects->arm_section = exidx_start; | |
| 442 | cbdata->sects->arm_section_length = phdr->p_memsz; | |
| 443 | return true; | |
| 444 | } | |
| 445 | return false; | |
| 446 | #else | |
| 447 | #error Need one of _LIBUNWIND_SUPPORT_DWARF_INDEX or _LIBUNWIND_ARM_EHABI | |
| 448 | #endif | |
| 449 | } | |
| 450 | ||
| 476 | 451 | static int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, |
| 477 | 452 | size_t pinfo_size, void *data) { |
| 478 | 453 | auto cbdata = static_cast<dl_iterate_cb_data *>(data); |
| 479 | 454 | if (pinfo->dlpi_phnum == 0 || cbdata->targetAddr < pinfo->dlpi_addr) |
| 480 | 455 | return 0; |
| 481 | 456 | #if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) |
| 482 | if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data)) | |
| 457 | if (TheFrameHeaderCache.find(pinfo, pinfo_size, data)) | |
| 483 | 458 | return 1; |
| 459 | #else | |
| 460 | // Avoid warning about unused variable. | |
| 461 | (void)pinfo_size; | |
| 484 | 462 | #endif |
| 485 | 463 | |
| 486 | 464 | Elf_Addr image_base = calculateImageBase(pinfo); |
| 487 | bool found_obj = false; | |
| 488 | bool found_hdr = false; | |
| 489 | 465 | |
| 490 | // Third phdr is usually the executable phdr. | |
| 491 | if (pinfo->dlpi_phnum > 2) | |
| 492 | found_obj = checkAddrInSegment(&pinfo->dlpi_phdr[2], image_base, cbdata); | |
| 466 | // Most shared objects seen in this callback function likely don't contain the | |
| 467 | // target address, so optimize for that. Scan for a matching PT_LOAD segment | |
| 468 | // first and bail when it isn't found. | |
| 469 | bool found_text = false; | |
| 470 | for (Elf_Half i = 0; i < pinfo->dlpi_phnum; ++i) { | |
| 471 | if (checkAddrInSegment(&pinfo->dlpi_phdr[i], image_base, cbdata)) { | |
| 472 | found_text = true; | |
| 473 | break; | |
| 474 | } | |
| 475 | } | |
| 476 | if (!found_text) | |
| 477 | return 0; | |
| 493 | 478 | |
| 494 | // PT_GNU_EH_FRAME is usually near the end. Iterate backward. We already know | |
| 495 | // that there is one or more phdrs. | |
| 479 | // PT_GNU_EH_FRAME and PT_ARM_EXIDX are usually near the end. Iterate | |
| 480 | // backward. | |
| 481 | bool found_unwind = false; | |
| 496 | 482 | for (Elf_Half i = pinfo->dlpi_phnum; i > 0; i--) { |
| 497 | 483 | const Elf_Phdr *phdr = &pinfo->dlpi_phdr[i - 1]; |
| 498 | if (!found_hdr && phdr->p_type == PT_GNU_EH_FRAME) { | |
| 499 | EHHeaderParser<LocalAddressSpace>::EHHeaderInfo hdrInfo; | |
| 500 | uintptr_t eh_frame_hdr_start = image_base + phdr->p_vaddr; | |
| 501 | cbdata->sects->dwarf_index_section = eh_frame_hdr_start; | |
| 502 | cbdata->sects->dwarf_index_section_length = phdr->p_memsz; | |
| 503 | found_hdr = EHHeaderParser<LocalAddressSpace>::decodeEHHdr( | |
| 504 | *cbdata->addressSpace, eh_frame_hdr_start, phdr->p_memsz, | |
| 505 | hdrInfo); | |
| 506 | if (found_hdr) | |
| 507 | cbdata->sects->dwarf_section = hdrInfo.eh_frame_ptr; | |
| 508 | } else if (!found_obj) { | |
| 509 | found_obj = checkAddrInSegment(phdr, image_base, cbdata); | |
| 510 | } | |
| 511 | if (found_obj && found_hdr) { | |
| 512 | #if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) | |
| 513 | ProcessFrameHeaderCache.add(cbdata->sects); | |
| 514 | #endif | |
| 515 | return 1; | |
| 484 | if (checkForUnwindInfoSegment(phdr, image_base, cbdata)) { | |
| 485 | found_unwind = true; | |
| 486 | break; | |
| 516 | 487 | } |
| 517 | 488 | } |
| 518 | cbdata->sects->dwarf_section_length = 0; | |
| 519 | return 0; | |
| 520 | } | |
| 521 | ||
| 522 | #else // defined(LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 523 | // Given all the #ifdef's above, the code here is for | |
| 524 | // defined(LIBUNWIND_ARM_EHABI) | |
| 525 | ||
| 526 | static int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t, | |
| 527 | void *data) { | |
| 528 | auto *cbdata = static_cast<dl_iterate_cb_data *>(data); | |
| 529 | bool found_obj = false; | |
| 530 | bool found_hdr = false; | |
| 531 | ||
| 532 | assert(cbdata); | |
| 533 | assert(cbdata->sects); | |
| 534 | ||
| 535 | if (cbdata->targetAddr < pinfo->dlpi_addr) | |
| 489 | if (!found_unwind) | |
| 536 | 490 | return 0; |
| 537 | 491 | |
| 538 | Elf_Addr image_base = calculateImageBase(pinfo); | |
| 539 | ||
| 540 | for (Elf_Half i = 0; i < pinfo->dlpi_phnum; i++) { | |
| 541 | const Elf_Phdr *phdr = &pinfo->dlpi_phdr[i]; | |
| 542 | if (phdr->p_type == PT_LOAD) { | |
| 543 | uintptr_t begin = image_base + phdr->p_vaddr; | |
| 544 | uintptr_t end = begin + phdr->p_memsz; | |
| 545 | if (cbdata->targetAddr >= begin && cbdata->targetAddr < end) | |
| 546 | found_obj = true; | |
| 547 | } else if (phdr->p_type == PT_ARM_EXIDX) { | |
| 548 | uintptr_t exidx_start = image_base + phdr->p_vaddr; | |
| 549 | cbdata->sects->arm_section = exidx_start; | |
| 550 | cbdata->sects->arm_section_length = phdr->p_memsz; | |
| 551 | found_hdr = true; | |
| 552 | } | |
| 553 | } | |
| 554 | return found_obj && found_hdr; | |
| 492 | #if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) | |
| 493 | TheFrameHeaderCache.add(cbdata->sects); | |
| 494 | #endif | |
| 495 | return 1; | |
| 555 | 496 | } |
| 556 | #endif // defined(LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 557 | #endif // defined(_LIBUNWIND_ARM_EHABI) || defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 497 | ||
| 498 | #endif // defined(_LIBUNWIND_USE_DL_ITERATE_PHDR) | |
| 558 | 499 | |
| 559 | 500 | |
| 560 | 501 | inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, |
| ... | ... | @@ -572,6 +513,7 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, |
| 572 | 513 | return true; |
| 573 | 514 | } |
| 574 | 515 | #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_LIBUNWIND_IS_BAREMETAL) |
| 516 | info.dso_base = 0; | |
| 575 | 517 | // Bare metal is statically linked, so no need to ask the dynamic loader |
| 576 | 518 | info.dwarf_section_length = (uintptr_t)(&__eh_frame_end - &__eh_frame_start); |
| 577 | 519 | info.dwarf_section = (uintptr_t)(&__eh_frame_start); |
| ... | ... | @@ -638,16 +580,14 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, |
| 638 | 580 | (void)targetAddr; |
| 639 | 581 | (void)info; |
| 640 | 582 | return true; |
| 641 | #elif defined(_LIBUNWIND_ARM_EHABI) && defined(__BIONIC__) | |
| 642 | // For ARM EHABI, Bionic didn't implement dl_iterate_phdr until API 21. After | |
| 643 | // API 21, dl_iterate_phdr exists, but dl_unwind_find_exidx is much faster. | |
| 583 | #elif defined(_LIBUNWIND_USE_DL_UNWIND_FIND_EXIDX) | |
| 644 | 584 | int length = 0; |
| 645 | 585 | info.arm_section = |
| 646 | 586 | (uintptr_t)dl_unwind_find_exidx((_Unwind_Ptr)targetAddr, &length); |
| 647 | 587 | info.arm_section_length = (uintptr_t)length * sizeof(EHABIIndexEntry); |
| 648 | 588 | if (info.arm_section && info.arm_section_length) |
| 649 | 589 | return true; |
| 650 | #elif defined(_LIBUNWIND_ARM_EHABI) || defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) | |
| 590 | #elif defined(_LIBUNWIND_USE_DL_ITERATE_PHDR) | |
| 651 | 591 | dl_iterate_cb_data cb_data = {this, &info, targetAddr}; |
| 652 | 592 | int found = dl_iterate_phdr(findUnwindSectionsByPhdr, &cb_data); |
| 653 | 593 | return static_cast<bool>(found); |
| ... | ... | @@ -658,14 +598,10 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, |
| 658 | 598 | |
| 659 | 599 | |
| 660 | 600 | inline bool LocalAddressSpace::findOtherFDE(pint_t targetAddr, pint_t &fde) { |
| 661 | #ifdef __APPLE__ | |
| 662 | return checkKeyMgrRegisteredFDEs(targetAddr, *((void**)&fde)); | |
| 663 | #else | |
| 664 | 601 | // TO DO: if OS has way to dynamically register FDEs, check that. |
| 665 | 602 | (void)targetAddr; |
| 666 | 603 | (void)fde; |
| 667 | 604 | return false; |
| 668 | #endif | |
| 669 | 605 | } |
| 670 | 606 | |
| 671 | 607 | inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf, |
lib/libunwind/src/DwarfInstructions.hpp+8-1| ... | ... | @@ -93,7 +93,8 @@ typename A::pint_t DwarfInstructions<A, R>::getSavedRegister( |
| 93 | 93 | |
| 94 | 94 | case CFI_Parser<A>::kRegisterInRegister: |
| 95 | 95 | return registers.getRegister((int)savedReg.value); |
| 96 | ||
| 96 | case CFI_Parser<A>::kRegisterUndefined: | |
| 97 | return 0; | |
| 97 | 98 | case CFI_Parser<A>::kRegisterUnused: |
| 98 | 99 | case CFI_Parser<A>::kRegisterOffsetFromCFA: |
| 99 | 100 | // FIX ME |
| ... | ... | @@ -117,6 +118,7 @@ double DwarfInstructions<A, R>::getSavedFloatRegister( |
| 117 | 118 | |
| 118 | 119 | case CFI_Parser<A>::kRegisterIsExpression: |
| 119 | 120 | case CFI_Parser<A>::kRegisterUnused: |
| 121 | case CFI_Parser<A>::kRegisterUndefined: | |
| 120 | 122 | case CFI_Parser<A>::kRegisterOffsetFromCFA: |
| 121 | 123 | case CFI_Parser<A>::kRegisterInRegister: |
| 122 | 124 | // FIX ME |
| ... | ... | @@ -140,6 +142,7 @@ v128 DwarfInstructions<A, R>::getSavedVectorRegister( |
| 140 | 142 | |
| 141 | 143 | case CFI_Parser<A>::kRegisterIsExpression: |
| 142 | 144 | case CFI_Parser<A>::kRegisterUnused: |
| 145 | case CFI_Parser<A>::kRegisterUndefined: | |
| 143 | 146 | case CFI_Parser<A>::kRegisterOffsetFromCFA: |
| 144 | 147 | case CFI_Parser<A>::kRegisterInRegister: |
| 145 | 148 | // FIX ME |
| ... | ... | @@ -190,6 +193,10 @@ int DwarfInstructions<A, R>::stepWithDwarf(A &addressSpace, pint_t pc, |
| 190 | 193 | prolog.savedRegisters[i])); |
| 191 | 194 | else |
| 192 | 195 | return UNW_EBADREG; |
| 196 | } else if (i == (int)cieInfo.returnAddressRegister) { | |
| 197 | // Leaf function keeps the return address in register and there is no | |
| 198 | // explicit intructions how to restore it. | |
| 199 | returnAddress = registers.getRegister(cieInfo.returnAddressRegister); | |
| 193 | 200 | } |
| 194 | 201 | } |
| 195 | 202 |
lib/libunwind/src/DwarfParser.hpp+407-404| ... | ... | @@ -69,6 +69,7 @@ public: |
| 69 | 69 | }; |
| 70 | 70 | enum RegisterSavedWhere { |
| 71 | 71 | kRegisterUnused, |
| 72 | kRegisterUndefined, | |
| 72 | 73 | kRegisterInCFA, |
| 73 | 74 | kRegisterOffsetFromCFA, |
| 74 | 75 | kRegisterInRegister, |
| ... | ... | @@ -87,9 +88,6 @@ public: |
| 87 | 88 | int32_t cfaRegisterOffset; // CFA = (cfaRegister)+cfaRegisterOffset |
| 88 | 89 | int64_t cfaExpression; // CFA = expression |
| 89 | 90 | uint32_t spExtraArgSize; |
| 90 | uint32_t codeOffsetAtStackDecrement; | |
| 91 | bool registersInOtherRegisters; | |
| 92 | bool sameValueUsed; | |
| 93 | 91 | RegisterLocation savedRegisters[kMaxRegisterNumber + 1]; |
| 94 | 92 | enum class InitializeTime { kLazy, kNormal }; |
| 95 | 93 | |
| ... | ... | @@ -134,8 +132,26 @@ public: |
| 134 | 132 | PrologInfo info; |
| 135 | 133 | }; |
| 136 | 134 | |
| 135 | struct RememberStack { | |
| 136 | PrologInfoStackEntry *entry; | |
| 137 | RememberStack() : entry(nullptr) {} | |
| 138 | ~RememberStack() { | |
| 139 | #if defined(_LIBUNWIND_REMEMBER_CLEANUP_NEEDED) | |
| 140 | // Clean up rememberStack. Even in the case where every | |
| 141 | // DW_CFA_remember_state is paired with a DW_CFA_restore_state, | |
| 142 | // parseInstructions can skip restore opcodes if it reaches the target PC | |
| 143 | // and stops interpreting, so we have to make sure we don't leak memory. | |
| 144 | while (entry) { | |
| 145 | PrologInfoStackEntry *next = entry->next; | |
| 146 | _LIBUNWIND_REMEMBER_FREE(entry); | |
| 147 | entry = next; | |
| 148 | } | |
| 149 | #endif | |
| 150 | } | |
| 151 | }; | |
| 152 | ||
| 137 | 153 | static bool findFDE(A &addressSpace, pint_t pc, pint_t ehSectionStart, |
| 138 | uint32_t sectionLength, pint_t fdeHint, FDE_Info *fdeInfo, | |
| 154 | uintptr_t sectionLength, pint_t fdeHint, FDE_Info *fdeInfo, | |
| 139 | 155 | CIE_Info *cieInfo); |
| 140 | 156 | static const char *decodeFDE(A &addressSpace, pint_t fdeStart, |
| 141 | 157 | FDE_Info *fdeInfo, CIE_Info *cieInfo); |
| ... | ... | @@ -144,13 +160,6 @@ public: |
| 144 | 160 | int arch, PrologInfo *results); |
| 145 | 161 | |
| 146 | 162 | static const char *parseCIE(A &addressSpace, pint_t cie, CIE_Info *cieInfo); |
| 147 | ||
| 148 | private: | |
| 149 | static bool parseInstructions(A &addressSpace, pint_t instructions, | |
| 150 | pint_t instructionsEnd, const CIE_Info &cieInfo, | |
| 151 | pint_t pcoffset, | |
| 152 | PrologInfoStackEntry *&rememberStack, int arch, | |
| 153 | PrologInfo *results); | |
| 154 | 163 | }; |
| 155 | 164 | |
| 156 | 165 | /// Parse a FDE into a CIE_Info and an FDE_Info |
| ... | ... | @@ -166,7 +175,7 @@ const char *CFI_Parser<A>::decodeFDE(A &addressSpace, pint_t fdeStart, |
| 166 | 175 | p += 8; |
| 167 | 176 | } |
| 168 | 177 | if (cfiLength == 0) |
| 169 | return "FDE has zero length"; // end marker | |
| 178 | return "FDE has zero length"; // zero terminator | |
| 170 | 179 | uint32_t ciePointer = addressSpace.get32(p); |
| 171 | 180 | if (ciePointer == 0) |
| 172 | 181 | return "FDE is really a CIE"; // this is a CIE not an FDE |
| ... | ... | @@ -211,11 +220,13 @@ const char *CFI_Parser<A>::decodeFDE(A &addressSpace, pint_t fdeStart, |
| 211 | 220 | /// Scan an eh_frame section to find an FDE for a pc |
| 212 | 221 | template <typename A> |
| 213 | 222 | bool CFI_Parser<A>::findFDE(A &addressSpace, pint_t pc, pint_t ehSectionStart, |
| 214 | uint32_t sectionLength, pint_t fdeHint, | |
| 223 | uintptr_t sectionLength, pint_t fdeHint, | |
| 215 | 224 | FDE_Info *fdeInfo, CIE_Info *cieInfo) { |
| 216 | 225 | //fprintf(stderr, "findFDE(0x%llX)\n", (long long)pc); |
| 217 | 226 | pint_t p = (fdeHint != 0) ? fdeHint : ehSectionStart; |
| 218 | const pint_t ehSectionEnd = p + sectionLength; | |
| 227 | const pint_t ehSectionEnd = (sectionLength == UINTPTR_MAX) | |
| 228 | ? static_cast<pint_t>(-1) | |
| 229 | : (ehSectionStart + sectionLength); | |
| 219 | 230 | while (p < ehSectionEnd) { |
| 220 | 231 | pint_t currentCFI = p; |
| 221 | 232 | //fprintf(stderr, "findFDE() CFI at 0x%llX\n", (long long)p); |
| ... | ... | @@ -227,7 +238,7 @@ bool CFI_Parser<A>::findFDE(A &addressSpace, pint_t pc, pint_t ehSectionStart, |
| 227 | 238 | p += 8; |
| 228 | 239 | } |
| 229 | 240 | if (cfiLength == 0) |
| 230 | return false; // end marker | |
| 241 | return false; // zero terminator | |
| 231 | 242 | uint32_t id = addressSpace.get32(p); |
| 232 | 243 | if (id == 0) { |
| 233 | 244 | // Skip over CIEs. |
| ... | ... | @@ -336,7 +347,8 @@ const char *CFI_Parser<A>::parseCIE(A &addressSpace, pint_t cie, |
| 336 | 347 | // parse data alignment factor |
| 337 | 348 | cieInfo->dataAlignFactor = (int)addressSpace.getSLEB128(p, cieContentEnd); |
| 338 | 349 | // parse return address register |
| 339 | uint64_t raReg = addressSpace.getULEB128(p, cieContentEnd); | |
| 350 | uint64_t raReg = (version == 1) ? addressSpace.get8(p++) | |
| 351 | : addressSpace.getULEB128(p, cieContentEnd); | |
| 340 | 352 | assert(raReg < 255 && "return address register too large"); |
| 341 | 353 | cieInfo->returnAddressRegister = (uint8_t)raReg; |
| 342 | 354 | // parse augmentation data based on augmentation string |
| ... | ... | @@ -390,418 +402,409 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace, |
| 390 | 402 | const FDE_Info &fdeInfo, |
| 391 | 403 | const CIE_Info &cieInfo, pint_t upToPC, |
| 392 | 404 | int arch, PrologInfo *results) { |
| 393 | PrologInfoStackEntry *rememberStack = NULL; | |
| 394 | ||
| 395 | // parse CIE then FDE instructions | |
| 396 | bool returnValue = | |
| 397 | parseInstructions(addressSpace, cieInfo.cieInstructions, | |
| 398 | cieInfo.cieStart + cieInfo.cieLength, cieInfo, | |
| 399 | (pint_t)(-1), rememberStack, arch, results) && | |
| 400 | parseInstructions(addressSpace, fdeInfo.fdeInstructions, | |
| 401 | fdeInfo.fdeStart + fdeInfo.fdeLength, cieInfo, | |
| 402 | upToPC - fdeInfo.pcStart, rememberStack, arch, results); | |
| 403 | ||
| 404 | #if !defined(_LIBUNWIND_NO_HEAP) | |
| 405 | // Clean up rememberStack. Even in the case where every DW_CFA_remember_state | |
| 406 | // is paired with a DW_CFA_restore_state, parseInstructions can skip restore | |
| 407 | // opcodes if it reaches the target PC and stops interpreting, so we have to | |
| 408 | // make sure we don't leak memory. | |
| 409 | while (rememberStack) { | |
| 410 | PrologInfoStackEntry *next = rememberStack->next; | |
| 411 | free(rememberStack); | |
| 412 | rememberStack = next; | |
| 413 | } | |
| 414 | #endif | |
| 415 | ||
| 416 | return returnValue; | |
| 417 | } | |
| 405 | // Alloca is used for the allocation of the rememberStack entries. It removes | |
| 406 | // the dependency on new/malloc but the below for loop can not be refactored | |
| 407 | // into functions. Entry could be saved during the processing of a CIE and | |
| 408 | // restored by an FDE. | |
| 409 | RememberStack rememberStack; | |
| 410 | ||
| 411 | struct ParseInfo { | |
| 412 | pint_t instructions; | |
| 413 | pint_t instructionsEnd; | |
| 414 | pint_t pcoffset; | |
| 415 | }; | |
| 418 | 416 | |
| 419 | /// "run" the DWARF instructions | |
| 420 | template <typename A> | |
| 421 | bool CFI_Parser<A>::parseInstructions(A &addressSpace, pint_t instructions, | |
| 422 | pint_t instructionsEnd, | |
| 423 | const CIE_Info &cieInfo, pint_t pcoffset, | |
| 424 | PrologInfoStackEntry *&rememberStack, | |
| 425 | int arch, PrologInfo *results) { | |
| 426 | pint_t p = instructions; | |
| 427 | pint_t codeOffset = 0; | |
| 428 | // initialState initialized as registers in results are modified. Use | |
| 429 | // PrologInfo accessor functions to avoid reading uninitialized data. | |
| 430 | PrologInfo initialState(PrologInfo::InitializeTime::kLazy); | |
| 431 | ||
| 432 | _LIBUNWIND_TRACE_DWARF("parseInstructions(instructions=0x%0" PRIx64 ")\n", | |
| 433 | static_cast<uint64_t>(instructionsEnd)); | |
| 434 | ||
| 435 | // see DWARF Spec, section 6.4.2 for details on unwind opcodes | |
| 436 | while ((p < instructionsEnd) && (codeOffset < pcoffset)) { | |
| 437 | uint64_t reg; | |
| 438 | uint64_t reg2; | |
| 439 | int64_t offset; | |
| 440 | uint64_t length; | |
| 441 | uint8_t opcode = addressSpace.get8(p); | |
| 442 | uint8_t operand; | |
| 443 | #if !defined(_LIBUNWIND_NO_HEAP) | |
| 444 | PrologInfoStackEntry *entry; | |
| 445 | #endif | |
| 446 | ++p; | |
| 447 | switch (opcode) { | |
| 448 | case DW_CFA_nop: | |
| 449 | _LIBUNWIND_TRACE_DWARF("DW_CFA_nop\n"); | |
| 450 | break; | |
| 451 | case DW_CFA_set_loc: | |
| 452 | codeOffset = | |
| 453 | addressSpace.getEncodedP(p, instructionsEnd, cieInfo.pointerEncoding); | |
| 454 | _LIBUNWIND_TRACE_DWARF("DW_CFA_set_loc\n"); | |
| 455 | break; | |
| 456 | case DW_CFA_advance_loc1: | |
| 457 | codeOffset += (addressSpace.get8(p) * cieInfo.codeAlignFactor); | |
| 458 | p += 1; | |
| 459 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc1: new offset=%" PRIu64 "\n", | |
| 460 | static_cast<uint64_t>(codeOffset)); | |
| 461 | break; | |
| 462 | case DW_CFA_advance_loc2: | |
| 463 | codeOffset += (addressSpace.get16(p) * cieInfo.codeAlignFactor); | |
| 464 | p += 2; | |
| 465 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc2: new offset=%" PRIu64 "\n", | |
| 466 | static_cast<uint64_t>(codeOffset)); | |
| 467 | break; | |
| 468 | case DW_CFA_advance_loc4: | |
| 469 | codeOffset += (addressSpace.get32(p) * cieInfo.codeAlignFactor); | |
| 470 | p += 4; | |
| 471 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc4: new offset=%" PRIu64 "\n", | |
| 472 | static_cast<uint64_t>(codeOffset)); | |
| 473 | break; | |
| 474 | case DW_CFA_offset_extended: | |
| 475 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 476 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) | |
| 477 | * cieInfo.dataAlignFactor; | |
| 478 | if (reg > kMaxRegisterNumber) { | |
| 479 | _LIBUNWIND_LOG0( | |
| 480 | "malformed DW_CFA_offset_extended DWARF unwind, reg too big"); | |
| 481 | return false; | |
| 482 | } | |
| 483 | results->setRegister(reg, kRegisterInCFA, offset, initialState); | |
| 484 | _LIBUNWIND_TRACE_DWARF("DW_CFA_offset_extended(reg=%" PRIu64 ", " | |
| 485 | "offset=%" PRId64 ")\n", | |
| 486 | reg, offset); | |
| 487 | break; | |
| 488 | case DW_CFA_restore_extended: | |
| 489 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 490 | if (reg > kMaxRegisterNumber) { | |
| 491 | _LIBUNWIND_LOG0( | |
| 492 | "malformed DW_CFA_restore_extended DWARF unwind, reg too big"); | |
| 493 | return false; | |
| 494 | } | |
| 495 | results->restoreRegisterToInitialState(reg, initialState); | |
| 496 | _LIBUNWIND_TRACE_DWARF("DW_CFA_restore_extended(reg=%" PRIu64 ")\n", reg); | |
| 497 | break; | |
| 498 | case DW_CFA_undefined: | |
| 499 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 500 | if (reg > kMaxRegisterNumber) { | |
| 501 | _LIBUNWIND_LOG0( | |
| 502 | "malformed DW_CFA_undefined DWARF unwind, reg too big"); | |
| 503 | return false; | |
| 504 | } | |
| 505 | results->setRegisterLocation(reg, kRegisterUnused, initialState); | |
| 506 | _LIBUNWIND_TRACE_DWARF("DW_CFA_undefined(reg=%" PRIu64 ")\n", reg); | |
| 507 | break; | |
| 508 | case DW_CFA_same_value: | |
| 509 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 510 | if (reg > kMaxRegisterNumber) { | |
| 511 | _LIBUNWIND_LOG0( | |
| 512 | "malformed DW_CFA_same_value DWARF unwind, reg too big"); | |
| 513 | return false; | |
| 514 | } | |
| 515 | // <rdar://problem/8456377> DW_CFA_same_value unsupported | |
| 516 | // "same value" means register was stored in frame, but its current | |
| 517 | // value has not changed, so no need to restore from frame. | |
| 518 | // We model this as if the register was never saved. | |
| 519 | results->setRegisterLocation(reg, kRegisterUnused, initialState); | |
| 520 | // set flag to disable conversion to compact unwind | |
| 521 | results->sameValueUsed = true; | |
| 522 | _LIBUNWIND_TRACE_DWARF("DW_CFA_same_value(reg=%" PRIu64 ")\n", reg); | |
| 523 | break; | |
| 524 | case DW_CFA_register: | |
| 525 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 526 | reg2 = addressSpace.getULEB128(p, instructionsEnd); | |
| 527 | if (reg > kMaxRegisterNumber) { | |
| 528 | _LIBUNWIND_LOG0( | |
| 529 | "malformed DW_CFA_register DWARF unwind, reg too big"); | |
| 530 | return false; | |
| 531 | } | |
| 532 | if (reg2 > kMaxRegisterNumber) { | |
| 533 | _LIBUNWIND_LOG0( | |
| 534 | "malformed DW_CFA_register DWARF unwind, reg2 too big"); | |
| 535 | return false; | |
| 536 | } | |
| 537 | results->setRegister(reg, kRegisterInRegister, (int64_t)reg2, | |
| 538 | initialState); | |
| 539 | // set flag to disable conversion to compact unwind | |
| 540 | results->registersInOtherRegisters = true; | |
| 541 | _LIBUNWIND_TRACE_DWARF( | |
| 542 | "DW_CFA_register(reg=%" PRIu64 ", reg2=%" PRIu64 ")\n", reg, reg2); | |
| 543 | break; | |
| 544 | #if !defined(_LIBUNWIND_NO_HEAP) | |
| 545 | case DW_CFA_remember_state: | |
| 546 | // avoid operator new, because that would be an upward dependency | |
| 547 | entry = (PrologInfoStackEntry *)malloc(sizeof(PrologInfoStackEntry)); | |
| 548 | if (entry != NULL) { | |
| 549 | entry->next = rememberStack; | |
| 550 | entry->info = *results; | |
| 551 | rememberStack = entry; | |
| 552 | } else { | |
| 553 | return false; | |
| 554 | } | |
| 555 | _LIBUNWIND_TRACE_DWARF("DW_CFA_remember_state\n"); | |
| 556 | break; | |
| 557 | case DW_CFA_restore_state: | |
| 558 | if (rememberStack != NULL) { | |
| 559 | PrologInfoStackEntry *top = rememberStack; | |
| 560 | *results = top->info; | |
| 561 | rememberStack = top->next; | |
| 562 | free((char *)top); | |
| 563 | } else { | |
| 564 | return false; | |
| 565 | } | |
| 566 | _LIBUNWIND_TRACE_DWARF("DW_CFA_restore_state\n"); | |
| 567 | break; | |
| 568 | #endif | |
| 569 | case DW_CFA_def_cfa: | |
| 570 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 571 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd); | |
| 572 | if (reg > kMaxRegisterNumber) { | |
| 573 | _LIBUNWIND_LOG0("malformed DW_CFA_def_cfa DWARF unwind, reg too big"); | |
| 574 | return false; | |
| 575 | } | |
| 576 | results->cfaRegister = (uint32_t)reg; | |
| 577 | results->cfaRegisterOffset = (int32_t)offset; | |
| 578 | _LIBUNWIND_TRACE_DWARF( | |
| 579 | "DW_CFA_def_cfa(reg=%" PRIu64 ", offset=%" PRIu64 ")\n", reg, offset); | |
| 580 | break; | |
| 581 | case DW_CFA_def_cfa_register: | |
| 582 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 583 | if (reg > kMaxRegisterNumber) { | |
| 584 | _LIBUNWIND_LOG0( | |
| 585 | "malformed DW_CFA_def_cfa_register DWARF unwind, reg too big"); | |
| 586 | return false; | |
| 587 | } | |
| 588 | results->cfaRegister = (uint32_t)reg; | |
| 589 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_register(%" PRIu64 ")\n", reg); | |
| 590 | break; | |
| 591 | case DW_CFA_def_cfa_offset: | |
| 592 | results->cfaRegisterOffset = (int32_t) | |
| 593 | addressSpace.getULEB128(p, instructionsEnd); | |
| 594 | results->codeOffsetAtStackDecrement = (uint32_t)codeOffset; | |
| 595 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_offset(%d)\n", | |
| 596 | results->cfaRegisterOffset); | |
| 597 | break; | |
| 598 | case DW_CFA_def_cfa_expression: | |
| 599 | results->cfaRegister = 0; | |
| 600 | results->cfaExpression = (int64_t)p; | |
| 601 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 602 | assert(length < static_cast<pint_t>(~0) && "pointer overflow"); | |
| 603 | p += static_cast<pint_t>(length); | |
| 604 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_expression(expression=0x%" PRIx64 | |
| 605 | ", length=%" PRIu64 ")\n", | |
| 606 | results->cfaExpression, length); | |
| 607 | break; | |
| 608 | case DW_CFA_expression: | |
| 609 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 610 | if (reg > kMaxRegisterNumber) { | |
| 611 | _LIBUNWIND_LOG0( | |
| 612 | "malformed DW_CFA_expression DWARF unwind, reg too big"); | |
| 613 | return false; | |
| 614 | } | |
| 615 | results->setRegister(reg, kRegisterAtExpression, (int64_t)p, | |
| 616 | initialState); | |
| 617 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 618 | assert(length < static_cast<pint_t>(~0) && "pointer overflow"); | |
| 619 | p += static_cast<pint_t>(length); | |
| 620 | _LIBUNWIND_TRACE_DWARF("DW_CFA_expression(reg=%" PRIu64 ", " | |
| 621 | "expression=0x%" PRIx64 ", " | |
| 622 | "length=%" PRIu64 ")\n", | |
| 623 | reg, results->savedRegisters[reg].value, length); | |
| 624 | break; | |
| 625 | case DW_CFA_offset_extended_sf: | |
| 626 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 627 | if (reg > kMaxRegisterNumber) { | |
| 628 | _LIBUNWIND_LOG0( | |
| 629 | "malformed DW_CFA_offset_extended_sf DWARF unwind, reg too big"); | |
| 630 | return false; | |
| 631 | } | |
| 632 | offset = | |
| 633 | addressSpace.getSLEB128(p, instructionsEnd) * cieInfo.dataAlignFactor; | |
| 634 | results->setRegister(reg, kRegisterInCFA, offset, initialState); | |
| 635 | _LIBUNWIND_TRACE_DWARF("DW_CFA_offset_extended_sf(reg=%" PRIu64 ", " | |
| 636 | "offset=%" PRId64 ")\n", | |
| 637 | reg, offset); | |
| 638 | break; | |
| 639 | case DW_CFA_def_cfa_sf: | |
| 640 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 641 | offset = | |
| 642 | addressSpace.getSLEB128(p, instructionsEnd) * cieInfo.dataAlignFactor; | |
| 643 | if (reg > kMaxRegisterNumber) { | |
| 644 | _LIBUNWIND_LOG0( | |
| 645 | "malformed DW_CFA_def_cfa_sf DWARF unwind, reg too big"); | |
| 646 | return false; | |
| 647 | } | |
| 648 | results->cfaRegister = (uint32_t)reg; | |
| 649 | results->cfaRegisterOffset = (int32_t)offset; | |
| 650 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_sf(reg=%" PRIu64 ", " | |
| 651 | "offset=%" PRId64 ")\n", | |
| 652 | reg, offset); | |
| 653 | break; | |
| 654 | case DW_CFA_def_cfa_offset_sf: | |
| 655 | results->cfaRegisterOffset = (int32_t) | |
| 656 | (addressSpace.getSLEB128(p, instructionsEnd) * cieInfo.dataAlignFactor); | |
| 657 | results->codeOffsetAtStackDecrement = (uint32_t)codeOffset; | |
| 658 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_offset_sf(%d)\n", | |
| 659 | results->cfaRegisterOffset); | |
| 660 | break; | |
| 661 | case DW_CFA_val_offset: | |
| 662 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 663 | if (reg > kMaxRegisterNumber) { | |
| 664 | _LIBUNWIND_LOG( | |
| 665 | "malformed DW_CFA_val_offset DWARF unwind, reg (%" PRIu64 | |
| 666 | ") out of range\n", | |
| 667 | reg); | |
| 668 | return false; | |
| 669 | } | |
| 670 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) | |
| 671 | * cieInfo.dataAlignFactor; | |
| 672 | results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); | |
| 673 | _LIBUNWIND_TRACE_DWARF("DW_CFA_val_offset(reg=%" PRIu64 ", " | |
| 674 | "offset=%" PRId64 "\n", | |
| 675 | reg, offset); | |
| 676 | break; | |
| 677 | case DW_CFA_val_offset_sf: | |
| 678 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 679 | if (reg > kMaxRegisterNumber) { | |
| 680 | _LIBUNWIND_LOG0( | |
| 681 | "malformed DW_CFA_val_offset_sf DWARF unwind, reg too big"); | |
| 682 | return false; | |
| 683 | } | |
| 684 | offset = | |
| 685 | addressSpace.getSLEB128(p, instructionsEnd) * cieInfo.dataAlignFactor; | |
| 686 | results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); | |
| 687 | _LIBUNWIND_TRACE_DWARF("DW_CFA_val_offset_sf(reg=%" PRIu64 ", " | |
| 688 | "offset=%" PRId64 "\n", | |
| 689 | reg, offset); | |
| 690 | break; | |
| 691 | case DW_CFA_val_expression: | |
| 692 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 693 | if (reg > kMaxRegisterNumber) { | |
| 694 | _LIBUNWIND_LOG0( | |
| 695 | "malformed DW_CFA_val_expression DWARF unwind, reg too big"); | |
| 696 | return false; | |
| 697 | } | |
| 698 | results->setRegister(reg, kRegisterIsExpression, (int64_t)p, | |
| 699 | initialState); | |
| 700 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 701 | assert(length < static_cast<pint_t>(~0) && "pointer overflow"); | |
| 702 | p += static_cast<pint_t>(length); | |
| 703 | _LIBUNWIND_TRACE_DWARF("DW_CFA_val_expression(reg=%" PRIu64 ", " | |
| 704 | "expression=0x%" PRIx64 ", length=%" PRIu64 ")\n", | |
| 705 | reg, results->savedRegisters[reg].value, length); | |
| 706 | break; | |
| 707 | case DW_CFA_GNU_args_size: | |
| 708 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 709 | results->spExtraArgSize = (uint32_t)length; | |
| 710 | _LIBUNWIND_TRACE_DWARF("DW_CFA_GNU_args_size(%" PRIu64 ")\n", length); | |
| 711 | break; | |
| 712 | case DW_CFA_GNU_negative_offset_extended: | |
| 713 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 714 | if (reg > kMaxRegisterNumber) { | |
| 715 | _LIBUNWIND_LOG0("malformed DW_CFA_GNU_negative_offset_extended DWARF " | |
| 716 | "unwind, reg too big"); | |
| 717 | return false; | |
| 417 | ParseInfo parseInfoArray[] = { | |
| 418 | {cieInfo.cieInstructions, cieInfo.cieStart + cieInfo.cieLength, | |
| 419 | (pint_t)(-1)}, | |
| 420 | {fdeInfo.fdeInstructions, fdeInfo.fdeStart + fdeInfo.fdeLength, | |
| 421 | upToPC - fdeInfo.pcStart}}; | |
| 422 | ||
| 423 | for (const auto &info : parseInfoArray) { | |
| 424 | pint_t p = info.instructions; | |
| 425 | pint_t instructionsEnd = info.instructionsEnd; | |
| 426 | pint_t pcoffset = info.pcoffset; | |
| 427 | pint_t codeOffset = 0; | |
| 428 | ||
| 429 | // initialState initialized as registers in results are modified. Use | |
| 430 | // PrologInfo accessor functions to avoid reading uninitialized data. | |
| 431 | PrologInfo initialState(PrologInfo::InitializeTime::kLazy); | |
| 432 | ||
| 433 | _LIBUNWIND_TRACE_DWARF("parseFDEInstructions(instructions=0x%0" PRIx64 | |
| 434 | ")\n", | |
| 435 | static_cast<uint64_t>(instructionsEnd)); | |
| 436 | ||
| 437 | // see DWARF Spec, section 6.4.2 for details on unwind opcodes | |
| 438 | while ((p < instructionsEnd) && (codeOffset < pcoffset)) { | |
| 439 | uint64_t reg; | |
| 440 | uint64_t reg2; | |
| 441 | int64_t offset; | |
| 442 | uint64_t length; | |
| 443 | uint8_t opcode = addressSpace.get8(p); | |
| 444 | uint8_t operand; | |
| 445 | ||
| 446 | ++p; | |
| 447 | switch (opcode) { | |
| 448 | case DW_CFA_nop: | |
| 449 | _LIBUNWIND_TRACE_DWARF("DW_CFA_nop\n"); | |
| 450 | break; | |
| 451 | case DW_CFA_set_loc: | |
| 452 | codeOffset = addressSpace.getEncodedP(p, instructionsEnd, | |
| 453 | cieInfo.pointerEncoding); | |
| 454 | _LIBUNWIND_TRACE_DWARF("DW_CFA_set_loc\n"); | |
| 455 | break; | |
| 456 | case DW_CFA_advance_loc1: | |
| 457 | codeOffset += (addressSpace.get8(p) * cieInfo.codeAlignFactor); | |
| 458 | p += 1; | |
| 459 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc1: new offset=%" PRIu64 "\n", | |
| 460 | static_cast<uint64_t>(codeOffset)); | |
| 461 | break; | |
| 462 | case DW_CFA_advance_loc2: | |
| 463 | codeOffset += (addressSpace.get16(p) * cieInfo.codeAlignFactor); | |
| 464 | p += 2; | |
| 465 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc2: new offset=%" PRIu64 "\n", | |
| 466 | static_cast<uint64_t>(codeOffset)); | |
| 467 | break; | |
| 468 | case DW_CFA_advance_loc4: | |
| 469 | codeOffset += (addressSpace.get32(p) * cieInfo.codeAlignFactor); | |
| 470 | p += 4; | |
| 471 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc4: new offset=%" PRIu64 "\n", | |
| 472 | static_cast<uint64_t>(codeOffset)); | |
| 473 | break; | |
| 474 | case DW_CFA_offset_extended: | |
| 475 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 476 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) * | |
| 477 | cieInfo.dataAlignFactor; | |
| 478 | if (reg > kMaxRegisterNumber) { | |
| 479 | _LIBUNWIND_LOG0( | |
| 480 | "malformed DW_CFA_offset_extended DWARF unwind, reg too big"); | |
| 481 | return false; | |
| 482 | } | |
| 483 | results->setRegister(reg, kRegisterInCFA, offset, initialState); | |
| 484 | _LIBUNWIND_TRACE_DWARF("DW_CFA_offset_extended(reg=%" PRIu64 ", " | |
| 485 | "offset=%" PRId64 ")\n", | |
| 486 | reg, offset); | |
| 487 | break; | |
| 488 | case DW_CFA_restore_extended: | |
| 489 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 490 | if (reg > kMaxRegisterNumber) { | |
| 491 | _LIBUNWIND_LOG0( | |
| 492 | "malformed DW_CFA_restore_extended DWARF unwind, reg too big"); | |
| 493 | return false; | |
| 494 | } | |
| 495 | results->restoreRegisterToInitialState(reg, initialState); | |
| 496 | _LIBUNWIND_TRACE_DWARF("DW_CFA_restore_extended(reg=%" PRIu64 ")\n", | |
| 497 | reg); | |
| 498 | break; | |
| 499 | case DW_CFA_undefined: | |
| 500 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 501 | if (reg > kMaxRegisterNumber) { | |
| 502 | _LIBUNWIND_LOG0( | |
| 503 | "malformed DW_CFA_undefined DWARF unwind, reg too big"); | |
| 504 | return false; | |
| 505 | } | |
| 506 | results->setRegisterLocation(reg, kRegisterUndefined, initialState); | |
| 507 | _LIBUNWIND_TRACE_DWARF("DW_CFA_undefined(reg=%" PRIu64 ")\n", reg); | |
| 508 | break; | |
| 509 | case DW_CFA_same_value: | |
| 510 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 511 | if (reg > kMaxRegisterNumber) { | |
| 512 | _LIBUNWIND_LOG0( | |
| 513 | "malformed DW_CFA_same_value DWARF unwind, reg too big"); | |
| 514 | return false; | |
| 515 | } | |
| 516 | // <rdar://problem/8456377> DW_CFA_same_value unsupported | |
| 517 | // "same value" means register was stored in frame, but its current | |
| 518 | // value has not changed, so no need to restore from frame. | |
| 519 | // We model this as if the register was never saved. | |
| 520 | results->setRegisterLocation(reg, kRegisterUnused, initialState); | |
| 521 | _LIBUNWIND_TRACE_DWARF("DW_CFA_same_value(reg=%" PRIu64 ")\n", reg); | |
| 522 | break; | |
| 523 | case DW_CFA_register: | |
| 524 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 525 | reg2 = addressSpace.getULEB128(p, instructionsEnd); | |
| 526 | if (reg > kMaxRegisterNumber) { | |
| 527 | _LIBUNWIND_LOG0( | |
| 528 | "malformed DW_CFA_register DWARF unwind, reg too big"); | |
| 529 | return false; | |
| 530 | } | |
| 531 | if (reg2 > kMaxRegisterNumber) { | |
| 532 | _LIBUNWIND_LOG0( | |
| 533 | "malformed DW_CFA_register DWARF unwind, reg2 too big"); | |
| 534 | return false; | |
| 535 | } | |
| 536 | results->setRegister(reg, kRegisterInRegister, (int64_t)reg2, | |
| 537 | initialState); | |
| 538 | _LIBUNWIND_TRACE_DWARF( | |
| 539 | "DW_CFA_register(reg=%" PRIu64 ", reg2=%" PRIu64 ")\n", reg, reg2); | |
| 540 | break; | |
| 541 | case DW_CFA_remember_state: { | |
| 542 | // Avoid operator new because that would be an upward dependency. | |
| 543 | // Avoid malloc because it needs heap allocation. | |
| 544 | PrologInfoStackEntry *entry = | |
| 545 | (PrologInfoStackEntry *)_LIBUNWIND_REMEMBER_ALLOC( | |
| 546 | sizeof(PrologInfoStackEntry)); | |
| 547 | if (entry != NULL) { | |
| 548 | entry->next = rememberStack.entry; | |
| 549 | entry->info = *results; | |
| 550 | rememberStack.entry = entry; | |
| 551 | } else { | |
| 552 | return false; | |
| 553 | } | |
| 554 | _LIBUNWIND_TRACE_DWARF("DW_CFA_remember_state\n"); | |
| 555 | break; | |
| 718 | 556 | } |
| 719 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) | |
| 720 | * cieInfo.dataAlignFactor; | |
| 721 | results->setRegister(reg, kRegisterInCFA, -offset, initialState); | |
| 722 | _LIBUNWIND_TRACE_DWARF( | |
| 723 | "DW_CFA_GNU_negative_offset_extended(%" PRId64 ")\n", offset); | |
| 724 | break; | |
| 557 | case DW_CFA_restore_state: | |
| 558 | if (rememberStack.entry != NULL) { | |
| 559 | PrologInfoStackEntry *top = rememberStack.entry; | |
| 560 | *results = top->info; | |
| 561 | rememberStack.entry = top->next; | |
| 562 | _LIBUNWIND_REMEMBER_FREE(top); | |
| 563 | } else { | |
| 564 | return false; | |
| 565 | } | |
| 566 | _LIBUNWIND_TRACE_DWARF("DW_CFA_restore_state\n"); | |
| 567 | break; | |
| 568 | case DW_CFA_def_cfa: | |
| 569 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 570 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd); | |
| 571 | if (reg > kMaxRegisterNumber) { | |
| 572 | _LIBUNWIND_LOG0("malformed DW_CFA_def_cfa DWARF unwind, reg too big"); | |
| 573 | return false; | |
| 574 | } | |
| 575 | results->cfaRegister = (uint32_t)reg; | |
| 576 | results->cfaRegisterOffset = (int32_t)offset; | |
| 577 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa(reg=%" PRIu64 ", offset=%" PRIu64 | |
| 578 | ")\n", | |
| 579 | reg, offset); | |
| 580 | break; | |
| 581 | case DW_CFA_def_cfa_register: | |
| 582 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 583 | if (reg > kMaxRegisterNumber) { | |
| 584 | _LIBUNWIND_LOG0( | |
| 585 | "malformed DW_CFA_def_cfa_register DWARF unwind, reg too big"); | |
| 586 | return false; | |
| 587 | } | |
| 588 | results->cfaRegister = (uint32_t)reg; | |
| 589 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_register(%" PRIu64 ")\n", reg); | |
| 590 | break; | |
| 591 | case DW_CFA_def_cfa_offset: | |
| 592 | results->cfaRegisterOffset = | |
| 593 | (int32_t)addressSpace.getULEB128(p, instructionsEnd); | |
| 594 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_offset(%d)\n", | |
| 595 | results->cfaRegisterOffset); | |
| 596 | break; | |
| 597 | case DW_CFA_def_cfa_expression: | |
| 598 | results->cfaRegister = 0; | |
| 599 | results->cfaExpression = (int64_t)p; | |
| 600 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 601 | assert(length < static_cast<pint_t>(~0) && "pointer overflow"); | |
| 602 | p += static_cast<pint_t>(length); | |
| 603 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_expression(expression=0x%" PRIx64 | |
| 604 | ", length=%" PRIu64 ")\n", | |
| 605 | results->cfaExpression, length); | |
| 606 | break; | |
| 607 | case DW_CFA_expression: | |
| 608 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 609 | if (reg > kMaxRegisterNumber) { | |
| 610 | _LIBUNWIND_LOG0( | |
| 611 | "malformed DW_CFA_expression DWARF unwind, reg too big"); | |
| 612 | return false; | |
| 613 | } | |
| 614 | results->setRegister(reg, kRegisterAtExpression, (int64_t)p, | |
| 615 | initialState); | |
| 616 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 617 | assert(length < static_cast<pint_t>(~0) && "pointer overflow"); | |
| 618 | p += static_cast<pint_t>(length); | |
| 619 | _LIBUNWIND_TRACE_DWARF("DW_CFA_expression(reg=%" PRIu64 ", " | |
| 620 | "expression=0x%" PRIx64 ", " | |
| 621 | "length=%" PRIu64 ")\n", | |
| 622 | reg, results->savedRegisters[reg].value, length); | |
| 623 | break; | |
| 624 | case DW_CFA_offset_extended_sf: | |
| 625 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 626 | if (reg > kMaxRegisterNumber) { | |
| 627 | _LIBUNWIND_LOG0( | |
| 628 | "malformed DW_CFA_offset_extended_sf DWARF unwind, reg too big"); | |
| 629 | return false; | |
| 630 | } | |
| 631 | offset = addressSpace.getSLEB128(p, instructionsEnd) * | |
| 632 | cieInfo.dataAlignFactor; | |
| 633 | results->setRegister(reg, kRegisterInCFA, offset, initialState); | |
| 634 | _LIBUNWIND_TRACE_DWARF("DW_CFA_offset_extended_sf(reg=%" PRIu64 ", " | |
| 635 | "offset=%" PRId64 ")\n", | |
| 636 | reg, offset); | |
| 637 | break; | |
| 638 | case DW_CFA_def_cfa_sf: | |
| 639 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 640 | offset = addressSpace.getSLEB128(p, instructionsEnd) * | |
| 641 | cieInfo.dataAlignFactor; | |
| 642 | if (reg > kMaxRegisterNumber) { | |
| 643 | _LIBUNWIND_LOG0( | |
| 644 | "malformed DW_CFA_def_cfa_sf DWARF unwind, reg too big"); | |
| 645 | return false; | |
| 646 | } | |
| 647 | results->cfaRegister = (uint32_t)reg; | |
| 648 | results->cfaRegisterOffset = (int32_t)offset; | |
| 649 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_sf(reg=%" PRIu64 ", " | |
| 650 | "offset=%" PRId64 ")\n", | |
| 651 | reg, offset); | |
| 652 | break; | |
| 653 | case DW_CFA_def_cfa_offset_sf: | |
| 654 | results->cfaRegisterOffset = | |
| 655 | (int32_t)(addressSpace.getSLEB128(p, instructionsEnd) * | |
| 656 | cieInfo.dataAlignFactor); | |
| 657 | _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_offset_sf(%d)\n", | |
| 658 | results->cfaRegisterOffset); | |
| 659 | break; | |
| 660 | case DW_CFA_val_offset: | |
| 661 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 662 | if (reg > kMaxRegisterNumber) { | |
| 663 | _LIBUNWIND_LOG( | |
| 664 | "malformed DW_CFA_val_offset DWARF unwind, reg (%" PRIu64 | |
| 665 | ") out of range\n", | |
| 666 | reg); | |
| 667 | return false; | |
| 668 | } | |
| 669 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) * | |
| 670 | cieInfo.dataAlignFactor; | |
| 671 | results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); | |
| 672 | _LIBUNWIND_TRACE_DWARF("DW_CFA_val_offset(reg=%" PRIu64 ", " | |
| 673 | "offset=%" PRId64 "\n", | |
| 674 | reg, offset); | |
| 675 | break; | |
| 676 | case DW_CFA_val_offset_sf: | |
| 677 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 678 | if (reg > kMaxRegisterNumber) { | |
| 679 | _LIBUNWIND_LOG0( | |
| 680 | "malformed DW_CFA_val_offset_sf DWARF unwind, reg too big"); | |
| 681 | return false; | |
| 682 | } | |
| 683 | offset = addressSpace.getSLEB128(p, instructionsEnd) * | |
| 684 | cieInfo.dataAlignFactor; | |
| 685 | results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); | |
| 686 | _LIBUNWIND_TRACE_DWARF("DW_CFA_val_offset_sf(reg=%" PRIu64 ", " | |
| 687 | "offset=%" PRId64 "\n", | |
| 688 | reg, offset); | |
| 689 | break; | |
| 690 | case DW_CFA_val_expression: | |
| 691 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 692 | if (reg > kMaxRegisterNumber) { | |
| 693 | _LIBUNWIND_LOG0( | |
| 694 | "malformed DW_CFA_val_expression DWARF unwind, reg too big"); | |
| 695 | return false; | |
| 696 | } | |
| 697 | results->setRegister(reg, kRegisterIsExpression, (int64_t)p, | |
| 698 | initialState); | |
| 699 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 700 | assert(length < static_cast<pint_t>(~0) && "pointer overflow"); | |
| 701 | p += static_cast<pint_t>(length); | |
| 702 | _LIBUNWIND_TRACE_DWARF("DW_CFA_val_expression(reg=%" PRIu64 ", " | |
| 703 | "expression=0x%" PRIx64 ", length=%" PRIu64 | |
| 704 | ")\n", | |
| 705 | reg, results->savedRegisters[reg].value, length); | |
| 706 | break; | |
| 707 | case DW_CFA_GNU_args_size: | |
| 708 | length = addressSpace.getULEB128(p, instructionsEnd); | |
| 709 | results->spExtraArgSize = (uint32_t)length; | |
| 710 | _LIBUNWIND_TRACE_DWARF("DW_CFA_GNU_args_size(%" PRIu64 ")\n", length); | |
| 711 | break; | |
| 712 | case DW_CFA_GNU_negative_offset_extended: | |
| 713 | reg = addressSpace.getULEB128(p, instructionsEnd); | |
| 714 | if (reg > kMaxRegisterNumber) { | |
| 715 | _LIBUNWIND_LOG0("malformed DW_CFA_GNU_negative_offset_extended DWARF " | |
| 716 | "unwind, reg too big"); | |
| 717 | return false; | |
| 718 | } | |
| 719 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) * | |
| 720 | cieInfo.dataAlignFactor; | |
| 721 | results->setRegister(reg, kRegisterInCFA, -offset, initialState); | |
| 722 | _LIBUNWIND_TRACE_DWARF( | |
| 723 | "DW_CFA_GNU_negative_offset_extended(%" PRId64 ")\n", offset); | |
| 724 | break; | |
| 725 | 725 | |
| 726 | 726 | #if defined(_LIBUNWIND_TARGET_AARCH64) || defined(_LIBUNWIND_TARGET_SPARC) |
| 727 | // The same constant is used to represent different instructions on | |
| 728 | // AArch64 (negate_ra_state) and SPARC (window_save). | |
| 729 | static_assert(DW_CFA_AARCH64_negate_ra_state == DW_CFA_GNU_window_save, | |
| 730 | "uses the same constant"); | |
| 731 | case DW_CFA_AARCH64_negate_ra_state: | |
| 732 | switch (arch) { | |
| 727 | // The same constant is used to represent different instructions on | |
| 728 | // AArch64 (negate_ra_state) and SPARC (window_save). | |
| 729 | static_assert(DW_CFA_AARCH64_negate_ra_state == DW_CFA_GNU_window_save, | |
| 730 | "uses the same constant"); | |
| 731 | case DW_CFA_AARCH64_negate_ra_state: | |
| 732 | switch (arch) { | |
| 733 | 733 | #if defined(_LIBUNWIND_TARGET_AARCH64) |
| 734 | 734 | case REGISTERS_ARM64: { |
| 735 | 735 | int64_t value = |
| 736 | 736 | results->savedRegisters[UNW_ARM64_RA_SIGN_STATE].value ^ 0x1; |
| 737 | results->setRegisterValue(UNW_ARM64_RA_SIGN_STATE, value, initialState); | |
| 737 | results->setRegisterValue(UNW_ARM64_RA_SIGN_STATE, value, | |
| 738 | initialState); | |
| 738 | 739 | _LIBUNWIND_TRACE_DWARF("DW_CFA_AARCH64_negate_ra_state\n"); |
| 739 | 740 | } break; |
| 740 | 741 | #endif |
| 741 | 742 | |
| 742 | 743 | #if defined(_LIBUNWIND_TARGET_SPARC) |
| 743 | // case DW_CFA_GNU_window_save: | |
| 744 | case REGISTERS_SPARC: | |
| 745 | _LIBUNWIND_TRACE_DWARF("DW_CFA_GNU_window_save()\n"); | |
| 746 | for (reg = UNW_SPARC_O0; reg <= UNW_SPARC_O7; reg++) { | |
| 747 | results->setRegister(reg, kRegisterInRegister, | |
| 748 | ((int64_t)reg - UNW_SPARC_O0) + UNW_SPARC_I0, | |
| 749 | initialState); | |
| 750 | } | |
| 744 | // case DW_CFA_GNU_window_save: | |
| 745 | case REGISTERS_SPARC: | |
| 746 | _LIBUNWIND_TRACE_DWARF("DW_CFA_GNU_window_save()\n"); | |
| 747 | for (reg = UNW_SPARC_O0; reg <= UNW_SPARC_O7; reg++) { | |
| 748 | results->setRegister(reg, kRegisterInRegister, | |
| 749 | ((int64_t)reg - UNW_SPARC_O0) + UNW_SPARC_I0, | |
| 750 | initialState); | |
| 751 | } | |
| 751 | 752 | |
| 752 | for (reg = UNW_SPARC_L0; reg <= UNW_SPARC_I7; reg++) { | |
| 753 | results->setRegister(reg, kRegisterInCFA, | |
| 754 | ((int64_t)reg - UNW_SPARC_L0) * 4, initialState); | |
| 753 | for (reg = UNW_SPARC_L0; reg <= UNW_SPARC_I7; reg++) { | |
| 754 | results->setRegister(reg, kRegisterInCFA, | |
| 755 | ((int64_t)reg - UNW_SPARC_L0) * 4, | |
| 756 | initialState); | |
| 757 | } | |
| 758 | break; | |
| 759 | #endif | |
| 755 | 760 | } |
| 756 | 761 | break; |
| 757 | #endif | |
| 758 | } | |
| 759 | break; | |
| 760 | 762 | #else |
| 761 | (void)arch; | |
| 763 | (void)arch; | |
| 762 | 764 | #endif |
| 763 | 765 | |
| 764 | default: | |
| 765 | operand = opcode & 0x3F; | |
| 766 | switch (opcode & 0xC0) { | |
| 767 | case DW_CFA_offset: | |
| 768 | reg = operand; | |
| 769 | if (reg > kMaxRegisterNumber) { | |
| 770 | _LIBUNWIND_LOG("malformed DW_CFA_offset DWARF unwind, reg (%" PRIu64 | |
| 771 | ") out of range", | |
| 772 | reg); | |
| 773 | return false; | |
| 774 | } | |
| 775 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) | |
| 776 | * cieInfo.dataAlignFactor; | |
| 777 | results->setRegister(reg, kRegisterInCFA, offset, initialState); | |
| 778 | _LIBUNWIND_TRACE_DWARF("DW_CFA_offset(reg=%d, offset=%" PRId64 ")\n", | |
| 779 | operand, offset); | |
| 780 | break; | |
| 781 | case DW_CFA_advance_loc: | |
| 782 | codeOffset += operand * cieInfo.codeAlignFactor; | |
| 783 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc: new offset=%" PRIu64 "\n", | |
| 784 | static_cast<uint64_t>(codeOffset)); | |
| 785 | break; | |
| 786 | case DW_CFA_restore: | |
| 787 | reg = operand; | |
| 788 | if (reg > kMaxRegisterNumber) { | |
| 789 | _LIBUNWIND_LOG("malformed DW_CFA_restore DWARF unwind, reg (%" PRIu64 | |
| 790 | ") out of range", | |
| 791 | reg); | |
| 766 | default: | |
| 767 | operand = opcode & 0x3F; | |
| 768 | switch (opcode & 0xC0) { | |
| 769 | case DW_CFA_offset: | |
| 770 | reg = operand; | |
| 771 | if (reg > kMaxRegisterNumber) { | |
| 772 | _LIBUNWIND_LOG("malformed DW_CFA_offset DWARF unwind, reg (%" PRIu64 | |
| 773 | ") out of range", | |
| 774 | reg); | |
| 775 | return false; | |
| 776 | } | |
| 777 | offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd) * | |
| 778 | cieInfo.dataAlignFactor; | |
| 779 | results->setRegister(reg, kRegisterInCFA, offset, initialState); | |
| 780 | _LIBUNWIND_TRACE_DWARF("DW_CFA_offset(reg=%d, offset=%" PRId64 ")\n", | |
| 781 | operand, offset); | |
| 782 | break; | |
| 783 | case DW_CFA_advance_loc: | |
| 784 | codeOffset += operand * cieInfo.codeAlignFactor; | |
| 785 | _LIBUNWIND_TRACE_DWARF("DW_CFA_advance_loc: new offset=%" PRIu64 "\n", | |
| 786 | static_cast<uint64_t>(codeOffset)); | |
| 787 | break; | |
| 788 | case DW_CFA_restore: | |
| 789 | reg = operand; | |
| 790 | if (reg > kMaxRegisterNumber) { | |
| 791 | _LIBUNWIND_LOG( | |
| 792 | "malformed DW_CFA_restore DWARF unwind, reg (%" PRIu64 | |
| 793 | ") out of range", | |
| 794 | reg); | |
| 795 | return false; | |
| 796 | } | |
| 797 | results->restoreRegisterToInitialState(reg, initialState); | |
| 798 | _LIBUNWIND_TRACE_DWARF("DW_CFA_restore(reg=%" PRIu64 ")\n", | |
| 799 | static_cast<uint64_t>(operand)); | |
| 800 | break; | |
| 801 | default: | |
| 802 | _LIBUNWIND_TRACE_DWARF("unknown CFA opcode 0x%02X\n", opcode); | |
| 792 | 803 | return false; |
| 793 | 804 | } |
| 794 | results->restoreRegisterToInitialState(reg, initialState); | |
| 795 | _LIBUNWIND_TRACE_DWARF("DW_CFA_restore(reg=%" PRIu64 ")\n", | |
| 796 | static_cast<uint64_t>(operand)); | |
| 797 | break; | |
| 798 | default: | |
| 799 | _LIBUNWIND_TRACE_DWARF("unknown CFA opcode 0x%02X\n", opcode); | |
| 800 | return false; | |
| 801 | 805 | } |
| 802 | 806 | } |
| 803 | 807 | } |
| 804 | ||
| 805 | 808 | return true; |
| 806 | 809 | } |
| 807 | 810 |
lib/libunwind/src/FrameHeaderCache.hpp+1-1| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | class _LIBUNWIND_HIDDEN FrameHeaderCache { |
| 33 | 33 | struct CacheEntry { |
| 34 | 34 | uintptr_t LowPC() { return Info.dso_base; }; |
| 35 | uintptr_t HighPC() { return Info.dso_base + Info.dwarf_section_length; }; | |
| 35 | uintptr_t HighPC() { return Info.dso_base + Info.text_segment_length; }; | |
| 36 | 36 | UnwindInfoSections Info; |
| 37 | 37 | CacheEntry *Next; |
| 38 | 38 | }; |
lib/libunwind/src/Registers.hpp+453-5| ... | ... | @@ -36,9 +36,12 @@ enum { |
| 36 | 36 | REGISTERS_SPARC, |
| 37 | 37 | REGISTERS_HEXAGON, |
| 38 | 38 | REGISTERS_RISCV, |
| 39 | REGISTERS_VE, | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 | #if defined(_LIBUNWIND_TARGET_I386) |
| 43 | class _LIBUNWIND_HIDDEN Registers_x86; | |
| 44 | extern "C" void __libunwind_Registers_x86_jumpto(Registers_x86 *); | |
| 42 | 45 | /// Registers_x86 holds the register state of a thread in a 32-bit intel |
| 43 | 46 | /// process. |
| 44 | 47 | class _LIBUNWIND_HIDDEN Registers_x86 { |
| ... | ... | @@ -56,7 +59,7 @@ public: |
| 56 | 59 | v128 getVectorRegister(int num) const; |
| 57 | 60 | void setVectorRegister(int num, v128 value); |
| 58 | 61 | static const char *getRegisterName(int num); |
| 59 | void jumpto(); | |
| 62 | void jumpto() { __libunwind_Registers_x86_jumpto(this); } | |
| 60 | 63 | static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86; } |
| 61 | 64 | static int getArch() { return REGISTERS_X86; } |
| 62 | 65 | |
| ... | ... | @@ -248,6 +251,8 @@ inline void Registers_x86::setVectorRegister(int, v128) { |
| 248 | 251 | #if defined(_LIBUNWIND_TARGET_X86_64) |
| 249 | 252 | /// Registers_x86_64 holds the register state of a thread in a 64-bit intel |
| 250 | 253 | /// process. |
| 254 | class _LIBUNWIND_HIDDEN Registers_x86_64; | |
| 255 | extern "C" void __libunwind_Registers_x86_64_jumpto(Registers_x86_64 *); | |
| 251 | 256 | class _LIBUNWIND_HIDDEN Registers_x86_64 { |
| 252 | 257 | public: |
| 253 | 258 | Registers_x86_64(); |
| ... | ... | @@ -263,7 +268,7 @@ public: |
| 263 | 268 | v128 getVectorRegister(int num) const; |
| 264 | 269 | void setVectorRegister(int num, v128 value); |
| 265 | 270 | static const char *getRegisterName(int num); |
| 266 | void jumpto(); | |
| 271 | void jumpto() { __libunwind_Registers_x86_64_jumpto(this); } | |
| 267 | 272 | static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64; } |
| 268 | 273 | static int getArch() { return REGISTERS_X86_64; } |
| 269 | 274 | |
| ... | ... | @@ -1510,12 +1515,12 @@ inline void Registers_ppc64::setFloatRegister(int regNum, double value) { |
| 1510 | 1515 | } |
| 1511 | 1516 | |
| 1512 | 1517 | inline bool Registers_ppc64::validVectorRegister(int regNum) const { |
| 1513 | #ifdef PPC64_HAS_VMX | |
| 1518 | #if defined(__VSX__) | |
| 1514 | 1519 | if (regNum >= UNW_PPC64_VS0 && regNum <= UNW_PPC64_VS31) |
| 1515 | 1520 | return true; |
| 1516 | 1521 | if (regNum >= UNW_PPC64_VS32 && regNum <= UNW_PPC64_VS63) |
| 1517 | 1522 | return true; |
| 1518 | #else | |
| 1523 | #elif defined(__ALTIVEC__) | |
| 1519 | 1524 | if (regNum >= UNW_PPC64_V0 && regNum <= UNW_PPC64_V31) |
| 1520 | 1525 | return true; |
| 1521 | 1526 | #endif |
| ... | ... | @@ -1771,6 +1776,8 @@ inline const char *Registers_ppc64::getRegisterName(int regNum) { |
| 1771 | 1776 | #if defined(_LIBUNWIND_TARGET_AARCH64) |
| 1772 | 1777 | /// Registers_arm64 holds the register state of a thread in a 64-bit arm |
| 1773 | 1778 | /// process. |
| 1779 | class _LIBUNWIND_HIDDEN Registers_arm64; | |
| 1780 | extern "C" void __libunwind_Registers_arm64_jumpto(Registers_arm64 *); | |
| 1774 | 1781 | class _LIBUNWIND_HIDDEN Registers_arm64 { |
| 1775 | 1782 | public: |
| 1776 | 1783 | Registers_arm64(); |
| ... | ... | @@ -1786,7 +1793,7 @@ public: |
| 1786 | 1793 | v128 getVectorRegister(int num) const; |
| 1787 | 1794 | void setVectorRegister(int num, v128 value); |
| 1788 | 1795 | static const char *getRegisterName(int num); |
| 1789 | void jumpto(); | |
| 1796 | void jumpto() { __libunwind_Registers_arm64_jumpto(this); } | |
| 1790 | 1797 | static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64; } |
| 1791 | 1798 | static int getArch() { return REGISTERS_ARM64; } |
| 1792 | 1799 | |
| ... | ... | @@ -3977,6 +3984,447 @@ inline void Registers_riscv::setVectorRegister(int, v128) { |
| 3977 | 3984 | _LIBUNWIND_ABORT("no riscv vector register support yet"); |
| 3978 | 3985 | } |
| 3979 | 3986 | #endif // _LIBUNWIND_TARGET_RISCV |
| 3987 | ||
| 3988 | #if defined(_LIBUNWIND_TARGET_VE) | |
| 3989 | /// Registers_ve holds the register state of a thread in a VE process. | |
| 3990 | class _LIBUNWIND_HIDDEN Registers_ve { | |
| 3991 | public: | |
| 3992 | Registers_ve(); | |
| 3993 | Registers_ve(const void *registers); | |
| 3994 | ||
| 3995 | bool validRegister(int num) const; | |
| 3996 | uint64_t getRegister(int num) const; | |
| 3997 | void setRegister(int num, uint64_t value); | |
| 3998 | bool validFloatRegister(int num) const; | |
| 3999 | double getFloatRegister(int num) const; | |
| 4000 | void setFloatRegister(int num, double value); | |
| 4001 | bool validVectorRegister(int num) const; | |
| 4002 | v128 getVectorRegister(int num) const; | |
| 4003 | void setVectorRegister(int num, v128 value); | |
| 4004 | static const char *getRegisterName(int num); | |
| 4005 | void jumpto(); | |
| 4006 | static int lastDwarfRegNum() { return _LIBUNWIND_HIGHEST_DWARF_REGISTER_VE; } | |
| 4007 | static int getArch() { return REGISTERS_VE; } | |
| 4008 | ||
| 4009 | uint64_t getSP() const { return _registers.__s[11]; } | |
| 4010 | void setSP(uint64_t value) { _registers.__s[11] = value; } | |
| 4011 | uint64_t getIP() const { return _registers.__ic; } | |
| 4012 | void setIP(uint64_t value) { _registers.__ic = value; } | |
| 4013 | ||
| 4014 | private: | |
| 4015 | // FIXME: Need to store not only scalar registers but also vector and vector | |
| 4016 | // mask registers. VEOS uses mcontext_t defined in ucontext.h. It takes | |
| 4017 | // 524288 bytes (65536*8 bytes), though. Currently, we use libunwind for | |
| 4018 | // SjLj exception support only, so Registers_ve is not implemented completely. | |
| 4019 | struct ve_thread_state_t { | |
| 4020 | uint64_t __s[64]; // s0-s64 | |
| 4021 | uint64_t __ic; // Instruction counter (IC) | |
| 4022 | uint64_t __vixr; // Vector Index Register | |
| 4023 | uint64_t __vl; // Vector Length Register | |
| 4024 | }; | |
| 4025 | ||
| 4026 | ve_thread_state_t _registers; // total 67 registers | |
| 4027 | ||
| 4028 | // Currently no vector register is preserved. | |
| 4029 | }; | |
| 4030 | ||
| 4031 | inline Registers_ve::Registers_ve(const void *registers) { | |
| 4032 | static_assert((check_fit<Registers_ve, unw_context_t>::does_fit), | |
| 4033 | "ve registers do not fit into unw_context_t"); | |
| 4034 | memcpy(&_registers, static_cast<const uint8_t *>(registers), | |
| 4035 | sizeof(_registers)); | |
| 4036 | static_assert(sizeof(_registers) == 536, | |
| 4037 | "expected vector register offset to be 536"); | |
| 4038 | } | |
| 4039 | ||
| 4040 | inline Registers_ve::Registers_ve() { | |
| 4041 | memset(&_registers, 0, sizeof(_registers)); | |
| 4042 | } | |
| 4043 | ||
| 4044 | inline bool Registers_ve::validRegister(int regNum) const { | |
| 4045 | if (regNum >= UNW_VE_S0 && regNum <= UNW_VE_S63) | |
| 4046 | return true; | |
| 4047 | ||
| 4048 | switch (regNum) { | |
| 4049 | case UNW_REG_IP: | |
| 4050 | case UNW_REG_SP: | |
| 4051 | case UNW_VE_VIXR: | |
| 4052 | case UNW_VE_VL: | |
| 4053 | return true; | |
| 4054 | default: | |
| 4055 | return false; | |
| 4056 | } | |
| 4057 | } | |
| 4058 | ||
| 4059 | inline uint64_t Registers_ve::getRegister(int regNum) const { | |
| 4060 | if (regNum >= UNW_VE_S0 && regNum <= UNW_VE_S63) | |
| 4061 | return _registers.__s[regNum - UNW_VE_S0]; | |
| 4062 | ||
| 4063 | switch (regNum) { | |
| 4064 | case UNW_REG_IP: | |
| 4065 | return _registers.__ic; | |
| 4066 | case UNW_REG_SP: | |
| 4067 | return _registers.__s[11]; | |
| 4068 | case UNW_VE_VIXR: | |
| 4069 | return _registers.__vixr; | |
| 4070 | case UNW_VE_VL: | |
| 4071 | return _registers.__vl; | |
| 4072 | } | |
| 4073 | _LIBUNWIND_ABORT("unsupported ve register"); | |
| 4074 | } | |
| 4075 | ||
| 4076 | inline void Registers_ve::setRegister(int regNum, uint64_t value) { | |
| 4077 | if (regNum >= UNW_VE_S0 && regNum <= UNW_VE_S63) { | |
| 4078 | _registers.__s[regNum - UNW_VE_S0] = value; | |
| 4079 | return; | |
| 4080 | } | |
| 4081 | ||
| 4082 | switch (regNum) { | |
| 4083 | case UNW_REG_IP: | |
| 4084 | _registers.__ic = value; | |
| 4085 | return; | |
| 4086 | case UNW_REG_SP: | |
| 4087 | _registers.__s[11] = value; | |
| 4088 | return; | |
| 4089 | case UNW_VE_VIXR: | |
| 4090 | _registers.__vixr = value; | |
| 4091 | return; | |
| 4092 | case UNW_VE_VL: | |
| 4093 | _registers.__vl = value; | |
| 4094 | return; | |
| 4095 | } | |
| 4096 | _LIBUNWIND_ABORT("unsupported ve register"); | |
| 4097 | } | |
| 4098 | ||
| 4099 | inline bool Registers_ve::validFloatRegister(int /* regNum */) const { | |
| 4100 | return false; | |
| 4101 | } | |
| 4102 | ||
| 4103 | inline double Registers_ve::getFloatRegister(int /* regNum */) const { | |
| 4104 | _LIBUNWIND_ABORT("VE doesn't have float registers"); | |
| 4105 | } | |
| 4106 | ||
| 4107 | inline void Registers_ve::setFloatRegister(int /* regNum */, | |
| 4108 | double /* value */) { | |
| 4109 | _LIBUNWIND_ABORT("VE doesn't have float registers"); | |
| 4110 | } | |
| 4111 | ||
| 4112 | inline bool Registers_ve::validVectorRegister(int /* regNum */) const { | |
| 4113 | return false; | |
| 4114 | } | |
| 4115 | ||
| 4116 | inline v128 Registers_ve::getVectorRegister(int /* regNum */) const { | |
| 4117 | _LIBUNWIND_ABORT("VE vector support not implemented"); | |
| 4118 | } | |
| 4119 | ||
| 4120 | inline void Registers_ve::setVectorRegister(int /* regNum */, | |
| 4121 | v128 /* value */) { | |
| 4122 | _LIBUNWIND_ABORT("VE vector support not implemented"); | |
| 4123 | } | |
| 4124 | ||
| 4125 | inline const char *Registers_ve::getRegisterName(int regNum) { | |
| 4126 | switch (regNum) { | |
| 4127 | case UNW_REG_IP: | |
| 4128 | return "ip"; | |
| 4129 | case UNW_REG_SP: | |
| 4130 | return "sp"; | |
| 4131 | case UNW_VE_VIXR: | |
| 4132 | return "vixr"; | |
| 4133 | case UNW_VE_VL: | |
| 4134 | return "vl"; | |
| 4135 | case UNW_VE_S0: | |
| 4136 | return "s0"; | |
| 4137 | case UNW_VE_S1: | |
| 4138 | return "s1"; | |
| 4139 | case UNW_VE_S2: | |
| 4140 | return "s2"; | |
| 4141 | case UNW_VE_S3: | |
| 4142 | return "s3"; | |
| 4143 | case UNW_VE_S4: | |
| 4144 | return "s4"; | |
| 4145 | case UNW_VE_S5: | |
| 4146 | return "s5"; | |
| 4147 | case UNW_VE_S6: | |
| 4148 | return "s6"; | |
| 4149 | case UNW_VE_S7: | |
| 4150 | return "s7"; | |
| 4151 | case UNW_VE_S8: | |
| 4152 | return "s8"; | |
| 4153 | case UNW_VE_S9: | |
| 4154 | return "s9"; | |
| 4155 | case UNW_VE_S10: | |
| 4156 | return "s10"; | |
| 4157 | case UNW_VE_S11: | |
| 4158 | return "s11"; | |
| 4159 | case UNW_VE_S12: | |
| 4160 | return "s12"; | |
| 4161 | case UNW_VE_S13: | |
| 4162 | return "s13"; | |
| 4163 | case UNW_VE_S14: | |
| 4164 | return "s14"; | |
| 4165 | case UNW_VE_S15: | |
| 4166 | return "s15"; | |
| 4167 | case UNW_VE_S16: | |
| 4168 | return "s16"; | |
| 4169 | case UNW_VE_S17: | |
| 4170 | return "s17"; | |
| 4171 | case UNW_VE_S18: | |
| 4172 | return "s18"; | |
| 4173 | case UNW_VE_S19: | |
| 4174 | return "s19"; | |
| 4175 | case UNW_VE_S20: | |
| 4176 | return "s20"; | |
| 4177 | case UNW_VE_S21: | |
| 4178 | return "s21"; | |
| 4179 | case UNW_VE_S22: | |
| 4180 | return "s22"; | |
| 4181 | case UNW_VE_S23: | |
| 4182 | return "s23"; | |
| 4183 | case UNW_VE_S24: | |
| 4184 | return "s24"; | |
| 4185 | case UNW_VE_S25: | |
| 4186 | return "s25"; | |
| 4187 | case UNW_VE_S26: | |
| 4188 | return "s26"; | |
| 4189 | case UNW_VE_S27: | |
| 4190 | return "s27"; | |
| 4191 | case UNW_VE_S28: | |
| 4192 | return "s28"; | |
| 4193 | case UNW_VE_S29: | |
| 4194 | return "s29"; | |
| 4195 | case UNW_VE_S30: | |
| 4196 | return "s30"; | |
| 4197 | case UNW_VE_S31: | |
| 4198 | return "s31"; | |
| 4199 | case UNW_VE_S32: | |
| 4200 | return "s32"; | |
| 4201 | case UNW_VE_S33: | |
| 4202 | return "s33"; | |
| 4203 | case UNW_VE_S34: | |
| 4204 | return "s34"; | |
| 4205 | case UNW_VE_S35: | |
| 4206 | return "s35"; | |
| 4207 | case UNW_VE_S36: | |
| 4208 | return "s36"; | |
| 4209 | case UNW_VE_S37: | |
| 4210 | return "s37"; | |
| 4211 | case UNW_VE_S38: | |
| 4212 | return "s38"; | |
| 4213 | case UNW_VE_S39: | |
| 4214 | return "s39"; | |
| 4215 | case UNW_VE_S40: | |
| 4216 | return "s40"; | |
| 4217 | case UNW_VE_S41: | |
| 4218 | return "s41"; | |
| 4219 | case UNW_VE_S42: | |
| 4220 | return "s42"; | |
| 4221 | case UNW_VE_S43: | |
| 4222 | return "s43"; | |
| 4223 | case UNW_VE_S44: | |
| 4224 | return "s44"; | |
| 4225 | case UNW_VE_S45: | |
| 4226 | return "s45"; | |
| 4227 | case UNW_VE_S46: | |
| 4228 | return "s46"; | |
| 4229 | case UNW_VE_S47: | |
| 4230 | return "s47"; | |
| 4231 | case UNW_VE_S48: | |
| 4232 | return "s48"; | |
| 4233 | case UNW_VE_S49: | |
| 4234 | return "s49"; | |
| 4235 | case UNW_VE_S50: | |
| 4236 | return "s50"; | |
| 4237 | case UNW_VE_S51: | |
| 4238 | return "s51"; | |
| 4239 | case UNW_VE_S52: | |
| 4240 | return "s52"; | |
| 4241 | case UNW_VE_S53: | |
| 4242 | return "s53"; | |
| 4243 | case UNW_VE_S54: | |
| 4244 | return "s54"; | |
| 4245 | case UNW_VE_S55: | |
| 4246 | return "s55"; | |
| 4247 | case UNW_VE_S56: | |
| 4248 | return "s56"; | |
| 4249 | case UNW_VE_S57: | |
| 4250 | return "s57"; | |
| 4251 | case UNW_VE_S58: | |
| 4252 | return "s58"; | |
| 4253 | case UNW_VE_S59: | |
| 4254 | return "s59"; | |
| 4255 | case UNW_VE_S60: | |
| 4256 | return "s60"; | |
| 4257 | case UNW_VE_S61: | |
| 4258 | return "s61"; | |
| 4259 | case UNW_VE_S62: | |
| 4260 | return "s62"; | |
| 4261 | case UNW_VE_S63: | |
| 4262 | return "s63"; | |
| 4263 | case UNW_VE_V0: | |
| 4264 | return "v0"; | |
| 4265 | case UNW_VE_V1: | |
| 4266 | return "v1"; | |
| 4267 | case UNW_VE_V2: | |
| 4268 | return "v2"; | |
| 4269 | case UNW_VE_V3: | |
| 4270 | return "v3"; | |
| 4271 | case UNW_VE_V4: | |
| 4272 | return "v4"; | |
| 4273 | case UNW_VE_V5: | |
| 4274 | return "v5"; | |
| 4275 | case UNW_VE_V6: | |
| 4276 | return "v6"; | |
| 4277 | case UNW_VE_V7: | |
| 4278 | return "v7"; | |
| 4279 | case UNW_VE_V8: | |
| 4280 | return "v8"; | |
| 4281 | case UNW_VE_V9: | |
| 4282 | return "v9"; | |
| 4283 | case UNW_VE_V10: | |
| 4284 | return "v10"; | |
| 4285 | case UNW_VE_V11: | |
| 4286 | return "v11"; | |
| 4287 | case UNW_VE_V12: | |
| 4288 | return "v12"; | |
| 4289 | case UNW_VE_V13: | |
| 4290 | return "v13"; | |
| 4291 | case UNW_VE_V14: | |
| 4292 | return "v14"; | |
| 4293 | case UNW_VE_V15: | |
| 4294 | return "v15"; | |
| 4295 | case UNW_VE_V16: | |
| 4296 | return "v16"; | |
| 4297 | case UNW_VE_V17: | |
| 4298 | return "v17"; | |
| 4299 | case UNW_VE_V18: | |
| 4300 | return "v18"; | |
| 4301 | case UNW_VE_V19: | |
| 4302 | return "v19"; | |
| 4303 | case UNW_VE_V20: | |
| 4304 | return "v20"; | |
| 4305 | case UNW_VE_V21: | |
| 4306 | return "v21"; | |
| 4307 | case UNW_VE_V22: | |
| 4308 | return "v22"; | |
| 4309 | case UNW_VE_V23: | |
| 4310 | return "v23"; | |
| 4311 | case UNW_VE_V24: | |
| 4312 | return "v24"; | |
| 4313 | case UNW_VE_V25: | |
| 4314 | return "v25"; | |
| 4315 | case UNW_VE_V26: | |
| 4316 | return "v26"; | |
| 4317 | case UNW_VE_V27: | |
| 4318 | return "v27"; | |
| 4319 | case UNW_VE_V28: | |
| 4320 | return "v28"; | |
| 4321 | case UNW_VE_V29: | |
| 4322 | return "v29"; | |
| 4323 | case UNW_VE_V30: | |
| 4324 | return "v30"; | |
| 4325 | case UNW_VE_V31: | |
| 4326 | return "v31"; | |
| 4327 | case UNW_VE_V32: | |
| 4328 | return "v32"; | |
| 4329 | case UNW_VE_V33: | |
| 4330 | return "v33"; | |
| 4331 | case UNW_VE_V34: | |
| 4332 | return "v34"; | |
| 4333 | case UNW_VE_V35: | |
| 4334 | return "v35"; | |
| 4335 | case UNW_VE_V36: | |
| 4336 | return "v36"; | |
| 4337 | case UNW_VE_V37: | |
| 4338 | return "v37"; | |
| 4339 | case UNW_VE_V38: | |
| 4340 | return "v38"; | |
| 4341 | case UNW_VE_V39: | |
| 4342 | return "v39"; | |
| 4343 | case UNW_VE_V40: | |
| 4344 | return "v40"; | |
| 4345 | case UNW_VE_V41: | |
| 4346 | return "v41"; | |
| 4347 | case UNW_VE_V42: | |
| 4348 | return "v42"; | |
| 4349 | case UNW_VE_V43: | |
| 4350 | return "v43"; | |
| 4351 | case UNW_VE_V44: | |
| 4352 | return "v44"; | |
| 4353 | case UNW_VE_V45: | |
| 4354 | return "v45"; | |
| 4355 | case UNW_VE_V46: | |
| 4356 | return "v46"; | |
| 4357 | case UNW_VE_V47: | |
| 4358 | return "v47"; | |
| 4359 | case UNW_VE_V48: | |
| 4360 | return "v48"; | |
| 4361 | case UNW_VE_V49: | |
| 4362 | return "v49"; | |
| 4363 | case UNW_VE_V50: | |
| 4364 | return "v50"; | |
| 4365 | case UNW_VE_V51: | |
| 4366 | return "v51"; | |
| 4367 | case UNW_VE_V52: | |
| 4368 | return "v52"; | |
| 4369 | case UNW_VE_V53: | |
| 4370 | return "v53"; | |
| 4371 | case UNW_VE_V54: | |
| 4372 | return "v54"; | |
| 4373 | case UNW_VE_V55: | |
| 4374 | return "v55"; | |
| 4375 | case UNW_VE_V56: | |
| 4376 | return "v56"; | |
| 4377 | case UNW_VE_V57: | |
| 4378 | return "v57"; | |
| 4379 | case UNW_VE_V58: | |
| 4380 | return "v58"; | |
| 4381 | case UNW_VE_V59: | |
| 4382 | return "v59"; | |
| 4383 | case UNW_VE_V60: | |
| 4384 | return "v60"; | |
| 4385 | case UNW_VE_V61: | |
| 4386 | return "v61"; | |
| 4387 | case UNW_VE_V62: | |
| 4388 | return "v62"; | |
| 4389 | case UNW_VE_V63: | |
| 4390 | return "v63"; | |
| 4391 | case UNW_VE_VM0: | |
| 4392 | return "vm0"; | |
| 4393 | case UNW_VE_VM1: | |
| 4394 | return "vm1"; | |
| 4395 | case UNW_VE_VM2: | |
| 4396 | return "vm2"; | |
| 4397 | case UNW_VE_VM3: | |
| 4398 | return "vm3"; | |
| 4399 | case UNW_VE_VM4: | |
| 4400 | return "vm4"; | |
| 4401 | case UNW_VE_VM5: | |
| 4402 | return "vm5"; | |
| 4403 | case UNW_VE_VM6: | |
| 4404 | return "vm6"; | |
| 4405 | case UNW_VE_VM7: | |
| 4406 | return "vm7"; | |
| 4407 | case UNW_VE_VM8: | |
| 4408 | return "vm8"; | |
| 4409 | case UNW_VE_VM9: | |
| 4410 | return "vm9"; | |
| 4411 | case UNW_VE_VM10: | |
| 4412 | return "vm10"; | |
| 4413 | case UNW_VE_VM11: | |
| 4414 | return "vm11"; | |
| 4415 | case UNW_VE_VM12: | |
| 4416 | return "vm12"; | |
| 4417 | case UNW_VE_VM13: | |
| 4418 | return "vm13"; | |
| 4419 | case UNW_VE_VM14: | |
| 4420 | return "vm14"; | |
| 4421 | case UNW_VE_VM15: | |
| 4422 | return "vm15"; | |
| 4423 | } | |
| 4424 | return "unknown register"; | |
| 4425 | } | |
| 4426 | #endif // _LIBUNWIND_TARGET_VE | |
| 4427 | ||
| 3980 | 4428 | } // namespace libunwind |
| 3981 | 4429 | |
| 3982 | 4430 | #endif // __REGISTERS_HPP__ |
lib/libunwind/src/Unwind-seh.cpp+4-16| ... | ... | @@ -46,18 +46,6 @@ using namespace libunwind; |
| 46 | 46 | /// handling. |
| 47 | 47 | #define STATUS_GCC_UNWIND MAKE_GCC_EXCEPTION(1) // 0x21474343 |
| 48 | 48 | |
| 49 | /// Class of foreign exceptions based on unrecognized SEH exceptions. | |
| 50 | static const uint64_t kSEHExceptionClass = 0x434C4E4753454800; // CLNGSEH\0 | |
| 51 | ||
| 52 | /// Exception cleanup routine used by \c _GCC_specific_handler to | |
| 53 | /// free foreign exceptions. | |
| 54 | static void seh_exc_cleanup(_Unwind_Reason_Code urc, _Unwind_Exception *exc) { | |
| 55 | (void)urc; | |
| 56 | if (exc->exception_class != kSEHExceptionClass) | |
| 57 | _LIBUNWIND_ABORT("SEH cleanup called on non-SEH exception"); | |
| 58 | free(exc); | |
| 59 | } | |
| 60 | ||
| 61 | 49 | static int __unw_init_seh(unw_cursor_t *cursor, CONTEXT *ctx); |
| 62 | 50 | static DISPATCHER_CONTEXT *__unw_seh_get_disp_ctx(unw_cursor_t *cursor); |
| 63 | 51 | static void __unw_seh_set_disp_ctx(unw_cursor_t *cursor, |
| ... | ... | @@ -108,10 +96,10 @@ _GCC_specific_handler(PEXCEPTION_RECORD ms_exc, PVOID frame, PCONTEXT ms_ctx, |
| 108 | 96 | } |
| 109 | 97 | } else { |
| 110 | 98 | // Foreign exception. |
| 111 | exc = (_Unwind_Exception *)malloc(sizeof(_Unwind_Exception)); | |
| 112 | exc->exception_class = kSEHExceptionClass; | |
| 113 | exc->exception_cleanup = seh_exc_cleanup; | |
| 114 | memset(exc->private_, 0, sizeof(exc->private_)); | |
| 99 | // We can't interact with them (we don't know the original target frame | |
| 100 | // that we should pass on to RtlUnwindEx in _Unwind_Resume), so just | |
| 101 | // pass without calling our destructors here. | |
| 102 | return ExceptionContinueSearch; | |
| 115 | 103 | } |
| 116 | 104 | if (!ctx) { |
| 117 | 105 | __unw_init_seh(&cursor, disp->ContextRecord); |
lib/libunwind/src/Unwind-sjlj.c+12| ... | ... | @@ -32,11 +32,23 @@ struct _Unwind_FunctionContext { |
| 32 | 32 | // next function in stack of handlers |
| 33 | 33 | struct _Unwind_FunctionContext *prev; |
| 34 | 34 | |
| 35 | #if defined(__ve__) | |
| 36 | // VE requires to store 64 bit pointers in the buffer for SjLj execption. | |
| 37 | // We expand the size of values defined here. This size must be matched | |
| 38 | // to the size returned by TargetMachine::getSjLjDataSize(). | |
| 39 | ||
| 40 | // set by calling function before registering to be the landing pad | |
| 41 | uint64_t resumeLocation; | |
| 42 | ||
| 43 | // set by personality handler to be parameters passed to landing pad function | |
| 44 | uint64_t resumeParameters[4]; | |
| 45 | #else | |
| 35 | 46 | // set by calling function before registering to be the landing pad |
| 36 | 47 | uint32_t resumeLocation; |
| 37 | 48 | |
| 38 | 49 | // set by personality handler to be parameters passed to landing pad function |
| 39 | 50 | uint32_t resumeParameters[4]; |
| 51 | #endif | |
| 40 | 52 | |
| 41 | 53 | // set by calling function before registering |
| 42 | 54 | _Unwind_Personality_Fn personality; // arm offset=24 |
lib/libunwind/src/UnwindCursor.hpp+156-69| ... | ... | @@ -81,6 +81,7 @@ template <typename A> |
| 81 | 81 | class _LIBUNWIND_HIDDEN DwarfFDECache { |
| 82 | 82 | typedef typename A::pint_t pint_t; |
| 83 | 83 | public: |
| 84 | static constexpr pint_t kSearchAll = static_cast<pint_t>(-1); | |
| 84 | 85 | static pint_t findFDE(pint_t mh, pint_t pc); |
| 85 | 86 | static void add(pint_t mh, pint_t ip_start, pint_t ip_end, pint_t fde); |
| 86 | 87 | static void removeAllIn(pint_t mh); |
| ... | ... | @@ -138,7 +139,7 @@ typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) { |
| 138 | 139 | pint_t result = 0; |
| 139 | 140 | _LIBUNWIND_LOG_IF_FALSE(_lock.lock_shared()); |
| 140 | 141 | for (entry *p = _buffer; p < _bufferUsed; ++p) { |
| 141 | if ((mh == p->mh) || (mh == 0)) { | |
| 142 | if ((mh == p->mh) || (mh == kSearchAll)) { | |
| 142 | 143 | if ((p->ip_start <= pc) && (pc < p->ip_end)) { |
| 143 | 144 | result = p->fde; |
| 144 | 145 | break; |
| ... | ... | @@ -530,6 +531,8 @@ UnwindCursor<A, R>::UnwindCursor(unw_context_t *context, A &as) |
| 530 | 531 | : _addressSpace(as), _unwindInfoMissing(false) { |
| 531 | 532 | static_assert((check_fit<UnwindCursor<A, R>, unw_cursor_t>::does_fit), |
| 532 | 533 | "UnwindCursor<> does not fit in unw_cursor_t"); |
| 534 | static_assert((alignof(UnwindCursor<A, R>) <= alignof(unw_cursor_t)), | |
| 535 | "UnwindCursor<> requires more alignment than unw_cursor_t"); | |
| 533 | 536 | memset(&_info, 0, sizeof(_info)); |
| 534 | 537 | memset(&_histTable, 0, sizeof(_histTable)); |
| 535 | 538 | _dispContext.ContextRecord = &_msContext; |
| ... | ... | @@ -922,7 +925,29 @@ private: |
| 922 | 925 | } |
| 923 | 926 | #endif |
| 924 | 927 | |
| 928 | #if defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 929 | bool setInfoForSigReturn() { | |
| 930 | R dummy; | |
| 931 | return setInfoForSigReturn(dummy); | |
| 932 | } | |
| 933 | int stepThroughSigReturn() { | |
| 934 | R dummy; | |
| 935 | return stepThroughSigReturn(dummy); | |
| 936 | } | |
| 937 | bool setInfoForSigReturn(Registers_arm64 &); | |
| 938 | int stepThroughSigReturn(Registers_arm64 &); | |
| 939 | template <typename Registers> bool setInfoForSigReturn(Registers &) { | |
| 940 | return false; | |
| 941 | } | |
| 942 | template <typename Registers> int stepThroughSigReturn(Registers &) { | |
| 943 | return UNW_STEP_END; | |
| 944 | } | |
| 945 | #endif | |
| 946 | ||
| 925 | 947 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) |
| 948 | bool getInfoFromFdeCie(const typename CFI_Parser<A>::FDE_Info &fdeInfo, | |
| 949 | const typename CFI_Parser<A>::CIE_Info &cieInfo, | |
| 950 | pint_t pc, uintptr_t dso_base); | |
| 926 | 951 | bool getInfoFromDwarfSection(pint_t pc, const UnwindInfoSections &sects, |
| 927 | 952 | uint32_t fdeSectionOffsetHint=0); |
| 928 | 953 | int stepWithDwarfFDE() { |
| ... | ... | @@ -1173,6 +1198,9 @@ private: |
| 1173 | 1198 | unw_proc_info_t _info; |
| 1174 | 1199 | bool _unwindInfoMissing; |
| 1175 | 1200 | bool _isSignalFrame; |
| 1201 | #if defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 1202 | bool _isSigReturn = false; | |
| 1203 | #endif | |
| 1176 | 1204 | }; |
| 1177 | 1205 | |
| 1178 | 1206 | |
| ... | ... | @@ -1182,6 +1210,8 @@ UnwindCursor<A, R>::UnwindCursor(unw_context_t *context, A &as) |
| 1182 | 1210 | _isSignalFrame(false) { |
| 1183 | 1211 | static_assert((check_fit<UnwindCursor<A, R>, unw_cursor_t>::does_fit), |
| 1184 | 1212 | "UnwindCursor<> does not fit in unw_cursor_t"); |
| 1213 | static_assert((alignof(UnwindCursor<A, R>) <= alignof(unw_cursor_t)), | |
| 1214 | "UnwindCursor<> requires more alignment than unw_cursor_t"); | |
| 1185 | 1215 | memset(&_info, 0, sizeof(_info)); |
| 1186 | 1216 | } |
| 1187 | 1217 | |
| ... | ... | @@ -1472,6 +1502,32 @@ bool UnwindCursor<A, R>::getInfoFromEHABISection( |
| 1472 | 1502 | #endif |
| 1473 | 1503 | |
| 1474 | 1504 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) |
| 1505 | template <typename A, typename R> | |
| 1506 | bool UnwindCursor<A, R>::getInfoFromFdeCie( | |
| 1507 | const typename CFI_Parser<A>::FDE_Info &fdeInfo, | |
| 1508 | const typename CFI_Parser<A>::CIE_Info &cieInfo, pint_t pc, | |
| 1509 | uintptr_t dso_base) { | |
| 1510 | typename CFI_Parser<A>::PrologInfo prolog; | |
| 1511 | if (CFI_Parser<A>::parseFDEInstructions(_addressSpace, fdeInfo, cieInfo, pc, | |
| 1512 | R::getArch(), &prolog)) { | |
| 1513 | // Save off parsed FDE info | |
| 1514 | _info.start_ip = fdeInfo.pcStart; | |
| 1515 | _info.end_ip = fdeInfo.pcEnd; | |
| 1516 | _info.lsda = fdeInfo.lsda; | |
| 1517 | _info.handler = cieInfo.personality; | |
| 1518 | // Some frameless functions need SP altered when resuming in function, so | |
| 1519 | // propagate spExtraArgSize. | |
| 1520 | _info.gp = prolog.spExtraArgSize; | |
| 1521 | _info.flags = 0; | |
| 1522 | _info.format = dwarfEncoding(); | |
| 1523 | _info.unwind_info = fdeInfo.fdeStart; | |
| 1524 | _info.unwind_info_size = static_cast<uint32_t>(fdeInfo.fdeLength); | |
| 1525 | _info.extra = static_cast<unw_word_t>(dso_base); | |
| 1526 | return true; | |
| 1527 | } | |
| 1528 | return false; | |
| 1529 | } | |
| 1530 | ||
| 1475 | 1531 | template <typename A, typename R> |
| 1476 | 1532 | bool UnwindCursor<A, R>::getInfoFromDwarfSection(pint_t pc, |
| 1477 | 1533 | const UnwindInfoSections &sects, |
| ... | ... | @@ -1483,7 +1539,7 @@ bool UnwindCursor<A, R>::getInfoFromDwarfSection(pint_t pc, |
| 1483 | 1539 | // If compact encoding table gave offset into dwarf section, go directly there |
| 1484 | 1540 | if (fdeSectionOffsetHint != 0) { |
| 1485 | 1541 | foundFDE = CFI_Parser<A>::findFDE(_addressSpace, pc, sects.dwarf_section, |
| 1486 | (uint32_t)sects.dwarf_section_length, | |
| 1542 | sects.dwarf_section_length, | |
| 1487 | 1543 | sects.dwarf_section + fdeSectionOffsetHint, |
| 1488 | 1544 | &fdeInfo, &cieInfo); |
| 1489 | 1545 | } |
| ... | ... | @@ -1500,7 +1556,7 @@ bool UnwindCursor<A, R>::getInfoFromDwarfSection(pint_t pc, |
| 1500 | 1556 | if (cachedFDE != 0) { |
| 1501 | 1557 | foundFDE = |
| 1502 | 1558 | CFI_Parser<A>::findFDE(_addressSpace, pc, sects.dwarf_section, |
| 1503 | (uint32_t)sects.dwarf_section_length, | |
| 1559 | sects.dwarf_section_length, | |
| 1504 | 1560 | cachedFDE, &fdeInfo, &cieInfo); |
| 1505 | 1561 | foundInCache = foundFDE; |
| 1506 | 1562 | } |
| ... | ... | @@ -1508,25 +1564,11 @@ bool UnwindCursor<A, R>::getInfoFromDwarfSection(pint_t pc, |
| 1508 | 1564 | if (!foundFDE) { |
| 1509 | 1565 | // Still not found, do full scan of __eh_frame section. |
| 1510 | 1566 | foundFDE = CFI_Parser<A>::findFDE(_addressSpace, pc, sects.dwarf_section, |
| 1511 | (uint32_t)sects.dwarf_section_length, 0, | |
| 1567 | sects.dwarf_section_length, 0, | |
| 1512 | 1568 | &fdeInfo, &cieInfo); |
| 1513 | 1569 | } |
| 1514 | 1570 | if (foundFDE) { |
| 1515 | typename CFI_Parser<A>::PrologInfo prolog; | |
| 1516 | if (CFI_Parser<A>::parseFDEInstructions(_addressSpace, fdeInfo, cieInfo, pc, | |
| 1517 | R::getArch(), &prolog)) { | |
| 1518 | // Save off parsed FDE info | |
| 1519 | _info.start_ip = fdeInfo.pcStart; | |
| 1520 | _info.end_ip = fdeInfo.pcEnd; | |
| 1521 | _info.lsda = fdeInfo.lsda; | |
| 1522 | _info.handler = cieInfo.personality; | |
| 1523 | _info.gp = prolog.spExtraArgSize; | |
| 1524 | _info.flags = 0; | |
| 1525 | _info.format = dwarfEncoding(); | |
| 1526 | _info.unwind_info = fdeInfo.fdeStart; | |
| 1527 | _info.unwind_info_size = (uint32_t)fdeInfo.fdeLength; | |
| 1528 | _info.extra = (unw_word_t) sects.dso_base; | |
| 1529 | ||
| 1571 | if (getInfoFromFdeCie(fdeInfo, cieInfo, pc, sects.dso_base)) { | |
| 1530 | 1572 | // Add to cache (to make next lookup faster) if we had no hint |
| 1531 | 1573 | // and there was no index. |
| 1532 | 1574 | if (!foundInCache && (fdeSectionOffsetHint == 0)) { |
| ... | ... | @@ -1759,12 +1801,12 @@ bool UnwindCursor<A, R>::getInfoFromCompactEncodingSection(pint_t pc, |
| 1759 | 1801 | } |
| 1760 | 1802 | } |
| 1761 | 1803 | |
| 1762 | // extact personality routine, if encoding says function has one | |
| 1804 | // extract personality routine, if encoding says function has one | |
| 1763 | 1805 | uint32_t personalityIndex = (encoding & UNWIND_PERSONALITY_MASK) >> |
| 1764 | 1806 | (__builtin_ctz(UNWIND_PERSONALITY_MASK)); |
| 1765 | 1807 | if (personalityIndex != 0) { |
| 1766 | 1808 | --personalityIndex; // change 1-based to zero-based index |
| 1767 | if (personalityIndex > sectionHeader.personalityArrayCount()) { | |
| 1809 | if (personalityIndex >= sectionHeader.personalityArrayCount()) { | |
| 1768 | 1810 | _LIBUNWIND_DEBUG_LOG("found encoding 0x%08X with personality index %d, " |
| 1769 | 1811 | "but personality table has only %d entries", |
| 1770 | 1812 | encoding, personalityIndex, |
| ... | ... | @@ -1853,7 +1895,11 @@ bool UnwindCursor<A, R>::getInfoFromSEH(pint_t pc) { |
| 1853 | 1895 | |
| 1854 | 1896 | template <typename A, typename R> |
| 1855 | 1897 | void UnwindCursor<A, R>::setInfoBasedOnIPRegister(bool isReturnAddress) { |
| 1856 | pint_t pc = (pint_t)this->getReg(UNW_REG_IP); | |
| 1898 | #if defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 1899 | _isSigReturn = false; | |
| 1900 | #endif | |
| 1901 | ||
| 1902 | pint_t pc = static_cast<pint_t>(this->getReg(UNW_REG_IP)); | |
| 1857 | 1903 | #if defined(_LIBUNWIND_ARM_EHABI) |
| 1858 | 1904 | // Remove the thumb bit so the IP represents the actual instruction address. |
| 1859 | 1905 | // This matches the behaviour of _Unwind_GetIP on arm. |
| ... | ... | @@ -1926,68 +1972,102 @@ void UnwindCursor<A, R>::setInfoBasedOnIPRegister(bool isReturnAddress) { |
| 1926 | 1972 | #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) |
| 1927 | 1973 | // There is no static unwind info for this pc. Look to see if an FDE was |
| 1928 | 1974 | // dynamically registered for it. |
| 1929 | pint_t cachedFDE = DwarfFDECache<A>::findFDE(0, pc); | |
| 1975 | pint_t cachedFDE = DwarfFDECache<A>::findFDE(DwarfFDECache<A>::kSearchAll, | |
| 1976 | pc); | |
| 1930 | 1977 | if (cachedFDE != 0) { |
| 1931 | CFI_Parser<LocalAddressSpace>::FDE_Info fdeInfo; | |
| 1932 | CFI_Parser<LocalAddressSpace>::CIE_Info cieInfo; | |
| 1933 | const char *msg = CFI_Parser<A>::decodeFDE(_addressSpace, | |
| 1934 | cachedFDE, &fdeInfo, &cieInfo); | |
| 1935 | if (msg == NULL) { | |
| 1936 | typename CFI_Parser<A>::PrologInfo prolog; | |
| 1937 | if (CFI_Parser<A>::parseFDEInstructions(_addressSpace, fdeInfo, cieInfo, | |
| 1938 | pc, R::getArch(), &prolog)) { | |
| 1939 | // save off parsed FDE info | |
| 1940 | _info.start_ip = fdeInfo.pcStart; | |
| 1941 | _info.end_ip = fdeInfo.pcEnd; | |
| 1942 | _info.lsda = fdeInfo.lsda; | |
| 1943 | _info.handler = cieInfo.personality; | |
| 1944 | _info.gp = prolog.spExtraArgSize; | |
| 1945 | // Some frameless functions need SP | |
| 1946 | // altered when resuming in function. | |
| 1947 | _info.flags = 0; | |
| 1948 | _info.format = dwarfEncoding(); | |
| 1949 | _info.unwind_info = fdeInfo.fdeStart; | |
| 1950 | _info.unwind_info_size = (uint32_t)fdeInfo.fdeLength; | |
| 1951 | _info.extra = 0; | |
| 1978 | typename CFI_Parser<A>::FDE_Info fdeInfo; | |
| 1979 | typename CFI_Parser<A>::CIE_Info cieInfo; | |
| 1980 | if (!CFI_Parser<A>::decodeFDE(_addressSpace, cachedFDE, &fdeInfo, &cieInfo)) | |
| 1981 | if (getInfoFromFdeCie(fdeInfo, cieInfo, pc, 0)) | |
| 1952 | 1982 | return; |
| 1953 | } | |
| 1954 | } | |
| 1955 | 1983 | } |
| 1956 | 1984 | |
| 1957 | 1985 | // Lastly, ask AddressSpace object about platform specific ways to locate |
| 1958 | 1986 | // other FDEs. |
| 1959 | 1987 | pint_t fde; |
| 1960 | 1988 | if (_addressSpace.findOtherFDE(pc, fde)) { |
| 1961 | CFI_Parser<LocalAddressSpace>::FDE_Info fdeInfo; | |
| 1962 | CFI_Parser<LocalAddressSpace>::CIE_Info cieInfo; | |
| 1989 | typename CFI_Parser<A>::FDE_Info fdeInfo; | |
| 1990 | typename CFI_Parser<A>::CIE_Info cieInfo; | |
| 1963 | 1991 | if (!CFI_Parser<A>::decodeFDE(_addressSpace, fde, &fdeInfo, &cieInfo)) { |
| 1964 | 1992 | // Double check this FDE is for a function that includes the pc. |
| 1965 | if ((fdeInfo.pcStart <= pc) && (pc < fdeInfo.pcEnd)) { | |
| 1966 | typename CFI_Parser<A>::PrologInfo prolog; | |
| 1967 | if (CFI_Parser<A>::parseFDEInstructions(_addressSpace, fdeInfo, cieInfo, | |
| 1968 | pc, R::getArch(), &prolog)) { | |
| 1969 | // save off parsed FDE info | |
| 1970 | _info.start_ip = fdeInfo.pcStart; | |
| 1971 | _info.end_ip = fdeInfo.pcEnd; | |
| 1972 | _info.lsda = fdeInfo.lsda; | |
| 1973 | _info.handler = cieInfo.personality; | |
| 1974 | _info.gp = prolog.spExtraArgSize; | |
| 1975 | _info.flags = 0; | |
| 1976 | _info.format = dwarfEncoding(); | |
| 1977 | _info.unwind_info = fdeInfo.fdeStart; | |
| 1978 | _info.unwind_info_size = (uint32_t)fdeInfo.fdeLength; | |
| 1979 | _info.extra = 0; | |
| 1993 | if ((fdeInfo.pcStart <= pc) && (pc < fdeInfo.pcEnd)) | |
| 1994 | if (getInfoFromFdeCie(fdeInfo, cieInfo, pc, 0)) | |
| 1980 | 1995 | return; |
| 1981 | } | |
| 1982 | } | |
| 1983 | 1996 | } |
| 1984 | 1997 | } |
| 1985 | 1998 | #endif // #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) |
| 1986 | 1999 | |
| 2000 | #if defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 2001 | if (setInfoForSigReturn()) | |
| 2002 | return; | |
| 2003 | #endif | |
| 2004 | ||
| 1987 | 2005 | // no unwind info, flag that we can't reliably unwind |
| 1988 | 2006 | _unwindInfoMissing = true; |
| 1989 | 2007 | } |
| 1990 | 2008 | |
| 2009 | #if defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 2010 | template <typename A, typename R> | |
| 2011 | bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_arm64 &) { | |
| 2012 | // Look for the sigreturn trampoline. The trampoline's body is two | |
| 2013 | // specific instructions (see below). Typically the trampoline comes from the | |
| 2014 | // vDSO[1] (i.e. the __kernel_rt_sigreturn function). A libc might provide its | |
| 2015 | // own restorer function, though, or user-mode QEMU might write a trampoline | |
| 2016 | // onto the stack. | |
| 2017 | // | |
| 2018 | // This special code path is a fallback that is only used if the trampoline | |
| 2019 | // lacks proper (e.g. DWARF) unwind info. On AArch64, a new DWARF register | |
| 2020 | // constant for the PC needs to be defined before DWARF can handle a signal | |
| 2021 | // trampoline. This code may segfault if the target PC is unreadable, e.g.: | |
| 2022 | // - The PC points at a function compiled without unwind info, and which is | |
| 2023 | // part of an execute-only mapping (e.g. using -Wl,--execute-only). | |
| 2024 | // - The PC is invalid and happens to point to unreadable or unmapped memory. | |
| 2025 | // | |
| 2026 | // [1] https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/vdso/sigreturn.S | |
| 2027 | const pint_t pc = static_cast<pint_t>(this->getReg(UNW_REG_IP)); | |
| 2028 | // Look for instructions: mov x8, #0x8b; svc #0x0 | |
| 2029 | if (_addressSpace.get32(pc) == 0xd2801168 && | |
| 2030 | _addressSpace.get32(pc + 4) == 0xd4000001) { | |
| 2031 | _info = {}; | |
| 2032 | _isSigReturn = true; | |
| 2033 | return true; | |
| 2034 | } | |
| 2035 | return false; | |
| 2036 | } | |
| 2037 | ||
| 2038 | template <typename A, typename R> | |
| 2039 | int UnwindCursor<A, R>::stepThroughSigReturn(Registers_arm64 &) { | |
| 2040 | // In the signal trampoline frame, sp points to an rt_sigframe[1], which is: | |
| 2041 | // - 128-byte siginfo struct | |
| 2042 | // - ucontext struct: | |
| 2043 | // - 8-byte long (uc_flags) | |
| 2044 | // - 8-byte pointer (uc_link) | |
| 2045 | // - 24-byte stack_t | |
| 2046 | // - 128-byte signal set | |
| 2047 | // - 8 bytes of padding because sigcontext has 16-byte alignment | |
| 2048 | // - sigcontext/mcontext_t | |
| 2049 | // [1] https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/signal.c | |
| 2050 | const pint_t kOffsetSpToSigcontext = (128 + 8 + 8 + 24 + 128 + 8); // 304 | |
| 2051 | ||
| 2052 | // Offsets from sigcontext to each register. | |
| 2053 | const pint_t kOffsetGprs = 8; // offset to "__u64 regs[31]" field | |
| 2054 | const pint_t kOffsetSp = 256; // offset to "__u64 sp" field | |
| 2055 | const pint_t kOffsetPc = 264; // offset to "__u64 pc" field | |
| 2056 | ||
| 2057 | pint_t sigctx = _registers.getSP() + kOffsetSpToSigcontext; | |
| 2058 | ||
| 2059 | for (int i = 0; i <= 30; ++i) { | |
| 2060 | uint64_t value = _addressSpace.get64(sigctx + kOffsetGprs + | |
| 2061 | static_cast<pint_t>(i * 8)); | |
| 2062 | _registers.setRegister(UNW_ARM64_X0 + i, value); | |
| 2063 | } | |
| 2064 | _registers.setSP(_addressSpace.get64(sigctx + kOffsetSp)); | |
| 2065 | _registers.setIP(_addressSpace.get64(sigctx + kOffsetPc)); | |
| 2066 | _isSignalFrame = true; | |
| 2067 | return UNW_STEP_SUCCESS; | |
| 2068 | } | |
| 2069 | #endif // defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 2070 | ||
| 1991 | 2071 | template <typename A, typename R> |
| 1992 | 2072 | int UnwindCursor<A, R>::step() { |
| 1993 | 2073 | // Bottom of stack is defined is when unwind info cannot be found. |
| ... | ... | @@ -1996,20 +2076,27 @@ int UnwindCursor<A, R>::step() { |
| 1996 | 2076 | |
| 1997 | 2077 | // Use unwinding info to modify register set as if function returned. |
| 1998 | 2078 | int result; |
| 2079 | #if defined(_LIBUNWIND_TARGET_LINUX) && defined(_LIBUNWIND_TARGET_AARCH64) | |
| 2080 | if (_isSigReturn) { | |
| 2081 | result = this->stepThroughSigReturn(); | |
| 2082 | } else | |
| 2083 | #endif | |
| 2084 | { | |
| 1999 | 2085 | #if defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND) |
| 2000 | result = this->stepWithCompactEncoding(); | |
| 2086 | result = this->stepWithCompactEncoding(); | |
| 2001 | 2087 | #elif defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) |
| 2002 | result = this->stepWithSEHData(); | |
| 2088 | result = this->stepWithSEHData(); | |
| 2003 | 2089 | #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) |
| 2004 | result = this->stepWithDwarfFDE(); | |
| 2090 | result = this->stepWithDwarfFDE(); | |
| 2005 | 2091 | #elif defined(_LIBUNWIND_ARM_EHABI) |
| 2006 | result = this->stepWithEHABI(); | |
| 2092 | result = this->stepWithEHABI(); | |
| 2007 | 2093 | #else |
| 2008 | 2094 | #error Need _LIBUNWIND_SUPPORT_COMPACT_UNWIND or \ |
| 2009 | 2095 | _LIBUNWIND_SUPPORT_SEH_UNWIND or \ |
| 2010 | 2096 | _LIBUNWIND_SUPPORT_DWARF_UNWIND or \ |
| 2011 | 2097 | _LIBUNWIND_ARM_EHABI |
| 2012 | 2098 | #endif |
| 2099 | } | |
| 2013 | 2100 | |
| 2014 | 2101 | // update info based on new PC |
| 2015 | 2102 | if (result == UNW_STEP_SUCCESS) { |
lib/libunwind/src/UnwindLevel1.c+1-3| ... | ... | @@ -39,8 +39,7 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except |
| 39 | 39 | __unw_init_local(cursor, uc); |
| 40 | 40 | |
| 41 | 41 | // Walk each frame looking for a place to stop. |
| 42 | bool handlerNotFound = true; | |
| 43 | while (handlerNotFound) { | |
| 42 | while (true) { | |
| 44 | 43 | // Ask libunwind to get next frame (skip over first which is |
| 45 | 44 | // _Unwind_RaiseException). |
| 46 | 45 | int stepResult = __unw_step(cursor); |
| ... | ... | @@ -102,7 +101,6 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except |
| 102 | 101 | case _URC_HANDLER_FOUND: |
| 103 | 102 | // found a catch clause or locals that need destructing in this frame |
| 104 | 103 | // stop search and remember stack pointer at the frame |
| 105 | handlerNotFound = false; | |
| 106 | 104 | __unw_get_reg(cursor, UNW_REG_SP, &sp); |
| 107 | 105 | exception_object->private_2 = (uintptr_t)sp; |
| 108 | 106 | _LIBUNWIND_TRACE_UNWINDING( |
lib/libunwind/src/UnwindRegistersRestore.S+13-12| ... | ... | @@ -13,14 +13,10 @@ |
| 13 | 13 | #if !defined(__USING_SJLJ_EXCEPTIONS__) |
| 14 | 14 | |
| 15 | 15 | #if defined(__i386__) |
| 16 | DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_x866jumptoEv) | |
| 16 | DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_x86_jumpto) | |
| 17 | 17 | # |
| 18 | # void libunwind::Registers_x86::jumpto() | |
| 18 | # extern "C" void __libunwind_Registers_x86_jumpto(Registers_x86 *); | |
| 19 | 19 | # |
| 20 | #if defined(_WIN32) | |
| 21 | # On windows, the 'this' pointer is passed in ecx instead of on the stack | |
| 22 | movl %ecx, %eax | |
| 23 | #else | |
| 24 | 20 | # On entry: |
| 25 | 21 | # + + |
| 26 | 22 | # +-----------------------+ |
| ... | ... | @@ -30,7 +26,6 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_x866jumptoEv) |
| 30 | 26 | # +-----------------------+ <-- SP |
| 31 | 27 | # + + |
| 32 | 28 | movl 4(%esp), %eax |
| 33 | #endif | |
| 34 | 29 | # set up eax and ret on new stack location |
| 35 | 30 | movl 28(%eax), %edx # edx holds new stack pointer |
| 36 | 31 | subl $8,%edx |
| ... | ... | @@ -60,9 +55,9 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_x866jumptoEv) |
| 60 | 55 | |
| 61 | 56 | #elif defined(__x86_64__) |
| 62 | 57 | |
| 63 | DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind16Registers_x86_646jumptoEv) | |
| 58 | DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_x86_64_jumpto) | |
| 64 | 59 | # |
| 65 | # void libunwind::Registers_x86_64::jumpto() | |
| 60 | # extern "C" void __libunwind_Registers_x86_64_jumpto(Registers_x86_64 *); | |
| 66 | 61 | # |
| 67 | 62 | #if defined(_WIN64) |
| 68 | 63 | # On entry, thread_state pointer is in rcx; move it into rdi |
| ... | ... | @@ -175,7 +170,7 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind15Registers_ppc646jumptoEv) |
| 175 | 170 | PPC64_LR(30) |
| 176 | 171 | PPC64_LR(31) |
| 177 | 172 | |
| 178 | #ifdef PPC64_HAS_VMX | |
| 173 | #if defined(__VSX__) | |
| 179 | 174 | |
| 180 | 175 | // restore VS registers |
| 181 | 176 | // (note that this also restores floating point registers and V registers, |
| ... | ... | @@ -317,6 +312,7 @@ PPC64_CLVS_BOTTOM(n) |
| 317 | 312 | PPC64_LF(30) |
| 318 | 313 | PPC64_LF(31) |
| 319 | 314 | |
| 315 | #if defined(__ALTIVEC__) | |
| 320 | 316 | // restore vector registers if any are in use |
| 321 | 317 | ld %r5, PPC64_OFFS_VRSAVE(%r3) // test VRsave |
| 322 | 318 | cmpwi %r5, 0 |
| ... | ... | @@ -378,6 +374,7 @@ PPC64_CLV_UNALIGNED_BOTTOM(n) |
| 378 | 374 | PPC64_CLV_UNALIGNEDh(31) |
| 379 | 375 | |
| 380 | 376 | #endif |
| 377 | #endif | |
| 381 | 378 | |
| 382 | 379 | Lnovec: |
| 383 | 380 | ld %r0, PPC64_OFFS_CR(%r3) |
| ... | ... | @@ -436,6 +433,7 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) |
| 436 | 433 | lwz %r30,128(%r3) |
| 437 | 434 | lwz %r31,132(%r3) |
| 438 | 435 | |
| 436 | #ifndef __NO_FPRS__ | |
| 439 | 437 | // restore float registers |
| 440 | 438 | lfd %f0, 160(%r3) |
| 441 | 439 | lfd %f1, 168(%r3) |
| ... | ... | @@ -469,7 +467,9 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) |
| 469 | 467 | lfd %f29,392(%r3) |
| 470 | 468 | lfd %f30,400(%r3) |
| 471 | 469 | lfd %f31,408(%r3) |
| 470 | #endif | |
| 472 | 471 | |
| 472 | #if defined(__ALTIVEC__) | |
| 473 | 473 | // restore vector registers if any are in use |
| 474 | 474 | lwz %r5, 156(%r3) // test VRsave |
| 475 | 475 | cmpwi %r5, 0 |
| ... | ... | @@ -542,6 +542,7 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) |
| 542 | 542 | LOAD_VECTOR_UNALIGNEDh(29) |
| 543 | 543 | LOAD_VECTOR_UNALIGNEDh(30) |
| 544 | 544 | LOAD_VECTOR_UNALIGNEDh(31) |
| 545 | #endif | |
| 545 | 546 | |
| 546 | 547 | Lnovec: |
| 547 | 548 | lwz %r0, 136(%r3) // __cr |
| ... | ... | @@ -560,13 +561,13 @@ Lnovec: |
| 560 | 561 | #elif defined(__aarch64__) |
| 561 | 562 | |
| 562 | 563 | // |
| 563 | // void libunwind::Registers_arm64::jumpto() | |
| 564 | // extern "C" void __libunwind_Registers_arm64_jumpto(Registers_arm64 *); | |
| 564 | 565 | // |
| 565 | 566 | // On entry: |
| 566 | 567 | // thread_state pointer is in x0 |
| 567 | 568 | // |
| 568 | 569 | .p2align 2 |
| 569 | DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind15Registers_arm646jumptoEv) | |
| 570 | DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) | |
| 570 | 571 | // skip restore of x0,x1 for now |
| 571 | 572 | ldp x2, x3, [x0, #0x010] |
| 572 | 573 | ldp x4, x5, [x0, #0x020] |
lib/libunwind/src/UnwindRegistersSave.S+7-2| ... | ... | @@ -384,7 +384,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) |
| 384 | 384 | mfvrsave %r0 |
| 385 | 385 | std %r0, PPC64_OFFS_VRSAVE(%r3) |
| 386 | 386 | |
| 387 | #ifdef PPC64_HAS_VMX | |
| 387 | #if defined(__VSX__) | |
| 388 | 388 | // save VS registers |
| 389 | 389 | // (note that this also saves floating point registers and V registers, |
| 390 | 390 | // because part of VS is mapped to these registers) |
| ... | ... | @@ -501,6 +501,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) |
| 501 | 501 | PPC64_STF(30) |
| 502 | 502 | PPC64_STF(31) |
| 503 | 503 | |
| 504 | #if defined(__ALTIVEC__) | |
| 504 | 505 | // save vector registers |
| 505 | 506 | |
| 506 | 507 | // Use 16-bytes below the stack pointer as an |
| ... | ... | @@ -548,6 +549,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) |
| 548 | 549 | PPC64_STV_UNALIGNED(30) |
| 549 | 550 | PPC64_STV_UNALIGNED(31) |
| 550 | 551 | |
| 552 | #endif | |
| 551 | 553 | #endif |
| 552 | 554 | |
| 553 | 555 | li %r3, 0 // return UNW_ESUCCESS |
| ... | ... | @@ -608,6 +610,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) |
| 608 | 610 | mfctr %r0 |
| 609 | 611 | stw %r0, 148(%r3) |
| 610 | 612 | |
| 613 | #if !defined(__NO_FPRS__) | |
| 611 | 614 | // save float registers |
| 612 | 615 | stfd %f0, 160(%r3) |
| 613 | 616 | stfd %f1, 168(%r3) |
| ... | ... | @@ -641,8 +644,9 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) |
| 641 | 644 | stfd %f29,392(%r3) |
| 642 | 645 | stfd %f30,400(%r3) |
| 643 | 646 | stfd %f31,408(%r3) |
| 647 | #endif | |
| 644 | 648 | |
| 645 | ||
| 649 | #if defined(__ALTIVEC__) | |
| 646 | 650 | // save vector registers |
| 647 | 651 | |
| 648 | 652 | subi %r4, %r1, 16 |
| ... | ... | @@ -692,6 +696,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) |
| 692 | 696 | SAVE_VECTOR_UNALIGNED(%v29, 424+0x1D0) |
| 693 | 697 | SAVE_VECTOR_UNALIGNED(%v30, 424+0x1E0) |
| 694 | 698 | SAVE_VECTOR_UNALIGNED(%v31, 424+0x1F0) |
| 699 | #endif | |
| 695 | 700 | |
| 696 | 701 | li %r3, 0 // return UNW_ESUCCESS |
| 697 | 702 | blr |
lib/libunwind/src/Unwind_AppleExtras.cpp-70| ... | ... | @@ -8,35 +8,6 @@ |
| 8 | 8 | //===----------------------------------------------------------------------===// |
| 9 | 9 | |
| 10 | 10 | #include "config.h" |
| 11 | #include "AddressSpace.hpp" | |
| 12 | #include "DwarfParser.hpp" | |
| 13 | ||
| 14 | ||
| 15 | // private keymgr stuff | |
| 16 | #define KEYMGR_GCC3_DW2_OBJ_LIST 302 | |
| 17 | extern "C" { | |
| 18 | extern void _keymgr_set_and_unlock_processwide_ptr(int key, void *ptr); | |
| 19 | extern void *_keymgr_get_and_lock_processwide_ptr(int key); | |
| 20 | } | |
| 21 | ||
| 22 | // undocumented libgcc "struct object" | |
| 23 | struct libgcc_object { | |
| 24 | void *start; | |
| 25 | void *unused1; | |
| 26 | void *unused2; | |
| 27 | void *fde; | |
| 28 | unsigned long encoding; | |
| 29 | void *fde_end; | |
| 30 | libgcc_object *next; | |
| 31 | }; | |
| 32 | ||
| 33 | // undocumented libgcc "struct km_object_info" referenced by | |
| 34 | // KEYMGR_GCC3_DW2_OBJ_LIST | |
| 35 | struct libgcc_object_info { | |
| 36 | libgcc_object *seen_objects; | |
| 37 | libgcc_object *unseen_objects; | |
| 38 | unsigned spare[2]; | |
| 39 | }; | |
| 40 | 11 | |
| 41 | 12 | |
| 42 | 13 | // static linker symbols to prevent wrong two level namespace for _Unwind symbols |
| ... | ... | @@ -140,44 +111,3 @@ NOT_HERE_BEFORE_5_0(_Unwind_SjLj_Resume_or_Rethrow) |
| 140 | 111 | NOT_HERE_BEFORE_5_0(_Unwind_SjLj_Unregister) |
| 141 | 112 | |
| 142 | 113 | #endif // defined(_LIBUNWIND_BUILD_SJLJ_APIS) |
| 143 | ||
| 144 | ||
| 145 | namespace libunwind { | |
| 146 | ||
| 147 | _LIBUNWIND_HIDDEN | |
| 148 | bool checkKeyMgrRegisteredFDEs(uintptr_t pc, void *&fde) { | |
| 149 | #if __MAC_OS_X_VERSION_MIN_REQUIRED | |
| 150 | // lastly check for old style keymgr registration of dynamically generated | |
| 151 | // FDEs acquire exclusive access to libgcc_object_info | |
| 152 | libgcc_object_info *head = (libgcc_object_info *) | |
| 153 | _keymgr_get_and_lock_processwide_ptr(KEYMGR_GCC3_DW2_OBJ_LIST); | |
| 154 | if (head != NULL) { | |
| 155 | // look at each FDE in keymgr | |
| 156 | for (libgcc_object *ob = head->unseen_objects; ob != NULL; ob = ob->next) { | |
| 157 | CFI_Parser<LocalAddressSpace>::FDE_Info fdeInfo; | |
| 158 | CFI_Parser<LocalAddressSpace>::CIE_Info cieInfo; | |
| 159 | const char *msg = CFI_Parser<LocalAddressSpace>::decodeFDE( | |
| 160 | LocalAddressSpace::sThisAddressSpace, | |
| 161 | (uintptr_t)ob->fde, &fdeInfo, &cieInfo); | |
| 162 | if (msg == NULL) { | |
| 163 | // Check if this FDE is for a function that includes the pc | |
| 164 | if ((fdeInfo.pcStart <= pc) && (pc < fdeInfo.pcEnd)) { | |
| 165 | fde = (void*)fdeInfo.pcStart; | |
| 166 | _keymgr_set_and_unlock_processwide_ptr(KEYMGR_GCC3_DW2_OBJ_LIST, | |
| 167 | head); | |
| 168 | return true; | |
| 169 | } | |
| 170 | } | |
| 171 | } | |
| 172 | } | |
| 173 | // release libgcc_object_info | |
| 174 | _keymgr_set_and_unlock_processwide_ptr(KEYMGR_GCC3_DW2_OBJ_LIST, head); | |
| 175 | #else | |
| 176 | (void)pc; | |
| 177 | (void)fde; | |
| 178 | #endif | |
| 179 | return false; | |
| 180 | } | |
| 181 | ||
| 182 | } | |
| 183 |
lib/libunwind/src/assembly.h+20-4| ... | ... | @@ -25,9 +25,6 @@ |
| 25 | 25 | #define PPC64_OFFS_VRSAVE 304 |
| 26 | 26 | #define PPC64_OFFS_FP 312 |
| 27 | 27 | #define PPC64_OFFS_V 824 |
| 28 | #ifdef _ARCH_PWR8 | |
| 29 | #define PPC64_HAS_VMX | |
| 30 | #endif | |
| 31 | 28 | #elif defined(__APPLE__) && defined(__aarch64__) |
| 32 | 29 | #define SEPARATOR %% |
| 33 | 30 | #else |
| ... | ... | @@ -48,6 +45,24 @@ |
| 48 | 45 | #define PPC64_OPD2 |
| 49 | 46 | #endif |
| 50 | 47 | |
| 48 | #if defined(__ARM_FEATURE_BTI_DEFAULT) | |
| 49 | .pushsection ".note.gnu.property", "a" SEPARATOR \ | |
| 50 | .balign 8 SEPARATOR \ | |
| 51 | .long 4 SEPARATOR \ | |
| 52 | .long 0x10 SEPARATOR \ | |
| 53 | .long 0x5 SEPARATOR \ | |
| 54 | .asciz "GNU" SEPARATOR \ | |
| 55 | .long 0xc0000000 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ \ | |
| 56 | .long 4 SEPARATOR \ | |
| 57 | .long 3 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI AND */ \ | |
| 58 | /* GNU_PROPERTY_AARCH64_FEATURE_1_PAC */ \ | |
| 59 | .long 0 SEPARATOR \ | |
| 60 | .popsection SEPARATOR | |
| 61 | #define AARCH64_BTI bti c | |
| 62 | #else | |
| 63 | #define AARCH64_BTI | |
| 64 | #endif | |
| 65 | ||
| 51 | 66 | #define GLUE2(a, b) a ## b |
| 52 | 67 | #define GLUE(a, b) GLUE2(a, b) |
| 53 | 68 | #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name) |
| ... | ... | @@ -144,7 +159,8 @@ |
| 144 | 159 | SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \ |
| 145 | 160 | PPC64_OPD1 \ |
| 146 | 161 | SYMBOL_NAME(name): \ |
| 147 | PPC64_OPD2 | |
| 162 | PPC64_OPD2 \ | |
| 163 | AARCH64_BTI | |
| 148 | 164 | |
| 149 | 165 | #if defined(__arm__) |
| 150 | 166 | #if !defined(__ARM_ARCH) |
lib/libunwind/src/config.h+39-15| ... | ... | @@ -18,23 +18,15 @@ |
| 18 | 18 | #include <stdint.h> |
| 19 | 19 | #include <stdlib.h> |
| 20 | 20 | |
| 21 | // Define static_assert() unless already defined by compiler. | |
| 22 | #ifndef __has_feature | |
| 23 | #define __has_feature(__x) 0 | |
| 24 | #endif | |
| 25 | #if !(__has_feature(cxx_static_assert)) && !defined(static_assert) | |
| 26 | #define static_assert(__b, __m) \ | |
| 27 | extern int compile_time_assert_failed[ ( __b ) ? 1 : -1 ] \ | |
| 28 | __attribute__( ( unused ) ); | |
| 29 | #endif | |
| 21 | #include <__libunwind_config.h> | |
| 30 | 22 | |
| 31 | 23 | // Platform specific configuration defines. |
| 32 | 24 | #ifdef __APPLE__ |
| 33 | 25 | #if defined(FOR_DYLD) |
| 34 | #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND | |
| 26 | #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1 | |
| 35 | 27 | #else |
| 36 | #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND | |
| 37 | #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 | |
| 28 | #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1 | |
| 29 | #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 | |
| 38 | 30 | #endif |
| 39 | 31 | #elif defined(_WIN32) |
| 40 | 32 | #ifdef __SEH__ |
| ... | ... | @@ -42,8 +34,19 @@ |
| 42 | 34 | #else |
| 43 | 35 | #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 |
| 44 | 36 | #endif |
| 37 | #elif defined(_LIBUNWIND_IS_BAREMETAL) | |
| 38 | #if !defined(_LIBUNWIND_ARM_EHABI) | |
| 39 | #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 | |
| 40 | #define _LIBUNWIND_SUPPORT_DWARF_INDEX 1 | |
| 41 | #endif | |
| 42 | #elif defined(__BIONIC__) && defined(_LIBUNWIND_ARM_EHABI) | |
| 43 | // For ARM EHABI, Bionic didn't implement dl_iterate_phdr until API 21. After | |
| 44 | // API 21, dl_iterate_phdr exists, but dl_unwind_find_exidx is much faster. | |
| 45 | #define _LIBUNWIND_USE_DL_UNWIND_FIND_EXIDX 1 | |
| 45 | 46 | #else |
| 46 | #if defined(__ARM_DWARF_EH__) || !defined(__arm__) | |
| 47 | // Assume an ELF system with a dl_iterate_phdr function. | |
| 48 | #define _LIBUNWIND_USE_DL_ITERATE_PHDR 1 | |
| 49 | #if !defined(_LIBUNWIND_ARM_EHABI) | |
| 47 | 50 | #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 |
| 48 | 51 | #define _LIBUNWIND_SUPPORT_DWARF_INDEX 1 |
| 49 | 52 | #endif |
| ... | ... | @@ -91,6 +94,8 @@ |
| 91 | 94 | #error Unsupported target |
| 92 | 95 | #endif |
| 93 | 96 | |
| 97 | // Apple/armv7k defaults to DWARF/Compact unwinding, but its libunwind also | |
| 98 | // needs to include the SJLJ APIs. | |
| 94 | 99 | #if (defined(__APPLE__) && defined(__arm__)) || defined(__USING_SJLJ_EXCEPTIONS__) |
| 95 | 100 | #define _LIBUNWIND_BUILD_SJLJ_APIS |
| 96 | 101 | #endif |
| ... | ... | @@ -111,8 +116,27 @@ |
| 111 | 116 | #endif |
| 112 | 117 | #endif |
| 113 | 118 | |
| 114 | #if defined(__powerpc64__) && defined(_ARCH_PWR8) | |
| 115 | #define PPC64_HAS_VMX | |
| 119 | #ifndef _LIBUNWIND_REMEMBER_HEAP_ALLOC | |
| 120 | #if defined(_LIBUNWIND_REMEMBER_STACK_ALLOC) || defined(__APPLE__) || \ | |
| 121 | defined(__linux__) || defined(__ANDROID__) || defined(__MINGW32__) || \ | |
| 122 | defined(_LIBUNWIND_IS_BAREMETAL) | |
| 123 | #define _LIBUNWIND_REMEMBER_ALLOC(_size) alloca(_size) | |
| 124 | #define _LIBUNWIND_REMEMBER_FREE(_ptr) \ | |
| 125 | do { \ | |
| 126 | } while (0) | |
| 127 | #elif defined(_WIN32) | |
| 128 | #define _LIBUNWIND_REMEMBER_ALLOC(_size) _malloca(_size) | |
| 129 | #define _LIBUNWIND_REMEMBER_FREE(_ptr) _freea(_ptr) | |
| 130 | #define _LIBUNWIND_REMEMBER_CLEANUP_NEEDED | |
| 131 | #else | |
| 132 | #define _LIBUNWIND_REMEMBER_ALLOC(_size) malloc(_size) | |
| 133 | #define _LIBUNWIND_REMEMBER_FREE(_ptr) free(_ptr) | |
| 134 | #define _LIBUNWIND_REMEMBER_CLEANUP_NEEDED | |
| 135 | #endif | |
| 136 | #else /* _LIBUNWIND_REMEMBER_HEAP_ALLOC */ | |
| 137 | #define _LIBUNWIND_REMEMBER_ALLOC(_size) malloc(_size) | |
| 138 | #define _LIBUNWIND_REMEMBER_FREE(_ptr) free(_ptr) | |
| 139 | #define _LIBUNWIND_REMEMBER_CLEANUP_NEEDED | |
| 116 | 140 | #endif |
| 117 | 141 | |
| 118 | 142 | #if defined(NDEBUG) && defined(_LIBUNWIND_IS_BAREMETAL) |
lib/libunwind/src/libunwind.cpp+2| ... | ... | @@ -62,6 +62,8 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor, |
| 62 | 62 | # define REGISTER_KIND Registers_sparc |
| 63 | 63 | #elif defined(__riscv) && __riscv_xlen == 64 |
| 64 | 64 | # define REGISTER_KIND Registers_riscv |
| 65 | #elif defined(__ve__) | |
| 66 | # define REGISTER_KIND Registers_ve | |
| 65 | 67 | #else |
| 66 | 68 | # error Architecture not supported |
| 67 | 69 | #endif |
lib/std/dwarf.zig+5-1| ... | ... | @@ -157,6 +157,7 @@ const LineNumberProgram = struct { |
| 157 | 157 | include_dirs: []const []const u8, |
| 158 | 158 | file_entries: *ArrayList(FileEntry), |
| 159 | 159 | |
| 160 | prev_valid: bool, | |
| 160 | 161 | prev_address: usize, |
| 161 | 162 | prev_file: usize, |
| 162 | 163 | prev_line: i64, |
| ... | ... | @@ -175,6 +176,7 @@ const LineNumberProgram = struct { |
| 175 | 176 | self.basic_block = false; |
| 176 | 177 | self.end_sequence = false; |
| 177 | 178 | // Invalidate all the remaining fields |
| 179 | self.prev_valid = false; | |
| 178 | 180 | self.prev_address = 0; |
| 179 | 181 | self.prev_file = undefined; |
| 180 | 182 | self.prev_line = undefined; |
| ... | ... | @@ -197,6 +199,7 @@ const LineNumberProgram = struct { |
| 197 | 199 | .file_entries = file_entries, |
| 198 | 200 | .default_is_stmt = is_stmt, |
| 199 | 201 | .target_address = target_address, |
| 202 | .prev_valid = false, | |
| 200 | 203 | .prev_address = 0, |
| 201 | 204 | .prev_file = undefined, |
| 202 | 205 | .prev_line = undefined, |
| ... | ... | @@ -208,7 +211,7 @@ const LineNumberProgram = struct { |
| 208 | 211 | } |
| 209 | 212 | |
| 210 | 213 | pub fn checkLineMatch(self: *LineNumberProgram) !?debug.LineInfo { |
| 211 | if (self.target_address >= self.prev_address and self.target_address < self.address) { | |
| 214 | if (self.prev_valid and self.target_address >= self.prev_address and self.target_address < self.address) { | |
| 212 | 215 | const file_entry = if (self.prev_file == 0) { |
| 213 | 216 | return error.MissingDebugInfo; |
| 214 | 217 | } else if (self.prev_file - 1 >= self.file_entries.items.len) { |
| ... | ... | @@ -228,6 +231,7 @@ const LineNumberProgram = struct { |
| 228 | 231 | }; |
| 229 | 232 | } |
| 230 | 233 | |
| 234 | self.prev_valid = true; | |
| 231 | 235 | self.prev_address = self.address; |
| 232 | 236 | self.prev_file = self.file; |
| 233 | 237 | self.prev_line = self.line; |
lib/std/target.zig+30-18| ... | ... | @@ -36,11 +36,11 @@ pub const Target = struct { |
| 36 | 36 | openbsd, |
| 37 | 37 | solaris, |
| 38 | 38 | windows, |
| 39 | zos, | |
| 39 | 40 | haiku, |
| 40 | 41 | minix, |
| 41 | 42 | rtems, |
| 42 | 43 | nacl, |
| 43 | cnk, | |
| 44 | 44 | aix, |
| 45 | 45 | cuda, |
| 46 | 46 | nvcl, |
| ... | ... | @@ -232,11 +232,11 @@ pub const Target = struct { |
| 232 | 232 | .kfreebsd, |
| 233 | 233 | .lv2, |
| 234 | 234 | .solaris, |
| 235 | .zos, | |
| 235 | 236 | .haiku, |
| 236 | 237 | .minix, |
| 237 | 238 | .rtems, |
| 238 | 239 | .nacl, |
| 239 | .cnk, | |
| 240 | 240 | .aix, |
| 241 | 241 | .cuda, |
| 242 | 242 | .nvcl, |
| ... | ... | @@ -391,10 +391,10 @@ pub const Target = struct { |
| 391 | 391 | .kfreebsd, |
| 392 | 392 | .lv2, |
| 393 | 393 | .solaris, |
| 394 | .zos, | |
| 394 | 395 | .minix, |
| 395 | 396 | .rtems, |
| 396 | 397 | .nacl, |
| 397 | .cnk, | |
| 398 | 398 | .aix, |
| 399 | 399 | .cuda, |
| 400 | 400 | .nvcl, |
| ... | ... | @@ -430,8 +430,8 @@ pub const Target = struct { |
| 430 | 430 | pub const powerpc = @import("target/powerpc.zig"); |
| 431 | 431 | pub const riscv = @import("target/riscv.zig"); |
| 432 | 432 | pub const sparc = @import("target/sparc.zig"); |
| 433 | pub const spirv = @import("target/spirv.zig"); | |
| 434 | 433 | pub const systemz = @import("target/systemz.zig"); |
| 434 | pub const ve = @import("target/ve.zig"); | |
| 435 | 435 | pub const wasm = @import("target/wasm.zig"); |
| 436 | 436 | pub const x86 = @import("target/x86.zig"); |
| 437 | 437 | |
| ... | ... | @@ -443,6 +443,7 @@ pub const Target = struct { |
| 443 | 443 | gnueabi, |
| 444 | 444 | gnueabihf, |
| 445 | 445 | gnux32, |
| 446 | gnuilp32, | |
| 446 | 447 | code16, |
| 447 | 448 | eabi, |
| 448 | 449 | eabihf, |
| ... | ... | @@ -468,10 +469,10 @@ pub const Target = struct { |
| 468 | 469 | .dragonfly, |
| 469 | 470 | .lv2, |
| 470 | 471 | .solaris, |
| 472 | .zos, | |
| 471 | 473 | .minix, |
| 472 | 474 | .rtems, |
| 473 | 475 | .nacl, |
| 474 | .cnk, | |
| 475 | 476 | .aix, |
| 476 | 477 | .cuda, |
| 477 | 478 | .nvcl, |
| ... | ... | @@ -592,7 +593,7 @@ pub const Target = struct { |
| 592 | 593 | pub const Set = struct { |
| 593 | 594 | ints: [usize_count]usize, |
| 594 | 595 | |
| 595 | pub const needed_bit_count = 168; | |
| 596 | pub const needed_bit_count = 172; | |
| 596 | 597 | pub const byte_count = (needed_bit_count + 7) / 8; |
| 597 | 598 | pub const usize_count = (byte_count + (@sizeOf(usize) - 1)) / @sizeOf(usize); |
| 598 | 599 | pub const Index = std.math.Log2Int(std.meta.Int(.unsigned, usize_count * @bitSizeOf(usize))); |
| ... | ... | @@ -714,6 +715,7 @@ pub const Target = struct { |
| 714 | 715 | avr, |
| 715 | 716 | bpfel, |
| 716 | 717 | bpfeb, |
| 718 | csky, | |
| 717 | 719 | hexagon, |
| 718 | 720 | mips, |
| 719 | 721 | mipsel, |
| ... | ... | @@ -721,6 +723,7 @@ pub const Target = struct { |
| 721 | 723 | mips64el, |
| 722 | 724 | msp430, |
| 723 | 725 | powerpc, |
| 726 | powerpcle, | |
| 724 | 727 | powerpc64, |
| 725 | 728 | powerpc64le, |
| 726 | 729 | r600, |
| ... | ... | @@ -831,7 +834,7 @@ pub const Target = struct { |
| 831 | 834 | .le32 => ._NONE, |
| 832 | 835 | .mips => ._MIPS, |
| 833 | 836 | .mipsel => ._MIPS_RS3_LE, |
| 834 | .powerpc => ._PPC, | |
| 837 | .powerpc, .powerpcle => ._PPC, | |
| 835 | 838 | .r600 => ._NONE, |
| 836 | 839 | .riscv32 => ._RISCV, |
| 837 | 840 | .sparc => ._SPARC, |
| ... | ... | @@ -870,6 +873,7 @@ pub const Target = struct { |
| 870 | 873 | .amdgcn => ._NONE, |
| 871 | 874 | .bpfel => ._BPF, |
| 872 | 875 | .bpfeb => ._BPF, |
| 876 | .csky => ._NONE, | |
| 873 | 877 | .sparcv9 => ._SPARCV9, |
| 874 | 878 | .s390x => ._S390, |
| 875 | 879 | .ve => ._NONE, |
| ... | ... | @@ -890,7 +894,7 @@ pub const Target = struct { |
| 890 | 894 | .le32 => .Unknown, |
| 891 | 895 | .mips => .Unknown, |
| 892 | 896 | .mipsel => .Unknown, |
| 893 | .powerpc => .POWERPC, | |
| 897 | .powerpc, .powerpcle => .POWERPC, | |
| 894 | 898 | .r600 => .Unknown, |
| 895 | 899 | .riscv32 => .RISCV32, |
| 896 | 900 | .sparc => .Unknown, |
| ... | ... | @@ -929,6 +933,7 @@ pub const Target = struct { |
| 929 | 933 | .amdgcn => .Unknown, |
| 930 | 934 | .bpfel => .Unknown, |
| 931 | 935 | .bpfeb => .Unknown, |
| 936 | .csky => .Unknown, | |
| 932 | 937 | .sparcv9 => .Unknown, |
| 933 | 938 | .s390x => .Unknown, |
| 934 | 939 | .ve => .Unknown, |
| ... | ... | @@ -948,6 +953,7 @@ pub const Target = struct { |
| 948 | 953 | .amdil, |
| 949 | 954 | .amdil64, |
| 950 | 955 | .bpfel, |
| 956 | .csky, | |
| 951 | 957 | .hexagon, |
| 952 | 958 | .hsail, |
| 953 | 959 | .hsail64, |
| ... | ... | @@ -961,6 +967,7 @@ pub const Target = struct { |
| 961 | 967 | .nvptx64, |
| 962 | 968 | .sparcel, |
| 963 | 969 | .tcele, |
| 970 | .powerpcle, | |
| 964 | 971 | .powerpc64le, |
| 965 | 972 | .r600, |
| 966 | 973 | .riscv32, |
| ... | ... | @@ -1011,11 +1018,13 @@ pub const Target = struct { |
| 1011 | 1018 | .arc, |
| 1012 | 1019 | .arm, |
| 1013 | 1020 | .armeb, |
| 1021 | .csky, | |
| 1014 | 1022 | .hexagon, |
| 1015 | 1023 | .le32, |
| 1016 | 1024 | .mips, |
| 1017 | 1025 | .mipsel, |
| 1018 | 1026 | .powerpc, |
| 1027 | .powerpcle, | |
| 1019 | 1028 | .r600, |
| 1020 | 1029 | .riscv32, |
| 1021 | 1030 | .sparc, |
| ... | ... | @@ -1065,17 +1074,14 @@ pub const Target = struct { |
| 1065 | 1074 | } |
| 1066 | 1075 | } |
| 1067 | 1076 | |
| 1068 | /// Returns a name that matches the lib/std/target/* directory name. | |
| 1077 | /// Returns a name that matches the lib/std/target/* source file name. | |
| 1069 | 1078 | pub fn genericName(arch: Arch) []const u8 { |
| 1070 | 1079 | return switch (arch) { |
| 1071 | 1080 | .arm, .armeb, .thumb, .thumbeb => "arm", |
| 1072 | 1081 | .aarch64, .aarch64_be, .aarch64_32 => "aarch64", |
| 1073 | .avr => "avr", | |
| 1074 | 1082 | .bpfel, .bpfeb => "bpf", |
| 1075 | .hexagon => "hexagon", | |
| 1076 | 1083 | .mips, .mipsel, .mips64, .mips64el => "mips", |
| 1077 | .msp430 => "msp430", | |
| 1078 | .powerpc, .powerpc64, .powerpc64le => "powerpc", | |
| 1084 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => "powerpc", | |
| 1079 | 1085 | .amdgcn => "amdgpu", |
| 1080 | 1086 | .riscv32, .riscv64 => "riscv", |
| 1081 | 1087 | .sparc, .sparcv9, .sparcel => "sparc", |
| ... | ... | @@ -1098,13 +1104,14 @@ pub const Target = struct { |
| 1098 | 1104 | .hexagon => &hexagon.all_features, |
| 1099 | 1105 | .mips, .mipsel, .mips64, .mips64el => &mips.all_features, |
| 1100 | 1106 | .msp430 => &msp430.all_features, |
| 1101 | .powerpc, .powerpc64, .powerpc64le => &powerpc.all_features, | |
| 1107 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => &powerpc.all_features, | |
| 1102 | 1108 | .amdgcn => &amdgpu.all_features, |
| 1103 | 1109 | .riscv32, .riscv64 => &riscv.all_features, |
| 1104 | 1110 | .sparc, .sparcv9, .sparcel => &sparc.all_features, |
| 1105 | 1111 | .s390x => &systemz.all_features, |
| 1106 | 1112 | .i386, .x86_64 => &x86.all_features, |
| 1107 | 1113 | .nvptx, .nvptx64 => &nvptx.all_features, |
| 1114 | .ve => &ve.all_features, | |
| 1108 | 1115 | .wasm32, .wasm64 => &wasm.all_features, |
| 1109 | 1116 | |
| 1110 | 1117 | else => &[0]Cpu.Feature{}, |
| ... | ... | @@ -1121,13 +1128,14 @@ pub const Target = struct { |
| 1121 | 1128 | .hexagon => comptime allCpusFromDecls(hexagon.cpu), |
| 1122 | 1129 | .mips, .mipsel, .mips64, .mips64el => comptime allCpusFromDecls(mips.cpu), |
| 1123 | 1130 | .msp430 => comptime allCpusFromDecls(msp430.cpu), |
| 1124 | .powerpc, .powerpc64, .powerpc64le => comptime allCpusFromDecls(powerpc.cpu), | |
| 1131 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => comptime allCpusFromDecls(powerpc.cpu), | |
| 1125 | 1132 | .amdgcn => comptime allCpusFromDecls(amdgpu.cpu), |
| 1126 | 1133 | .riscv32, .riscv64 => comptime allCpusFromDecls(riscv.cpu), |
| 1127 | 1134 | .sparc, .sparcv9, .sparcel => comptime allCpusFromDecls(sparc.cpu), |
| 1128 | 1135 | .s390x => comptime allCpusFromDecls(systemz.cpu), |
| 1129 | 1136 | .i386, .x86_64 => comptime allCpusFromDecls(x86.cpu), |
| 1130 | 1137 | .nvptx, .nvptx64 => comptime allCpusFromDecls(nvptx.cpu), |
| 1138 | .ve => comptime allCpusFromDecls(ve.cpu), | |
| 1131 | 1139 | .wasm32, .wasm64 => comptime allCpusFromDecls(wasm.cpu), |
| 1132 | 1140 | |
| 1133 | 1141 | else => &[0]*const Model{}, |
| ... | ... | @@ -1177,17 +1185,19 @@ pub const Target = struct { |
| 1177 | 1185 | .mips64, .mips64el => &mips.cpu.mips64, |
| 1178 | 1186 | .msp430 => &msp430.cpu.generic, |
| 1179 | 1187 | .powerpc => &powerpc.cpu.ppc32, |
| 1188 | .powerpcle => &powerpc.cpu.ppc32, | |
| 1180 | 1189 | .powerpc64 => &powerpc.cpu.ppc64, |
| 1181 | 1190 | .powerpc64le => &powerpc.cpu.ppc64le, |
| 1182 | 1191 | .amdgcn => &amdgpu.cpu.generic, |
| 1183 | 1192 | .riscv32 => &riscv.cpu.generic_rv32, |
| 1184 | 1193 | .riscv64 => &riscv.cpu.generic_rv64, |
| 1185 | .sparc, .sparcel => &sparc.cpu.v8, | |
| 1194 | .sparc, .sparcel => &sparc.cpu.generic, | |
| 1186 | 1195 | .sparcv9 => &sparc.cpu.v9, |
| 1187 | 1196 | .s390x => &systemz.cpu.generic, |
| 1188 | 1197 | .i386 => &x86.cpu._i386, |
| 1189 | 1198 | .x86_64 => &x86.cpu.x86_64, |
| 1190 | 1199 | .nvptx, .nvptx64 => &nvptx.cpu.sm_20, |
| 1200 | .ve => &ve.cpu.generic, | |
| 1191 | 1201 | .wasm32, .wasm64 => &wasm.cpu.generic, |
| 1192 | 1202 | |
| 1193 | 1203 | else => &S.generic_model, |
| ... | ... | @@ -1201,6 +1211,7 @@ pub const Target = struct { |
| 1201 | 1211 | .riscv64 => &riscv.cpu.baseline_rv64, |
| 1202 | 1212 | .i386 => &x86.cpu.pentium4, |
| 1203 | 1213 | .nvptx, .nvptx64 => &nvptx.cpu.sm_20, |
| 1214 | .sparc, .sparcel => &sparc.cpu.v8, | |
| 1204 | 1215 | |
| 1205 | 1216 | else => generic(arch), |
| 1206 | 1217 | }; |
| ... | ... | @@ -1490,7 +1501,7 @@ pub const Target = struct { |
| 1490 | 1501 | return print(&result, "/lib{s}/{s}", .{ lib_suffix, loader }); |
| 1491 | 1502 | }, |
| 1492 | 1503 | |
| 1493 | .powerpc => return copy(&result, "/lib/ld.so.1"), | |
| 1504 | .powerpc, .powerpcle => return copy(&result, "/lib/ld.so.1"), | |
| 1494 | 1505 | .powerpc64, .powerpc64le => return copy(&result, "/lib64/ld64.so.2"), |
| 1495 | 1506 | .s390x => return copy(&result, "/lib64/ld64.so.1"), |
| 1496 | 1507 | .sparcv9 => return copy(&result, "/lib64/ld-linux.so.2"), |
| ... | ... | @@ -1519,6 +1530,7 @@ pub const Target = struct { |
| 1519 | 1530 | // TODO go over each item in this list and either move it to the above list, or |
| 1520 | 1531 | // implement the standard dynamic linker path code for it. |
| 1521 | 1532 | .arc, |
| 1533 | .csky, | |
| 1522 | 1534 | .hexagon, |
| 1523 | 1535 | .msp430, |
| 1524 | 1536 | .r600, |
| ... | ... | @@ -1573,10 +1585,10 @@ pub const Target = struct { |
| 1573 | 1585 | .kfreebsd, |
| 1574 | 1586 | .lv2, |
| 1575 | 1587 | .solaris, |
| 1588 | .zos, | |
| 1576 | 1589 | .minix, |
| 1577 | 1590 | .rtems, |
| 1578 | 1591 | .nacl, |
| 1579 | .cnk, | |
| 1580 | 1592 | .aix, |
| 1581 | 1593 | .cuda, |
| 1582 | 1594 | .nvcl, |
lib/std/target/aarch64.zig+311-147| ... | ... | @@ -1,14 +1,10 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| 9 | 6 | |
| 10 | 7 | pub const Feature = enum { |
| 11 | a34, | |
| 12 | 8 | a65, |
| 13 | 9 | a76, |
| 14 | 10 | aes, |
| ... | ... | @@ -17,8 +13,6 @@ pub const Feature = enum { |
| 17 | 13 | altnzcv, |
| 18 | 14 | am, |
| 19 | 15 | amvs, |
| 20 | apple_a10, | |
| 21 | apple_a11, | |
| 22 | 16 | apple_a12, |
| 23 | 17 | apple_a13, |
| 24 | 18 | apple_a7, |
| ... | ... | @@ -26,6 +20,7 @@ pub const Feature = enum { |
| 26 | 20 | arith_cbz_fusion, |
| 27 | 21 | balance_fp_ops, |
| 28 | 22 | bf16, |
| 23 | brbe, | |
| 29 | 24 | bti, |
| 30 | 25 | call_saved_x10, |
| 31 | 26 | call_saved_x11, |
| ... | ... | @@ -39,7 +34,11 @@ pub const Feature = enum { |
| 39 | 34 | ccdp, |
| 40 | 35 | ccidx, |
| 41 | 36 | ccpp, |
| 37 | cmp_bcc_fusion, | |
| 42 | 38 | complxnum, |
| 39 | contextidr_el2, | |
| 40 | cortex_a78c, | |
| 41 | cortex_r82, | |
| 43 | 42 | crc, |
| 44 | 43 | crypto, |
| 45 | 44 | custom_cheap_as_move, |
| ... | ... | @@ -49,14 +48,14 @@ pub const Feature = enum { |
| 49 | 48 | ecv, |
| 50 | 49 | ete, |
| 51 | 50 | exynos_cheap_as_move, |
| 52 | exynosm4, | |
| 51 | exynos_m4, | |
| 53 | 52 | f32mm, |
| 54 | 53 | f64mm, |
| 55 | 54 | fgt, |
| 56 | fmi, | |
| 55 | flagm, | |
| 57 | 56 | force_32bit_jump_tables, |
| 58 | fp_armv8, | |
| 59 | 57 | fp16fml, |
| 58 | fp_armv8, | |
| 60 | 59 | fptoint, |
| 61 | 60 | fullfp16, |
| 62 | 61 | fuse_address, |
| ... | ... | @@ -67,28 +66,32 @@ pub const Feature = enum { |
| 67 | 66 | fuse_literals, |
| 68 | 67 | harden_sls_blr, |
| 69 | 68 | harden_sls_retbr, |
| 69 | hcx, | |
| 70 | 70 | i8mm, |
| 71 | 71 | jsconv, |
| 72 | 72 | lor, |
| 73 | ls64, | |
| 73 | 74 | lse, |
| 74 | 75 | lsl_fast, |
| 75 | 76 | mpam, |
| 76 | 77 | mte, |
| 77 | 78 | neon, |
| 78 | neoversee1, | |
| 79 | neoversen1, | |
| 79 | neoverse_e1, | |
| 80 | neoverse_n1, | |
| 81 | neoverse_n2, | |
| 82 | neoverse_v1, | |
| 80 | 83 | no_neg_immediates, |
| 81 | 84 | nv, |
| 82 | pa, | |
| 85 | outline_atomics, | |
| 83 | 86 | pan, |
| 84 | 87 | pan_rwv, |
| 88 | pauth, | |
| 85 | 89 | perfmon, |
| 86 | 90 | pmu, |
| 87 | 91 | predictable_select_expensive, |
| 88 | 92 | predres, |
| 89 | 93 | rand, |
| 90 | 94 | ras, |
| 91 | rasv8_4, | |
| 92 | 95 | rcpc, |
| 93 | 96 | rcpc_immo, |
| 94 | 97 | rdm, |
| ... | ... | @@ -126,6 +129,7 @@ pub const Feature = enum { |
| 126 | 129 | slow_strqro_store, |
| 127 | 130 | sm4, |
| 128 | 131 | spe, |
| 132 | spe_eef, | |
| 129 | 133 | specrestrict, |
| 130 | 134 | ssbs, |
| 131 | 135 | strict_align, |
| ... | ... | @@ -148,14 +152,18 @@ pub const Feature = enum { |
| 148 | 152 | use_experimental_zeroing_pseudos, |
| 149 | 153 | use_postra_scheduler, |
| 150 | 154 | use_reciprocal_square_root, |
| 151 | v8a, | |
| 152 | 155 | v8_1a, |
| 153 | 156 | v8_2a, |
| 154 | 157 | v8_3a, |
| 155 | 158 | v8_4a, |
| 156 | 159 | v8_5a, |
| 157 | 160 | v8_6a, |
| 161 | v8_7a, | |
| 162 | v8a, | |
| 163 | v8r, | |
| 158 | 164 | vh, |
| 165 | wfxt, | |
| 166 | xs, | |
| 159 | 167 | zcm, |
| 160 | 168 | zcz, |
| 161 | 169 | zcz_fp, |
| ... | ... | @@ -170,26 +178,16 @@ pub const all_features = blk: { |
| 170 | 178 | const len = @typeInfo(Feature).Enum.fields.len; |
| 171 | 179 | std.debug.assert(len <= CpuFeature.Set.needed_bit_count); |
| 172 | 180 | var result: [len]CpuFeature = undefined; |
| 173 | result[@enumToInt(Feature.a34)] = .{ | |
| 174 | .llvm_name = "a35", | |
| 175 | .description = "Cortex-A34 ARM processors", | |
| 176 | .dependencies = featureSet(&[_]Feature{ | |
| 177 | .crc, | |
| 178 | .crypto, | |
| 179 | .perfmon, | |
| 180 | .v8a, | |
| 181 | }), | |
| 182 | }; | |
| 183 | 181 | result[@enumToInt(Feature.a65)] = .{ |
| 184 | 182 | .llvm_name = "a65", |
| 185 | 183 | .description = "Cortex-A65 ARM processors", |
| 186 | 184 | .dependencies = featureSet(&[_]Feature{ |
| 187 | 185 | .crypto, |
| 188 | 186 | .dotprod, |
| 189 | .fp_armv8, | |
| 190 | 187 | .fullfp16, |
| 191 | .neon, | |
| 192 | .ras, | |
| 188 | .fuse_address, | |
| 189 | .fuse_aes, | |
| 190 | .fuse_literals, | |
| 193 | 191 | .rcpc, |
| 194 | 192 | .ssbs, |
| 195 | 193 | .v8_2a, |
| ... | ... | @@ -202,6 +200,7 @@ pub const all_features = blk: { |
| 202 | 200 | .crypto, |
| 203 | 201 | .dotprod, |
| 204 | 202 | .fullfp16, |
| 203 | .fuse_aes, | |
| 205 | 204 | .rcpc, |
| 206 | 205 | .ssbs, |
| 207 | 206 | .v8_2a, |
| ... | ... | @@ -241,49 +240,6 @@ pub const all_features = blk: { |
| 241 | 240 | .am, |
| 242 | 241 | }), |
| 243 | 242 | }; |
| 244 | result[@enumToInt(Feature.apple_a10)] = .{ | |
| 245 | .llvm_name = "apple-a10", | |
| 246 | .description = "Apple A10", | |
| 247 | .dependencies = featureSet(&[_]Feature{ | |
| 248 | .alternate_sextload_cvt_f32_pattern, | |
| 249 | .arith_bcc_fusion, | |
| 250 | .arith_cbz_fusion, | |
| 251 | .crc, | |
| 252 | .crypto, | |
| 253 | .disable_latency_sched_heuristic, | |
| 254 | .fp_armv8, | |
| 255 | .fuse_aes, | |
| 256 | .fuse_crypto_eor, | |
| 257 | .lor, | |
| 258 | .neon, | |
| 259 | .pan, | |
| 260 | .perfmon, | |
| 261 | .rdm, | |
| 262 | .vh, | |
| 263 | .zcm, | |
| 264 | .zcz, | |
| 265 | }), | |
| 266 | }; | |
| 267 | result[@enumToInt(Feature.apple_a11)] = .{ | |
| 268 | .llvm_name = "apple-a11", | |
| 269 | .description = "Apple A11", | |
| 270 | .dependencies = featureSet(&[_]Feature{ | |
| 271 | .alternate_sextload_cvt_f32_pattern, | |
| 272 | .arith_bcc_fusion, | |
| 273 | .arith_cbz_fusion, | |
| 274 | .crypto, | |
| 275 | .disable_latency_sched_heuristic, | |
| 276 | .fp_armv8, | |
| 277 | .fullfp16, | |
| 278 | .fuse_aes, | |
| 279 | .fuse_crypto_eor, | |
| 280 | .neon, | |
| 281 | .perfmon, | |
| 282 | .v8_2a, | |
| 283 | .zcm, | |
| 284 | .zcz, | |
| 285 | }), | |
| 286 | }; | |
| 287 | 243 | result[@enumToInt(Feature.apple_a12)] = .{ |
| 288 | 244 | .llvm_name = "apple-a12", |
| 289 | 245 | .description = "Apple A12", |
| ... | ... | @@ -293,11 +249,9 @@ pub const all_features = blk: { |
| 293 | 249 | .arith_cbz_fusion, |
| 294 | 250 | .crypto, |
| 295 | 251 | .disable_latency_sched_heuristic, |
| 296 | .fp_armv8, | |
| 297 | 252 | .fullfp16, |
| 298 | 253 | .fuse_aes, |
| 299 | 254 | .fuse_crypto_eor, |
| 300 | .neon, | |
| 301 | 255 | .perfmon, |
| 302 | 256 | .v8_3a, |
| 303 | 257 | .zcm, |
| ... | ... | @@ -313,12 +267,9 @@ pub const all_features = blk: { |
| 313 | 267 | .arith_cbz_fusion, |
| 314 | 268 | .crypto, |
| 315 | 269 | .disable_latency_sched_heuristic, |
| 316 | .fp_armv8, | |
| 317 | 270 | .fp16fml, |
| 318 | .fullfp16, | |
| 319 | 271 | .fuse_aes, |
| 320 | 272 | .fuse_crypto_eor, |
| 321 | .neon, | |
| 322 | 273 | .perfmon, |
| 323 | 274 | .sha3, |
| 324 | 275 | .v8_4a, |
| ... | ... | @@ -335,10 +286,8 @@ pub const all_features = blk: { |
| 335 | 286 | .arith_cbz_fusion, |
| 336 | 287 | .crypto, |
| 337 | 288 | .disable_latency_sched_heuristic, |
| 338 | .fp_armv8, | |
| 339 | 289 | .fuse_aes, |
| 340 | 290 | .fuse_crypto_eor, |
| 341 | .neon, | |
| 342 | 291 | .perfmon, |
| 343 | 292 | .zcm, |
| 344 | 293 | .zcz, |
| ... | ... | @@ -365,6 +314,11 @@ pub const all_features = blk: { |
| 365 | 314 | .description = "Enable BFloat16 Extension", |
| 366 | 315 | .dependencies = featureSet(&[_]Feature{}), |
| 367 | 316 | }; |
| 317 | result[@enumToInt(Feature.brbe)] = .{ | |
| 318 | .llvm_name = "brbe", | |
| 319 | .description = "Enable Branch Record Buffer Extension", | |
| 320 | .dependencies = featureSet(&[_]Feature{}), | |
| 321 | }; | |
| 368 | 322 | result[@enumToInt(Feature.bti)] = .{ |
| 369 | 323 | .llvm_name = "bti", |
| 370 | 324 | .description = "Enable Branch Target Identification", |
| ... | ... | @@ -430,6 +384,11 @@ pub const all_features = blk: { |
| 430 | 384 | .description = "Enable v8.2 data Cache Clean to Point of Persistence", |
| 431 | 385 | .dependencies = featureSet(&[_]Feature{}), |
| 432 | 386 | }; |
| 387 | result[@enumToInt(Feature.cmp_bcc_fusion)] = .{ | |
| 388 | .llvm_name = "cmp-bcc-fusion", | |
| 389 | .description = "CPU fuses cmp+bcc operations", | |
| 390 | .dependencies = featureSet(&[_]Feature{}), | |
| 391 | }; | |
| 433 | 392 | result[@enumToInt(Feature.complxnum)] = .{ |
| 434 | 393 | .llvm_name = "complxnum", |
| 435 | 394 | .description = "Enable v8.3-A Floating-point complex number support", |
| ... | ... | @@ -437,6 +396,38 @@ pub const all_features = blk: { |
| 437 | 396 | .neon, |
| 438 | 397 | }), |
| 439 | 398 | }; |
| 399 | result[@enumToInt(Feature.contextidr_el2)] = .{ | |
| 400 | .llvm_name = "CONTEXTIDREL2", | |
| 401 | .description = "Enable RW operand Context ID Register (EL2)", | |
| 402 | .dependencies = featureSet(&[_]Feature{}), | |
| 403 | }; | |
| 404 | result[@enumToInt(Feature.cortex_a78c)] = .{ | |
| 405 | .llvm_name = "cortex-a78c", | |
| 406 | .description = "Cortex-A78C ARM processors", | |
| 407 | .dependencies = featureSet(&[_]Feature{ | |
| 408 | .cmp_bcc_fusion, | |
| 409 | .crypto, | |
| 410 | .dotprod, | |
| 411 | .flagm, | |
| 412 | .fp16fml, | |
| 413 | .fuse_aes, | |
| 414 | .pauth, | |
| 415 | .perfmon, | |
| 416 | .rcpc, | |
| 417 | .spe, | |
| 418 | .ssbs, | |
| 419 | .use_postra_scheduler, | |
| 420 | .v8_2a, | |
| 421 | }), | |
| 422 | }; | |
| 423 | result[@enumToInt(Feature.cortex_r82)] = .{ | |
| 424 | .llvm_name = "cortex-r82", | |
| 425 | .description = "Cortex-R82 ARM Processors", | |
| 426 | .dependencies = featureSet(&[_]Feature{ | |
| 427 | .use_postra_scheduler, | |
| 428 | .v8r, | |
| 429 | }), | |
| 430 | }; | |
| 440 | 431 | result[@enumToInt(Feature.crc)] = .{ |
| 441 | 432 | .llvm_name = "crc", |
| 442 | 433 | .description = "Enable ARMv8 CRC-32 checksum instructions", |
| ... | ... | @@ -447,7 +438,6 @@ pub const all_features = blk: { |
| 447 | 438 | .description = "Enable cryptographic instructions", |
| 448 | 439 | .dependencies = featureSet(&[_]Feature{ |
| 449 | 440 | .aes, |
| 450 | .neon, | |
| 451 | 441 | .sha2, |
| 452 | 442 | }), |
| 453 | 443 | }; |
| ... | ... | @@ -490,7 +480,7 @@ pub const all_features = blk: { |
| 490 | 480 | .custom_cheap_as_move, |
| 491 | 481 | }), |
| 492 | 482 | }; |
| 493 | result[@enumToInt(Feature.exynosm4)] = .{ | |
| 483 | result[@enumToInt(Feature.exynos_m4)] = .{ | |
| 494 | 484 | .llvm_name = "exynosm4", |
| 495 | 485 | .description = "Samsung Exynos-M4 processors", |
| 496 | 486 | .dependencies = featureSet(&[_]Feature{ |
| ... | ... | @@ -532,8 +522,8 @@ pub const all_features = blk: { |
| 532 | 522 | .description = "Enable fine grained virtualization traps extension", |
| 533 | 523 | .dependencies = featureSet(&[_]Feature{}), |
| 534 | 524 | }; |
| 535 | result[@enumToInt(Feature.fmi)] = .{ | |
| 536 | .llvm_name = "fmi", | |
| 525 | result[@enumToInt(Feature.flagm)] = .{ | |
| 526 | .llvm_name = "flagm", | |
| 537 | 527 | .description = "Enable v8.4-A Flag Manipulation Instructions", |
| 538 | 528 | .dependencies = featureSet(&[_]Feature{}), |
| 539 | 529 | }; |
| ... | ... | @@ -542,11 +532,6 @@ pub const all_features = blk: { |
| 542 | 532 | .description = "Force jump table entries to be 32-bits wide except at MinSize", |
| 543 | 533 | .dependencies = featureSet(&[_]Feature{}), |
| 544 | 534 | }; |
| 545 | result[@enumToInt(Feature.fp_armv8)] = .{ | |
| 546 | .llvm_name = "fp-armv8", | |
| 547 | .description = "Enable ARMv8 FP", | |
| 548 | .dependencies = featureSet(&[_]Feature{}), | |
| 549 | }; | |
| 550 | 535 | result[@enumToInt(Feature.fp16fml)] = .{ |
| 551 | 536 | .llvm_name = "fp16fml", |
| 552 | 537 | .description = "Enable FP16 FML instructions", |
| ... | ... | @@ -554,6 +539,11 @@ pub const all_features = blk: { |
| 554 | 539 | .fullfp16, |
| 555 | 540 | }), |
| 556 | 541 | }; |
| 542 | result[@enumToInt(Feature.fp_armv8)] = .{ | |
| 543 | .llvm_name = "fp-armv8", | |
| 544 | .description = "Enable ARMv8 FP", | |
| 545 | .dependencies = featureSet(&[_]Feature{}), | |
| 546 | }; | |
| 557 | 547 | result[@enumToInt(Feature.fptoint)] = .{ |
| 558 | 548 | .llvm_name = "fptoint", |
| 559 | 549 | .description = "Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int", |
| ... | ... | @@ -606,6 +596,11 @@ pub const all_features = blk: { |
| 606 | 596 | .description = "Harden against straight line speculation across RET and BR instructions", |
| 607 | 597 | .dependencies = featureSet(&[_]Feature{}), |
| 608 | 598 | }; |
| 599 | result[@enumToInt(Feature.hcx)] = .{ | |
| 600 | .llvm_name = "hcx", | |
| 601 | .description = "Enable Armv8.7-A HCRX_EL2 system register", | |
| 602 | .dependencies = featureSet(&[_]Feature{}), | |
| 603 | }; | |
| 609 | 604 | result[@enumToInt(Feature.i8mm)] = .{ |
| 610 | 605 | .llvm_name = "i8mm", |
| 611 | 606 | .description = "Enable Matrix Multiply Int8 Extension", |
| ... | ... | @@ -623,6 +618,11 @@ pub const all_features = blk: { |
| 623 | 618 | .description = "Enables ARM v8.1 Limited Ordering Regions extension", |
| 624 | 619 | .dependencies = featureSet(&[_]Feature{}), |
| 625 | 620 | }; |
| 621 | result[@enumToInt(Feature.ls64)] = .{ | |
| 622 | .llvm_name = "ls64", | |
| 623 | .description = "Enable Armv8.7-A LD64B/ST64B Accelerator Extension", | |
| 624 | .dependencies = featureSet(&[_]Feature{}), | |
| 625 | }; | |
| 626 | 626 | result[@enumToInt(Feature.lse)] = .{ |
| 627 | 627 | .llvm_name = "lse", |
| 628 | 628 | .description = "Enable ARMv8.1 Large System Extension (LSE) atomic instructions", |
| ... | ... | @@ -650,35 +650,62 @@ pub const all_features = blk: { |
| 650 | 650 | .fp_armv8, |
| 651 | 651 | }), |
| 652 | 652 | }; |
| 653 | result[@enumToInt(Feature.neoversee1)] = .{ | |
| 653 | result[@enumToInt(Feature.neoverse_e1)] = .{ | |
| 654 | 654 | .llvm_name = "neoversee1", |
| 655 | 655 | .description = "Neoverse E1 ARM processors", |
| 656 | 656 | .dependencies = featureSet(&[_]Feature{ |
| 657 | 657 | .crypto, |
| 658 | 658 | .dotprod, |
| 659 | .fp_armv8, | |
| 660 | 659 | .fullfp16, |
| 661 | .neon, | |
| 662 | 660 | .rcpc, |
| 663 | 661 | .ssbs, |
| 664 | 662 | .v8_2a, |
| 665 | 663 | }), |
| 666 | 664 | }; |
| 667 | result[@enumToInt(Feature.neoversen1)] = .{ | |
| 665 | result[@enumToInt(Feature.neoverse_n1)] = .{ | |
| 668 | 666 | .llvm_name = "neoversen1", |
| 669 | 667 | .description = "Neoverse N1 ARM processors", |
| 670 | 668 | .dependencies = featureSet(&[_]Feature{ |
| 671 | 669 | .crypto, |
| 672 | 670 | .dotprod, |
| 673 | .fp_armv8, | |
| 674 | 671 | .fullfp16, |
| 675 | .neon, | |
| 676 | 672 | .rcpc, |
| 677 | 673 | .spe, |
| 678 | 674 | .ssbs, |
| 679 | 675 | .v8_2a, |
| 680 | 676 | }), |
| 681 | 677 | }; |
| 678 | result[@enumToInt(Feature.neoverse_n2)] = .{ | |
| 679 | .llvm_name = "neoversen2", | |
| 680 | .description = "Neoverse N2 ARM processors", | |
| 681 | .dependencies = featureSet(&[_]Feature{ | |
| 682 | .bf16, | |
| 683 | .ete, | |
| 684 | .i8mm, | |
| 685 | .mte, | |
| 686 | .sve2_bitperm, | |
| 687 | .v8_5a, | |
| 688 | }), | |
| 689 | }; | |
| 690 | result[@enumToInt(Feature.neoverse_v1)] = .{ | |
| 691 | .llvm_name = "neoversev1", | |
| 692 | .description = "Neoverse V1 ARM processors", | |
| 693 | .dependencies = featureSet(&[_]Feature{ | |
| 694 | .bf16, | |
| 695 | .ccdp, | |
| 696 | .crypto, | |
| 697 | .fp16fml, | |
| 698 | .fuse_aes, | |
| 699 | .i8mm, | |
| 700 | .perfmon, | |
| 701 | .rand, | |
| 702 | .spe, | |
| 703 | .ssbs, | |
| 704 | .sve, | |
| 705 | .use_postra_scheduler, | |
| 706 | .v8_4a, | |
| 707 | }), | |
| 708 | }; | |
| 682 | 709 | result[@enumToInt(Feature.no_neg_immediates)] = .{ |
| 683 | 710 | .llvm_name = "no-neg-immediates", |
| 684 | 711 | .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.", |
| ... | ... | @@ -686,12 +713,12 @@ pub const all_features = blk: { |
| 686 | 713 | }; |
| 687 | 714 | result[@enumToInt(Feature.nv)] = .{ |
| 688 | 715 | .llvm_name = "nv", |
| 689 | .description = "Enable v8.4-A Nested Virtualization extension", | |
| 716 | .description = "Enable v8.4-A Nested Virtualization Enchancement", | |
| 690 | 717 | .dependencies = featureSet(&[_]Feature{}), |
| 691 | 718 | }; |
| 692 | result[@enumToInt(Feature.pa)] = .{ | |
| 693 | .llvm_name = "pa", | |
| 694 | .description = "Enable v8.3-A Pointer Authentication extension", | |
| 719 | result[@enumToInt(Feature.outline_atomics)] = .{ | |
| 720 | .llvm_name = "outline-atomics", | |
| 721 | .description = "Enable out of line atomics to support LSE instructions", | |
| 695 | 722 | .dependencies = featureSet(&[_]Feature{}), |
| 696 | 723 | }; |
| 697 | 724 | result[@enumToInt(Feature.pan)] = .{ |
| ... | ... | @@ -706,6 +733,11 @@ pub const all_features = blk: { |
| 706 | 733 | .pan, |
| 707 | 734 | }), |
| 708 | 735 | }; |
| 736 | result[@enumToInt(Feature.pauth)] = .{ | |
| 737 | .llvm_name = "pauth", | |
| 738 | .description = "Enable v8.3-A Pointer Authentication extension", | |
| 739 | .dependencies = featureSet(&[_]Feature{}), | |
| 740 | }; | |
| 709 | 741 | result[@enumToInt(Feature.perfmon)] = .{ |
| 710 | 742 | .llvm_name = "perfmon", |
| 711 | 743 | .description = "Enable ARMv8 PMUv3 Performance Monitors extension", |
| ... | ... | @@ -736,13 +768,6 @@ pub const all_features = blk: { |
| 736 | 768 | .description = "Enable ARMv8 Reliability, Availability and Serviceability Extensions", |
| 737 | 769 | .dependencies = featureSet(&[_]Feature{}), |
| 738 | 770 | }; |
| 739 | result[@enumToInt(Feature.rasv8_4)] = .{ | |
| 740 | .llvm_name = "rasv8_4", | |
| 741 | .description = "Enable v8.4-A Reliability, Availability and Serviceability extension", | |
| 742 | .dependencies = featureSet(&[_]Feature{ | |
| 743 | .ras, | |
| 744 | }), | |
| 745 | }; | |
| 746 | 771 | result[@enumToInt(Feature.rcpc)] = .{ |
| 747 | 772 | .llvm_name = "rcpc", |
| 748 | 773 | .description = "Enable support for RCPC extension", |
| ... | ... | @@ -906,7 +931,6 @@ pub const all_features = blk: { |
| 906 | 931 | .llvm_name = "sha3", |
| 907 | 932 | .description = "Enable SHA512 and SHA3 support", |
| 908 | 933 | .dependencies = featureSet(&[_]Feature{ |
| 909 | .neon, | |
| 910 | 934 | .sha2, |
| 911 | 935 | }), |
| 912 | 936 | }; |
| ... | ... | @@ -937,6 +961,11 @@ pub const all_features = blk: { |
| 937 | 961 | .description = "Enable Statistical Profiling extension", |
| 938 | 962 | .dependencies = featureSet(&[_]Feature{}), |
| 939 | 963 | }; |
| 964 | result[@enumToInt(Feature.spe_eef)] = .{ | |
| 965 | .llvm_name = "spe-eef", | |
| 966 | .description = "Enable extra register in the Statistical Profiling Extension", | |
| 967 | .dependencies = featureSet(&[_]Feature{}), | |
| 968 | }; | |
| 940 | 969 | result[@enumToInt(Feature.specrestrict)] = .{ |
| 941 | 970 | .llvm_name = "specrestrict", |
| 942 | 971 | .description = "Enable architectural speculation restriction", |
| ... | ... | @@ -955,7 +984,9 @@ pub const all_features = blk: { |
| 955 | 984 | result[@enumToInt(Feature.sve)] = .{ |
| 956 | 985 | .llvm_name = "sve", |
| 957 | 986 | .description = "Enable Scalable Vector Extension (SVE) instructions", |
| 958 | .dependencies = featureSet(&[_]Feature{}), | |
| 987 | .dependencies = featureSet(&[_]Feature{ | |
| 988 | .fullfp16, | |
| 989 | }), | |
| 959 | 990 | }; |
| 960 | 991 | result[@enumToInt(Feature.sve2)] = .{ |
| 961 | 992 | .llvm_name = "sve2", |
| ... | ... | @@ -1060,14 +1091,6 @@ pub const all_features = blk: { |
| 1060 | 1091 | .description = "Use the reciprocal square root approximation", |
| 1061 | 1092 | .dependencies = featureSet(&[_]Feature{}), |
| 1062 | 1093 | }; |
| 1063 | result[@enumToInt(Feature.v8a)] = .{ | |
| 1064 | .llvm_name = null, | |
| 1065 | .description = "Support ARM v8a instructions", | |
| 1066 | .dependencies = featureSet(&[_]Feature{ | |
| 1067 | .fp_armv8, | |
| 1068 | .neon, | |
| 1069 | }), | |
| 1070 | }; | |
| 1071 | 1094 | result[@enumToInt(Feature.v8_1a)] = .{ |
| 1072 | 1095 | .llvm_name = "v8.1a", |
| 1073 | 1096 | .description = "Support ARM v8.1a instructions", |
| ... | ... | @@ -1077,8 +1100,8 @@ pub const all_features = blk: { |
| 1077 | 1100 | .lse, |
| 1078 | 1101 | .pan, |
| 1079 | 1102 | .rdm, |
| 1080 | .vh, | |
| 1081 | 1103 | .v8a, |
| 1104 | .vh, | |
| 1082 | 1105 | }), |
| 1083 | 1106 | }; |
| 1084 | 1107 | result[@enumToInt(Feature.v8_2a)] = .{ |
| ... | ... | @@ -1099,7 +1122,7 @@ pub const all_features = blk: { |
| 1099 | 1122 | .ccidx, |
| 1100 | 1123 | .complxnum, |
| 1101 | 1124 | .jsconv, |
| 1102 | .pa, | |
| 1125 | .pauth, | |
| 1103 | 1126 | .rcpc, |
| 1104 | 1127 | .v8_2a, |
| 1105 | 1128 | }), |
| ... | ... | @@ -1111,11 +1134,10 @@ pub const all_features = blk: { |
| 1111 | 1134 | .am, |
| 1112 | 1135 | .dit, |
| 1113 | 1136 | .dotprod, |
| 1114 | .fmi, | |
| 1137 | .flagm, | |
| 1115 | 1138 | .mpam, |
| 1116 | 1139 | .nv, |
| 1117 | 1140 | .pmu, |
| 1118 | .rasv8_4, | |
| 1119 | 1141 | .rcpc_immo, |
| 1120 | 1142 | .sel2, |
| 1121 | 1143 | .tlb_rmi, |
| ... | ... | @@ -1150,9 +1172,71 @@ pub const all_features = blk: { |
| 1150 | 1172 | .v8_5a, |
| 1151 | 1173 | }), |
| 1152 | 1174 | }; |
| 1175 | result[@enumToInt(Feature.v8_7a)] = .{ | |
| 1176 | .llvm_name = "v8.7a", | |
| 1177 | .description = "Support ARM v8.7a instructions", | |
| 1178 | .dependencies = featureSet(&[_]Feature{ | |
| 1179 | .hcx, | |
| 1180 | .v8_6a, | |
| 1181 | .wfxt, | |
| 1182 | .xs, | |
| 1183 | }), | |
| 1184 | }; | |
| 1185 | result[@enumToInt(Feature.v8a)] = .{ | |
| 1186 | .llvm_name = null, | |
| 1187 | .description = "Support ARM v8a instructions", | |
| 1188 | .dependencies = featureSet(&[_]Feature{ | |
| 1189 | .neon, | |
| 1190 | }), | |
| 1191 | }; | |
| 1192 | result[@enumToInt(Feature.v8r)] = .{ | |
| 1193 | .llvm_name = "v8r", | |
| 1194 | .description = "Support ARM v8r instructions", | |
| 1195 | .dependencies = featureSet(&[_]Feature{ | |
| 1196 | .ccidx, | |
| 1197 | .ccpp, | |
| 1198 | .complxnum, | |
| 1199 | .contextidr_el2, | |
| 1200 | .crc, | |
| 1201 | .dit, | |
| 1202 | .dotprod, | |
| 1203 | .flagm, | |
| 1204 | .fp16fml, | |
| 1205 | .jsconv, | |
| 1206 | .lse, | |
| 1207 | .pan_rwv, | |
| 1208 | .pauth, | |
| 1209 | .perfmon, | |
| 1210 | .predres, | |
| 1211 | .ras, | |
| 1212 | .rcpc_immo, | |
| 1213 | .rdm, | |
| 1214 | .sb, | |
| 1215 | .sel2, | |
| 1216 | .sha3, | |
| 1217 | .sm4, | |
| 1218 | .specrestrict, | |
| 1219 | .ssbs, | |
| 1220 | .tlb_rmi, | |
| 1221 | .tracev8_4, | |
| 1222 | .uaops, | |
| 1223 | }), | |
| 1224 | }; | |
| 1153 | 1225 | result[@enumToInt(Feature.vh)] = .{ |
| 1154 | 1226 | .llvm_name = "vh", |
| 1155 | 1227 | .description = "Enables ARM v8.1 Virtual Host extension", |
| 1228 | .dependencies = featureSet(&[_]Feature{ | |
| 1229 | .contextidr_el2, | |
| 1230 | }), | |
| 1231 | }; | |
| 1232 | result[@enumToInt(Feature.wfxt)] = .{ | |
| 1233 | .llvm_name = "wfxt", | |
| 1234 | .description = "Enable Armv8.7-A WFET and WFIT instruction", | |
| 1235 | .dependencies = featureSet(&[_]Feature{}), | |
| 1236 | }; | |
| 1237 | result[@enumToInt(Feature.xs)] = .{ | |
| 1238 | .llvm_name = "xs", | |
| 1239 | .description = "Enable Armv8.7-A limited-TLB-maintenance instruction", | |
| 1156 | 1240 | .dependencies = featureSet(&[_]Feature{}), |
| 1157 | 1241 | }; |
| 1158 | 1242 | result[@enumToInt(Feature.zcm)] = .{ |
| ... | ... | @@ -1196,11 +1280,11 @@ pub const cpu = struct { |
| 1196 | 1280 | .name = "a64fx", |
| 1197 | 1281 | .llvm_name = "a64fx", |
| 1198 | 1282 | .features = featureSet(&[_]Feature{ |
| 1283 | .aggressive_fma, | |
| 1284 | .arith_bcc_fusion, | |
| 1199 | 1285 | .complxnum, |
| 1200 | .fp_armv8, | |
| 1201 | .fullfp16, | |
| 1202 | .neon, | |
| 1203 | 1286 | .perfmon, |
| 1287 | .predictable_select_expensive, | |
| 1204 | 1288 | .sha2, |
| 1205 | 1289 | .sve, |
| 1206 | 1290 | .use_postra_scheduler, |
| ... | ... | @@ -1211,14 +1295,39 @@ pub const cpu = struct { |
| 1211 | 1295 | .name = "apple_a10", |
| 1212 | 1296 | .llvm_name = "apple-a10", |
| 1213 | 1297 | .features = featureSet(&[_]Feature{ |
| 1214 | .apple_a10, | |
| 1298 | .alternate_sextload_cvt_f32_pattern, | |
| 1299 | .arith_bcc_fusion, | |
| 1300 | .arith_cbz_fusion, | |
| 1301 | .crc, | |
| 1302 | .crypto, | |
| 1303 | .disable_latency_sched_heuristic, | |
| 1304 | .fuse_aes, | |
| 1305 | .fuse_crypto_eor, | |
| 1306 | .lor, | |
| 1307 | .pan, | |
| 1308 | .perfmon, | |
| 1309 | .rdm, | |
| 1310 | .vh, | |
| 1311 | .zcm, | |
| 1312 | .zcz, | |
| 1215 | 1313 | }), |
| 1216 | 1314 | }; |
| 1217 | 1315 | pub const apple_a11 = CpuModel{ |
| 1218 | 1316 | .name = "apple_a11", |
| 1219 | 1317 | .llvm_name = "apple-a11", |
| 1220 | 1318 | .features = featureSet(&[_]Feature{ |
| 1221 | .apple_a11, | |
| 1319 | .alternate_sextload_cvt_f32_pattern, | |
| 1320 | .arith_bcc_fusion, | |
| 1321 | .arith_cbz_fusion, | |
| 1322 | .crypto, | |
| 1323 | .disable_latency_sched_heuristic, | |
| 1324 | .fullfp16, | |
| 1325 | .fuse_aes, | |
| 1326 | .fuse_crypto_eor, | |
| 1327 | .perfmon, | |
| 1328 | .v8_2a, | |
| 1329 | .zcm, | |
| 1330 | .zcz, | |
| 1222 | 1331 | }), |
| 1223 | 1332 | }; |
| 1224 | 1333 | pub const apple_a12 = CpuModel{ |
| ... | ... | @@ -1235,6 +1344,37 @@ pub const cpu = struct { |
| 1235 | 1344 | .apple_a13, |
| 1236 | 1345 | }), |
| 1237 | 1346 | }; |
| 1347 | pub const apple_a14 = CpuModel{ | |
| 1348 | .name = "apple_a14", | |
| 1349 | .llvm_name = "apple-a14", | |
| 1350 | .features = featureSet(&[_]Feature{ | |
| 1351 | .aggressive_fma, | |
| 1352 | .alternate_sextload_cvt_f32_pattern, | |
| 1353 | .altnzcv, | |
| 1354 | .arith_bcc_fusion, | |
| 1355 | .arith_cbz_fusion, | |
| 1356 | .ccdp, | |
| 1357 | .crypto, | |
| 1358 | .disable_latency_sched_heuristic, | |
| 1359 | .fp16fml, | |
| 1360 | .fptoint, | |
| 1361 | .fuse_address, | |
| 1362 | .fuse_aes, | |
| 1363 | .fuse_arith_logic, | |
| 1364 | .fuse_crypto_eor, | |
| 1365 | .fuse_csel, | |
| 1366 | .fuse_literals, | |
| 1367 | .perfmon, | |
| 1368 | .predres, | |
| 1369 | .sb, | |
| 1370 | .sha3, | |
| 1371 | .specrestrict, | |
| 1372 | .ssbs, | |
| 1373 | .v8_4a, | |
| 1374 | .zcm, | |
| 1375 | .zcz, | |
| 1376 | }), | |
| 1377 | }; | |
| 1238 | 1378 | pub const apple_a7 = CpuModel{ |
| 1239 | 1379 | .name = "apple_a7", |
| 1240 | 1380 | .llvm_name = "apple-a7", |
| ... | ... | @@ -1283,7 +1423,6 @@ pub const cpu = struct { |
| 1283 | 1423 | .features = featureSet(&[_]Feature{ |
| 1284 | 1424 | .crypto, |
| 1285 | 1425 | .fullfp16, |
| 1286 | .neon, | |
| 1287 | 1426 | .v8_2a, |
| 1288 | 1427 | }), |
| 1289 | 1428 | }; |
| ... | ... | @@ -1291,14 +1430,20 @@ pub const cpu = struct { |
| 1291 | 1430 | .name = "cortex_a34", |
| 1292 | 1431 | .llvm_name = "cortex-a34", |
| 1293 | 1432 | .features = featureSet(&[_]Feature{ |
| 1294 | .a34, | |
| 1433 | .crc, | |
| 1434 | .crypto, | |
| 1435 | .perfmon, | |
| 1436 | .v8a, | |
| 1295 | 1437 | }), |
| 1296 | 1438 | }; |
| 1297 | 1439 | pub const cortex_a35 = CpuModel{ |
| 1298 | 1440 | .name = "cortex_a35", |
| 1299 | 1441 | .llvm_name = "cortex-a35", |
| 1300 | 1442 | .features = featureSet(&[_]Feature{ |
| 1301 | .a34, | |
| 1443 | .crc, | |
| 1444 | .crypto, | |
| 1445 | .perfmon, | |
| 1446 | .v8a, | |
| 1302 | 1447 | }), |
| 1303 | 1448 | }; |
| 1304 | 1449 | pub const cortex_a53 = CpuModel{ |
| ... | ... | @@ -1366,6 +1511,7 @@ pub const cpu = struct { |
| 1366 | 1511 | .crc, |
| 1367 | 1512 | .crypto, |
| 1368 | 1513 | .fuse_aes, |
| 1514 | .fuse_literals, | |
| 1369 | 1515 | .perfmon, |
| 1370 | 1516 | .v8a, |
| 1371 | 1517 | }), |
| ... | ... | @@ -1412,11 +1558,11 @@ pub const cpu = struct { |
| 1412 | 1558 | .name = "cortex_a77", |
| 1413 | 1559 | .llvm_name = "cortex-a77", |
| 1414 | 1560 | .features = featureSet(&[_]Feature{ |
| 1561 | .cmp_bcc_fusion, | |
| 1415 | 1562 | .crypto, |
| 1416 | 1563 | .dotprod, |
| 1417 | .fp_armv8, | |
| 1418 | 1564 | .fullfp16, |
| 1419 | .neon, | |
| 1565 | .fuse_aes, | |
| 1420 | 1566 | .rcpc, |
| 1421 | 1567 | .v8_2a, |
| 1422 | 1568 | }), |
| ... | ... | @@ -1425,12 +1571,11 @@ pub const cpu = struct { |
| 1425 | 1571 | .name = "cortex_a78", |
| 1426 | 1572 | .llvm_name = "cortex-a78", |
| 1427 | 1573 | .features = featureSet(&[_]Feature{ |
| 1574 | .cmp_bcc_fusion, | |
| 1428 | 1575 | .crypto, |
| 1429 | 1576 | .dotprod, |
| 1430 | .fp_armv8, | |
| 1431 | 1577 | .fullfp16, |
| 1432 | 1578 | .fuse_aes, |
| 1433 | .neon, | |
| 1434 | 1579 | .perfmon, |
| 1435 | 1580 | .rcpc, |
| 1436 | 1581 | .spe, |
| ... | ... | @@ -1439,16 +1584,29 @@ pub const cpu = struct { |
| 1439 | 1584 | .v8_2a, |
| 1440 | 1585 | }), |
| 1441 | 1586 | }; |
| 1587 | pub const cortex_a78c = CpuModel{ | |
| 1588 | .name = "cortex_a78c", | |
| 1589 | .llvm_name = "cortex-a78c", | |
| 1590 | .features = featureSet(&[_]Feature{ | |
| 1591 | .cortex_a78c, | |
| 1592 | }), | |
| 1593 | }; | |
| 1594 | pub const cortex_r82 = CpuModel{ | |
| 1595 | .name = "cortex_r82", | |
| 1596 | .llvm_name = "cortex-r82", | |
| 1597 | .features = featureSet(&[_]Feature{ | |
| 1598 | .cortex_r82, | |
| 1599 | }), | |
| 1600 | }; | |
| 1442 | 1601 | pub const cortex_x1 = CpuModel{ |
| 1443 | 1602 | .name = "cortex_x1", |
| 1444 | 1603 | .llvm_name = "cortex-x1", |
| 1445 | 1604 | .features = featureSet(&[_]Feature{ |
| 1605 | .cmp_bcc_fusion, | |
| 1446 | 1606 | .crypto, |
| 1447 | 1607 | .dotprod, |
| 1448 | .fp_armv8, | |
| 1449 | 1608 | .fullfp16, |
| 1450 | 1609 | .fuse_aes, |
| 1451 | .neon, | |
| 1452 | 1610 | .perfmon, |
| 1453 | 1611 | .rcpc, |
| 1454 | 1612 | .spe, |
| ... | ... | @@ -1522,14 +1680,14 @@ pub const cpu = struct { |
| 1522 | 1680 | .name = "exynos_m4", |
| 1523 | 1681 | .llvm_name = "exynos-m4", |
| 1524 | 1682 | .features = featureSet(&[_]Feature{ |
| 1525 | .exynosm4, | |
| 1683 | .exynos_m4, | |
| 1526 | 1684 | }), |
| 1527 | 1685 | }; |
| 1528 | 1686 | pub const exynos_m5 = CpuModel{ |
| 1529 | 1687 | .name = "exynos_m5", |
| 1530 | 1688 | .llvm_name = "exynos-m5", |
| 1531 | 1689 | .features = featureSet(&[_]Feature{ |
| 1532 | .exynosm4, | |
| 1690 | .exynos_m4, | |
| 1533 | 1691 | }), |
| 1534 | 1692 | }; |
| 1535 | 1693 | pub const falkor = CpuModel{ |
| ... | ... | @@ -1555,9 +1713,9 @@ pub const cpu = struct { |
| 1555 | 1713 | .features = featureSet(&[_]Feature{ |
| 1556 | 1714 | .ete, |
| 1557 | 1715 | .fuse_aes, |
| 1716 | .neon, | |
| 1558 | 1717 | .perfmon, |
| 1559 | 1718 | .use_postra_scheduler, |
| 1560 | .v8a, | |
| 1561 | 1719 | }), |
| 1562 | 1720 | }; |
| 1563 | 1721 | pub const kryo = CpuModel{ |
| ... | ... | @@ -1571,22 +1729,36 @@ pub const cpu = struct { |
| 1571 | 1729 | .perfmon, |
| 1572 | 1730 | .predictable_select_expensive, |
| 1573 | 1731 | .use_postra_scheduler, |
| 1574 | .zcz, | |
| 1575 | 1732 | .v8a, |
| 1733 | .zcz, | |
| 1576 | 1734 | }), |
| 1577 | 1735 | }; |
| 1578 | 1736 | pub const neoverse_e1 = CpuModel{ |
| 1579 | 1737 | .name = "neoverse_e1", |
| 1580 | 1738 | .llvm_name = "neoverse-e1", |
| 1581 | 1739 | .features = featureSet(&[_]Feature{ |
| 1582 | .neoversee1, | |
| 1740 | .neoverse_e1, | |
| 1583 | 1741 | }), |
| 1584 | 1742 | }; |
| 1585 | 1743 | pub const neoverse_n1 = CpuModel{ |
| 1586 | 1744 | .name = "neoverse_n1", |
| 1587 | 1745 | .llvm_name = "neoverse-n1", |
| 1588 | 1746 | .features = featureSet(&[_]Feature{ |
| 1589 | .neoversen1, | |
| 1747 | .neoverse_n1, | |
| 1748 | }), | |
| 1749 | }; | |
| 1750 | pub const neoverse_n2 = CpuModel{ | |
| 1751 | .name = "neoverse_n2", | |
| 1752 | .llvm_name = "neoverse-n2", | |
| 1753 | .features = featureSet(&[_]Feature{ | |
| 1754 | .neoverse_n2, | |
| 1755 | }), | |
| 1756 | }; | |
| 1757 | pub const neoverse_v1 = CpuModel{ | |
| 1758 | .name = "neoverse_v1", | |
| 1759 | .llvm_name = "neoverse-v1", | |
| 1760 | .features = featureSet(&[_]Feature{ | |
| 1761 | .neoverse_v1, | |
| 1590 | 1762 | }), |
| 1591 | 1763 | }; |
| 1592 | 1764 | pub const saphira = CpuModel{ |
| ... | ... | @@ -1622,9 +1794,7 @@ pub const cpu = struct { |
| 1622 | 1794 | .features = featureSet(&[_]Feature{ |
| 1623 | 1795 | .aggressive_fma, |
| 1624 | 1796 | .arith_bcc_fusion, |
| 1625 | .crc, | |
| 1626 | 1797 | .crypto, |
| 1627 | .lse, | |
| 1628 | 1798 | .predictable_select_expensive, |
| 1629 | 1799 | .use_postra_scheduler, |
| 1630 | 1800 | .v8_1a, |
| ... | ... | @@ -1637,12 +1807,7 @@ pub const cpu = struct { |
| 1637 | 1807 | .aggressive_fma, |
| 1638 | 1808 | .arith_bcc_fusion, |
| 1639 | 1809 | .balance_fp_ops, |
| 1640 | .crc, | |
| 1641 | 1810 | .crypto, |
| 1642 | .fp_armv8, | |
| 1643 | .lse, | |
| 1644 | .neon, | |
| 1645 | .pa, | |
| 1646 | 1811 | .perfmon, |
| 1647 | 1812 | .predictable_select_expensive, |
| 1648 | 1813 | .strict_align, |
| ... | ... | @@ -1695,7 +1860,6 @@ pub const cpu = struct { |
| 1695 | 1860 | .custom_cheap_as_move, |
| 1696 | 1861 | .dotprod, |
| 1697 | 1862 | .fp16fml, |
| 1698 | .fullfp16, | |
| 1699 | 1863 | .fuse_aes, |
| 1700 | 1864 | .perfmon, |
| 1701 | 1865 | .spe, |
lib/std/target/amdgpu.zig+174-138| ... | ... | @@ -1,22 +1,17 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| 9 | 6 | |
| 10 | 7 | pub const Feature = enum { |
| 11 | 8 | @"16_bit_insts", |
| 12 | DumpCode, | |
| 13 | 9 | a16, |
| 14 | 10 | add_no_carry_insts, |
| 15 | 11 | aperture_regs, |
| 16 | 12 | atomic_fadd_insts, |
| 17 | 13 | auto_waitcnt_before_barrier, |
| 18 | 14 | ci_insts, |
| 19 | code_object_v3, | |
| 20 | 15 | cumode, |
| 21 | 16 | dl_insts, |
| 22 | 17 | dot1_insts, |
| ... | ... | @@ -28,7 +23,6 @@ pub const Feature = enum { |
| 28 | 23 | dpp, |
| 29 | 24 | dpp8, |
| 30 | 25 | ds_src2_insts, |
| 31 | dumpcode, | |
| 32 | 26 | enable_ds128, |
| 33 | 27 | enable_prt_strict_null, |
| 34 | 28 | fast_denormal_f32, |
| ... | ... | @@ -47,13 +41,15 @@ pub const Feature = enum { |
| 47 | 41 | get_wave_id_inst, |
| 48 | 42 | gfx10, |
| 49 | 43 | gfx10_3_insts, |
| 50 | gfx10_insts, | |
| 51 | 44 | gfx10_b_encoding, |
| 45 | gfx10_insts, | |
| 52 | 46 | gfx7_gfx8_gfx9_insts, |
| 53 | 47 | gfx8_insts, |
| 54 | 48 | gfx9, |
| 55 | 49 | gfx9_insts, |
| 56 | 50 | half_rate_64_ops, |
| 51 | image_gather4_d16_bug, | |
| 52 | image_store_d16_bug, | |
| 57 | 53 | inst_fwd_prefetch_bug, |
| 58 | 54 | int_clamp_insts, |
| 59 | 55 | inv_2pi_inline_imm, |
| ... | ... | @@ -76,8 +72,6 @@ pub const Feature = enum { |
| 76 | 72 | movrel, |
| 77 | 73 | no_data_dep_hazard, |
| 78 | 74 | no_sdst_cmpx, |
| 79 | no_sram_ecc_support, | |
| 80 | no_xnack_support, | |
| 81 | 75 | nsa_encoding, |
| 82 | 76 | nsa_to_vmem_bug, |
| 83 | 77 | offset_3f_bug, |
| ... | ... | @@ -101,10 +95,13 @@ pub const Feature = enum { |
| 101 | 95 | si_scheduler, |
| 102 | 96 | smem_to_vector_write_hazard, |
| 103 | 97 | southern_islands, |
| 104 | sram_ecc, | |
| 98 | sramecc, | |
| 99 | sramecc_support, | |
| 105 | 100 | trap_handler, |
| 106 | 101 | trig_reduced_range, |
| 102 | unaligned_access_mode, | |
| 107 | 103 | unaligned_buffer_access, |
| 104 | unaligned_ds_access, | |
| 108 | 105 | unaligned_scratch_access, |
| 109 | 106 | unpacked_d16_vmem, |
| 110 | 107 | unsafe_ds_offset_folding, |
| ... | ... | @@ -120,6 +117,7 @@ pub const Feature = enum { |
| 120 | 117 | wavefrontsize32, |
| 121 | 118 | wavefrontsize64, |
| 122 | 119 | xnack, |
| 120 | xnack_support, | |
| 123 | 121 | }; |
| 124 | 122 | |
| 125 | 123 | pub usingnamespace CpuFeature.feature_set_fns(Feature); |
| ... | ... | @@ -133,11 +131,6 @@ pub const all_features = blk: { |
| 133 | 131 | .description = "Has i16/f16 instructions", |
| 134 | 132 | .dependencies = featureSet(&[_]Feature{}), |
| 135 | 133 | }; |
| 136 | result[@enumToInt(Feature.DumpCode)] = .{ | |
| 137 | .llvm_name = "DumpCode", | |
| 138 | .description = "Dump MachineInstrs in the CodeEmitter", | |
| 139 | .dependencies = featureSet(&[_]Feature{}), | |
| 140 | }; | |
| 141 | 134 | result[@enumToInt(Feature.a16)] = .{ |
| 142 | 135 | .llvm_name = "a16", |
| 143 | 136 | .description = "Support gfx10-style A16 for 16-bit coordinates/gradients/lod/clamp/mip image operands", |
| ... | ... | @@ -170,11 +163,6 @@ pub const all_features = blk: { |
| 170 | 163 | .description = "Additional instructions for CI+", |
| 171 | 164 | .dependencies = featureSet(&[_]Feature{}), |
| 172 | 165 | }; |
| 173 | result[@enumToInt(Feature.code_object_v3)] = .{ | |
| 174 | .llvm_name = "code-object-v3", | |
| 175 | .description = "Generate code object version 3", | |
| 176 | .dependencies = featureSet(&[_]Feature{}), | |
| 177 | }; | |
| 178 | 166 | result[@enumToInt(Feature.cumode)] = .{ |
| 179 | 167 | .llvm_name = "cumode", |
| 180 | 168 | .description = "Enable CU wavefront execution mode", |
| ... | ... | @@ -230,14 +218,9 @@ pub const all_features = blk: { |
| 230 | 218 | .description = "Has ds_*_src2 instructions", |
| 231 | 219 | .dependencies = featureSet(&[_]Feature{}), |
| 232 | 220 | }; |
| 233 | result[@enumToInt(Feature.dumpcode)] = .{ | |
| 234 | .llvm_name = "dumpcode", | |
| 235 | .description = "Dump MachineInstrs in the CodeEmitter", | |
| 236 | .dependencies = featureSet(&[_]Feature{}), | |
| 237 | }; | |
| 238 | 221 | result[@enumToInt(Feature.enable_ds128)] = .{ |
| 239 | 222 | .llvm_name = "enable-ds128", |
| 240 | .description = "Use ds_read|write_b128", | |
| 223 | .description = "Use ds_{read|write}_b128", | |
| 241 | 224 | .dependencies = featureSet(&[_]Feature{}), |
| 242 | 225 | }; |
| 243 | 226 | result[@enumToInt(Feature.enable_prt_strict_null)] = .{ |
| ... | ... | @@ -345,7 +328,6 @@ pub const all_features = blk: { |
| 345 | 328 | .movrel, |
| 346 | 329 | .no_data_dep_hazard, |
| 347 | 330 | .no_sdst_cmpx, |
| 348 | .no_sram_ecc_support, | |
| 349 | 331 | .pk_fmac_f16_inst, |
| 350 | 332 | .register_banking, |
| 351 | 333 | .s_memrealtime, |
| ... | ... | @@ -353,6 +335,8 @@ pub const all_features = blk: { |
| 353 | 335 | .sdwa_omod, |
| 354 | 336 | .sdwa_scalar, |
| 355 | 337 | .sdwa_sdst, |
| 338 | .unaligned_buffer_access, | |
| 339 | .unaligned_ds_access, | |
| 356 | 340 | .vop3_literal, |
| 357 | 341 | .vop3p, |
| 358 | 342 | .vscnt, |
| ... | ... | @@ -363,16 +347,16 @@ pub const all_features = blk: { |
| 363 | 347 | .description = "Additional instructions for GFX10.3", |
| 364 | 348 | .dependencies = featureSet(&[_]Feature{}), |
| 365 | 349 | }; |
| 366 | result[@enumToInt(Feature.gfx10_insts)] = .{ | |
| 367 | .llvm_name = "gfx10-insts", | |
| 368 | .description = "Additional instructions for GFX10+", | |
| 369 | .dependencies = featureSet(&[_]Feature{}), | |
| 370 | }; | |
| 371 | 350 | result[@enumToInt(Feature.gfx10_b_encoding)] = .{ |
| 372 | 351 | .llvm_name = "gfx10_b-encoding", |
| 373 | 352 | .description = "Encoding format GFX10_B", |
| 374 | 353 | .dependencies = featureSet(&[_]Feature{}), |
| 375 | 354 | }; |
| 355 | result[@enumToInt(Feature.gfx10_insts)] = .{ | |
| 356 | .llvm_name = "gfx10-insts", | |
| 357 | .description = "Additional instructions for GFX10+", | |
| 358 | .dependencies = featureSet(&[_]Feature{}), | |
| 359 | }; | |
| 376 | 360 | result[@enumToInt(Feature.gfx7_gfx8_gfx9_insts)] = .{ |
| 377 | 361 | .llvm_name = "gfx7-gfx8-gfx9-insts", |
| 378 | 362 | .description = "Instructions shared in GFX7, GFX8, GFX9", |
| ... | ... | @@ -418,9 +402,12 @@ pub const all_features = blk: { |
| 418 | 402 | .sdwa_omod, |
| 419 | 403 | .sdwa_scalar, |
| 420 | 404 | .sdwa_sdst, |
| 405 | .unaligned_buffer_access, | |
| 406 | .unaligned_ds_access, | |
| 421 | 407 | .vgpr_index_mode, |
| 422 | 408 | .vop3p, |
| 423 | 409 | .wavefrontsize64, |
| 410 | .xnack_support, | |
| 424 | 411 | }), |
| 425 | 412 | }; |
| 426 | 413 | result[@enumToInt(Feature.gfx9_insts)] = .{ |
| ... | ... | @@ -433,6 +420,16 @@ pub const all_features = blk: { |
| 433 | 420 | .description = "Most fp64 instructions are half rate instead of quarter", |
| 434 | 421 | .dependencies = featureSet(&[_]Feature{}), |
| 435 | 422 | }; |
| 423 | result[@enumToInt(Feature.image_gather4_d16_bug)] = .{ | |
| 424 | .llvm_name = "image-gather4-d16-bug", | |
| 425 | .description = "Image Gather4 D16 hardware bug", | |
| 426 | .dependencies = featureSet(&[_]Feature{}), | |
| 427 | }; | |
| 428 | result[@enumToInt(Feature.image_store_d16_bug)] = .{ | |
| 429 | .llvm_name = "image-store-d16-bug", | |
| 430 | .description = "Image Store D16 hardware bug", | |
| 431 | .dependencies = featureSet(&[_]Feature{}), | |
| 432 | }; | |
| 436 | 433 | result[@enumToInt(Feature.inst_fwd_prefetch_bug)] = .{ |
| 437 | 434 | .llvm_name = "inst-fwd-prefetch-bug", |
| 438 | 435 | .description = "S_INST_PREFETCH instruction causes shader to hang", |
| ... | ... | @@ -455,7 +452,7 @@ pub const all_features = blk: { |
| 455 | 452 | }; |
| 456 | 453 | result[@enumToInt(Feature.lds_misaligned_bug)] = .{ |
| 457 | 454 | .llvm_name = "lds-misaligned-bug", |
| 458 | .description = "Some GFX10 bug with misaligned multi-dword LDS access in WGP mode", | |
| 455 | .description = "Some GFX10 bug with multi-dword LDS and flat access that is not naturally aligned in WGP mode", | |
| 459 | 456 | .dependencies = featureSet(&[_]Feature{}), |
| 460 | 457 | }; |
| 461 | 458 | result[@enumToInt(Feature.ldsbankcount16)] = .{ |
| ... | ... | @@ -543,16 +540,6 @@ pub const all_features = blk: { |
| 543 | 540 | .description = "V_CMPX does not write VCC/SGPR in addition to EXEC", |
| 544 | 541 | .dependencies = featureSet(&[_]Feature{}), |
| 545 | 542 | }; |
| 546 | result[@enumToInt(Feature.no_sram_ecc_support)] = .{ | |
| 547 | .llvm_name = "no-sram-ecc-support", | |
| 548 | .description = "Hardware does not support SRAM ECC", | |
| 549 | .dependencies = featureSet(&[_]Feature{}), | |
| 550 | }; | |
| 551 | result[@enumToInt(Feature.no_xnack_support)] = .{ | |
| 552 | .llvm_name = "no-xnack-support", | |
| 553 | .description = "Hardware does not support XNACK", | |
| 554 | .dependencies = featureSet(&[_]Feature{}), | |
| 555 | }; | |
| 556 | 543 | result[@enumToInt(Feature.nsa_encoding)] = .{ |
| 557 | 544 | .llvm_name = "nsa-encoding", |
| 558 | 545 | .description = "Support NSA encoding for image instructions", |
| ... | ... | @@ -656,9 +643,9 @@ pub const all_features = blk: { |
| 656 | 643 | .mad_mac_f32_insts, |
| 657 | 644 | .mimg_r128, |
| 658 | 645 | .movrel, |
| 659 | .no_sram_ecc_support, | |
| 660 | 646 | .s_memtime_inst, |
| 661 | 647 | .trig_reduced_range, |
| 648 | .unaligned_buffer_access, | |
| 662 | 649 | .wavefrontsize64, |
| 663 | 650 | }), |
| 664 | 651 | }; |
| ... | ... | @@ -688,16 +675,19 @@ pub const all_features = blk: { |
| 688 | 675 | .mad_mac_f32_insts, |
| 689 | 676 | .mimg_r128, |
| 690 | 677 | .movrel, |
| 691 | .no_sram_ecc_support, | |
| 692 | .no_xnack_support, | |
| 693 | 678 | .s_memtime_inst, |
| 694 | 679 | .trig_reduced_range, |
| 695 | 680 | .wavefrontsize64, |
| 696 | 681 | }), |
| 697 | 682 | }; |
| 698 | result[@enumToInt(Feature.sram_ecc)] = .{ | |
| 699 | .llvm_name = "sram-ecc", | |
| 700 | .description = "Enable SRAM ECC", | |
| 683 | result[@enumToInt(Feature.sramecc)] = .{ | |
| 684 | .llvm_name = "sramecc", | |
| 685 | .description = "Enable SRAMECC", | |
| 686 | .dependencies = featureSet(&[_]Feature{}), | |
| 687 | }; | |
| 688 | result[@enumToInt(Feature.sramecc_support)] = .{ | |
| 689 | .llvm_name = "sramecc-support", | |
| 690 | .description = "Hardware supports SRAMECC", | |
| 701 | 691 | .dependencies = featureSet(&[_]Feature{}), |
| 702 | 692 | }; |
| 703 | 693 | result[@enumToInt(Feature.trap_handler)] = .{ |
| ... | ... | @@ -710,9 +700,19 @@ pub const all_features = blk: { |
| 710 | 700 | .description = "Requires use of fract on arguments to trig instructions", |
| 711 | 701 | .dependencies = featureSet(&[_]Feature{}), |
| 712 | 702 | }; |
| 703 | result[@enumToInt(Feature.unaligned_access_mode)] = .{ | |
| 704 | .llvm_name = "unaligned-access-mode", | |
| 705 | .description = "Enable unaligned global, local and region loads and stores if the hardware supports it", | |
| 706 | .dependencies = featureSet(&[_]Feature{}), | |
| 707 | }; | |
| 713 | 708 | result[@enumToInt(Feature.unaligned_buffer_access)] = .{ |
| 714 | 709 | .llvm_name = "unaligned-buffer-access", |
| 715 | .description = "Support unaligned global loads and stores", | |
| 710 | .description = "Hardware supports unaligned global loads and stores", | |
| 711 | .dependencies = featureSet(&[_]Feature{}), | |
| 712 | }; | |
| 713 | result[@enumToInt(Feature.unaligned_ds_access)] = .{ | |
| 714 | .llvm_name = "unaligned-ds-access", | |
| 715 | .description = "Hardware supports unaligned local and region loads and stores", | |
| 716 | 716 | .dependencies = featureSet(&[_]Feature{}), |
| 717 | 717 | }; |
| 718 | 718 | result[@enumToInt(Feature.unaligned_scratch_access)] = .{ |
| ... | ... | @@ -770,7 +770,6 @@ pub const all_features = blk: { |
| 770 | 770 | .mad_mac_f32_insts, |
| 771 | 771 | .mimg_r128, |
| 772 | 772 | .movrel, |
| 773 | .no_sram_ecc_support, | |
| 774 | 773 | .s_memrealtime, |
| 775 | 774 | .s_memtime_inst, |
| 776 | 775 | .scalar_stores, |
| ... | ... | @@ -778,6 +777,7 @@ pub const all_features = blk: { |
| 778 | 777 | .sdwa_mav, |
| 779 | 778 | .sdwa_out_mods_vopc, |
| 780 | 779 | .trig_reduced_range, |
| 780 | .unaligned_buffer_access, | |
| 781 | 781 | .vgpr_index_mode, |
| 782 | 782 | .wavefrontsize64, |
| 783 | 783 | }), |
| ... | ... | @@ -817,6 +817,11 @@ pub const all_features = blk: { |
| 817 | 817 | .description = "Enable XNACK support", |
| 818 | 818 | .dependencies = featureSet(&[_]Feature{}), |
| 819 | 819 | }; |
| 820 | result[@enumToInt(Feature.xnack_support)] = .{ | |
| 821 | .llvm_name = "xnack-support", | |
| 822 | .description = "Hardware supports XNACK", | |
| 823 | .dependencies = featureSet(&[_]Feature{}), | |
| 824 | }; | |
| 820 | 825 | const ti = @typeInfo(Feature); |
| 821 | 826 | for (result) |*elem, i| { |
| 822 | 827 | elem.index = i; |
| ... | ... | @@ -830,9 +835,7 @@ pub const cpu = struct { |
| 830 | 835 | .name = "bonaire", |
| 831 | 836 | .llvm_name = "bonaire", |
| 832 | 837 | .features = featureSet(&[_]Feature{ |
| 833 | .code_object_v3, | |
| 834 | 838 | .ldsbankcount32, |
| 835 | .no_xnack_support, | |
| 836 | 839 | .sea_islands, |
| 837 | 840 | }), |
| 838 | 841 | }; |
| ... | ... | @@ -840,22 +843,19 @@ pub const cpu = struct { |
| 840 | 843 | .name = "carrizo", |
| 841 | 844 | .llvm_name = "carrizo", |
| 842 | 845 | .features = featureSet(&[_]Feature{ |
| 843 | .code_object_v3, | |
| 844 | 846 | .fast_fmaf, |
| 845 | 847 | .half_rate_64_ops, |
| 846 | 848 | .ldsbankcount32, |
| 847 | 849 | .unpacked_d16_vmem, |
| 848 | 850 | .volcanic_islands, |
| 849 | .xnack, | |
| 851 | .xnack_support, | |
| 850 | 852 | }), |
| 851 | 853 | }; |
| 852 | 854 | pub const fiji = CpuModel{ |
| 853 | 855 | .name = "fiji", |
| 854 | 856 | .llvm_name = "fiji", |
| 855 | 857 | .features = featureSet(&[_]Feature{ |
| 856 | .code_object_v3, | |
| 857 | 858 | .ldsbankcount32, |
| 858 | .no_xnack_support, | |
| 859 | 859 | .unpacked_d16_vmem, |
| 860 | 860 | .volcanic_islands, |
| 861 | 861 | }), |
| ... | ... | @@ -879,7 +879,6 @@ pub const cpu = struct { |
| 879 | 879 | .name = "gfx1010", |
| 880 | 880 | .llvm_name = "gfx1010", |
| 881 | 881 | .features = featureSet(&[_]Feature{ |
| 882 | .code_object_v3, | |
| 883 | 882 | .dl_insts, |
| 884 | 883 | .ds_src2_insts, |
| 885 | 884 | .flat_segment_offset_bug, |
| ... | ... | @@ -890,7 +889,6 @@ pub const cpu = struct { |
| 890 | 889 | .lds_misaligned_bug, |
| 891 | 890 | .ldsbankcount32, |
| 892 | 891 | .mad_mac_f32_insts, |
| 893 | .no_xnack_support, | |
| 894 | 892 | .nsa_encoding, |
| 895 | 893 | .nsa_to_vmem_bug, |
| 896 | 894 | .offset_3f_bug, |
| ... | ... | @@ -903,13 +901,13 @@ pub const cpu = struct { |
| 903 | 901 | .vcmpx_permlane_hazard, |
| 904 | 902 | .vmem_to_scalar_write_hazard, |
| 905 | 903 | .wavefrontsize32, |
| 904 | .xnack_support, | |
| 906 | 905 | }), |
| 907 | 906 | }; |
| 908 | 907 | pub const gfx1011 = CpuModel{ |
| 909 | 908 | .name = "gfx1011", |
| 910 | 909 | .llvm_name = "gfx1011", |
| 911 | 910 | .features = featureSet(&[_]Feature{ |
| 912 | .code_object_v3, | |
| 913 | 911 | .dl_insts, |
| 914 | 912 | .dot1_insts, |
| 915 | 913 | .dot2_insts, |
| ... | ... | @@ -921,9 +919,9 @@ pub const cpu = struct { |
| 921 | 919 | .gfx10, |
| 922 | 920 | .inst_fwd_prefetch_bug, |
| 923 | 921 | .lds_branch_vmem_war_hazard, |
| 922 | .lds_misaligned_bug, | |
| 924 | 923 | .ldsbankcount32, |
| 925 | 924 | .mad_mac_f32_insts, |
| 926 | .no_xnack_support, | |
| 927 | 925 | .nsa_encoding, |
| 928 | 926 | .nsa_to_vmem_bug, |
| 929 | 927 | .offset_3f_bug, |
| ... | ... | @@ -936,13 +934,13 @@ pub const cpu = struct { |
| 936 | 934 | .vcmpx_permlane_hazard, |
| 937 | 935 | .vmem_to_scalar_write_hazard, |
| 938 | 936 | .wavefrontsize32, |
| 937 | .xnack_support, | |
| 939 | 938 | }), |
| 940 | 939 | }; |
| 941 | 940 | pub const gfx1012 = CpuModel{ |
| 942 | 941 | .name = "gfx1012", |
| 943 | 942 | .llvm_name = "gfx1012", |
| 944 | 943 | .features = featureSet(&[_]Feature{ |
| 945 | .code_object_v3, | |
| 946 | 944 | .dl_insts, |
| 947 | 945 | .dot1_insts, |
| 948 | 946 | .dot2_insts, |
| ... | ... | @@ -957,7 +955,6 @@ pub const cpu = struct { |
| 957 | 955 | .lds_misaligned_bug, |
| 958 | 956 | .ldsbankcount32, |
| 959 | 957 | .mad_mac_f32_insts, |
| 960 | .no_xnack_support, | |
| 961 | 958 | .nsa_encoding, |
| 962 | 959 | .nsa_to_vmem_bug, |
| 963 | 960 | .offset_3f_bug, |
| ... | ... | @@ -970,13 +967,13 @@ pub const cpu = struct { |
| 970 | 967 | .vcmpx_permlane_hazard, |
| 971 | 968 | .vmem_to_scalar_write_hazard, |
| 972 | 969 | .wavefrontsize32, |
| 970 | .xnack_support, | |
| 973 | 971 | }), |
| 974 | 972 | }; |
| 975 | 973 | pub const gfx1030 = CpuModel{ |
| 976 | 974 | .name = "gfx1030", |
| 977 | 975 | .llvm_name = "gfx1030", |
| 978 | 976 | .features = featureSet(&[_]Feature{ |
| 979 | .code_object_v3, | |
| 980 | 977 | .dl_insts, |
| 981 | 978 | .dot1_insts, |
| 982 | 979 | .dot2_insts, |
| ... | ... | @@ -986,7 +983,57 @@ pub const cpu = struct { |
| 986 | 983 | .gfx10_3_insts, |
| 987 | 984 | .gfx10_b_encoding, |
| 988 | 985 | .ldsbankcount32, |
| 989 | .no_xnack_support, | |
| 986 | .nsa_encoding, | |
| 987 | .wavefrontsize32, | |
| 988 | }), | |
| 989 | }; | |
| 990 | pub const gfx1031 = CpuModel{ | |
| 991 | .name = "gfx1031", | |
| 992 | .llvm_name = "gfx1031", | |
| 993 | .features = featureSet(&[_]Feature{ | |
| 994 | .dl_insts, | |
| 995 | .dot1_insts, | |
| 996 | .dot2_insts, | |
| 997 | .dot5_insts, | |
| 998 | .dot6_insts, | |
| 999 | .gfx10, | |
| 1000 | .gfx10_3_insts, | |
| 1001 | .gfx10_b_encoding, | |
| 1002 | .ldsbankcount32, | |
| 1003 | .nsa_encoding, | |
| 1004 | .wavefrontsize32, | |
| 1005 | }), | |
| 1006 | }; | |
| 1007 | pub const gfx1032 = CpuModel{ | |
| 1008 | .name = "gfx1032", | |
| 1009 | .llvm_name = "gfx1032", | |
| 1010 | .features = featureSet(&[_]Feature{ | |
| 1011 | .dl_insts, | |
| 1012 | .dot1_insts, | |
| 1013 | .dot2_insts, | |
| 1014 | .dot5_insts, | |
| 1015 | .dot6_insts, | |
| 1016 | .gfx10, | |
| 1017 | .gfx10_3_insts, | |
| 1018 | .gfx10_b_encoding, | |
| 1019 | .ldsbankcount32, | |
| 1020 | .nsa_encoding, | |
| 1021 | .wavefrontsize32, | |
| 1022 | }), | |
| 1023 | }; | |
| 1024 | pub const gfx1033 = CpuModel{ | |
| 1025 | .name = "gfx1033", | |
| 1026 | .llvm_name = "gfx1033", | |
| 1027 | .features = featureSet(&[_]Feature{ | |
| 1028 | .dl_insts, | |
| 1029 | .dot1_insts, | |
| 1030 | .dot2_insts, | |
| 1031 | .dot5_insts, | |
| 1032 | .dot6_insts, | |
| 1033 | .gfx10, | |
| 1034 | .gfx10_3_insts, | |
| 1035 | .gfx10_b_encoding, | |
| 1036 | .ldsbankcount32, | |
| 990 | 1037 | .nsa_encoding, |
| 991 | 1038 | .wavefrontsize32, |
| 992 | 1039 | }), |
| ... | ... | @@ -995,11 +1042,8 @@ pub const cpu = struct { |
| 995 | 1042 | .name = "gfx600", |
| 996 | 1043 | .llvm_name = "gfx600", |
| 997 | 1044 | .features = featureSet(&[_]Feature{ |
| 998 | .code_object_v3, | |
| 999 | 1045 | .fast_fmaf, |
| 1000 | 1046 | .half_rate_64_ops, |
| 1001 | .ldsbankcount32, | |
| 1002 | .no_xnack_support, | |
| 1003 | 1047 | .southern_islands, |
| 1004 | 1048 | }), |
| 1005 | 1049 | }; |
| ... | ... | @@ -1007,9 +1051,13 @@ pub const cpu = struct { |
| 1007 | 1051 | .name = "gfx601", |
| 1008 | 1052 | .llvm_name = "gfx601", |
| 1009 | 1053 | .features = featureSet(&[_]Feature{ |
| 1010 | .code_object_v3, | |
| 1011 | .ldsbankcount32, | |
| 1012 | .no_xnack_support, | |
| 1054 | .southern_islands, | |
| 1055 | }), | |
| 1056 | }; | |
| 1057 | pub const gfx602 = CpuModel{ | |
| 1058 | .name = "gfx602", | |
| 1059 | .llvm_name = "gfx602", | |
| 1060 | .features = featureSet(&[_]Feature{ | |
| 1013 | 1061 | .southern_islands, |
| 1014 | 1062 | }), |
| 1015 | 1063 | }; |
| ... | ... | @@ -1017,9 +1065,7 @@ pub const cpu = struct { |
| 1017 | 1065 | .name = "gfx700", |
| 1018 | 1066 | .llvm_name = "gfx700", |
| 1019 | 1067 | .features = featureSet(&[_]Feature{ |
| 1020 | .code_object_v3, | |
| 1021 | 1068 | .ldsbankcount32, |
| 1022 | .no_xnack_support, | |
| 1023 | 1069 | .sea_islands, |
| 1024 | 1070 | }), |
| 1025 | 1071 | }; |
| ... | ... | @@ -1027,11 +1073,9 @@ pub const cpu = struct { |
| 1027 | 1073 | .name = "gfx701", |
| 1028 | 1074 | .llvm_name = "gfx701", |
| 1029 | 1075 | .features = featureSet(&[_]Feature{ |
| 1030 | .code_object_v3, | |
| 1031 | 1076 | .fast_fmaf, |
| 1032 | 1077 | .half_rate_64_ops, |
| 1033 | 1078 | .ldsbankcount32, |
| 1034 | .no_xnack_support, | |
| 1035 | 1079 | .sea_islands, |
| 1036 | 1080 | }), |
| 1037 | 1081 | }; |
| ... | ... | @@ -1039,10 +1083,8 @@ pub const cpu = struct { |
| 1039 | 1083 | .name = "gfx702", |
| 1040 | 1084 | .llvm_name = "gfx702", |
| 1041 | 1085 | .features = featureSet(&[_]Feature{ |
| 1042 | .code_object_v3, | |
| 1043 | 1086 | .fast_fmaf, |
| 1044 | 1087 | .ldsbankcount16, |
| 1045 | .no_xnack_support, | |
| 1046 | 1088 | .sea_islands, |
| 1047 | 1089 | }), |
| 1048 | 1090 | }; |
| ... | ... | @@ -1050,9 +1092,7 @@ pub const cpu = struct { |
| 1050 | 1092 | .name = "gfx703", |
| 1051 | 1093 | .llvm_name = "gfx703", |
| 1052 | 1094 | .features = featureSet(&[_]Feature{ |
| 1053 | .code_object_v3, | |
| 1054 | 1095 | .ldsbankcount16, |
| 1055 | .no_xnack_support, | |
| 1056 | 1096 | .sea_islands, |
| 1057 | 1097 | }), |
| 1058 | 1098 | }; |
| ... | ... | @@ -1060,9 +1100,15 @@ pub const cpu = struct { |
| 1060 | 1100 | .name = "gfx704", |
| 1061 | 1101 | .llvm_name = "gfx704", |
| 1062 | 1102 | .features = featureSet(&[_]Feature{ |
| 1063 | .code_object_v3, | |
| 1064 | 1103 | .ldsbankcount32, |
| 1065 | .no_xnack_support, | |
| 1104 | .sea_islands, | |
| 1105 | }), | |
| 1106 | }; | |
| 1107 | pub const gfx705 = CpuModel{ | |
| 1108 | .name = "gfx705", | |
| 1109 | .llvm_name = "gfx705", | |
| 1110 | .features = featureSet(&[_]Feature{ | |
| 1111 | .ldsbankcount16, | |
| 1066 | 1112 | .sea_islands, |
| 1067 | 1113 | }), |
| 1068 | 1114 | }; |
| ... | ... | @@ -1070,22 +1116,19 @@ pub const cpu = struct { |
| 1070 | 1116 | .name = "gfx801", |
| 1071 | 1117 | .llvm_name = "gfx801", |
| 1072 | 1118 | .features = featureSet(&[_]Feature{ |
| 1073 | .code_object_v3, | |
| 1074 | 1119 | .fast_fmaf, |
| 1075 | 1120 | .half_rate_64_ops, |
| 1076 | 1121 | .ldsbankcount32, |
| 1077 | 1122 | .unpacked_d16_vmem, |
| 1078 | 1123 | .volcanic_islands, |
| 1079 | .xnack, | |
| 1124 | .xnack_support, | |
| 1080 | 1125 | }), |
| 1081 | 1126 | }; |
| 1082 | 1127 | pub const gfx802 = CpuModel{ |
| 1083 | 1128 | .name = "gfx802", |
| 1084 | 1129 | .llvm_name = "gfx802", |
| 1085 | 1130 | .features = featureSet(&[_]Feature{ |
| 1086 | .code_object_v3, | |
| 1087 | 1131 | .ldsbankcount32, |
| 1088 | .no_xnack_support, | |
| 1089 | 1132 | .sgpr_init_bug, |
| 1090 | 1133 | .unpacked_d16_vmem, |
| 1091 | 1134 | .volcanic_islands, |
| ... | ... | @@ -1095,9 +1138,17 @@ pub const cpu = struct { |
| 1095 | 1138 | .name = "gfx803", |
| 1096 | 1139 | .llvm_name = "gfx803", |
| 1097 | 1140 | .features = featureSet(&[_]Feature{ |
| 1098 | .code_object_v3, | |
| 1099 | 1141 | .ldsbankcount32, |
| 1100 | .no_xnack_support, | |
| 1142 | .unpacked_d16_vmem, | |
| 1143 | .volcanic_islands, | |
| 1144 | }), | |
| 1145 | }; | |
| 1146 | pub const gfx805 = CpuModel{ | |
| 1147 | .name = "gfx805", | |
| 1148 | .llvm_name = "gfx805", | |
| 1149 | .features = featureSet(&[_]Feature{ | |
| 1150 | .ldsbankcount32, | |
| 1151 | .sgpr_init_bug, | |
| 1101 | 1152 | .unpacked_d16_vmem, |
| 1102 | 1153 | .volcanic_islands, |
| 1103 | 1154 | }), |
| ... | ... | @@ -1106,61 +1157,56 @@ pub const cpu = struct { |
| 1106 | 1157 | .name = "gfx810", |
| 1107 | 1158 | .llvm_name = "gfx810", |
| 1108 | 1159 | .features = featureSet(&[_]Feature{ |
| 1109 | .code_object_v3, | |
| 1160 | .image_gather4_d16_bug, | |
| 1161 | .image_store_d16_bug, | |
| 1110 | 1162 | .ldsbankcount16, |
| 1111 | 1163 | .volcanic_islands, |
| 1112 | .xnack, | |
| 1164 | .xnack_support, | |
| 1113 | 1165 | }), |
| 1114 | 1166 | }; |
| 1115 | 1167 | pub const gfx900 = CpuModel{ |
| 1116 | 1168 | .name = "gfx900", |
| 1117 | 1169 | .llvm_name = "gfx900", |
| 1118 | 1170 | .features = featureSet(&[_]Feature{ |
| 1119 | .code_object_v3, | |
| 1120 | 1171 | .gfx9, |
| 1172 | .image_gather4_d16_bug, | |
| 1121 | 1173 | .ldsbankcount32, |
| 1122 | 1174 | .mad_mix_insts, |
| 1123 | .no_sram_ecc_support, | |
| 1124 | .no_xnack_support, | |
| 1125 | 1175 | }), |
| 1126 | 1176 | }; |
| 1127 | 1177 | pub const gfx902 = CpuModel{ |
| 1128 | 1178 | .name = "gfx902", |
| 1129 | 1179 | .llvm_name = "gfx902", |
| 1130 | 1180 | .features = featureSet(&[_]Feature{ |
| 1131 | .code_object_v3, | |
| 1132 | 1181 | .gfx9, |
| 1182 | .image_gather4_d16_bug, | |
| 1133 | 1183 | .ldsbankcount32, |
| 1134 | 1184 | .mad_mix_insts, |
| 1135 | .no_sram_ecc_support, | |
| 1136 | .xnack, | |
| 1137 | 1185 | }), |
| 1138 | 1186 | }; |
| 1139 | 1187 | pub const gfx904 = CpuModel{ |
| 1140 | 1188 | .name = "gfx904", |
| 1141 | 1189 | .llvm_name = "gfx904", |
| 1142 | 1190 | .features = featureSet(&[_]Feature{ |
| 1143 | .code_object_v3, | |
| 1144 | 1191 | .fma_mix_insts, |
| 1145 | 1192 | .gfx9, |
| 1193 | .image_gather4_d16_bug, | |
| 1146 | 1194 | .ldsbankcount32, |
| 1147 | .no_sram_ecc_support, | |
| 1148 | .no_xnack_support, | |
| 1149 | 1195 | }), |
| 1150 | 1196 | }; |
| 1151 | 1197 | pub const gfx906 = CpuModel{ |
| 1152 | 1198 | .name = "gfx906", |
| 1153 | 1199 | .llvm_name = "gfx906", |
| 1154 | 1200 | .features = featureSet(&[_]Feature{ |
| 1155 | .code_object_v3, | |
| 1156 | 1201 | .dl_insts, |
| 1157 | 1202 | .dot1_insts, |
| 1158 | 1203 | .dot2_insts, |
| 1159 | 1204 | .fma_mix_insts, |
| 1160 | 1205 | .gfx9, |
| 1161 | 1206 | .half_rate_64_ops, |
| 1207 | .image_gather4_d16_bug, | |
| 1162 | 1208 | .ldsbankcount32, |
| 1163 | .no_xnack_support, | |
| 1209 | .sramecc_support, | |
| 1164 | 1210 | }), |
| 1165 | 1211 | }; |
| 1166 | 1212 | pub const gfx908 = CpuModel{ |
| ... | ... | @@ -1168,7 +1214,6 @@ pub const cpu = struct { |
| 1168 | 1214 | .llvm_name = "gfx908", |
| 1169 | 1215 | .features = featureSet(&[_]Feature{ |
| 1170 | 1216 | .atomic_fadd_insts, |
| 1171 | .code_object_v3, | |
| 1172 | 1217 | .dl_insts, |
| 1173 | 1218 | .dot1_insts, |
| 1174 | 1219 | .dot2_insts, |
| ... | ... | @@ -1179,19 +1224,30 @@ pub const cpu = struct { |
| 1179 | 1224 | .fma_mix_insts, |
| 1180 | 1225 | .gfx9, |
| 1181 | 1226 | .half_rate_64_ops, |
| 1227 | .image_gather4_d16_bug, | |
| 1182 | 1228 | .ldsbankcount32, |
| 1183 | 1229 | .mai_insts, |
| 1184 | 1230 | .mfma_inline_literal_bug, |
| 1185 | 1231 | .pk_fmac_f16_inst, |
| 1186 | .sram_ecc, | |
| 1232 | .sramecc_support, | |
| 1187 | 1233 | }), |
| 1188 | 1234 | }; |
| 1189 | 1235 | pub const gfx909 = CpuModel{ |
| 1190 | 1236 | .name = "gfx909", |
| 1191 | 1237 | .llvm_name = "gfx909", |
| 1192 | 1238 | .features = featureSet(&[_]Feature{ |
| 1193 | .code_object_v3, | |
| 1194 | 1239 | .gfx9, |
| 1240 | .image_gather4_d16_bug, | |
| 1241 | .ldsbankcount32, | |
| 1242 | .mad_mix_insts, | |
| 1243 | }), | |
| 1244 | }; | |
| 1245 | pub const gfx90c = CpuModel{ | |
| 1246 | .name = "gfx90c", | |
| 1247 | .llvm_name = "gfx90c", | |
| 1248 | .features = featureSet(&[_]Feature{ | |
| 1249 | .gfx9, | |
| 1250 | .image_gather4_d16_bug, | |
| 1195 | 1251 | .ldsbankcount32, |
| 1196 | 1252 | .mad_mix_insts, |
| 1197 | 1253 | .xnack, |
| ... | ... | @@ -1201,9 +1257,6 @@ pub const cpu = struct { |
| 1201 | 1257 | .name = "hainan", |
| 1202 | 1258 | .llvm_name = "hainan", |
| 1203 | 1259 | .features = featureSet(&[_]Feature{ |
| 1204 | .code_object_v3, | |
| 1205 | .ldsbankcount32, | |
| 1206 | .no_xnack_support, | |
| 1207 | 1260 | .southern_islands, |
| 1208 | 1261 | }), |
| 1209 | 1262 | }; |
| ... | ... | @@ -1211,11 +1264,9 @@ pub const cpu = struct { |
| 1211 | 1264 | .name = "hawaii", |
| 1212 | 1265 | .llvm_name = "hawaii", |
| 1213 | 1266 | .features = featureSet(&[_]Feature{ |
| 1214 | .code_object_v3, | |
| 1215 | 1267 | .fast_fmaf, |
| 1216 | 1268 | .half_rate_64_ops, |
| 1217 | 1269 | .ldsbankcount32, |
| 1218 | .no_xnack_support, | |
| 1219 | 1270 | .sea_islands, |
| 1220 | 1271 | }), |
| 1221 | 1272 | }; |
| ... | ... | @@ -1223,9 +1274,7 @@ pub const cpu = struct { |
| 1223 | 1274 | .name = "iceland", |
| 1224 | 1275 | .llvm_name = "iceland", |
| 1225 | 1276 | .features = featureSet(&[_]Feature{ |
| 1226 | .code_object_v3, | |
| 1227 | 1277 | .ldsbankcount32, |
| 1228 | .no_xnack_support, | |
| 1229 | 1278 | .sgpr_init_bug, |
| 1230 | 1279 | .unpacked_d16_vmem, |
| 1231 | 1280 | .volcanic_islands, |
| ... | ... | @@ -1235,9 +1284,7 @@ pub const cpu = struct { |
| 1235 | 1284 | .name = "kabini", |
| 1236 | 1285 | .llvm_name = "kabini", |
| 1237 | 1286 | .features = featureSet(&[_]Feature{ |
| 1238 | .code_object_v3, | |
| 1239 | 1287 | .ldsbankcount16, |
| 1240 | .no_xnack_support, | |
| 1241 | 1288 | .sea_islands, |
| 1242 | 1289 | }), |
| 1243 | 1290 | }; |
| ... | ... | @@ -1245,9 +1292,7 @@ pub const cpu = struct { |
| 1245 | 1292 | .name = "kaveri", |
| 1246 | 1293 | .llvm_name = "kaveri", |
| 1247 | 1294 | .features = featureSet(&[_]Feature{ |
| 1248 | .code_object_v3, | |
| 1249 | 1295 | .ldsbankcount32, |
| 1250 | .no_xnack_support, | |
| 1251 | 1296 | .sea_islands, |
| 1252 | 1297 | }), |
| 1253 | 1298 | }; |
| ... | ... | @@ -1255,9 +1300,7 @@ pub const cpu = struct { |
| 1255 | 1300 | .name = "mullins", |
| 1256 | 1301 | .llvm_name = "mullins", |
| 1257 | 1302 | .features = featureSet(&[_]Feature{ |
| 1258 | .code_object_v3, | |
| 1259 | 1303 | .ldsbankcount16, |
| 1260 | .no_xnack_support, | |
| 1261 | 1304 | .sea_islands, |
| 1262 | 1305 | }), |
| 1263 | 1306 | }; |
| ... | ... | @@ -1265,9 +1308,6 @@ pub const cpu = struct { |
| 1265 | 1308 | .name = "oland", |
| 1266 | 1309 | .llvm_name = "oland", |
| 1267 | 1310 | .features = featureSet(&[_]Feature{ |
| 1268 | .code_object_v3, | |
| 1269 | .ldsbankcount32, | |
| 1270 | .no_xnack_support, | |
| 1271 | 1311 | .southern_islands, |
| 1272 | 1312 | }), |
| 1273 | 1313 | }; |
| ... | ... | @@ -1275,9 +1315,6 @@ pub const cpu = struct { |
| 1275 | 1315 | .name = "pitcairn", |
| 1276 | 1316 | .llvm_name = "pitcairn", |
| 1277 | 1317 | .features = featureSet(&[_]Feature{ |
| 1278 | .code_object_v3, | |
| 1279 | .ldsbankcount32, | |
| 1280 | .no_xnack_support, | |
| 1281 | 1318 | .southern_islands, |
| 1282 | 1319 | }), |
| 1283 | 1320 | }; |
| ... | ... | @@ -1285,9 +1322,7 @@ pub const cpu = struct { |
| 1285 | 1322 | .name = "polaris10", |
| 1286 | 1323 | .llvm_name = "polaris10", |
| 1287 | 1324 | .features = featureSet(&[_]Feature{ |
| 1288 | .code_object_v3, | |
| 1289 | 1325 | .ldsbankcount32, |
| 1290 | .no_xnack_support, | |
| 1291 | 1326 | .unpacked_d16_vmem, |
| 1292 | 1327 | .volcanic_islands, |
| 1293 | 1328 | }), |
| ... | ... | @@ -1296,9 +1331,7 @@ pub const cpu = struct { |
| 1296 | 1331 | .name = "polaris11", |
| 1297 | 1332 | .llvm_name = "polaris11", |
| 1298 | 1333 | .features = featureSet(&[_]Feature{ |
| 1299 | .code_object_v3, | |
| 1300 | 1334 | .ldsbankcount32, |
| 1301 | .no_xnack_support, | |
| 1302 | 1335 | .unpacked_d16_vmem, |
| 1303 | 1336 | .volcanic_islands, |
| 1304 | 1337 | }), |
| ... | ... | @@ -1307,21 +1340,19 @@ pub const cpu = struct { |
| 1307 | 1340 | .name = "stoney", |
| 1308 | 1341 | .llvm_name = "stoney", |
| 1309 | 1342 | .features = featureSet(&[_]Feature{ |
| 1310 | .code_object_v3, | |
| 1343 | .image_gather4_d16_bug, | |
| 1344 | .image_store_d16_bug, | |
| 1311 | 1345 | .ldsbankcount16, |
| 1312 | 1346 | .volcanic_islands, |
| 1313 | .xnack, | |
| 1347 | .xnack_support, | |
| 1314 | 1348 | }), |
| 1315 | 1349 | }; |
| 1316 | 1350 | pub const tahiti = CpuModel{ |
| 1317 | 1351 | .name = "tahiti", |
| 1318 | 1352 | .llvm_name = "tahiti", |
| 1319 | 1353 | .features = featureSet(&[_]Feature{ |
| 1320 | .code_object_v3, | |
| 1321 | 1354 | .fast_fmaf, |
| 1322 | 1355 | .half_rate_64_ops, |
| 1323 | .ldsbankcount32, | |
| 1324 | .no_xnack_support, | |
| 1325 | 1356 | .southern_islands, |
| 1326 | 1357 | }), |
| 1327 | 1358 | }; |
| ... | ... | @@ -1329,9 +1360,17 @@ pub const cpu = struct { |
| 1329 | 1360 | .name = "tonga", |
| 1330 | 1361 | .llvm_name = "tonga", |
| 1331 | 1362 | .features = featureSet(&[_]Feature{ |
| 1332 | .code_object_v3, | |
| 1333 | 1363 | .ldsbankcount32, |
| 1334 | .no_xnack_support, | |
| 1364 | .sgpr_init_bug, | |
| 1365 | .unpacked_d16_vmem, | |
| 1366 | .volcanic_islands, | |
| 1367 | }), | |
| 1368 | }; | |
| 1369 | pub const tongapro = CpuModel{ | |
| 1370 | .name = "tongapro", | |
| 1371 | .llvm_name = "tongapro", | |
| 1372 | .features = featureSet(&[_]Feature{ | |
| 1373 | .ldsbankcount32, | |
| 1335 | 1374 | .sgpr_init_bug, |
| 1336 | 1375 | .unpacked_d16_vmem, |
| 1337 | 1376 | .volcanic_islands, |
| ... | ... | @@ -1341,9 +1380,6 @@ pub const cpu = struct { |
| 1341 | 1380 | .name = "verde", |
| 1342 | 1381 | .llvm_name = "verde", |
| 1343 | 1382 | .features = featureSet(&[_]Feature{ |
| 1344 | .code_object_v3, | |
| 1345 | .ldsbankcount32, | |
| 1346 | .no_xnack_support, | |
| 1347 | 1383 | .southern_islands, |
| 1348 | 1384 | }), |
| 1349 | 1385 | }; |
lib/std/target/arm.zig+240-262| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -53,6 +50,8 @@ pub const Feature = enum { |
| 53 | 50 | fullfp16, |
| 54 | 51 | fuse_aes, |
| 55 | 52 | fuse_literals, |
| 53 | harden_sls_blr, | |
| 54 | harden_sls_retbr, | |
| 56 | 55 | has_v4t, |
| 57 | 56 | has_v5t, |
| 58 | 57 | has_v5te, |
| ... | ... | @@ -62,6 +61,7 @@ pub const Feature = enum { |
| 62 | 61 | has_v6t2, |
| 63 | 62 | has_v7, |
| 64 | 63 | has_v7clrex, |
| 64 | has_v8, | |
| 65 | 65 | has_v8_1a, |
| 66 | 66 | has_v8_1m_main, |
| 67 | 67 | has_v8_2a, |
| ... | ... | @@ -69,7 +69,7 @@ pub const Feature = enum { |
| 69 | 69 | has_v8_4a, |
| 70 | 70 | has_v8_5a, |
| 71 | 71 | has_v8_6a, |
| 72 | has_v8, | |
| 72 | has_v8_7a, | |
| 73 | 73 | has_v8m, |
| 74 | 74 | has_v8m_main, |
| 75 | 75 | hwdiv, |
| ... | ... | @@ -85,10 +85,10 @@ pub const Feature = enum { |
| 85 | 85 | mp, |
| 86 | 86 | muxed_units, |
| 87 | 87 | mve, |
| 88 | mve_fp, | |
| 89 | 88 | mve1beat, |
| 90 | 89 | mve2beat, |
| 91 | 90 | mve4beat, |
| 91 | mve_fp, | |
| 92 | 92 | nacl_trap, |
| 93 | 93 | neon, |
| 94 | 94 | neon_fpmovs, |
| ... | ... | @@ -148,10 +148,6 @@ pub const Feature = enum { |
| 148 | 148 | v7r, |
| 149 | 149 | v7s, |
| 150 | 150 | v7ve, |
| 151 | v8a, | |
| 152 | v8m, | |
| 153 | v8m_main, | |
| 154 | v8r, | |
| 155 | 151 | v8_1a, |
| 156 | 152 | v8_1m_main, |
| 157 | 153 | v8_2a, |
| ... | ... | @@ -159,6 +155,11 @@ pub const Feature = enum { |
| 159 | 155 | v8_4a, |
| 160 | 156 | v8_5a, |
| 161 | 157 | v8_6a, |
| 158 | v8_7a, | |
| 159 | v8a, | |
| 160 | v8m, | |
| 161 | v8m_main, | |
| 162 | v8r, | |
| 162 | 163 | vfp2, |
| 163 | 164 | vfp2sp, |
| 164 | 165 | vfp3, |
| ... | ... | @@ -238,7 +239,7 @@ pub const all_features = blk: { |
| 238 | 239 | .llvm_name = "cde", |
| 239 | 240 | .description = "Support CDE instructions", |
| 240 | 241 | .dependencies = featureSet(&[_]Feature{ |
| 241 | .v8m_main, | |
| 242 | .has_v8m_main, | |
| 242 | 243 | }), |
| 243 | 244 | }; |
| 244 | 245 | result[@enumToInt(Feature.cdecp0)] = .{ |
| ... | ... | @@ -312,7 +313,6 @@ pub const all_features = blk: { |
| 312 | 313 | .description = "Enable support for Cryptography extensions", |
| 313 | 314 | .dependencies = featureSet(&[_]Feature{ |
| 314 | 315 | .aes, |
| 315 | .neon, | |
| 316 | 316 | .sha2, |
| 317 | 317 | }), |
| 318 | 318 | }; |
| ... | ... | @@ -419,7 +419,6 @@ pub const all_features = blk: { |
| 419 | 419 | .description = "Enable ARMv8 FP with only 16 d-registers", |
| 420 | 420 | .dependencies = featureSet(&[_]Feature{ |
| 421 | 421 | .fp_armv8d16sp, |
| 422 | .fp64, | |
| 423 | 422 | .vfp4d16, |
| 424 | 423 | }), |
| 425 | 424 | }; |
| ... | ... | @@ -434,7 +433,6 @@ pub const all_features = blk: { |
| 434 | 433 | .llvm_name = "fp-armv8sp", |
| 435 | 434 | .description = "Enable ARMv8 FP with no double precision", |
| 436 | 435 | .dependencies = featureSet(&[_]Feature{ |
| 437 | .d32, | |
| 438 | 436 | .fp_armv8d16sp, |
| 439 | 437 | .vfp4sp, |
| 440 | 438 | }), |
| ... | ... | @@ -481,6 +479,16 @@ pub const all_features = blk: { |
| 481 | 479 | .description = "CPU fuses literal generation operations", |
| 482 | 480 | .dependencies = featureSet(&[_]Feature{}), |
| 483 | 481 | }; |
| 482 | result[@enumToInt(Feature.harden_sls_blr)] = .{ | |
| 483 | .llvm_name = "harden-sls-blr", | |
| 484 | .description = "Harden against straight line speculation across indirect calls", | |
| 485 | .dependencies = featureSet(&[_]Feature{}), | |
| 486 | }; | |
| 487 | result[@enumToInt(Feature.harden_sls_retbr)] = .{ | |
| 488 | .llvm_name = "harden-sls-retbr", | |
| 489 | .description = "Harden against straight line speculation across RETurn and BranchRegister instructions", | |
| 490 | .dependencies = featureSet(&[_]Feature{}), | |
| 491 | }; | |
| 484 | 492 | result[@enumToInt(Feature.has_v4t)] = .{ |
| 485 | 493 | .llvm_name = "v4t", |
| 486 | 494 | .description = "Support ARM v4T instructions", |
| ... | ... | @@ -525,18 +533,18 @@ pub const all_features = blk: { |
| 525 | 533 | .llvm_name = "v6t2", |
| 526 | 534 | .description = "Support ARM v6t2 instructions", |
| 527 | 535 | .dependencies = featureSet(&[_]Feature{ |
| 528 | .thumb2, | |
| 529 | 536 | .has_v6k, |
| 530 | 537 | .has_v8m, |
| 538 | .thumb2, | |
| 531 | 539 | }), |
| 532 | 540 | }; |
| 533 | 541 | result[@enumToInt(Feature.has_v7)] = .{ |
| 534 | 542 | .llvm_name = "v7", |
| 535 | 543 | .description = "Support ARM v7 instructions", |
| 536 | 544 | .dependencies = featureSet(&[_]Feature{ |
| 537 | .perfmon, | |
| 538 | 545 | .has_v6t2, |
| 539 | 546 | .has_v7clrex, |
| 547 | .perfmon, | |
| 540 | 548 | }), |
| 541 | 549 | }; |
| 542 | 550 | result[@enumToInt(Feature.has_v7clrex)] = .{ |
| ... | ... | @@ -592,8 +600,8 @@ pub const all_features = blk: { |
| 592 | 600 | .llvm_name = "v8.5a", |
| 593 | 601 | .description = "Support ARM v8.5a instructions", |
| 594 | 602 | .dependencies = featureSet(&[_]Feature{ |
| 595 | .sb, | |
| 596 | 603 | .has_v8_4a, |
| 604 | .sb, | |
| 597 | 605 | }), |
| 598 | 606 | }; |
| 599 | 607 | result[@enumToInt(Feature.has_v8_6a)] = .{ |
| ... | ... | @@ -601,8 +609,15 @@ pub const all_features = blk: { |
| 601 | 609 | .description = "Support ARM v8.6a instructions", |
| 602 | 610 | .dependencies = featureSet(&[_]Feature{ |
| 603 | 611 | .bf16, |
| 604 | .i8mm, | |
| 605 | 612 | .has_v8_5a, |
| 613 | .i8mm, | |
| 614 | }), | |
| 615 | }; | |
| 616 | result[@enumToInt(Feature.has_v8_7a)] = .{ | |
| 617 | .llvm_name = "v8.7a", | |
| 618 | .description = "Support ARM v8.7a instructions", | |
| 619 | .dependencies = featureSet(&[_]Feature{ | |
| 620 | .has_v8_6a, | |
| 606 | 621 | }), |
| 607 | 622 | }; |
| 608 | 623 | result[@enumToInt(Feature.has_v8m)] = .{ |
| ... | ... | @@ -640,14 +655,14 @@ pub const all_features = blk: { |
| 640 | 655 | .llvm_name = "iwmmxt", |
| 641 | 656 | .description = "ARMv5te architecture", |
| 642 | 657 | .dependencies = featureSet(&[_]Feature{ |
| 643 | .has_v5te, | |
| 658 | .v5te, | |
| 644 | 659 | }), |
| 645 | 660 | }; |
| 646 | 661 | result[@enumToInt(Feature.iwmmxt2)] = .{ |
| 647 | 662 | .llvm_name = "iwmmxt2", |
| 648 | 663 | .description = "ARMv5te architecture", |
| 649 | 664 | .dependencies = featureSet(&[_]Feature{ |
| 650 | .has_v5te, | |
| 665 | .v5te, | |
| 651 | 666 | }), |
| 652 | 667 | }; |
| 653 | 668 | result[@enumToInt(Feature.lob)] = .{ |
| ... | ... | @@ -695,15 +710,6 @@ pub const all_features = blk: { |
| 695 | 710 | .has_v8_1m_main, |
| 696 | 711 | }), |
| 697 | 712 | }; |
| 698 | result[@enumToInt(Feature.mve_fp)] = .{ | |
| 699 | .llvm_name = "mve.fp", | |
| 700 | .description = "Support M-Class Vector Extension with integer and floating ops", | |
| 701 | .dependencies = featureSet(&[_]Feature{ | |
| 702 | .fp_armv8d16sp, | |
| 703 | .fullfp16, | |
| 704 | .mve, | |
| 705 | }), | |
| 706 | }; | |
| 707 | 713 | result[@enumToInt(Feature.mve1beat)] = .{ |
| 708 | 714 | .llvm_name = "mve1beat", |
| 709 | 715 | .description = "Model MVE instructions as a 1 beat per tick architecture", |
| ... | ... | @@ -719,6 +725,14 @@ pub const all_features = blk: { |
| 719 | 725 | .description = "Model MVE instructions as a 4 beats per tick architecture", |
| 720 | 726 | .dependencies = featureSet(&[_]Feature{}), |
| 721 | 727 | }; |
| 728 | result[@enumToInt(Feature.mve_fp)] = .{ | |
| 729 | .llvm_name = "mve.fp", | |
| 730 | .description = "Support M-Class Vector Extension with integer and floating ops", | |
| 731 | .dependencies = featureSet(&[_]Feature{ | |
| 732 | .fullfp16, | |
| 733 | .mve, | |
| 734 | }), | |
| 735 | }; | |
| 722 | 736 | result[@enumToInt(Feature.nacl_trap)] = .{ |
| 723 | 737 | .llvm_name = "nacl-trap", |
| 724 | 738 | .description = "NaCl trap", |
| ... | ... | @@ -944,32 +958,32 @@ pub const all_features = blk: { |
| 944 | 958 | .llvm_name = "armv4t", |
| 945 | 959 | .description = "ARMv4t architecture", |
| 946 | 960 | .dependencies = featureSet(&[_]Feature{ |
| 947 | .strict_align, | |
| 948 | 961 | .has_v4t, |
| 962 | .strict_align, | |
| 949 | 963 | }), |
| 950 | 964 | }; |
| 951 | 965 | result[@enumToInt(Feature.v5t)] = .{ |
| 952 | 966 | .llvm_name = "armv5t", |
| 953 | 967 | .description = "ARMv5t architecture", |
| 954 | 968 | .dependencies = featureSet(&[_]Feature{ |
| 955 | .strict_align, | |
| 956 | 969 | .has_v5t, |
| 970 | .strict_align, | |
| 957 | 971 | }), |
| 958 | 972 | }; |
| 959 | 973 | result[@enumToInt(Feature.v5te)] = .{ |
| 960 | 974 | .llvm_name = "armv5te", |
| 961 | 975 | .description = "ARMv5te architecture", |
| 962 | 976 | .dependencies = featureSet(&[_]Feature{ |
| 963 | .strict_align, | |
| 964 | 977 | .has_v5te, |
| 978 | .strict_align, | |
| 965 | 979 | }), |
| 966 | 980 | }; |
| 967 | 981 | result[@enumToInt(Feature.v5tej)] = .{ |
| 968 | 982 | .llvm_name = "armv5tej", |
| 969 | 983 | .description = "ARMv5tej architecture", |
| 970 | 984 | .dependencies = featureSet(&[_]Feature{ |
| 971 | .strict_align, | |
| 972 | 985 | .has_v5te, |
| 986 | .strict_align, | |
| 973 | 987 | }), |
| 974 | 988 | }; |
| 975 | 989 | result[@enumToInt(Feature.v6)] = .{ |
| ... | ... | @@ -980,18 +994,6 @@ pub const all_features = blk: { |
| 980 | 994 | .has_v6, |
| 981 | 995 | }), |
| 982 | 996 | }; |
| 983 | result[@enumToInt(Feature.v6m)] = .{ | |
| 984 | .llvm_name = "armv6-m", | |
| 985 | .description = "ARMv6m architecture", | |
| 986 | .dependencies = featureSet(&[_]Feature{ | |
| 987 | .db, | |
| 988 | .mclass, | |
| 989 | .noarm, | |
| 990 | .strict_align, | |
| 991 | .thumb_mode, | |
| 992 | .has_v6m, | |
| 993 | }), | |
| 994 | }; | |
| 995 | 997 | result[@enumToInt(Feature.v6j)] = .{ |
| 996 | 998 | .llvm_name = "armv6j", |
| 997 | 999 | .description = "ARMv7a architecture", |
| ... | ... | @@ -1010,8 +1012,20 @@ pub const all_features = blk: { |
| 1010 | 1012 | .llvm_name = "armv6kz", |
| 1011 | 1013 | .description = "ARMv6kz architecture", |
| 1012 | 1014 | .dependencies = featureSet(&[_]Feature{ |
| 1013 | .trustzone, | |
| 1014 | 1015 | .has_v6k, |
| 1016 | .trustzone, | |
| 1017 | }), | |
| 1018 | }; | |
| 1019 | result[@enumToInt(Feature.v6m)] = .{ | |
| 1020 | .llvm_name = "armv6-m", | |
| 1021 | .description = "ARMv6m architecture", | |
| 1022 | .dependencies = featureSet(&[_]Feature{ | |
| 1023 | .db, | |
| 1024 | .has_v6m, | |
| 1025 | .mclass, | |
| 1026 | .noarm, | |
| 1027 | .strict_align, | |
| 1028 | .thumb_mode, | |
| 1015 | 1029 | }), |
| 1016 | 1030 | }; |
| 1017 | 1031 | result[@enumToInt(Feature.v6sm)] = .{ |
| ... | ... | @@ -1019,11 +1033,11 @@ pub const all_features = blk: { |
| 1019 | 1033 | .description = "ARMv6sm architecture", |
| 1020 | 1034 | .dependencies = featureSet(&[_]Feature{ |
| 1021 | 1035 | .db, |
| 1036 | .has_v6m, | |
| 1022 | 1037 | .mclass, |
| 1023 | 1038 | .noarm, |
| 1024 | 1039 | .strict_align, |
| 1025 | 1040 | .thumb_mode, |
| 1026 | .has_v6m, | |
| 1027 | 1041 | }), |
| 1028 | 1042 | }; |
| 1029 | 1043 | result[@enumToInt(Feature.v6t2)] = .{ |
| ... | ... | @@ -1041,53 +1055,51 @@ pub const all_features = blk: { |
| 1041 | 1055 | .aclass, |
| 1042 | 1056 | .db, |
| 1043 | 1057 | .dsp, |
| 1044 | .neon, | |
| 1045 | 1058 | .has_v7, |
| 1059 | .neon, | |
| 1046 | 1060 | }), |
| 1047 | 1061 | }; |
| 1048 | result[@enumToInt(Feature.v7m)] = .{ | |
| 1049 | .llvm_name = "armv7-m", | |
| 1050 | .description = "ARMv7m architecture", | |
| 1062 | result[@enumToInt(Feature.v7em)] = .{ | |
| 1063 | .llvm_name = "armv7e-m", | |
| 1064 | .description = "ARMv7em architecture", | |
| 1051 | 1065 | .dependencies = featureSet(&[_]Feature{ |
| 1052 | 1066 | .db, |
| 1067 | .dsp, | |
| 1068 | .has_v7, | |
| 1053 | 1069 | .hwdiv, |
| 1054 | 1070 | .mclass, |
| 1055 | 1071 | .noarm, |
| 1056 | 1072 | .thumb_mode, |
| 1057 | .thumb2, | |
| 1058 | .has_v7, | |
| 1059 | 1073 | }), |
| 1060 | 1074 | }; |
| 1061 | result[@enumToInt(Feature.v7r)] = .{ | |
| 1062 | .llvm_name = "armv7-r", | |
| 1063 | .description = "ARMv7r architecture", | |
| 1075 | result[@enumToInt(Feature.v7k)] = .{ | |
| 1076 | .llvm_name = "armv7k", | |
| 1077 | .description = "ARMv7a architecture", | |
| 1064 | 1078 | .dependencies = featureSet(&[_]Feature{ |
| 1065 | .db, | |
| 1066 | .dsp, | |
| 1067 | .hwdiv, | |
| 1068 | .rclass, | |
| 1069 | .has_v7, | |
| 1079 | .v7a, | |
| 1070 | 1080 | }), |
| 1071 | 1081 | }; |
| 1072 | result[@enumToInt(Feature.v7em)] = .{ | |
| 1073 | .llvm_name = "armv7e-m", | |
| 1074 | .description = "ARMv7em architecture", | |
| 1082 | result[@enumToInt(Feature.v7m)] = .{ | |
| 1083 | .llvm_name = "armv7-m", | |
| 1084 | .description = "ARMv7m architecture", | |
| 1075 | 1085 | .dependencies = featureSet(&[_]Feature{ |
| 1076 | 1086 | .db, |
| 1077 | .dsp, | |
| 1087 | .has_v7, | |
| 1078 | 1088 | .hwdiv, |
| 1079 | 1089 | .mclass, |
| 1080 | 1090 | .noarm, |
| 1081 | 1091 | .thumb_mode, |
| 1082 | .thumb2, | |
| 1083 | .has_v7, | |
| 1084 | 1092 | }), |
| 1085 | 1093 | }; |
| 1086 | result[@enumToInt(Feature.v7k)] = .{ | |
| 1087 | .llvm_name = "armv7k", | |
| 1088 | .description = "ARMv7a architecture", | |
| 1094 | result[@enumToInt(Feature.v7r)] = .{ | |
| 1095 | .llvm_name = "armv7-r", | |
| 1096 | .description = "ARMv7r architecture", | |
| 1089 | 1097 | .dependencies = featureSet(&[_]Feature{ |
| 1090 | .v7a, | |
| 1098 | .db, | |
| 1099 | .dsp, | |
| 1100 | .has_v7, | |
| 1101 | .hwdiv, | |
| 1102 | .rclass, | |
| 1091 | 1103 | }), |
| 1092 | 1104 | }; |
| 1093 | 1105 | result[@enumToInt(Feature.v7s)] = .{ |
| ... | ... | @@ -1104,73 +1116,10 @@ pub const all_features = blk: { |
| 1104 | 1116 | .aclass, |
| 1105 | 1117 | .db, |
| 1106 | 1118 | .dsp, |
| 1107 | .mp, | |
| 1108 | .neon, | |
| 1109 | .trustzone, | |
| 1110 | 1119 | .has_v7, |
| 1111 | .virtualization, | |
| 1112 | }), | |
| 1113 | }; | |
| 1114 | result[@enumToInt(Feature.v8a)] = .{ | |
| 1115 | .llvm_name = "armv8-a", | |
| 1116 | .description = "ARMv8a architecture", | |
| 1117 | .dependencies = featureSet(&[_]Feature{ | |
| 1118 | .aclass, | |
| 1119 | .crc, | |
| 1120 | .crypto, | |
| 1121 | .db, | |
| 1122 | .dsp, | |
| 1123 | .fp_armv8, | |
| 1124 | 1120 | .mp, |
| 1125 | 1121 | .neon, |
| 1126 | 1122 | .trustzone, |
| 1127 | .has_v8, | |
| 1128 | .virtualization, | |
| 1129 | }), | |
| 1130 | }; | |
| 1131 | result[@enumToInt(Feature.v8m)] = .{ | |
| 1132 | .llvm_name = "armv8-m.base", | |
| 1133 | .description = "ARMv8mBaseline architecture", | |
| 1134 | .dependencies = featureSet(&[_]Feature{ | |
| 1135 | .@"8msecext", | |
| 1136 | .acquire_release, | |
| 1137 | .db, | |
| 1138 | .hwdiv, | |
| 1139 | .mclass, | |
| 1140 | .noarm, | |
| 1141 | .strict_align, | |
| 1142 | .thumb_mode, | |
| 1143 | .has_v7clrex, | |
| 1144 | .has_v8m, | |
| 1145 | }), | |
| 1146 | }; | |
| 1147 | result[@enumToInt(Feature.v8m_main)] = .{ | |
| 1148 | .llvm_name = "armv8-m.main", | |
| 1149 | .description = "ARMv8mMainline architecture", | |
| 1150 | .dependencies = featureSet(&[_]Feature{ | |
| 1151 | .@"8msecext", | |
| 1152 | .acquire_release, | |
| 1153 | .db, | |
| 1154 | .hwdiv, | |
| 1155 | .mclass, | |
| 1156 | .noarm, | |
| 1157 | .thumb_mode, | |
| 1158 | .has_v8m_main, | |
| 1159 | }), | |
| 1160 | }; | |
| 1161 | result[@enumToInt(Feature.v8r)] = .{ | |
| 1162 | .llvm_name = "armv8-r", | |
| 1163 | .description = "ARMv8r architecture", | |
| 1164 | .dependencies = featureSet(&[_]Feature{ | |
| 1165 | .crc, | |
| 1166 | .db, | |
| 1167 | .dfb, | |
| 1168 | .dsp, | |
| 1169 | .fp_armv8, | |
| 1170 | .mp, | |
| 1171 | .neon, | |
| 1172 | .rclass, | |
| 1173 | .has_v8, | |
| 1174 | 1123 | .virtualization, |
| 1175 | 1124 | }), |
| 1176 | 1125 | }; |
| ... | ... | @@ -1184,10 +1133,9 @@ pub const all_features = blk: { |
| 1184 | 1133 | .db, |
| 1185 | 1134 | .dsp, |
| 1186 | 1135 | .fp_armv8, |
| 1136 | .has_v8_1a, | |
| 1187 | 1137 | .mp, |
| 1188 | .neon, | |
| 1189 | 1138 | .trustzone, |
| 1190 | .has_v8_1a, | |
| 1191 | 1139 | .virtualization, |
| 1192 | 1140 | }), |
| 1193 | 1141 | }; |
| ... | ... | @@ -1198,13 +1146,13 @@ pub const all_features = blk: { |
| 1198 | 1146 | .@"8msecext", |
| 1199 | 1147 | .acquire_release, |
| 1200 | 1148 | .db, |
| 1149 | .has_v8_1m_main, | |
| 1201 | 1150 | .hwdiv, |
| 1202 | 1151 | .lob, |
| 1203 | 1152 | .mclass, |
| 1204 | 1153 | .noarm, |
| 1205 | 1154 | .ras, |
| 1206 | 1155 | .thumb_mode, |
| 1207 | .has_v8_1m_main, | |
| 1208 | 1156 | }), |
| 1209 | 1157 | }; |
| 1210 | 1158 | result[@enumToInt(Feature.v8_2a)] = .{ |
| ... | ... | @@ -1217,11 +1165,10 @@ pub const all_features = blk: { |
| 1217 | 1165 | .db, |
| 1218 | 1166 | .dsp, |
| 1219 | 1167 | .fp_armv8, |
| 1168 | .has_v8_2a, | |
| 1220 | 1169 | .mp, |
| 1221 | .neon, | |
| 1222 | 1170 | .ras, |
| 1223 | 1171 | .trustzone, |
| 1224 | .has_v8_2a, | |
| 1225 | 1172 | .virtualization, |
| 1226 | 1173 | }), |
| 1227 | 1174 | }; |
| ... | ... | @@ -1235,11 +1182,10 @@ pub const all_features = blk: { |
| 1235 | 1182 | .db, |
| 1236 | 1183 | .dsp, |
| 1237 | 1184 | .fp_armv8, |
| 1185 | .has_v8_3a, | |
| 1238 | 1186 | .mp, |
| 1239 | .neon, | |
| 1240 | 1187 | .ras, |
| 1241 | 1188 | .trustzone, |
| 1242 | .has_v8_3a, | |
| 1243 | 1189 | .virtualization, |
| 1244 | 1190 | }), |
| 1245 | 1191 | }; |
| ... | ... | @@ -1251,14 +1197,12 @@ pub const all_features = blk: { |
| 1251 | 1197 | .crc, |
| 1252 | 1198 | .crypto, |
| 1253 | 1199 | .db, |
| 1254 | .dotprod, | |
| 1255 | 1200 | .dsp, |
| 1256 | 1201 | .fp_armv8, |
| 1202 | .has_v8_4a, | |
| 1257 | 1203 | .mp, |
| 1258 | .neon, | |
| 1259 | 1204 | .ras, |
| 1260 | 1205 | .trustzone, |
| 1261 | .has_v8_4a, | |
| 1262 | 1206 | .virtualization, |
| 1263 | 1207 | }), |
| 1264 | 1208 | }; |
| ... | ... | @@ -1270,14 +1214,12 @@ pub const all_features = blk: { |
| 1270 | 1214 | .crc, |
| 1271 | 1215 | .crypto, |
| 1272 | 1216 | .db, |
| 1273 | .dotprod, | |
| 1274 | 1217 | .dsp, |
| 1275 | 1218 | .fp_armv8, |
| 1219 | .has_v8_5a, | |
| 1276 | 1220 | .mp, |
| 1277 | .neon, | |
| 1278 | 1221 | .ras, |
| 1279 | 1222 | .trustzone, |
| 1280 | .has_v8_5a, | |
| 1281 | 1223 | .virtualization, |
| 1282 | 1224 | }), |
| 1283 | 1225 | }; |
| ... | ... | @@ -1289,14 +1231,91 @@ pub const all_features = blk: { |
| 1289 | 1231 | .crc, |
| 1290 | 1232 | .crypto, |
| 1291 | 1233 | .db, |
| 1292 | .dotprod, | |
| 1293 | 1234 | .dsp, |
| 1294 | 1235 | .fp_armv8, |
| 1236 | .has_v8_6a, | |
| 1295 | 1237 | .mp, |
| 1296 | .neon, | |
| 1297 | 1238 | .ras, |
| 1298 | 1239 | .trustzone, |
| 1299 | .has_v8_6a, | |
| 1240 | .virtualization, | |
| 1241 | }), | |
| 1242 | }; | |
| 1243 | result[@enumToInt(Feature.v8_7a)] = .{ | |
| 1244 | .llvm_name = "armv8.7-a", | |
| 1245 | .description = "ARMv86a architecture", | |
| 1246 | .dependencies = featureSet(&[_]Feature{ | |
| 1247 | .aclass, | |
| 1248 | .crc, | |
| 1249 | .crypto, | |
| 1250 | .db, | |
| 1251 | .dsp, | |
| 1252 | .fp_armv8, | |
| 1253 | .has_v8_7a, | |
| 1254 | .mp, | |
| 1255 | .ras, | |
| 1256 | .trustzone, | |
| 1257 | .virtualization, | |
| 1258 | }), | |
| 1259 | }; | |
| 1260 | result[@enumToInt(Feature.v8a)] = .{ | |
| 1261 | .llvm_name = "armv8-a", | |
| 1262 | .description = "ARMv8a architecture", | |
| 1263 | .dependencies = featureSet(&[_]Feature{ | |
| 1264 | .aclass, | |
| 1265 | .crc, | |
| 1266 | .crypto, | |
| 1267 | .db, | |
| 1268 | .dsp, | |
| 1269 | .fp_armv8, | |
| 1270 | .has_v8, | |
| 1271 | .mp, | |
| 1272 | .trustzone, | |
| 1273 | .virtualization, | |
| 1274 | }), | |
| 1275 | }; | |
| 1276 | result[@enumToInt(Feature.v8m)] = .{ | |
| 1277 | .llvm_name = "armv8-m.base", | |
| 1278 | .description = "ARMv8mBaseline architecture", | |
| 1279 | .dependencies = featureSet(&[_]Feature{ | |
| 1280 | .@"8msecext", | |
| 1281 | .acquire_release, | |
| 1282 | .db, | |
| 1283 | .has_v7clrex, | |
| 1284 | .has_v8m, | |
| 1285 | .hwdiv, | |
| 1286 | .mclass, | |
| 1287 | .noarm, | |
| 1288 | .strict_align, | |
| 1289 | .thumb_mode, | |
| 1290 | }), | |
| 1291 | }; | |
| 1292 | result[@enumToInt(Feature.v8m_main)] = .{ | |
| 1293 | .llvm_name = "armv8-m.main", | |
| 1294 | .description = "ARMv8mMainline architecture", | |
| 1295 | .dependencies = featureSet(&[_]Feature{ | |
| 1296 | .@"8msecext", | |
| 1297 | .acquire_release, | |
| 1298 | .db, | |
| 1299 | .has_v8m_main, | |
| 1300 | .hwdiv, | |
| 1301 | .mclass, | |
| 1302 | .noarm, | |
| 1303 | .thumb_mode, | |
| 1304 | }), | |
| 1305 | }; | |
| 1306 | result[@enumToInt(Feature.v8r)] = .{ | |
| 1307 | .llvm_name = "armv8-r", | |
| 1308 | .description = "ARMv8r architecture", | |
| 1309 | .dependencies = featureSet(&[_]Feature{ | |
| 1310 | .crc, | |
| 1311 | .db, | |
| 1312 | .dfb, | |
| 1313 | .dsp, | |
| 1314 | .fp_armv8, | |
| 1315 | .has_v8, | |
| 1316 | .mp, | |
| 1317 | .neon, | |
| 1318 | .rclass, | |
| 1300 | 1319 | .virtualization, |
| 1301 | 1320 | }), |
| 1302 | 1321 | }; |
| ... | ... | @@ -1327,7 +1346,6 @@ pub const all_features = blk: { |
| 1327 | 1346 | .llvm_name = "vfp3d16", |
| 1328 | 1347 | .description = "Enable VFP3 instructions with only 16 d-registers", |
| 1329 | 1348 | .dependencies = featureSet(&[_]Feature{ |
| 1330 | .fp64, | |
| 1331 | 1349 | .vfp2, |
| 1332 | 1350 | .vfp3d16sp, |
| 1333 | 1351 | }), |
| ... | ... | @@ -1351,7 +1369,6 @@ pub const all_features = blk: { |
| 1351 | 1369 | .llvm_name = "vfp4", |
| 1352 | 1370 | .description = "Enable VFP4 instructions", |
| 1353 | 1371 | .dependencies = featureSet(&[_]Feature{ |
| 1354 | .fp16, | |
| 1355 | 1372 | .vfp3, |
| 1356 | 1373 | .vfp4d16, |
| 1357 | 1374 | .vfp4sp, |
| ... | ... | @@ -1361,8 +1378,6 @@ pub const all_features = blk: { |
| 1361 | 1378 | .llvm_name = "vfp4d16", |
| 1362 | 1379 | .description = "Enable VFP4 instructions with only 16 d-registers", |
| 1363 | 1380 | .dependencies = featureSet(&[_]Feature{ |
| 1364 | .fp16, | |
| 1365 | .fp64, | |
| 1366 | 1381 | .vfp3d16, |
| 1367 | 1382 | .vfp4d16sp, |
| 1368 | 1383 | }), |
| ... | ... | @@ -1379,8 +1394,6 @@ pub const all_features = blk: { |
| 1379 | 1394 | .llvm_name = "vfp4sp", |
| 1380 | 1395 | .description = "Enable VFP4 instructions with no double precision", |
| 1381 | 1396 | .dependencies = featureSet(&[_]Feature{ |
| 1382 | .d32, | |
| 1383 | .fp16, | |
| 1384 | 1397 | .vfp3sp, |
| 1385 | 1398 | .vfp4d16sp, |
| 1386 | 1399 | }), |
| ... | ... | @@ -1417,7 +1430,7 @@ pub const all_features = blk: { |
| 1417 | 1430 | .llvm_name = "xscale", |
| 1418 | 1431 | .description = "ARMv5te architecture", |
| 1419 | 1432 | .dependencies = featureSet(&[_]Feature{ |
| 1420 | .has_v5te, | |
| 1433 | .v5te, | |
| 1421 | 1434 | }), |
| 1422 | 1435 | }; |
| 1423 | 1436 | result[@enumToInt(Feature.zcz)] = .{ |
| ... | ... | @@ -1480,8 +1493,8 @@ pub const cpu = struct { |
| 1480 | 1493 | .name = "arm1136jf_s", |
| 1481 | 1494 | .llvm_name = "arm1136jf-s", |
| 1482 | 1495 | .features = featureSet(&[_]Feature{ |
| 1483 | .v6, | |
| 1484 | 1496 | .slowfpvmlx, |
| 1497 | .v6, | |
| 1485 | 1498 | .vfp2, |
| 1486 | 1499 | }), |
| 1487 | 1500 | }; |
| ... | ... | @@ -1496,8 +1509,8 @@ pub const cpu = struct { |
| 1496 | 1509 | .name = "arm1156t2f_s", |
| 1497 | 1510 | .llvm_name = "arm1156t2f-s", |
| 1498 | 1511 | .features = featureSet(&[_]Feature{ |
| 1499 | .v6t2, | |
| 1500 | 1512 | .slowfpvmlx, |
| 1513 | .v6t2, | |
| 1501 | 1514 | .vfp2, |
| 1502 | 1515 | }), |
| 1503 | 1516 | }; |
| ... | ... | @@ -1519,8 +1532,8 @@ pub const cpu = struct { |
| 1519 | 1532 | .name = "arm1176jzf_s", |
| 1520 | 1533 | .llvm_name = "arm1176jzf-s", |
| 1521 | 1534 | .features = featureSet(&[_]Feature{ |
| 1522 | .v6kz, | |
| 1523 | 1535 | .slowfpvmlx, |
| 1536 | .v6kz, | |
| 1524 | 1537 | .vfp2, |
| 1525 | 1538 | }), |
| 1526 | 1539 | }; |
| ... | ... | @@ -1654,11 +1667,11 @@ pub const cpu = struct { |
| 1654 | 1667 | .name = "cortex_a12", |
| 1655 | 1668 | .llvm_name = "cortex-a12", |
| 1656 | 1669 | .features = featureSet(&[_]Feature{ |
| 1657 | .v7a, | |
| 1658 | 1670 | .avoid_partial_cpsr, |
| 1659 | 1671 | .mp, |
| 1660 | 1672 | .ret_addr_stack, |
| 1661 | 1673 | .trustzone, |
| 1674 | .v7a, | |
| 1662 | 1675 | .vfp4, |
| 1663 | 1676 | .virtualization, |
| 1664 | 1677 | .vmlx_forwarding, |
| ... | ... | @@ -1668,14 +1681,13 @@ pub const cpu = struct { |
| 1668 | 1681 | .name = "cortex_a15", |
| 1669 | 1682 | .llvm_name = "cortex-a15", |
| 1670 | 1683 | .features = featureSet(&[_]Feature{ |
| 1671 | .v7a, | |
| 1672 | 1684 | .avoid_partial_cpsr, |
| 1673 | .dont_widen_vmovs, | |
| 1674 | 1685 | .mp, |
| 1675 | 1686 | .muxed_units, |
| 1676 | 1687 | .ret_addr_stack, |
| 1677 | 1688 | .splat_vfp_neon, |
| 1678 | 1689 | .trustzone, |
| 1690 | .v7a, | |
| 1679 | 1691 | .vfp4, |
| 1680 | 1692 | .virtualization, |
| 1681 | 1693 | .vldn_align, |
| ... | ... | @@ -1685,11 +1697,11 @@ pub const cpu = struct { |
| 1685 | 1697 | .name = "cortex_a17", |
| 1686 | 1698 | .llvm_name = "cortex-a17", |
| 1687 | 1699 | .features = featureSet(&[_]Feature{ |
| 1688 | .v7a, | |
| 1689 | 1700 | .avoid_partial_cpsr, |
| 1690 | 1701 | .mp, |
| 1691 | 1702 | .ret_addr_stack, |
| 1692 | 1703 | .trustzone, |
| 1704 | .v7a, | |
| 1693 | 1705 | .vfp4, |
| 1694 | 1706 | .virtualization, |
| 1695 | 1707 | .vmlx_forwarding, |
| ... | ... | @@ -1699,10 +1711,6 @@ pub const cpu = struct { |
| 1699 | 1711 | .name = "cortex_a32", |
| 1700 | 1712 | .llvm_name = "cortex-a32", |
| 1701 | 1713 | .features = featureSet(&[_]Feature{ |
| 1702 | .crc, | |
| 1703 | .crypto, | |
| 1704 | .hwdiv, | |
| 1705 | .hwdiv_arm, | |
| 1706 | 1714 | .v8a, |
| 1707 | 1715 | }), |
| 1708 | 1716 | }; |
| ... | ... | @@ -1710,10 +1718,6 @@ pub const cpu = struct { |
| 1710 | 1718 | .name = "cortex_a35", |
| 1711 | 1719 | .llvm_name = "cortex-a35", |
| 1712 | 1720 | .features = featureSet(&[_]Feature{ |
| 1713 | .crc, | |
| 1714 | .crypto, | |
| 1715 | .hwdiv, | |
| 1716 | .hwdiv_arm, | |
| 1717 | 1721 | .v8a, |
| 1718 | 1722 | }), |
| 1719 | 1723 | }; |
| ... | ... | @@ -1721,13 +1725,13 @@ pub const cpu = struct { |
| 1721 | 1725 | .name = "cortex_a5", |
| 1722 | 1726 | .llvm_name = "cortex-a5", |
| 1723 | 1727 | .features = featureSet(&[_]Feature{ |
| 1724 | .v7a, | |
| 1725 | 1728 | .mp, |
| 1726 | 1729 | .ret_addr_stack, |
| 1727 | 1730 | .slow_fp_brcc, |
| 1728 | 1731 | .slowfpvfmx, |
| 1729 | 1732 | .slowfpvmlx, |
| 1730 | 1733 | .trustzone, |
| 1734 | .v7a, | |
| 1731 | 1735 | .vfp4, |
| 1732 | 1736 | .vmlx_forwarding, |
| 1733 | 1737 | }), |
| ... | ... | @@ -1736,49 +1740,39 @@ pub const cpu = struct { |
| 1736 | 1740 | .name = "cortex_a53", |
| 1737 | 1741 | .llvm_name = "cortex-a53", |
| 1738 | 1742 | .features = featureSet(&[_]Feature{ |
| 1739 | .v8a, | |
| 1740 | .crc, | |
| 1741 | .crypto, | |
| 1742 | 1743 | .fpao, |
| 1743 | .hwdiv, | |
| 1744 | .hwdiv_arm, | |
| 1744 | .v8a, | |
| 1745 | 1745 | }), |
| 1746 | 1746 | }; |
| 1747 | 1747 | pub const cortex_a55 = CpuModel{ |
| 1748 | 1748 | .name = "cortex_a55", |
| 1749 | 1749 | .llvm_name = "cortex-a55", |
| 1750 | 1750 | .features = featureSet(&[_]Feature{ |
| 1751 | .v8_2a, | |
| 1752 | 1751 | .dotprod, |
| 1753 | .hwdiv, | |
| 1754 | .hwdiv_arm, | |
| 1752 | .v8_2a, | |
| 1755 | 1753 | }), |
| 1756 | 1754 | }; |
| 1757 | 1755 | pub const cortex_a57 = CpuModel{ |
| 1758 | 1756 | .name = "cortex_a57", |
| 1759 | 1757 | .llvm_name = "cortex-a57", |
| 1760 | 1758 | .features = featureSet(&[_]Feature{ |
| 1761 | .v8a, | |
| 1762 | 1759 | .avoid_partial_cpsr, |
| 1763 | 1760 | .cheap_predicable_cpsr, |
| 1764 | .crc, | |
| 1765 | .crypto, | |
| 1766 | 1761 | .fpao, |
| 1767 | .hwdiv, | |
| 1768 | .hwdiv_arm, | |
| 1762 | .v8a, | |
| 1769 | 1763 | }), |
| 1770 | 1764 | }; |
| 1771 | 1765 | pub const cortex_a7 = CpuModel{ |
| 1772 | 1766 | .name = "cortex_a7", |
| 1773 | 1767 | .llvm_name = "cortex-a7", |
| 1774 | 1768 | .features = featureSet(&[_]Feature{ |
| 1775 | .v7a, | |
| 1776 | 1769 | .mp, |
| 1777 | 1770 | .ret_addr_stack, |
| 1778 | 1771 | .slow_fp_brcc, |
| 1779 | 1772 | .slowfpvfmx, |
| 1780 | 1773 | .slowfpvmlx, |
| 1781 | 1774 | .trustzone, |
| 1775 | .v7a, | |
| 1782 | 1776 | .vfp4, |
| 1783 | 1777 | .virtualization, |
| 1784 | 1778 | .vmlx_forwarding, |
| ... | ... | @@ -1790,10 +1784,6 @@ pub const cpu = struct { |
| 1790 | 1784 | .llvm_name = "cortex-a72", |
| 1791 | 1785 | .features = featureSet(&[_]Feature{ |
| 1792 | 1786 | .v8a, |
| 1793 | .crc, | |
| 1794 | .crypto, | |
| 1795 | .hwdiv, | |
| 1796 | .hwdiv_arm, | |
| 1797 | 1787 | }), |
| 1798 | 1788 | }; |
| 1799 | 1789 | pub const cortex_a73 = CpuModel{ |
| ... | ... | @@ -1801,20 +1791,14 @@ pub const cpu = struct { |
| 1801 | 1791 | .llvm_name = "cortex-a73", |
| 1802 | 1792 | .features = featureSet(&[_]Feature{ |
| 1803 | 1793 | .v8a, |
| 1804 | .crc, | |
| 1805 | .crypto, | |
| 1806 | .hwdiv, | |
| 1807 | .hwdiv_arm, | |
| 1808 | 1794 | }), |
| 1809 | 1795 | }; |
| 1810 | 1796 | pub const cortex_a75 = CpuModel{ |
| 1811 | 1797 | .name = "cortex_a75", |
| 1812 | 1798 | .llvm_name = "cortex-a75", |
| 1813 | 1799 | .features = featureSet(&[_]Feature{ |
| 1814 | .v8_2a, | |
| 1815 | 1800 | .dotprod, |
| 1816 | .hwdiv, | |
| 1817 | .hwdiv_arm, | |
| 1801 | .v8_2a, | |
| 1818 | 1802 | }), |
| 1819 | 1803 | }; |
| 1820 | 1804 | pub const cortex_a76 = CpuModel{ |
| ... | ... | @@ -1822,13 +1806,9 @@ pub const cpu = struct { |
| 1822 | 1806 | .llvm_name = "cortex-a76", |
| 1823 | 1807 | .features = featureSet(&[_]Feature{ |
| 1824 | 1808 | .a76, |
| 1825 | .v8_2a, | |
| 1826 | .crc, | |
| 1827 | .crypto, | |
| 1828 | 1809 | .dotprod, |
| 1829 | 1810 | .fullfp16, |
| 1830 | .hwdiv, | |
| 1831 | .hwdiv_arm, | |
| 1811 | .v8_2a, | |
| 1832 | 1812 | }), |
| 1833 | 1813 | }; |
| 1834 | 1814 | pub const cortex_a76ae = CpuModel{ |
| ... | ... | @@ -1836,52 +1816,49 @@ pub const cpu = struct { |
| 1836 | 1816 | .llvm_name = "cortex-a76ae", |
| 1837 | 1817 | .features = featureSet(&[_]Feature{ |
| 1838 | 1818 | .a76, |
| 1839 | .v8_2a, | |
| 1840 | .crc, | |
| 1841 | .crypto, | |
| 1842 | 1819 | .dotprod, |
| 1843 | 1820 | .fullfp16, |
| 1844 | .hwdiv, | |
| 1845 | .hwdiv_arm, | |
| 1821 | .v8_2a, | |
| 1846 | 1822 | }), |
| 1847 | 1823 | }; |
| 1848 | 1824 | pub const cortex_a77 = CpuModel{ |
| 1849 | 1825 | .name = "cortex_a77", |
| 1850 | 1826 | .llvm_name = "cortex-a77", |
| 1851 | 1827 | .features = featureSet(&[_]Feature{ |
| 1852 | .v8_2a, | |
| 1853 | .crc, | |
| 1854 | .crypto, | |
| 1855 | 1828 | .dotprod, |
| 1856 | 1829 | .fullfp16, |
| 1857 | .hwdiv, | |
| 1858 | .hwdiv_arm, | |
| 1830 | .v8_2a, | |
| 1859 | 1831 | }), |
| 1860 | 1832 | }; |
| 1861 | 1833 | pub const cortex_a78 = CpuModel{ |
| 1862 | 1834 | .name = "cortex_a78", |
| 1863 | 1835 | .llvm_name = "cortex-a78", |
| 1864 | 1836 | .features = featureSet(&[_]Feature{ |
| 1837 | .dotprod, | |
| 1838 | .fullfp16, | |
| 1865 | 1839 | .v8_2a, |
| 1866 | .crc, | |
| 1867 | .crypto, | |
| 1840 | }), | |
| 1841 | }; | |
| 1842 | pub const cortex_a78c = CpuModel{ | |
| 1843 | .name = "cortex_a78c", | |
| 1844 | .llvm_name = "cortex-a78c", | |
| 1845 | .features = featureSet(&[_]Feature{ | |
| 1868 | 1846 | .dotprod, |
| 1869 | 1847 | .fullfp16, |
| 1870 | .hwdiv, | |
| 1871 | .hwdiv_arm, | |
| 1848 | .v8_2a, | |
| 1872 | 1849 | }), |
| 1873 | 1850 | }; |
| 1874 | 1851 | pub const cortex_a8 = CpuModel{ |
| 1875 | 1852 | .name = "cortex_a8", |
| 1876 | 1853 | .llvm_name = "cortex-a8", |
| 1877 | 1854 | .features = featureSet(&[_]Feature{ |
| 1878 | .v7a, | |
| 1879 | 1855 | .nonpipelined_vfp, |
| 1880 | 1856 | .ret_addr_stack, |
| 1881 | 1857 | .slow_fp_brcc, |
| 1882 | 1858 | .slowfpvfmx, |
| 1883 | 1859 | .slowfpvmlx, |
| 1884 | 1860 | .trustzone, |
| 1861 | .v7a, | |
| 1885 | 1862 | .vmlx_forwarding, |
| 1886 | 1863 | .vmlx_hazards, |
| 1887 | 1864 | }), |
| ... | ... | @@ -1890,7 +1867,6 @@ pub const cpu = struct { |
| 1890 | 1867 | .name = "cortex_a9", |
| 1891 | 1868 | .llvm_name = "cortex-a9", |
| 1892 | 1869 | .features = featureSet(&[_]Feature{ |
| 1893 | .v7a, | |
| 1894 | 1870 | .avoid_partial_cpsr, |
| 1895 | 1871 | .expand_fp_mlx, |
| 1896 | 1872 | .fp16, |
| ... | ... | @@ -1900,6 +1876,7 @@ pub const cpu = struct { |
| 1900 | 1876 | .prefer_vmovsr, |
| 1901 | 1877 | .ret_addr_stack, |
| 1902 | 1878 | .trustzone, |
| 1879 | .v7a, | |
| 1903 | 1880 | .vldn_align, |
| 1904 | 1881 | .vmlx_forwarding, |
| 1905 | 1882 | .vmlx_hazards, |
| ... | ... | @@ -1930,26 +1907,25 @@ pub const cpu = struct { |
| 1930 | 1907 | .name = "cortex_m23", |
| 1931 | 1908 | .llvm_name = "cortex-m23", |
| 1932 | 1909 | .features = featureSet(&[_]Feature{ |
| 1933 | .v8m, | |
| 1934 | 1910 | .no_movt, |
| 1911 | .v8m, | |
| 1935 | 1912 | }), |
| 1936 | 1913 | }; |
| 1937 | 1914 | pub const cortex_m3 = CpuModel{ |
| 1938 | 1915 | .name = "cortex_m3", |
| 1939 | 1916 | .llvm_name = "cortex-m3", |
| 1940 | 1917 | .features = featureSet(&[_]Feature{ |
| 1941 | .v7m, | |
| 1942 | 1918 | .loop_align, |
| 1943 | 1919 | .m3, |
| 1944 | 1920 | .no_branch_predictor, |
| 1945 | 1921 | .use_misched, |
| 1922 | .v7m, | |
| 1946 | 1923 | }), |
| 1947 | 1924 | }; |
| 1948 | 1925 | pub const cortex_m33 = CpuModel{ |
| 1949 | 1926 | .name = "cortex_m33", |
| 1950 | 1927 | .llvm_name = "cortex-m33", |
| 1951 | 1928 | .features = featureSet(&[_]Feature{ |
| 1952 | .v8m_main, | |
| 1953 | 1929 | .dsp, |
| 1954 | 1930 | .fp_armv8d16sp, |
| 1955 | 1931 | .loop_align, |
| ... | ... | @@ -1957,13 +1933,13 @@ pub const cpu = struct { |
| 1957 | 1933 | .slowfpvfmx, |
| 1958 | 1934 | .slowfpvmlx, |
| 1959 | 1935 | .use_misched, |
| 1936 | .v8m_main, | |
| 1960 | 1937 | }), |
| 1961 | 1938 | }; |
| 1962 | 1939 | pub const cortex_m35p = CpuModel{ |
| 1963 | 1940 | .name = "cortex_m35p", |
| 1964 | 1941 | .llvm_name = "cortex-m35p", |
| 1965 | 1942 | .features = featureSet(&[_]Feature{ |
| 1966 | .v8m_main, | |
| 1967 | 1943 | .dsp, |
| 1968 | 1944 | .fp_armv8d16sp, |
| 1969 | 1945 | .loop_align, |
| ... | ... | @@ -1971,18 +1947,19 @@ pub const cpu = struct { |
| 1971 | 1947 | .slowfpvfmx, |
| 1972 | 1948 | .slowfpvmlx, |
| 1973 | 1949 | .use_misched, |
| 1950 | .v8m_main, | |
| 1974 | 1951 | }), |
| 1975 | 1952 | }; |
| 1976 | 1953 | pub const cortex_m4 = CpuModel{ |
| 1977 | 1954 | .name = "cortex_m4", |
| 1978 | 1955 | .llvm_name = "cortex-m4", |
| 1979 | 1956 | .features = featureSet(&[_]Feature{ |
| 1980 | .v7em, | |
| 1981 | 1957 | .loop_align, |
| 1982 | 1958 | .no_branch_predictor, |
| 1983 | 1959 | .slowfpvfmx, |
| 1984 | 1960 | .slowfpvmlx, |
| 1985 | 1961 | .use_misched, |
| 1962 | .v7em, | |
| 1986 | 1963 | .vfp4d16sp, |
| 1987 | 1964 | }), |
| 1988 | 1965 | }; |
| ... | ... | @@ -1990,45 +1967,45 @@ pub const cpu = struct { |
| 1990 | 1967 | .name = "cortex_m55", |
| 1991 | 1968 | .llvm_name = "cortex-m55", |
| 1992 | 1969 | .features = featureSet(&[_]Feature{ |
| 1993 | .v8_1m_main, | |
| 1994 | .dsp, | |
| 1995 | 1970 | .fp_armv8d16, |
| 1996 | 1971 | .loop_align, |
| 1997 | 1972 | .mve_fp, |
| 1998 | 1973 | .no_branch_predictor, |
| 1999 | 1974 | .slowfpvmlx, |
| 2000 | 1975 | .use_misched, |
| 1976 | .v8_1m_main, | |
| 2001 | 1977 | }), |
| 2002 | 1978 | }; |
| 2003 | 1979 | pub const cortex_m7 = CpuModel{ |
| 2004 | 1980 | .name = "cortex_m7", |
| 2005 | 1981 | .llvm_name = "cortex-m7", |
| 2006 | 1982 | .features = featureSet(&[_]Feature{ |
| 2007 | .v7em, | |
| 2008 | 1983 | .fp_armv8d16, |
| 1984 | .use_misched, | |
| 1985 | .v7em, | |
| 2009 | 1986 | }), |
| 2010 | 1987 | }; |
| 2011 | 1988 | pub const cortex_r4 = CpuModel{ |
| 2012 | 1989 | .name = "cortex_r4", |
| 2013 | 1990 | .llvm_name = "cortex-r4", |
| 2014 | 1991 | .features = featureSet(&[_]Feature{ |
| 2015 | .v7r, | |
| 2016 | 1992 | .avoid_partial_cpsr, |
| 2017 | 1993 | .r4, |
| 2018 | 1994 | .ret_addr_stack, |
| 1995 | .v7r, | |
| 2019 | 1996 | }), |
| 2020 | 1997 | }; |
| 2021 | 1998 | pub const cortex_r4f = CpuModel{ |
| 2022 | 1999 | .name = "cortex_r4f", |
| 2023 | 2000 | .llvm_name = "cortex-r4f", |
| 2024 | 2001 | .features = featureSet(&[_]Feature{ |
| 2025 | .v7r, | |
| 2026 | 2002 | .avoid_partial_cpsr, |
| 2027 | 2003 | .r4, |
| 2028 | 2004 | .ret_addr_stack, |
| 2029 | 2005 | .slow_fp_brcc, |
| 2030 | 2006 | .slowfpvfmx, |
| 2031 | 2007 | .slowfpvmlx, |
| 2008 | .v7r, | |
| 2032 | 2009 | .vfp3d16, |
| 2033 | 2010 | }), |
| 2034 | 2011 | }; |
| ... | ... | @@ -2036,13 +2013,13 @@ pub const cpu = struct { |
| 2036 | 2013 | .name = "cortex_r5", |
| 2037 | 2014 | .llvm_name = "cortex-r5", |
| 2038 | 2015 | .features = featureSet(&[_]Feature{ |
| 2039 | .v7r, | |
| 2040 | 2016 | .avoid_partial_cpsr, |
| 2041 | 2017 | .hwdiv_arm, |
| 2042 | 2018 | .ret_addr_stack, |
| 2043 | 2019 | .slow_fp_brcc, |
| 2044 | 2020 | .slowfpvfmx, |
| 2045 | 2021 | .slowfpvmlx, |
| 2022 | .v7r, | |
| 2046 | 2023 | .vfp3d16, |
| 2047 | 2024 | }), |
| 2048 | 2025 | }; |
| ... | ... | @@ -2050,16 +2027,15 @@ pub const cpu = struct { |
| 2050 | 2027 | .name = "cortex_r52", |
| 2051 | 2028 | .llvm_name = "cortex-r52", |
| 2052 | 2029 | .features = featureSet(&[_]Feature{ |
| 2053 | .v8r, | |
| 2054 | 2030 | .fpao, |
| 2055 | 2031 | .use_misched, |
| 2032 | .v8r, | |
| 2056 | 2033 | }), |
| 2057 | 2034 | }; |
| 2058 | 2035 | pub const cortex_r7 = CpuModel{ |
| 2059 | 2036 | .name = "cortex_r7", |
| 2060 | 2037 | .llvm_name = "cortex-r7", |
| 2061 | 2038 | .features = featureSet(&[_]Feature{ |
| 2062 | .v7r, | |
| 2063 | 2039 | .avoid_partial_cpsr, |
| 2064 | 2040 | .fp16, |
| 2065 | 2041 | .hwdiv_arm, |
| ... | ... | @@ -2068,6 +2044,7 @@ pub const cpu = struct { |
| 2068 | 2044 | .slow_fp_brcc, |
| 2069 | 2045 | .slowfpvfmx, |
| 2070 | 2046 | .slowfpvmlx, |
| 2047 | .v7r, | |
| 2071 | 2048 | .vfp3d16, |
| 2072 | 2049 | }), |
| 2073 | 2050 | }; |
| ... | ... | @@ -2075,7 +2052,6 @@ pub const cpu = struct { |
| 2075 | 2052 | .name = "cortex_r8", |
| 2076 | 2053 | .llvm_name = "cortex-r8", |
| 2077 | 2054 | .features = featureSet(&[_]Feature{ |
| 2078 | .v7r, | |
| 2079 | 2055 | .avoid_partial_cpsr, |
| 2080 | 2056 | .fp16, |
| 2081 | 2057 | .hwdiv_arm, |
| ... | ... | @@ -2084,6 +2060,7 @@ pub const cpu = struct { |
| 2084 | 2060 | .slow_fp_brcc, |
| 2085 | 2061 | .slowfpvfmx, |
| 2086 | 2062 | .slowfpvmlx, |
| 2063 | .v7r, | |
| 2087 | 2064 | .vfp3d16, |
| 2088 | 2065 | }), |
| 2089 | 2066 | }; |
| ... | ... | @@ -2091,34 +2068,25 @@ pub const cpu = struct { |
| 2091 | 2068 | .name = "cortex_x1", |
| 2092 | 2069 | .llvm_name = "cortex-x1", |
| 2093 | 2070 | .features = featureSet(&[_]Feature{ |
| 2094 | .v8_2a, | |
| 2095 | .crc, | |
| 2096 | .crypto, | |
| 2097 | 2071 | .dotprod, |
| 2098 | 2072 | .fullfp16, |
| 2099 | .hwdiv, | |
| 2100 | .hwdiv_arm, | |
| 2073 | .v8_2a, | |
| 2101 | 2074 | }), |
| 2102 | 2075 | }; |
| 2103 | 2076 | pub const cyclone = CpuModel{ |
| 2104 | 2077 | .name = "cyclone", |
| 2105 | 2078 | .llvm_name = "cyclone", |
| 2106 | 2079 | .features = featureSet(&[_]Feature{ |
| 2107 | .v8a, | |
| 2108 | 2080 | .avoid_movs_shop, |
| 2109 | 2081 | .avoid_partial_cpsr, |
| 2110 | .crypto, | |
| 2111 | 2082 | .disable_postra_scheduler, |
| 2112 | .hwdiv, | |
| 2113 | .hwdiv_arm, | |
| 2114 | .mp, | |
| 2115 | 2083 | .neonfp, |
| 2116 | 2084 | .ret_addr_stack, |
| 2117 | 2085 | .slowfpvfmx, |
| 2118 | 2086 | .slowfpvmlx, |
| 2119 | 2087 | .swift, |
| 2120 | 2088 | .use_misched, |
| 2121 | .vfp4, | |
| 2089 | .v8a, | |
| 2122 | 2090 | .zcz, |
| 2123 | 2091 | }), |
| 2124 | 2092 | }; |
| ... | ... | @@ -2133,34 +2101,34 @@ pub const cpu = struct { |
| 2133 | 2101 | .name = "exynos_m1", |
| 2134 | 2102 | .llvm_name = null, |
| 2135 | 2103 | .features = featureSet(&[_]Feature{ |
| 2136 | .v8a, | |
| 2137 | 2104 | .exynos, |
| 2105 | .v8a, | |
| 2138 | 2106 | }), |
| 2139 | 2107 | }; |
| 2140 | 2108 | pub const exynos_m2 = CpuModel{ |
| 2141 | 2109 | .name = "exynos_m2", |
| 2142 | 2110 | .llvm_name = null, |
| 2143 | 2111 | .features = featureSet(&[_]Feature{ |
| 2144 | .v8a, | |
| 2145 | 2112 | .exynos, |
| 2113 | .v8a, | |
| 2146 | 2114 | }), |
| 2147 | 2115 | }; |
| 2148 | 2116 | pub const exynos_m3 = CpuModel{ |
| 2149 | 2117 | .name = "exynos_m3", |
| 2150 | 2118 | .llvm_name = "exynos-m3", |
| 2151 | 2119 | .features = featureSet(&[_]Feature{ |
| 2152 | .v8_2a, | |
| 2153 | 2120 | .exynos, |
| 2121 | .v8a, | |
| 2154 | 2122 | }), |
| 2155 | 2123 | }; |
| 2156 | 2124 | pub const exynos_m4 = CpuModel{ |
| 2157 | 2125 | .name = "exynos_m4", |
| 2158 | 2126 | .llvm_name = "exynos-m4", |
| 2159 | 2127 | .features = featureSet(&[_]Feature{ |
| 2160 | .v8_2a, | |
| 2161 | 2128 | .dotprod, |
| 2162 | 2129 | .exynos, |
| 2163 | 2130 | .fullfp16, |
| 2131 | .v8_2a, | |
| 2164 | 2132 | }), |
| 2165 | 2133 | }; |
| 2166 | 2134 | pub const exynos_m5 = CpuModel{ |
| ... | ... | @@ -2190,7 +2158,6 @@ pub const cpu = struct { |
| 2190 | 2158 | .llvm_name = "krait", |
| 2191 | 2159 | .features = featureSet(&[_]Feature{ |
| 2192 | 2160 | .avoid_partial_cpsr, |
| 2193 | .fp16, | |
| 2194 | 2161 | .hwdiv, |
| 2195 | 2162 | .hwdiv_arm, |
| 2196 | 2163 | .muxed_units, |
| ... | ... | @@ -2205,10 +2172,6 @@ pub const cpu = struct { |
| 2205 | 2172 | .name = "kryo", |
| 2206 | 2173 | .llvm_name = "kryo", |
| 2207 | 2174 | .features = featureSet(&[_]Feature{ |
| 2208 | .crc, | |
| 2209 | .crypto, | |
| 2210 | .hwdiv, | |
| 2211 | .hwdiv_arm, | |
| 2212 | 2175 | .v8a, |
| 2213 | 2176 | }), |
| 2214 | 2177 | }; |
| ... | ... | @@ -2216,8 +2179,8 @@ pub const cpu = struct { |
| 2216 | 2179 | .name = "mpcore", |
| 2217 | 2180 | .llvm_name = "mpcore", |
| 2218 | 2181 | .features = featureSet(&[_]Feature{ |
| 2219 | .v6k, | |
| 2220 | 2182 | .slowfpvmlx, |
| 2183 | .v6k, | |
| 2221 | 2184 | .vfp2, |
| 2222 | 2185 | }), |
| 2223 | 2186 | }; |
| ... | ... | @@ -2232,12 +2195,27 @@ pub const cpu = struct { |
| 2232 | 2195 | .name = "neoverse_n1", |
| 2233 | 2196 | .llvm_name = "neoverse-n1", |
| 2234 | 2197 | .features = featureSet(&[_]Feature{ |
| 2235 | .v8_2a, | |
| 2236 | .crc, | |
| 2237 | .crypto, | |
| 2238 | 2198 | .dotprod, |
| 2239 | .hwdiv, | |
| 2240 | .hwdiv_arm, | |
| 2199 | .v8_2a, | |
| 2200 | }), | |
| 2201 | }; | |
| 2202 | pub const neoverse_n2 = CpuModel{ | |
| 2203 | .name = "neoverse_n2", | |
| 2204 | .llvm_name = "neoverse-n2", | |
| 2205 | .features = featureSet(&[_]Feature{ | |
| 2206 | .bf16, | |
| 2207 | .i8mm, | |
| 2208 | .v8_5a, | |
| 2209 | }), | |
| 2210 | }; | |
| 2211 | pub const neoverse_v1 = CpuModel{ | |
| 2212 | .name = "neoverse_v1", | |
| 2213 | .llvm_name = "neoverse-v1", | |
| 2214 | .features = featureSet(&[_]Feature{ | |
| 2215 | .bf16, | |
| 2216 | .fullfp16, | |
| 2217 | .i8mm, | |
| 2218 | .v8_4a, | |
| 2241 | 2219 | }), |
| 2242 | 2220 | }; |
| 2243 | 2221 | pub const sc000 = CpuModel{ |
| ... | ... | @@ -2251,10 +2229,10 @@ pub const cpu = struct { |
| 2251 | 2229 | .name = "sc300", |
| 2252 | 2230 | .llvm_name = "sc300", |
| 2253 | 2231 | .features = featureSet(&[_]Feature{ |
| 2254 | .v7m, | |
| 2255 | 2232 | .m3, |
| 2256 | 2233 | .no_branch_predictor, |
| 2257 | 2234 | .use_misched, |
| 2235 | .v7m, | |
| 2258 | 2236 | }), |
| 2259 | 2237 | }; |
| 2260 | 2238 | pub const strongarm = CpuModel{ |
| ... | ... | @@ -2289,7 +2267,6 @@ pub const cpu = struct { |
| 2289 | 2267 | .name = "swift", |
| 2290 | 2268 | .llvm_name = "swift", |
| 2291 | 2269 | .features = featureSet(&[_]Feature{ |
| 2292 | .v7a, | |
| 2293 | 2270 | .avoid_movs_shop, |
| 2294 | 2271 | .avoid_partial_cpsr, |
| 2295 | 2272 | .disable_postra_scheduler, |
| ... | ... | @@ -2308,6 +2285,7 @@ pub const cpu = struct { |
| 2308 | 2285 | .slowfpvmlx, |
| 2309 | 2286 | .swift, |
| 2310 | 2287 | .use_misched, |
| 2288 | .v7a, | |
| 2311 | 2289 | .vfp4, |
| 2312 | 2290 | .vmlx_hazards, |
| 2313 | 2291 | .wide_stride_vfp, |
lib/std/target/avr.zig+64-11| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -163,7 +160,6 @@ pub const all_features = blk: { |
| 163 | 160 | .dependencies = featureSet(&[_]Feature{ |
| 164 | 161 | .avr0, |
| 165 | 162 | .@"break", |
| 166 | .memmappedregs, | |
| 167 | 163 | .sram, |
| 168 | 164 | .tinyencoding, |
| 169 | 165 | }), |
| ... | ... | @@ -802,6 +798,13 @@ pub const cpu = struct { |
| 802 | 798 | .avr5, |
| 803 | 799 | }), |
| 804 | 800 | }; |
| 801 | pub const atmega168pb = CpuModel{ | |
| 802 | .name = "atmega168pb", | |
| 803 | .llvm_name = "atmega168pb", | |
| 804 | .features = featureSet(&[_]Feature{ | |
| 805 | .avr5, | |
| 806 | }), | |
| 807 | }; | |
| 805 | 808 | pub const atmega169 = CpuModel{ |
| 806 | 809 | .name = "atmega169", |
| 807 | 810 | .llvm_name = "atmega169", |
| ... | ... | @@ -949,6 +952,13 @@ pub const cpu = struct { |
| 949 | 952 | .avr5, |
| 950 | 953 | }), |
| 951 | 954 | }; |
| 955 | pub const atmega324pb = CpuModel{ | |
| 956 | .name = "atmega324pb", | |
| 957 | .llvm_name = "atmega324pb", | |
| 958 | .features = featureSet(&[_]Feature{ | |
| 959 | .avr5, | |
| 960 | }), | |
| 961 | }; | |
| 952 | 962 | pub const atmega325 = CpuModel{ |
| 953 | 963 | .name = "atmega325", |
| 954 | 964 | .llvm_name = "atmega325", |
| ... | ... | @@ -1019,6 +1029,13 @@ pub const cpu = struct { |
| 1019 | 1029 | .avr5, |
| 1020 | 1030 | }), |
| 1021 | 1031 | }; |
| 1032 | pub const atmega328pb = CpuModel{ | |
| 1033 | .name = "atmega328pb", | |
| 1034 | .llvm_name = "atmega328pb", | |
| 1035 | .features = featureSet(&[_]Feature{ | |
| 1036 | .avr5, | |
| 1037 | }), | |
| 1038 | }; | |
| 1022 | 1039 | pub const atmega329 = CpuModel{ |
| 1023 | 1040 | .name = "atmega329", |
| 1024 | 1041 | .llvm_name = "atmega329", |
| ... | ... | @@ -1166,6 +1183,13 @@ pub const cpu = struct { |
| 1166 | 1183 | .avr4, |
| 1167 | 1184 | }), |
| 1168 | 1185 | }; |
| 1186 | pub const atmega48pb = CpuModel{ | |
| 1187 | .name = "atmega48pb", | |
| 1188 | .llvm_name = "atmega48pb", | |
| 1189 | .features = featureSet(&[_]Feature{ | |
| 1190 | .avr4, | |
| 1191 | }), | |
| 1192 | }; | |
| 1169 | 1193 | pub const atmega64 = CpuModel{ |
| 1170 | 1194 | .name = "atmega64", |
| 1171 | 1195 | .llvm_name = "atmega64", |
| ... | ... | @@ -1338,7 +1362,11 @@ pub const cpu = struct { |
| 1338 | 1362 | .name = "atmega8", |
| 1339 | 1363 | .llvm_name = "atmega8", |
| 1340 | 1364 | .features = featureSet(&[_]Feature{ |
| 1341 | .avr4, | |
| 1365 | .avr2, | |
| 1366 | .lpmx, | |
| 1367 | .movw, | |
| 1368 | .mul, | |
| 1369 | .spm, | |
| 1342 | 1370 | }), |
| 1343 | 1371 | }; |
| 1344 | 1372 | pub const atmega8515 = CpuModel{ |
| ... | ... | @@ -1391,11 +1419,22 @@ pub const cpu = struct { |
| 1391 | 1419 | .avr4, |
| 1392 | 1420 | }), |
| 1393 | 1421 | }; |
| 1422 | pub const atmega88pb = CpuModel{ | |
| 1423 | .name = "atmega88pb", | |
| 1424 | .llvm_name = "atmega88pb", | |
| 1425 | .features = featureSet(&[_]Feature{ | |
| 1426 | .avr4, | |
| 1427 | }), | |
| 1428 | }; | |
| 1394 | 1429 | pub const atmega8a = CpuModel{ |
| 1395 | 1430 | .name = "atmega8a", |
| 1396 | 1431 | .llvm_name = "atmega8a", |
| 1397 | 1432 | .features = featureSet(&[_]Feature{ |
| 1398 | .avr4, | |
| 1433 | .avr2, | |
| 1434 | .lpmx, | |
| 1435 | .movw, | |
| 1436 | .mul, | |
| 1437 | .spm, | |
| 1399 | 1438 | }), |
| 1400 | 1439 | }; |
| 1401 | 1440 | pub const atmega8hva = CpuModel{ |
| ... | ... | @@ -1595,6 +1634,13 @@ pub const cpu = struct { |
| 1595 | 1634 | .avr25, |
| 1596 | 1635 | }), |
| 1597 | 1636 | }; |
| 1637 | pub const attiny441 = CpuModel{ | |
| 1638 | .name = "attiny441", | |
| 1639 | .llvm_name = "attiny441", | |
| 1640 | .features = featureSet(&[_]Feature{ | |
| 1641 | .avr25, | |
| 1642 | }), | |
| 1643 | }; | |
| 1598 | 1644 | pub const attiny44a = CpuModel{ |
| 1599 | 1645 | .name = "attiny44a", |
| 1600 | 1646 | .llvm_name = "attiny44a", |
| ... | ... | @@ -1651,6 +1697,13 @@ pub const cpu = struct { |
| 1651 | 1697 | .avr25, |
| 1652 | 1698 | }), |
| 1653 | 1699 | }; |
| 1700 | pub const attiny841 = CpuModel{ | |
| 1701 | .name = "attiny841", | |
| 1702 | .llvm_name = "attiny841", | |
| 1703 | .features = featureSet(&[_]Feature{ | |
| 1704 | .avr25, | |
| 1705 | }), | |
| 1706 | }; | |
| 1654 | 1707 | pub const attiny84a = CpuModel{ |
| 1655 | 1708 | .name = "attiny84a", |
| 1656 | 1709 | .llvm_name = "attiny84a", |
| ... | ... | @@ -1802,7 +1855,7 @@ pub const cpu = struct { |
| 1802 | 1855 | .name = "atxmega16e5", |
| 1803 | 1856 | .llvm_name = "atxmega16e5", |
| 1804 | 1857 | .features = featureSet(&[_]Feature{ |
| 1805 | .xmega, | |
| 1858 | .xmegau, | |
| 1806 | 1859 | }), |
| 1807 | 1860 | }; |
| 1808 | 1861 | pub const atxmega192a3 = CpuModel{ |
| ... | ... | @@ -1907,7 +1960,7 @@ pub const cpu = struct { |
| 1907 | 1960 | .name = "atxmega32e5", |
| 1908 | 1961 | .llvm_name = "atxmega32e5", |
| 1909 | 1962 | .features = featureSet(&[_]Feature{ |
| 1910 | .xmega, | |
| 1963 | .xmegau, | |
| 1911 | 1964 | }), |
| 1912 | 1965 | }; |
| 1913 | 1966 | pub const atxmega32x1 = CpuModel{ |
| ... | ... | @@ -2005,7 +2058,7 @@ pub const cpu = struct { |
| 2005 | 2058 | .name = "atxmega8e5", |
| 2006 | 2059 | .llvm_name = "atxmega8e5", |
| 2007 | 2060 | .features = featureSet(&[_]Feature{ |
| 2008 | .xmega, | |
| 2061 | .xmegau, | |
| 2009 | 2062 | }), |
| 2010 | 2063 | }; |
| 2011 | 2064 | pub const avr1 = CpuModel{ |
lib/std/target/bpf.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/hexagon.zig+2-23| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -92,7 +89,6 @@ pub const all_features = blk: { |
| 92 | 89 | .llvm_name = "hvxv62", |
| 93 | 90 | .description = "Hexagon HVX instructions", |
| 94 | 91 | .dependencies = featureSet(&[_]Feature{ |
| 95 | .hvx, | |
| 96 | 92 | .hvxv60, |
| 97 | 93 | }), |
| 98 | 94 | }; |
| ... | ... | @@ -100,8 +96,6 @@ pub const all_features = blk: { |
| 100 | 96 | .llvm_name = "hvxv65", |
| 101 | 97 | .description = "Hexagon HVX instructions", |
| 102 | 98 | .dependencies = featureSet(&[_]Feature{ |
| 103 | .hvx, | |
| 104 | .hvxv60, | |
| 105 | 99 | .hvxv62, |
| 106 | 100 | }), |
| 107 | 101 | }; |
| ... | ... | @@ -109,9 +103,6 @@ pub const all_features = blk: { |
| 109 | 103 | .llvm_name = "hvxv66", |
| 110 | 104 | .description = "Hexagon HVX instructions", |
| 111 | 105 | .dependencies = featureSet(&[_]Feature{ |
| 112 | .hvx, | |
| 113 | .hvxv60, | |
| 114 | .hvxv62, | |
| 115 | 106 | .hvxv65, |
| 116 | 107 | .zreg, |
| 117 | 108 | }), |
| ... | ... | @@ -120,9 +111,6 @@ pub const all_features = blk: { |
| 120 | 111 | .llvm_name = "hvxv67", |
| 121 | 112 | .description = "Hexagon HVX instructions", |
| 122 | 113 | .dependencies = featureSet(&[_]Feature{ |
| 123 | .hvxv60, | |
| 124 | .hvxv62, | |
| 125 | .hvxv65, | |
| 126 | 114 | .hvxv66, |
| 127 | 115 | }), |
| 128 | 116 | }; |
| ... | ... | @@ -248,7 +236,6 @@ pub const cpu = struct { |
| 248 | 236 | .memops, |
| 249 | 237 | .nvj, |
| 250 | 238 | .nvs, |
| 251 | .packets, | |
| 252 | 239 | .prev65, |
| 253 | 240 | .small_data, |
| 254 | 241 | .v5, |
| ... | ... | @@ -265,7 +252,6 @@ pub const cpu = struct { |
| 265 | 252 | .memops, |
| 266 | 253 | .nvj, |
| 267 | 254 | .nvs, |
| 268 | .packets, | |
| 269 | 255 | .prev65, |
| 270 | 256 | .small_data, |
| 271 | 257 | .v5, |
| ... | ... | @@ -280,7 +266,6 @@ pub const cpu = struct { |
| 280 | 266 | .memops, |
| 281 | 267 | .nvj, |
| 282 | 268 | .nvs, |
| 283 | .packets, | |
| 284 | 269 | .prev65, |
| 285 | 270 | .small_data, |
| 286 | 271 | .v5, |
| ... | ... | @@ -296,7 +281,6 @@ pub const cpu = struct { |
| 296 | 281 | .memops, |
| 297 | 282 | .nvj, |
| 298 | 283 | .nvs, |
| 299 | .packets, | |
| 300 | 284 | .prev65, |
| 301 | 285 | .small_data, |
| 302 | 286 | .v5, |
| ... | ... | @@ -313,7 +297,6 @@ pub const cpu = struct { |
| 313 | 297 | .memops, |
| 314 | 298 | .nvj, |
| 315 | 299 | .nvs, |
| 316 | .packets, | |
| 317 | 300 | .prev65, |
| 318 | 301 | .small_data, |
| 319 | 302 | .v5, |
| ... | ... | @@ -332,7 +315,6 @@ pub const cpu = struct { |
| 332 | 315 | .memops, |
| 333 | 316 | .nvj, |
| 334 | 317 | .nvs, |
| 335 | .packets, | |
| 336 | 318 | .small_data, |
| 337 | 319 | .v5, |
| 338 | 320 | .v55, |
| ... | ... | @@ -351,7 +333,6 @@ pub const cpu = struct { |
| 351 | 333 | .memops, |
| 352 | 334 | .nvj, |
| 353 | 335 | .nvs, |
| 354 | .packets, | |
| 355 | 336 | .small_data, |
| 356 | 337 | .v5, |
| 357 | 338 | .v55, |
| ... | ... | @@ -371,7 +352,6 @@ pub const cpu = struct { |
| 371 | 352 | .memops, |
| 372 | 353 | .nvj, |
| 373 | 354 | .nvs, |
| 374 | .packets, | |
| 375 | 355 | .small_data, |
| 376 | 356 | .v5, |
| 377 | 357 | .v55, |
| ... | ... | @@ -391,7 +371,6 @@ pub const cpu = struct { |
| 391 | 371 | .mem_noshuf, |
| 392 | 372 | .memops, |
| 393 | 373 | .nvs, |
| 394 | .packets, | |
| 395 | 374 | .small_data, |
| 396 | 375 | .tinycore, |
| 397 | 376 | .v5, |
lib/std/target/mips.zig+2-11| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -108,7 +105,6 @@ pub const all_features = blk: { |
| 108 | 105 | .llvm_name = "dspr3", |
| 109 | 106 | .description = "Mips DSP-R3 ASE", |
| 110 | 107 | .dependencies = featureSet(&[_]Feature{ |
| 111 | .dsp, | |
| 112 | 108 | .dspr2, |
| 113 | 109 | }), |
| 114 | 110 | }; |
| ... | ... | @@ -301,10 +297,8 @@ pub const all_features = blk: { |
| 301 | 297 | .llvm_name = "mips64r6", |
| 302 | 298 | .description = "Mips64r6 ISA Support [experimental]", |
| 303 | 299 | .dependencies = featureSet(&[_]Feature{ |
| 304 | .abs2008, | |
| 305 | 300 | .mips32r6, |
| 306 | 301 | .mips64r5, |
| 307 | .nan2008, | |
| 308 | 302 | }), |
| 309 | 303 | }; |
| 310 | 304 | result[@enumToInt(Feature.msa)] = .{ |
| ... | ... | @@ -515,16 +509,13 @@ pub const cpu = struct { |
| 515 | 509 | .llvm_name = "octeon", |
| 516 | 510 | .features = featureSet(&[_]Feature{ |
| 517 | 511 | .cnmips, |
| 518 | .mips64r2, | |
| 519 | 512 | }), |
| 520 | 513 | }; |
| 521 | 514 | pub const @"octeon+" = CpuModel{ |
| 522 | 515 | .name = "octeon+", |
| 523 | 516 | .llvm_name = "octeon+", |
| 524 | 517 | .features = featureSet(&[_]Feature{ |
| 525 | .cnmips, | |
| 526 | 518 | .cnmipsp, |
| 527 | .mips64r2, | |
| 528 | 519 | }), |
| 529 | 520 | }; |
| 530 | 521 | pub const p5600 = CpuModel{ |
lib/std/target/msp430.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/nvptx.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/powerpc.zig+98-123| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -10,6 +7,7 @@ const CpuModel = std.Target.Cpu.Model; |
| 10 | 7 | pub const Feature = enum { |
| 11 | 8 | @"64bit", |
| 12 | 9 | @"64bitregs", |
| 10 | aix, | |
| 13 | 11 | allow_unaligned_fp_access, |
| 14 | 12 | altivec, |
| 15 | 13 | booke, |
| ... | ... | @@ -19,6 +17,7 @@ pub const Feature = enum { |
| 19 | 17 | crypto, |
| 20 | 18 | direct_move, |
| 21 | 19 | e500, |
| 20 | efpu2, | |
| 22 | 21 | extdiv, |
| 23 | 22 | fcpsgn, |
| 24 | 23 | float128, |
| ... | ... | @@ -32,6 +31,7 @@ pub const Feature = enum { |
| 32 | 31 | fsqrt, |
| 33 | 32 | fuse_addi_load, |
| 34 | 33 | fuse_addis_load, |
| 34 | fuse_store, | |
| 35 | 35 | fusion, |
| 36 | 36 | hard_float, |
| 37 | 37 | htm, |
| ... | ... | @@ -44,7 +44,10 @@ pub const Feature = enum { |
| 44 | 44 | lfiwax, |
| 45 | 45 | longcall, |
| 46 | 46 | mfocrf, |
| 47 | mma, | |
| 48 | modern_aix_as, | |
| 47 | 49 | msync, |
| 50 | paired_vector_memops, | |
| 48 | 51 | partword_atomics, |
| 49 | 52 | pcrelative_memops, |
| 50 | 53 | popcntd, |
| ... | ... | @@ -53,13 +56,12 @@ pub const Feature = enum { |
| 53 | 56 | power8_vector, |
| 54 | 57 | power9_altivec, |
| 55 | 58 | power9_vector, |
| 56 | ppc_postra_sched, | |
| 57 | ppc_prera_sched, | |
| 58 | 59 | ppc4xx, |
| 59 | 60 | ppc6xx, |
| 61 | ppc_postra_sched, | |
| 62 | ppc_prera_sched, | |
| 60 | 63 | predictable_select_expensive, |
| 61 | 64 | prefix_instrs, |
| 62 | qpx, | |
| 63 | 65 | recipprec, |
| 64 | 66 | secure_plt, |
| 65 | 67 | slow_popcntd, |
| ... | ... | @@ -86,6 +88,11 @@ pub const all_features = blk: { |
| 86 | 88 | .description = "Enable 64-bit registers usage for ppc32 [beta]", |
| 87 | 89 | .dependencies = featureSet(&[_]Feature{}), |
| 88 | 90 | }; |
| 91 | result[@enumToInt(Feature.aix)] = .{ | |
| 92 | .llvm_name = "aix", | |
| 93 | .description = "AIX OS", | |
| 94 | .dependencies = featureSet(&[_]Feature{}), | |
| 95 | }; | |
| 89 | 96 | result[@enumToInt(Feature.allow_unaligned_fp_access)] = .{ |
| 90 | 97 | .llvm_name = "allow-unaligned-fp-access", |
| 91 | 98 | .description = "CPU does not trap on unaligned FP access", |
| ... | ... | @@ -139,6 +146,13 @@ pub const all_features = blk: { |
| 139 | 146 | .description = "Enable E500/E500mc instructions", |
| 140 | 147 | .dependencies = featureSet(&[_]Feature{}), |
| 141 | 148 | }; |
| 149 | result[@enumToInt(Feature.efpu2)] = .{ | |
| 150 | .llvm_name = "efpu2", | |
| 151 | .description = "Enable Embedded Floating-Point APU 2 instructions", | |
| 152 | .dependencies = featureSet(&[_]Feature{ | |
| 153 | .spe, | |
| 154 | }), | |
| 155 | }; | |
| 142 | 156 | result[@enumToInt(Feature.extdiv)] = .{ |
| 143 | 157 | .llvm_name = "extdiv", |
| 144 | 158 | .description = "Enable extended divide instructions", |
| ... | ... | @@ -228,6 +242,13 @@ pub const all_features = blk: { |
| 228 | 242 | .fusion, |
| 229 | 243 | }), |
| 230 | 244 | }; |
| 245 | result[@enumToInt(Feature.fuse_store)] = .{ | |
| 246 | .llvm_name = "fuse-store", | |
| 247 | .description = "Target supports store clustering", | |
| 248 | .dependencies = featureSet(&[_]Feature{ | |
| 249 | .fusion, | |
| 250 | }), | |
| 251 | }; | |
| 231 | 252 | result[@enumToInt(Feature.fusion)] = .{ |
| 232 | 253 | .llvm_name = "fusion", |
| 233 | 254 | .description = "Target supports instruction fusion", |
| ... | ... | @@ -292,6 +313,20 @@ pub const all_features = blk: { |
| 292 | 313 | .description = "Enable the MFOCRF instruction", |
| 293 | 314 | .dependencies = featureSet(&[_]Feature{}), |
| 294 | 315 | }; |
| 316 | result[@enumToInt(Feature.mma)] = .{ | |
| 317 | .llvm_name = "mma", | |
| 318 | .description = "Enable MMA instructions", | |
| 319 | .dependencies = featureSet(&[_]Feature{ | |
| 320 | .paired_vector_memops, | |
| 321 | .power8_vector, | |
| 322 | .power9_altivec, | |
| 323 | }), | |
| 324 | }; | |
| 325 | result[@enumToInt(Feature.modern_aix_as)] = .{ | |
| 326 | .llvm_name = "modern-aix-as", | |
| 327 | .description = "AIX system assembler is modern enough to support new mnes", | |
| 328 | .dependencies = featureSet(&[_]Feature{}), | |
| 329 | }; | |
| 295 | 330 | result[@enumToInt(Feature.msync)] = .{ |
| 296 | 331 | .llvm_name = "msync", |
| 297 | 332 | .description = "Has only the msync instruction instead of sync", |
| ... | ... | @@ -299,6 +334,13 @@ pub const all_features = blk: { |
| 299 | 334 | .booke, |
| 300 | 335 | }), |
| 301 | 336 | }; |
| 337 | result[@enumToInt(Feature.paired_vector_memops)] = .{ | |
| 338 | .llvm_name = "paired-vector-memops", | |
| 339 | .description = "32Byte load and store instructions", | |
| 340 | .dependencies = featureSet(&[_]Feature{ | |
| 341 | .isa_v30_instructions, | |
| 342 | }), | |
| 343 | }; | |
| 302 | 344 | result[@enumToInt(Feature.partword_atomics)] = .{ |
| 303 | 345 | .llvm_name = "partword-atomics", |
| 304 | 346 | .description = "Enable l[bh]arx and st[bh]cx.", |
| ... | ... | @@ -308,7 +350,7 @@ pub const all_features = blk: { |
| 308 | 350 | .llvm_name = "pcrelative-memops", |
| 309 | 351 | .description = "Enable PC relative Memory Ops", |
| 310 | 352 | .dependencies = featureSet(&[_]Feature{ |
| 311 | .isa_v30_instructions, | |
| 353 | .prefix_instrs, | |
| 312 | 354 | }), |
| 313 | 355 | }; |
| 314 | 356 | result[@enumToInt(Feature.popcntd)] = .{ |
| ... | ... | @@ -351,21 +393,10 @@ pub const all_features = blk: { |
| 351 | 393 | .llvm_name = "power9-vector", |
| 352 | 394 | .description = "Enable POWER9 vector instructions", |
| 353 | 395 | .dependencies = featureSet(&[_]Feature{ |
| 354 | .isa_v30_instructions, | |
| 355 | 396 | .power8_vector, |
| 356 | 397 | .power9_altivec, |
| 357 | 398 | }), |
| 358 | 399 | }; |
| 359 | result[@enumToInt(Feature.ppc_postra_sched)] = .{ | |
| 360 | .llvm_name = "ppc-postra-sched", | |
| 361 | .description = "Use PowerPC post-RA scheduling strategy", | |
| 362 | .dependencies = featureSet(&[_]Feature{}), | |
| 363 | }; | |
| 364 | result[@enumToInt(Feature.ppc_prera_sched)] = .{ | |
| 365 | .llvm_name = "ppc-prera-sched", | |
| 366 | .description = "Use PowerPC pre-RA scheduling strategy", | |
| 367 | .dependencies = featureSet(&[_]Feature{}), | |
| 368 | }; | |
| 369 | 400 | result[@enumToInt(Feature.ppc4xx)] = .{ |
| 370 | 401 | .llvm_name = "ppc4xx", |
| 371 | 402 | .description = "Enable PPC 4xx instructions", |
| ... | ... | @@ -376,6 +407,16 @@ pub const all_features = blk: { |
| 376 | 407 | .description = "Enable PPC 6xx instructions", |
| 377 | 408 | .dependencies = featureSet(&[_]Feature{}), |
| 378 | 409 | }; |
| 410 | result[@enumToInt(Feature.ppc_postra_sched)] = .{ | |
| 411 | .llvm_name = "ppc-postra-sched", | |
| 412 | .description = "Use PowerPC post-RA scheduling strategy", | |
| 413 | .dependencies = featureSet(&[_]Feature{}), | |
| 414 | }; | |
| 415 | result[@enumToInt(Feature.ppc_prera_sched)] = .{ | |
| 416 | .llvm_name = "ppc-prera-sched", | |
| 417 | .description = "Use PowerPC pre-RA scheduling strategy", | |
| 418 | .dependencies = featureSet(&[_]Feature{}), | |
| 419 | }; | |
| 379 | 420 | result[@enumToInt(Feature.predictable_select_expensive)] = .{ |
| 380 | 421 | .llvm_name = "predictable-select-expensive", |
| 381 | 422 | .description = "Prefer likely predicted branches over selects", |
| ... | ... | @@ -385,18 +426,10 @@ pub const all_features = blk: { |
| 385 | 426 | .llvm_name = "prefix-instrs", |
| 386 | 427 | .description = "Enable prefixed instructions", |
| 387 | 428 | .dependencies = featureSet(&[_]Feature{ |
| 388 | .isa_v30_instructions, | |
| 389 | 429 | .power8_vector, |
| 390 | 430 | .power9_altivec, |
| 391 | 431 | }), |
| 392 | 432 | }; |
| 393 | result[@enumToInt(Feature.qpx)] = .{ | |
| 394 | .llvm_name = "qpx", | |
| 395 | .description = "Enable QPX instructions", | |
| 396 | .dependencies = featureSet(&[_]Feature{ | |
| 397 | .fpu, | |
| 398 | }), | |
| 399 | }; | |
| 400 | 433 | result[@enumToInt(Feature.recipprec)] = .{ |
| 401 | 434 | .llvm_name = "recipprec", |
| 402 | 435 | .description = "Assume higher precision reciprocal estimates", |
| ... | ... | @@ -452,94 +485,90 @@ pub const all_features = blk: { |
| 452 | 485 | }; |
| 453 | 486 | |
| 454 | 487 | pub const cpu = struct { |
| 455 | pub const @"ppc440" = CpuModel{ | |
| 456 | .name = "ppc440", | |
| 488 | pub const @"440" = CpuModel{ | |
| 489 | .name = "440", | |
| 457 | 490 | .llvm_name = "440", |
| 458 | 491 | .features = featureSet(&[_]Feature{ |
| 459 | .booke, | |
| 460 | 492 | .fres, |
| 461 | 493 | .frsqrte, |
| 462 | .icbt, | |
| 463 | 494 | .isel, |
| 464 | 495 | .msync, |
| 465 | 496 | }), |
| 466 | 497 | }; |
| 467 | pub const @"ppc450" = CpuModel{ | |
| 468 | .name = "ppc450", | |
| 498 | pub const @"450" = CpuModel{ | |
| 499 | .name = "450", | |
| 469 | 500 | .llvm_name = "450", |
| 470 | 501 | .features = featureSet(&[_]Feature{ |
| 471 | .booke, | |
| 472 | 502 | .fres, |
| 473 | 503 | .frsqrte, |
| 474 | .icbt, | |
| 475 | 504 | .isel, |
| 476 | 505 | .msync, |
| 477 | 506 | }), |
| 478 | 507 | }; |
| 479 | pub const @"ppc601" = CpuModel{ | |
| 480 | .name = "ppc601", | |
| 508 | pub const @"601" = CpuModel{ | |
| 509 | .name = "601", | |
| 481 | 510 | .llvm_name = "601", |
| 482 | 511 | .features = featureSet(&[_]Feature{ |
| 483 | 512 | .fpu, |
| 484 | 513 | }), |
| 485 | 514 | }; |
| 486 | pub const @"ppc602" = CpuModel{ | |
| 487 | .name = "ppc602", | |
| 515 | pub const @"602" = CpuModel{ | |
| 516 | .name = "602", | |
| 488 | 517 | .llvm_name = "602", |
| 489 | 518 | .features = featureSet(&[_]Feature{ |
| 490 | 519 | .fpu, |
| 491 | 520 | }), |
| 492 | 521 | }; |
| 493 | pub const @"ppc603" = CpuModel{ | |
| 494 | .name = "ppc603", | |
| 522 | pub const @"603" = CpuModel{ | |
| 523 | .name = "603", | |
| 495 | 524 | .llvm_name = "603", |
| 496 | 525 | .features = featureSet(&[_]Feature{ |
| 497 | 526 | .fres, |
| 498 | 527 | .frsqrte, |
| 499 | 528 | }), |
| 500 | 529 | }; |
| 501 | pub const @"ppc603e" = CpuModel{ | |
| 502 | .name = "ppc603e", | |
| 530 | pub const @"603e" = CpuModel{ | |
| 531 | .name = "603e", | |
| 503 | 532 | .llvm_name = "603e", |
| 504 | 533 | .features = featureSet(&[_]Feature{ |
| 505 | 534 | .fres, |
| 506 | 535 | .frsqrte, |
| 507 | 536 | }), |
| 508 | 537 | }; |
| 509 | pub const @"ppc603ev" = CpuModel{ | |
| 510 | .name = "ppc603ev", | |
| 538 | pub const @"603ev" = CpuModel{ | |
| 539 | .name = "603ev", | |
| 511 | 540 | .llvm_name = "603ev", |
| 512 | 541 | .features = featureSet(&[_]Feature{ |
| 513 | 542 | .fres, |
| 514 | 543 | .frsqrte, |
| 515 | 544 | }), |
| 516 | 545 | }; |
| 517 | pub const @"ppc604" = CpuModel{ | |
| 518 | .name = "ppc604", | |
| 546 | pub const @"604" = CpuModel{ | |
| 547 | .name = "604", | |
| 519 | 548 | .llvm_name = "604", |
| 520 | 549 | .features = featureSet(&[_]Feature{ |
| 521 | 550 | .fres, |
| 522 | 551 | .frsqrte, |
| 523 | 552 | }), |
| 524 | 553 | }; |
| 525 | pub const @"ppc604e" = CpuModel{ | |
| 526 | .name = "ppc604e", | |
| 554 | pub const @"604e" = CpuModel{ | |
| 555 | .name = "604e", | |
| 527 | 556 | .llvm_name = "604e", |
| 528 | 557 | .features = featureSet(&[_]Feature{ |
| 529 | 558 | .fres, |
| 530 | 559 | .frsqrte, |
| 531 | 560 | }), |
| 532 | 561 | }; |
| 533 | pub const @"ppc620" = CpuModel{ | |
| 534 | .name = "ppc620", | |
| 562 | pub const @"620" = CpuModel{ | |
| 563 | .name = "620", | |
| 535 | 564 | .llvm_name = "620", |
| 536 | 565 | .features = featureSet(&[_]Feature{ |
| 537 | 566 | .fres, |
| 538 | 567 | .frsqrte, |
| 539 | 568 | }), |
| 540 | 569 | }; |
| 541 | pub const @"ppc7400" = CpuModel{ | |
| 542 | .name = "ppc7400", | |
| 570 | pub const @"7400" = CpuModel{ | |
| 571 | .name = "7400", | |
| 543 | 572 | .llvm_name = "7400", |
| 544 | 573 | .features = featureSet(&[_]Feature{ |
| 545 | 574 | .altivec, |
| ... | ... | @@ -547,8 +576,8 @@ pub const cpu = struct { |
| 547 | 576 | .frsqrte, |
| 548 | 577 | }), |
| 549 | 578 | }; |
| 550 | pub const @"ppc7450" = CpuModel{ | |
| 551 | .name = "ppc7450", | |
| 579 | pub const @"7450" = CpuModel{ | |
| 580 | .name = "7450", | |
| 552 | 581 | .llvm_name = "7450", |
| 553 | 582 | .features = featureSet(&[_]Feature{ |
| 554 | 583 | .altivec, |
| ... | ... | @@ -556,16 +585,16 @@ pub const cpu = struct { |
| 556 | 585 | .frsqrte, |
| 557 | 586 | }), |
| 558 | 587 | }; |
| 559 | pub const @"ppc750" = CpuModel{ | |
| 560 | .name = "ppc750", | |
| 588 | pub const @"750" = CpuModel{ | |
| 589 | .name = "750", | |
| 561 | 590 | .llvm_name = "750", |
| 562 | 591 | .features = featureSet(&[_]Feature{ |
| 563 | 592 | .fres, |
| 564 | 593 | .frsqrte, |
| 565 | 594 | }), |
| 566 | 595 | }; |
| 567 | pub const @"ppc970" = CpuModel{ | |
| 568 | .name = "ppc970", | |
| 596 | pub const @"970" = CpuModel{ | |
| 597 | .name = "970", | |
| 569 | 598 | .llvm_name = "970", |
| 570 | 599 | .features = featureSet(&[_]Feature{ |
| 571 | 600 | .@"64bit", |
| ... | ... | @@ -592,7 +621,6 @@ pub const cpu = struct { |
| 592 | 621 | .frsqrte, |
| 593 | 622 | .frsqrtes, |
| 594 | 623 | .fsqrt, |
| 595 | .icbt, | |
| 596 | 624 | .isel, |
| 597 | 625 | .ldbrx, |
| 598 | 626 | .lfiwax, |
| ... | ... | @@ -602,38 +630,10 @@ pub const cpu = struct { |
| 602 | 630 | .stfiwx, |
| 603 | 631 | }), |
| 604 | 632 | }; |
| 605 | pub const a2q = CpuModel{ | |
| 606 | .name = "a2q", | |
| 607 | .llvm_name = "a2q", | |
| 608 | .features = featureSet(&[_]Feature{ | |
| 609 | .@"64bit", | |
| 610 | .booke, | |
| 611 | .cmpb, | |
| 612 | .fcpsgn, | |
| 613 | .fpcvt, | |
| 614 | .fprnd, | |
| 615 | .fre, | |
| 616 | .fres, | |
| 617 | .frsqrte, | |
| 618 | .frsqrtes, | |
| 619 | .fsqrt, | |
| 620 | .icbt, | |
| 621 | .isel, | |
| 622 | .ldbrx, | |
| 623 | .lfiwax, | |
| 624 | .mfocrf, | |
| 625 | .qpx, | |
| 626 | .recipprec, | |
| 627 | .slow_popcntd, | |
| 628 | .stfiwx, | |
| 629 | }), | |
| 630 | }; | |
| 631 | 633 | pub const e500 = CpuModel{ |
| 632 | 634 | .name = "e500", |
| 633 | 635 | .llvm_name = "e500", |
| 634 | 636 | .features = featureSet(&[_]Feature{ |
| 635 | .booke, | |
| 636 | .icbt, | |
| 637 | 637 | .isel, |
| 638 | 638 | .msync, |
| 639 | 639 | .spe, |
| ... | ... | @@ -644,7 +644,6 @@ pub const cpu = struct { |
| 644 | 644 | .llvm_name = "e500mc", |
| 645 | 645 | .features = featureSet(&[_]Feature{ |
| 646 | 646 | .booke, |
| 647 | .icbt, | |
| 648 | 647 | .isel, |
| 649 | 648 | .stfiwx, |
| 650 | 649 | }), |
| ... | ... | @@ -655,7 +654,6 @@ pub const cpu = struct { |
| 655 | 654 | .features = featureSet(&[_]Feature{ |
| 656 | 655 | .@"64bit", |
| 657 | 656 | .booke, |
| 658 | .icbt, | |
| 659 | 657 | .isel, |
| 660 | 658 | .mfocrf, |
| 661 | 659 | .stfiwx, |
| ... | ... | @@ -667,7 +665,6 @@ pub const cpu = struct { |
| 667 | 665 | .features = featureSet(&[_]Feature{ |
| 668 | 666 | .@"64bit", |
| 669 | 667 | .allow_unaligned_fp_access, |
| 670 | .altivec, | |
| 671 | 668 | .bpermd, |
| 672 | 669 | .cmpb, |
| 673 | 670 | .crypto, |
| ... | ... | @@ -681,28 +678,24 @@ pub const cpu = struct { |
| 681 | 678 | .frsqrte, |
| 682 | 679 | .frsqrtes, |
| 683 | 680 | .fsqrt, |
| 681 | .fuse_store, | |
| 684 | 682 | .htm, |
| 685 | 683 | .icbt, |
| 686 | .isa_v30_instructions, | |
| 687 | .isa_v31_instructions, | |
| 688 | 684 | .isel, |
| 689 | 685 | .ldbrx, |
| 690 | 686 | .lfiwax, |
| 691 | 687 | .mfocrf, |
| 688 | .mma, | |
| 692 | 689 | .partword_atomics, |
| 693 | 690 | .pcrelative_memops, |
| 694 | 691 | .popcntd, |
| 695 | 692 | .power10_vector, |
| 696 | .power8_altivec, | |
| 697 | .power8_vector, | |
| 698 | .power9_altivec, | |
| 699 | .power9_vector, | |
| 693 | .ppc_postra_sched, | |
| 694 | .ppc_prera_sched, | |
| 700 | 695 | .predictable_select_expensive, |
| 701 | .prefix_instrs, | |
| 702 | 696 | .recipprec, |
| 703 | 697 | .stfiwx, |
| 704 | 698 | .two_const_nr, |
| 705 | .vsx, | |
| 706 | 699 | }), |
| 707 | 700 | }; |
| 708 | 701 | pub const g3 = CpuModel{ |
| ... | ... | @@ -760,7 +753,7 @@ pub const cpu = struct { |
| 760 | 753 | }; |
| 761 | 754 | pub const ppc32 = CpuModel{ |
| 762 | 755 | .name = "ppc32", |
| 763 | .llvm_name = "ppc", | |
| 756 | .llvm_name = "ppc32", | |
| 764 | 757 | .features = featureSet(&[_]Feature{ |
| 765 | 758 | .hard_float, |
| 766 | 759 | }), |
| ... | ... | @@ -784,7 +777,6 @@ pub const cpu = struct { |
| 784 | 777 | .features = featureSet(&[_]Feature{ |
| 785 | 778 | .@"64bit", |
| 786 | 779 | .allow_unaligned_fp_access, |
| 787 | .altivec, | |
| 788 | 780 | .bpermd, |
| 789 | 781 | .cmpb, |
| 790 | 782 | .crypto, |
| ... | ... | @@ -808,13 +800,11 @@ pub const cpu = struct { |
| 808 | 800 | .mfocrf, |
| 809 | 801 | .partword_atomics, |
| 810 | 802 | .popcntd, |
| 811 | .power8_altivec, | |
| 812 | 803 | .power8_vector, |
| 813 | 804 | .predictable_select_expensive, |
| 814 | 805 | .recipprec, |
| 815 | 806 | .stfiwx, |
| 816 | 807 | .two_const_nr, |
| 817 | .vsx, | |
| 818 | 808 | }), |
| 819 | 809 | }; |
| 820 | 810 | pub const pwr10 = CpuModel{ |
| ... | ... | @@ -823,7 +813,6 @@ pub const cpu = struct { |
| 823 | 813 | .features = featureSet(&[_]Feature{ |
| 824 | 814 | .@"64bit", |
| 825 | 815 | .allow_unaligned_fp_access, |
| 826 | .altivec, | |
| 827 | 816 | .bpermd, |
| 828 | 817 | .cmpb, |
| 829 | 818 | .crypto, |
| ... | ... | @@ -837,28 +826,24 @@ pub const cpu = struct { |
| 837 | 826 | .frsqrte, |
| 838 | 827 | .frsqrtes, |
| 839 | 828 | .fsqrt, |
| 829 | .fuse_store, | |
| 840 | 830 | .htm, |
| 841 | 831 | .icbt, |
| 842 | .isa_v30_instructions, | |
| 843 | .isa_v31_instructions, | |
| 844 | 832 | .isel, |
| 845 | 833 | .ldbrx, |
| 846 | 834 | .lfiwax, |
| 847 | 835 | .mfocrf, |
| 836 | .mma, | |
| 848 | 837 | .partword_atomics, |
| 849 | 838 | .pcrelative_memops, |
| 850 | 839 | .popcntd, |
| 851 | 840 | .power10_vector, |
| 852 | .power8_altivec, | |
| 853 | .power8_vector, | |
| 854 | .power9_altivec, | |
| 855 | .power9_vector, | |
| 841 | .ppc_postra_sched, | |
| 842 | .ppc_prera_sched, | |
| 856 | 843 | .predictable_select_expensive, |
| 857 | .prefix_instrs, | |
| 858 | 844 | .recipprec, |
| 859 | 845 | .stfiwx, |
| 860 | 846 | .two_const_nr, |
| 861 | .vsx, | |
| 862 | 847 | }), |
| 863 | 848 | }; |
| 864 | 849 | pub const pwr3 = CpuModel{ |
| ... | ... | @@ -963,7 +948,6 @@ pub const cpu = struct { |
| 963 | 948 | .features = featureSet(&[_]Feature{ |
| 964 | 949 | .@"64bit", |
| 965 | 950 | .allow_unaligned_fp_access, |
| 966 | .altivec, | |
| 967 | 951 | .bpermd, |
| 968 | 952 | .cmpb, |
| 969 | 953 | .extdiv, |
| ... | ... | @@ -992,7 +976,6 @@ pub const cpu = struct { |
| 992 | 976 | .features = featureSet(&[_]Feature{ |
| 993 | 977 | .@"64bit", |
| 994 | 978 | .allow_unaligned_fp_access, |
| 995 | .altivec, | |
| 996 | 979 | .bpermd, |
| 997 | 980 | .cmpb, |
| 998 | 981 | .crypto, |
| ... | ... | @@ -1016,13 +999,11 @@ pub const cpu = struct { |
| 1016 | 999 | .mfocrf, |
| 1017 | 1000 | .partword_atomics, |
| 1018 | 1001 | .popcntd, |
| 1019 | .power8_altivec, | |
| 1020 | 1002 | .power8_vector, |
| 1021 | 1003 | .predictable_select_expensive, |
| 1022 | 1004 | .recipprec, |
| 1023 | 1005 | .stfiwx, |
| 1024 | 1006 | .two_const_nr, |
| 1025 | .vsx, | |
| 1026 | 1007 | }), |
| 1027 | 1008 | }; |
| 1028 | 1009 | pub const pwr9 = CpuModel{ |
| ... | ... | @@ -1031,7 +1012,6 @@ pub const cpu = struct { |
| 1031 | 1012 | .features = featureSet(&[_]Feature{ |
| 1032 | 1013 | .@"64bit", |
| 1033 | 1014 | .allow_unaligned_fp_access, |
| 1034 | .altivec, | |
| 1035 | 1015 | .bpermd, |
| 1036 | 1016 | .cmpb, |
| 1037 | 1017 | .crypto, |
| ... | ... | @@ -1047,16 +1027,12 @@ pub const cpu = struct { |
| 1047 | 1027 | .fsqrt, |
| 1048 | 1028 | .htm, |
| 1049 | 1029 | .icbt, |
| 1050 | .isa_v30_instructions, | |
| 1051 | 1030 | .isel, |
| 1052 | 1031 | .ldbrx, |
| 1053 | 1032 | .lfiwax, |
| 1054 | 1033 | .mfocrf, |
| 1055 | 1034 | .partword_atomics, |
| 1056 | 1035 | .popcntd, |
| 1057 | .power8_altivec, | |
| 1058 | .power8_vector, | |
| 1059 | .power9_altivec, | |
| 1060 | 1036 | .power9_vector, |
| 1061 | 1037 | .ppc_postra_sched, |
| 1062 | 1038 | .ppc_prera_sched, |
| ... | ... | @@ -1065,7 +1041,6 @@ pub const cpu = struct { |
| 1065 | 1041 | .stfiwx, |
| 1066 | 1042 | .two_const_nr, |
| 1067 | 1043 | .vectors_use_two_units, |
| 1068 | .vsx, | |
| 1069 | 1044 | }), |
| 1070 | 1045 | }; |
| 1071 | 1046 | }; |
lib/std/target/riscv.zig+67-11| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -15,6 +12,7 @@ pub const Feature = enum { |
| 15 | 12 | e, |
| 16 | 13 | experimental_b, |
| 17 | 14 | experimental_v, |
| 15 | experimental_zba, | |
| 18 | 16 | experimental_zbb, |
| 19 | 17 | experimental_zbc, |
| 20 | 18 | experimental_zbe, |
| ... | ... | @@ -25,6 +23,9 @@ pub const Feature = enum { |
| 25 | 23 | experimental_zbr, |
| 26 | 24 | experimental_zbs, |
| 27 | 25 | experimental_zbt, |
| 26 | experimental_zfh, | |
| 27 | experimental_zvamo, | |
| 28 | experimental_zvlsseg, | |
| 28 | 29 | f, |
| 29 | 30 | m, |
| 30 | 31 | no_rvc_hints, |
| ... | ... | @@ -100,6 +101,7 @@ pub const all_features = blk: { |
| 100 | 101 | .llvm_name = "experimental-b", |
| 101 | 102 | .description = "'B' (Bit Manipulation Instructions)", |
| 102 | 103 | .dependencies = featureSet(&[_]Feature{ |
| 104 | .experimental_zba, | |
| 103 | 105 | .experimental_zbb, |
| 104 | 106 | .experimental_zbc, |
| 105 | 107 | .experimental_zbe, |
| ... | ... | @@ -114,9 +116,12 @@ pub const all_features = blk: { |
| 114 | 116 | result[@enumToInt(Feature.experimental_v)] = .{ |
| 115 | 117 | .llvm_name = "experimental-v", |
| 116 | 118 | .description = "'V' (Vector Instructions)", |
| 117 | .dependencies = featureSet(&[_]Feature{ | |
| 118 | .f, | |
| 119 | }), | |
| 119 | .dependencies = featureSet(&[_]Feature{}), | |
| 120 | }; | |
| 121 | result[@enumToInt(Feature.experimental_zba)] = .{ | |
| 122 | .llvm_name = "experimental-zba", | |
| 123 | .description = "'Zba' (Address calculation 'B' Instructions)", | |
| 124 | .dependencies = featureSet(&[_]Feature{}), | |
| 120 | 125 | }; |
| 121 | 126 | result[@enumToInt(Feature.experimental_zbb)] = .{ |
| 122 | 127 | .llvm_name = "experimental-zbb", |
| ... | ... | @@ -168,6 +173,27 @@ pub const all_features = blk: { |
| 168 | 173 | .description = "'Zbt' (Ternary 'B' Instructions)", |
| 169 | 174 | .dependencies = featureSet(&[_]Feature{}), |
| 170 | 175 | }; |
| 176 | result[@enumToInt(Feature.experimental_zfh)] = .{ | |
| 177 | .llvm_name = "experimental-zfh", | |
| 178 | .description = "'Zfh' (Half-Precision Floating-Point)", | |
| 179 | .dependencies = featureSet(&[_]Feature{ | |
| 180 | .f, | |
| 181 | }), | |
| 182 | }; | |
| 183 | result[@enumToInt(Feature.experimental_zvamo)] = .{ | |
| 184 | .llvm_name = "experimental-zvamo", | |
| 185 | .description = "'Zvamo'(Vector AMO Operations)", | |
| 186 | .dependencies = featureSet(&[_]Feature{ | |
| 187 | .experimental_v, | |
| 188 | }), | |
| 189 | }; | |
| 190 | result[@enumToInt(Feature.experimental_zvlsseg)] = .{ | |
| 191 | .llvm_name = "experimental-zvlsseg", | |
| 192 | .description = "'Zvlsseg' (Vector segment load/store instructions)", | |
| 193 | .dependencies = featureSet(&[_]Feature{ | |
| 194 | .experimental_v, | |
| 195 | }), | |
| 196 | }; | |
| 171 | 197 | result[@enumToInt(Feature.f)] = .{ |
| 172 | 198 | .llvm_name = "f", |
| 173 | 199 | .description = "'F' (Single-Precision Floating-Point)", |
| ... | ... | @@ -364,7 +390,6 @@ pub const cpu = struct { |
| 364 | 390 | .a, |
| 365 | 391 | .c, |
| 366 | 392 | .d, |
| 367 | .f, | |
| 368 | 393 | .m, |
| 369 | 394 | }), |
| 370 | 395 | }; |
| ... | ... | @@ -376,7 +401,6 @@ pub const cpu = struct { |
| 376 | 401 | .a, |
| 377 | 402 | .c, |
| 378 | 403 | .d, |
| 379 | .f, | |
| 380 | 404 | .m, |
| 381 | 405 | }), |
| 382 | 406 | }; |
| ... | ... | @@ -404,6 +428,18 @@ pub const cpu = struct { |
| 404 | 428 | .@"64bit", |
| 405 | 429 | }), |
| 406 | 430 | }; |
| 431 | pub const sifive_7_rv32 = CpuModel{ | |
| 432 | .name = "sifive_7_rv32", | |
| 433 | .llvm_name = "sifive-7-rv32", | |
| 434 | .features = featureSet(&[_]Feature{}), | |
| 435 | }; | |
| 436 | pub const sifive_7_rv64 = CpuModel{ | |
| 437 | .name = "sifive_7_rv64", | |
| 438 | .llvm_name = "sifive-7-rv64", | |
| 439 | .features = featureSet(&[_]Feature{ | |
| 440 | .@"64bit", | |
| 441 | }), | |
| 442 | }; | |
| 407 | 443 | pub const sifive_e31 = CpuModel{ |
| 408 | 444 | .name = "sifive_e31", |
| 409 | 445 | .llvm_name = "sifive-e31", |
| ... | ... | @@ -413,6 +449,16 @@ pub const cpu = struct { |
| 413 | 449 | .m, |
| 414 | 450 | }), |
| 415 | 451 | }; |
| 452 | pub const sifive_e76 = CpuModel{ | |
| 453 | .name = "sifive_e76", | |
| 454 | .llvm_name = "sifive-e76", | |
| 455 | .features = featureSet(&[_]Feature{ | |
| 456 | .a, | |
| 457 | .c, | |
| 458 | .f, | |
| 459 | .m, | |
| 460 | }), | |
| 461 | }; | |
| 416 | 462 | pub const sifive_u54 = CpuModel{ |
| 417 | 463 | .name = "sifive_u54", |
| 418 | 464 | .llvm_name = "sifive-u54", |
| ... | ... | @@ -421,7 +467,17 @@ pub const cpu = struct { |
| 421 | 467 | .a, |
| 422 | 468 | .c, |
| 423 | 469 | .d, |
| 424 | .f, | |
| 470 | .m, | |
| 471 | }), | |
| 472 | }; | |
| 473 | pub const sifive_u74 = CpuModel{ | |
| 474 | .name = "sifive_u74", | |
| 475 | .llvm_name = "sifive-u74", | |
| 476 | .features = featureSet(&[_]Feature{ | |
| 477 | .@"64bit", | |
| 478 | .a, | |
| 479 | .c, | |
| 480 | .d, | |
| 425 | 481 | .m, |
| 426 | 482 | }), |
| 427 | 483 | }; |
lib/std/target/sparc.zig+7-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -160,6 +157,11 @@ pub const cpu = struct { |
| 160 | 157 | .llvm_name = "f934", |
| 161 | 158 | .features = featureSet(&[_]Feature{}), |
| 162 | 159 | }; |
| 160 | pub const generic = CpuModel{ | |
| 161 | .name = "generic", | |
| 162 | .llvm_name = "generic", | |
| 163 | .features = featureSet(&[_]Feature{}), | |
| 164 | }; | |
| 163 | 165 | pub const gr712rc = CpuModel{ |
| 164 | 166 | .name = "gr712rc", |
| 165 | 167 | .llvm_name = "gr712rc", |
lib/std/target/systemz.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/ve.zig created+36| ... | ... | @@ -0,0 +1,36 @@ |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 3 | const std = @import("../std.zig"); | |
| 4 | const CpuFeature = std.Target.Cpu.Feature; | |
| 5 | const CpuModel = std.Target.Cpu.Model; | |
| 6 | ||
| 7 | pub const Feature = enum { | |
| 8 | vpu, | |
| 9 | }; | |
| 10 | ||
| 11 | pub usingnamespace CpuFeature.feature_set_fns(Feature); | |
| 12 | ||
| 13 | pub const all_features = blk: { | |
| 14 | const len = @typeInfo(Feature).Enum.fields.len; | |
| 15 | std.debug.assert(len <= CpuFeature.Set.needed_bit_count); | |
| 16 | var result: [len]CpuFeature = undefined; | |
| 17 | result[@enumToInt(Feature.vpu)] = .{ | |
| 18 | .llvm_name = "vpu", | |
| 19 | .description = "Enable the VPU", | |
| 20 | .dependencies = featureSet(&[_]Feature{}), | |
| 21 | }; | |
| 22 | const ti = @typeInfo(Feature); | |
| 23 | for (result) |*elem, i| { | |
| 24 | elem.index = i; | |
| 25 | elem.name = ti.Enum.fields[i].name; | |
| 26 | } | |
| 27 | break :blk result; | |
| 28 | }; | |
| 29 | ||
| 30 | pub const cpu = struct { | |
| 31 | pub const generic = CpuModel{ | |
| 32 | .name = "generic", | |
| 33 | .llvm_name = "generic", | |
| 34 | .features = featureSet(&[_]Feature{}), | |
| 35 | }; | |
| 36 | }; |
lib/std/target/wasm.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/x86.zig+470-320| ... | ... | @@ -1,13 +1,12 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| 9 | 6 | |
| 10 | 7 | pub const Feature = enum { |
| 8 | @"16bit_mode", | |
| 9 | @"32bit_mode", | |
| 11 | 10 | @"3dnow", |
| 12 | 11 | @"3dnowa", |
| 13 | 12 | @"64bit", |
| ... | ... | @@ -33,6 +32,7 @@ pub const Feature = enum { |
| 33 | 32 | avx512vnni, |
| 34 | 33 | avx512vp2intersect, |
| 35 | 34 | avx512vpopcntdq, |
| 35 | avxvnni, | |
| 36 | 36 | bmi, |
| 37 | 37 | bmi2, |
| 38 | 38 | branchfusion, |
| ... | ... | @@ -64,11 +64,14 @@ pub const Feature = enum { |
| 64 | 64 | fma, |
| 65 | 65 | fma4, |
| 66 | 66 | fsgsbase, |
| 67 | fsrm, | |
| 67 | 68 | fxsr, |
| 68 | 69 | gfni, |
| 70 | hreset, | |
| 69 | 71 | idivl_to_divb, |
| 70 | 72 | idivq_to_divl, |
| 71 | 73 | invpcid, |
| 74 | kl, | |
| 72 | 75 | lea_sp, |
| 73 | 76 | lea_uses_ag, |
| 74 | 77 | lvi_cfi, |
| ... | ... | @@ -76,12 +79,10 @@ pub const Feature = enum { |
| 76 | 79 | lwp, |
| 77 | 80 | lzcnt, |
| 78 | 81 | macrofusion, |
| 79 | merge_to_threeway_branch, | |
| 80 | 82 | mmx, |
| 81 | 83 | movbe, |
| 82 | 84 | movdir64b, |
| 83 | 85 | movdiri, |
| 84 | mpx, | |
| 85 | 86 | mwaitx, |
| 86 | 87 | nopl, |
| 87 | 88 | pad_short_functions, |
| ... | ... | @@ -120,15 +121,16 @@ pub const Feature = enum { |
| 120 | 121 | slow_unaligned_mem_32, |
| 121 | 122 | soft_float, |
| 122 | 123 | sse, |
| 123 | sse_unaligned_mem, | |
| 124 | 124 | sse2, |
| 125 | 125 | sse3, |
| 126 | 126 | sse4_1, |
| 127 | 127 | sse4_2, |
| 128 | 128 | sse4a, |
| 129 | sse_unaligned_mem, | |
| 129 | 130 | ssse3, |
| 130 | 131 | tbm, |
| 131 | 132 | tsxldtrk, |
| 133 | uintr, | |
| 132 | 134 | use_aa, |
| 133 | 135 | use_glm_div_sqrt_costs, |
| 134 | 136 | vaes, |
| ... | ... | @@ -136,6 +138,7 @@ pub const Feature = enum { |
| 136 | 138 | vzeroupper, |
| 137 | 139 | waitpkg, |
| 138 | 140 | wbnoinvd, |
| 141 | widekl, | |
| 139 | 142 | x87, |
| 140 | 143 | xop, |
| 141 | 144 | xsave, |
| ... | ... | @@ -150,6 +153,16 @@ pub const all_features = blk: { |
| 150 | 153 | const len = @typeInfo(Feature).Enum.fields.len; |
| 151 | 154 | std.debug.assert(len <= CpuFeature.Set.needed_bit_count); |
| 152 | 155 | var result: [len]CpuFeature = undefined; |
| 156 | result[@enumToInt(Feature.@"16bit_mode")] = .{ | |
| 157 | .llvm_name = "16bit-mode", | |
| 158 | .description = "16-bit mode (i8086)", | |
| 159 | .dependencies = featureSet(&[_]Feature{}), | |
| 160 | }; | |
| 161 | result[@enumToInt(Feature.@"32bit_mode")] = .{ | |
| 162 | .llvm_name = "32bit-mode", | |
| 163 | .description = "32-bit mode (80386)", | |
| 164 | .dependencies = featureSet(&[_]Feature{}), | |
| 165 | }; | |
| 153 | 166 | result[@enumToInt(Feature.@"3dnow")] = .{ |
| 154 | 167 | .llvm_name = "3dnow", |
| 155 | 168 | .description = "Enable 3DNow! instructions", |
| ... | ... | @@ -321,6 +334,13 @@ pub const all_features = blk: { |
| 321 | 334 | .avx512f, |
| 322 | 335 | }), |
| 323 | 336 | }; |
| 337 | result[@enumToInt(Feature.avxvnni)] = .{ | |
| 338 | .llvm_name = "avxvnni", | |
| 339 | .description = "Support AVX_VNNI encoding", | |
| 340 | .dependencies = featureSet(&[_]Feature{ | |
| 341 | .avx2, | |
| 342 | }), | |
| 343 | }; | |
| 324 | 344 | result[@enumToInt(Feature.bmi)] = .{ |
| 325 | 345 | .llvm_name = "bmi", |
| 326 | 346 | .description = "Support BMI instructions", |
| ... | ... | @@ -485,6 +505,11 @@ pub const all_features = blk: { |
| 485 | 505 | .description = "Support FS/GS Base instructions", |
| 486 | 506 | .dependencies = featureSet(&[_]Feature{}), |
| 487 | 507 | }; |
| 508 | result[@enumToInt(Feature.fsrm)] = .{ | |
| 509 | .llvm_name = "fsrm", | |
| 510 | .description = "REP MOVSB of short lengths is faster", | |
| 511 | .dependencies = featureSet(&[_]Feature{}), | |
| 512 | }; | |
| 488 | 513 | result[@enumToInt(Feature.fxsr)] = .{ |
| 489 | 514 | .llvm_name = "fxsr", |
| 490 | 515 | .description = "Support fxsave/fxrestore instructions", |
| ... | ... | @@ -497,6 +522,11 @@ pub const all_features = blk: { |
| 497 | 522 | .sse2, |
| 498 | 523 | }), |
| 499 | 524 | }; |
| 525 | result[@enumToInt(Feature.hreset)] = .{ | |
| 526 | .llvm_name = "hreset", | |
| 527 | .description = "Has hreset instruction", | |
| 528 | .dependencies = featureSet(&[_]Feature{}), | |
| 529 | }; | |
| 500 | 530 | result[@enumToInt(Feature.idivl_to_divb)] = .{ |
| 501 | 531 | .llvm_name = "idivl-to-divb", |
| 502 | 532 | .description = "Use 8-bit divide for positive values less than 256", |
| ... | ... | @@ -512,6 +542,13 @@ pub const all_features = blk: { |
| 512 | 542 | .description = "Invalidate Process-Context Identifier", |
| 513 | 543 | .dependencies = featureSet(&[_]Feature{}), |
| 514 | 544 | }; |
| 545 | result[@enumToInt(Feature.kl)] = .{ | |
| 546 | .llvm_name = "kl", | |
| 547 | .description = "Support Key Locker kl Instructions", | |
| 548 | .dependencies = featureSet(&[_]Feature{ | |
| 549 | .sse2, | |
| 550 | }), | |
| 551 | }; | |
| 515 | 552 | result[@enumToInt(Feature.lea_sp)] = .{ |
| 516 | 553 | .llvm_name = "lea-sp", |
| 517 | 554 | .description = "Use LEA for adjusting the stack pointer", |
| ... | ... | @@ -547,11 +584,6 @@ pub const all_features = blk: { |
| 547 | 584 | .description = "Various instructions can be fused with conditional branches", |
| 548 | 585 | .dependencies = featureSet(&[_]Feature{}), |
| 549 | 586 | }; |
| 550 | result[@enumToInt(Feature.merge_to_threeway_branch)] = .{ | |
| 551 | .llvm_name = "merge-to-threeway-branch", | |
| 552 | .description = "Merge branches to a three-way conditional branch", | |
| 553 | .dependencies = featureSet(&[_]Feature{}), | |
| 554 | }; | |
| 555 | 587 | result[@enumToInt(Feature.mmx)] = .{ |
| 556 | 588 | .llvm_name = "mmx", |
| 557 | 589 | .description = "Enable MMX instructions", |
| ... | ... | @@ -572,11 +604,6 @@ pub const all_features = blk: { |
| 572 | 604 | .description = "Support movdiri instruction", |
| 573 | 605 | .dependencies = featureSet(&[_]Feature{}), |
| 574 | 606 | }; |
| 575 | result[@enumToInt(Feature.mpx)] = .{ | |
| 576 | .llvm_name = "mpx", | |
| 577 | .description = "Deprecated. Support MPX instructions", | |
| 578 | .dependencies = featureSet(&[_]Feature{}), | |
| 579 | }; | |
| 580 | 607 | result[@enumToInt(Feature.mwaitx)] = .{ |
| 581 | 608 | .llvm_name = "mwaitx", |
| 582 | 609 | .description = "Enable MONITORX/MWAITX timer functionality", |
| ... | ... | @@ -691,7 +718,7 @@ pub const all_features = blk: { |
| 691 | 718 | }; |
| 692 | 719 | result[@enumToInt(Feature.sahf)] = .{ |
| 693 | 720 | .llvm_name = "sahf", |
| 694 | .description = "Support LAHF and SAHF instructions", | |
| 721 | .description = "Support LAHF and SAHF instructions in 64-bit mode", | |
| 695 | 722 | .dependencies = featureSet(&[_]Feature{}), |
| 696 | 723 | }; |
| 697 | 724 | result[@enumToInt(Feature.serialize)] = .{ |
| ... | ... | @@ -778,11 +805,6 @@ pub const all_features = blk: { |
| 778 | 805 | .description = "Enable SSE instructions", |
| 779 | 806 | .dependencies = featureSet(&[_]Feature{}), |
| 780 | 807 | }; |
| 781 | result[@enumToInt(Feature.sse_unaligned_mem)] = .{ | |
| 782 | .llvm_name = "sse-unaligned-mem", | |
| 783 | .description = "Allow unaligned memory operands with SSE instructions", | |
| 784 | .dependencies = featureSet(&[_]Feature{}), | |
| 785 | }; | |
| 786 | 808 | result[@enumToInt(Feature.sse2)] = .{ |
| 787 | 809 | .llvm_name = "sse2", |
| 788 | 810 | .description = "Enable SSE2 instructions", |
| ... | ... | @@ -818,6 +840,11 @@ pub const all_features = blk: { |
| 818 | 840 | .sse3, |
| 819 | 841 | }), |
| 820 | 842 | }; |
| 843 | result[@enumToInt(Feature.sse_unaligned_mem)] = .{ | |
| 844 | .llvm_name = "sse-unaligned-mem", | |
| 845 | .description = "Allow unaligned memory operands with SSE instructions", | |
| 846 | .dependencies = featureSet(&[_]Feature{}), | |
| 847 | }; | |
| 821 | 848 | result[@enumToInt(Feature.ssse3)] = .{ |
| 822 | 849 | .llvm_name = "ssse3", |
| 823 | 850 | .description = "Enable SSSE3 instructions", |
| ... | ... | @@ -835,6 +862,11 @@ pub const all_features = blk: { |
| 835 | 862 | .description = "Support TSXLDTRK instructions", |
| 836 | 863 | .dependencies = featureSet(&[_]Feature{}), |
| 837 | 864 | }; |
| 865 | result[@enumToInt(Feature.uintr)] = .{ | |
| 866 | .llvm_name = "uintr", | |
| 867 | .description = "Has UINTR Instructions", | |
| 868 | .dependencies = featureSet(&[_]Feature{}), | |
| 869 | }; | |
| 838 | 870 | result[@enumToInt(Feature.use_aa)] = .{ |
| 839 | 871 | .llvm_name = "use-aa", |
| 840 | 872 | .description = "Use alias analysis during codegen", |
| ... | ... | @@ -876,6 +908,13 @@ pub const all_features = blk: { |
| 876 | 908 | .description = "Write Back No Invalidate", |
| 877 | 909 | .dependencies = featureSet(&[_]Feature{}), |
| 878 | 910 | }; |
| 911 | result[@enumToInt(Feature.widekl)] = .{ | |
| 912 | .llvm_name = "widekl", | |
| 913 | .description = "Support Key Locker wide Instructions", | |
| 914 | .dependencies = featureSet(&[_]Feature{ | |
| 915 | .kl, | |
| 916 | }), | |
| 917 | }; | |
| 879 | 918 | result[@enumToInt(Feature.x87)] = .{ |
| 880 | 919 | .llvm_name = "x87", |
| 881 | 920 | .description = "Enable X87 float instructions", |
| ... | ... | @@ -923,6 +962,97 @@ pub const all_features = blk: { |
| 923 | 962 | }; |
| 924 | 963 | |
| 925 | 964 | pub const cpu = struct { |
| 965 | pub const _i386 = CpuModel{ | |
| 966 | .name = "_i386", | |
| 967 | .llvm_name = "i386", | |
| 968 | .features = featureSet(&[_]Feature{ | |
| 969 | .slow_unaligned_mem_16, | |
| 970 | .vzeroupper, | |
| 971 | .x87, | |
| 972 | }), | |
| 973 | }; | |
| 974 | pub const _i486 = CpuModel{ | |
| 975 | .name = "_i486", | |
| 976 | .llvm_name = "i486", | |
| 977 | .features = featureSet(&[_]Feature{ | |
| 978 | .slow_unaligned_mem_16, | |
| 979 | .vzeroupper, | |
| 980 | .x87, | |
| 981 | }), | |
| 982 | }; | |
| 983 | pub const _i586 = CpuModel{ | |
| 984 | .name = "_i586", | |
| 985 | .llvm_name = "i586", | |
| 986 | .features = featureSet(&[_]Feature{ | |
| 987 | .cx8, | |
| 988 | .slow_unaligned_mem_16, | |
| 989 | .vzeroupper, | |
| 990 | .x87, | |
| 991 | }), | |
| 992 | }; | |
| 993 | pub const _i686 = CpuModel{ | |
| 994 | .name = "_i686", | |
| 995 | .llvm_name = "i686", | |
| 996 | .features = featureSet(&[_]Feature{ | |
| 997 | .cmov, | |
| 998 | .cx8, | |
| 999 | .slow_unaligned_mem_16, | |
| 1000 | .vzeroupper, | |
| 1001 | .x87, | |
| 1002 | }), | |
| 1003 | }; | |
| 1004 | pub const alderlake = CpuModel{ | |
| 1005 | .name = "alderlake", | |
| 1006 | .llvm_name = "alderlake", | |
| 1007 | .features = featureSet(&[_]Feature{ | |
| 1008 | .@"64bit", | |
| 1009 | .adx, | |
| 1010 | .aes, | |
| 1011 | .avxvnni, | |
| 1012 | .bmi, | |
| 1013 | .bmi2, | |
| 1014 | .cldemote, | |
| 1015 | .clflushopt, | |
| 1016 | .cmov, | |
| 1017 | .cx16, | |
| 1018 | .ermsb, | |
| 1019 | .f16c, | |
| 1020 | .false_deps_popcnt, | |
| 1021 | .fast_15bytenop, | |
| 1022 | .fast_gather, | |
| 1023 | .fast_scalar_fsqrt, | |
| 1024 | .fast_shld_rotate, | |
| 1025 | .fast_variable_shuffle, | |
| 1026 | .fast_vector_fsqrt, | |
| 1027 | .fma, | |
| 1028 | .fsgsbase, | |
| 1029 | .fxsr, | |
| 1030 | .hreset, | |
| 1031 | .idivq_to_divl, | |
| 1032 | .invpcid, | |
| 1033 | .lzcnt, | |
| 1034 | .macrofusion, | |
| 1035 | .mmx, | |
| 1036 | .movbe, | |
| 1037 | .nopl, | |
| 1038 | .pclmul, | |
| 1039 | .popcnt, | |
| 1040 | .prfchw, | |
| 1041 | .ptwrite, | |
| 1042 | .rdrnd, | |
| 1043 | .rdseed, | |
| 1044 | .sahf, | |
| 1045 | .serialize, | |
| 1046 | .sgx, | |
| 1047 | .slow_3ops_lea, | |
| 1048 | .vzeroupper, | |
| 1049 | .waitpkg, | |
| 1050 | .x87, | |
| 1051 | .xsavec, | |
| 1052 | .xsaveopt, | |
| 1053 | .xsaves, | |
| 1054 | }), | |
| 1055 | }; | |
| 926 | 1056 | pub const amdfam10 = CpuModel{ |
| 927 | 1057 | .name = "amdfam10", |
| 928 | 1058 | .llvm_name = "amdfam10", |
| ... | ... | @@ -931,7 +1061,6 @@ pub const cpu = struct { |
| 931 | 1061 | .@"64bit", |
| 932 | 1062 | .cmov, |
| 933 | 1063 | .cx16, |
| 934 | .cx8, | |
| 935 | 1064 | .fast_scalar_shift_masks, |
| 936 | 1065 | .fxsr, |
| 937 | 1066 | .lzcnt, |
| ... | ... | @@ -959,43 +1088,45 @@ pub const cpu = struct { |
| 959 | 1088 | .x87, |
| 960 | 1089 | }), |
| 961 | 1090 | }; |
| 962 | pub const athlon_4 = CpuModel{ | |
| 963 | .name = "athlon_4", | |
| 964 | .llvm_name = "athlon-4", | |
| 1091 | pub const athlon64 = CpuModel{ | |
| 1092 | .name = "athlon64", | |
| 1093 | .llvm_name = "athlon64", | |
| 965 | 1094 | .features = featureSet(&[_]Feature{ |
| 966 | 1095 | .@"3dnowa", |
| 1096 | .@"64bit", | |
| 967 | 1097 | .cmov, |
| 968 | 1098 | .cx8, |
| 1099 | .fast_scalar_shift_masks, | |
| 969 | 1100 | .fxsr, |
| 970 | 1101 | .nopl, |
| 971 | 1102 | .slow_shld, |
| 972 | 1103 | .slow_unaligned_mem_16, |
| 973 | .sse, | |
| 1104 | .sse2, | |
| 974 | 1105 | .vzeroupper, |
| 975 | 1106 | .x87, |
| 976 | 1107 | }), |
| 977 | 1108 | }; |
| 978 | pub const athlon_fx = CpuModel{ | |
| 979 | .name = "athlon_fx", | |
| 980 | .llvm_name = "athlon-fx", | |
| 1109 | pub const athlon64_sse3 = CpuModel{ | |
| 1110 | .name = "athlon64_sse3", | |
| 1111 | .llvm_name = "athlon64-sse3", | |
| 981 | 1112 | .features = featureSet(&[_]Feature{ |
| 982 | 1113 | .@"3dnowa", |
| 983 | 1114 | .@"64bit", |
| 984 | 1115 | .cmov, |
| 985 | .cx8, | |
| 1116 | .cx16, | |
| 986 | 1117 | .fast_scalar_shift_masks, |
| 987 | 1118 | .fxsr, |
| 988 | 1119 | .nopl, |
| 989 | 1120 | .slow_shld, |
| 990 | 1121 | .slow_unaligned_mem_16, |
| 991 | .sse2, | |
| 1122 | .sse3, | |
| 992 | 1123 | .vzeroupper, |
| 993 | 1124 | .x87, |
| 994 | 1125 | }), |
| 995 | 1126 | }; |
| 996 | pub const athlon_mp = CpuModel{ | |
| 997 | .name = "athlon_mp", | |
| 998 | .llvm_name = "athlon-mp", | |
| 1127 | pub const athlon_4 = CpuModel{ | |
| 1128 | .name = "athlon_4", | |
| 1129 | .llvm_name = "athlon-4", | |
| 999 | 1130 | .features = featureSet(&[_]Feature{ |
| 1000 | 1131 | .@"3dnowa", |
| 1001 | 1132 | .cmov, |
| ... | ... | @@ -1009,23 +1140,27 @@ pub const cpu = struct { |
| 1009 | 1140 | .x87, |
| 1010 | 1141 | }), |
| 1011 | 1142 | }; |
| 1012 | pub const athlon_tbird = CpuModel{ | |
| 1013 | .name = "athlon_tbird", | |
| 1014 | .llvm_name = "athlon-tbird", | |
| 1143 | pub const athlon_fx = CpuModel{ | |
| 1144 | .name = "athlon_fx", | |
| 1145 | .llvm_name = "athlon-fx", | |
| 1015 | 1146 | .features = featureSet(&[_]Feature{ |
| 1016 | 1147 | .@"3dnowa", |
| 1148 | .@"64bit", | |
| 1017 | 1149 | .cmov, |
| 1018 | 1150 | .cx8, |
| 1151 | .fast_scalar_shift_masks, | |
| 1152 | .fxsr, | |
| 1019 | 1153 | .nopl, |
| 1020 | 1154 | .slow_shld, |
| 1021 | 1155 | .slow_unaligned_mem_16, |
| 1156 | .sse2, | |
| 1022 | 1157 | .vzeroupper, |
| 1023 | 1158 | .x87, |
| 1024 | 1159 | }), |
| 1025 | 1160 | }; |
| 1026 | pub const athlon_xp = CpuModel{ | |
| 1027 | .name = "athlon_xp", | |
| 1028 | .llvm_name = "athlon-xp", | |
| 1161 | pub const athlon_mp = CpuModel{ | |
| 1162 | .name = "athlon_mp", | |
| 1163 | .llvm_name = "athlon-mp", | |
| 1029 | 1164 | .features = featureSet(&[_]Feature{ |
| 1030 | 1165 | .@"3dnowa", |
| 1031 | 1166 | .cmov, |
| ... | ... | @@ -1039,39 +1174,32 @@ pub const cpu = struct { |
| 1039 | 1174 | .x87, |
| 1040 | 1175 | }), |
| 1041 | 1176 | }; |
| 1042 | pub const athlon64 = CpuModel{ | |
| 1043 | .name = "athlon64", | |
| 1044 | .llvm_name = "athlon64", | |
| 1177 | pub const athlon_tbird = CpuModel{ | |
| 1178 | .name = "athlon_tbird", | |
| 1179 | .llvm_name = "athlon-tbird", | |
| 1045 | 1180 | .features = featureSet(&[_]Feature{ |
| 1046 | 1181 | .@"3dnowa", |
| 1047 | .@"64bit", | |
| 1048 | 1182 | .cmov, |
| 1049 | 1183 | .cx8, |
| 1050 | .fast_scalar_shift_masks, | |
| 1051 | .fxsr, | |
| 1052 | 1184 | .nopl, |
| 1053 | 1185 | .slow_shld, |
| 1054 | 1186 | .slow_unaligned_mem_16, |
| 1055 | .sse2, | |
| 1056 | 1187 | .vzeroupper, |
| 1057 | 1188 | .x87, |
| 1058 | 1189 | }), |
| 1059 | 1190 | }; |
| 1060 | pub const athlon64_sse3 = CpuModel{ | |
| 1061 | .name = "athlon64_sse3", | |
| 1062 | .llvm_name = "athlon64-sse3", | |
| 1191 | pub const athlon_xp = CpuModel{ | |
| 1192 | .name = "athlon_xp", | |
| 1193 | .llvm_name = "athlon-xp", | |
| 1063 | 1194 | .features = featureSet(&[_]Feature{ |
| 1064 | 1195 | .@"3dnowa", |
| 1065 | .@"64bit", | |
| 1066 | 1196 | .cmov, |
| 1067 | .cx16, | |
| 1068 | 1197 | .cx8, |
| 1069 | .fast_scalar_shift_masks, | |
| 1070 | 1198 | .fxsr, |
| 1071 | 1199 | .nopl, |
| 1072 | 1200 | .slow_shld, |
| 1073 | 1201 | .slow_unaligned_mem_16, |
| 1074 | .sse3, | |
| 1202 | .sse, | |
| 1075 | 1203 | .vzeroupper, |
| 1076 | 1204 | .x87, |
| 1077 | 1205 | }), |
| ... | ... | @@ -1083,7 +1211,6 @@ pub const cpu = struct { |
| 1083 | 1211 | .@"64bit", |
| 1084 | 1212 | .cmov, |
| 1085 | 1213 | .cx16, |
| 1086 | .cx8, | |
| 1087 | 1214 | .fxsr, |
| 1088 | 1215 | .idivl_to_divb, |
| 1089 | 1216 | .idivq_to_divl, |
| ... | ... | @@ -1109,7 +1236,6 @@ pub const cpu = struct { |
| 1109 | 1236 | .@"64bit", |
| 1110 | 1237 | .cmov, |
| 1111 | 1238 | .cx16, |
| 1112 | .cx8, | |
| 1113 | 1239 | .fast_scalar_shift_masks, |
| 1114 | 1240 | .fxsr, |
| 1115 | 1241 | .lzcnt, |
| ... | ... | @@ -1132,7 +1258,6 @@ pub const cpu = struct { |
| 1132 | 1258 | .branchfusion, |
| 1133 | 1259 | .cmov, |
| 1134 | 1260 | .cx16, |
| 1135 | .cx8, | |
| 1136 | 1261 | .fast_11bytenop, |
| 1137 | 1262 | .fast_scalar_shift_masks, |
| 1138 | 1263 | .fxsr, |
| ... | ... | @@ -1161,7 +1286,6 @@ pub const cpu = struct { |
| 1161 | 1286 | .branchfusion, |
| 1162 | 1287 | .cmov, |
| 1163 | 1288 | .cx16, |
| 1164 | .cx8, | |
| 1165 | 1289 | .f16c, |
| 1166 | 1290 | .fast_11bytenop, |
| 1167 | 1291 | .fast_bextr, |
| ... | ... | @@ -1194,7 +1318,6 @@ pub const cpu = struct { |
| 1194 | 1318 | .branchfusion, |
| 1195 | 1319 | .cmov, |
| 1196 | 1320 | .cx16, |
| 1197 | .cx8, | |
| 1198 | 1321 | .f16c, |
| 1199 | 1322 | .fast_11bytenop, |
| 1200 | 1323 | .fast_bextr, |
| ... | ... | @@ -1215,7 +1338,6 @@ pub const cpu = struct { |
| 1215 | 1338 | .vzeroupper, |
| 1216 | 1339 | .x87, |
| 1217 | 1340 | .xop, |
| 1218 | .xsave, | |
| 1219 | 1341 | .xsaveopt, |
| 1220 | 1342 | }), |
| 1221 | 1343 | }; |
| ... | ... | @@ -1231,7 +1353,6 @@ pub const cpu = struct { |
| 1231 | 1353 | .branchfusion, |
| 1232 | 1354 | .cmov, |
| 1233 | 1355 | .cx16, |
| 1234 | .cx8, | |
| 1235 | 1356 | .f16c, |
| 1236 | 1357 | .fast_11bytenop, |
| 1237 | 1358 | .fast_bextr, |
| ... | ... | @@ -1255,7 +1376,6 @@ pub const cpu = struct { |
| 1255 | 1376 | .vzeroupper, |
| 1256 | 1377 | .x87, |
| 1257 | 1378 | .xop, |
| 1258 | .xsave, | |
| 1259 | 1379 | .xsaveopt, |
| 1260 | 1380 | }), |
| 1261 | 1381 | }; |
| ... | ... | @@ -1266,7 +1386,6 @@ pub const cpu = struct { |
| 1266 | 1386 | .@"64bit", |
| 1267 | 1387 | .cmov, |
| 1268 | 1388 | .cx16, |
| 1269 | .cx8, | |
| 1270 | 1389 | .fxsr, |
| 1271 | 1390 | .idivl_to_divb, |
| 1272 | 1391 | .idivq_to_divl, |
| ... | ... | @@ -1290,13 +1409,11 @@ pub const cpu = struct { |
| 1290 | 1409 | .features = featureSet(&[_]Feature{ |
| 1291 | 1410 | .@"64bit", |
| 1292 | 1411 | .adx, |
| 1293 | .avx, | |
| 1294 | 1412 | .avx2, |
| 1295 | 1413 | .bmi, |
| 1296 | 1414 | .bmi2, |
| 1297 | 1415 | .cmov, |
| 1298 | 1416 | .cx16, |
| 1299 | .cx8, | |
| 1300 | 1417 | .ermsb, |
| 1301 | 1418 | .f16c, |
| 1302 | 1419 | .false_deps_lzcnt_tzcnt, |
| ... | ... | @@ -1312,7 +1429,6 @@ pub const cpu = struct { |
| 1312 | 1429 | .invpcid, |
| 1313 | 1430 | .lzcnt, |
| 1314 | 1431 | .macrofusion, |
| 1315 | .merge_to_threeway_branch, | |
| 1316 | 1432 | .mmx, |
| 1317 | 1433 | .movbe, |
| 1318 | 1434 | .nopl, |
| ... | ... | @@ -1323,10 +1439,8 @@ pub const cpu = struct { |
| 1323 | 1439 | .rdseed, |
| 1324 | 1440 | .sahf, |
| 1325 | 1441 | .slow_3ops_lea, |
| 1326 | .sse4_2, | |
| 1327 | 1442 | .vzeroupper, |
| 1328 | 1443 | .x87, |
| 1329 | .xsave, | |
| 1330 | 1444 | .xsaveopt, |
| 1331 | 1445 | }), |
| 1332 | 1446 | }; |
| ... | ... | @@ -1337,7 +1451,6 @@ pub const cpu = struct { |
| 1337 | 1451 | .@"64bit", |
| 1338 | 1452 | .cmov, |
| 1339 | 1453 | .cx16, |
| 1340 | .cx8, | |
| 1341 | 1454 | .fast_15bytenop, |
| 1342 | 1455 | .fast_scalar_shift_masks, |
| 1343 | 1456 | .fast_vector_shift_masks, |
| ... | ... | @@ -1361,11 +1474,9 @@ pub const cpu = struct { |
| 1361 | 1474 | .features = featureSet(&[_]Feature{ |
| 1362 | 1475 | .@"64bit", |
| 1363 | 1476 | .aes, |
| 1364 | .avx, | |
| 1365 | 1477 | .bmi, |
| 1366 | 1478 | .cmov, |
| 1367 | 1479 | .cx16, |
| 1368 | .cx8, | |
| 1369 | 1480 | .f16c, |
| 1370 | 1481 | .fast_15bytenop, |
| 1371 | 1482 | .fast_bextr, |
| ... | ... | @@ -1384,9 +1495,7 @@ pub const cpu = struct { |
| 1384 | 1495 | .sahf, |
| 1385 | 1496 | .slow_shld, |
| 1386 | 1497 | .sse4a, |
| 1387 | .ssse3, | |
| 1388 | 1498 | .x87, |
| 1389 | .xsave, | |
| 1390 | 1499 | .xsaveopt, |
| 1391 | 1500 | }), |
| 1392 | 1501 | }; |
| ... | ... | @@ -1421,12 +1530,8 @@ pub const cpu = struct { |
| 1421 | 1530 | .@"64bit", |
| 1422 | 1531 | .adx, |
| 1423 | 1532 | .aes, |
| 1424 | .avx, | |
| 1425 | .avx2, | |
| 1426 | .avx512bw, | |
| 1427 | 1533 | .avx512cd, |
| 1428 | 1534 | .avx512dq, |
| 1429 | .avx512f, | |
| 1430 | 1535 | .avx512ifma, |
| 1431 | 1536 | .avx512vbmi, |
| 1432 | 1537 | .avx512vl, |
| ... | ... | @@ -1435,23 +1540,19 @@ pub const cpu = struct { |
| 1435 | 1540 | .clflushopt, |
| 1436 | 1541 | .cmov, |
| 1437 | 1542 | .cx16, |
| 1438 | .cx8, | |
| 1439 | 1543 | .ermsb, |
| 1440 | .f16c, | |
| 1441 | 1544 | .fast_15bytenop, |
| 1442 | 1545 | .fast_gather, |
| 1443 | 1546 | .fast_scalar_fsqrt, |
| 1444 | 1547 | .fast_shld_rotate, |
| 1445 | 1548 | .fast_variable_shuffle, |
| 1446 | 1549 | .fast_vector_fsqrt, |
| 1447 | .fma, | |
| 1448 | 1550 | .fsgsbase, |
| 1449 | 1551 | .fxsr, |
| 1450 | 1552 | .idivq_to_divl, |
| 1451 | 1553 | .invpcid, |
| 1452 | 1554 | .lzcnt, |
| 1453 | 1555 | .macrofusion, |
| 1454 | .merge_to_threeway_branch, | |
| 1455 | 1556 | .mmx, |
| 1456 | 1557 | .movbe, |
| 1457 | 1558 | .nopl, |
| ... | ... | @@ -1466,10 +1567,8 @@ pub const cpu = struct { |
| 1466 | 1567 | .sgx, |
| 1467 | 1568 | .sha, |
| 1468 | 1569 | .slow_3ops_lea, |
| 1469 | .sse4_2, | |
| 1470 | 1570 | .vzeroupper, |
| 1471 | 1571 | .x87, |
| 1472 | .xsave, | |
| 1473 | 1572 | .xsavec, |
| 1474 | 1573 | .xsaveopt, |
| 1475 | 1574 | .xsaves, |
| ... | ... | @@ -1482,12 +1581,9 @@ pub const cpu = struct { |
| 1482 | 1581 | .@"64bit", |
| 1483 | 1582 | .adx, |
| 1484 | 1583 | .aes, |
| 1485 | .avx, | |
| 1486 | .avx2, | |
| 1487 | 1584 | .avx512bw, |
| 1488 | 1585 | .avx512cd, |
| 1489 | 1586 | .avx512dq, |
| 1490 | .avx512f, | |
| 1491 | 1587 | .avx512vl, |
| 1492 | 1588 | .avx512vnni, |
| 1493 | 1589 | .bmi, |
| ... | ... | @@ -1496,9 +1592,7 @@ pub const cpu = struct { |
| 1496 | 1592 | .clwb, |
| 1497 | 1593 | .cmov, |
| 1498 | 1594 | .cx16, |
| 1499 | .cx8, | |
| 1500 | 1595 | .ermsb, |
| 1501 | .f16c, | |
| 1502 | 1596 | .false_deps_popcnt, |
| 1503 | 1597 | .fast_15bytenop, |
| 1504 | 1598 | .fast_gather, |
| ... | ... | @@ -1506,14 +1600,12 @@ pub const cpu = struct { |
| 1506 | 1600 | .fast_shld_rotate, |
| 1507 | 1601 | .fast_variable_shuffle, |
| 1508 | 1602 | .fast_vector_fsqrt, |
| 1509 | .fma, | |
| 1510 | 1603 | .fsgsbase, |
| 1511 | 1604 | .fxsr, |
| 1512 | 1605 | .idivq_to_divl, |
| 1513 | 1606 | .invpcid, |
| 1514 | 1607 | .lzcnt, |
| 1515 | 1608 | .macrofusion, |
| 1516 | .merge_to_threeway_branch, | |
| 1517 | 1609 | .mmx, |
| 1518 | 1610 | .movbe, |
| 1519 | 1611 | .nopl, |
| ... | ... | @@ -1526,10 +1618,8 @@ pub const cpu = struct { |
| 1526 | 1618 | .rdseed, |
| 1527 | 1619 | .sahf, |
| 1528 | 1620 | .slow_3ops_lea, |
| 1529 | .sse4_2, | |
| 1530 | 1621 | .vzeroupper, |
| 1531 | 1622 | .x87, |
| 1532 | .xsave, | |
| 1533 | 1623 | .xsavec, |
| 1534 | 1624 | .xsaveopt, |
| 1535 | 1625 | .xsaves, |
| ... | ... | @@ -1542,13 +1632,9 @@ pub const cpu = struct { |
| 1542 | 1632 | .@"64bit", |
| 1543 | 1633 | .adx, |
| 1544 | 1634 | .aes, |
| 1545 | .avx, | |
| 1546 | .avx2, | |
| 1547 | 1635 | .avx512bf16, |
| 1548 | .avx512bw, | |
| 1549 | 1636 | .avx512cd, |
| 1550 | 1637 | .avx512dq, |
| 1551 | .avx512f, | |
| 1552 | 1638 | .avx512vl, |
| 1553 | 1639 | .avx512vnni, |
| 1554 | 1640 | .bmi, |
| ... | ... | @@ -1557,9 +1643,7 @@ pub const cpu = struct { |
| 1557 | 1643 | .clwb, |
| 1558 | 1644 | .cmov, |
| 1559 | 1645 | .cx16, |
| 1560 | .cx8, | |
| 1561 | 1646 | .ermsb, |
| 1562 | .f16c, | |
| 1563 | 1647 | .false_deps_popcnt, |
| 1564 | 1648 | .fast_15bytenop, |
| 1565 | 1649 | .fast_gather, |
| ... | ... | @@ -1567,14 +1651,12 @@ pub const cpu = struct { |
| 1567 | 1651 | .fast_shld_rotate, |
| 1568 | 1652 | .fast_variable_shuffle, |
| 1569 | 1653 | .fast_vector_fsqrt, |
| 1570 | .fma, | |
| 1571 | 1654 | .fsgsbase, |
| 1572 | 1655 | .fxsr, |
| 1573 | 1656 | .idivq_to_divl, |
| 1574 | 1657 | .invpcid, |
| 1575 | 1658 | .lzcnt, |
| 1576 | 1659 | .macrofusion, |
| 1577 | .merge_to_threeway_branch, | |
| 1578 | 1660 | .mmx, |
| 1579 | 1661 | .movbe, |
| 1580 | 1662 | .nopl, |
| ... | ... | @@ -1587,47 +1669,29 @@ pub const cpu = struct { |
| 1587 | 1669 | .rdseed, |
| 1588 | 1670 | .sahf, |
| 1589 | 1671 | .slow_3ops_lea, |
| 1590 | .sse4_2, | |
| 1591 | 1672 | .vzeroupper, |
| 1592 | 1673 | .x87, |
| 1593 | .xsave, | |
| 1594 | 1674 | .xsavec, |
| 1595 | 1675 | .xsaveopt, |
| 1596 | 1676 | .xsaves, |
| 1597 | 1677 | }), |
| 1598 | 1678 | }; |
| 1599 | pub const core_avx_i = CpuModel{ | |
| 1600 | .name = "core_avx_i", | |
| 1601 | .llvm_name = "core-avx-i", | |
| 1679 | pub const core2 = CpuModel{ | |
| 1680 | .name = "core2", | |
| 1681 | .llvm_name = "core2", | |
| 1602 | 1682 | .features = featureSet(&[_]Feature{ |
| 1603 | 1683 | .@"64bit", |
| 1604 | .avx, | |
| 1605 | 1684 | .cmov, |
| 1606 | 1685 | .cx16, |
| 1607 | .cx8, | |
| 1608 | .f16c, | |
| 1609 | .false_deps_popcnt, | |
| 1610 | .fast_15bytenop, | |
| 1611 | .fast_scalar_fsqrt, | |
| 1612 | .fast_shld_rotate, | |
| 1613 | .fsgsbase, | |
| 1614 | 1686 | .fxsr, |
| 1615 | .idivq_to_divl, | |
| 1616 | 1687 | .macrofusion, |
| 1617 | .merge_to_threeway_branch, | |
| 1618 | 1688 | .mmx, |
| 1619 | 1689 | .nopl, |
| 1620 | .pclmul, | |
| 1621 | .popcnt, | |
| 1622 | .rdrnd, | |
| 1623 | 1690 | .sahf, |
| 1624 | .slow_3ops_lea, | |
| 1625 | .slow_unaligned_mem_32, | |
| 1626 | .sse4_2, | |
| 1691 | .slow_unaligned_mem_16, | |
| 1692 | .ssse3, | |
| 1627 | 1693 | .vzeroupper, |
| 1628 | 1694 | .x87, |
| 1629 | .xsave, | |
| 1630 | .xsaveopt, | |
| 1631 | 1695 | }), |
| 1632 | 1696 | }; |
| 1633 | 1697 | pub const core_avx2 = CpuModel{ |
| ... | ... | @@ -1635,13 +1699,11 @@ pub const cpu = struct { |
| 1635 | 1699 | .llvm_name = "core-avx2", |
| 1636 | 1700 | .features = featureSet(&[_]Feature{ |
| 1637 | 1701 | .@"64bit", |
| 1638 | .avx, | |
| 1639 | 1702 | .avx2, |
| 1640 | 1703 | .bmi, |
| 1641 | 1704 | .bmi2, |
| 1642 | 1705 | .cmov, |
| 1643 | 1706 | .cx16, |
| 1644 | .cx8, | |
| 1645 | 1707 | .ermsb, |
| 1646 | 1708 | .f16c, |
| 1647 | 1709 | .false_deps_lzcnt_tzcnt, |
| ... | ... | @@ -1657,7 +1719,6 @@ pub const cpu = struct { |
| 1657 | 1719 | .invpcid, |
| 1658 | 1720 | .lzcnt, |
| 1659 | 1721 | .macrofusion, |
| 1660 | .merge_to_threeway_branch, | |
| 1661 | 1722 | .mmx, |
| 1662 | 1723 | .movbe, |
| 1663 | 1724 | .nopl, |
| ... | ... | @@ -1666,30 +1727,38 @@ pub const cpu = struct { |
| 1666 | 1727 | .rdrnd, |
| 1667 | 1728 | .sahf, |
| 1668 | 1729 | .slow_3ops_lea, |
| 1669 | .sse4_2, | |
| 1670 | 1730 | .vzeroupper, |
| 1671 | 1731 | .x87, |
| 1672 | .xsave, | |
| 1673 | 1732 | .xsaveopt, |
| 1674 | 1733 | }), |
| 1675 | 1734 | }; |
| 1676 | pub const core2 = CpuModel{ | |
| 1677 | .name = "core2", | |
| 1678 | .llvm_name = "core2", | |
| 1735 | pub const core_avx_i = CpuModel{ | |
| 1736 | .name = "core_avx_i", | |
| 1737 | .llvm_name = "core-avx-i", | |
| 1679 | 1738 | .features = featureSet(&[_]Feature{ |
| 1680 | 1739 | .@"64bit", |
| 1681 | 1740 | .cmov, |
| 1682 | 1741 | .cx16, |
| 1683 | .cx8, | |
| 1742 | .f16c, | |
| 1743 | .false_deps_popcnt, | |
| 1744 | .fast_15bytenop, | |
| 1745 | .fast_scalar_fsqrt, | |
| 1746 | .fast_shld_rotate, | |
| 1747 | .fsgsbase, | |
| 1684 | 1748 | .fxsr, |
| 1749 | .idivq_to_divl, | |
| 1685 | 1750 | .macrofusion, |
| 1686 | 1751 | .mmx, |
| 1687 | 1752 | .nopl, |
| 1753 | .pclmul, | |
| 1754 | .popcnt, | |
| 1755 | .rdrnd, | |
| 1688 | 1756 | .sahf, |
| 1689 | .slow_unaligned_mem_16, | |
| 1690 | .ssse3, | |
| 1757 | .slow_3ops_lea, | |
| 1758 | .slow_unaligned_mem_32, | |
| 1691 | 1759 | .vzeroupper, |
| 1692 | 1760 | .x87, |
| 1761 | .xsaveopt, | |
| 1693 | 1762 | }), |
| 1694 | 1763 | }; |
| 1695 | 1764 | pub const corei7 = CpuModel{ |
| ... | ... | @@ -1699,7 +1768,6 @@ pub const cpu = struct { |
| 1699 | 1768 | .@"64bit", |
| 1700 | 1769 | .cmov, |
| 1701 | 1770 | .cx16, |
| 1702 | .cx8, | |
| 1703 | 1771 | .fxsr, |
| 1704 | 1772 | .macrofusion, |
| 1705 | 1773 | .mmx, |
| ... | ... | @@ -1719,7 +1787,6 @@ pub const cpu = struct { |
| 1719 | 1787 | .avx, |
| 1720 | 1788 | .cmov, |
| 1721 | 1789 | .cx16, |
| 1722 | .cx8, | |
| 1723 | 1790 | .false_deps_popcnt, |
| 1724 | 1791 | .fast_15bytenop, |
| 1725 | 1792 | .fast_scalar_fsqrt, |
| ... | ... | @@ -1727,7 +1794,6 @@ pub const cpu = struct { |
| 1727 | 1794 | .fxsr, |
| 1728 | 1795 | .idivq_to_divl, |
| 1729 | 1796 | .macrofusion, |
| 1730 | .merge_to_threeway_branch, | |
| 1731 | 1797 | .mmx, |
| 1732 | 1798 | .nopl, |
| 1733 | 1799 | .pclmul, |
| ... | ... | @@ -1735,10 +1801,8 @@ pub const cpu = struct { |
| 1735 | 1801 | .sahf, |
| 1736 | 1802 | .slow_3ops_lea, |
| 1737 | 1803 | .slow_unaligned_mem_32, |
| 1738 | .sse4_2, | |
| 1739 | 1804 | .vzeroupper, |
| 1740 | 1805 | .x87, |
| 1741 | .xsave, | |
| 1742 | 1806 | .xsaveopt, |
| 1743 | 1807 | }), |
| 1744 | 1808 | }; |
| ... | ... | @@ -1746,8 +1810,12 @@ pub const cpu = struct { |
| 1746 | 1810 | .name = "generic", |
| 1747 | 1811 | .llvm_name = "generic", |
| 1748 | 1812 | .features = featureSet(&[_]Feature{ |
| 1813 | .@"64bit", | |
| 1749 | 1814 | .cx8, |
| 1750 | .slow_unaligned_mem_16, | |
| 1815 | .idivq_to_divl, | |
| 1816 | .macrofusion, | |
| 1817 | .slow_3ops_lea, | |
| 1818 | .slow_incdec, | |
| 1751 | 1819 | .vzeroupper, |
| 1752 | 1820 | .x87, |
| 1753 | 1821 | }), |
| ... | ... | @@ -1772,7 +1840,6 @@ pub const cpu = struct { |
| 1772 | 1840 | .clflushopt, |
| 1773 | 1841 | .cmov, |
| 1774 | 1842 | .cx16, |
| 1775 | .cx8, | |
| 1776 | 1843 | .false_deps_popcnt, |
| 1777 | 1844 | .fsgsbase, |
| 1778 | 1845 | .fxsr, |
| ... | ... | @@ -1790,11 +1857,9 @@ pub const cpu = struct { |
| 1790 | 1857 | .slow_lea, |
| 1791 | 1858 | .slow_two_mem_ops, |
| 1792 | 1859 | .sse4_2, |
| 1793 | .ssse3, | |
| 1794 | 1860 | .use_glm_div_sqrt_costs, |
| 1795 | 1861 | .vzeroupper, |
| 1796 | 1862 | .x87, |
| 1797 | .xsave, | |
| 1798 | 1863 | .xsavec, |
| 1799 | 1864 | .xsaveopt, |
| 1800 | 1865 | .xsaves, |
| ... | ... | @@ -1809,7 +1874,6 @@ pub const cpu = struct { |
| 1809 | 1874 | .clflushopt, |
| 1810 | 1875 | .cmov, |
| 1811 | 1876 | .cx16, |
| 1812 | .cx8, | |
| 1813 | 1877 | .fsgsbase, |
| 1814 | 1878 | .fxsr, |
| 1815 | 1879 | .mmx, |
| ... | ... | @@ -1829,11 +1893,9 @@ pub const cpu = struct { |
| 1829 | 1893 | .slow_lea, |
| 1830 | 1894 | .slow_two_mem_ops, |
| 1831 | 1895 | .sse4_2, |
| 1832 | .ssse3, | |
| 1833 | 1896 | .use_glm_div_sqrt_costs, |
| 1834 | 1897 | .vzeroupper, |
| 1835 | 1898 | .x87, |
| 1836 | .xsave, | |
| 1837 | 1899 | .xsavec, |
| 1838 | 1900 | .xsaveopt, |
| 1839 | 1901 | .xsaves, |
| ... | ... | @@ -1844,13 +1906,11 @@ pub const cpu = struct { |
| 1844 | 1906 | .llvm_name = "haswell", |
| 1845 | 1907 | .features = featureSet(&[_]Feature{ |
| 1846 | 1908 | .@"64bit", |
| 1847 | .avx, | |
| 1848 | 1909 | .avx2, |
| 1849 | 1910 | .bmi, |
| 1850 | 1911 | .bmi2, |
| 1851 | 1912 | .cmov, |
| 1852 | 1913 | .cx16, |
| 1853 | .cx8, | |
| 1854 | 1914 | .ermsb, |
| 1855 | 1915 | .f16c, |
| 1856 | 1916 | .false_deps_lzcnt_tzcnt, |
| ... | ... | @@ -1866,7 +1926,6 @@ pub const cpu = struct { |
| 1866 | 1926 | .invpcid, |
| 1867 | 1927 | .lzcnt, |
| 1868 | 1928 | .macrofusion, |
| 1869 | .merge_to_threeway_branch, | |
| 1870 | 1929 | .mmx, |
| 1871 | 1930 | .movbe, |
| 1872 | 1931 | .nopl, |
| ... | ... | @@ -1875,66 +1934,20 @@ pub const cpu = struct { |
| 1875 | 1934 | .rdrnd, |
| 1876 | 1935 | .sahf, |
| 1877 | 1936 | .slow_3ops_lea, |
| 1878 | .sse4_2, | |
| 1879 | 1937 | .vzeroupper, |
| 1880 | 1938 | .x87, |
| 1881 | .xsave, | |
| 1882 | 1939 | .xsaveopt, |
| 1883 | 1940 | }), |
| 1884 | 1941 | }; |
| 1885 | pub const _i386 = CpuModel{ | |
| 1886 | .name = "_i386", | |
| 1887 | .llvm_name = "i386", | |
| 1888 | .features = featureSet(&[_]Feature{ | |
| 1889 | .slow_unaligned_mem_16, | |
| 1890 | .vzeroupper, | |
| 1891 | .x87, | |
| 1892 | }), | |
| 1893 | }; | |
| 1894 | pub const _i486 = CpuModel{ | |
| 1895 | .name = "_i486", | |
| 1896 | .llvm_name = "i486", | |
| 1897 | .features = featureSet(&[_]Feature{ | |
| 1898 | .slow_unaligned_mem_16, | |
| 1899 | .vzeroupper, | |
| 1900 | .x87, | |
| 1901 | }), | |
| 1902 | }; | |
| 1903 | pub const _i586 = CpuModel{ | |
| 1904 | .name = "_i586", | |
| 1905 | .llvm_name = "i586", | |
| 1906 | .features = featureSet(&[_]Feature{ | |
| 1907 | .cx8, | |
| 1908 | .slow_unaligned_mem_16, | |
| 1909 | .vzeroupper, | |
| 1910 | .x87, | |
| 1911 | }), | |
| 1912 | }; | |
| 1913 | pub const _i686 = CpuModel{ | |
| 1914 | .name = "_i686", | |
| 1915 | .llvm_name = "i686", | |
| 1916 | .features = featureSet(&[_]Feature{ | |
| 1917 | .cmov, | |
| 1918 | .cx8, | |
| 1919 | .slow_unaligned_mem_16, | |
| 1920 | .vzeroupper, | |
| 1921 | .x87, | |
| 1922 | }), | |
| 1923 | }; | |
| 1924 | 1942 | pub const icelake_client = CpuModel{ |
| 1925 | 1943 | .name = "icelake_client", |
| 1926 | 1944 | .llvm_name = "icelake-client", |
| 1927 | 1945 | .features = featureSet(&[_]Feature{ |
| 1928 | 1946 | .@"64bit", |
| 1929 | 1947 | .adx, |
| 1930 | .aes, | |
| 1931 | .avx, | |
| 1932 | .avx2, | |
| 1933 | 1948 | .avx512bitalg, |
| 1934 | .avx512bw, | |
| 1935 | 1949 | .avx512cd, |
| 1936 | 1950 | .avx512dq, |
| 1937 | .avx512f, | |
| 1938 | 1951 | .avx512ifma, |
| 1939 | 1952 | .avx512vbmi, |
| 1940 | 1953 | .avx512vbmi2, |
| ... | ... | @@ -1947,28 +1960,24 @@ pub const cpu = struct { |
| 1947 | 1960 | .clwb, |
| 1948 | 1961 | .cmov, |
| 1949 | 1962 | .cx16, |
| 1950 | .cx8, | |
| 1951 | 1963 | .ermsb, |
| 1952 | .f16c, | |
| 1953 | 1964 | .fast_15bytenop, |
| 1954 | 1965 | .fast_gather, |
| 1955 | 1966 | .fast_scalar_fsqrt, |
| 1956 | 1967 | .fast_shld_rotate, |
| 1957 | 1968 | .fast_variable_shuffle, |
| 1958 | 1969 | .fast_vector_fsqrt, |
| 1959 | .fma, | |
| 1960 | 1970 | .fsgsbase, |
| 1971 | .fsrm, | |
| 1961 | 1972 | .fxsr, |
| 1962 | 1973 | .gfni, |
| 1963 | 1974 | .idivq_to_divl, |
| 1964 | 1975 | .invpcid, |
| 1965 | 1976 | .lzcnt, |
| 1966 | 1977 | .macrofusion, |
| 1967 | .merge_to_threeway_branch, | |
| 1968 | 1978 | .mmx, |
| 1969 | 1979 | .movbe, |
| 1970 | 1980 | .nopl, |
| 1971 | .pclmul, | |
| 1972 | 1981 | .pku, |
| 1973 | 1982 | .popcnt, |
| 1974 | 1983 | .prefer_256_bit, |
| ... | ... | @@ -1980,12 +1989,10 @@ pub const cpu = struct { |
| 1980 | 1989 | .sgx, |
| 1981 | 1990 | .sha, |
| 1982 | 1991 | .slow_3ops_lea, |
| 1983 | .sse4_2, | |
| 1984 | 1992 | .vaes, |
| 1985 | 1993 | .vpclmulqdq, |
| 1986 | 1994 | .vzeroupper, |
| 1987 | 1995 | .x87, |
| 1988 | .xsave, | |
| 1989 | 1996 | .xsavec, |
| 1990 | 1997 | .xsaveopt, |
| 1991 | 1998 | .xsaves, |
| ... | ... | @@ -1997,14 +2004,9 @@ pub const cpu = struct { |
| 1997 | 2004 | .features = featureSet(&[_]Feature{ |
| 1998 | 2005 | .@"64bit", |
| 1999 | 2006 | .adx, |
| 2000 | .aes, | |
| 2001 | .avx, | |
| 2002 | .avx2, | |
| 2003 | 2007 | .avx512bitalg, |
| 2004 | .avx512bw, | |
| 2005 | 2008 | .avx512cd, |
| 2006 | 2009 | .avx512dq, |
| 2007 | .avx512f, | |
| 2008 | 2010 | .avx512ifma, |
| 2009 | 2011 | .avx512vbmi, |
| 2010 | 2012 | .avx512vbmi2, |
| ... | ... | @@ -2017,28 +2019,24 @@ pub const cpu = struct { |
| 2017 | 2019 | .clwb, |
| 2018 | 2020 | .cmov, |
| 2019 | 2021 | .cx16, |
| 2020 | .cx8, | |
| 2021 | 2022 | .ermsb, |
| 2022 | .f16c, | |
| 2023 | 2023 | .fast_15bytenop, |
| 2024 | 2024 | .fast_gather, |
| 2025 | 2025 | .fast_scalar_fsqrt, |
| 2026 | 2026 | .fast_shld_rotate, |
| 2027 | 2027 | .fast_variable_shuffle, |
| 2028 | 2028 | .fast_vector_fsqrt, |
| 2029 | .fma, | |
| 2030 | 2029 | .fsgsbase, |
| 2030 | .fsrm, | |
| 2031 | 2031 | .fxsr, |
| 2032 | 2032 | .gfni, |
| 2033 | 2033 | .idivq_to_divl, |
| 2034 | 2034 | .invpcid, |
| 2035 | 2035 | .lzcnt, |
| 2036 | 2036 | .macrofusion, |
| 2037 | .merge_to_threeway_branch, | |
| 2038 | 2037 | .mmx, |
| 2039 | 2038 | .movbe, |
| 2040 | 2039 | .nopl, |
| 2041 | .pclmul, | |
| 2042 | 2040 | .pconfig, |
| 2043 | 2041 | .pku, |
| 2044 | 2042 | .popcnt, |
| ... | ... | @@ -2051,13 +2049,11 @@ pub const cpu = struct { |
| 2051 | 2049 | .sgx, |
| 2052 | 2050 | .sha, |
| 2053 | 2051 | .slow_3ops_lea, |
| 2054 | .sse4_2, | |
| 2055 | 2052 | .vaes, |
| 2056 | 2053 | .vpclmulqdq, |
| 2057 | 2054 | .vzeroupper, |
| 2058 | 2055 | .wbnoinvd, |
| 2059 | 2056 | .x87, |
| 2060 | .xsave, | |
| 2061 | 2057 | .xsavec, |
| 2062 | 2058 | .xsaveopt, |
| 2063 | 2059 | .xsaves, |
| ... | ... | @@ -2068,10 +2064,8 @@ pub const cpu = struct { |
| 2068 | 2064 | .llvm_name = "ivybridge", |
| 2069 | 2065 | .features = featureSet(&[_]Feature{ |
| 2070 | 2066 | .@"64bit", |
| 2071 | .avx, | |
| 2072 | 2067 | .cmov, |
| 2073 | 2068 | .cx16, |
| 2074 | .cx8, | |
| 2075 | 2069 | .f16c, |
| 2076 | 2070 | .false_deps_popcnt, |
| 2077 | 2071 | .fast_15bytenop, |
| ... | ... | @@ -2081,7 +2075,6 @@ pub const cpu = struct { |
| 2081 | 2075 | .fxsr, |
| 2082 | 2076 | .idivq_to_divl, |
| 2083 | 2077 | .macrofusion, |
| 2084 | .merge_to_threeway_branch, | |
| 2085 | 2078 | .mmx, |
| 2086 | 2079 | .nopl, |
| 2087 | 2080 | .pclmul, |
| ... | ... | @@ -2090,10 +2083,8 @@ pub const cpu = struct { |
| 2090 | 2083 | .sahf, |
| 2091 | 2084 | .slow_3ops_lea, |
| 2092 | 2085 | .slow_unaligned_mem_32, |
| 2093 | .sse4_2, | |
| 2094 | 2086 | .vzeroupper, |
| 2095 | 2087 | .x87, |
| 2096 | .xsave, | |
| 2097 | 2088 | .xsaveopt, |
| 2098 | 2089 | }), |
| 2099 | 2090 | }; |
| ... | ... | @@ -2156,7 +2147,6 @@ pub const cpu = struct { |
| 2156 | 2147 | .@"64bit", |
| 2157 | 2148 | .cmov, |
| 2158 | 2149 | .cx16, |
| 2159 | .cx8, | |
| 2160 | 2150 | .fast_scalar_shift_masks, |
| 2161 | 2151 | .fxsr, |
| 2162 | 2152 | .nopl, |
| ... | ... | @@ -2176,16 +2166,12 @@ pub const cpu = struct { |
| 2176 | 2166 | .aes, |
| 2177 | 2167 | .avx512cd, |
| 2178 | 2168 | .avx512er, |
| 2179 | .avx512f, | |
| 2180 | 2169 | .avx512pf, |
| 2181 | 2170 | .bmi, |
| 2182 | 2171 | .bmi2, |
| 2183 | 2172 | .cmov, |
| 2184 | 2173 | .cx16, |
| 2185 | .cx8, | |
| 2186 | .f16c, | |
| 2187 | 2174 | .fast_gather, |
| 2188 | .fma, | |
| 2189 | 2175 | .fsgsbase, |
| 2190 | 2176 | .fxsr, |
| 2191 | 2177 | .idivq_to_divl, |
| ... | ... | @@ -2206,7 +2192,6 @@ pub const cpu = struct { |
| 2206 | 2192 | .slow_pmaddwd, |
| 2207 | 2193 | .slow_two_mem_ops, |
| 2208 | 2194 | .x87, |
| 2209 | .xsave, | |
| 2210 | 2195 | .xsaveopt, |
| 2211 | 2196 | }), |
| 2212 | 2197 | }; |
| ... | ... | @@ -2219,17 +2204,13 @@ pub const cpu = struct { |
| 2219 | 2204 | .aes, |
| 2220 | 2205 | .avx512cd, |
| 2221 | 2206 | .avx512er, |
| 2222 | .avx512f, | |
| 2223 | 2207 | .avx512pf, |
| 2224 | 2208 | .avx512vpopcntdq, |
| 2225 | 2209 | .bmi, |
| 2226 | 2210 | .bmi2, |
| 2227 | 2211 | .cmov, |
| 2228 | 2212 | .cx16, |
| 2229 | .cx8, | |
| 2230 | .f16c, | |
| 2231 | 2213 | .fast_gather, |
| 2232 | .fma, | |
| 2233 | 2214 | .fsgsbase, |
| 2234 | 2215 | .fxsr, |
| 2235 | 2216 | .idivq_to_divl, |
| ... | ... | @@ -2250,7 +2231,6 @@ pub const cpu = struct { |
| 2250 | 2231 | .slow_pmaddwd, |
| 2251 | 2232 | .slow_two_mem_ops, |
| 2252 | 2233 | .x87, |
| 2253 | .xsave, | |
| 2254 | 2234 | .xsaveopt, |
| 2255 | 2235 | }), |
| 2256 | 2236 | }; |
| ... | ... | @@ -2258,6 +2238,8 @@ pub const cpu = struct { |
| 2258 | 2238 | .name = "lakemont", |
| 2259 | 2239 | .llvm_name = "lakemont", |
| 2260 | 2240 | .features = featureSet(&[_]Feature{ |
| 2241 | .cx8, | |
| 2242 | .slow_unaligned_mem_16, | |
| 2261 | 2243 | .vzeroupper, |
| 2262 | 2244 | }), |
| 2263 | 2245 | }; |
| ... | ... | @@ -2268,7 +2250,6 @@ pub const cpu = struct { |
| 2268 | 2250 | .@"64bit", |
| 2269 | 2251 | .cmov, |
| 2270 | 2252 | .cx16, |
| 2271 | .cx8, | |
| 2272 | 2253 | .fxsr, |
| 2273 | 2254 | .macrofusion, |
| 2274 | 2255 | .mmx, |
| ... | ... | @@ -2287,7 +2268,6 @@ pub const cpu = struct { |
| 2287 | 2268 | .@"64bit", |
| 2288 | 2269 | .cmov, |
| 2289 | 2270 | .cx16, |
| 2290 | .cx8, | |
| 2291 | 2271 | .fxsr, |
| 2292 | 2272 | .mmx, |
| 2293 | 2273 | .nopl, |
| ... | ... | @@ -2323,7 +2303,6 @@ pub const cpu = struct { |
| 2323 | 2303 | .@"64bit", |
| 2324 | 2304 | .cmov, |
| 2325 | 2305 | .cx16, |
| 2326 | .cx8, | |
| 2327 | 2306 | .fast_scalar_shift_masks, |
| 2328 | 2307 | .fxsr, |
| 2329 | 2308 | .nopl, |
| ... | ... | @@ -2341,7 +2320,6 @@ pub const cpu = struct { |
| 2341 | 2320 | .@"64bit", |
| 2342 | 2321 | .cmov, |
| 2343 | 2322 | .cx16, |
| 2344 | .cx8, | |
| 2345 | 2323 | .fxsr, |
| 2346 | 2324 | .macrofusion, |
| 2347 | 2325 | .mmx, |
| ... | ... | @@ -2363,32 +2341,6 @@ pub const cpu = struct { |
| 2363 | 2341 | .x87, |
| 2364 | 2342 | }), |
| 2365 | 2343 | }; |
| 2366 | pub const pentium_m = CpuModel{ | |
| 2367 | .name = "pentium_m", | |
| 2368 | .llvm_name = "pentium-m", | |
| 2369 | .features = featureSet(&[_]Feature{ | |
| 2370 | .cmov, | |
| 2371 | .cx8, | |
| 2372 | .fxsr, | |
| 2373 | .mmx, | |
| 2374 | .nopl, | |
| 2375 | .slow_unaligned_mem_16, | |
| 2376 | .sse2, | |
| 2377 | .vzeroupper, | |
| 2378 | .x87, | |
| 2379 | }), | |
| 2380 | }; | |
| 2381 | pub const pentium_mmx = CpuModel{ | |
| 2382 | .name = "pentium_mmx", | |
| 2383 | .llvm_name = "pentium-mmx", | |
| 2384 | .features = featureSet(&[_]Feature{ | |
| 2385 | .cx8, | |
| 2386 | .mmx, | |
| 2387 | .slow_unaligned_mem_16, | |
| 2388 | .vzeroupper, | |
| 2389 | .x87, | |
| 2390 | }), | |
| 2391 | }; | |
| 2392 | 2344 | pub const pentium2 = CpuModel{ |
| 2393 | 2345 | .name = "pentium2", |
| 2394 | 2346 | .llvm_name = "pentium2", |
| ... | ... | @@ -2463,6 +2415,32 @@ pub const cpu = struct { |
| 2463 | 2415 | .x87, |
| 2464 | 2416 | }), |
| 2465 | 2417 | }; |
| 2418 | pub const pentium_m = CpuModel{ | |
| 2419 | .name = "pentium_m", | |
| 2420 | .llvm_name = "pentium-m", | |
| 2421 | .features = featureSet(&[_]Feature{ | |
| 2422 | .cmov, | |
| 2423 | .cx8, | |
| 2424 | .fxsr, | |
| 2425 | .mmx, | |
| 2426 | .nopl, | |
| 2427 | .slow_unaligned_mem_16, | |
| 2428 | .sse2, | |
| 2429 | .vzeroupper, | |
| 2430 | .x87, | |
| 2431 | }), | |
| 2432 | }; | |
| 2433 | pub const pentium_mmx = CpuModel{ | |
| 2434 | .name = "pentium_mmx", | |
| 2435 | .llvm_name = "pentium-mmx", | |
| 2436 | .features = featureSet(&[_]Feature{ | |
| 2437 | .cx8, | |
| 2438 | .mmx, | |
| 2439 | .slow_unaligned_mem_16, | |
| 2440 | .vzeroupper, | |
| 2441 | .x87, | |
| 2442 | }), | |
| 2443 | }; | |
| 2466 | 2444 | pub const pentiumpro = CpuModel{ |
| 2467 | 2445 | .name = "pentiumpro", |
| 2468 | 2446 | .llvm_name = "pentiumpro", |
| ... | ... | @@ -2498,7 +2476,6 @@ pub const cpu = struct { |
| 2498 | 2476 | .avx, |
| 2499 | 2477 | .cmov, |
| 2500 | 2478 | .cx16, |
| 2501 | .cx8, | |
| 2502 | 2479 | .false_deps_popcnt, |
| 2503 | 2480 | .fast_15bytenop, |
| 2504 | 2481 | .fast_scalar_fsqrt, |
| ... | ... | @@ -2506,7 +2483,6 @@ pub const cpu = struct { |
| 2506 | 2483 | .fxsr, |
| 2507 | 2484 | .idivq_to_divl, |
| 2508 | 2485 | .macrofusion, |
| 2509 | .merge_to_threeway_branch, | |
| 2510 | 2486 | .mmx, |
| 2511 | 2487 | .nopl, |
| 2512 | 2488 | .pclmul, |
| ... | ... | @@ -2514,13 +2490,87 @@ pub const cpu = struct { |
| 2514 | 2490 | .sahf, |
| 2515 | 2491 | .slow_3ops_lea, |
| 2516 | 2492 | .slow_unaligned_mem_32, |
| 2517 | .sse4_2, | |
| 2518 | 2493 | .vzeroupper, |
| 2519 | 2494 | .x87, |
| 2520 | .xsave, | |
| 2521 | 2495 | .xsaveopt, |
| 2522 | 2496 | }), |
| 2523 | 2497 | }; |
| 2498 | pub const sapphirerapids = CpuModel{ | |
| 2499 | .name = "sapphirerapids", | |
| 2500 | .llvm_name = "sapphirerapids", | |
| 2501 | .features = featureSet(&[_]Feature{ | |
| 2502 | .@"64bit", | |
| 2503 | .adx, | |
| 2504 | .amx_bf16, | |
| 2505 | .amx_int8, | |
| 2506 | .avx512bf16, | |
| 2507 | .avx512bitalg, | |
| 2508 | .avx512cd, | |
| 2509 | .avx512dq, | |
| 2510 | .avx512ifma, | |
| 2511 | .avx512vbmi, | |
| 2512 | .avx512vbmi2, | |
| 2513 | .avx512vl, | |
| 2514 | .avx512vnni, | |
| 2515 | .avx512vp2intersect, | |
| 2516 | .avx512vpopcntdq, | |
| 2517 | .avxvnni, | |
| 2518 | .bmi, | |
| 2519 | .bmi2, | |
| 2520 | .cldemote, | |
| 2521 | .clflushopt, | |
| 2522 | .clwb, | |
| 2523 | .cmov, | |
| 2524 | .cx16, | |
| 2525 | .enqcmd, | |
| 2526 | .ermsb, | |
| 2527 | .fast_15bytenop, | |
| 2528 | .fast_gather, | |
| 2529 | .fast_scalar_fsqrt, | |
| 2530 | .fast_shld_rotate, | |
| 2531 | .fast_variable_shuffle, | |
| 2532 | .fast_vector_fsqrt, | |
| 2533 | .fsgsbase, | |
| 2534 | .fsrm, | |
| 2535 | .fxsr, | |
| 2536 | .gfni, | |
| 2537 | .idivq_to_divl, | |
| 2538 | .invpcid, | |
| 2539 | .lzcnt, | |
| 2540 | .macrofusion, | |
| 2541 | .mmx, | |
| 2542 | .movbe, | |
| 2543 | .movdir64b, | |
| 2544 | .movdiri, | |
| 2545 | .nopl, | |
| 2546 | .pconfig, | |
| 2547 | .pku, | |
| 2548 | .popcnt, | |
| 2549 | .prefer_256_bit, | |
| 2550 | .prfchw, | |
| 2551 | .ptwrite, | |
| 2552 | .rdpid, | |
| 2553 | .rdrnd, | |
| 2554 | .rdseed, | |
| 2555 | .sahf, | |
| 2556 | .serialize, | |
| 2557 | .sgx, | |
| 2558 | .sha, | |
| 2559 | .shstk, | |
| 2560 | .slow_3ops_lea, | |
| 2561 | .tsxldtrk, | |
| 2562 | .uintr, | |
| 2563 | .vaes, | |
| 2564 | .vpclmulqdq, | |
| 2565 | .vzeroupper, | |
| 2566 | .waitpkg, | |
| 2567 | .wbnoinvd, | |
| 2568 | .x87, | |
| 2569 | .xsavec, | |
| 2570 | .xsaveopt, | |
| 2571 | .xsaves, | |
| 2572 | }), | |
| 2573 | }; | |
| 2524 | 2574 | pub const silvermont = CpuModel{ |
| 2525 | 2575 | .name = "silvermont", |
| 2526 | 2576 | .llvm_name = "silvermont", |
| ... | ... | @@ -2528,7 +2578,6 @@ pub const cpu = struct { |
| 2528 | 2578 | .@"64bit", |
| 2529 | 2579 | .cmov, |
| 2530 | 2580 | .cx16, |
| 2531 | .cx8, | |
| 2532 | 2581 | .false_deps_popcnt, |
| 2533 | 2582 | .fast_7bytenop, |
| 2534 | 2583 | .fxsr, |
| ... | ... | @@ -2546,7 +2595,6 @@ pub const cpu = struct { |
| 2546 | 2595 | .slow_pmulld, |
| 2547 | 2596 | .slow_two_mem_ops, |
| 2548 | 2597 | .sse4_2, |
| 2549 | .ssse3, | |
| 2550 | 2598 | .vzeroupper, |
| 2551 | 2599 | .x87, |
| 2552 | 2600 | }), |
| ... | ... | @@ -2558,12 +2606,9 @@ pub const cpu = struct { |
| 2558 | 2606 | .@"64bit", |
| 2559 | 2607 | .adx, |
| 2560 | 2608 | .aes, |
| 2561 | .avx, | |
| 2562 | .avx2, | |
| 2563 | 2609 | .avx512bw, |
| 2564 | 2610 | .avx512cd, |
| 2565 | 2611 | .avx512dq, |
| 2566 | .avx512f, | |
| 2567 | 2612 | .avx512vl, |
| 2568 | 2613 | .bmi, |
| 2569 | 2614 | .bmi2, |
| ... | ... | @@ -2571,9 +2616,7 @@ pub const cpu = struct { |
| 2571 | 2616 | .clwb, |
| 2572 | 2617 | .cmov, |
| 2573 | 2618 | .cx16, |
| 2574 | .cx8, | |
| 2575 | 2619 | .ermsb, |
| 2576 | .f16c, | |
| 2577 | 2620 | .false_deps_popcnt, |
| 2578 | 2621 | .fast_15bytenop, |
| 2579 | 2622 | .fast_gather, |
| ... | ... | @@ -2581,14 +2624,12 @@ pub const cpu = struct { |
| 2581 | 2624 | .fast_shld_rotate, |
| 2582 | 2625 | .fast_variable_shuffle, |
| 2583 | 2626 | .fast_vector_fsqrt, |
| 2584 | .fma, | |
| 2585 | 2627 | .fsgsbase, |
| 2586 | 2628 | .fxsr, |
| 2587 | 2629 | .idivq_to_divl, |
| 2588 | 2630 | .invpcid, |
| 2589 | 2631 | .lzcnt, |
| 2590 | 2632 | .macrofusion, |
| 2591 | .merge_to_threeway_branch, | |
| 2592 | 2633 | .mmx, |
| 2593 | 2634 | .movbe, |
| 2594 | 2635 | .nopl, |
| ... | ... | @@ -2601,10 +2642,8 @@ pub const cpu = struct { |
| 2601 | 2642 | .rdseed, |
| 2602 | 2643 | .sahf, |
| 2603 | 2644 | .slow_3ops_lea, |
| 2604 | .sse4_2, | |
| 2605 | 2645 | .vzeroupper, |
| 2606 | 2646 | .x87, |
| 2607 | .xsave, | |
| 2608 | 2647 | .xsavec, |
| 2609 | 2648 | .xsaveopt, |
| 2610 | 2649 | .xsaves, |
| ... | ... | @@ -2617,14 +2656,12 @@ pub const cpu = struct { |
| 2617 | 2656 | .@"64bit", |
| 2618 | 2657 | .adx, |
| 2619 | 2658 | .aes, |
| 2620 | .avx, | |
| 2621 | 2659 | .avx2, |
| 2622 | 2660 | .bmi, |
| 2623 | 2661 | .bmi2, |
| 2624 | 2662 | .clflushopt, |
| 2625 | 2663 | .cmov, |
| 2626 | 2664 | .cx16, |
| 2627 | .cx8, | |
| 2628 | 2665 | .ermsb, |
| 2629 | 2666 | .f16c, |
| 2630 | 2667 | .false_deps_popcnt, |
| ... | ... | @@ -2641,7 +2678,6 @@ pub const cpu = struct { |
| 2641 | 2678 | .invpcid, |
| 2642 | 2679 | .lzcnt, |
| 2643 | 2680 | .macrofusion, |
| 2644 | .merge_to_threeway_branch, | |
| 2645 | 2681 | .mmx, |
| 2646 | 2682 | .movbe, |
| 2647 | 2683 | .nopl, |
| ... | ... | @@ -2653,10 +2689,8 @@ pub const cpu = struct { |
| 2653 | 2689 | .sahf, |
| 2654 | 2690 | .sgx, |
| 2655 | 2691 | .slow_3ops_lea, |
| 2656 | .sse4_2, | |
| 2657 | 2692 | .vzeroupper, |
| 2658 | 2693 | .x87, |
| 2659 | .xsave, | |
| 2660 | 2694 | .xsavec, |
| 2661 | 2695 | .xsaveopt, |
| 2662 | 2696 | .xsaves, |
| ... | ... | @@ -2669,12 +2703,9 @@ pub const cpu = struct { |
| 2669 | 2703 | .@"64bit", |
| 2670 | 2704 | .adx, |
| 2671 | 2705 | .aes, |
| 2672 | .avx, | |
| 2673 | .avx2, | |
| 2674 | 2706 | .avx512bw, |
| 2675 | 2707 | .avx512cd, |
| 2676 | 2708 | .avx512dq, |
| 2677 | .avx512f, | |
| 2678 | 2709 | .avx512vl, |
| 2679 | 2710 | .bmi, |
| 2680 | 2711 | .bmi2, |
| ... | ... | @@ -2682,9 +2713,7 @@ pub const cpu = struct { |
| 2682 | 2713 | .clwb, |
| 2683 | 2714 | .cmov, |
| 2684 | 2715 | .cx16, |
| 2685 | .cx8, | |
| 2686 | 2716 | .ermsb, |
| 2687 | .f16c, | |
| 2688 | 2717 | .false_deps_popcnt, |
| 2689 | 2718 | .fast_15bytenop, |
| 2690 | 2719 | .fast_gather, |
| ... | ... | @@ -2692,14 +2721,12 @@ pub const cpu = struct { |
| 2692 | 2721 | .fast_shld_rotate, |
| 2693 | 2722 | .fast_variable_shuffle, |
| 2694 | 2723 | .fast_vector_fsqrt, |
| 2695 | .fma, | |
| 2696 | 2724 | .fsgsbase, |
| 2697 | 2725 | .fxsr, |
| 2698 | 2726 | .idivq_to_divl, |
| 2699 | 2727 | .invpcid, |
| 2700 | 2728 | .lzcnt, |
| 2701 | 2729 | .macrofusion, |
| 2702 | .merge_to_threeway_branch, | |
| 2703 | 2730 | .mmx, |
| 2704 | 2731 | .movbe, |
| 2705 | 2732 | .nopl, |
| ... | ... | @@ -2712,10 +2739,8 @@ pub const cpu = struct { |
| 2712 | 2739 | .rdseed, |
| 2713 | 2740 | .sahf, |
| 2714 | 2741 | .slow_3ops_lea, |
| 2715 | .sse4_2, | |
| 2716 | 2742 | .vzeroupper, |
| 2717 | 2743 | .x87, |
| 2718 | .xsave, | |
| 2719 | 2744 | .xsavec, |
| 2720 | 2745 | .xsaveopt, |
| 2721 | 2746 | .xsaves, |
| ... | ... | @@ -2728,7 +2753,6 @@ pub const cpu = struct { |
| 2728 | 2753 | .@"64bit", |
| 2729 | 2754 | .cmov, |
| 2730 | 2755 | .cx16, |
| 2731 | .cx8, | |
| 2732 | 2756 | .false_deps_popcnt, |
| 2733 | 2757 | .fast_7bytenop, |
| 2734 | 2758 | .fxsr, |
| ... | ... | @@ -2746,7 +2770,6 @@ pub const cpu = struct { |
| 2746 | 2770 | .slow_pmulld, |
| 2747 | 2771 | .slow_two_mem_ops, |
| 2748 | 2772 | .sse4_2, |
| 2749 | .ssse3, | |
| 2750 | 2773 | .vzeroupper, |
| 2751 | 2774 | .x87, |
| 2752 | 2775 | }), |
| ... | ... | @@ -2757,14 +2780,9 @@ pub const cpu = struct { |
| 2757 | 2780 | .features = featureSet(&[_]Feature{ |
| 2758 | 2781 | .@"64bit", |
| 2759 | 2782 | .adx, |
| 2760 | .aes, | |
| 2761 | .avx, | |
| 2762 | .avx2, | |
| 2763 | 2783 | .avx512bitalg, |
| 2764 | .avx512bw, | |
| 2765 | 2784 | .avx512cd, |
| 2766 | 2785 | .avx512dq, |
| 2767 | .avx512f, | |
| 2768 | 2786 | .avx512ifma, |
| 2769 | 2787 | .avx512vbmi, |
| 2770 | 2788 | .avx512vbmi2, |
| ... | ... | @@ -2778,30 +2796,26 @@ pub const cpu = struct { |
| 2778 | 2796 | .clwb, |
| 2779 | 2797 | .cmov, |
| 2780 | 2798 | .cx16, |
| 2781 | .cx8, | |
| 2782 | 2799 | .ermsb, |
| 2783 | .f16c, | |
| 2784 | 2800 | .fast_15bytenop, |
| 2785 | 2801 | .fast_gather, |
| 2786 | 2802 | .fast_scalar_fsqrt, |
| 2787 | 2803 | .fast_shld_rotate, |
| 2788 | 2804 | .fast_variable_shuffle, |
| 2789 | 2805 | .fast_vector_fsqrt, |
| 2790 | .fma, | |
| 2791 | 2806 | .fsgsbase, |
| 2807 | .fsrm, | |
| 2792 | 2808 | .fxsr, |
| 2793 | 2809 | .gfni, |
| 2794 | 2810 | .idivq_to_divl, |
| 2795 | 2811 | .invpcid, |
| 2796 | 2812 | .lzcnt, |
| 2797 | 2813 | .macrofusion, |
| 2798 | .merge_to_threeway_branch, | |
| 2799 | 2814 | .mmx, |
| 2800 | 2815 | .movbe, |
| 2801 | 2816 | .movdir64b, |
| 2802 | 2817 | .movdiri, |
| 2803 | 2818 | .nopl, |
| 2804 | .pclmul, | |
| 2805 | 2819 | .pku, |
| 2806 | 2820 | .popcnt, |
| 2807 | 2821 | .prefer_256_bit, |
| ... | ... | @@ -2814,12 +2828,10 @@ pub const cpu = struct { |
| 2814 | 2828 | .sha, |
| 2815 | 2829 | .shstk, |
| 2816 | 2830 | .slow_3ops_lea, |
| 2817 | .sse4_2, | |
| 2818 | 2831 | .vaes, |
| 2819 | 2832 | .vpclmulqdq, |
| 2820 | 2833 | .vzeroupper, |
| 2821 | 2834 | .x87, |
| 2822 | .xsave, | |
| 2823 | 2835 | .xsavec, |
| 2824 | 2836 | .xsaveopt, |
| 2825 | 2837 | .xsaves, |
| ... | ... | @@ -2835,7 +2847,6 @@ pub const cpu = struct { |
| 2835 | 2847 | .clwb, |
| 2836 | 2848 | .cmov, |
| 2837 | 2849 | .cx16, |
| 2838 | .cx8, | |
| 2839 | 2850 | .fsgsbase, |
| 2840 | 2851 | .fxsr, |
| 2841 | 2852 | .gfni, |
| ... | ... | @@ -2856,11 +2867,9 @@ pub const cpu = struct { |
| 2856 | 2867 | .slow_lea, |
| 2857 | 2868 | .slow_two_mem_ops, |
| 2858 | 2869 | .sse4_2, |
| 2859 | .ssse3, | |
| 2860 | 2870 | .use_glm_div_sqrt_costs, |
| 2861 | 2871 | .vzeroupper, |
| 2862 | 2872 | .x87, |
| 2863 | .xsave, | |
| 2864 | 2873 | .xsavec, |
| 2865 | 2874 | .xsaveopt, |
| 2866 | 2875 | .xsaves, |
| ... | ... | @@ -2873,7 +2882,6 @@ pub const cpu = struct { |
| 2873 | 2882 | .@"64bit", |
| 2874 | 2883 | .cmov, |
| 2875 | 2884 | .cx16, |
| 2876 | .cx8, | |
| 2877 | 2885 | .fxsr, |
| 2878 | 2886 | .macrofusion, |
| 2879 | 2887 | .mmx, |
| ... | ... | @@ -2886,21 +2894,21 @@ pub const cpu = struct { |
| 2886 | 2894 | .x87, |
| 2887 | 2895 | }), |
| 2888 | 2896 | }; |
| 2889 | pub const winchip_c6 = CpuModel{ | |
| 2890 | .name = "winchip_c6", | |
| 2891 | .llvm_name = "winchip-c6", | |
| 2897 | pub const winchip2 = CpuModel{ | |
| 2898 | .name = "winchip2", | |
| 2899 | .llvm_name = "winchip2", | |
| 2892 | 2900 | .features = featureSet(&[_]Feature{ |
| 2893 | .mmx, | |
| 2901 | .@"3dnow", | |
| 2894 | 2902 | .slow_unaligned_mem_16, |
| 2895 | 2903 | .vzeroupper, |
| 2896 | 2904 | .x87, |
| 2897 | 2905 | }), |
| 2898 | 2906 | }; |
| 2899 | pub const winchip2 = CpuModel{ | |
| 2900 | .name = "winchip2", | |
| 2901 | .llvm_name = "winchip2", | |
| 2907 | pub const winchip_c6 = CpuModel{ | |
| 2908 | .name = "winchip_c6", | |
| 2909 | .llvm_name = "winchip-c6", | |
| 2902 | 2910 | .features = featureSet(&[_]Feature{ |
| 2903 | .@"3dnow", | |
| 2911 | .mmx, | |
| 2904 | 2912 | .slow_unaligned_mem_16, |
| 2905 | 2913 | .vzeroupper, |
| 2906 | 2914 | .x87, |
| ... | ... | @@ -2925,6 +2933,100 @@ pub const cpu = struct { |
| 2925 | 2933 | .x87, |
| 2926 | 2934 | }), |
| 2927 | 2935 | }; |
| 2936 | pub const x86_64_v2 = CpuModel{ | |
| 2937 | .name = "x86_64_v2", | |
| 2938 | .llvm_name = "x86-64-v2", | |
| 2939 | .features = featureSet(&[_]Feature{ | |
| 2940 | .@"64bit", | |
| 2941 | .cmov, | |
| 2942 | .cx16, | |
| 2943 | .false_deps_popcnt, | |
| 2944 | .fast_15bytenop, | |
| 2945 | .fast_scalar_fsqrt, | |
| 2946 | .fast_shld_rotate, | |
| 2947 | .fxsr, | |
| 2948 | .idivq_to_divl, | |
| 2949 | .macrofusion, | |
| 2950 | .mmx, | |
| 2951 | .nopl, | |
| 2952 | .popcnt, | |
| 2953 | .sahf, | |
| 2954 | .slow_3ops_lea, | |
| 2955 | .slow_unaligned_mem_32, | |
| 2956 | .sse4_2, | |
| 2957 | .vzeroupper, | |
| 2958 | .x87, | |
| 2959 | }), | |
| 2960 | }; | |
| 2961 | pub const x86_64_v3 = CpuModel{ | |
| 2962 | .name = "x86_64_v3", | |
| 2963 | .llvm_name = "x86-64-v3", | |
| 2964 | .features = featureSet(&[_]Feature{ | |
| 2965 | .@"64bit", | |
| 2966 | .avx2, | |
| 2967 | .bmi, | |
| 2968 | .bmi2, | |
| 2969 | .cmov, | |
| 2970 | .cx16, | |
| 2971 | .f16c, | |
| 2972 | .false_deps_lzcnt_tzcnt, | |
| 2973 | .false_deps_popcnt, | |
| 2974 | .fast_15bytenop, | |
| 2975 | .fast_scalar_fsqrt, | |
| 2976 | .fast_shld_rotate, | |
| 2977 | .fast_variable_shuffle, | |
| 2978 | .fma, | |
| 2979 | .fxsr, | |
| 2980 | .idivq_to_divl, | |
| 2981 | .lzcnt, | |
| 2982 | .macrofusion, | |
| 2983 | .mmx, | |
| 2984 | .movbe, | |
| 2985 | .nopl, | |
| 2986 | .popcnt, | |
| 2987 | .sahf, | |
| 2988 | .slow_3ops_lea, | |
| 2989 | .vzeroupper, | |
| 2990 | .x87, | |
| 2991 | .xsave, | |
| 2992 | }), | |
| 2993 | }; | |
| 2994 | pub const x86_64_v4 = CpuModel{ | |
| 2995 | .name = "x86_64_v4", | |
| 2996 | .llvm_name = "x86-64-v4", | |
| 2997 | .features = featureSet(&[_]Feature{ | |
| 2998 | .@"64bit", | |
| 2999 | .avx512bw, | |
| 3000 | .avx512cd, | |
| 3001 | .avx512dq, | |
| 3002 | .avx512vl, | |
| 3003 | .bmi, | |
| 3004 | .bmi2, | |
| 3005 | .cmov, | |
| 3006 | .cx16, | |
| 3007 | .false_deps_popcnt, | |
| 3008 | .fast_15bytenop, | |
| 3009 | .fast_gather, | |
| 3010 | .fast_scalar_fsqrt, | |
| 3011 | .fast_shld_rotate, | |
| 3012 | .fast_variable_shuffle, | |
| 3013 | .fast_vector_fsqrt, | |
| 3014 | .fxsr, | |
| 3015 | .idivq_to_divl, | |
| 3016 | .lzcnt, | |
| 3017 | .macrofusion, | |
| 3018 | .mmx, | |
| 3019 | .movbe, | |
| 3020 | .nopl, | |
| 3021 | .popcnt, | |
| 3022 | .prefer_256_bit, | |
| 3023 | .sahf, | |
| 3024 | .slow_3ops_lea, | |
| 3025 | .vzeroupper, | |
| 3026 | .x87, | |
| 3027 | .xsave, | |
| 3028 | }), | |
| 3029 | }; | |
| 2928 | 3030 | pub const yonah = CpuModel{ |
| 2929 | 3031 | .name = "yonah", |
| 2930 | 3032 | .llvm_name = "yonah", |
| ... | ... | @@ -2979,7 +3081,6 @@ pub const cpu = struct { |
| 2979 | 3081 | .sse4a, |
| 2980 | 3082 | .vzeroupper, |
| 2981 | 3083 | .x87, |
| 2982 | .xsave, | |
| 2983 | 3084 | .xsavec, |
| 2984 | 3085 | .xsaveopt, |
| 2985 | 3086 | .xsaves, |
| ... | ... | @@ -3027,7 +3128,56 @@ pub const cpu = struct { |
| 3027 | 3128 | .vzeroupper, |
| 3028 | 3129 | .wbnoinvd, |
| 3029 | 3130 | .x87, |
| 3030 | .xsave, | |
| 3131 | .xsavec, | |
| 3132 | .xsaveopt, | |
| 3133 | .xsaves, | |
| 3134 | }), | |
| 3135 | }; | |
| 3136 | pub const znver3 = CpuModel{ | |
| 3137 | .name = "znver3", | |
| 3138 | .llvm_name = "znver3", | |
| 3139 | .features = featureSet(&[_]Feature{ | |
| 3140 | .@"64bit", | |
| 3141 | .adx, | |
| 3142 | .avx2, | |
| 3143 | .bmi, | |
| 3144 | .bmi2, | |
| 3145 | .branchfusion, | |
| 3146 | .clflushopt, | |
| 3147 | .clwb, | |
| 3148 | .clzero, | |
| 3149 | .cmov, | |
| 3150 | .cx16, | |
| 3151 | .f16c, | |
| 3152 | .fast_15bytenop, | |
| 3153 | .fast_bextr, | |
| 3154 | .fast_lzcnt, | |
| 3155 | .fast_scalar_shift_masks, | |
| 3156 | .fma, | |
| 3157 | .fsgsbase, | |
| 3158 | .fsrm, | |
| 3159 | .fxsr, | |
| 3160 | .invpcid, | |
| 3161 | .lzcnt, | |
| 3162 | .mmx, | |
| 3163 | .movbe, | |
| 3164 | .mwaitx, | |
| 3165 | .nopl, | |
| 3166 | .pku, | |
| 3167 | .popcnt, | |
| 3168 | .prfchw, | |
| 3169 | .rdpid, | |
| 3170 | .rdrnd, | |
| 3171 | .rdseed, | |
| 3172 | .sahf, | |
| 3173 | .sha, | |
| 3174 | .slow_shld, | |
| 3175 | .sse4a, | |
| 3176 | .vaes, | |
| 3177 | .vpclmulqdq, | |
| 3178 | .vzeroupper, | |
| 3179 | .wbnoinvd, | |
| 3180 | .x87, | |
| 3031 | 3181 | .xsavec, |
| 3032 | 3182 | .xsaveopt, |
| 3033 | 3183 | .xsaves, |
lib/std/zig/cross_target.zig+2-2| ... | ... | @@ -111,11 +111,11 @@ pub const CrossTarget = struct { |
| 111 | 111 | .kfreebsd, |
| 112 | 112 | .lv2, |
| 113 | 113 | .solaris, |
| 114 | .zos, | |
| 114 | 115 | .haiku, |
| 115 | 116 | .minix, |
| 116 | 117 | .rtems, |
| 117 | 118 | .nacl, |
| 118 | .cnk, | |
| 119 | 119 | .aix, |
| 120 | 120 | .cuda, |
| 121 | 121 | .nvcl, |
| ... | ... | @@ -714,11 +714,11 @@ pub const CrossTarget = struct { |
| 714 | 714 | .kfreebsd, |
| 715 | 715 | .lv2, |
| 716 | 716 | .solaris, |
| 717 | .zos, | |
| 717 | 718 | .haiku, |
| 718 | 719 | .minix, |
| 719 | 720 | .rtems, |
| 720 | 721 | .nacl, |
| 721 | .cnk, | |
| 722 | 722 | .aix, |
| 723 | 723 | .cuda, |
| 724 | 724 | .nvcl, |
lib/std/zig/system.zig+27-5| ... | ... | @@ -326,11 +326,33 @@ pub const NativeTargetInfo = struct { |
| 326 | 326 | cpu_detection_unimplemented = true; |
| 327 | 327 | break :backup_cpu_detection Target.Cpu.baseline(cpu_arch); |
| 328 | 328 | }; |
| 329 | cross_target.updateCpuFeatures(&cpu.features); | |
| 330 | ||
| 331 | var target = try detectAbiAndDynamicLinker(allocator, cpu, os, cross_target); | |
| 332 | target.cpu_detection_unimplemented = cpu_detection_unimplemented; | |
| 333 | return target; | |
| 329 | var result = try detectAbiAndDynamicLinker(allocator, cpu, os, cross_target); | |
| 330 | // For x86, we need to populate some CPU feature flags depending on architecture | |
| 331 | // and mode: | |
| 332 | // * 16bit_mode => if the abi is code16 | |
| 333 | // * 32bit_mode => if the arch is i386 | |
| 334 | // However, the "mode" flags can be used as overrides, so if the user explicitly | |
| 335 | // sets one of them, that takes precedence. | |
| 336 | switch (cpu_arch) { | |
| 337 | .i386 => { | |
| 338 | if (!std.Target.x86.featureSetHasAny(cross_target.cpu_features_add, .{ | |
| 339 | .@"16bit_mode", .@"32bit_mode", | |
| 340 | })) { | |
| 341 | switch (result.target.abi) { | |
| 342 | .code16 => result.target.cpu.features.addFeature( | |
| 343 | @enumToInt(std.Target.x86.Feature.@"16bit_mode"), | |
| 344 | ), | |
| 345 | else => result.target.cpu.features.addFeature( | |
| 346 | @enumToInt(std.Target.x86.Feature.@"32bit_mode"), | |
| 347 | ), | |
| 348 | } | |
| 349 | } | |
| 350 | }, | |
| 351 | else => {}, | |
| 352 | } | |
| 353 | cross_target.updateCpuFeatures(&result.target.cpu.features); | |
| 354 | result.cpu_detection_unimplemented = cpu_detection_unimplemented; | |
| 355 | return result; | |
| 334 | 356 | } |
| 335 | 357 | |
| 336 | 358 | /// First we attempt to use the executable's own binary. If it is dynamically |
lib/std/zig/system/x86.zig+4| ... | ... | @@ -311,6 +311,10 @@ fn detectAMDProcessor(cpu: *Target.Cpu, family: u32, model: u32) void { |
| 311 | 311 | } |
| 312 | 312 | return; |
| 313 | 313 | }, |
| 314 | 25 => { | |
| 315 | cpu.model = &Target.x86.cpu.znver3; | |
| 316 | return; | |
| 317 | }, | |
| 314 | 318 | else => { |
| 315 | 319 | return; |
| 316 | 320 | }, |
src/Compilation.zig+2-5| ... | ... | @@ -2345,6 +2345,7 @@ pub fn addCCArgs( |
| 2345 | 2345 | } |
| 2346 | 2346 | try argv.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 2347 | 2347 | try argv.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 2348 | try argv.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); | |
| 2348 | 2349 | } |
| 2349 | 2350 | |
| 2350 | 2351 | const llvm_triple = try @import("codegen/llvm.zig").targetTriple(arena, target); |
| ... | ... | @@ -2927,11 +2928,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8 |
| 2927 | 2928 | const index = @intCast(std.Target.Cpu.Feature.Set.Index, index_usize); |
| 2928 | 2929 | const is_enabled = target.cpu.features.isEnabled(index); |
| 2929 | 2930 | if (is_enabled) { |
| 2930 | // TODO some kind of "zig identifier escape" function rather than | |
| 2931 | // unconditionally using @"" syntax | |
| 2932 | try buffer.appendSlice(" .@\""); | |
| 2933 | try buffer.appendSlice(feature.name); | |
| 2934 | try buffer.appendSlice("\",\n"); | |
| 2931 | try buffer.writer().print(" .{},\n", .{std.zig.fmtId(feature.name)}); | |
| 2935 | 2932 | } |
| 2936 | 2933 | } |
| 2937 | 2934 |
src/clang.zig+11-4| ... | ... | @@ -424,7 +424,7 @@ pub const Expr = opaque { |
| 424 | 424 | extern fn ZigClangExpr_getBeginLoc(*const Expr) SourceLocation; |
| 425 | 425 | |
| 426 | 426 | pub const evaluateAsConstantExpr = ZigClangExpr_EvaluateAsConstantExpr; |
| 427 | extern fn ZigClangExpr_EvaluateAsConstantExpr(*const Expr, *ExprEvalResult, Expr_ConstExprUsage, *const ASTContext) bool; | |
| 427 | extern fn ZigClangExpr_EvaluateAsConstantExpr(*const Expr, *ExprEvalResult, Expr_ConstantExprKind, *const ASTContext) bool; | |
| 428 | 428 | }; |
| 429 | 429 | |
| 430 | 430 | pub const FieldDecl = opaque { |
| ... | ... | @@ -1341,6 +1341,8 @@ pub const CK = extern enum { |
| 1341 | 1341 | IntegralCast, |
| 1342 | 1342 | IntegralToBoolean, |
| 1343 | 1343 | IntegralToFloating, |
| 1344 | FloatingToFixedPoint, | |
| 1345 | FixedPointToFloating, | |
| 1344 | 1346 | FixedPointCast, |
| 1345 | 1347 | FixedPointToIntegral, |
| 1346 | 1348 | IntegralToFixedPoint, |
| ... | ... | @@ -1447,6 +1449,7 @@ pub const DeclKind = extern enum { |
| 1447 | 1449 | MSGuid, |
| 1448 | 1450 | OMPDeclareMapper, |
| 1449 | 1451 | OMPDeclareReduction, |
| 1452 | TemplateParamObject, | |
| 1450 | 1453 | UnresolvedUsingValue, |
| 1451 | 1454 | OMPAllocate, |
| 1452 | 1455 | OMPRequires, |
| ... | ... | @@ -1557,6 +1560,8 @@ pub const BuiltinTypeKind = extern enum { |
| 1557 | 1560 | SveFloat64x4, |
| 1558 | 1561 | SveBFloat16x4, |
| 1559 | 1562 | SveBool, |
| 1563 | VectorQuad, | |
| 1564 | VectorPair, | |
| 1560 | 1565 | Void, |
| 1561 | 1566 | Bool, |
| 1562 | 1567 | Char_U, |
| ... | ... | @@ -1710,9 +1715,11 @@ pub const PreprocessedEntity_EntityKind = extern enum { |
| 1710 | 1715 | InclusionDirectiveKind, |
| 1711 | 1716 | }; |
| 1712 | 1717 | |
| 1713 | pub const Expr_ConstExprUsage = extern enum { | |
| 1714 | EvaluateForCodeGen, | |
| 1715 | EvaluateForMangling, | |
| 1718 | pub const Expr_ConstantExprKind = extern enum { | |
| 1719 | Normal, | |
| 1720 | NonClassTemplateArgument, | |
| 1721 | ClassTemplateArgument, | |
| 1722 | ImmediateInvocation, | |
| 1716 | 1723 | }; |
| 1717 | 1724 | |
| 1718 | 1725 | pub const UnaryExprOrTypeTrait_Kind = extern enum { |
src/clang_options_data.zig+181-78| ... | ... | @@ -15,7 +15,7 @@ flagpd1("CC"), |
| 15 | 15 | flagpd1("EB"), |
| 16 | 16 | flagpd1("EL"), |
| 17 | 17 | flagpd1("Eonly"), |
| 18 | flagpd1("fAAPCSBitfieldLoad"), | |
| 18 | flagpd1("faapcs-bitfield-load"), | |
| 19 | 19 | flagpd1("H"), |
| 20 | 20 | .{ |
| 21 | 21 | .name = "<input>", |
| ... | ... | @@ -1027,14 +1027,6 @@ flagpsl("MT"), |
| 1027 | 1027 | .pd2 = false, |
| 1028 | 1028 | .psl = true, |
| 1029 | 1029 | }, |
| 1030 | .{ | |
| 1031 | .name = "Zd", | |
| 1032 | .syntax = .flag, | |
| 1033 | .zig_equivalent = .other, | |
| 1034 | .pd1 = true, | |
| 1035 | .pd2 = false, | |
| 1036 | .psl = true, | |
| 1037 | }, | |
| 1038 | 1030 | .{ |
| 1039 | 1031 | .name = "Ze", |
| 1040 | 1032 | .syntax = .flag, |
| ... | ... | @@ -2073,49 +2065,7 @@ flagpd1("analyzer-viz-egraph-graphviz"), |
| 2073 | 2065 | flagpd1("analyzer-werror"), |
| 2074 | 2066 | flagpd1("fslp-vectorize-aggressive"), |
| 2075 | 2067 | flagpd1("fno-slp-vectorize-aggressive"), |
| 2076 | flagpd1("fno-record-gcc-switches"), | |
| 2077 | flagpd1("fexpensive-optimizations"), | |
| 2078 | flagpd1("fno-expensive-optimizations"), | |
| 2079 | flagpd1("fdefer-pop"), | |
| 2080 | flagpd1("fno-defer-pop"), | |
| 2081 | flagpd1("fextended-identifiers"), | |
| 2082 | flagpd1("fno-extended-identifiers"), | |
| 2083 | flagpd1("fhonor-infinites"), | |
| 2084 | flagpd1("fno-honor-infinites"), | |
| 2085 | flagpd1("findirect-virtual-calls"), | |
| 2086 | sepd1("fnew-alignment"), | |
| 2087 | flagpd1("faligned-new"), | |
| 2088 | flagpd1("fno-aligned-new"), | |
| 2089 | flagpd1("fsched-interblock"), | |
| 2090 | flagpd1("ftree-vectorize"), | |
| 2091 | flagpd1("fno-tree-vectorize"), | |
| 2092 | flagpd1("ftree-slp-vectorize"), | |
| 2093 | flagpd1("fno-tree-slp-vectorize"), | |
| 2094 | flagpd1("fident"), | |
| 2095 | flagpd1("fterminated-vtables"), | |
| 2096 | flagpd1("grecord-gcc-switches"), | |
| 2097 | flagpd1("gno-record-gcc-switches"), | |
| 2098 | flagpd1("nocudainc"), | |
| 2099 | flagpd1("nocudalib"), | |
| 2100 | .{ | |
| 2101 | .name = "system-header-prefix", | |
| 2102 | .syntax = .separate, | |
| 2103 | .zig_equivalent = .other, | |
| 2104 | .pd1 = false, | |
| 2105 | .pd2 = true, | |
| 2106 | .psl = false, | |
| 2107 | }, | |
| 2108 | .{ | |
| 2109 | .name = "no-system-header-prefix", | |
| 2110 | .syntax = .separate, | |
| 2111 | .zig_equivalent = .other, | |
| 2112 | .pd1 = false, | |
| 2113 | .pd2 = true, | |
| 2114 | .psl = false, | |
| 2115 | }, | |
| 2116 | flagpd1("integrated-as"), | |
| 2117 | flagpd1("no-integrated-as"), | |
| 2118 | flagpd1("fno-ident"), | |
| 2068 | flagpd1("shared-libasan"), | |
| 2119 | 2069 | .{ |
| 2120 | 2070 | .name = "Gs", |
| 2121 | 2071 | .syntax = .flag, |
| ... | ... | @@ -2196,7 +2146,6 @@ flagpd1("fno-ident"), |
| 2196 | 2146 | .pd2 = false, |
| 2197 | 2147 | .psl = true, |
| 2198 | 2148 | }, |
| 2199 | flagpd1("fcuda-rdc"), | |
| 2200 | 2149 | .{ |
| 2201 | 2150 | .name = "Os", |
| 2202 | 2151 | .syntax = .flag, |
| ... | ... | @@ -2237,9 +2186,52 @@ flagpd1("fcuda-rdc"), |
| 2237 | 2186 | .pd2 = false, |
| 2238 | 2187 | .psl = true, |
| 2239 | 2188 | }, |
| 2240 | flagpd1("fno-cuda-rdc"), | |
| 2241 | flagpd1("shared-libasan"), | |
| 2242 | 2189 | flagpd1("frecord-gcc-switches"), |
| 2190 | flagpd1("fno-record-gcc-switches"), | |
| 2191 | flagpd1("fident"), | |
| 2192 | flagpd1("fno-ident"), | |
| 2193 | flagpd1("fexpensive-optimizations"), | |
| 2194 | flagpd1("fno-expensive-optimizations"), | |
| 2195 | flagpd1("fdefer-pop"), | |
| 2196 | flagpd1("fno-defer-pop"), | |
| 2197 | flagpd1("fextended-identifiers"), | |
| 2198 | flagpd1("fno-extended-identifiers"), | |
| 2199 | flagpd1("fhonor-infinites"), | |
| 2200 | flagpd1("fno-honor-infinites"), | |
| 2201 | flagpd1("fcuda-rdc"), | |
| 2202 | flagpd1("fno-cuda-rdc"), | |
| 2203 | flagpd1("findirect-virtual-calls"), | |
| 2204 | sepd1("fnew-alignment"), | |
| 2205 | flagpd1("faligned-new"), | |
| 2206 | flagpd1("fno-aligned-new"), | |
| 2207 | flagpd1("fsched-interblock"), | |
| 2208 | flagpd1("ftree-vectorize"), | |
| 2209 | flagpd1("fno-tree-vectorize"), | |
| 2210 | flagpd1("ftree-slp-vectorize"), | |
| 2211 | flagpd1("fno-tree-slp-vectorize"), | |
| 2212 | flagpd1("fterminated-vtables"), | |
| 2213 | flagpd1("grecord-gcc-switches"), | |
| 2214 | flagpd1("gno-record-gcc-switches"), | |
| 2215 | flagpd1("nocudainc"), | |
| 2216 | flagpd1("nocudalib"), | |
| 2217 | .{ | |
| 2218 | .name = "system-header-prefix", | |
| 2219 | .syntax = .separate, | |
| 2220 | .zig_equivalent = .other, | |
| 2221 | .pd1 = false, | |
| 2222 | .pd2 = true, | |
| 2223 | .psl = false, | |
| 2224 | }, | |
| 2225 | .{ | |
| 2226 | .name = "no-system-header-prefix", | |
| 2227 | .syntax = .separate, | |
| 2228 | .zig_equivalent = .other, | |
| 2229 | .pd1 = false, | |
| 2230 | .pd2 = true, | |
| 2231 | .psl = false, | |
| 2232 | }, | |
| 2233 | flagpd1("integrated-as"), | |
| 2234 | flagpd1("no-integrated-as"), | |
| 2243 | 2235 | .{ |
| 2244 | 2236 | .name = "ansi", |
| 2245 | 2237 | .syntax = .flag, |
| ... | ... | @@ -2251,11 +2243,8 @@ flagpd1("frecord-gcc-switches"), |
| 2251 | 2243 | sepd1("arch"), |
| 2252 | 2244 | flagpd1("arch_errors_fatal"), |
| 2253 | 2245 | sepd1("arch_only"), |
| 2254 | flagpd1("arcmt-check"), | |
| 2255 | flagpd1("arcmt-migrate"), | |
| 2256 | 2246 | flagpd1("arcmt-migrate-emit-errors"), |
| 2257 | 2247 | sepd1("arcmt-migrate-report-output"), |
| 2258 | flagpd1("arcmt-modify"), | |
| 2259 | 2248 | flagpd1("ast-dump"), |
| 2260 | 2249 | flagpd1("ast-dump-all"), |
| 2261 | 2250 | flagpd1("ast-dump-decl-types"), |
| ... | ... | @@ -2458,6 +2447,7 @@ flagpd1("emit-pch"), |
| 2458 | 2447 | }, |
| 2459 | 2448 | flagpd1("enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang"), |
| 2460 | 2449 | sepd1("error-on-deserialized-decl"), |
| 2450 | sepd1("exception-model"), | |
| 2461 | 2451 | sepd1("exported_symbols_list"), |
| 2462 | 2452 | .{ |
| 2463 | 2453 | .name = "fPIC", |
| ... | ... | @@ -2475,7 +2465,8 @@ sepd1("exported_symbols_list"), |
| 2475 | 2465 | .pd2 = false, |
| 2476 | 2466 | .psl = false, |
| 2477 | 2467 | }, |
| 2478 | flagpd1("fno-access-control"), | |
| 2468 | flagpd1("faapcs-bitfield-width"), | |
| 2469 | flagpd1("faccess-control"), | |
| 2479 | 2470 | flagpd1("faddrsig"), |
| 2480 | 2471 | flagpd1("faggressive-function-elimination"), |
| 2481 | 2472 | flagpd1("falign-commons"), |
| ... | ... | @@ -2488,6 +2479,7 @@ flagpd1("fall-intrinsics"), |
| 2488 | 2479 | flagpd1("fallow-editor-placeholders"), |
| 2489 | 2480 | flagpd1("fallow-half-arguments-and-returns"), |
| 2490 | 2481 | flagpd1("fallow-pch-with-compiler-errors"), |
| 2482 | flagpd1("fallow-pcm-with-compiler-errors"), | |
| 2491 | 2483 | flagpd1("fallow-unsupported"), |
| 2492 | 2484 | flagpd1("faltivec"), |
| 2493 | 2485 | flagpd1("fkeep-inline-functions"), |
| ... | ... | @@ -2497,6 +2489,7 @@ flagpd1("fapple-link-rtlib"), |
| 2497 | 2489 | flagpd1("fapple-pragma-pack"), |
| 2498 | 2490 | flagpd1("fapplication-extension"), |
| 2499 | 2491 | flagpd1("fapply-global-visibility-to-externs"), |
| 2492 | flagpd1("fapprox-func"), | |
| 2500 | 2493 | flagpd1("fasm"), |
| 2501 | 2494 | flagpd1("fasm-blocks"), |
| 2502 | 2495 | flagpd1("fassociative-math"), |
| ... | ... | @@ -2597,6 +2590,7 @@ flagpd1("fdiagnostics-show-note-include-stack"), |
| 2597 | 2590 | flagpd1("fdiagnostics-show-option"), |
| 2598 | 2591 | flagpd1("fdiagnostics-show-template-tree"), |
| 2599 | 2592 | flagpd1("fdigraphs"), |
| 2593 | flagpd1("fdirect-access-external-data"), | |
| 2600 | 2594 | flagpd1("fdisable-module-hash"), |
| 2601 | 2595 | flagpd1("fdiscard-value-names"), |
| 2602 | 2596 | flagpd1("fdollar-ok"), |
| ... | ... | @@ -2617,14 +2611,13 @@ flagpd1("feliminate-unused-debug-types"), |
| 2617 | 2611 | flagpd1("fembed-bitcode"), |
| 2618 | 2612 | flagpd1("fembed-bitcode-marker"), |
| 2619 | 2613 | flagpd1("femit-all-decls"), |
| 2620 | flagpd1("femit-coverage-data"), | |
| 2621 | flagpd1("femit-coverage-notes"), | |
| 2622 | 2614 | flagpd1("femulated-tls"), |
| 2623 | 2615 | flagpd1("fenable-matrix"), |
| 2624 | 2616 | flagpd1("fencode-extended-block-signature"), |
| 2625 | 2617 | sepd1("ferror-limit"), |
| 2626 | 2618 | flagpd1("fescaping-block-tail-calls"), |
| 2627 | 2619 | flagpd1("fexceptions"), |
| 2620 | flagpd1("fexperimental-debug-variable-locations"), | |
| 2628 | 2621 | flagpd1("fexperimental-isel"), |
| 2629 | 2622 | flagpd1("fexperimental-new-constant-interpreter"), |
| 2630 | 2623 | flagpd1("fexperimental-new-pass-manager"), |
| ... | ... | @@ -2638,6 +2631,7 @@ flagpd1("ffast-math"), |
| 2638 | 2631 | flagpd1("ffat-lto-objects"), |
| 2639 | 2632 | flagpd1("fcheck-new"), |
| 2640 | 2633 | flagpd1("ffine-grained-bitfield-accesses"), |
| 2634 | flagpd1("ffinite-loops"), | |
| 2641 | 2635 | flagpd1("ffinite-math-only"), |
| 2642 | 2636 | flagpd1("finline-limit"), |
| 2643 | 2637 | flagpd1("ffixed-form"), |
| ... | ... | @@ -2698,7 +2692,10 @@ flagpd1("fgnu-inline-asm"), |
| 2698 | 2692 | flagpd1("fgnu-keywords"), |
| 2699 | 2693 | flagpd1("fgnu-runtime"), |
| 2700 | 2694 | flagpd1("fgpu-allow-device-init"), |
| 2695 | flagpd1("fgpu-defer-diag"), | |
| 2696 | flagpd1("fgpu-exclude-wrong-side-overloads"), | |
| 2701 | 2697 | flagpd1("fgpu-rdc"), |
| 2698 | flagpd1("fhalf-no-semantic-interposition"), | |
| 2702 | 2699 | flagpd1("fheinous-gnu-extensions"), |
| 2703 | 2700 | flagpd1("fhip-dump-offload-linker-script"), |
| 2704 | 2701 | flagpd1("fhip-new-launch-api"), |
| ... | ... | @@ -2738,6 +2735,7 @@ flagpd1("fjump-tables"), |
| 2738 | 2735 | flagpd1("fkeep-static-consts"), |
| 2739 | 2736 | flagpd1("flat_namespace"), |
| 2740 | 2737 | flagpd1("flax-vector-conversions"), |
| 2738 | flagpd1("flegacy-pass-manager"), | |
| 2741 | 2739 | flagpd1("flimit-debug-info"), |
| 2742 | 2740 | .{ |
| 2743 | 2741 | .name = "flto", |
| ... | ... | @@ -2752,6 +2750,7 @@ flagpd1("flto-visibility-public-std"), |
| 2752 | 2750 | sepd1("fmacro-backtrace-limit"), |
| 2753 | 2751 | flagpd1("fmath-errno"), |
| 2754 | 2752 | flagpd1("fmax-identifier-length"), |
| 2753 | flagpd1("fmemory-profile"), | |
| 2755 | 2754 | flagpd1("fmerge-all-constants"), |
| 2756 | 2755 | flagpd1("fmerge-constants"), |
| 2757 | 2756 | flagpd1("fmerge-functions"), |
| ... | ... | @@ -2804,7 +2803,8 @@ flagpd1("fnext-runtime"), |
| 2804 | 2803 | .pd2 = false, |
| 2805 | 2804 | .psl = false, |
| 2806 | 2805 | }, |
| 2807 | flagpd1("fno-no-access-control"), | |
| 2806 | flagpd1("fno-aapcs-bitfield-width"), | |
| 2807 | flagpd1("fno-access-control"), | |
| 2808 | 2808 | flagpd1("fno-addrsig"), |
| 2809 | 2809 | flagpd1("fno-aggressive-function-elimination"), |
| 2810 | 2810 | flagpd1("fno-align-commons"), |
| ... | ... | @@ -2882,6 +2882,7 @@ flagpd1("fno-diagnostics-show-note-include-stack"), |
| 2882 | 2882 | flagpd1("fno-diagnostics-show-option"), |
| 2883 | 2883 | flagpd1("fno-diagnostics-use-presumed-location"), |
| 2884 | 2884 | flagpd1("fno-digraphs"), |
| 2885 | flagpd1("fno-direct-access-external-data"), | |
| 2885 | 2886 | flagpd1("fno-discard-value-names"), |
| 2886 | 2887 | flagpd1("fno-dllexport-inlines"), |
| 2887 | 2888 | flagpd1("fno-dollar-ok"), |
| ... | ... | @@ -2908,6 +2909,7 @@ flagpd1("fno-fast-math"), |
| 2908 | 2909 | flagpd1("fno-fat-lto-objects"), |
| 2909 | 2910 | flagpd1("fno-check-new"), |
| 2910 | 2911 | flagpd1("fno-fine-grained-bitfield-accesses"), |
| 2912 | flagpd1("fno-finite-loops"), | |
| 2911 | 2913 | flagpd1("fno-finite-math-only"), |
| 2912 | 2914 | flagpd1("fno-inline-limit"), |
| 2913 | 2915 | flagpd1("fno-fixed-form"), |
| ... | ... | @@ -2932,6 +2934,8 @@ flagpd1("fno-gnu89-inline"), |
| 2932 | 2934 | flagpd1("fno-gnu-inline-asm"), |
| 2933 | 2935 | flagpd1("fno-gnu-keywords"), |
| 2934 | 2936 | flagpd1("fno-gpu-allow-device-init"), |
| 2937 | flagpd1("fno-gpu-defer-diag"), | |
| 2938 | flagpd1("fno-gpu-exclude-wrong-side-overloads"), | |
| 2935 | 2939 | flagpd1("fno-gpu-rdc"), |
| 2936 | 2940 | flagpd1("fno-hip-new-launch-api"), |
| 2937 | 2941 | flagpd1("fno-honor-infinities"), |
| ... | ... | @@ -2955,6 +2959,7 @@ flagpd1("fno-ivopts"), |
| 2955 | 2959 | flagpd1("fno-jump-tables"), |
| 2956 | 2960 | flagpd1("fno-keep-static-consts"), |
| 2957 | 2961 | flagpd1("fno-lax-vector-conversions"), |
| 2962 | flagpd1("fno-legacy-pass-manager"), | |
| 2958 | 2963 | flagpd1("fno-limit-debug-info"), |
| 2959 | 2964 | .{ |
| 2960 | 2965 | .name = "fno-lto", |
| ... | ... | @@ -2969,6 +2974,7 @@ flagpd1("fno-math-builtin"), |
| 2969 | 2974 | flagpd1("fno-math-errno"), |
| 2970 | 2975 | flagpd1("fno-max-identifier-length"), |
| 2971 | 2976 | flagpd1("fno-max-type-align"), |
| 2977 | flagpd1("fno-memory-profile"), | |
| 2972 | 2978 | flagpd1("fno-merge-all-constants"), |
| 2973 | 2979 | flagpd1("fno-merge-constants"), |
| 2974 | 2980 | flagpd1("fno-module-file-deps"), |
| ... | ... | @@ -3018,6 +3024,7 @@ flagpd1("fno-permissive"), |
| 3018 | 3024 | flagpd1("fno-pic"), |
| 3019 | 3025 | flagpd1("fno-pie"), |
| 3020 | 3026 | flagpd1("fno-plt"), |
| 3027 | flagpd1("fno-prebuilt-implicit-modules"), | |
| 3021 | 3028 | flagpd1("fno-prefetch-loop-arrays"), |
| 3022 | 3029 | flagpd1("fno-preserve-as-comments"), |
| 3023 | 3030 | flagpd1("fno-printf"), |
| ... | ... | @@ -3034,6 +3041,7 @@ flagpd1("fno-profile-sample-use"), |
| 3034 | 3041 | flagpd1("fno-profile-use"), |
| 3035 | 3042 | flagpd1("fno-profile-values"), |
| 3036 | 3043 | flagpd1("fno-protect-parens"), |
| 3044 | flagpd1("fno-pseudo-probe-for-profiling"), | |
| 3037 | 3045 | flagpd1("fno-range-check"), |
| 3038 | 3046 | flagpd1("fno-real-4-real-10"), |
| 3039 | 3047 | flagpd1("fno-real-4-real-16"), |
| ... | ... | @@ -3104,6 +3112,7 @@ flagpd1("fno-spec-constr-count"), |
| 3104 | 3112 | flagpd1("fno-spell-checking"), |
| 3105 | 3113 | flagpd1("fno-split-dwarf-inlining"), |
| 3106 | 3114 | flagpd1("fno-split-lto-unit"), |
| 3115 | flagpd1("fno-split-machine-functions"), | |
| 3107 | 3116 | flagpd1("fno-stack-arrays"), |
| 3108 | 3117 | flagpd1("fno-stack-check"), |
| 3109 | 3118 | flagpd1("fno-stack-clash-protection"), |
| ... | ... | @@ -3154,6 +3163,8 @@ flagpd1("fno-vect-cost-model"), |
| 3154 | 3163 | flagpd1("fno-vectorize"), |
| 3155 | 3164 | flagpd1("fno-verbose-asm"), |
| 3156 | 3165 | flagpd1("fno-virtual-function-elimination"), |
| 3166 | flagpd1("fno-visibility-from-dllstorageclass"), | |
| 3167 | flagpd1("fno-visibility-inlines-hidden-static-local-var"), | |
| 3157 | 3168 | flagpd1("fno-wchar"), |
| 3158 | 3169 | flagpd1("fno-web"), |
| 3159 | 3170 | flagpd1("fno-whole-file"), |
| ... | ... | @@ -3161,6 +3172,7 @@ flagpd1("fno-whole-program"), |
| 3161 | 3172 | flagpd1("fno-whole-program-vtables"), |
| 3162 | 3173 | flagpd1("fno-working-directory"), |
| 3163 | 3174 | flagpd1("fno-wrapv"), |
| 3175 | flagpd1("fno-xl-pragma-pack"), | |
| 3164 | 3176 | flagpd1("fno-xray-always-emit-customevents"), |
| 3165 | 3177 | flagpd1("fno-xray-always-emit-typedevents"), |
| 3166 | 3178 | flagpd1("fno-xray-function-index"), |
| ... | ... | @@ -3212,6 +3224,7 @@ flagpd1("fpack-struct"), |
| 3212 | 3224 | flagpd1("fpadding-on-unsigned-fixed-point"), |
| 3213 | 3225 | flagpd1("fparse-all-comments"), |
| 3214 | 3226 | flagpd1("fpascal-strings"), |
| 3227 | flagpd1("fpass-by-value-is-noalias"), | |
| 3215 | 3228 | flagpd1("fpcc-struct-return"), |
| 3216 | 3229 | flagpd1("fpch-codegen"), |
| 3217 | 3230 | flagpd1("fpch-debuginfo"), |
| ... | ... | @@ -3223,6 +3236,7 @@ flagpd1("fpermissive"), |
| 3223 | 3236 | flagpd1("fpic"), |
| 3224 | 3237 | flagpd1("fpie"), |
| 3225 | 3238 | flagpd1("fplt"), |
| 3239 | flagpd1("fprebuilt-implicit-modules"), | |
| 3226 | 3240 | flagpd1("fprefetch-loop-arrays"), |
| 3227 | 3241 | flagpd1("fpreserve-as-comments"), |
| 3228 | 3242 | flagpd1("fpreserve-vec3-type"), |
| ... | ... | @@ -3241,6 +3255,7 @@ flagpd1("fprofile-sample-use"), |
| 3241 | 3255 | flagpd1("fprofile-use"), |
| 3242 | 3256 | flagpd1("fprofile-values"), |
| 3243 | 3257 | flagpd1("fprotect-parens"), |
| 3258 | flagpd1("fpseudo-probe-for-profiling"), | |
| 3244 | 3259 | .{ |
| 3245 | 3260 | .name = "framework", |
| 3246 | 3261 | .syntax = .separate, |
| ... | ... | @@ -3340,6 +3355,7 @@ flagpd1("fspell-checking"), |
| 3340 | 3355 | sepd1("fspell-checking-limit"), |
| 3341 | 3356 | flagpd1("fsplit-dwarf-inlining"), |
| 3342 | 3357 | flagpd1("fsplit-lto-unit"), |
| 3358 | flagpd1("fsplit-machine-functions"), | |
| 3343 | 3359 | flagpd1("fsplit-stack"), |
| 3344 | 3360 | flagpd1("fstack-arrays"), |
| 3345 | 3361 | flagpd1("fstack-check"), |
| ... | ... | @@ -3395,6 +3411,7 @@ flagpd1("funsigned-bitfields"), |
| 3395 | 3411 | flagpd1("funsigned-char"), |
| 3396 | 3412 | flagpd1("funswitch-loops"), |
| 3397 | 3413 | flagpd1("funwind-tables"), |
| 3414 | flagpd1("fuse-ctor-homing"), | |
| 3398 | 3415 | flagpd1("fuse-cxa-atexit"), |
| 3399 | 3416 | flagpd1("fuse-init-array"), |
| 3400 | 3417 | flagpd1("fuse-line-directives"), |
| ... | ... | @@ -3407,8 +3424,10 @@ flagpd1("fvectorize"), |
| 3407 | 3424 | flagpd1("fverbose-asm"), |
| 3408 | 3425 | flagpd1("fvirtual-function-elimination"), |
| 3409 | 3426 | sepd1("fvisibility"), |
| 3427 | flagpd1("fvisibility-from-dllstorageclass"), | |
| 3410 | 3428 | flagpd1("fvisibility-global-new-delete-hidden"), |
| 3411 | 3429 | flagpd1("fvisibility-inlines-hidden"), |
| 3430 | flagpd1("fvisibility-inlines-hidden-static-local-var"), | |
| 3412 | 3431 | flagpd1("fvisibility-ms-compat"), |
| 3413 | 3432 | flagpd1("fwasm-exceptions"), |
| 3414 | 3433 | flagpd1("fweb"), |
| ... | ... | @@ -3417,6 +3436,7 @@ flagpd1("fwhole-program"), |
| 3417 | 3436 | flagpd1("fwhole-program-vtables"), |
| 3418 | 3437 | flagpd1("fwrapv"), |
| 3419 | 3438 | flagpd1("fwritable-strings"), |
| 3439 | flagpd1("fxl-pragma-pack"), | |
| 3420 | 3440 | flagpd1("fxray-always-emit-customevents"), |
| 3421 | 3441 | flagpd1("fxray-always-emit-typedevents"), |
| 3422 | 3442 | flagpd1("fxray-function-index"), |
| ... | ... | @@ -3449,6 +3469,8 @@ flagpd1("gcodeview"), |
| 3449 | 3469 | flagpd1("gcodeview-ghash"), |
| 3450 | 3470 | flagpd1("gcolumn-info"), |
| 3451 | 3471 | flagpd1("gdwarf"), |
| 3472 | flagpd1("gdwarf32"), | |
| 3473 | flagpd1("gdwarf64"), | |
| 3452 | 3474 | flagpd1("gdwarf-2"), |
| 3453 | 3475 | flagpd1("gdwarf-3"), |
| 3454 | 3476 | flagpd1("gdwarf-4"), |
| ... | ... | @@ -3484,6 +3506,7 @@ flagpd1("gno-gnu-pubnames"), |
| 3484 | 3506 | flagpd1("gno-inline-line-tables"), |
| 3485 | 3507 | flagpd1("gno-pubnames"), |
| 3486 | 3508 | flagpd1("gno-record-command-line"), |
| 3509 | flagpd1("gno-split-dwarf"), | |
| 3487 | 3510 | flagpd1("gno-strict-dwarf"), |
| 3488 | 3511 | .{ |
| 3489 | 3512 | .name = "gpu-use-aux-triple-only", |
| ... | ... | @@ -3538,6 +3561,8 @@ flagpd1("m64"), |
| 3538 | 3561 | flagpd1("m80387"), |
| 3539 | 3562 | flagpd1("mseses"), |
| 3540 | 3563 | flagpd1("mabi=ieeelongdouble"), |
| 3564 | flagpd1("mabi=vec-default"), | |
| 3565 | flagpd1("mabi=vec-extabi"), | |
| 3541 | 3566 | flagpd1("mabicalls"), |
| 3542 | 3567 | flagpd1("madx"), |
| 3543 | 3568 | flagpd1("maes"), |
| ... | ... | @@ -3568,6 +3593,7 @@ flagpd1("mavx512vl"), |
| 3568 | 3593 | flagpd1("mavx512vnni"), |
| 3569 | 3594 | flagpd1("mavx512vp2intersect"), |
| 3570 | 3595 | flagpd1("mavx512vpopcntdq"), |
| 3596 | flagpd1("mavxvnni"), | |
| 3571 | 3597 | flagpd1("mbackchain"), |
| 3572 | 3598 | flagpd1("mbig-endian"), |
| 3573 | 3599 | flagpd1("mbmi"), |
| ... | ... | @@ -3600,6 +3626,7 @@ flagpd1("mdouble-float"), |
| 3600 | 3626 | flagpd1("mdsp"), |
| 3601 | 3627 | flagpd1("mdspr2"), |
| 3602 | 3628 | sepd1("meabi"), |
| 3629 | flagpd1("mefpu2"), | |
| 3603 | 3630 | flagpd1("membedded-data"), |
| 3604 | 3631 | flagpd1("menable-experimental-extensions"), |
| 3605 | 3632 | flagpd1("menable-no-infs"), |
| ... | ... | @@ -3633,10 +3660,12 @@ flagpd1("mglobal-merge"), |
| 3633 | 3660 | flagpd1("mgpopt"), |
| 3634 | 3661 | flagpd1("mhard-float"), |
| 3635 | 3662 | flagpd1("mhvx"), |
| 3663 | flagpd1("mhreset"), | |
| 3636 | 3664 | flagpd1("mhtm"), |
| 3637 | 3665 | flagpd1("miamcu"), |
| 3638 | 3666 | flagpd1("mieee-fp"), |
| 3639 | 3667 | flagpd1("mieee-rnd-near"), |
| 3668 | flagpd1("mignore-xcoff-visibility"), | |
| 3640 | 3669 | flagpd1("migrate"), |
| 3641 | 3670 | flagpd1("no-finalize-removal"), |
| 3642 | 3671 | flagpd1("no-ns-alloc-error"), |
| ... | ... | @@ -3663,6 +3692,7 @@ flagpd1("mips64r5"), |
| 3663 | 3692 | flagpd1("mips64r6"), |
| 3664 | 3693 | flagpd1("misel"), |
| 3665 | 3694 | flagpd1("mkernel"), |
| 3695 | flagpd1("mkl"), | |
| 3666 | 3696 | flagpd1("mldc1-sdc1"), |
| 3667 | 3697 | sepd1("mlimit-float-precision"), |
| 3668 | 3698 | sepd1("mlink-bitcode-file"), |
| ... | ... | @@ -3681,10 +3711,12 @@ flagpd1("mlvi-hardening"), |
| 3681 | 3711 | flagpd1("mlwp"), |
| 3682 | 3712 | flagpd1("mlzcnt"), |
| 3683 | 3713 | flagpd1("mmadd4"), |
| 3714 | flagpd1("mmark-bti-property"), | |
| 3684 | 3715 | flagpd1("mmemops"), |
| 3685 | 3716 | flagpd1("mmfcrf"), |
| 3686 | 3717 | flagpd1("mmfocrf"), |
| 3687 | 3718 | flagpd1("mmicromips"), |
| 3719 | flagpd1("mmma"), | |
| 3688 | 3720 | flagpd1("mmmx"), |
| 3689 | 3721 | flagpd1("mmovbe"), |
| 3690 | 3722 | flagpd1("mmovdir64b"), |
| ... | ... | @@ -3724,6 +3756,7 @@ flagpd1("mno-avx512vl"), |
| 3724 | 3756 | flagpd1("mno-avx512vnni"), |
| 3725 | 3757 | flagpd1("mno-avx512vp2intersect"), |
| 3726 | 3758 | flagpd1("mno-avx512vpopcntdq"), |
| 3759 | flagpd1("mno-avxvnni"), | |
| 3727 | 3760 | flagpd1("mno-backchain"), |
| 3728 | 3761 | flagpd1("mno-bmi"), |
| 3729 | 3762 | flagpd1("mno-bmi2"), |
| ... | ... | @@ -3762,6 +3795,7 @@ flagpd1("mno-ginv"), |
| 3762 | 3795 | flagpd1("mno-global-merge"), |
| 3763 | 3796 | flagpd1("mno-gpopt"), |
| 3764 | 3797 | flagpd1("mno-hvx"), |
| 3798 | flagpd1("mno-hreset"), | |
| 3765 | 3799 | flagpd1("mno-htm"), |
| 3766 | 3800 | flagpd1("mno-iamcu"), |
| 3767 | 3801 | flagpd1("mno-implicit-float"), |
| ... | ... | @@ -3770,6 +3804,7 @@ flagpd1("mno-inline-all-stringops"), |
| 3770 | 3804 | flagpd1("mno-invariant-function-descriptors"), |
| 3771 | 3805 | flagpd1("mno-invpcid"), |
| 3772 | 3806 | flagpd1("mno-isel"), |
| 3807 | flagpd1("mno-kl"), | |
| 3773 | 3808 | flagpd1("mno-ldc1-sdc1"), |
| 3774 | 3809 | flagpd1("mno-local-sdata"), |
| 3775 | 3810 | flagpd1("mno-long-calls"), |
| ... | ... | @@ -3784,6 +3819,7 @@ flagpd1("mno-mfcrf"), |
| 3784 | 3819 | flagpd1("mno-mfocrf"), |
| 3785 | 3820 | flagpd1("mno-micromips"), |
| 3786 | 3821 | flagpd1("mno-mips16"), |
| 3822 | flagpd1("mno-mma"), | |
| 3787 | 3823 | flagpd1("mno-mmx"), |
| 3788 | 3824 | flagpd1("mno-movbe"), |
| 3789 | 3825 | flagpd1("mno-movdir64b"), |
| ... | ... | @@ -3803,6 +3839,7 @@ flagpd1("mno-nvs"), |
| 3803 | 3839 | flagpd1("mno-odd-spreg"), |
| 3804 | 3840 | flagpd1("mno-omit-leaf-frame-pointer"), |
| 3805 | 3841 | flagpd1("mno-outline"), |
| 3842 | flagpd1("mno-outline-atomics"), | |
| 3806 | 3843 | flagpd1("mno-packed-stack"), |
| 3807 | 3844 | flagpd1("mno-packets"), |
| 3808 | 3845 | flagpd1("mno-pascal-strings"), |
| ... | ... | @@ -3820,7 +3857,6 @@ flagpd1("mno-prefetchwt1"), |
| 3820 | 3857 | flagpd1("mno-prfchw"), |
| 3821 | 3858 | flagpd1("mno-ptwrite"), |
| 3822 | 3859 | flagpd1("mno-pure-code"), |
| 3823 | flagpd1("mno-qpx"), | |
| 3824 | 3860 | flagpd1("mno-rdpid"), |
| 3825 | 3861 | flagpd1("mno-rdrnd"), |
| 3826 | 3862 | flagpd1("mno-rdseed"), |
| ... | ... | @@ -3853,7 +3889,6 @@ flagpd1("mno-simd128"), |
| 3853 | 3889 | flagpd1("mno-soft-float"), |
| 3854 | 3890 | flagpd1("mno-spe"), |
| 3855 | 3891 | flagpd1("mno-speculative-load-hardening"), |
| 3856 | flagpd1("mno-sram-ecc"), | |
| 3857 | 3892 | flagpd1("mno-sse"), |
| 3858 | 3893 | flagpd1("mno-sse2"), |
| 3859 | 3894 | flagpd1("mno-sse3"), |
| ... | ... | @@ -3869,8 +3904,10 @@ flagpd1("mno-tbm"), |
| 3869 | 3904 | flagpd1("mno-thumb"), |
| 3870 | 3905 | flagpd1("mno-tls-direct-seg-refs"), |
| 3871 | 3906 | flagpd1("mno-tsxldtrk"), |
| 3907 | flagpd1("mno-uintr"), | |
| 3872 | 3908 | flagpd1("mno-unaligned-access"), |
| 3873 | 3909 | flagpd1("mno-unimplemented-simd128"), |
| 3910 | flagpd1("mno-unsafe-fp-atomics"), | |
| 3874 | 3911 | flagpd1("mno-vaes"), |
| 3875 | 3912 | flagpd1("mno-virt"), |
| 3876 | 3913 | flagpd1("mno-vpclmulqdq"), |
| ... | ... | @@ -3881,9 +3918,9 @@ flagpd1("mno-waitpkg"), |
| 3881 | 3918 | flagpd1("mno-warn-nonportable-cfstrings"), |
| 3882 | 3919 | flagpd1("mno-wavefrontsize64"), |
| 3883 | 3920 | flagpd1("mno-wbnoinvd"), |
| 3921 | flagpd1("mno-widekl"), | |
| 3884 | 3922 | flagpd1("mno-x87"), |
| 3885 | 3923 | flagpd1("mno-xgot"), |
| 3886 | flagpd1("mno-xnack"), | |
| 3887 | 3924 | flagpd1("mno-xop"), |
| 3888 | 3925 | flagpd1("mno-xsave"), |
| 3889 | 3926 | flagpd1("mno-xsavec"), |
| ... | ... | @@ -3894,6 +3931,7 @@ flagpd1("mnocrc"), |
| 3894 | 3931 | flagpd1("mno-direct-move"), |
| 3895 | 3932 | flagpd1("mnontrapping-fptoint"), |
| 3896 | 3933 | flagpd1("mnop-mcount"), |
| 3934 | flagpd1("mno-paired-vector-memops"), | |
| 3897 | 3935 | flagpd1("mno-crypto"), |
| 3898 | 3936 | flagpd1("mnvj"), |
| 3899 | 3937 | flagpd1("mnvs"), |
| ... | ... | @@ -3903,8 +3941,10 @@ flagpd1("module-file-deps"), |
| 3903 | 3941 | flagpd1("module-file-info"), |
| 3904 | 3942 | flagpd1("momit-leaf-frame-pointer"), |
| 3905 | 3943 | flagpd1("moutline"), |
| 3944 | flagpd1("moutline-atomics"), | |
| 3906 | 3945 | flagpd1("mpacked-stack"), |
| 3907 | 3946 | flagpd1("mpackets"), |
| 3947 | flagpd1("mpaired-vector-memops"), | |
| 3908 | 3948 | flagpd1("mpascal-strings"), |
| 3909 | 3949 | flagpd1("mpclmul"), |
| 3910 | 3950 | flagpd1("mpconfig"), |
| ... | ... | @@ -3922,7 +3962,6 @@ flagpd1("mprfchw"), |
| 3922 | 3962 | flagpd1("mptwrite"), |
| 3923 | 3963 | flagpd1("mpure-code"), |
| 3924 | 3964 | flagpd1("mqdsp6-compat"), |
| 3925 | flagpd1("mqpx"), | |
| 3926 | 3965 | flagpd1("mrdpid"), |
| 3927 | 3966 | flagpd1("mrdrnd"), |
| 3928 | 3967 | flagpd1("mrdseed"), |
| ... | ... | @@ -3965,13 +4004,13 @@ flagpd1("msgx"), |
| 3965 | 4004 | flagpd1("msha"), |
| 3966 | 4005 | flagpd1("mshstk"), |
| 3967 | 4006 | flagpd1("msign-ext"), |
| 4007 | flagpd1("msim"), | |
| 3968 | 4008 | flagpd1("msimd128"), |
| 3969 | 4009 | flagpd1("msingle-float"), |
| 3970 | 4010 | sepd1("msmall-data-limit"), |
| 3971 | 4011 | flagpd1("msoft-float"), |
| 3972 | 4012 | flagpd1("mspe"), |
| 3973 | 4013 | flagpd1("mspeculative-load-hardening"), |
| 3974 | flagpd1("msram-ecc"), | |
| 3975 | 4014 | flagpd1("msse"), |
| 3976 | 4015 | flagpd1("msse2"), |
| 3977 | 4016 | flagpd1("msse3"), |
| ... | ... | @@ -3995,11 +4034,13 @@ sepd1("mtp"), |
| 3995 | 4034 | flagpd1("mtsxldtrk"), |
| 3996 | 4035 | flagpd1("mtune=?"), |
| 3997 | 4036 | flagpd1("muclibc"), |
| 4037 | flagpd1("muintr"), | |
| 3998 | 4038 | flagpd1("multi_module"), |
| 3999 | 4039 | sepd1("multiply_defined"), |
| 4000 | 4040 | sepd1("multiply_defined_unused"), |
| 4001 | 4041 | flagpd1("munaligned-access"), |
| 4002 | 4042 | flagpd1("munimplemented-simd128"), |
| 4043 | flagpd1("munsafe-fp-atomics"), | |
| 4003 | 4044 | flagpd1("munwind-tables"), |
| 4004 | 4045 | flagpd1("mv5"), |
| 4005 | 4046 | flagpd1("mv55"), |
| ... | ... | @@ -4019,10 +4060,10 @@ flagpd1("mwaitpkg"), |
| 4019 | 4060 | flagpd1("mwarn-nonportable-cfstrings"), |
| 4020 | 4061 | flagpd1("mwavefrontsize64"), |
| 4021 | 4062 | flagpd1("mwbnoinvd"), |
| 4063 | flagpd1("mwidekl"), | |
| 4022 | 4064 | flagpd1("mx32"), |
| 4023 | 4065 | flagpd1("mx87"), |
| 4024 | 4066 | flagpd1("mxgot"), |
| 4025 | flagpd1("mxnack"), | |
| 4026 | 4067 | flagpd1("mxop"), |
| 4027 | 4068 | flagpd1("mxsave"), |
| 4028 | 4069 | flagpd1("mxsavec"), |
| ... | ... | @@ -4462,7 +4503,7 @@ sepd1("target-feature"), |
| 4462 | 4503 | }, |
| 4463 | 4504 | sepd1("target-linker-version"), |
| 4464 | 4505 | flagpd1("templight-dump"), |
| 4465 | flagpd1("test-coverage"), | |
| 4506 | flagpd1("test-io"), | |
| 4466 | 4507 | flagpd1("time"), |
| 4467 | 4508 | .{ |
| 4468 | 4509 | .name = "traditional", |
| ... | ... | @@ -4490,6 +4531,7 @@ flagpd1("time"), |
| 4490 | 4531 | }, |
| 4491 | 4532 | flagpd1("trim-egraph"), |
| 4492 | 4533 | sepd1("triple"), |
| 4534 | sepd1("tune-cpu"), | |
| 4493 | 4535 | flagpd1("twolevel_namespace"), |
| 4494 | 4536 | flagpd1("twolevel_namespace_hints"), |
| 4495 | 4537 | sepd1("umbrella"), |
| ... | ... | @@ -4541,6 +4583,7 @@ flagpd1("whyload"), |
| 4541 | 4583 | }, |
| 4542 | 4584 | joinpd1("fsanitize-undefined-strip-path-components="), |
| 4543 | 4585 | joinpd1("fopenmp-cuda-teams-reduction-recs-num="), |
| 4586 | joinpd1("fvisibility-externs-nodllstorageclass="), | |
| 4544 | 4587 | joinpd1("analyzer-config-compatibility-mode="), |
| 4545 | 4588 | joinpd1("ftrivial-auto-var-init-stop-after="), |
| 4546 | 4589 | joinpd1("fpatchable-function-entry-offset="), |
| ... | ... | @@ -4549,7 +4592,11 @@ joinpd1("fsanitize-address-field-padding="), |
| 4549 | 4592 | joinpd1("fdiagnostics-hotness-threshold="), |
| 4550 | 4593 | joinpd1("fsanitize-memory-track-origins="), |
| 4551 | 4594 | joinpd1("mwatchos-simulator-version-min="), |
| 4595 | joinpd1("fvisibility-externs-dllimport="), | |
| 4596 | joinpd1("fvisibility-nodllstorageclass="), | |
| 4597 | joinpd1("fxray-selected-function-group="), | |
| 4552 | 4598 | joinpd1("mappletvsimulator-version-min="), |
| 4599 | joinpd1("mstack-protector-guard-offset="), | |
| 4553 | 4600 | joinpd1("fsanitize-coverage-whitelist="), |
| 4554 | 4601 | joinpd1("fsanitize-coverage-blacklist="), |
| 4555 | 4602 | joinpd1("fobjc-nonfragile-abi-version="), |
| ... | ... | @@ -4582,7 +4629,16 @@ joinpd1("fopenmp-cuda-blocks-per-sm="), |
| 4582 | 4629 | joinpd1("fsanitize-system-blacklist="), |
| 4583 | 4630 | jspd1("fxray-instruction-threshold"), |
| 4584 | 4631 | joinpd1("headerpad_max_install_names"), |
| 4632 | .{ | |
| 4633 | .name = "libomptarget-nvptx-bc-path=", | |
| 4634 | .syntax = .joined, | |
| 4635 | .zig_equivalent = .other, | |
| 4636 | .pd1 = false, | |
| 4637 | .pd2 = true, | |
| 4638 | .psl = false, | |
| 4639 | }, | |
| 4585 | 4640 | joinpd1("mios-simulator-version-min="), |
| 4641 | joinpd1("mstack-protector-guard-reg="), | |
| 4586 | 4642 | .{ |
| 4587 | 4643 | .name = "include-with-prefix-after=", |
| 4588 | 4644 | .syntax = .joined, |
| ... | ... | @@ -4655,14 +4711,6 @@ joinpd1("fsanitize-hwaddress-abi="), |
| 4655 | 4711 | joinpd1("ftime-trace-granularity="), |
| 4656 | 4712 | jspd1("fxray-always-instrument="), |
| 4657 | 4713 | jspd1("internal-externc-isystem"), |
| 4658 | .{ | |
| 4659 | .name = "libomptarget-nvptx-path=", | |
| 4660 | .syntax = .joined, | |
| 4661 | .zig_equivalent = .other, | |
| 4662 | .pd1 = false, | |
| 4663 | .pd2 = true, | |
| 4664 | .psl = false, | |
| 4665 | }, | |
| 4666 | 4714 | .{ |
| 4667 | 4715 | .name = "no-system-header-prefix=", |
| 4668 | 4716 | .syntax = .joined, |
| ... | ... | @@ -4693,6 +4741,7 @@ jspd1("fxray-never-instrument="), |
| 4693 | 4741 | jspd1("interface-stub-version="), |
| 4694 | 4742 | joinpd1("malign-branch-boundary="), |
| 4695 | 4743 | joinpd1("mappletvos-version-min="), |
| 4744 | joinpd1("mstack-protector-guard="), | |
| 4696 | 4745 | joinpd1("Wnonportable-cfstrings"), |
| 4697 | 4746 | joinpd1("fbasic-block-sections="), |
| 4698 | 4747 | joinpd1("fdefault-calling-conv="), |
| ... | ... | @@ -4712,6 +4761,8 @@ joinpd1("foperator-arrow-depth="), |
| 4712 | 4761 | joinpd1("fprebuilt-module-path="), |
| 4713 | 4762 | joinpd1("fprofile-filter-files="), |
| 4714 | 4763 | joinpd1("fspell-checking-limit="), |
| 4764 | joinpd1("fvisibility-dllexport="), | |
| 4765 | joinpd1("fxray-function-groups="), | |
| 4715 | 4766 | joinpd1("miphoneos-version-min="), |
| 4716 | 4767 | joinpd1("msmall-data-threshold="), |
| 4717 | 4768 | joinpd1("Wlarge-by-value-copy="), |
| ... | ... | @@ -4730,7 +4781,7 @@ joinpd1("fmodules-prune-after="), |
| 4730 | 4781 | .psl = false, |
| 4731 | 4782 | }, |
| 4732 | 4783 | jspd1("iframeworkwithsysroot"), |
| 4733 | joinpd1("mamdgpu-debugger-abi="), | |
| 4784 | joinpd1("mcode-object-version="), | |
| 4734 | 4785 | joinpd1("mpad-max-prefix-size="), |
| 4735 | 4786 | joinpd1("mprefer-vector-width="), |
| 4736 | 4787 | joinpd1("msign-return-address="), |
| ... | ... | @@ -4774,6 +4825,7 @@ joinpd1("fmax-stack-var-size="), |
| 4774 | 4825 | joinpd1("fmodules-cache-path="), |
| 4775 | 4826 | joinpd1("fmodules-embed-file="), |
| 4776 | 4827 | joinpd1("fprofile-instrument="), |
| 4828 | joinpd1("fprofile-prefix-map="), | |
| 4777 | 4829 | joinpd1("fprofile-sample-use="), |
| 4778 | 4830 | joinpd1("fsanitize-blacklist="), |
| 4779 | 4831 | joinpd1("mmacosx-version-min="), |
| ... | ... | @@ -4802,6 +4854,14 @@ joinpd1("fprofile-instr-use="), |
| 4802 | 4854 | .psl = false, |
| 4803 | 4855 | }, |
| 4804 | 4856 | joinpd1("fthin-link-bitcode="), |
| 4857 | .{ | |
| 4858 | .name = "gpu-instrument-lib=", | |
| 4859 | .syntax = .joined, | |
| 4860 | .zig_equivalent = .other, | |
| 4861 | .pd1 = false, | |
| 4862 | .pd2 = true, | |
| 4863 | .psl = false, | |
| 4864 | }, | |
| 4805 | 4865 | joinpd1("mbranch-protection="), |
| 4806 | 4866 | joinpd1("mmacos-version-min="), |
| 4807 | 4867 | joinpd1("pch-through-header="), |
| ... | ... | @@ -4838,6 +4898,7 @@ joinpd1("target-sdk-version="), |
| 4838 | 4898 | .pd2 = true, |
| 4839 | 4899 | .psl = false, |
| 4840 | 4900 | }, |
| 4901 | joinpd1("fbinutils-version="), | |
| 4841 | 4902 | joinpd1("fclang-abi-compat="), |
| 4842 | 4903 | joinpd1("fcompile-resource="), |
| 4843 | 4904 | joinpd1("fdebug-prefix-map="), |
| ... | ... | @@ -4855,6 +4916,7 @@ joinpd1("fmacro-prefix-map="), |
| 4855 | 4916 | }, |
| 4856 | 4917 | joinpd1("fobjc-abi-version="), |
| 4857 | 4918 | joinpd1("foutput-class-dir="), |
| 4919 | joinpd1("fproc-stat-report="), | |
| 4858 | 4920 | joinpd1("fprofile-generate="), |
| 4859 | 4921 | joinpd1("frewrite-map-file="), |
| 4860 | 4922 | .{ |
| ... | ... | @@ -4888,10 +4950,12 @@ joinpd1("fconstexpr-steps="), |
| 4888 | 4950 | joinpd1("ffile-prefix-map="), |
| 4889 | 4951 | joinpd1("fmodule-map-file="), |
| 4890 | 4952 | joinpd1("fobjc-arc-cxxlib="), |
| 4953 | joinpd1("fproc-stat-report"), | |
| 4891 | 4954 | jspd1("iwithprefixbefore"), |
| 4892 | 4955 | joinpd1("malign-functions="), |
| 4893 | 4956 | joinpd1("mios-version-min="), |
| 4894 | 4957 | joinpd1("mstack-alignment="), |
| 4958 | joinpd1("msve-vector-bits="), | |
| 4895 | 4959 | .{ |
| 4896 | 4960 | .name = "no-cuda-gpu-arch=", |
| 4897 | 4961 | .syntax = .joined, |
| ... | ... | @@ -4912,9 +4976,11 @@ joinpd1("analyzer-output="), |
| 4912 | 4976 | }, |
| 4913 | 4977 | joinpd1("debug-info-kind="), |
| 4914 | 4978 | joinpd1("debugger-tuning="), |
| 4979 | joinpd1("exception-model="), | |
| 4915 | 4980 | joinpd1("fcf-runtime-abi="), |
| 4916 | 4981 | joinpd1("finit-character="), |
| 4917 | 4982 | joinpd1("fmax-type-align="), |
| 4983 | joinpd1("fmemory-profile="), | |
| 4918 | 4984 | joinpd1("fmessage-length="), |
| 4919 | 4985 | .{ |
| 4920 | 4986 | .name = "fopenmp-targets=", |
| ... | ... | @@ -4925,6 +4991,7 @@ joinpd1("fmessage-length="), |
| 4925 | 4991 | .psl = false, |
| 4926 | 4992 | }, |
| 4927 | 4993 | joinpd1("fopenmp-version="), |
| 4994 | joinpd1("fprofile-update="), | |
| 4928 | 4995 | joinpd1("fshow-overloads="), |
| 4929 | 4996 | joinpd1("ftemplate-depth-"), |
| 4930 | 4997 | joinpd1("ftemplate-depth="), |
| ... | ... | @@ -5074,6 +5141,7 @@ joinpd1("finit-integer="), |
| 5074 | 5141 | joinpd1("finit-logical="), |
| 5075 | 5142 | joinpd1("finline-limit="), |
| 5076 | 5143 | joinpd1("fobjc-runtime="), |
| 5144 | joinpd1("fprofile-list="), | |
| 5077 | 5145 | .{ |
| 5078 | 5146 | .name = "gcc-toolchain=", |
| 5079 | 5147 | .syntax = .joined, |
| ... | ... | @@ -5111,6 +5179,7 @@ joinpd1("Wlarger-than="), |
| 5111 | 5179 | .pd2 = true, |
| 5112 | 5180 | .psl = false, |
| 5113 | 5181 | }, |
| 5182 | joinpd1("arcmt-action="), | |
| 5114 | 5183 | joinpd1("ast-dump-all="), |
| 5115 | 5184 | .{ |
| 5116 | 5185 | .name = "autocomplete=", |
| ... | ... | @@ -5141,6 +5210,7 @@ joinpd1("fpass-plugin="), |
| 5141 | 5210 | joinpd1("fprofile-dir="), |
| 5142 | 5211 | joinpd1("fprofile-use="), |
| 5143 | 5212 | joinpd1("frandom-seed="), |
| 5213 | joinpd1("ftime-report="), | |
| 5144 | 5214 | joinpd1("gsplit-dwarf="), |
| 5145 | 5215 | jspd1("isystem-after"), |
| 5146 | 5216 | joinpd1("malign-jumps="), |
| ... | ... | @@ -5300,6 +5370,14 @@ jspd1("sub_library"), |
| 5300 | 5370 | .pd2 = false, |
| 5301 | 5371 | .psl = true, |
| 5302 | 5372 | }, |
| 5373 | .{ | |
| 5374 | .name = "vctoolsdir", | |
| 5375 | .syntax = .joined_or_separate, | |
| 5376 | .zig_equivalent = .other, | |
| 5377 | .pd1 = true, | |
| 5378 | .pd2 = false, | |
| 5379 | .psl = true, | |
| 5380 | }, | |
| 5303 | 5381 | .{ |
| 5304 | 5382 | .name = "classpath=", |
| 5305 | 5383 | .syntax = .joined, |
| ... | ... | @@ -5429,11 +5507,20 @@ jspd1("undefined"), |
| 5429 | 5507 | .pd2 = true, |
| 5430 | 5508 | .psl = false, |
| 5431 | 5509 | }, |
| 5510 | jspd1("dsym-dir"), | |
| 5432 | 5511 | joinpd1("fopenmp="), |
| 5433 | 5512 | joinpd1("fplugin="), |
| 5434 | 5513 | joinpd1("fuse-ld="), |
| 5435 | 5514 | joinpd1("fveclib="), |
| 5436 | 5515 | jspd1("isysroot"), |
| 5516 | .{ | |
| 5517 | .name = "ld-path=", | |
| 5518 | .syntax = .joined, | |
| 5519 | .zig_equivalent = .other, | |
| 5520 | .pd1 = false, | |
| 5521 | .pd2 = true, | |
| 5522 | .psl = false, | |
| 5523 | }, | |
| 5437 | 5524 | joinpd1("mcmodel="), |
| 5438 | 5525 | joinpd1("mconsole"), |
| 5439 | 5526 | joinpd1("mdouble="), |
| ... | ... | @@ -5658,6 +5745,14 @@ jspd1("Ttext"), |
| 5658 | 5745 | .pd2 = false, |
| 5659 | 5746 | .psl = true, |
| 5660 | 5747 | }, |
| 5748 | .{ | |
| 5749 | .name = "tune:", | |
| 5750 | .syntax = .joined, | |
| 5751 | .zig_equivalent = .other, | |
| 5752 | .pd1 = true, | |
| 5753 | .pd2 = false, | |
| 5754 | .psl = true, | |
| 5755 | }, | |
| 5661 | 5756 | .{ |
| 5662 | 5757 | .name = "warn-", |
| 5663 | 5758 | .syntax = .joined, |
| ... | ... | @@ -5743,6 +5838,14 @@ joinpd1("mtp="), |
| 5743 | 5838 | .pd2 = false, |
| 5744 | 5839 | .psl = false, |
| 5745 | 5840 | }, |
| 5841 | .{ | |
| 5842 | .name = "Fe:", | |
| 5843 | .syntax = .joined, | |
| 5844 | .zig_equivalent = .other, | |
| 5845 | .pd1 = true, | |
| 5846 | .pd2 = false, | |
| 5847 | .psl = true, | |
| 5848 | }, | |
| 5746 | 5849 | .{ |
| 5747 | 5850 | .name = "RTC", |
| 5748 | 5851 | .syntax = .joined, |
src/codegen/llvm.zig+4-1| ... | ... | @@ -28,6 +28,7 @@ pub fn targetTriple(allocator: *Allocator, target: std.Target) ![:0]u8 { |
| 28 | 28 | .avr => "avr", |
| 29 | 29 | .bpfel => "bpfel", |
| 30 | 30 | .bpfeb => "bpfeb", |
| 31 | .csky => "csky", | |
| 31 | 32 | .hexagon => "hexagon", |
| 32 | 33 | .mips => "mips", |
| 33 | 34 | .mipsel => "mipsel", |
| ... | ... | @@ -35,6 +36,7 @@ pub fn targetTriple(allocator: *Allocator, target: std.Target) ![:0]u8 { |
| 35 | 36 | .mips64el => "mips64el", |
| 36 | 37 | .msp430 => "msp430", |
| 37 | 38 | .powerpc => "powerpc", |
| 39 | .powerpcle => "powerpcle", | |
| 38 | 40 | .powerpc64 => "powerpc64", |
| 39 | 41 | .powerpc64le => "powerpc64le", |
| 40 | 42 | .r600 => "r600", |
| ... | ... | @@ -91,11 +93,11 @@ pub fn targetTriple(allocator: *Allocator, target: std.Target) ![:0]u8 { |
| 91 | 93 | .openbsd => "openbsd", |
| 92 | 94 | .solaris => "solaris", |
| 93 | 95 | .windows => "windows", |
| 96 | .zos => "zos", | |
| 94 | 97 | .haiku => "haiku", |
| 95 | 98 | .minix => "minix", |
| 96 | 99 | .rtems => "rtems", |
| 97 | 100 | .nacl => "nacl", |
| 98 | .cnk => "cnk", | |
| 99 | 101 | .aix => "aix", |
| 100 | 102 | .cuda => "cuda", |
| 101 | 103 | .nvcl => "nvcl", |
| ... | ... | @@ -126,6 +128,7 @@ pub fn targetTriple(allocator: *Allocator, target: std.Target) ![:0]u8 { |
| 126 | 128 | .gnueabi => "gnueabi", |
| 127 | 129 | .gnueabihf => "gnueabihf", |
| 128 | 130 | .gnux32 => "gnux32", |
| 131 | .gnuilp32 => "gnuilp32", | |
| 129 | 132 | .code16 => "code16", |
| 130 | 133 | .eabi => "eabi", |
| 131 | 134 | .eabihf => "eabihf", |
src/codegen/llvm/bindings.zig+91-88| ... | ... | @@ -508,6 +508,7 @@ pub const ObjectFormatType = extern enum(c_int) { |
| 508 | 508 | Unknown, |
| 509 | 509 | COFF, |
| 510 | 510 | ELF, |
| 511 | GOFF, | |
| 511 | 512 | MachO, |
| 512 | 513 | Wasm, |
| 513 | 514 | XCOFF, |
| ... | ... | @@ -528,97 +529,99 @@ extern fn ZigLLVMWriteArchive( |
| 528 | 529 | ) bool; |
| 529 | 530 | |
| 530 | 531 | pub const OSType = extern enum(c_int) { |
| 531 | UnknownOS = 0, | |
| 532 | Ananas = 1, | |
| 533 | CloudABI = 2, | |
| 534 | Darwin = 3, | |
| 535 | DragonFly = 4, | |
| 536 | FreeBSD = 5, | |
| 537 | Fuchsia = 6, | |
| 538 | IOS = 7, | |
| 539 | KFreeBSD = 8, | |
| 540 | Linux = 9, | |
| 541 | Lv2 = 10, | |
| 542 | MacOSX = 11, | |
| 543 | NetBSD = 12, | |
| 544 | OpenBSD = 13, | |
| 545 | Solaris = 14, | |
| 546 | Win32 = 15, | |
| 547 | Haiku = 16, | |
| 548 | Minix = 17, | |
| 549 | RTEMS = 18, | |
| 550 | NaCl = 19, | |
| 551 | CNK = 20, | |
| 552 | AIX = 21, | |
| 553 | CUDA = 22, | |
| 554 | NVCL = 23, | |
| 555 | AMDHSA = 24, | |
| 556 | PS4 = 25, | |
| 557 | ELFIAMCU = 26, | |
| 558 | TvOS = 27, | |
| 559 | WatchOS = 28, | |
| 560 | Mesa3D = 29, | |
| 561 | Contiki = 30, | |
| 562 | AMDPAL = 31, | |
| 563 | HermitCore = 32, | |
| 564 | Hurd = 33, | |
| 565 | WASI = 34, | |
| 566 | Emscripten = 35, | |
| 532 | UnknownOS, | |
| 533 | Ananas, | |
| 534 | CloudABI, | |
| 535 | Darwin, | |
| 536 | DragonFly, | |
| 537 | FreeBSD, | |
| 538 | Fuchsia, | |
| 539 | IOS, | |
| 540 | KFreeBSD, | |
| 541 | Linux, | |
| 542 | Lv2, | |
| 543 | MacOSX, | |
| 544 | NetBSD, | |
| 545 | OpenBSD, | |
| 546 | Solaris, | |
| 547 | Win32, | |
| 548 | ZOS, | |
| 549 | Haiku, | |
| 550 | Minix, | |
| 551 | RTEMS, | |
| 552 | NaCl, | |
| 553 | AIX, | |
| 554 | CUDA, | |
| 555 | NVCL, | |
| 556 | AMDHSA, | |
| 557 | PS4, | |
| 558 | ELFIAMCU, | |
| 559 | TvOS, | |
| 560 | WatchOS, | |
| 561 | Mesa3D, | |
| 562 | Contiki, | |
| 563 | AMDPAL, | |
| 564 | HermitCore, | |
| 565 | Hurd, | |
| 566 | WASI, | |
| 567 | Emscripten, | |
| 567 | 568 | }; |
| 568 | 569 | |
| 569 | 570 | pub const ArchType = extern enum(c_int) { |
| 570 | UnknownArch = 0, | |
| 571 | arm = 1, | |
| 572 | armeb = 2, | |
| 573 | aarch64 = 3, | |
| 574 | aarch64_be = 4, | |
| 575 | aarch64_32 = 5, | |
| 576 | arc = 6, | |
| 577 | avr = 7, | |
| 578 | bpfel = 8, | |
| 579 | bpfeb = 9, | |
| 580 | hexagon = 10, | |
| 581 | mips = 11, | |
| 582 | mipsel = 12, | |
| 583 | mips64 = 13, | |
| 584 | mips64el = 14, | |
| 585 | msp430 = 15, | |
| 586 | ppc = 16, | |
| 587 | ppc64 = 17, | |
| 588 | ppc64le = 18, | |
| 589 | r600 = 19, | |
| 590 | amdgcn = 20, | |
| 591 | riscv32 = 21, | |
| 592 | riscv64 = 22, | |
| 593 | sparc = 23, | |
| 594 | sparcv9 = 24, | |
| 595 | sparcel = 25, | |
| 596 | systemz = 26, | |
| 597 | tce = 27, | |
| 598 | tcele = 28, | |
| 599 | thumb = 29, | |
| 600 | thumbeb = 30, | |
| 601 | x86 = 31, | |
| 602 | x86_64 = 32, | |
| 603 | xcore = 33, | |
| 604 | nvptx = 34, | |
| 605 | nvptx64 = 35, | |
| 606 | le32 = 36, | |
| 607 | le64 = 37, | |
| 608 | amdil = 38, | |
| 609 | amdil64 = 39, | |
| 610 | hsail = 40, | |
| 611 | hsail64 = 41, | |
| 612 | spir = 42, | |
| 613 | spir64 = 43, | |
| 614 | kalimba = 44, | |
| 615 | shave = 45, | |
| 616 | lanai = 46, | |
| 617 | wasm32 = 47, | |
| 618 | wasm64 = 48, | |
| 619 | renderscript32 = 49, | |
| 620 | renderscript64 = 50, | |
| 621 | ve = 51, | |
| 571 | UnknownArch, | |
| 572 | arm, | |
| 573 | armeb, | |
| 574 | aarch64, | |
| 575 | aarch64_be, | |
| 576 | aarch64_32, | |
| 577 | arc, | |
| 578 | avr, | |
| 579 | bpfel, | |
| 580 | bpfeb, | |
| 581 | csky, | |
| 582 | hexagon, | |
| 583 | mips, | |
| 584 | mipsel, | |
| 585 | mips64, | |
| 586 | mips64el, | |
| 587 | msp430, | |
| 588 | ppc, | |
| 589 | ppcle, | |
| 590 | ppc64, | |
| 591 | ppc64le, | |
| 592 | r600, | |
| 593 | amdgcn, | |
| 594 | riscv32, | |
| 595 | riscv64, | |
| 596 | sparc, | |
| 597 | sparcv9, | |
| 598 | sparcel, | |
| 599 | systemz, | |
| 600 | tce, | |
| 601 | tcele, | |
| 602 | thumb, | |
| 603 | thumbeb, | |
| 604 | x86, | |
| 605 | x86_64, | |
| 606 | xcore, | |
| 607 | nvptx, | |
| 608 | nvptx64, | |
| 609 | le32, | |
| 610 | le64, | |
| 611 | amdil, | |
| 612 | amdil64, | |
| 613 | hsail, | |
| 614 | hsail64, | |
| 615 | spir, | |
| 616 | spir64, | |
| 617 | kalimba, | |
| 618 | shave, | |
| 619 | lanai, | |
| 620 | wasm32, | |
| 621 | wasm64, | |
| 622 | renderscript32, | |
| 623 | renderscript64, | |
| 624 | ve, | |
| 622 | 625 | }; |
| 623 | 626 | |
| 624 | 627 | pub const ParseCommandLineOptions = ZigLLVMParseCommandLineOptions; |
src/glibc.zig+18-18| ... | ... | @@ -820,26 +820,26 @@ pub fn buildSharedObjects(comp: *Compilation) !void { |
| 820 | 820 | // .globl _Exit_2_2_5 |
| 821 | 821 | // .type _Exit_2_2_5, %function; |
| 822 | 822 | // .symver _Exit_2_2_5, _Exit@@GLIBC_2.2.5 |
| 823 | // .hidden _Exit_2_2_5 | |
| 824 | 823 | // _Exit_2_2_5: |
| 825 | 824 | const ver_index = ver_list.versions[ver_i]; |
| 826 | 825 | const ver = metadata.all_versions[ver_index]; |
| 827 | 826 | const sym_name = libc_fn.name; |
| 828 | 827 | // Default symbol version definition vs normal symbol version definition |
| 829 | const want_two_ats = chosen_def_ver_index != 255 and ver_index == chosen_def_ver_index; | |
| 830 | const at_sign_str = "@@"[0 .. @boolToInt(want_two_ats) + @as(usize, 1)]; | |
| 831 | ||
| 828 | const want_default = chosen_def_ver_index != 255 and ver_index == chosen_def_ver_index; | |
| 829 | const at_sign_str: []const u8 = if (want_default) "@@" else "@"; | |
| 832 | 830 | if (ver.patch == 0) { |
| 833 | const sym_plus_ver = try std.fmt.allocPrint( | |
| 834 | arena, | |
| 835 | "{s}_{d}_{d}", | |
| 836 | .{ sym_name, ver.major, ver.minor }, | |
| 837 | ); | |
| 831 | const sym_plus_ver = if (want_default) | |
| 832 | sym_name | |
| 833 | else | |
| 834 | try std.fmt.allocPrint( | |
| 835 | arena, | |
| 836 | "{s}_GLIBC_{d}_{d}", | |
| 837 | .{ sym_name, ver.major, ver.minor }, | |
| 838 | ); | |
| 838 | 839 | try zig_body.writer().print( |
| 839 | 840 | \\.globl {s} |
| 840 | 841 | \\.type {s}, %function; |
| 841 | 842 | \\.symver {s}, {s}{s}GLIBC_{d}.{d} |
| 842 | \\.hidden {s} | |
| 843 | 843 | \\{s}: |
| 844 | 844 | \\ |
| 845 | 845 | , .{ |
| ... | ... | @@ -851,19 +851,20 @@ pub fn buildSharedObjects(comp: *Compilation) !void { |
| 851 | 851 | ver.major, |
| 852 | 852 | ver.minor, |
| 853 | 853 | sym_plus_ver, |
| 854 | sym_plus_ver, | |
| 855 | 854 | }); |
| 856 | 855 | } else { |
| 857 | const sym_plus_ver = try std.fmt.allocPrint( | |
| 858 | arena, | |
| 859 | "{s}_{d}_{d}_{d}", | |
| 860 | .{ sym_name, ver.major, ver.minor, ver.patch }, | |
| 861 | ); | |
| 856 | const sym_plus_ver = if (want_default) | |
| 857 | sym_name | |
| 858 | else | |
| 859 | try std.fmt.allocPrint( | |
| 860 | arena, | |
| 861 | "{s}_GLIBC_{d}_{d}_{d}", | |
| 862 | .{ sym_name, ver.major, ver.minor, ver.patch }, | |
| 863 | ); | |
| 862 | 864 | try zig_body.writer().print( |
| 863 | 865 | \\.globl {s} |
| 864 | 866 | \\.type {s}, %function; |
| 865 | 867 | \\.symver {s}, {s}{s}GLIBC_{d}.{d}.{d} |
| 866 | \\.hidden {s} | |
| 867 | 868 | \\{s}: |
| 868 | 869 | \\ |
| 869 | 870 | , .{ |
| ... | ... | @@ -876,7 +877,6 @@ pub fn buildSharedObjects(comp: *Compilation) !void { |
| 876 | 877 | ver.minor, |
| 877 | 878 | ver.patch, |
| 878 | 879 | sym_plus_ver, |
| 879 | sym_plus_ver, | |
| 880 | 880 | }); |
| 881 | 881 | } |
| 882 | 882 | } |
src/libcxx.zig+2| ... | ... | @@ -49,6 +49,7 @@ const libcxx_files = [_][]const u8{ |
| 49 | 49 | "src/future.cpp", |
| 50 | 50 | "src/hash.cpp", |
| 51 | 51 | "src/ios.cpp", |
| 52 | "src/ios.instantiations.cpp", | |
| 52 | 53 | "src/iostream.cpp", |
| 53 | 54 | "src/locale.cpp", |
| 54 | 55 | "src/memory.cpp", |
| ... | ... | @@ -127,6 +128,7 @@ pub fn buildLibCXX(comp: *Compilation) !void { |
| 127 | 128 | try cflags.append("-DLIBCXX_BUILDING_LIBCXXABI"); |
| 128 | 129 | try cflags.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 129 | 130 | try cflags.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 131 | try cflags.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); | |
| 130 | 132 | |
| 131 | 133 | if (target.abi.isMusl()) { |
| 132 | 134 | try cflags.append("-D_LIBCPP_HAS_MUSL_LIBC"); |
src/stage1/codegen.cpp+17-44| ... | ... | @@ -537,14 +537,12 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) { |
| 537 | 537 | if (fn->body_node != nullptr) { |
| 538 | 538 | maybe_export_dll(g, llvm_fn, linkage); |
| 539 | 539 | |
| 540 | bool want_fn_safety = g->build_mode != BuildModeFastRelease && | |
| 540 | bool want_ssp_attrs = g->build_mode != BuildModeFastRelease && | |
| 541 | 541 | g->build_mode != BuildModeSmallRelease && |
| 542 | !fn->def_scope->safety_off; | |
| 543 | if (want_fn_safety) { | |
| 544 | if (g->link_libc) { | |
| 545 | addLLVMFnAttr(llvm_fn, "sspstrong"); | |
| 546 | addLLVMFnAttrStr(llvm_fn, "stack-protector-buffer-size", "4"); | |
| 547 | } | |
| 542 | g->link_libc; | |
| 543 | if (want_ssp_attrs) { | |
| 544 | addLLVMFnAttr(llvm_fn, "sspstrong"); | |
| 545 | addLLVMFnAttrStr(llvm_fn, "stack-protector-buffer-size", "4"); | |
| 548 | 546 | } |
| 549 | 547 | if (g->have_stack_probing && !fn->def_scope->safety_off) { |
| 550 | 548 | addLLVMFnAttrStr(llvm_fn, "probe-stack", "__zig_probe_stack"); |
| ... | ... | @@ -598,7 +596,7 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) { |
| 598 | 596 | } else if (want_first_arg_sret(g, &fn_type->data.fn.fn_type_id)) { |
| 599 | 597 | // Sret pointers must not be address 0 |
| 600 | 598 | addLLVMArgAttr(llvm_fn, 0, "nonnull"); |
| 601 | addLLVMArgAttr(llvm_fn, 0, "sret"); | |
| 599 | ZigLLVMAddSretAttr(llvm_fn, 0, get_llvm_type(g, return_type)); | |
| 602 | 600 | if (cc_want_sret_attr(cc)) { |
| 603 | 601 | addLLVMArgAttr(llvm_fn, 0, "noalias"); |
| 604 | 602 | } |
| ... | ... | @@ -1644,35 +1642,16 @@ static const BuildBinOpFunc unsigned_op[3] = { LLVMBuildNUWAdd, LLVMBuildNUWSub, |
| 1644 | 1642 | static LLVMValueRef gen_overflow_op(CodeGen *g, ZigType *operand_type, AddSubMul op, |
| 1645 | 1643 | LLVMValueRef val1, LLVMValueRef val2) |
| 1646 | 1644 | { |
| 1647 | LLVMValueRef overflow_bit; | |
| 1648 | LLVMValueRef result; | |
| 1649 | ||
| 1645 | LLVMValueRef fn_val = get_int_overflow_fn(g, operand_type, op); | |
| 1646 | LLVMValueRef params[] = { | |
| 1647 | val1, | |
| 1648 | val2, | |
| 1649 | }; | |
| 1650 | LLVMValueRef result_struct = LLVMBuildCall(g->builder, fn_val, params, 2, ""); | |
| 1651 | LLVMValueRef result = LLVMBuildExtractValue(g->builder, result_struct, 0, ""); | |
| 1652 | LLVMValueRef overflow_bit = LLVMBuildExtractValue(g->builder, result_struct, 1, ""); | |
| 1650 | 1653 | if (operand_type->id == ZigTypeIdVector) { |
| 1651 | ZigType *int_type = operand_type->data.vector.elem_type; | |
| 1652 | assert(int_type->id == ZigTypeIdInt); | |
| 1653 | LLVMTypeRef one_more_bit_int = LLVMIntType(int_type->data.integral.bit_count + 1); | |
| 1654 | LLVMTypeRef one_more_bit_int_vector = LLVMVectorType(one_more_bit_int, operand_type->data.vector.len); | |
| 1655 | const auto buildExtFn = int_type->data.integral.is_signed ? LLVMBuildSExt : LLVMBuildZExt; | |
| 1656 | LLVMValueRef extended1 = buildExtFn(g->builder, val1, one_more_bit_int_vector, ""); | |
| 1657 | LLVMValueRef extended2 = buildExtFn(g->builder, val2, one_more_bit_int_vector, ""); | |
| 1658 | LLVMValueRef extended_result = wrap_op[op](g->builder, extended1, extended2, ""); | |
| 1659 | result = LLVMBuildTrunc(g->builder, extended_result, get_llvm_type(g, operand_type), ""); | |
| 1660 | ||
| 1661 | LLVMValueRef re_extended_result = buildExtFn(g->builder, result, one_more_bit_int_vector, ""); | |
| 1662 | LLVMValueRef overflow_vector = LLVMBuildICmp(g->builder, LLVMIntNE, extended_result, re_extended_result, ""); | |
| 1663 | LLVMTypeRef bitcast_int_type = LLVMIntType(operand_type->data.vector.len); | |
| 1664 | LLVMValueRef bitcasted_overflow = LLVMBuildBitCast(g->builder, overflow_vector, bitcast_int_type, ""); | |
| 1665 | LLVMValueRef zero = LLVMConstNull(bitcast_int_type); | |
| 1666 | overflow_bit = LLVMBuildICmp(g->builder, LLVMIntNE, bitcasted_overflow, zero, ""); | |
| 1667 | } else { | |
| 1668 | LLVMValueRef fn_val = get_int_overflow_fn(g, operand_type, op); | |
| 1669 | LLVMValueRef params[] = { | |
| 1670 | val1, | |
| 1671 | val2, | |
| 1672 | }; | |
| 1673 | LLVMValueRef result_struct = LLVMBuildCall(g->builder, fn_val, params, 2, ""); | |
| 1674 | result = LLVMBuildExtractValue(g->builder, result_struct, 0, ""); | |
| 1675 | overflow_bit = LLVMBuildExtractValue(g->builder, result_struct, 1, ""); | |
| 1654 | overflow_bit = ZigLLVMBuildOrReduce(g->builder, overflow_bit); | |
| 1676 | 1655 | } |
| 1677 | 1656 | |
| 1678 | 1657 | LLVMBasicBlockRef fail_block = LLVMAppendBasicBlock(g->cur_fn_val, "OverflowFail"); |
| ... | ... | @@ -2040,7 +2019,7 @@ static bool iter_function_params_c_abi(CodeGen *g, ZigType *fn_type, FnWalk *fn_ |
| 2040 | 2019 | switch (fn_walk->id) { |
| 2041 | 2020 | case FnWalkIdAttrs: |
| 2042 | 2021 | if (abi_class != X64CABIClass_MEMORY_nobyval) { |
| 2043 | ZigLLVMAddByValAttr(llvm_fn, fn_walk->data.attrs.gen_i + 1, get_llvm_type(g, ty)); | |
| 2022 | ZigLLVMAddByValAttr(llvm_fn, fn_walk->data.attrs.gen_i, get_llvm_type(g, ty)); | |
| 2044 | 2023 | addLLVMArgAttrInt(llvm_fn, fn_walk->data.attrs.gen_i, "align", get_abi_alignment(g, ty)); |
| 2045 | 2024 | } else if (g->zig_target->arch == ZigLLVM_aarch64 || |
| 2046 | 2025 | g->zig_target->arch == ZigLLVM_aarch64_be) |
| ... | ... | @@ -4105,12 +4084,6 @@ static void gen_set_stack_pointer(CodeGen *g, LLVMValueRef aligned_end_addr) { |
| 4105 | 4084 | LLVMBuildCall(g->builder, write_register_fn_val, params, 2, ""); |
| 4106 | 4085 | } |
| 4107 | 4086 | |
| 4108 | static void set_call_instr_sret(CodeGen *g, LLVMValueRef call_instr) { | |
| 4109 | unsigned attr_kind_id = LLVMGetEnumAttributeKindForName("sret", 4); | |
| 4110 | LLVMAttributeRef sret_attr = LLVMCreateEnumAttribute(LLVMGetGlobalContext(), attr_kind_id, 0); | |
| 4111 | LLVMAddCallSiteAttribute(call_instr, 1, sret_attr); | |
| 4112 | } | |
| 4113 | ||
| 4114 | 4087 | static void render_async_spills(CodeGen *g) { |
| 4115 | 4088 | ZigType *fn_type = g->cur_fn->type_entry; |
| 4116 | 4089 | ZigType *import = get_scope_import(&g->cur_fn->fndef_scope->base); |
| ... | ... | @@ -4634,7 +4607,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutableGen *executable, IrIn |
| 4634 | 4607 | } else if (!ret_has_bits) { |
| 4635 | 4608 | return nullptr; |
| 4636 | 4609 | } else if (first_arg_ret) { |
| 4637 | set_call_instr_sret(g, result); | |
| 4610 | ZigLLVMSetCallSret(result, get_llvm_type(g, src_return_type)); | |
| 4638 | 4611 | return result_loc; |
| 4639 | 4612 | } else if (handle_is_ptr(g, src_return_type)) { |
| 4640 | 4613 | LLVMValueRef store_instr = LLVMBuildStore(g->builder, result, result_loc); |
src/stage1/stage1.h+1-1| ... | ... | @@ -73,11 +73,11 @@ enum Os { |
| 73 | 73 | OsOpenBSD, |
| 74 | 74 | OsSolaris, |
| 75 | 75 | OsWindows, |
| 76 | OsZOS, | |
| 76 | 77 | OsHaiku, |
| 77 | 78 | OsMinix, |
| 78 | 79 | OsRTEMS, |
| 79 | 80 | OsNaCl, // Native Client |
| 80 | OsCNK, // BG/P Compute-Node Kernel | |
| 81 | 81 | OsAIX, |
| 82 | 82 | OsCUDA, // NVIDIA CUDA |
| 83 | 83 | OsNVCL, // NVIDIA OpenCL |
src/stage1/target.cpp+24-9| ... | ... | @@ -23,6 +23,7 @@ static const ZigLLVM_ArchType arch_list[] = { |
| 23 | 23 | ZigLLVM_avr, // AVR: Atmel AVR microcontroller |
| 24 | 24 | ZigLLVM_bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) |
| 25 | 25 | ZigLLVM_bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) |
| 26 | ZigLLVM_csky, // CSKY: csky | |
| 26 | 27 | ZigLLVM_hexagon, // Hexagon: hexagon |
| 27 | 28 | ZigLLVM_mips, // MIPS: mips, mipsallegrex, mipsr6 |
| 28 | 29 | ZigLLVM_mipsel, // MIPSEL: mipsel, mipsallegrexe, mipsr6el |
| ... | ... | @@ -30,6 +31,7 @@ static const ZigLLVM_ArchType arch_list[] = { |
| 30 | 31 | ZigLLVM_mips64el, // MIPS64EL: mips64el, mips64r6el, mipsn32el, mipsn32r6el |
| 31 | 32 | ZigLLVM_msp430, // MSP430: msp430 |
| 32 | 33 | ZigLLVM_ppc, // PPC: powerpc |
| 34 | ZigLLVM_ppcle, // PPCLE: powerpc (little endian) | |
| 33 | 35 | ZigLLVM_ppc64, // PPC64: powerpc64, ppu |
| 34 | 36 | ZigLLVM_ppc64le, // PPC64LE: powerpc64le |
| 35 | 37 | ZigLLVM_r600, // R600: AMD GPUs HD2XXX - HD6XXX |
| ... | ... | @@ -71,8 +73,6 @@ static const ZigLLVM_VendorType vendor_list[] = { |
| 71 | 73 | ZigLLVM_Apple, |
| 72 | 74 | ZigLLVM_PC, |
| 73 | 75 | ZigLLVM_SCEI, |
| 74 | ZigLLVM_BGP, | |
| 75 | ZigLLVM_BGQ, | |
| 76 | 76 | ZigLLVM_Freescale, |
| 77 | 77 | ZigLLVM_IBM, |
| 78 | 78 | ZigLLVM_ImaginationTechnologies, |
| ... | ... | @@ -101,11 +101,11 @@ static const Os os_list[] = { |
| 101 | 101 | OsOpenBSD, |
| 102 | 102 | OsSolaris, |
| 103 | 103 | OsWindows, |
| 104 | OsZOS, | |
| 104 | 105 | OsHaiku, |
| 105 | 106 | OsMinix, |
| 106 | 107 | OsRTEMS, |
| 107 | 108 | OsNaCl, // Native Client |
| 108 | OsCNK, // BG/P Compute-Node Kernel | |
| 109 | 109 | OsAIX, |
| 110 | 110 | OsCUDA, // NVIDIA CUDA |
| 111 | 111 | OsNVCL, // NVIDIA OpenCL |
| ... | ... | @@ -135,6 +135,7 @@ static const ZigLLVM_EnvironmentType abi_list[] = { |
| 135 | 135 | ZigLLVM_GNUEABI, |
| 136 | 136 | ZigLLVM_GNUEABIHF, |
| 137 | 137 | ZigLLVM_GNUX32, |
| 138 | ZigLLVM_GNUILP32, | |
| 138 | 139 | ZigLLVM_CODE16, |
| 139 | 140 | ZigLLVM_EABI, |
| 140 | 141 | ZigLLVM_EABIHF, |
| ... | ... | @@ -155,8 +156,10 @@ static const ZigLLVM_ObjectFormatType oformat_list[] = { |
| 155 | 156 | ZigLLVM_UnknownObjectFormat, |
| 156 | 157 | ZigLLVM_COFF, |
| 157 | 158 | ZigLLVM_ELF, |
| 159 | ZigLLVM_GOFF, | |
| 158 | 160 | ZigLLVM_MachO, |
| 159 | 161 | ZigLLVM_Wasm, |
| 162 | ZigLLVM_XCOFF, | |
| 160 | 163 | }; |
| 161 | 164 | |
| 162 | 165 | size_t target_oformat_count(void) { |
| ... | ... | @@ -173,6 +176,7 @@ const char *target_oformat_name(ZigLLVM_ObjectFormatType oformat) { |
| 173 | 176 | case ZigLLVM_UnknownObjectFormat: return "unknown"; |
| 174 | 177 | case ZigLLVM_COFF: return "coff"; |
| 175 | 178 | case ZigLLVM_ELF: return "elf"; |
| 179 | case ZigLLVM_GOFF: return "goff"; | |
| 176 | 180 | case ZigLLVM_MachO: return "macho"; |
| 177 | 181 | case ZigLLVM_Wasm: return "wasm"; |
| 178 | 182 | case ZigLLVM_XCOFF: return "xcoff"; |
| ... | ... | @@ -240,6 +244,8 @@ ZigLLVM_OSType get_llvm_os_type(Os os_type) { |
| 240 | 244 | case OsWindows: |
| 241 | 245 | case OsUefi: |
| 242 | 246 | return ZigLLVM_Win32; |
| 247 | case OsZOS: | |
| 248 | return ZigLLVM_ZOS; | |
| 243 | 249 | case OsHaiku: |
| 244 | 250 | return ZigLLVM_Haiku; |
| 245 | 251 | case OsMinix: |
| ... | ... | @@ -248,8 +254,6 @@ ZigLLVM_OSType get_llvm_os_type(Os os_type) { |
| 248 | 254 | return ZigLLVM_RTEMS; |
| 249 | 255 | case OsNaCl: |
| 250 | 256 | return ZigLLVM_NaCl; |
| 251 | case OsCNK: | |
| 252 | return ZigLLVM_CNK; | |
| 253 | 257 | case OsAIX: |
| 254 | 258 | return ZigLLVM_AIX; |
| 255 | 259 | case OsCUDA: |
| ... | ... | @@ -306,11 +310,11 @@ const char *target_os_name(Os os_type) { |
| 306 | 310 | case OsOpenBSD: |
| 307 | 311 | case OsSolaris: |
| 308 | 312 | case OsWindows: |
| 313 | case OsZOS: | |
| 309 | 314 | case OsHaiku: |
| 310 | 315 | case OsMinix: |
| 311 | 316 | case OsRTEMS: |
| 312 | 317 | case OsNaCl: // Native Client |
| 313 | case OsCNK: // BG/P Compute-Node Kernel | |
| 314 | 318 | case OsAIX: |
| 315 | 319 | case OsCUDA: // NVIDIA CUDA |
| 316 | 320 | case OsNVCL: // NVIDIA OpenCL |
| ... | ... | @@ -485,6 +489,7 @@ uint32_t target_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 485 | 489 | case ZigLLVM_mipsel: |
| 486 | 490 | case ZigLLVM_nvptx: |
| 487 | 491 | case ZigLLVM_ppc: |
| 492 | case ZigLLVM_ppcle: | |
| 488 | 493 | case ZigLLVM_r600: |
| 489 | 494 | case ZigLLVM_riscv32: |
| 490 | 495 | case ZigLLVM_sparc: |
| ... | ... | @@ -504,6 +509,7 @@ uint32_t target_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 504 | 509 | case ZigLLVM_wasm32: |
| 505 | 510 | case ZigLLVM_renderscript32: |
| 506 | 511 | case ZigLLVM_aarch64_32: |
| 512 | case ZigLLVM_csky: | |
| 507 | 513 | return 32; |
| 508 | 514 | |
| 509 | 515 | case ZigLLVM_aarch64: |
| ... | ... | @@ -550,6 +556,7 @@ uint32_t target_arch_largest_atomic_bits(ZigLLVM_ArchType arch) { |
| 550 | 556 | case ZigLLVM_mipsel: |
| 551 | 557 | case ZigLLVM_nvptx: |
| 552 | 558 | case ZigLLVM_ppc: |
| 559 | case ZigLLVM_ppcle: | |
| 553 | 560 | case ZigLLVM_r600: |
| 554 | 561 | case ZigLLVM_riscv32: |
| 555 | 562 | case ZigLLVM_sparc: |
| ... | ... | @@ -568,6 +575,7 @@ uint32_t target_arch_largest_atomic_bits(ZigLLVM_ArchType arch) { |
| 568 | 575 | case ZigLLVM_shave: |
| 569 | 576 | case ZigLLVM_wasm32: |
| 570 | 577 | case ZigLLVM_renderscript32: |
| 578 | case ZigLLVM_csky: | |
| 571 | 579 | return 32; |
| 572 | 580 | |
| 573 | 581 | case ZigLLVM_aarch64: |
| ... | ... | @@ -707,10 +715,10 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { |
| 707 | 715 | case OsKFreeBSD: |
| 708 | 716 | case OsLv2: |
| 709 | 717 | case OsSolaris: |
| 718 | case OsZOS: | |
| 710 | 719 | case OsMinix: |
| 711 | 720 | case OsRTEMS: |
| 712 | 721 | case OsNaCl: |
| 713 | case OsCNK: | |
| 714 | 722 | case OsAIX: |
| 715 | 723 | case OsCUDA: |
| 716 | 724 | case OsNVCL: |
| ... | ... | @@ -799,6 +807,7 @@ const char *arch_stack_pointer_register_name(ZigLLVM_ArchType arch) { |
| 799 | 807 | case ZigLLVM_riscv64: |
| 800 | 808 | case ZigLLVM_mipsel: |
| 801 | 809 | case ZigLLVM_ppc: |
| 810 | case ZigLLVM_ppcle: | |
| 802 | 811 | case ZigLLVM_ppc64: |
| 803 | 812 | case ZigLLVM_ppc64le: |
| 804 | 813 | return "sp"; |
| ... | ... | @@ -814,6 +823,7 @@ const char *arch_stack_pointer_register_name(ZigLLVM_ArchType arch) { |
| 814 | 823 | case ZigLLVM_avr: |
| 815 | 824 | case ZigLLVM_bpfeb: |
| 816 | 825 | case ZigLLVM_bpfel: |
| 826 | case ZigLLVM_csky: | |
| 817 | 827 | case ZigLLVM_hexagon: |
| 818 | 828 | case ZigLLVM_lanai: |
| 819 | 829 | case ZigLLVM_hsail: |
| ... | ... | @@ -868,6 +878,7 @@ bool target_is_arm(const ZigTarget *target) { |
| 868 | 878 | case ZigLLVM_avr: |
| 869 | 879 | case ZigLLVM_bpfeb: |
| 870 | 880 | case ZigLLVM_bpfel: |
| 881 | case ZigLLVM_csky: | |
| 871 | 882 | case ZigLLVM_hexagon: |
| 872 | 883 | case ZigLLVM_lanai: |
| 873 | 884 | case ZigLLVM_hsail: |
| ... | ... | @@ -901,6 +912,7 @@ bool target_is_arm(const ZigTarget *target) { |
| 901 | 912 | case ZigLLVM_wasm64: |
| 902 | 913 | case ZigLLVM_xcore: |
| 903 | 914 | case ZigLLVM_ppc: |
| 915 | case ZigLLVM_ppcle: | |
| 904 | 916 | case ZigLLVM_ppc64: |
| 905 | 917 | case ZigLLVM_ve: |
| 906 | 918 | return false; |
| ... | ... | @@ -951,11 +963,10 @@ ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) { |
| 951 | 963 | case OsCloudABI: |
| 952 | 964 | case OsLv2: |
| 953 | 965 | case OsSolaris: |
| 954 | case OsHaiku: | |
| 966 | case OsZOS: | |
| 955 | 967 | case OsMinix: |
| 956 | 968 | case OsRTEMS: |
| 957 | 969 | case OsNaCl: |
| 958 | case OsCNK: | |
| 959 | 970 | case OsAIX: |
| 960 | 971 | case OsCUDA: |
| 961 | 972 | case OsNVCL: |
| ... | ... | @@ -979,6 +990,7 @@ ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) { |
| 979 | 990 | case OsNetBSD: |
| 980 | 991 | case OsDragonFly: |
| 981 | 992 | case OsHurd: |
| 993 | case OsHaiku: | |
| 982 | 994 | return ZigLLVM_GNU; |
| 983 | 995 | case OsUefi: |
| 984 | 996 | case OsWindows: |
| ... | ... | @@ -1039,6 +1051,8 @@ static const AvailableLibC libcs_available[] = { |
| 1039 | 1051 | {ZigLLVM_arm, OsLinux, ZigLLVM_MuslEABI}, |
| 1040 | 1052 | {ZigLLVM_arm, OsLinux, ZigLLVM_MuslEABIHF}, |
| 1041 | 1053 | {ZigLLVM_arm, OsWindows, ZigLLVM_GNU}, |
| 1054 | {ZigLLVM_csky, OsLinux, ZigLLVM_GNUEABI}, | |
| 1055 | {ZigLLVM_csky, OsLinux, ZigLLVM_GNUEABIHF}, | |
| 1042 | 1056 | {ZigLLVM_x86, OsLinux, ZigLLVM_GNU}, |
| 1043 | 1057 | {ZigLLVM_x86, OsLinux, ZigLLVM_Musl}, |
| 1044 | 1058 | {ZigLLVM_x86, OsWindows, ZigLLVM_GNU}, |
| ... | ... | @@ -1094,6 +1108,7 @@ const char *target_libc_generic_name(const ZigTarget *target) { |
| 1094 | 1108 | case ZigLLVM_GNUEABI: |
| 1095 | 1109 | case ZigLLVM_GNUEABIHF: |
| 1096 | 1110 | case ZigLLVM_GNUX32: |
| 1111 | case ZigLLVM_GNUILP32: | |
| 1097 | 1112 | return "glibc"; |
| 1098 | 1113 | case ZigLLVM_Musl: |
| 1099 | 1114 | case ZigLLVM_MuslEABI: |
src/stage1/zig0.cpp+2-2| ... | ... | @@ -94,6 +94,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) { |
| 94 | 94 | return OsSolaris; |
| 95 | 95 | case ZigLLVM_Win32: |
| 96 | 96 | return OsWindows; |
| 97 | case ZigLLVM_ZOS: | |
| 98 | return OsZOS; | |
| 97 | 99 | case ZigLLVM_Haiku: |
| 98 | 100 | return OsHaiku; |
| 99 | 101 | case ZigLLVM_Minix: |
| ... | ... | @@ -102,8 +104,6 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) { |
| 102 | 104 | return OsRTEMS; |
| 103 | 105 | case ZigLLVM_NaCl: |
| 104 | 106 | return OsNaCl; |
| 105 | case ZigLLVM_CNK: | |
| 106 | return OsCNK; | |
| 107 | 107 | case ZigLLVM_AIX: |
| 108 | 108 | return OsAIX; |
| 109 | 109 | case ZigLLVM_CUDA: |
src/target.zig+6-1| ... | ... | @@ -25,6 +25,8 @@ pub const available_libcs = [_]ArchOsAbi{ |
| 25 | 25 | .{ .arch = .arm, .os = .linux, .abi = .musleabi }, |
| 26 | 26 | .{ .arch = .arm, .os = .linux, .abi = .musleabihf }, |
| 27 | 27 | .{ .arch = .arm, .os = .windows, .abi = .gnu }, |
| 28 | .{ .arch = .csky, .os = .linux, .abi = .gnueabi }, | |
| 29 | .{ .arch = .csky, .os = .linux, .abi = .gnueabihf }, | |
| 28 | 30 | .{ .arch = .i386, .os = .linux, .abi = .gnu }, |
| 29 | 31 | .{ .arch = .i386, .os = .linux, .abi = .musl }, |
| 30 | 32 | .{ .arch = .i386, .os = .windows, .abi = .gnu }, |
| ... | ... | @@ -71,6 +73,7 @@ pub fn libCGenericName(target: std.Target) [:0]const u8 { |
| 71 | 73 | .gnueabi, |
| 72 | 74 | .gnueabihf, |
| 73 | 75 | .gnux32, |
| 76 | .gnuilp32, | |
| 74 | 77 | => return "glibc", |
| 75 | 78 | .musl, |
| 76 | 79 | .musleabi, |
| ... | ... | @@ -204,11 +207,11 @@ pub fn osToLLVM(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 204 | 207 | .netbsd => .NetBSD, |
| 205 | 208 | .openbsd => .OpenBSD, |
| 206 | 209 | .solaris => .Solaris, |
| 210 | .zos => .ZOS, | |
| 207 | 211 | .haiku => .Haiku, |
| 208 | 212 | .minix => .Minix, |
| 209 | 213 | .rtems => .RTEMS, |
| 210 | 214 | .nacl => .NaCl, |
| 211 | .cnk => .CNK, | |
| 212 | 215 | .aix => .AIX, |
| 213 | 216 | .cuda => .CUDA, |
| 214 | 217 | .nvcl => .NVCL, |
| ... | ... | @@ -238,6 +241,7 @@ pub fn archToLLVM(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { |
| 238 | 241 | .avr => .avr, |
| 239 | 242 | .bpfel => .bpfel, |
| 240 | 243 | .bpfeb => .bpfeb, |
| 244 | .csky => .csky, | |
| 241 | 245 | .hexagon => .hexagon, |
| 242 | 246 | .mips => .mips, |
| 243 | 247 | .mipsel => .mipsel, |
| ... | ... | @@ -245,6 +249,7 @@ pub fn archToLLVM(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { |
| 245 | 249 | .mips64el => .mips64el, |
| 246 | 250 | .msp430 => .msp430, |
| 247 | 251 | .powerpc => .ppc, |
| 252 | .powerpcle => .ppcle, | |
| 248 | 253 | .powerpc64 => .ppc64, |
| 249 | 254 | .powerpc64le => .ppc64le, |
| 250 | 255 | .r600 => .r600, |
src/translate_c.zig+1-1| ... | ... | @@ -2914,7 +2914,7 @@ fn transSwitchProngStmtInline( |
| 2914 | 2914 | |
| 2915 | 2915 | fn transConstantExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node { |
| 2916 | 2916 | var result: clang.ExprEvalResult = undefined; |
| 2917 | if (!expr.evaluateAsConstantExpr(&result, .EvaluateForCodeGen, c.clang_context)) | |
| 2917 | if (!expr.evaluateAsConstantExpr(&result, .Normal, c.clang_context)) | |
| 2918 | 2918 | return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid constant expression", .{}); |
| 2919 | 2919 | |
| 2920 | 2920 | switch (result.Val.getKind()) { |
src/type.zig+1-1| ... | ... | @@ -2695,11 +2695,11 @@ pub const CType = enum { |
| 2695 | 2695 | .kfreebsd, |
| 2696 | 2696 | .lv2, |
| 2697 | 2697 | .solaris, |
| 2698 | .zos, | |
| 2698 | 2699 | .haiku, |
| 2699 | 2700 | .minix, |
| 2700 | 2701 | .rtems, |
| 2701 | 2702 | .nacl, |
| 2702 | .cnk, | |
| 2703 | 2703 | .aix, |
| 2704 | 2704 | .cuda, |
| 2705 | 2705 | .nvcl, |
src/zig_clang.cpp+21-7| ... | ... | @@ -182,6 +182,8 @@ void ZigClang_detect_enum_CK(clang::CastKind x) { |
| 182 | 182 | case clang::CK_IntegralToBoolean: |
| 183 | 183 | case clang::CK_IntegralToFloating: |
| 184 | 184 | case clang::CK_IntegralToPointer: |
| 185 | case clang::CK_FloatingToFixedPoint: | |
| 186 | case clang::CK_FixedPointToFloating: | |
| 185 | 187 | case clang::CK_LValueBitCast: |
| 186 | 188 | case clang::CK_LValueToRValueBitCast: |
| 187 | 189 | case clang::CK_LValueToRValue: |
| ... | ... | @@ -237,6 +239,8 @@ static_assert((clang::CastKind)ZigClangCK_VectorSplat == clang::CK_VectorSplat, |
| 237 | 239 | static_assert((clang::CastKind)ZigClangCK_IntegralCast == clang::CK_IntegralCast, ""); |
| 238 | 240 | static_assert((clang::CastKind)ZigClangCK_IntegralToBoolean == clang::CK_IntegralToBoolean, ""); |
| 239 | 241 | static_assert((clang::CastKind)ZigClangCK_IntegralToFloating == clang::CK_IntegralToFloating, ""); |
| 242 | static_assert((clang::CastKind)ZigClangCK_FloatingToFixedPoint == clang::CK_FloatingToFixedPoint, ""); | |
| 243 | static_assert((clang::CastKind)ZigClangCK_FixedPointToFloating == clang::CK_FixedPointToFloating, ""); | |
| 240 | 244 | static_assert((clang::CastKind)ZigClangCK_FixedPointCast == clang::CK_FixedPointCast, ""); |
| 241 | 245 | static_assert((clang::CastKind)ZigClangCK_FixedPointToIntegral == clang::CK_FixedPointToIntegral, ""); |
| 242 | 246 | static_assert((clang::CastKind)ZigClangCK_IntegralToFixedPoint == clang::CK_IntegralToFixedPoint, ""); |
| ... | ... | @@ -928,6 +932,7 @@ void ZigClang_detect_enum_DeclKind(clang::Decl::Kind x) { |
| 928 | 932 | case clang::Decl::MSGuid: |
| 929 | 933 | case clang::Decl::OMPDeclareMapper: |
| 930 | 934 | case clang::Decl::OMPDeclareReduction: |
| 935 | case clang::Decl::TemplateParamObject: | |
| 931 | 936 | case clang::Decl::UnresolvedUsingValue: |
| 932 | 937 | case clang::Decl::OMPAllocate: |
| 933 | 938 | case clang::Decl::OMPRequires: |
| ... | ... | @@ -1013,6 +1018,7 @@ static_assert((clang::Decl::Kind)ZigClangDeclIndirectField == clang::Decl::Indir |
| 1013 | 1018 | static_assert((clang::Decl::Kind)ZigClangDeclMSGuid == clang::Decl::MSGuid, ""); |
| 1014 | 1019 | static_assert((clang::Decl::Kind)ZigClangDeclOMPDeclareMapper == clang::Decl::OMPDeclareMapper, ""); |
| 1015 | 1020 | static_assert((clang::Decl::Kind)ZigClangDeclOMPDeclareReduction == clang::Decl::OMPDeclareReduction, ""); |
| 1021 | static_assert((clang::Decl::Kind)ZigClangDeclTemplateParamObject == clang::Decl::TemplateParamObject, ""); | |
| 1016 | 1022 | static_assert((clang::Decl::Kind)ZigClangDeclUnresolvedUsingValue == clang::Decl::UnresolvedUsingValue, ""); |
| 1017 | 1023 | static_assert((clang::Decl::Kind)ZigClangDeclOMPRequires == clang::Decl::OMPRequires, ""); |
| 1018 | 1024 | static_assert((clang::Decl::Kind)ZigClangDeclOMPThreadPrivate == clang::Decl::OMPThreadPrivate, ""); |
| ... | ... | @@ -1122,6 +1128,8 @@ void ZigClang_detect_enum_BuiltinTypeKind(clang::BuiltinType::Kind x) { |
| 1122 | 1128 | case clang::BuiltinType::SveFloat64x4: |
| 1123 | 1129 | case clang::BuiltinType::SveBFloat16x4: |
| 1124 | 1130 | case clang::BuiltinType::SveBool: |
| 1131 | case clang::BuiltinType::VectorQuad: | |
| 1132 | case clang::BuiltinType::VectorPair: | |
| 1125 | 1133 | case clang::BuiltinType::Void: |
| 1126 | 1134 | case clang::BuiltinType::Bool: |
| 1127 | 1135 | case clang::BuiltinType::Char_U: |
| ... | ... | @@ -1295,6 +1303,8 @@ static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat32x4 == clang |
| 1295 | 1303 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat64x4 == clang::BuiltinType::SveFloat64x4, ""); |
| 1296 | 1304 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBFloat16x4 == clang::BuiltinType::SveBFloat16x4, ""); |
| 1297 | 1305 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBool == clang::BuiltinType::SveBool, ""); |
| 1306 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeVectorQuad == clang::BuiltinType::VectorQuad, ""); | |
| 1307 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeVectorPair == clang::BuiltinType::VectorPair, ""); | |
| 1298 | 1308 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeVoid == clang::BuiltinType::Void, ""); |
| 1299 | 1309 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeBool == clang::BuiltinType::Bool, ""); |
| 1300 | 1310 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeChar_U == clang::BuiltinType::Char_U, ""); |
| ... | ... | @@ -1517,15 +1527,19 @@ static_assert((clang::PreprocessedEntity::EntityKind)ZigClangPreprocessedEntity_ |
| 1517 | 1527 | static_assert((clang::PreprocessedEntity::EntityKind)ZigClangPreprocessedEntity_InclusionDirectiveKind == clang::PreprocessedEntity::InclusionDirectiveKind, ""); |
| 1518 | 1528 | |
| 1519 | 1529 | |
| 1520 | void ZigClang_detect_enum_ConstExprUsage(clang::Expr::ConstExprUsage x) { | |
| 1530 | void ZigClang_detect_enum_ConstantExprKind(clang::Expr::ConstantExprKind x) { | |
| 1521 | 1531 | switch (x) { |
| 1522 | case clang::Expr::EvaluateForCodeGen: | |
| 1523 | case clang::Expr::EvaluateForMangling: | |
| 1532 | case clang::Expr::ConstantExprKind::Normal: | |
| 1533 | case clang::Expr::ConstantExprKind::NonClassTemplateArgument: | |
| 1534 | case clang::Expr::ConstantExprKind::ClassTemplateArgument: | |
| 1535 | case clang::Expr::ConstantExprKind::ImmediateInvocation: | |
| 1524 | 1536 | break; |
| 1525 | 1537 | } |
| 1526 | 1538 | } |
| 1527 | static_assert((clang::Expr::ConstExprUsage)ZigClangExpr_EvaluateForCodeGen == clang::Expr::EvaluateForCodeGen, ""); | |
| 1528 | static_assert((clang::Expr::ConstExprUsage)ZigClangExpr_EvaluateForMangling == clang::Expr::EvaluateForMangling, ""); | |
| 1539 | static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ContantExprKind_Normal == clang::Expr::ConstantExprKind::Normal, ""); | |
| 1540 | static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ContantExprKind_NonClassTemplateArgument == clang::Expr::ConstantExprKind::NonClassTemplateArgument, ""); | |
| 1541 | static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ContantExprKind_ClassTemplateArgument == clang::Expr::ConstantExprKind::ClassTemplateArgument, ""); | |
| 1542 | static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ContantExprKind_ImmediateInvocation == clang::Expr::ConstantExprKind::ImmediateInvocation, ""); | |
| 1529 | 1543 | |
| 1530 | 1544 | |
| 1531 | 1545 | static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), ""); |
| ... | ... | @@ -2148,12 +2162,12 @@ bool ZigClangExpr_EvaluateAsFloat(const ZigClangExpr *self, ZigClangAPFloat **re |
| 2148 | 2162 | } |
| 2149 | 2163 | |
| 2150 | 2164 | bool ZigClangExpr_EvaluateAsConstantExpr(const ZigClangExpr *self, ZigClangExprEvalResult *result, |
| 2151 | ZigClangExpr_ConstExprUsage usage, const struct ZigClangASTContext *ctx) | |
| 2165 | ZigClangExpr_ConstantExprKind kind, const struct ZigClangASTContext *ctx) | |
| 2152 | 2166 | { |
| 2153 | 2167 | auto casted_self = reinterpret_cast<const clang::Expr *>(self); |
| 2154 | 2168 | auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx); |
| 2155 | 2169 | clang::Expr::EvalResult eval_result; |
| 2156 | if (!casted_self->EvaluateAsConstantExpr(eval_result, (clang::Expr::ConstExprUsage)usage, *casted_ctx)) { | |
| 2170 | if (!casted_self->EvaluateAsConstantExpr(eval_result, *casted_ctx, (clang::Expr::ConstantExprKind)kind)) { | |
| 2157 | 2171 | return false; |
| 2158 | 2172 | } |
| 2159 | 2173 | *result = bitcast(eval_result); |
src/zig_clang.h+11-4| ... | ... | @@ -541,6 +541,8 @@ enum ZigClangCK { |
| 541 | 541 | ZigClangCK_IntegralCast, |
| 542 | 542 | ZigClangCK_IntegralToBoolean, |
| 543 | 543 | ZigClangCK_IntegralToFloating, |
| 544 | ZigClangCK_FloatingToFixedPoint, | |
| 545 | ZigClangCK_FixedPointToFloating, | |
| 544 | 546 | ZigClangCK_FixedPointCast, |
| 545 | 547 | ZigClangCK_FixedPointToIntegral, |
| 546 | 548 | ZigClangCK_IntegralToFixedPoint, |
| ... | ... | @@ -647,6 +649,7 @@ enum ZigClangDeclKind { |
| 647 | 649 | ZigClangDeclMSGuid, |
| 648 | 650 | ZigClangDeclOMPDeclareMapper, |
| 649 | 651 | ZigClangDeclOMPDeclareReduction, |
| 652 | ZigClangDeclTemplateParamObject, | |
| 650 | 653 | ZigClangDeclUnresolvedUsingValue, |
| 651 | 654 | ZigClangDeclOMPAllocate, |
| 652 | 655 | ZigClangDeclOMPRequires, |
| ... | ... | @@ -757,6 +760,8 @@ enum ZigClangBuiltinTypeKind { |
| 757 | 760 | ZigClangBuiltinTypeSveFloat64x4, |
| 758 | 761 | ZigClangBuiltinTypeSveBFloat16x4, |
| 759 | 762 | ZigClangBuiltinTypeSveBool, |
| 763 | ZigClangBuiltinTypeVectorQuad, | |
| 764 | ZigClangBuiltinTypeVectorPair, | |
| 760 | 765 | ZigClangBuiltinTypeVoid, |
| 761 | 766 | ZigClangBuiltinTypeBool, |
| 762 | 767 | ZigClangBuiltinTypeChar_U, |
| ... | ... | @@ -915,9 +920,11 @@ enum ZigClangPreprocessedEntity_EntityKind { |
| 915 | 920 | ZigClangPreprocessedEntity_InclusionDirectiveKind, |
| 916 | 921 | }; |
| 917 | 922 | |
| 918 | enum ZigClangExpr_ConstExprUsage { | |
| 919 | ZigClangExpr_EvaluateForCodeGen, | |
| 920 | ZigClangExpr_EvaluateForMangling, | |
| 923 | enum ZigClangExpr_ConstantExprKind { | |
| 924 | ZigClangExpr_ContantExprKind_Normal, | |
| 925 | ZigClangExpr_ContantExprKind_NonClassTemplateArgument, | |
| 926 | ZigClangExpr_ContantExprKind_ClassTemplateArgument, | |
| 927 | ZigClangExpr_ContantExprKind_ImmediateInvocation, | |
| 921 | 928 | }; |
| 922 | 929 | |
| 923 | 930 | enum ZigClangUnaryExprOrTypeTrait_Kind { |
| ... | ... | @@ -1084,7 +1091,7 @@ ZIG_EXTERN_C bool ZigClangExpr_EvaluateAsBooleanCondition(const struct ZigClangE |
| 1084 | 1091 | ZIG_EXTERN_C bool ZigClangExpr_EvaluateAsFloat(const struct ZigClangExpr *self, |
| 1085 | 1092 | ZigClangAPFloat **result, const struct ZigClangASTContext *ctx); |
| 1086 | 1093 | ZIG_EXTERN_C bool ZigClangExpr_EvaluateAsConstantExpr(const struct ZigClangExpr *, |
| 1087 | struct ZigClangExprEvalResult *, ZigClangExpr_ConstExprUsage, const struct ZigClangASTContext *); | |
| 1094 | struct ZigClangExprEvalResult *, ZigClangExpr_ConstantExprKind, const struct ZigClangASTContext *); | |
| 1088 | 1095 | |
| 1089 | 1096 | ZIG_EXTERN_C const ZigClangExpr *ZigClangInitListExpr_getInit(const ZigClangInitListExpr *, unsigned); |
| 1090 | 1097 | ZIG_EXTERN_C const ZigClangExpr *ZigClangInitListExpr_getArrayFiller(const ZigClangInitListExpr *); |
src/zig_clang_cc1_main.cpp+1-2| ... | ... | @@ -251,8 +251,7 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) { |
| 251 | 251 | if (auto profilerOutput = |
| 252 | 252 | Clang->createOutputFile(Path.str(), |
| 253 | 253 | /*Binary=*/false, |
| 254 | /*RemoveFileOnSignal=*/false, "", | |
| 255 | /*Extension=*/"json", | |
| 254 | /*RemoveFileOnSignal=*/false, | |
| 256 | 255 | /*useTemporary=*/false)) { |
| 257 | 256 | |
| 258 | 257 | llvm::timeTraceProfilerWrite(*profilerOutput); |
src/zig_clang_cc1as_main.cpp+14-15| ... | ... | @@ -221,19 +221,13 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, |
| 221 | 221 | // Any DebugInfoKind implies GenDwarfForAssembly. |
| 222 | 222 | Opts.GenDwarfForAssembly = Args.hasArg(OPT_debug_info_kind_EQ); |
| 223 | 223 | |
| 224 | if (const Arg *A = Args.getLastArg(OPT_compress_debug_sections, | |
| 225 | OPT_compress_debug_sections_EQ)) { | |
| 226 | if (A->getOption().getID() == OPT_compress_debug_sections) { | |
| 227 | // TODO: be more clever about the compression type auto-detection | |
| 228 | Opts.CompressDebugSections = llvm::DebugCompressionType::GNU; | |
| 229 | } else { | |
| 230 | Opts.CompressDebugSections = | |
| 231 | llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue()) | |
| 232 | .Case("none", llvm::DebugCompressionType::None) | |
| 233 | .Case("zlib", llvm::DebugCompressionType::Z) | |
| 234 | .Case("zlib-gnu", llvm::DebugCompressionType::GNU) | |
| 235 | .Default(llvm::DebugCompressionType::None); | |
| 236 | } | |
| 224 | if (const Arg *A = Args.getLastArg(OPT_compress_debug_sections_EQ)) { | |
| 225 | Opts.CompressDebugSections = | |
| 226 | llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue()) | |
| 227 | .Case("none", llvm::DebugCompressionType::None) | |
| 228 | .Case("zlib", llvm::DebugCompressionType::Z) | |
| 229 | .Case("zlib-gnu", llvm::DebugCompressionType::GNU) | |
| 230 | .Default(llvm::DebugCompressionType::None); | |
| 237 | 231 | } |
| 238 | 232 | |
| 239 | 233 | Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations); |
| ... | ... | @@ -434,8 +428,11 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, |
| 434 | 428 | std::unique_ptr<MCStreamer> Str; |
| 435 | 429 | |
| 436 | 430 | std::unique_ptr<MCInstrInfo> MCII(TheTarget->createMCInstrInfo()); |
| 431 | assert(MCII && "Unable to create instruction info!"); | |
| 432 | ||
| 437 | 433 | std::unique_ptr<MCSubtargetInfo> STI( |
| 438 | 434 | TheTarget->createMCSubtargetInfo(Opts.Triple, Opts.CPU, FS)); |
| 435 | assert(STI && "Unable to create subtarget info!"); | |
| 439 | 436 | |
| 440 | 437 | raw_pwrite_stream *Out = FDOS.get(); |
| 441 | 438 | std::unique_ptr<buffer_ostream> BOS; |
| ... | ... | @@ -474,6 +471,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, |
| 474 | 471 | TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx)); |
| 475 | 472 | std::unique_ptr<MCAsmBackend> MAB( |
| 476 | 473 | TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions)); |
| 474 | assert(MAB && "Unable to create asm backend!"); | |
| 475 | ||
| 477 | 476 | std::unique_ptr<MCObjectWriter> OW = |
| 478 | 477 | DwoOS ? MAB->createDwoObjectWriter(*Out, *DwoOS) |
| 479 | 478 | : MAB->createObjectWriter(*Out); |
| ... | ... | @@ -526,8 +525,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, |
| 526 | 525 | Failed = Parser->Run(Opts.NoInitialTextSection); |
| 527 | 526 | } |
| 528 | 527 | |
| 529 | // Close Streamer first. | |
| 530 | // It might have a reference to the output stream. | |
| 528 | // Parser has a reference to the output stream (Str), so close Parser first. | |
| 529 | Parser.reset(); | |
| 531 | 530 | Str.reset(); |
| 532 | 531 | // Close the output stream early. |
| 533 | 532 | BOS.reset(); |
src/zig_clang_driver.cpp+7| ... | ... | @@ -528,6 +528,13 @@ int ZigClang_main(int argc_, const char **argv_) { |
| 528 | 528 | IsCrash = CommandRes < 0 || CommandRes == 70; |
| 529 | 529 | #ifdef _WIN32 |
| 530 | 530 | IsCrash |= CommandRes == 3; |
| 531 | #endif | |
| 532 | #if LLVM_ON_UNIX | |
| 533 | // When running in integrated-cc1 mode, the CrashRecoveryContext returns | |
| 534 | // the same codes as if the program crashed. See section "Exit Status for | |
| 535 | // Commands": | |
| 536 | // https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html | |
| 537 | IsCrash |= CommandRes > 128; | |
| 531 | 538 | #endif |
| 532 | 539 | if (IsCrash) { |
| 533 | 540 | TheDriver.generateCompilationDiagnostics(*C, *FailingCommand); |
src/zig_llvm.cpp+165-105| ... | ... | @@ -20,6 +20,7 @@ |
| 20 | 20 | #pragma GCC diagnostic ignored "-Winit-list-lifetime" |
| 21 | 21 | #endif |
| 22 | 22 | |
| 23 | #include <llvm/Analysis/AliasAnalysis.h> | |
| 23 | 24 | #include <llvm/Analysis/TargetLibraryInfo.h> |
| 24 | 25 | #include <llvm/Analysis/TargetTransformInfo.h> |
| 25 | 26 | #include <llvm/Bitcode/BitcodeWriter.h> |
| ... | ... | @@ -30,9 +31,12 @@ |
| 30 | 31 | #include <llvm/IR/Instructions.h> |
| 31 | 32 | #include <llvm/IR/LegacyPassManager.h> |
| 32 | 33 | #include <llvm/IR/Module.h> |
| 34 | #include <llvm/IR/PassManager.h> | |
| 33 | 35 | #include <llvm/IR/Verifier.h> |
| 34 | 36 | #include <llvm/InitializePasses.h> |
| 35 | 37 | #include <llvm/MC/SubtargetFeature.h> |
| 38 | #include <llvm/Passes/PassBuilder.h> | |
| 39 | #include <llvm/Passes/StandardInstrumentations.h> | |
| 36 | 40 | #include <llvm/Object/Archive.h> |
| 37 | 41 | #include <llvm/Object/ArchiveWriter.h> |
| 38 | 42 | #include <llvm/Object/COFF.h> |
| ... | ... | @@ -54,6 +58,9 @@ |
| 54 | 58 | #include <llvm/Transforms/Instrumentation/ThreadSanitizer.h> |
| 55 | 59 | #include <llvm/Transforms/Scalar.h> |
| 56 | 60 | #include <llvm/Transforms/Utils.h> |
| 61 | #include <llvm/Transforms/Utils/AddDiscriminators.h> | |
| 62 | #include <llvm/Transforms/Utils/CanonicalizeAliases.h> | |
| 63 | #include <llvm/Transforms/Utils/NameAnonGlobals.h> | |
| 57 | 64 | |
| 58 | 65 | #include <lld/Common/Driver.h> |
| 59 | 66 | |
| ... | ... | @@ -91,14 +98,6 @@ char *ZigLLVMGetNativeFeatures(void) { |
| 91 | 98 | return strdup((const char *)StringRef(features.getString()).bytes_begin()); |
| 92 | 99 | } |
| 93 | 100 | |
| 94 | static void addDiscriminatorsPass(const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) { | |
| 95 | PM.add(createAddDiscriminatorsPass()); | |
| 96 | } | |
| 97 | ||
| 98 | static void addThreadSanitizerPass(const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) { | |
| 99 | PM.add(createThreadSanitizerLegacyPassPass()); | |
| 100 | } | |
| 101 | ||
| 102 | 101 | #ifndef NDEBUG |
| 103 | 102 | static const bool assertions_on = true; |
| 104 | 103 | #else |
| ... | ... | @@ -153,6 +152,11 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri |
| 153 | 152 | } |
| 154 | 153 | |
| 155 | 154 | TargetOptions opt; |
| 155 | ||
| 156 | // Work around the missing initialization of this field in the default | |
| 157 | // constructor. Use -1 so that the default value is used. | |
| 158 | opt.StackProtectorGuardOffset = (unsigned)-1; | |
| 159 | ||
| 156 | 160 | opt.FunctionSections = function_sections; |
| 157 | 161 | switch (float_abi) { |
| 158 | 162 | case ZigLLVMABITypeDefault: |
| ... | ... | @@ -188,14 +192,16 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 188 | 192 | bool is_small, bool time_report, bool tsan, bool lto, |
| 189 | 193 | const char *asm_filename, const char *bin_filename, const char *llvm_ir_filename) |
| 190 | 194 | { |
| 195 | // TODO: Maybe we should collect time trace rather than using timer | |
| 196 | // to get a more hierarchical timeline view | |
| 191 | 197 | TimePassesIsEnabled = time_report; |
| 192 | 198 | |
| 193 | raw_fd_ostream *dest_asm = nullptr; | |
| 194 | raw_fd_ostream *dest_bin = nullptr; | |
| 199 | raw_fd_ostream *dest_asm_ptr = nullptr; | |
| 200 | raw_fd_ostream *dest_bin_ptr = nullptr; | |
| 195 | 201 | |
| 196 | 202 | if (asm_filename) { |
| 197 | 203 | std::error_code EC; |
| 198 | dest_asm = new(std::nothrow) raw_fd_ostream(asm_filename, EC, sys::fs::F_None); | |
| 204 | dest_asm_ptr = new(std::nothrow) raw_fd_ostream(asm_filename, EC, sys::fs::F_None); | |
| 199 | 205 | if (EC) { |
| 200 | 206 | *error_message = strdup((const char *)StringRef(EC.message()).bytes_begin()); |
| 201 | 207 | return true; |
| ... | ... | @@ -203,116 +209,147 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 203 | 209 | } |
| 204 | 210 | if (bin_filename) { |
| 205 | 211 | std::error_code EC; |
| 206 | dest_bin = new(std::nothrow) raw_fd_ostream(bin_filename, EC, sys::fs::F_None); | |
| 212 | dest_bin_ptr = new(std::nothrow) raw_fd_ostream(bin_filename, EC, sys::fs::F_None); | |
| 207 | 213 | if (EC) { |
| 208 | 214 | *error_message = strdup((const char *)StringRef(EC.message()).bytes_begin()); |
| 209 | 215 | return true; |
| 210 | 216 | } |
| 211 | 217 | } |
| 212 | 218 | |
| 213 | TargetMachine* target_machine = reinterpret_cast<TargetMachine*>(targ_machine_ref); | |
| 214 | target_machine->setO0WantsFastISel(true); | |
| 215 | ||
| 216 | Module* module = unwrap(module_ref); | |
| 217 | ||
| 218 | PassManagerBuilder *PMBuilder = new(std::nothrow) PassManagerBuilder(); | |
| 219 | if (PMBuilder == nullptr) { | |
| 220 | *error_message = strdup("memory allocation failure"); | |
| 221 | return true; | |
| 219 | std::unique_ptr<raw_fd_ostream> dest_asm(dest_asm_ptr), | |
| 220 | dest_bin(dest_bin_ptr); | |
| 221 | ||
| 222 | TargetMachine &target_machine = *reinterpret_cast<TargetMachine*>(targ_machine_ref); | |
| 223 | target_machine.setO0WantsFastISel(true); | |
| 224 | ||
| 225 | Module &module = *unwrap(module_ref); | |
| 226 | ||
| 227 | // Pipeline configurations | |
| 228 | PipelineTuningOptions pipeline_opts; | |
| 229 | pipeline_opts.LoopUnrolling = !is_debug; | |
| 230 | pipeline_opts.SLPVectorization = !is_debug; | |
| 231 | pipeline_opts.LoopVectorization = !is_debug; | |
| 232 | pipeline_opts.LoopInterleaving = !is_debug; | |
| 233 | pipeline_opts.MergeFunctions = !is_debug; | |
| 234 | ||
| 235 | // Instrumentations | |
| 236 | PassInstrumentationCallbacks instr_callbacks; | |
| 237 | StandardInstrumentations std_instrumentations(false); | |
| 238 | std_instrumentations.registerCallbacks(instr_callbacks); | |
| 239 | ||
| 240 | PassBuilder pass_builder(false, &target_machine, pipeline_opts, | |
| 241 | None, &instr_callbacks); | |
| 242 | using OptimizationLevel = typename PassBuilder::OptimizationLevel; | |
| 243 | ||
| 244 | LoopAnalysisManager loop_am; | |
| 245 | FunctionAnalysisManager function_am; | |
| 246 | CGSCCAnalysisManager cgscc_am; | |
| 247 | ModuleAnalysisManager module_am; | |
| 248 | ||
| 249 | // Register the AA manager first so that our version is the one used | |
| 250 | function_am.registerPass([&] { | |
| 251 | return pass_builder.buildDefaultAAPipeline(); | |
| 252 | }); | |
| 253 | ||
| 254 | Triple target_triple(module.getTargetTriple()); | |
| 255 | auto tlii = std::make_unique<TargetLibraryInfoImpl>(target_triple); | |
| 256 | function_am.registerPass([&] { return TargetLibraryAnalysis(*tlii); }); | |
| 257 | ||
| 258 | // Initialize the AnalysisManagers | |
| 259 | pass_builder.registerModuleAnalyses(module_am); | |
| 260 | pass_builder.registerCGSCCAnalyses(cgscc_am); | |
| 261 | pass_builder.registerFunctionAnalyses(function_am); | |
| 262 | pass_builder.registerLoopAnalyses(loop_am); | |
| 263 | pass_builder.crossRegisterProxies(loop_am, function_am, | |
| 264 | cgscc_am, module_am); | |
| 265 | ||
| 266 | // IR verification | |
| 267 | if (assertions_on) { | |
| 268 | // Verify the input | |
| 269 | pass_builder.registerPipelineStartEPCallback( | |
| 270 | [](ModulePassManager &module_pm, OptimizationLevel OL) { | |
| 271 | module_pm.addPass(VerifierPass()); | |
| 272 | }); | |
| 273 | // Verify the output | |
| 274 | pass_builder.registerOptimizerLastEPCallback( | |
| 275 | [](ModulePassManager &module_pm, OptimizationLevel OL) { | |
| 276 | module_pm.addPass(VerifierPass()); | |
| 277 | }); | |
| 222 | 278 | } |
| 223 | PMBuilder->OptLevel = target_machine->getOptLevel(); | |
| 224 | PMBuilder->SizeLevel = is_small ? 2 : 0; | |
| 225 | ||
| 226 | PMBuilder->DisableTailCalls = is_debug; | |
| 227 | PMBuilder->DisableUnrollLoops = is_debug; | |
| 228 | PMBuilder->SLPVectorize = !is_debug; | |
| 229 | PMBuilder->LoopVectorize = !is_debug; | |
| 230 | PMBuilder->LoopsInterleaved = !PMBuilder->DisableUnrollLoops; | |
| 231 | PMBuilder->RerollLoops = !is_debug; | |
| 232 | // Leaving NewGVN as default (off) because when on it caused issue #673 | |
| 233 | //PMBuilder->NewGVN = !is_debug; | |
| 234 | PMBuilder->DisableGVNLoadPRE = is_debug; | |
| 235 | PMBuilder->VerifyInput = assertions_on; | |
| 236 | PMBuilder->VerifyOutput = assertions_on; | |
| 237 | PMBuilder->MergeFunctions = !is_debug; | |
| 238 | PMBuilder->PrepareForLTO = lto; | |
| 239 | PMBuilder->PrepareForThinLTO = false; | |
| 240 | PMBuilder->PerformThinLTO = false; | |
| 241 | ||
| 242 | TargetLibraryInfoImpl tlii(Triple(module->getTargetTriple())); | |
| 243 | PMBuilder->LibraryInfo = &tlii; | |
| 244 | ||
| 245 | if (is_debug) { | |
| 246 | PMBuilder->Inliner = createAlwaysInlinerLegacyPass(false); | |
| 247 | } else { | |
| 248 | target_machine->adjustPassManager(*PMBuilder); | |
| 249 | 279 | |
| 250 | PMBuilder->addExtension(PassManagerBuilder::EP_EarlyAsPossible, addDiscriminatorsPass); | |
| 251 | PMBuilder->Inliner = createFunctionInliningPass(PMBuilder->OptLevel, PMBuilder->SizeLevel, false); | |
| 280 | // Passes specific for release build | |
| 281 | if (!is_debug) { | |
| 282 | pass_builder.registerPipelineStartEPCallback( | |
| 283 | [](ModulePassManager &module_pm, OptimizationLevel OL) { | |
| 284 | module_pm.addPass( | |
| 285 | createModuleToFunctionPassAdaptor(AddDiscriminatorsPass())); | |
| 286 | }); | |
| 252 | 287 | } |
| 253 | 288 | |
| 289 | // Thread sanitizer | |
| 254 | 290 | if (tsan) { |
| 255 | PMBuilder->addExtension(PassManagerBuilder::EP_OptimizerLast, addThreadSanitizerPass); | |
| 256 | PMBuilder->addExtension(PassManagerBuilder::EP_EnabledOnOptLevel0, addThreadSanitizerPass); | |
| 291 | pass_builder.registerOptimizerLastEPCallback( | |
| 292 | [](ModulePassManager &module_pm, OptimizationLevel level) { | |
| 293 | module_pm.addPass(ThreadSanitizerPass()); | |
| 294 | }); | |
| 257 | 295 | } |
| 258 | 296 | |
| 259 | // Set up the per-function pass manager. | |
| 260 | legacy::FunctionPassManager FPM = legacy::FunctionPassManager(module); | |
| 261 | auto tliwp = new(std::nothrow) TargetLibraryInfoWrapperPass(tlii); | |
| 262 | FPM.add(tliwp); | |
| 263 | FPM.add(createTargetTransformInfoWrapperPass(target_machine->getTargetIRAnalysis())); | |
| 264 | if (assertions_on) { | |
| 265 | FPM.add(createVerifierPass()); | |
| 297 | ModulePassManager module_pm; | |
| 298 | OptimizationLevel opt_level; | |
| 299 | // Setting up the optimization level | |
| 300 | if (is_debug) | |
| 301 | opt_level = OptimizationLevel::O0; | |
| 302 | else if (is_small) | |
| 303 | opt_level = OptimizationLevel::Oz; | |
| 304 | else | |
| 305 | opt_level = OptimizationLevel::O3; | |
| 306 | ||
| 307 | // Initialize the PassManager | |
| 308 | if (opt_level == OptimizationLevel::O0) { | |
| 309 | module_pm = pass_builder.buildO0DefaultPipeline(opt_level, lto); | |
| 310 | } else if (lto) { | |
| 311 | module_pm = pass_builder.buildLTOPreLinkDefaultPipeline(opt_level); | |
| 312 | } else { | |
| 313 | module_pm = pass_builder.buildPerModuleDefaultPipeline(opt_level); | |
| 266 | 314 | } |
| 267 | PMBuilder->populateFunctionPassManager(FPM); | |
| 268 | ||
| 269 | { | |
| 270 | // Set up the per-module pass manager. | |
| 271 | legacy::PassManager MPM; | |
| 272 | MPM.add(createTargetTransformInfoWrapperPass(target_machine->getTargetIRAnalysis())); | |
| 273 | PMBuilder->populateModulePassManager(MPM); | |
| 274 | ||
| 275 | // Set output passes. | |
| 276 | if (dest_bin && !lto) { | |
| 277 | if (target_machine->addPassesToEmitFile(MPM, *dest_bin, nullptr, CGFT_ObjectFile)) { | |
| 278 | *error_message = strdup("TargetMachine can't emit an object file"); | |
| 279 | return true; | |
| 280 | } | |
| 281 | } | |
| 282 | if (dest_asm) { | |
| 283 | if (target_machine->addPassesToEmitFile(MPM, *dest_asm, nullptr, CGFT_AssemblyFile)) { | |
| 284 | *error_message = strdup("TargetMachine can't emit an assembly file"); | |
| 285 | return true; | |
| 286 | } | |
| 287 | } | |
| 288 | ||
| 289 | // run per function optimization passes | |
| 290 | FPM.doInitialization(); | |
| 291 | for (Function &F : *module) | |
| 292 | if (!F.isDeclaration()) | |
| 293 | FPM.run(F); | |
| 294 | FPM.doFinalization(); | |
| 295 | 315 | |
| 296 | MPM.run(*module); | |
| 316 | // Unfortunately we don't have new PM for code generation | |
| 317 | legacy::PassManager codegen_pm; | |
| 318 | codegen_pm.add( | |
| 319 | createTargetTransformInfoWrapperPass(target_machine.getTargetIRAnalysis())); | |
| 297 | 320 | |
| 298 | if (llvm_ir_filename) { | |
| 299 | if (LLVMPrintModuleToFile(module_ref, llvm_ir_filename, error_message)) { | |
| 300 | return true; | |
| 301 | } | |
| 321 | if (dest_bin && !lto) { | |
| 322 | if (target_machine.addPassesToEmitFile(codegen_pm, *dest_bin, nullptr, CGFT_ObjectFile)) { | |
| 323 | *error_message = strdup("TargetMachine can't emit an object file"); | |
| 324 | return true; | |
| 302 | 325 | } |
| 303 | if (dest_bin && lto) { | |
| 304 | WriteBitcodeToFile(*module, *dest_bin); | |
| 326 | } | |
| 327 | if (dest_asm) { | |
| 328 | if (target_machine.addPassesToEmitFile(codegen_pm, *dest_asm, nullptr, CGFT_AssemblyFile)) { | |
| 329 | *error_message = strdup("TargetMachine can't emit an assembly file"); | |
| 330 | return true; | |
| 305 | 331 | } |
| 332 | } | |
| 333 | ||
| 334 | // Optimization phase | |
| 335 | module_pm.run(module, module_am); | |
| 306 | 336 | |
| 307 | if (time_report) { | |
| 308 | TimerGroup::printAll(errs()); | |
| 337 | // Code generation phase | |
| 338 | codegen_pm.run(module); | |
| 339 | ||
| 340 | if (llvm_ir_filename) { | |
| 341 | if (LLVMPrintModuleToFile(module_ref, llvm_ir_filename, error_message)) { | |
| 342 | return true; | |
| 309 | 343 | } |
| 344 | } | |
| 310 | 345 | |
| 311 | // MPM goes out of scope and writes to the out streams | |
| 346 | if (dest_bin && lto) { | |
| 347 | WriteBitcodeToFile(module, *dest_bin); | |
| 312 | 348 | } |
| 313 | 349 | |
| 314 | delete dest_asm; | |
| 315 | delete dest_bin; | |
| 350 | if (time_report) { | |
| 351 | TimerGroup::printAll(errs()); | |
| 352 | } | |
| 316 | 353 | |
| 317 | 354 | return false; |
| 318 | 355 | } |
| ... | ... | @@ -614,8 +651,9 @@ void ZigLLVMDisposeDIBuilder(ZigLLVMDIBuilder *dbuilder) { |
| 614 | 651 | } |
| 615 | 652 | |
| 616 | 653 | void ZigLLVMSetCurrentDebugLocation(LLVMBuilderRef builder, int line, int column, ZigLLVMDIScope *scope) { |
| 617 | unwrap(builder)->SetCurrentDebugLocation(DebugLoc::get( | |
| 618 | line, column, reinterpret_cast<DIScope*>(scope))); | |
| 654 | DIScope* di_scope = reinterpret_cast<DIScope*>(scope); | |
| 655 | DebugLoc debug_loc = DILocation::get(di_scope->getContext(), line, column, di_scope, nullptr, false); | |
| 656 | unwrap(builder)->SetCurrentDebugLocation(debug_loc); | |
| 619 | 657 | } |
| 620 | 658 | |
| 621 | 659 | void ZigLLVMClearCurrentDebugLocation(LLVMBuilderRef builder) { |
| ... | ... | @@ -776,7 +814,8 @@ LLVMValueRef ZigLLVMInsertDeclare(ZigLLVMDIBuilder *dibuilder, LLVMValueRef stor |
| 776 | 814 | } |
| 777 | 815 | |
| 778 | 816 | ZigLLVMDILocation *ZigLLVMGetDebugLoc(unsigned line, unsigned col, ZigLLVMDIScope *scope) { |
| 779 | DebugLoc debug_loc = DebugLoc::get(line, col, reinterpret_cast<DIScope*>(scope), nullptr); | |
| 817 | DIScope* di_scope = reinterpret_cast<DIScope*>(scope); | |
| 818 | DebugLoc debug_loc = DILocation::get(di_scope->getContext(), line, col, di_scope, nullptr, false); | |
| 780 | 819 | return reinterpret_cast<ZigLLVMDILocation*>(debug_loc.get()); |
| 781 | 820 | } |
| 782 | 821 | |
| ... | ... | @@ -796,7 +835,17 @@ void ZigLLVMAddByValAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_v |
| 796 | 835 | AttrBuilder attr_builder; |
| 797 | 836 | Type *llvm_type = unwrap<Type>(type_val); |
| 798 | 837 | attr_builder.addByValAttr(llvm_type); |
| 799 | const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), ArgNo, attr_builder); | |
| 838 | const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), ArgNo + 1, attr_builder); | |
| 839 | func->setAttributes(new_attr_set); | |
| 840 | } | |
| 841 | ||
| 842 | void ZigLLVMAddSretAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_val) { | |
| 843 | Function *func = unwrap<Function>(fn_ref); | |
| 844 | const AttributeList attr_set = func->getAttributes(); | |
| 845 | AttrBuilder attr_builder; | |
| 846 | Type *llvm_type = unwrap<Type>(type_val); | |
| 847 | attr_builder.addStructRetAttr(llvm_type); | |
| 848 | const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), ArgNo + 1, attr_builder); | |
| 800 | 849 | func->setAttributes(new_attr_set); |
| 801 | 850 | } |
| 802 | 851 | |
| ... | ... | @@ -928,6 +977,15 @@ void ZigLLVMSetTailCall(LLVMValueRef Call) { |
| 928 | 977 | unwrap<CallInst>(Call)->setTailCallKind(CallInst::TCK_MustTail); |
| 929 | 978 | } |
| 930 | 979 | |
| 980 | void ZigLLVMSetCallSret(LLVMValueRef Call, LLVMTypeRef return_type) { | |
| 981 | const AttributeList attr_set = unwrap<CallInst>(Call)->getAttributes(); | |
| 982 | AttrBuilder attr_builder; | |
| 983 | Type *llvm_type = unwrap<Type>(return_type); | |
| 984 | attr_builder.addStructRetAttr(llvm_type); | |
| 985 | const AttributeList new_attr_set = attr_set.addAttributes(unwrap<CallInst>(Call)->getContext(), 1, attr_builder); | |
| 986 | unwrap<CallInst>(Call)->setAttributes(new_attr_set); | |
| 987 | } | |
| 988 | ||
| 931 | 989 | void ZigLLVMFunctionSetPrefixData(LLVMValueRef function, LLVMValueRef data) { |
| 932 | 990 | unwrap<Function>(function)->setPrefixData(unwrap<Constant>(data)); |
| 933 | 991 | } |
| ... | ... | @@ -1194,6 +1252,7 @@ static_assert((Triple::ArchType)ZigLLVM_arc == Triple::arc, ""); |
| 1194 | 1252 | static_assert((Triple::ArchType)ZigLLVM_avr == Triple::avr, ""); |
| 1195 | 1253 | static_assert((Triple::ArchType)ZigLLVM_bpfel == Triple::bpfel, ""); |
| 1196 | 1254 | static_assert((Triple::ArchType)ZigLLVM_bpfeb == Triple::bpfeb, ""); |
| 1255 | static_assert((Triple::ArchType)ZigLLVM_csky == Triple::csky, ""); | |
| 1197 | 1256 | static_assert((Triple::ArchType)ZigLLVM_hexagon == Triple::hexagon, ""); |
| 1198 | 1257 | static_assert((Triple::ArchType)ZigLLVM_mips == Triple::mips, ""); |
| 1199 | 1258 | static_assert((Triple::ArchType)ZigLLVM_mipsel == Triple::mipsel, ""); |
| ... | ... | @@ -1201,6 +1260,7 @@ static_assert((Triple::ArchType)ZigLLVM_mips64 == Triple::mips64, ""); |
| 1201 | 1260 | static_assert((Triple::ArchType)ZigLLVM_mips64el == Triple::mips64el, ""); |
| 1202 | 1261 | static_assert((Triple::ArchType)ZigLLVM_msp430 == Triple::msp430, ""); |
| 1203 | 1262 | static_assert((Triple::ArchType)ZigLLVM_ppc == Triple::ppc, ""); |
| 1263 | static_assert((Triple::ArchType)ZigLLVM_ppcle == Triple::ppcle, ""); | |
| 1204 | 1264 | static_assert((Triple::ArchType)ZigLLVM_ppc64 == Triple::ppc64, ""); |
| 1205 | 1265 | static_assert((Triple::ArchType)ZigLLVM_ppc64le == Triple::ppc64le, ""); |
| 1206 | 1266 | static_assert((Triple::ArchType)ZigLLVM_r600 == Triple::r600, ""); |
| ... | ... | @@ -1242,8 +1302,6 @@ static_assert((Triple::VendorType)ZigLLVM_UnknownVendor == Triple::UnknownVendor |
| 1242 | 1302 | static_assert((Triple::VendorType)ZigLLVM_Apple == Triple::Apple, ""); |
| 1243 | 1303 | static_assert((Triple::VendorType)ZigLLVM_PC == Triple::PC, ""); |
| 1244 | 1304 | static_assert((Triple::VendorType)ZigLLVM_SCEI == Triple::SCEI, ""); |
| 1245 | static_assert((Triple::VendorType)ZigLLVM_BGP == Triple::BGP, ""); | |
| 1246 | static_assert((Triple::VendorType)ZigLLVM_BGQ == Triple::BGQ, ""); | |
| 1247 | 1305 | static_assert((Triple::VendorType)ZigLLVM_Freescale == Triple::Freescale, ""); |
| 1248 | 1306 | static_assert((Triple::VendorType)ZigLLVM_IBM == Triple::IBM, ""); |
| 1249 | 1307 | static_assert((Triple::VendorType)ZigLLVM_ImaginationTechnologies == Triple::ImaginationTechnologies, ""); |
| ... | ... | @@ -1275,11 +1333,11 @@ static_assert((Triple::OSType)ZigLLVM_NetBSD == Triple::NetBSD, ""); |
| 1275 | 1333 | static_assert((Triple::OSType)ZigLLVM_OpenBSD == Triple::OpenBSD, ""); |
| 1276 | 1334 | static_assert((Triple::OSType)ZigLLVM_Solaris == Triple::Solaris, ""); |
| 1277 | 1335 | static_assert((Triple::OSType)ZigLLVM_Win32 == Triple::Win32, ""); |
| 1336 | static_assert((Triple::OSType)ZigLLVM_ZOS == Triple::ZOS, ""); | |
| 1278 | 1337 | static_assert((Triple::OSType)ZigLLVM_Haiku == Triple::Haiku, ""); |
| 1279 | 1338 | static_assert((Triple::OSType)ZigLLVM_Minix == Triple::Minix, ""); |
| 1280 | 1339 | static_assert((Triple::OSType)ZigLLVM_RTEMS == Triple::RTEMS, ""); |
| 1281 | 1340 | static_assert((Triple::OSType)ZigLLVM_NaCl == Triple::NaCl, ""); |
| 1282 | static_assert((Triple::OSType)ZigLLVM_CNK == Triple::CNK, ""); | |
| 1283 | 1341 | static_assert((Triple::OSType)ZigLLVM_AIX == Triple::AIX, ""); |
| 1284 | 1342 | static_assert((Triple::OSType)ZigLLVM_CUDA == Triple::CUDA, ""); |
| 1285 | 1343 | static_assert((Triple::OSType)ZigLLVM_NVCL == Triple::NVCL, ""); |
| ... | ... | @@ -1304,6 +1362,7 @@ static_assert((Triple::EnvironmentType)ZigLLVM_GNUABI64 == Triple::GNUABI64, "") |
| 1304 | 1362 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUEABI == Triple::GNUEABI, ""); |
| 1305 | 1363 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUEABIHF == Triple::GNUEABIHF, ""); |
| 1306 | 1364 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUX32 == Triple::GNUX32, ""); |
| 1365 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUILP32 == Triple::GNUILP32, ""); | |
| 1307 | 1366 | static_assert((Triple::EnvironmentType)ZigLLVM_CODE16 == Triple::CODE16, ""); |
| 1308 | 1367 | static_assert((Triple::EnvironmentType)ZigLLVM_EABI == Triple::EABI, ""); |
| 1309 | 1368 | static_assert((Triple::EnvironmentType)ZigLLVM_EABIHF == Triple::EABIHF, ""); |
| ... | ... | @@ -1322,6 +1381,7 @@ static_assert((Triple::EnvironmentType)ZigLLVM_LastEnvironmentType == Triple::La |
| 1322 | 1381 | static_assert((Triple::ObjectFormatType)ZigLLVM_UnknownObjectFormat == Triple::UnknownObjectFormat, ""); |
| 1323 | 1382 | static_assert((Triple::ObjectFormatType)ZigLLVM_COFF == Triple::COFF, ""); |
| 1324 | 1383 | static_assert((Triple::ObjectFormatType)ZigLLVM_ELF == Triple::ELF, ""); |
| 1384 | static_assert((Triple::ObjectFormatType)ZigLLVM_GOFF == Triple::GOFF, ""); | |
| 1325 | 1385 | static_assert((Triple::ObjectFormatType)ZigLLVM_MachO == Triple::MachO, ""); |
| 1326 | 1386 | static_assert((Triple::ObjectFormatType)ZigLLVM_Wasm == Triple::Wasm, ""); |
| 1327 | 1387 | static_assert((Triple::ObjectFormatType)ZigLLVM_XCOFF == Triple::XCOFF, ""); |
src/zig_llvm.h+7-3| ... | ... | @@ -264,11 +264,13 @@ ZIG_EXTERN_C struct ZigLLVMDILocation *ZigLLVMGetDebugLoc(unsigned line, unsigne |
| 264 | 264 | |
| 265 | 265 | ZIG_EXTERN_C void ZigLLVMSetFastMath(LLVMBuilderRef builder_wrapped, bool on_state); |
| 266 | 266 | ZIG_EXTERN_C void ZigLLVMSetTailCall(LLVMValueRef Call); |
| 267 | ZIG_EXTERN_C void ZigLLVMSetCallSret(LLVMValueRef Call, LLVMTypeRef return_type); | |
| 267 | 268 | ZIG_EXTERN_C void ZigLLVMFunctionSetPrefixData(LLVMValueRef fn, LLVMValueRef data); |
| 268 | 269 | ZIG_EXTERN_C void ZigLLVMFunctionSetCallingConv(LLVMValueRef function, enum ZigLLVM_CallingConv cc); |
| 269 | 270 | |
| 270 | 271 | ZIG_EXTERN_C void ZigLLVMAddFunctionAttr(LLVMValueRef fn, const char *attr_name, const char *attr_value); |
| 271 | 272 | ZIG_EXTERN_C void ZigLLVMAddByValAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_val); |
| 273 | ZIG_EXTERN_C void ZigLLVMAddSretAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_val); | |
| 272 | 274 | ZIG_EXTERN_C void ZigLLVMAddFunctionAttrCold(LLVMValueRef fn); |
| 273 | 275 | |
| 274 | 276 | ZIG_EXTERN_C void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv); |
| ... | ... | @@ -288,6 +290,7 @@ enum ZigLLVM_ArchType { |
| 288 | 290 | ZigLLVM_avr, // AVR: Atmel AVR microcontroller |
| 289 | 291 | ZigLLVM_bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) |
| 290 | 292 | ZigLLVM_bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) |
| 293 | ZigLLVM_csky, // CSKY: csky | |
| 291 | 294 | ZigLLVM_hexagon, // Hexagon: hexagon |
| 292 | 295 | ZigLLVM_mips, // MIPS: mips, mipsallegrex, mipsr6 |
| 293 | 296 | ZigLLVM_mipsel, // MIPSEL: mipsel, mipsallegrexe, mipsr6el |
| ... | ... | @@ -295,6 +298,7 @@ enum ZigLLVM_ArchType { |
| 295 | 298 | ZigLLVM_mips64el, // MIPS64EL: mips64el, mips64r6el, mipsn32el, mipsn32r6el |
| 296 | 299 | ZigLLVM_msp430, // MSP430: msp430 |
| 297 | 300 | ZigLLVM_ppc, // PPC: powerpc |
| 301 | ZigLLVM_ppcle, // PPCLE: powerpc (little endian) | |
| 298 | 302 | ZigLLVM_ppc64, // PPC64: powerpc64, ppu |
| 299 | 303 | ZigLLVM_ppc64le, // PPC64LE: powerpc64le |
| 300 | 304 | ZigLLVM_r600, // R600: AMD GPUs HD2XXX - HD6XXX |
| ... | ... | @@ -340,8 +344,6 @@ enum ZigLLVM_VendorType { |
| 340 | 344 | ZigLLVM_Apple, |
| 341 | 345 | ZigLLVM_PC, |
| 342 | 346 | ZigLLVM_SCEI, |
| 343 | ZigLLVM_BGP, | |
| 344 | ZigLLVM_BGQ, | |
| 345 | 347 | ZigLLVM_Freescale, |
| 346 | 348 | ZigLLVM_IBM, |
| 347 | 349 | ZigLLVM_ImaginationTechnologies, |
| ... | ... | @@ -375,11 +377,11 @@ enum ZigLLVM_OSType { |
| 375 | 377 | ZigLLVM_OpenBSD, |
| 376 | 378 | ZigLLVM_Solaris, |
| 377 | 379 | ZigLLVM_Win32, |
| 380 | ZigLLVM_ZOS, | |
| 378 | 381 | ZigLLVM_Haiku, |
| 379 | 382 | ZigLLVM_Minix, |
| 380 | 383 | ZigLLVM_RTEMS, |
| 381 | 384 | ZigLLVM_NaCl, // Native Client |
| 382 | ZigLLVM_CNK, // BG/P Compute-Node Kernel | |
| 383 | 385 | ZigLLVM_AIX, |
| 384 | 386 | ZigLLVM_CUDA, // NVIDIA CUDA |
| 385 | 387 | ZigLLVM_NVCL, // NVIDIA OpenCL |
| ... | ... | @@ -409,6 +411,7 @@ enum ZigLLVM_EnvironmentType { |
| 409 | 411 | ZigLLVM_GNUEABI, |
| 410 | 412 | ZigLLVM_GNUEABIHF, |
| 411 | 413 | ZigLLVM_GNUX32, |
| 414 | ZigLLVM_GNUILP32, | |
| 412 | 415 | ZigLLVM_CODE16, |
| 413 | 416 | ZigLLVM_EABI, |
| 414 | 417 | ZigLLVM_EABIHF, |
| ... | ... | @@ -432,6 +435,7 @@ enum ZigLLVM_ObjectFormatType { |
| 432 | 435 | |
| 433 | 436 | ZigLLVM_COFF, |
| 434 | 437 | ZigLLVM_ELF, |
| 438 | ZigLLVM_GOFF, | |
| 435 | 439 | ZigLLVM_MachO, |
| 436 | 440 | ZigLLVM_Wasm, |
| 437 | 441 | ZigLLVM_XCOFF, |
test/stage1/behavior/vector.zig+13| ... | ... | @@ -510,6 +510,19 @@ test "vector reduce operation" { |
| 510 | 510 | const N = @typeInfo(@TypeOf(x)).Array.len; |
| 511 | 511 | const TX = @typeInfo(@TypeOf(x)).Array.child; |
| 512 | 512 | |
| 513 | // wasmtime: unknown import: `env::fminf` has not been defined | |
| 514 | // https://github.com/ziglang/zig/issues/8131 | |
| 515 | switch (std.builtin.arch) { | |
| 516 | .wasm32 => switch (@typeInfo(TX)) { | |
| 517 | .Float => switch (op) { | |
| 518 | .Min, .Max, => return, | |
| 519 | else => {}, | |
| 520 | }, | |
| 521 | else => {}, | |
| 522 | }, | |
| 523 | else => {}, | |
| 524 | } | |
| 525 | ||
| 513 | 526 | var r = @reduce(op, @as(Vector(N, TX), x)); |
| 514 | 527 | switch (@typeInfo(TX)) { |
| 515 | 528 | .Int, .Bool => expectEqual(expected, r), |
test/tests.zig+38-30| ... | ... | @@ -154,21 +154,25 @@ const test_targets = blk: { |
| 154 | 154 | // .link_libc = true, |
| 155 | 155 | //}, |
| 156 | 156 | |
| 157 | TestTarget{ | |
| 158 | .target = .{ | |
| 159 | .cpu_arch = .mips, | |
| 160 | .os_tag = .linux, | |
| 161 | .abi = .none, | |
| 162 | }, | |
| 163 | }, | |
| 164 | TestTarget{ | |
| 165 | .target = .{ | |
| 166 | .cpu_arch = .mips, | |
| 167 | .os_tag = .linux, | |
| 168 | .abi = .musl, | |
| 169 | }, | |
| 170 | .link_libc = true, | |
| 171 | }, | |
| 157 | // https://github.com/ziglang/zig/issues/8155 | |
| 158 | //TestTarget{ | |
| 159 | // .target = .{ | |
| 160 | // .cpu_arch = .mips, | |
| 161 | // .os_tag = .linux, | |
| 162 | // .abi = .none, | |
| 163 | // }, | |
| 164 | //}, | |
| 165 | ||
| 166 | // https://github.com/ziglang/zig/issues/8155 | |
| 167 | //TestTarget{ | |
| 168 | // .target = .{ | |
| 169 | // .cpu_arch = .mips, | |
| 170 | // .os_tag = .linux, | |
| 171 | // .abi = .musl, | |
| 172 | // }, | |
| 173 | // .link_libc = true, | |
| 174 | //}, | |
| 175 | ||
| 172 | 176 | // https://github.com/ziglang/zig/issues/4927 |
| 173 | 177 | //TestTarget{ |
| 174 | 178 | // .target = .{ |
| ... | ... | @@ -179,21 +183,25 @@ const test_targets = blk: { |
| 179 | 183 | // .link_libc = true, |
| 180 | 184 | //}, |
| 181 | 185 | |
| 182 | TestTarget{ | |
| 183 | .target = .{ | |
| 184 | .cpu_arch = .mipsel, | |
| 185 | .os_tag = .linux, | |
| 186 | .abi = .none, | |
| 187 | }, | |
| 188 | }, | |
| 189 | TestTarget{ | |
| 190 | .target = .{ | |
| 191 | .cpu_arch = .mipsel, | |
| 192 | .os_tag = .linux, | |
| 193 | .abi = .musl, | |
| 194 | }, | |
| 195 | .link_libc = true, | |
| 196 | }, | |
| 186 | // https://github.com/ziglang/zig/issues/8155 | |
| 187 | //TestTarget{ | |
| 188 | // .target = .{ | |
| 189 | // .cpu_arch = .mipsel, | |
| 190 | // .os_tag = .linux, | |
| 191 | // .abi = .none, | |
| 192 | // }, | |
| 193 | //}, | |
| 194 | ||
| 195 | // https://github.com/ziglang/zig/issues/8155 | |
| 196 | //TestTarget{ | |
| 197 | // .target = .{ | |
| 198 | // .cpu_arch = .mipsel, | |
| 199 | // .os_tag = .linux, | |
| 200 | // .abi = .musl, | |
| 201 | // }, | |
| 202 | // .link_libc = true, | |
| 203 | //}, | |
| 204 | ||
| 197 | 205 | // https://github.com/ziglang/zig/issues/4927 |
| 198 | 206 | //TestTarget{ |
| 199 | 207 | // .target = .{ |
tools/process_headers.zig+10| ... | ... | @@ -84,6 +84,16 @@ const glibc_targets = [_]LibCTarget{ |
| 84 | 84 | .arch = MultiArch{ .specific = Arch.arm }, |
| 85 | 85 | .abi = MultiAbi{ .specific = Abi.gnueabihf }, |
| 86 | 86 | }, |
| 87 | LibCTarget{ | |
| 88 | .name = "csky-linux-gnuabiv2", | |
| 89 | .arch = MultiArch{ .specific = Arch.csky }, | |
| 90 | .abi = MultiAbi{ .specific = Abi.gnueabihf }, | |
| 91 | }, | |
| 92 | LibCTarget{ | |
| 93 | .name = "csky-linux-gnuabiv2-soft", | |
| 94 | .arch = MultiArch{ .specific = Arch.csky }, | |
| 95 | .abi = MultiAbi{ .specific = Abi.gnueabi }, | |
| 96 | }, | |
| 87 | 97 | LibCTarget{ |
| 88 | 98 | .name = "i686-linux-gnu", |
| 89 | 99 | .arch = MultiArch{ .specific = Arch.i386 }, |
tools/update_cpu_features.zig created+1292| ... | ... | @@ -0,0 +1,1292 @@ |
| 1 | const std = @import("std"); | |
| 2 | const fs = std.fs; | |
| 3 | const mem = std.mem; | |
| 4 | const json = std.json; | |
| 5 | const assert = std.debug.assert; | |
| 6 | ||
| 7 | // All references to other features are based on "zig name" as the key. | |
| 8 | ||
| 9 | const FeatureOverride = struct { | |
| 10 | llvm_name: []const u8, | |
| 11 | /// If true, completely omit the feature; as if it does not exist. | |
| 12 | omit: bool = false, | |
| 13 | /// If true, omit the feature, but all the dependencies of the feature | |
| 14 | /// are added in its place. | |
| 15 | flatten: bool = false, | |
| 16 | zig_name: ?[]const u8 = null, | |
| 17 | desc: ?[]const u8 = null, | |
| 18 | extra_deps: []const []const u8 = &.{}, | |
| 19 | }; | |
| 20 | ||
| 21 | const Cpu = struct { | |
| 22 | llvm_name: ?[]const u8, | |
| 23 | zig_name: []const u8, | |
| 24 | features: []const []const u8, | |
| 25 | }; | |
| 26 | ||
| 27 | const Feature = struct { | |
| 28 | llvm_name: ?[]const u8 = null, | |
| 29 | zig_name: []const u8, | |
| 30 | desc: []const u8, | |
| 31 | deps: []const []const u8, | |
| 32 | flatten: bool = false, | |
| 33 | }; | |
| 34 | ||
| 35 | const LlvmTarget = struct { | |
| 36 | zig_name: []const u8, | |
| 37 | llvm_name: []const u8, | |
| 38 | td_name: []const u8, | |
| 39 | feature_overrides: []const FeatureOverride = &.{}, | |
| 40 | extra_cpus: []const Cpu = &.{}, | |
| 41 | extra_features: []const Feature = &.{}, | |
| 42 | branch_quota: ?usize = null, | |
| 43 | }; | |
| 44 | ||
| 45 | const llvm_targets = [_]LlvmTarget{ | |
| 46 | .{ | |
| 47 | .zig_name = "aarch64", | |
| 48 | .llvm_name = "AArch64", | |
| 49 | .td_name = "AArch64.td", | |
| 50 | .branch_quota = 2000, | |
| 51 | .feature_overrides = &.{ | |
| 52 | .{ | |
| 53 | .llvm_name = "CONTEXTIDREL2", | |
| 54 | .zig_name = "contextidr_el2", | |
| 55 | .desc = "Enable RW operand Context ID Register (EL2)", | |
| 56 | }, | |
| 57 | .{ | |
| 58 | .llvm_name = "neoversee1", | |
| 59 | .zig_name = "neoverse_e1", | |
| 60 | }, | |
| 61 | .{ | |
| 62 | .llvm_name = "neoversen1", | |
| 63 | .zig_name = "neoverse_n1", | |
| 64 | }, | |
| 65 | .{ | |
| 66 | .llvm_name = "neoversen2", | |
| 67 | .zig_name = "neoverse_n2", | |
| 68 | }, | |
| 69 | .{ | |
| 70 | .llvm_name = "neoversev1", | |
| 71 | .zig_name = "neoverse_v1", | |
| 72 | }, | |
| 73 | .{ | |
| 74 | .llvm_name = "exynosm3", | |
| 75 | .zig_name = "exynos_m3", | |
| 76 | .flatten = true, | |
| 77 | .extra_deps = &.{"v8a"}, | |
| 78 | }, | |
| 79 | .{ | |
| 80 | .llvm_name = "exynosm4", | |
| 81 | .zig_name = "exynos_m4", | |
| 82 | }, | |
| 83 | .{ | |
| 84 | .llvm_name = "v8.1a", | |
| 85 | .extra_deps = &.{"v8a"}, | |
| 86 | }, | |
| 87 | .{ | |
| 88 | .llvm_name = "a35", | |
| 89 | .flatten = true, | |
| 90 | .extra_deps = &.{"v8a"}, | |
| 91 | }, | |
| 92 | .{ | |
| 93 | .llvm_name = "a53", | |
| 94 | .flatten = true, | |
| 95 | .extra_deps = &.{"v8a"}, | |
| 96 | }, | |
| 97 | .{ | |
| 98 | .llvm_name = "a55", | |
| 99 | .flatten = true, | |
| 100 | }, | |
| 101 | .{ | |
| 102 | .llvm_name = "a57", | |
| 103 | .flatten = true, | |
| 104 | .extra_deps = &.{"v8a"}, | |
| 105 | }, | |
| 106 | .{ | |
| 107 | .llvm_name = "a64fx", | |
| 108 | .flatten = true, | |
| 109 | }, | |
| 110 | .{ | |
| 111 | .llvm_name = "a72", | |
| 112 | .flatten = true, | |
| 113 | .extra_deps = &.{"v8a"}, | |
| 114 | }, | |
| 115 | .{ | |
| 116 | .llvm_name = "a73", | |
| 117 | .flatten = true, | |
| 118 | .extra_deps = &.{"v8a"}, | |
| 119 | }, | |
| 120 | .{ | |
| 121 | .llvm_name = "a75", | |
| 122 | .flatten = true, | |
| 123 | }, | |
| 124 | .{ | |
| 125 | .llvm_name = "a77", | |
| 126 | .flatten = true, | |
| 127 | }, | |
| 128 | .{ | |
| 129 | .llvm_name = "apple-a10", | |
| 130 | .flatten = true, | |
| 131 | }, | |
| 132 | .{ | |
| 133 | .llvm_name = "apple-a11", | |
| 134 | .flatten = true, | |
| 135 | }, | |
| 136 | .{ | |
| 137 | .llvm_name = "apple-a14", | |
| 138 | .flatten = true, | |
| 139 | }, | |
| 140 | .{ | |
| 141 | .llvm_name = "carmel", | |
| 142 | .flatten = true, | |
| 143 | }, | |
| 144 | .{ | |
| 145 | .llvm_name = "cortex-a78", | |
| 146 | .flatten = true, | |
| 147 | }, | |
| 148 | .{ | |
| 149 | .llvm_name = "cortex-x1", | |
| 150 | .flatten = true, | |
| 151 | }, | |
| 152 | .{ | |
| 153 | .llvm_name = "falkor", | |
| 154 | .flatten = true, | |
| 155 | .extra_deps = &.{"v8a"}, | |
| 156 | }, | |
| 157 | .{ | |
| 158 | .llvm_name = "kryo", | |
| 159 | .flatten = true, | |
| 160 | .extra_deps = &.{"v8a"}, | |
| 161 | }, | |
| 162 | .{ | |
| 163 | .llvm_name = "saphira", | |
| 164 | .flatten = true, | |
| 165 | }, | |
| 166 | .{ | |
| 167 | .llvm_name = "thunderx", | |
| 168 | .flatten = true, | |
| 169 | .extra_deps = &.{"v8a"}, | |
| 170 | }, | |
| 171 | .{ | |
| 172 | .llvm_name = "thunderx2t99", | |
| 173 | .flatten = true, | |
| 174 | }, | |
| 175 | .{ | |
| 176 | .llvm_name = "thunderx3t110", | |
| 177 | .flatten = true, | |
| 178 | }, | |
| 179 | .{ | |
| 180 | .llvm_name = "thunderxt81", | |
| 181 | .flatten = true, | |
| 182 | .extra_deps = &.{"v8a"}, | |
| 183 | }, | |
| 184 | .{ | |
| 185 | .llvm_name = "thunderxt83", | |
| 186 | .flatten = true, | |
| 187 | .extra_deps = &.{"v8a"}, | |
| 188 | }, | |
| 189 | .{ | |
| 190 | .llvm_name = "thunderxt88", | |
| 191 | .flatten = true, | |
| 192 | .extra_deps = &.{"v8a"}, | |
| 193 | }, | |
| 194 | .{ | |
| 195 | .llvm_name = "tsv110", | |
| 196 | .flatten = true, | |
| 197 | }, | |
| 198 | }, | |
| 199 | .extra_features = &.{ | |
| 200 | .{ | |
| 201 | .zig_name = "v8a", | |
| 202 | .desc = "Support ARM v8a instructions", | |
| 203 | .deps = &.{ "fp_armv8", "neon" }, | |
| 204 | }, | |
| 205 | }, | |
| 206 | .extra_cpus = &.{ | |
| 207 | .{ | |
| 208 | .llvm_name = null, | |
| 209 | .zig_name = "exynos_m1", | |
| 210 | .features = &.{ | |
| 211 | "crc", | |
| 212 | "crypto", | |
| 213 | "exynos_cheap_as_move", | |
| 214 | "force_32bit_jump_tables", | |
| 215 | "fuse_aes", | |
| 216 | "perfmon", | |
| 217 | "slow_misaligned_128store", | |
| 218 | "slow_paired_128", | |
| 219 | "use_postra_scheduler", | |
| 220 | "use_reciprocal_square_root", | |
| 221 | "v8a", | |
| 222 | "zcz_fp", | |
| 223 | }, | |
| 224 | }, | |
| 225 | .{ | |
| 226 | .llvm_name = null, | |
| 227 | .zig_name = "exynos_m2", | |
| 228 | .features = &.{ | |
| 229 | "crc", | |
| 230 | "crypto", | |
| 231 | "exynos_cheap_as_move", | |
| 232 | "force_32bit_jump_tables", | |
| 233 | "fuse_aes", | |
| 234 | "perfmon", | |
| 235 | "slow_misaligned_128store", | |
| 236 | "slow_paired_128", | |
| 237 | "use_postra_scheduler", | |
| 238 | "v8a", | |
| 239 | "zcz_fp", | |
| 240 | }, | |
| 241 | }, | |
| 242 | }, | |
| 243 | }, | |
| 244 | .{ | |
| 245 | .zig_name = "amdgpu", | |
| 246 | .llvm_name = "AMDGPU", | |
| 247 | .td_name = "AMDGPU.td", | |
| 248 | .feature_overrides = &.{ | |
| 249 | .{ | |
| 250 | .llvm_name = "DumpCode", | |
| 251 | .omit = true, | |
| 252 | }, | |
| 253 | .{ | |
| 254 | .llvm_name = "dumpcode", | |
| 255 | .omit = true, | |
| 256 | }, | |
| 257 | }, | |
| 258 | }, | |
| 259 | .{ | |
| 260 | .zig_name = "arc", | |
| 261 | .llvm_name = "ARC", | |
| 262 | .td_name = "ARC.td", | |
| 263 | }, | |
| 264 | .{ | |
| 265 | .zig_name = "arm", | |
| 266 | .llvm_name = "ARM", | |
| 267 | .td_name = "ARM.td", | |
| 268 | .branch_quota = 10000, | |
| 269 | .extra_cpus = &.{ | |
| 270 | .{ | |
| 271 | .llvm_name = "generic", | |
| 272 | .zig_name = "baseline", | |
| 273 | .features = &.{"v7a"}, | |
| 274 | }, | |
| 275 | .{ | |
| 276 | .llvm_name = null, | |
| 277 | .zig_name = "exynos_m1", | |
| 278 | .features = &.{ "v8a", "exynos" }, | |
| 279 | }, | |
| 280 | .{ | |
| 281 | .llvm_name = null, | |
| 282 | .zig_name = "exynos_m2", | |
| 283 | .features = &.{ "v8a", "exynos" }, | |
| 284 | }, | |
| 285 | }, | |
| 286 | .feature_overrides = &.{ | |
| 287 | .{ | |
| 288 | .llvm_name = "cortex-a78", | |
| 289 | .flatten = true, | |
| 290 | }, | |
| 291 | .{ | |
| 292 | .llvm_name = "r5", | |
| 293 | .flatten = true, | |
| 294 | }, | |
| 295 | .{ | |
| 296 | .llvm_name = "r52", | |
| 297 | .flatten = true, | |
| 298 | }, | |
| 299 | .{ | |
| 300 | .llvm_name = "r7", | |
| 301 | .flatten = true, | |
| 302 | }, | |
| 303 | .{ | |
| 304 | .llvm_name = "m7", | |
| 305 | .flatten = true, | |
| 306 | }, | |
| 307 | .{ | |
| 308 | .llvm_name = "krait", | |
| 309 | .flatten = true, | |
| 310 | }, | |
| 311 | .{ | |
| 312 | .llvm_name = "kryo", | |
| 313 | .flatten = true, | |
| 314 | }, | |
| 315 | .{ | |
| 316 | .llvm_name = "cortex-x1", | |
| 317 | .flatten = true, | |
| 318 | }, | |
| 319 | .{ | |
| 320 | .llvm_name = "neoverse-v1", | |
| 321 | .flatten = true, | |
| 322 | }, | |
| 323 | .{ | |
| 324 | .llvm_name = "a5", | |
| 325 | .flatten = true, | |
| 326 | }, | |
| 327 | .{ | |
| 328 | .llvm_name = "a7", | |
| 329 | .flatten = true, | |
| 330 | }, | |
| 331 | .{ | |
| 332 | .llvm_name = "a8", | |
| 333 | .flatten = true, | |
| 334 | }, | |
| 335 | .{ | |
| 336 | .llvm_name = "a9", | |
| 337 | .flatten = true, | |
| 338 | }, | |
| 339 | .{ | |
| 340 | .llvm_name = "a12", | |
| 341 | .flatten = true, | |
| 342 | }, | |
| 343 | .{ | |
| 344 | .llvm_name = "a15", | |
| 345 | .flatten = true, | |
| 346 | }, | |
| 347 | .{ | |
| 348 | .llvm_name = "a17", | |
| 349 | .flatten = true, | |
| 350 | }, | |
| 351 | .{ | |
| 352 | .llvm_name = "a32", | |
| 353 | .flatten = true, | |
| 354 | }, | |
| 355 | .{ | |
| 356 | .llvm_name = "a35", | |
| 357 | .flatten = true, | |
| 358 | }, | |
| 359 | .{ | |
| 360 | .llvm_name = "a53", | |
| 361 | .flatten = true, | |
| 362 | }, | |
| 363 | .{ | |
| 364 | .llvm_name = "a55", | |
| 365 | .flatten = true, | |
| 366 | }, | |
| 367 | .{ | |
| 368 | .llvm_name = "a57", | |
| 369 | .flatten = true, | |
| 370 | }, | |
| 371 | .{ | |
| 372 | .llvm_name = "a72", | |
| 373 | .flatten = true, | |
| 374 | }, | |
| 375 | .{ | |
| 376 | .llvm_name = "a73", | |
| 377 | .flatten = true, | |
| 378 | }, | |
| 379 | .{ | |
| 380 | .llvm_name = "a75", | |
| 381 | .flatten = true, | |
| 382 | }, | |
| 383 | .{ | |
| 384 | .llvm_name = "a77", | |
| 385 | .flatten = true, | |
| 386 | }, | |
| 387 | .{ | |
| 388 | .llvm_name = "a78c", | |
| 389 | .flatten = true, | |
| 390 | }, | |
| 391 | .{ | |
| 392 | .llvm_name = "armv2", | |
| 393 | .zig_name = "v2", | |
| 394 | .extra_deps = &.{"strict_align"}, | |
| 395 | }, | |
| 396 | .{ | |
| 397 | .llvm_name = "armv2a", | |
| 398 | .zig_name = "v2a", | |
| 399 | .extra_deps = &.{"strict_align"}, | |
| 400 | }, | |
| 401 | .{ | |
| 402 | .llvm_name = "armv3", | |
| 403 | .zig_name = "v3", | |
| 404 | .extra_deps = &.{"strict_align"}, | |
| 405 | }, | |
| 406 | .{ | |
| 407 | .llvm_name = "armv3m", | |
| 408 | .zig_name = "v3m", | |
| 409 | .extra_deps = &.{"strict_align"}, | |
| 410 | }, | |
| 411 | .{ | |
| 412 | .llvm_name = "armv4", | |
| 413 | .zig_name = "v4", | |
| 414 | .extra_deps = &.{"strict_align"}, | |
| 415 | }, | |
| 416 | .{ | |
| 417 | .llvm_name = "armv4t", | |
| 418 | .zig_name = "v4t", | |
| 419 | .extra_deps = &.{"strict_align"}, | |
| 420 | }, | |
| 421 | .{ | |
| 422 | .llvm_name = "armv5t", | |
| 423 | .zig_name = "v5t", | |
| 424 | .extra_deps = &.{"strict_align"}, | |
| 425 | }, | |
| 426 | .{ | |
| 427 | .llvm_name = "armv5te", | |
| 428 | .zig_name = "v5te", | |
| 429 | .extra_deps = &.{"strict_align"}, | |
| 430 | }, | |
| 431 | .{ | |
| 432 | .llvm_name = "armv5tej", | |
| 433 | .zig_name = "v5tej", | |
| 434 | .extra_deps = &.{"strict_align"}, | |
| 435 | }, | |
| 436 | .{ | |
| 437 | .llvm_name = "armv6", | |
| 438 | .zig_name = "v6", | |
| 439 | }, | |
| 440 | .{ | |
| 441 | .llvm_name = "armv6-m", | |
| 442 | .zig_name = "v6m", | |
| 443 | }, | |
| 444 | .{ | |
| 445 | .llvm_name = "armv6j", | |
| 446 | .zig_name = "v6j", | |
| 447 | }, | |
| 448 | .{ | |
| 449 | .llvm_name = "armv6k", | |
| 450 | .zig_name = "v6k", | |
| 451 | }, | |
| 452 | .{ | |
| 453 | .llvm_name = "armv6kz", | |
| 454 | .zig_name = "v6kz", | |
| 455 | }, | |
| 456 | .{ | |
| 457 | .llvm_name = "armv6s-m", | |
| 458 | .zig_name = "v6sm", | |
| 459 | }, | |
| 460 | .{ | |
| 461 | .llvm_name = "armv6t2", | |
| 462 | .zig_name = "v6t2", | |
| 463 | }, | |
| 464 | .{ | |
| 465 | .llvm_name = "armv7-a", | |
| 466 | .zig_name = "v7a", | |
| 467 | }, | |
| 468 | .{ | |
| 469 | .llvm_name = "armv7-m", | |
| 470 | .zig_name = "v7m", | |
| 471 | }, | |
| 472 | .{ | |
| 473 | .llvm_name = "armv7-r", | |
| 474 | .zig_name = "v7r", | |
| 475 | }, | |
| 476 | .{ | |
| 477 | .llvm_name = "armv7e-m", | |
| 478 | .zig_name = "v7em", | |
| 479 | }, | |
| 480 | .{ | |
| 481 | .llvm_name = "armv7k", | |
| 482 | .zig_name = "v7k", | |
| 483 | }, | |
| 484 | .{ | |
| 485 | .llvm_name = "armv7s", | |
| 486 | .zig_name = "v7s", | |
| 487 | }, | |
| 488 | .{ | |
| 489 | .llvm_name = "armv7ve", | |
| 490 | .zig_name = "v7ve", | |
| 491 | }, | |
| 492 | .{ | |
| 493 | .llvm_name = "armv8.1-a", | |
| 494 | .zig_name = "v8_1a", | |
| 495 | }, | |
| 496 | .{ | |
| 497 | .llvm_name = "armv8.1-m.main", | |
| 498 | .zig_name = "v8_1m_main", | |
| 499 | }, | |
| 500 | .{ | |
| 501 | .llvm_name = "armv8.2-a", | |
| 502 | .zig_name = "v8_2a", | |
| 503 | }, | |
| 504 | .{ | |
| 505 | .llvm_name = "armv8.3-a", | |
| 506 | .zig_name = "v8_3a", | |
| 507 | }, | |
| 508 | .{ | |
| 509 | .llvm_name = "armv8.4-a", | |
| 510 | .zig_name = "v8_4a", | |
| 511 | }, | |
| 512 | .{ | |
| 513 | .llvm_name = "armv8.5-a", | |
| 514 | .zig_name = "v8_5a", | |
| 515 | }, | |
| 516 | .{ | |
| 517 | .llvm_name = "armv8.6-a", | |
| 518 | .zig_name = "v8_6a", | |
| 519 | }, | |
| 520 | .{ | |
| 521 | .llvm_name = "armv8.7-a", | |
| 522 | .zig_name = "v8_7a", | |
| 523 | }, | |
| 524 | .{ | |
| 525 | .llvm_name = "armv8-a", | |
| 526 | .zig_name = "v8a", | |
| 527 | }, | |
| 528 | .{ | |
| 529 | .llvm_name = "armv8-m.base", | |
| 530 | .zig_name = "v8m", | |
| 531 | }, | |
| 532 | .{ | |
| 533 | .llvm_name = "armv8-m.main", | |
| 534 | .zig_name = "v8m_main", | |
| 535 | }, | |
| 536 | .{ | |
| 537 | .llvm_name = "armv8-r", | |
| 538 | .zig_name = "v8r", | |
| 539 | }, | |
| 540 | .{ | |
| 541 | .llvm_name = "v4t", | |
| 542 | .zig_name = "has_v4t", | |
| 543 | }, | |
| 544 | .{ | |
| 545 | .llvm_name = "v5t", | |
| 546 | .zig_name = "has_v5t", | |
| 547 | }, | |
| 548 | .{ | |
| 549 | .llvm_name = "v5te", | |
| 550 | .zig_name = "has_v5te", | |
| 551 | }, | |
| 552 | .{ | |
| 553 | .llvm_name = "v6", | |
| 554 | .zig_name = "has_v6", | |
| 555 | }, | |
| 556 | .{ | |
| 557 | .llvm_name = "v6k", | |
| 558 | .zig_name = "has_v6k", | |
| 559 | }, | |
| 560 | .{ | |
| 561 | .llvm_name = "v6m", | |
| 562 | .zig_name = "has_v6m", | |
| 563 | }, | |
| 564 | .{ | |
| 565 | .llvm_name = "v6t2", | |
| 566 | .zig_name = "has_v6t2", | |
| 567 | }, | |
| 568 | .{ | |
| 569 | .llvm_name = "v7", | |
| 570 | .zig_name = "has_v7", | |
| 571 | }, | |
| 572 | .{ | |
| 573 | .llvm_name = "v7clrex", | |
| 574 | .zig_name = "has_v7clrex", | |
| 575 | }, | |
| 576 | .{ | |
| 577 | .llvm_name = "v8", | |
| 578 | .zig_name = "has_v8", | |
| 579 | }, | |
| 580 | .{ | |
| 581 | .llvm_name = "v8m", | |
| 582 | .zig_name = "has_v8m", | |
| 583 | }, | |
| 584 | .{ | |
| 585 | .llvm_name = "v8m.main", | |
| 586 | .zig_name = "has_v8m_main", | |
| 587 | }, | |
| 588 | .{ | |
| 589 | .llvm_name = "v8.1a", | |
| 590 | .zig_name = "has_v8_1a", | |
| 591 | }, | |
| 592 | .{ | |
| 593 | .llvm_name = "v8.1m.main", | |
| 594 | .zig_name = "has_v8_1m_main", | |
| 595 | }, | |
| 596 | .{ | |
| 597 | .llvm_name = "v8.2a", | |
| 598 | .zig_name = "has_v8_2a", | |
| 599 | }, | |
| 600 | .{ | |
| 601 | .llvm_name = "v8.3a", | |
| 602 | .zig_name = "has_v8_3a", | |
| 603 | }, | |
| 604 | .{ | |
| 605 | .llvm_name = "v8.4a", | |
| 606 | .zig_name = "has_v8_4a", | |
| 607 | }, | |
| 608 | .{ | |
| 609 | .llvm_name = "v8.5a", | |
| 610 | .zig_name = "has_v8_5a", | |
| 611 | }, | |
| 612 | .{ | |
| 613 | .llvm_name = "v8.6a", | |
| 614 | .zig_name = "has_v8_6a", | |
| 615 | }, | |
| 616 | .{ | |
| 617 | .llvm_name = "v8.7a", | |
| 618 | .zig_name = "has_v8_7a", | |
| 619 | }, | |
| 620 | }, | |
| 621 | }, | |
| 622 | .{ | |
| 623 | .zig_name = "avr", | |
| 624 | .llvm_name = "AVR", | |
| 625 | .td_name = "AVR.td", | |
| 626 | }, | |
| 627 | .{ | |
| 628 | .zig_name = "bpf", | |
| 629 | .llvm_name = "BPF", | |
| 630 | .td_name = "BPF.td", | |
| 631 | }, | |
| 632 | .{ | |
| 633 | .zig_name = "csky", | |
| 634 | .llvm_name = "CSKY", | |
| 635 | .td_name = "CSKY.td", | |
| 636 | }, | |
| 637 | .{ | |
| 638 | .zig_name = "hexagon", | |
| 639 | .llvm_name = "Hexagon", | |
| 640 | .td_name = "Hexagon.td", | |
| 641 | }, | |
| 642 | .{ | |
| 643 | .zig_name = "lanai", | |
| 644 | .llvm_name = "Lanai", | |
| 645 | .td_name = "Lanai.td", | |
| 646 | }, | |
| 647 | .{ | |
| 648 | .zig_name = "msp430", | |
| 649 | .llvm_name = "MSP430", | |
| 650 | .td_name = "MSP430.td", | |
| 651 | }, | |
| 652 | .{ | |
| 653 | .zig_name = "mips", | |
| 654 | .llvm_name = "Mips", | |
| 655 | .td_name = "Mips.td", | |
| 656 | }, | |
| 657 | .{ | |
| 658 | .zig_name = "nvptx", | |
| 659 | .llvm_name = "NVPTX", | |
| 660 | .td_name = "NVPTX.td", | |
| 661 | }, | |
| 662 | .{ | |
| 663 | .zig_name = "powerpc", | |
| 664 | .llvm_name = "PowerPC", | |
| 665 | .td_name = "PPC.td", | |
| 666 | }, | |
| 667 | .{ | |
| 668 | .zig_name = "riscv", | |
| 669 | .llvm_name = "RISCV", | |
| 670 | .td_name = "RISCV.td", | |
| 671 | .extra_cpus = &.{ | |
| 672 | .{ | |
| 673 | .llvm_name = null, | |
| 674 | .zig_name = "baseline_rv32", | |
| 675 | .features = &.{ "a", "c", "d", "f", "m" }, | |
| 676 | }, | |
| 677 | .{ | |
| 678 | .llvm_name = null, | |
| 679 | .zig_name = "baseline_rv64", | |
| 680 | .features = &.{ "64bit", "a", "c", "d", "f", "m" }, | |
| 681 | }, | |
| 682 | }, | |
| 683 | }, | |
| 684 | .{ | |
| 685 | .zig_name = "sparc", | |
| 686 | .llvm_name = "Sparc", | |
| 687 | .td_name = "Sparc.td", | |
| 688 | }, | |
| 689 | .{ | |
| 690 | .zig_name = "systemz", | |
| 691 | .llvm_name = "SystemZ", | |
| 692 | .td_name = "SystemZ.td", | |
| 693 | }, | |
| 694 | .{ | |
| 695 | .zig_name = "ve", | |
| 696 | .llvm_name = "VE", | |
| 697 | .td_name = "VE.td", | |
| 698 | }, | |
| 699 | .{ | |
| 700 | .zig_name = "wasm", | |
| 701 | .llvm_name = "WebAssembly", | |
| 702 | .td_name = "WebAssembly.td", | |
| 703 | }, | |
| 704 | .{ | |
| 705 | .zig_name = "x86", | |
| 706 | .llvm_name = "X86", | |
| 707 | .td_name = "X86.td", | |
| 708 | .feature_overrides = &.{ | |
| 709 | .{ | |
| 710 | .llvm_name = "64bit-mode", | |
| 711 | .omit = true, | |
| 712 | }, | |
| 713 | .{ | |
| 714 | .llvm_name = "i386", | |
| 715 | .zig_name = "_i386", | |
| 716 | }, | |
| 717 | .{ | |
| 718 | .llvm_name = "i486", | |
| 719 | .zig_name = "_i486", | |
| 720 | }, | |
| 721 | .{ | |
| 722 | .llvm_name = "i586", | |
| 723 | .zig_name = "_i586", | |
| 724 | }, | |
| 725 | .{ | |
| 726 | .llvm_name = "i686", | |
| 727 | .zig_name = "_i686", | |
| 728 | }, | |
| 729 | }, | |
| 730 | }, | |
| 731 | .{ | |
| 732 | .zig_name = "xcore", | |
| 733 | .llvm_name = "XCore", | |
| 734 | .td_name = "XCore.td", | |
| 735 | }, | |
| 736 | }; | |
| 737 | ||
| 738 | pub fn main() anyerror!void { | |
| 739 | var arena_state = std.heap.ArenaAllocator.init(std.heap.page_allocator); | |
| 740 | defer arena_state.deinit(); | |
| 741 | const arena = &arena_state.allocator; | |
| 742 | ||
| 743 | const args = try std.process.argsAlloc(arena); | |
| 744 | if (args.len <= 1) { | |
| 745 | usageAndExit(std.io.getStdErr(), args[0], 1); | |
| 746 | } | |
| 747 | if (std.mem.eql(u8, args[1], "--help")) { | |
| 748 | usageAndExit(std.io.getStdOut(), args[0], 0); | |
| 749 | } | |
| 750 | if (args.len < 4) { | |
| 751 | usageAndExit(std.io.getStdErr(), args[0], 1); | |
| 752 | } | |
| 753 | ||
| 754 | const llvm_tblgen_exe = args[1]; | |
| 755 | if (std.mem.startsWith(u8, llvm_tblgen_exe, "-")) { | |
| 756 | usageAndExit(std.io.getStdErr(), args[0], 1); | |
| 757 | } | |
| 758 | ||
| 759 | const llvm_src_root = args[2]; | |
| 760 | if (std.mem.startsWith(u8, llvm_src_root, "-")) { | |
| 761 | usageAndExit(std.io.getStdErr(), args[0], 1); | |
| 762 | } | |
| 763 | ||
| 764 | const zig_src_root = args[3]; | |
| 765 | if (std.mem.startsWith(u8, zig_src_root, "-")) { | |
| 766 | usageAndExit(std.io.getStdErr(), args[0], 1); | |
| 767 | } | |
| 768 | ||
| 769 | var zig_src_dir = try fs.cwd().openDir(zig_src_root, .{}); | |
| 770 | defer zig_src_dir.close(); | |
| 771 | ||
| 772 | var progress = std.Progress{}; | |
| 773 | const root_progress = try progress.start("", llvm_targets.len); | |
| 774 | defer root_progress.end(); | |
| 775 | ||
| 776 | if (std.builtin.single_threaded) { | |
| 777 | for (llvm_targets) |llvm_target| { | |
| 778 | try processOneTarget(Job{ | |
| 779 | .llvm_tblgen_exe = llvm_tblgen_exe, | |
| 780 | .llvm_src_root = llvm_src_root, | |
| 781 | .zig_src_dir = zig_src_dir, | |
| 782 | .root_progress = root_progress, | |
| 783 | .llvm_target = llvm_target, | |
| 784 | }); | |
| 785 | } | |
| 786 | } else { | |
| 787 | var threads = try arena.alloc(*std.Thread, llvm_targets.len); | |
| 788 | for (llvm_targets) |llvm_target, i| { | |
| 789 | threads[i] = try std.Thread.spawn(processOneTarget, .{ | |
| 790 | .llvm_tblgen_exe = llvm_tblgen_exe, | |
| 791 | .llvm_src_root = llvm_src_root, | |
| 792 | .zig_src_dir = zig_src_dir, | |
| 793 | .root_progress = root_progress, | |
| 794 | .llvm_target = llvm_target, | |
| 795 | }); | |
| 796 | } | |
| 797 | for (threads) |thread| { | |
| 798 | thread.wait(); | |
| 799 | } | |
| 800 | } | |
| 801 | } | |
| 802 | ||
| 803 | const Job = struct { | |
| 804 | llvm_tblgen_exe: []const u8, | |
| 805 | llvm_src_root: []const u8, | |
| 806 | zig_src_dir: std.fs.Dir, | |
| 807 | root_progress: *std.Progress.Node, | |
| 808 | llvm_target: LlvmTarget, | |
| 809 | }; | |
| 810 | ||
| 811 | fn processOneTarget(job: Job) anyerror!void { | |
| 812 | const llvm_target = job.llvm_target; | |
| 813 | ||
| 814 | var arena_state = std.heap.ArenaAllocator.init(std.heap.page_allocator); | |
| 815 | defer arena_state.deinit(); | |
| 816 | const arena = &arena_state.allocator; | |
| 817 | ||
| 818 | var progress_node = job.root_progress.start(llvm_target.zig_name, 3); | |
| 819 | progress_node.activate(); | |
| 820 | defer progress_node.end(); | |
| 821 | ||
| 822 | var tblgen_progress = progress_node.start("invoke llvm-tblgen", 0); | |
| 823 | tblgen_progress.activate(); | |
| 824 | ||
| 825 | const child_args = [_][]const u8{ | |
| 826 | job.llvm_tblgen_exe, | |
| 827 | "--dump-json", | |
| 828 | try std.fmt.allocPrint(arena, "{s}/llvm/lib/Target/{s}/{s}", .{ | |
| 829 | job.llvm_src_root, | |
| 830 | llvm_target.llvm_name, | |
| 831 | llvm_target.td_name, | |
| 832 | }), | |
| 833 | try std.fmt.allocPrint(arena, "-I={s}/llvm/include", .{job.llvm_src_root}), | |
| 834 | try std.fmt.allocPrint(arena, "-I={s}/llvm/lib/Target/{s}", .{ | |
| 835 | job.llvm_src_root, llvm_target.llvm_name, | |
| 836 | }), | |
| 837 | }; | |
| 838 | ||
| 839 | const child_result = try std.ChildProcess.exec(.{ | |
| 840 | .allocator = arena, | |
| 841 | .argv = &child_args, | |
| 842 | .max_output_bytes = 200 * 1024 * 1024, | |
| 843 | }); | |
| 844 | tblgen_progress.end(); | |
| 845 | if (child_result.stderr.len != 0) { | |
| 846 | std.debug.warn("{s}\n", .{child_result.stderr}); | |
| 847 | } | |
| 848 | ||
| 849 | const json_text = switch (child_result.term) { | |
| 850 | .Exited => |code| if (code == 0) child_result.stdout else { | |
| 851 | std.debug.warn("llvm-tblgen exited with code {d}\n", .{code}); | |
| 852 | std.process.exit(1); | |
| 853 | }, | |
| 854 | else => { | |
| 855 | std.debug.warn("llvm-tblgen crashed\n", .{}); | |
| 856 | std.process.exit(1); | |
| 857 | }, | |
| 858 | }; | |
| 859 | ||
| 860 | var json_parse_progress = progress_node.start("parse JSON", 0); | |
| 861 | json_parse_progress.activate(); | |
| 862 | ||
| 863 | var parser = json.Parser.init(arena, false); | |
| 864 | const tree = try parser.parse(json_text); | |
| 865 | json_parse_progress.end(); | |
| 866 | ||
| 867 | var render_progress = progress_node.start("render zig code", 0); | |
| 868 | render_progress.activate(); | |
| 869 | ||
| 870 | const root_map = &tree.root.Object; | |
| 871 | var features_table = std.StringHashMap(Feature).init(arena); | |
| 872 | var all_features = std.ArrayList(Feature).init(arena); | |
| 873 | var all_cpus = std.ArrayList(Cpu).init(arena); | |
| 874 | { | |
| 875 | var it = root_map.iterator(); | |
| 876 | root_it: while (it.next()) |kv| { | |
| 877 | if (kv.key.len == 0) continue; | |
| 878 | if (kv.key[0] == '!') continue; | |
| 879 | if (kv.value != .Object) continue; | |
| 880 | if (hasSuperclass(&kv.value.Object, "SubtargetFeature")) { | |
| 881 | const llvm_name = kv.value.Object.get("Name").?.String; | |
| 882 | if (llvm_name.len == 0) continue; | |
| 883 | ||
| 884 | var zig_name = try llvmNameToZigName(arena, llvm_name); | |
| 885 | var desc = kv.value.Object.get("Desc").?.String; | |
| 886 | var deps = std.ArrayList([]const u8).init(arena); | |
| 887 | var omit = false; | |
| 888 | var flatten = false; | |
| 889 | const implies = kv.value.Object.get("Implies").?.Array; | |
| 890 | for (implies.items) |imply| { | |
| 891 | const other_key = imply.Object.get("def").?.String; | |
| 892 | const other_obj = &root_map.getEntry(other_key).?.value.Object; | |
| 893 | const other_llvm_name = other_obj.get("Name").?.String; | |
| 894 | const other_zig_name = (try llvmNameToZigNameOmit( | |
| 895 | arena, | |
| 896 | llvm_target, | |
| 897 | other_llvm_name, | |
| 898 | )) orelse continue; | |
| 899 | try deps.append(other_zig_name); | |
| 900 | } | |
| 901 | for (llvm_target.feature_overrides) |feature_override| { | |
| 902 | if (mem.eql(u8, llvm_name, feature_override.llvm_name)) { | |
| 903 | if (feature_override.omit) { | |
| 904 | // Still put the feature into the table so that we can | |
| 905 | // expand dependencies for the feature overrides marked `flatten`. | |
| 906 | omit = true; | |
| 907 | } | |
| 908 | if (feature_override.flatten) { | |
| 909 | flatten = true; | |
| 910 | } | |
| 911 | if (feature_override.zig_name) |override_name| { | |
| 912 | zig_name = override_name; | |
| 913 | } | |
| 914 | if (feature_override.desc) |override_desc| { | |
| 915 | desc = override_desc; | |
| 916 | } | |
| 917 | for (feature_override.extra_deps) |extra_dep| { | |
| 918 | try deps.append(extra_dep); | |
| 919 | } | |
| 920 | break; | |
| 921 | } | |
| 922 | } | |
| 923 | const feature: Feature = .{ | |
| 924 | .llvm_name = llvm_name, | |
| 925 | .zig_name = zig_name, | |
| 926 | .desc = desc, | |
| 927 | .deps = deps.items, | |
| 928 | .flatten = flatten, | |
| 929 | }; | |
| 930 | try features_table.put(zig_name, feature); | |
| 931 | if (!omit and !flatten) { | |
| 932 | try all_features.append(feature); | |
| 933 | } | |
| 934 | } | |
| 935 | if (hasSuperclass(&kv.value.Object, "Processor")) { | |
| 936 | const llvm_name = kv.value.Object.get("Name").?.String; | |
| 937 | if (llvm_name.len == 0) continue; | |
| 938 | ||
| 939 | var zig_name = try llvmNameToZigName(arena, llvm_name); | |
| 940 | var deps = std.ArrayList([]const u8).init(arena); | |
| 941 | const features = kv.value.Object.get("Features").?.Array; | |
| 942 | for (features.items) |feature| { | |
| 943 | const feature_key = feature.Object.get("def").?.String; | |
| 944 | const feature_obj = &root_map.getEntry(feature_key).?.value.Object; | |
| 945 | const feature_llvm_name = feature_obj.get("Name").?.String; | |
| 946 | if (feature_llvm_name.len == 0) continue; | |
| 947 | const feature_zig_name = (try llvmNameToZigNameOmit( | |
| 948 | arena, | |
| 949 | llvm_target, | |
| 950 | feature_llvm_name, | |
| 951 | )) orelse continue; | |
| 952 | try deps.append(feature_zig_name); | |
| 953 | } | |
| 954 | const tune_features = kv.value.Object.get("TuneFeatures").?.Array; | |
| 955 | for (tune_features.items) |feature| { | |
| 956 | const feature_key = feature.Object.get("def").?.String; | |
| 957 | const feature_obj = &root_map.getEntry(feature_key).?.value.Object; | |
| 958 | const feature_llvm_name = feature_obj.get("Name").?.String; | |
| 959 | if (feature_llvm_name.len == 0) continue; | |
| 960 | const feature_zig_name = (try llvmNameToZigNameOmit( | |
| 961 | arena, | |
| 962 | llvm_target, | |
| 963 | feature_llvm_name, | |
| 964 | )) orelse continue; | |
| 965 | try deps.append(feature_zig_name); | |
| 966 | } | |
| 967 | for (llvm_target.feature_overrides) |feature_override| { | |
| 968 | if (mem.eql(u8, llvm_name, feature_override.llvm_name)) { | |
| 969 | if (feature_override.omit) { | |
| 970 | continue :root_it; | |
| 971 | } | |
| 972 | if (feature_override.zig_name) |override_name| { | |
| 973 | zig_name = override_name; | |
| 974 | } | |
| 975 | for (feature_override.extra_deps) |extra_dep| { | |
| 976 | try deps.append(extra_dep); | |
| 977 | } | |
| 978 | break; | |
| 979 | } | |
| 980 | } | |
| 981 | try all_cpus.append(.{ | |
| 982 | .llvm_name = llvm_name, | |
| 983 | .zig_name = zig_name, | |
| 984 | .features = deps.items, | |
| 985 | }); | |
| 986 | } | |
| 987 | } | |
| 988 | } | |
| 989 | for (llvm_target.extra_features) |extra_feature| { | |
| 990 | try features_table.put(extra_feature.zig_name, extra_feature); | |
| 991 | try all_features.append(extra_feature); | |
| 992 | } | |
| 993 | for (llvm_target.extra_cpus) |extra_cpu| { | |
| 994 | try all_cpus.append(extra_cpu); | |
| 995 | } | |
| 996 | std.sort.sort(Feature, all_features.items, {}, featureLessThan); | |
| 997 | std.sort.sort(Cpu, all_cpus.items, {}, cpuLessThan); | |
| 998 | ||
| 999 | const target_sub_path = try fs.path.join(arena, &.{ "lib", "std", "target" }); | |
| 1000 | var target_dir = try job.zig_src_dir.makeOpenPath(target_sub_path, .{}); | |
| 1001 | defer target_dir.close(); | |
| 1002 | ||
| 1003 | const zig_code_basename = try std.fmt.allocPrint(arena, "{s}.zig", .{llvm_target.zig_name}); | |
| 1004 | ||
| 1005 | if (all_features.items.len == 0) { | |
| 1006 | // We represent this with an empty file. | |
| 1007 | try target_dir.deleteTree(zig_code_basename); | |
| 1008 | return; | |
| 1009 | } | |
| 1010 | ||
| 1011 | var zig_code_file = try target_dir.createFile(zig_code_basename, .{}); | |
| 1012 | defer zig_code_file.close(); | |
| 1013 | ||
| 1014 | var bw = std.io.bufferedWriter(zig_code_file.writer()); | |
| 1015 | const w = bw.writer(); | |
| 1016 | ||
| 1017 | try w.writeAll( | |
| 1018 | \\//! This file is auto-generated by tools/update_cpu_features.zig. | |
| 1019 | \\ | |
| 1020 | \\const std = @import("../std.zig"); | |
| 1021 | \\const CpuFeature = std.Target.Cpu.Feature; | |
| 1022 | \\const CpuModel = std.Target.Cpu.Model; | |
| 1023 | \\ | |
| 1024 | \\pub const Feature = enum { | |
| 1025 | \\ | |
| 1026 | ); | |
| 1027 | ||
| 1028 | for (all_features.items) |feature| { | |
| 1029 | try w.print(" {},\n", .{std.zig.fmtId(feature.zig_name)}); | |
| 1030 | } | |
| 1031 | ||
| 1032 | try w.writeAll( | |
| 1033 | \\}; | |
| 1034 | \\ | |
| 1035 | \\pub usingnamespace CpuFeature.feature_set_fns(Feature); | |
| 1036 | \\ | |
| 1037 | \\pub const all_features = blk: { | |
| 1038 | \\ | |
| 1039 | ); | |
| 1040 | if (llvm_target.branch_quota) |branch_quota| { | |
| 1041 | try w.print(" @setEvalBranchQuota({d});\n", .{branch_quota}); | |
| 1042 | } | |
| 1043 | try w.writeAll( | |
| 1044 | \\ const len = @typeInfo(Feature).Enum.fields.len; | |
| 1045 | \\ std.debug.assert(len <= CpuFeature.Set.needed_bit_count); | |
| 1046 | \\ var result: [len]CpuFeature = undefined; | |
| 1047 | \\ | |
| 1048 | ); | |
| 1049 | ||
| 1050 | for (all_features.items) |feature| { | |
| 1051 | if (feature.llvm_name) |llvm_name| { | |
| 1052 | try w.print( | |
| 1053 | \\ result[@enumToInt(Feature.{})] = .{{ | |
| 1054 | \\ .llvm_name = "{}", | |
| 1055 | \\ .description = "{}", | |
| 1056 | \\ .dependencies = featureSet(&[_]Feature{{ | |
| 1057 | , | |
| 1058 | .{ | |
| 1059 | std.zig.fmtId(feature.zig_name), | |
| 1060 | std.zig.fmtEscapes(llvm_name), | |
| 1061 | std.zig.fmtEscapes(feature.desc), | |
| 1062 | }, | |
| 1063 | ); | |
| 1064 | } else { | |
| 1065 | try w.print( | |
| 1066 | \\ result[@enumToInt(Feature.{})] = .{{ | |
| 1067 | \\ .llvm_name = null, | |
| 1068 | \\ .description = "{}", | |
| 1069 | \\ .dependencies = featureSet(&[_]Feature{{ | |
| 1070 | , | |
| 1071 | .{ | |
| 1072 | std.zig.fmtId(feature.zig_name), | |
| 1073 | std.zig.fmtEscapes(feature.desc), | |
| 1074 | }, | |
| 1075 | ); | |
| 1076 | } | |
| 1077 | var deps_set = std.StringHashMap(void).init(arena); | |
| 1078 | for (feature.deps) |dep| { | |
| 1079 | try putDep(&deps_set, features_table, dep); | |
| 1080 | } | |
| 1081 | try pruneFeatures(arena, features_table, &deps_set); | |
| 1082 | var dependencies = std.ArrayList([]const u8).init(arena); | |
| 1083 | { | |
| 1084 | var it = deps_set.iterator(); | |
| 1085 | while (it.next()) |entry| { | |
| 1086 | try dependencies.append(entry.key); | |
| 1087 | } | |
| 1088 | } | |
| 1089 | std.sort.sort([]const u8, dependencies.items, {}, asciiLessThan); | |
| 1090 | ||
| 1091 | if (dependencies.items.len == 0) { | |
| 1092 | try w.writeAll( | |
| 1093 | \\}), | |
| 1094 | \\ }; | |
| 1095 | \\ | |
| 1096 | ); | |
| 1097 | } else { | |
| 1098 | try w.writeAll("\n"); | |
| 1099 | for (dependencies.items) |dep| { | |
| 1100 | try w.print(" .{},\n", .{std.zig.fmtId(dep)}); | |
| 1101 | } | |
| 1102 | try w.writeAll( | |
| 1103 | \\ }), | |
| 1104 | \\ }; | |
| 1105 | \\ | |
| 1106 | ); | |
| 1107 | } | |
| 1108 | } | |
| 1109 | try w.writeAll( | |
| 1110 | \\ const ti = @typeInfo(Feature); | |
| 1111 | \\ for (result) |*elem, i| { | |
| 1112 | \\ elem.index = i; | |
| 1113 | \\ elem.name = ti.Enum.fields[i].name; | |
| 1114 | \\ } | |
| 1115 | \\ break :blk result; | |
| 1116 | \\}; | |
| 1117 | \\ | |
| 1118 | \\pub const cpu = struct { | |
| 1119 | \\ | |
| 1120 | ); | |
| 1121 | for (all_cpus.items) |cpu| { | |
| 1122 | var deps_set = std.StringHashMap(void).init(arena); | |
| 1123 | for (cpu.features) |feature_zig_name| { | |
| 1124 | try putDep(&deps_set, features_table, feature_zig_name); | |
| 1125 | } | |
| 1126 | try pruneFeatures(arena, features_table, &deps_set); | |
| 1127 | var cpu_features = std.ArrayList([]const u8).init(arena); | |
| 1128 | { | |
| 1129 | var it = deps_set.iterator(); | |
| 1130 | while (it.next()) |entry| { | |
| 1131 | try cpu_features.append(entry.key); | |
| 1132 | } | |
| 1133 | } | |
| 1134 | std.sort.sort([]const u8, cpu_features.items, {}, asciiLessThan); | |
| 1135 | if (cpu.llvm_name) |llvm_name| { | |
| 1136 | try w.print( | |
| 1137 | \\ pub const {} = CpuModel{{ | |
| 1138 | \\ .name = "{}", | |
| 1139 | \\ .llvm_name = "{}", | |
| 1140 | \\ .features = featureSet(&[_]Feature{{ | |
| 1141 | , .{ | |
| 1142 | std.zig.fmtId(cpu.zig_name), | |
| 1143 | std.zig.fmtEscapes(cpu.zig_name), | |
| 1144 | std.zig.fmtEscapes(llvm_name), | |
| 1145 | }); | |
| 1146 | } else { | |
| 1147 | try w.print( | |
| 1148 | \\ pub const {} = CpuModel{{ | |
| 1149 | \\ .name = "{}", | |
| 1150 | \\ .llvm_name = null, | |
| 1151 | \\ .features = featureSet(&[_]Feature{{ | |
| 1152 | , .{ | |
| 1153 | std.zig.fmtId(cpu.zig_name), | |
| 1154 | std.zig.fmtEscapes(cpu.zig_name), | |
| 1155 | }); | |
| 1156 | } | |
| 1157 | if (cpu_features.items.len == 0) { | |
| 1158 | try w.writeAll( | |
| 1159 | \\}), | |
| 1160 | \\ }; | |
| 1161 | \\ | |
| 1162 | ); | |
| 1163 | } else { | |
| 1164 | try w.writeAll("\n"); | |
| 1165 | for (cpu_features.items) |feature_zig_name| { | |
| 1166 | try w.print(" .{},\n", .{std.zig.fmtId(feature_zig_name)}); | |
| 1167 | } | |
| 1168 | try w.writeAll( | |
| 1169 | \\ }), | |
| 1170 | \\ }; | |
| 1171 | \\ | |
| 1172 | ); | |
| 1173 | } | |
| 1174 | } | |
| 1175 | ||
| 1176 | try w.writeAll( | |
| 1177 | \\}; | |
| 1178 | \\ | |
| 1179 | ); | |
| 1180 | try bw.flush(); | |
| 1181 | ||
| 1182 | render_progress.end(); | |
| 1183 | } | |
| 1184 | ||
| 1185 | fn usageAndExit(file: fs.File, arg0: []const u8, code: u8) noreturn { | |
| 1186 | file.writer().print( | |
| 1187 | \\Usage: {s} /path/to/llvm-tblgen /path/git/llvm-project /path/git/zig | |
| 1188 | \\ | |
| 1189 | \\Updates lib/std/target/<target>.zig from llvm/lib/Target/<Target>/<Target>.td . | |
| 1190 | \\ | |
| 1191 | \\On a less beefy system, or when debugging, compile with --single-threaded. | |
| 1192 | \\ | |
| 1193 | , .{arg0}) catch std.process.exit(1); | |
| 1194 | std.process.exit(code); | |
| 1195 | } | |
| 1196 | ||
| 1197 | fn featureLessThan(context: void, a: Feature, b: Feature) bool { | |
| 1198 | return std.ascii.lessThanIgnoreCase(a.zig_name, b.zig_name); | |
| 1199 | } | |
| 1200 | ||
| 1201 | fn cpuLessThan(context: void, a: Cpu, b: Cpu) bool { | |
| 1202 | return std.ascii.lessThanIgnoreCase(a.zig_name, b.zig_name); | |
| 1203 | } | |
| 1204 | ||
| 1205 | fn asciiLessThan(context: void, a: []const u8, b: []const u8) bool { | |
| 1206 | return std.ascii.lessThanIgnoreCase(a, b); | |
| 1207 | } | |
| 1208 | ||
| 1209 | fn llvmNameToZigName(arena: *mem.Allocator, llvm_name: []const u8) ![]const u8 { | |
| 1210 | const duped = try arena.dupe(u8, llvm_name); | |
| 1211 | for (duped) |*byte| switch (byte.*) { | |
| 1212 | '-', '.' => byte.* = '_', | |
| 1213 | else => continue, | |
| 1214 | }; | |
| 1215 | return duped; | |
| 1216 | } | |
| 1217 | ||
| 1218 | fn llvmNameToZigNameOmit( | |
| 1219 | arena: *mem.Allocator, | |
| 1220 | llvm_target: LlvmTarget, | |
| 1221 | llvm_name: []const u8, | |
| 1222 | ) !?[]const u8 { | |
| 1223 | for (llvm_target.feature_overrides) |feature_override| { | |
| 1224 | if (mem.eql(u8, feature_override.llvm_name, llvm_name)) { | |
| 1225 | if (feature_override.omit) return null; | |
| 1226 | return feature_override.zig_name orelse break; | |
| 1227 | } | |
| 1228 | } | |
| 1229 | return try llvmNameToZigName(arena, llvm_name); | |
| 1230 | } | |
| 1231 | ||
| 1232 | fn hasSuperclass(obj: *json.ObjectMap, class_name: []const u8) bool { | |
| 1233 | const superclasses_json = obj.get("!superclasses") orelse return false; | |
| 1234 | for (superclasses_json.Array.items) |superclass_json| { | |
| 1235 | const superclass = superclass_json.String; | |
| 1236 | if (std.mem.eql(u8, superclass, class_name)) { | |
| 1237 | return true; | |
| 1238 | } | |
| 1239 | } | |
| 1240 | return false; | |
| 1241 | } | |
| 1242 | ||
| 1243 | fn pruneFeatures( | |
| 1244 | arena: *mem.Allocator, | |
| 1245 | features_table: std.StringHashMap(Feature), | |
| 1246 | deps_set: *std.StringHashMap(void), | |
| 1247 | ) !void { | |
| 1248 | // For each element, recursively iterate over the dependencies and add | |
| 1249 | // everything we find to a "deletion set". | |
| 1250 | // Then, iterate over the deletion set and delete all that stuff from `deps_set`. | |
| 1251 | var deletion_set = std.StringHashMap(void).init(arena); | |
| 1252 | { | |
| 1253 | var it = deps_set.iterator(); | |
| 1254 | while (it.next()) |entry| { | |
| 1255 | const feature = features_table.get(entry.key).?; | |
| 1256 | try walkFeatures(features_table, &deletion_set, feature); | |
| 1257 | } | |
| 1258 | } | |
| 1259 | { | |
| 1260 | var it = deletion_set.iterator(); | |
| 1261 | while (it.next()) |entry| { | |
| 1262 | _ = deps_set.remove(entry.key); | |
| 1263 | } | |
| 1264 | } | |
| 1265 | } | |
| 1266 | ||
| 1267 | fn walkFeatures( | |
| 1268 | features_table: std.StringHashMap(Feature), | |
| 1269 | deletion_set: *std.StringHashMap(void), | |
| 1270 | feature: Feature, | |
| 1271 | ) error{OutOfMemory}!void { | |
| 1272 | for (feature.deps) |dep| { | |
| 1273 | try deletion_set.put(dep, {}); | |
| 1274 | const other_feature = features_table.get(dep).?; | |
| 1275 | try walkFeatures(features_table, deletion_set, other_feature); | |
| 1276 | } | |
| 1277 | } | |
| 1278 | ||
| 1279 | fn putDep( | |
| 1280 | deps_set: *std.StringHashMap(void), | |
| 1281 | features_table: std.StringHashMap(Feature), | |
| 1282 | zig_feature_name: []const u8, | |
| 1283 | ) error{OutOfMemory}!void { | |
| 1284 | const feature = features_table.get(zig_feature_name).?; | |
| 1285 | if (feature.flatten) { | |
| 1286 | for (feature.deps) |dep| { | |
| 1287 | try putDep(deps_set, features_table, dep); | |
| 1288 | } | |
| 1289 | } else { | |
| 1290 | try deps_set.put(zig_feature_name, {}); | |
| 1291 | } | |
| 1292 | } |