Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
c++ source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
6502-c++ 11.1.0
ARM GCC 10.2.0
ARM GCC 10.3.0
ARM GCC 10.4.0
ARM GCC 10.5.0
ARM GCC 11.1.0
ARM GCC 11.2.0
ARM GCC 11.3.0
ARM GCC 11.4.0
ARM GCC 12.1.0
ARM GCC 12.2.0
ARM GCC 12.3.0
ARM GCC 12.4.0
ARM GCC 13.1.0
ARM GCC 13.2.0
ARM GCC 13.2.0 (unknown-eabi)
ARM GCC 13.3.0
ARM GCC 13.3.0 (unknown-eabi)
ARM GCC 14.1.0
ARM GCC 14.1.0 (unknown-eabi)
ARM GCC 14.2.0
ARM GCC 14.2.0 (unknown-eabi)
ARM GCC 4.5.4
ARM GCC 4.6.4
ARM GCC 5.4
ARM GCC 6.3.0
ARM GCC 6.4.0
ARM GCC 7.3.0
ARM GCC 7.5.0
ARM GCC 8.2.0
ARM GCC 8.5.0
ARM GCC 9.3.0
ARM GCC 9.4.0
ARM GCC 9.5.0
ARM GCC trunk
ARM gcc 10.2.1 (none)
ARM gcc 10.3.1 (2021.07 none)
ARM gcc 10.3.1 (2021.10 none)
ARM gcc 11.2.1 (none)
ARM gcc 5.4.1 (none)
ARM gcc 7.2.1 (none)
ARM gcc 8.2 (WinCE)
ARM gcc 8.3.1 (none)
ARM gcc 9.2.1 (none)
ARM msvc v19.0 (WINE)
ARM msvc v19.10 (WINE)
ARM msvc v19.14 (WINE)
ARM64 Morello gcc 10.1 Alpha 2
ARM64 gcc 10.2
ARM64 gcc 10.3
ARM64 gcc 10.4
ARM64 gcc 10.5.0
ARM64 gcc 11.1
ARM64 gcc 11.2
ARM64 gcc 11.3
ARM64 gcc 11.4.0
ARM64 gcc 12.1
ARM64 gcc 12.2.0
ARM64 gcc 12.3.0
ARM64 gcc 12.4.0
ARM64 gcc 13.1.0
ARM64 gcc 13.2.0
ARM64 gcc 13.3.0
ARM64 gcc 14.1.0
ARM64 gcc 14.2.0
ARM64 gcc 4.9.4
ARM64 gcc 5.4
ARM64 gcc 5.5.0
ARM64 gcc 6.3
ARM64 gcc 6.4
ARM64 gcc 7.3
ARM64 gcc 7.5
ARM64 gcc 8.2
ARM64 gcc 8.5
ARM64 gcc 9.3
ARM64 gcc 9.4
ARM64 gcc 9.5
ARM64 gcc trunk
ARM64 msvc v19.14 (WINE)
AVR gcc 10.3.0
AVR gcc 11.1.0
AVR gcc 12.1.0
AVR gcc 12.2.0
AVR gcc 12.3.0
AVR gcc 12.4.0
AVR gcc 13.1.0
AVR gcc 13.2.0
AVR gcc 13.3.0
AVR gcc 14.1.0
AVR gcc 14.2.0
AVR gcc 4.5.4
AVR gcc 4.6.4
AVR gcc 5.4.0
AVR gcc 9.2.0
AVR gcc 9.3.0
Arduino Mega (1.8.9)
Arduino Uno (1.8.9)
BPF clang (trunk)
BPF clang 13.0.0
BPF clang 14.0.0
BPF clang 15.0.0
BPF clang 16.0.0
BPF clang 17.0.1
BPF clang 18.1.0
BPF clang 19.1.0
EDG (experimental reflection)
EDG 6.5
EDG 6.5 (GNU mode gcc 13)
EDG 6.6
EDG 6.6 (GNU mode gcc 13)
FRC 2019
FRC 2020
FRC 2023
HPPA gcc 14.2.0
KVX ACB 4.1.0 (GCC 7.5.0)
KVX ACB 4.1.0-cd1 (GCC 7.5.0)
KVX ACB 4.10.0 (GCC 10.3.1)
KVX ACB 4.11.1 (GCC 10.3.1)
KVX ACB 4.12.0 (GCC 11.3.0)
KVX ACB 4.2.0 (GCC 7.5.0)
KVX ACB 4.3.0 (GCC 7.5.0)
KVX ACB 4.4.0 (GCC 7.5.0)
KVX ACB 4.6.0 (GCC 9.4.1)
KVX ACB 4.8.0 (GCC 9.4.1)
KVX ACB 4.9.0 (GCC 9.4.1)
KVX ACB 5.0.0 (GCC 12.2.1)
KVX ACB 5.2.0 (GCC 13.2.1)
LoongArch64 clang (trunk)
LoongArch64 clang 17.0.1
LoongArch64 clang 18.1.0
LoongArch64 clang 19.1.0
M68K gcc 13.1.0
M68K gcc 13.2.0
M68K gcc 13.3.0
M68K gcc 14.1.0
M68K gcc 14.2.0
M68k clang (trunk)
MRISC32 gcc (trunk)
MSP430 gcc 4.5.3
MSP430 gcc 5.3.0
MSP430 gcc 6.2.1
MinGW clang 14.0.3
MinGW clang 14.0.6
MinGW clang 15.0.7
MinGW clang 16.0.0
MinGW clang 16.0.2
MinGW gcc 11.3.0
MinGW gcc 12.1.0
MinGW gcc 12.2.0
MinGW gcc 13.1.0
RISC-V (32-bits) gcc (trunk)
RISC-V (32-bits) gcc 10.2.0
RISC-V (32-bits) gcc 10.3.0
RISC-V (32-bits) gcc 11.2.0
RISC-V (32-bits) gcc 11.3.0
RISC-V (32-bits) gcc 11.4.0
RISC-V (32-bits) gcc 12.1.0
RISC-V (32-bits) gcc 12.2.0
RISC-V (32-bits) gcc 12.3.0
RISC-V (32-bits) gcc 12.4.0
RISC-V (32-bits) gcc 13.1.0
RISC-V (32-bits) gcc 13.2.0
RISC-V (32-bits) gcc 13.3.0
RISC-V (32-bits) gcc 14.1.0
RISC-V (32-bits) gcc 14.2.0
RISC-V (32-bits) gcc 8.2.0
RISC-V (32-bits) gcc 8.5.0
RISC-V (32-bits) gcc 9.4.0
RISC-V (64-bits) gcc (trunk)
RISC-V (64-bits) gcc 10.2.0
RISC-V (64-bits) gcc 10.3.0
RISC-V (64-bits) gcc 11.2.0
RISC-V (64-bits) gcc 11.3.0
RISC-V (64-bits) gcc 11.4.0
RISC-V (64-bits) gcc 12.1.0
RISC-V (64-bits) gcc 12.2.0
RISC-V (64-bits) gcc 12.3.0
RISC-V (64-bits) gcc 12.4.0
RISC-V (64-bits) gcc 13.1.0
RISC-V (64-bits) gcc 13.2.0
RISC-V (64-bits) gcc 13.3.0
RISC-V (64-bits) gcc 14.1.0
RISC-V (64-bits) gcc 14.2.0
RISC-V (64-bits) gcc 8.2.0
RISC-V (64-bits) gcc 8.5.0
RISC-V (64-bits) gcc 9.4.0
RISC-V rv32gc clang (trunk)
RISC-V rv32gc clang 10.0.0
RISC-V rv32gc clang 10.0.1
RISC-V rv32gc clang 11.0.0
RISC-V rv32gc clang 11.0.1
RISC-V rv32gc clang 12.0.0
RISC-V rv32gc clang 12.0.1
RISC-V rv32gc clang 13.0.0
RISC-V rv32gc clang 13.0.1
RISC-V rv32gc clang 14.0.0
RISC-V rv32gc clang 15.0.0
RISC-V rv32gc clang 16.0.0
RISC-V rv32gc clang 17.0.1
RISC-V rv32gc clang 18.1.0
RISC-V rv32gc clang 19.1.0
RISC-V rv32gc clang 9.0.0
RISC-V rv32gc clang 9.0.1
RISC-V rv64gc clang (trunk)
RISC-V rv64gc clang 10.0.0
RISC-V rv64gc clang 10.0.1
RISC-V rv64gc clang 11.0.0
RISC-V rv64gc clang 11.0.1
RISC-V rv64gc clang 12.0.0
RISC-V rv64gc clang 12.0.1
RISC-V rv64gc clang 13.0.0
RISC-V rv64gc clang 13.0.1
RISC-V rv64gc clang 14.0.0
RISC-V rv64gc clang 15.0.0
RISC-V rv64gc clang 16.0.0
RISC-V rv64gc clang 17.0.1
RISC-V rv64gc clang 18.1.0
RISC-V rv64gc clang 19.1.0
RISC-V rv64gc clang 9.0.0
RISC-V rv64gc clang 9.0.1
Raspbian Buster
Raspbian Stretch
SPARC LEON gcc 12.2.0
SPARC LEON gcc 12.3.0
SPARC LEON gcc 12.4.0
SPARC LEON gcc 13.1.0
SPARC LEON gcc 13.2.0
SPARC LEON gcc 13.3.0
SPARC LEON gcc 14.1.0
SPARC LEON gcc 14.2.0
SPARC gcc 12.2.0
SPARC gcc 12.3.0
SPARC gcc 12.4.0
SPARC gcc 13.1.0
SPARC gcc 13.2.0
SPARC gcc 13.3.0
SPARC gcc 14.1.0
SPARC gcc 14.2.0
SPARC64 gcc 12.2.0
SPARC64 gcc 12.3.0
SPARC64 gcc 12.4.0
SPARC64 gcc 13.1.0
SPARC64 gcc 13.2.0
SPARC64 gcc 13.3.0
SPARC64 gcc 14.1.0
SPARC64 gcc 14.2.0
TI C6x gcc 12.2.0
TI C6x gcc 12.3.0
TI C6x gcc 12.4.0
TI C6x gcc 13.1.0
TI C6x gcc 13.2.0
TI C6x gcc 13.3.0
TI C6x gcc 14.1.0
TI C6x gcc 14.2.0
TI CL430 21.6.1
VAX gcc NetBSDELF 10.4.0
VAX gcc NetBSDELF 10.5.0 (Nov 15 03:50:22 2023)
WebAssembly clang (trunk)
Xtensa ESP32 gcc 11.2.0 (2022r1)
Xtensa ESP32 gcc 12.2.0 (20230208)
Xtensa ESP32 gcc 8.2.0 (2019r2)
Xtensa ESP32 gcc 8.2.0 (2020r1)
Xtensa ESP32 gcc 8.2.0 (2020r2)
Xtensa ESP32 gcc 8.4.0 (2020r3)
Xtensa ESP32 gcc 8.4.0 (2021r1)
Xtensa ESP32 gcc 8.4.0 (2021r2)
Xtensa ESP32-S2 gcc 11.2.0 (2022r1)
Xtensa ESP32-S2 gcc 12.2.0 (20230208)
Xtensa ESP32-S2 gcc 8.2.0 (2019r2)
Xtensa ESP32-S2 gcc 8.2.0 (2020r1)
Xtensa ESP32-S2 gcc 8.2.0 (2020r2)
Xtensa ESP32-S2 gcc 8.4.0 (2020r3)
Xtensa ESP32-S2 gcc 8.4.0 (2021r1)
Xtensa ESP32-S2 gcc 8.4.0 (2021r2)
Xtensa ESP32-S3 gcc 11.2.0 (2022r1)
Xtensa ESP32-S3 gcc 12.2.0 (20230208)
Xtensa ESP32-S3 gcc 8.4.0 (2020r3)
Xtensa ESP32-S3 gcc 8.4.0 (2021r1)
Xtensa ESP32-S3 gcc 8.4.0 (2021r2)
arm64 msvc v19.20 VS16.0
arm64 msvc v19.21 VS16.1
arm64 msvc v19.22 VS16.2
arm64 msvc v19.23 VS16.3
arm64 msvc v19.24 VS16.4
arm64 msvc v19.25 VS16.5
arm64 msvc v19.27 VS16.7
arm64 msvc v19.28 VS16.8
arm64 msvc v19.28 VS16.9
arm64 msvc v19.29 VS16.10
arm64 msvc v19.29 VS16.11
arm64 msvc v19.30 VS17.0
arm64 msvc v19.31 VS17.1
arm64 msvc v19.32 VS17.2
arm64 msvc v19.33 VS17.3
arm64 msvc v19.34 VS17.4
arm64 msvc v19.35 VS17.5
arm64 msvc v19.36 VS17.6
arm64 msvc v19.37 VS17.7
arm64 msvc v19.38 VS17.8
arm64 msvc v19.39 VS17.9
arm64 msvc v19.40 VS17.10
arm64 msvc v19.latest
armv7-a clang (trunk)
armv7-a clang 10.0.0
armv7-a clang 10.0.1
armv7-a clang 11.0.0
armv7-a clang 11.0.1
armv7-a clang 12.0.0
armv7-a clang 12.0.1
armv7-a clang 13.0.0
armv7-a clang 13.0.1
armv7-a clang 14.0.0
armv7-a clang 15.0.0
armv7-a clang 16.0.0
armv7-a clang 17.0.1
armv7-a clang 18.1.0
armv7-a clang 19.1.0
armv7-a clang 9.0.0
armv7-a clang 9.0.1
armv8-a clang (all architectural features, trunk)
armv8-a clang (trunk)
armv8-a clang 10.0.0
armv8-a clang 10.0.1
armv8-a clang 11.0.0
armv8-a clang 11.0.1
armv8-a clang 12.0.0
armv8-a clang 13.0.0
armv8-a clang 14.0.0
armv8-a clang 15.0.0
armv8-a clang 16.0.0
armv8-a clang 17.0.1
armv8-a clang 18.1.0
armv8-a clang 19.1.0
armv8-a clang 9.0.0
armv8-a clang 9.0.1
clang-cl 18.1.0
ellcc 0.1.33
ellcc 0.1.34
ellcc 2017-07-16
hexagon-clang 16.0.5
llvm-mos atari2600-3e
llvm-mos atari2600-4k
llvm-mos atari2600-common
llvm-mos atari5200-supercart
llvm-mos atari8-cart-megacart
llvm-mos atari8-cart-std
llvm-mos atari8-cart-xegs
llvm-mos atari8-common
llvm-mos atari8-dos
llvm-mos c128
llvm-mos c64
llvm-mos commodore
llvm-mos cpm65
llvm-mos cx16
llvm-mos dodo
llvm-mos eater
llvm-mos mega65
llvm-mos nes
llvm-mos nes-action53
llvm-mos nes-cnrom
llvm-mos nes-gtrom
llvm-mos nes-mmc1
llvm-mos nes-mmc3
llvm-mos nes-nrom
llvm-mos nes-unrom
llvm-mos nes-unrom-512
llvm-mos osi-c1p
llvm-mos pce
llvm-mos pce-cd
llvm-mos pce-common
llvm-mos pet
llvm-mos rp6502
llvm-mos rpc8e
llvm-mos supervision
llvm-mos vic20
loongarch64 gcc 12.2.0
loongarch64 gcc 12.3.0
loongarch64 gcc 12.4.0
loongarch64 gcc 13.1.0
loongarch64 gcc 13.2.0
loongarch64 gcc 13.3.0
loongarch64 gcc 14.1.0
loongarch64 gcc 14.2.0
mips clang 13.0.0
mips clang 14.0.0
mips clang 15.0.0
mips clang 16.0.0
mips clang 17.0.1
mips clang 18.1.0
mips clang 19.1.0
mips gcc 11.2.0
mips gcc 12.1.0
mips gcc 12.2.0
mips gcc 12.3.0
mips gcc 12.4.0
mips gcc 13.1.0
mips gcc 13.2.0
mips gcc 13.3.0
mips gcc 14.1.0
mips gcc 14.2.0
mips gcc 4.9.4
mips gcc 5.4
mips gcc 5.5.0
mips gcc 9.3.0 (codescape)
mips gcc 9.5.0
mips64 (el) gcc 12.1.0
mips64 (el) gcc 12.2.0
mips64 (el) gcc 12.3.0
mips64 (el) gcc 12.4.0
mips64 (el) gcc 13.1.0
mips64 (el) gcc 13.2.0
mips64 (el) gcc 13.3.0
mips64 (el) gcc 14.1.0
mips64 (el) gcc 14.2.0
mips64 (el) gcc 4.9.4
mips64 (el) gcc 5.4.0
mips64 (el) gcc 5.5.0
mips64 (el) gcc 9.5.0
mips64 clang 13.0.0
mips64 clang 14.0.0
mips64 clang 15.0.0
mips64 clang 16.0.0
mips64 clang 17.0.1
mips64 clang 18.1.0
mips64 clang 19.1.0
mips64 gcc 11.2.0
mips64 gcc 12.1.0
mips64 gcc 12.2.0
mips64 gcc 12.3.0
mips64 gcc 12.4.0
mips64 gcc 13.1.0
mips64 gcc 13.2.0
mips64 gcc 13.3.0
mips64 gcc 14.1.0
mips64 gcc 14.2.0
mips64 gcc 4.9.4
mips64 gcc 5.4.0
mips64 gcc 5.5.0
mips64 gcc 9.5.0
mips64el clang 13.0.0
mips64el clang 14.0.0
mips64el clang 15.0.0
mips64el clang 16.0.0
mips64el clang 17.0.1
mips64el clang 18.1.0
mips64el clang 19.1.0
mipsel clang 13.0.0
mipsel clang 14.0.0
mipsel clang 15.0.0
mipsel clang 16.0.0
mipsel clang 17.0.1
mipsel clang 18.1.0
mipsel clang 19.1.0
mipsel gcc 12.1.0
mipsel gcc 12.2.0
mipsel gcc 12.3.0
mipsel gcc 12.4.0
mipsel gcc 13.1.0
mipsel gcc 13.2.0
mipsel gcc 13.3.0
mipsel gcc 14.1.0
mipsel gcc 14.2.0
mipsel gcc 4.9.4
mipsel gcc 5.4.0
mipsel gcc 5.5.0
mipsel gcc 9.5.0
nanoMIPS gcc 6.3.0 (mtk)
power gcc 11.2.0
power gcc 12.1.0
power gcc 12.2.0
power gcc 12.3.0
power gcc 12.4.0
power gcc 13.1.0
power gcc 13.2.0
power gcc 13.3.0
power gcc 14.1.0
power gcc 14.2.0
power gcc 4.8.5
power64 AT12.0 (gcc8)
power64 AT13.0 (gcc9)
power64 gcc 11.2.0
power64 gcc 12.1.0
power64 gcc 12.2.0
power64 gcc 12.3.0
power64 gcc 12.4.0
power64 gcc 13.1.0
power64 gcc 13.2.0
power64 gcc 13.3.0
power64 gcc 14.1.0
power64 gcc 14.2.0
power64 gcc trunk
power64le AT12.0 (gcc8)
power64le AT13.0 (gcc9)
power64le clang (trunk)
power64le gcc 11.2.0
power64le gcc 12.1.0
power64le gcc 12.2.0
power64le gcc 12.3.0
power64le gcc 12.4.0
power64le gcc 13.1.0
power64le gcc 13.2.0
power64le gcc 13.3.0
power64le gcc 14.1.0
power64le gcc 14.2.0
power64le gcc 6.3.0
power64le gcc trunk
powerpc64 clang (trunk)
qnx 8.0.0
s390x gcc 11.2.0
s390x gcc 12.1.0
s390x gcc 12.2.0
s390x gcc 12.3.0
s390x gcc 12.4.0
s390x gcc 13.1.0
s390x gcc 13.2.0
s390x gcc 13.3.0
s390x gcc 14.1.0
s390x gcc 14.2.0
sh gcc 12.2.0
sh gcc 12.3.0
sh gcc 12.4.0
sh gcc 13.1.0
sh gcc 13.2.0
sh gcc 13.3.0
sh gcc 14.1.0
sh gcc 14.2.0
sh gcc 4.9.4
sh gcc 9.5.0
vast (trunk)
x64 msvc v19.0 (WINE)
x64 msvc v19.10 (WINE)
x64 msvc v19.14 (WINE)
x64 msvc v19.20 VS16.0
x64 msvc v19.21 VS16.1
x64 msvc v19.22 VS16.2
x64 msvc v19.23 VS16.3
x64 msvc v19.24 VS16.4
x64 msvc v19.25 VS16.5
x64 msvc v19.27 VS16.7
x64 msvc v19.28 VS16.8
x64 msvc v19.28 VS16.9
x64 msvc v19.29 VS16.10
x64 msvc v19.29 VS16.11
x64 msvc v19.30 VS17.0
x64 msvc v19.31 VS17.1
x64 msvc v19.32 VS17.2
x64 msvc v19.33 VS17.3
x64 msvc v19.34 VS17.4
x64 msvc v19.35 VS17.5
x64 msvc v19.36 VS17.6
x64 msvc v19.37 VS17.7
x64 msvc v19.38 VS17.8
x64 msvc v19.39 VS17.9
x64 msvc v19.40 VS17.10
x64 msvc v19.latest
x86 djgpp 4.9.4
x86 djgpp 5.5.0
x86 djgpp 6.4.0
x86 djgpp 7.2.0
x86 msvc v19.0 (WINE)
x86 msvc v19.10 (WINE)
x86 msvc v19.14 (WINE)
x86 msvc v19.20 VS16.0
x86 msvc v19.21 VS16.1
x86 msvc v19.22 VS16.2
x86 msvc v19.23 VS16.3
x86 msvc v19.24 VS16.4
x86 msvc v19.25 VS16.5
x86 msvc v19.27 VS16.7
x86 msvc v19.28 VS16.8
x86 msvc v19.28 VS16.9
x86 msvc v19.29 VS16.10
x86 msvc v19.29 VS16.11
x86 msvc v19.30 VS17.0
x86 msvc v19.31 VS17.1
x86 msvc v19.32 VS17.2
x86 msvc v19.33 VS17.3
x86 msvc v19.34 VS17.4
x86 msvc v19.35 VS17.5
x86 msvc v19.36 VS17.6
x86 msvc v19.37 VS17.7
x86 msvc v19.38 VS17.8
x86 msvc v19.39 VS17.9
x86 msvc v19.40 VS17.10
x86 msvc v19.latest
x86 nvc++ 22.11
x86 nvc++ 22.7
x86 nvc++ 22.9
x86 nvc++ 23.1
x86 nvc++ 23.11
x86 nvc++ 23.3
x86 nvc++ 23.5
x86 nvc++ 23.7
x86 nvc++ 23.9
x86 nvc++ 24.1
x86 nvc++ 24.11
x86 nvc++ 24.3
x86 nvc++ 24.5
x86 nvc++ 24.7
x86 nvc++ 24.9
x86-64 Zapcc 190308
x86-64 clang (Chris Bazley N3089)
x86-64 clang (EricWF contracts)
x86-64 clang (amd-staging)
x86-64 clang (assertions trunk)
x86-64 clang (clangir)
x86-64 clang (dascandy contracts)
x86-64 clang (experimental -Wlifetime)
x86-64 clang (experimental P1061)
x86-64 clang (experimental P1144)
x86-64 clang (experimental P1221)
x86-64 clang (experimental P2996)
x86-64 clang (experimental P2998)
x86-64 clang (experimental P3068)
x86-64 clang (experimental P3309)
x86-64 clang (experimental P3367)
x86-64 clang (experimental P3372)
x86-64 clang (experimental metaprogramming - P2632)
x86-64 clang (old concepts branch)
x86-64 clang (p1974)
x86-64 clang (pattern matching - P2688)
x86-64 clang (reflection)
x86-64 clang (resugar)
x86-64 clang (string interpolation - P3412)
x86-64 clang (thephd.dev)
x86-64 clang (trunk)
x86-64 clang (variadic friends - P2893)
x86-64 clang (widberg)
x86-64 clang 10.0.0
x86-64 clang 10.0.0 (assertions)
x86-64 clang 10.0.1
x86-64 clang 11.0.0
x86-64 clang 11.0.0 (assertions)
x86-64 clang 11.0.1
x86-64 clang 12.0.0
x86-64 clang 12.0.0 (assertions)
x86-64 clang 12.0.1
x86-64 clang 13.0.0
x86-64 clang 13.0.0 (assertions)
x86-64 clang 13.0.1
x86-64 clang 14.0.0
x86-64 clang 14.0.0 (assertions)
x86-64 clang 15.0.0
x86-64 clang 15.0.0 (assertions)
x86-64 clang 16.0.0
x86-64 clang 16.0.0 (assertions)
x86-64 clang 17.0.1
x86-64 clang 17.0.1 (assertions)
x86-64 clang 18.1.0
x86-64 clang 18.1.0 (assertions)
x86-64 clang 18.1.0 (clad 1.8)
x86-64 clang 19.1.0
x86-64 clang 19.1.0 (assertions)
x86-64 clang 2.6.0 (assertions)
x86-64 clang 2.7.0 (assertions)
x86-64 clang 2.8.0 (assertions)
x86-64 clang 2.9.0 (assertions)
x86-64 clang 3.0.0
x86-64 clang 3.0.0 (assertions)
x86-64 clang 3.1
x86-64 clang 3.1 (assertions)
x86-64 clang 3.2
x86-64 clang 3.2 (assertions)
x86-64 clang 3.3
x86-64 clang 3.3 (assertions)
x86-64 clang 3.4 (assertions)
x86-64 clang 3.4.1
x86-64 clang 3.5
x86-64 clang 3.5 (assertions)
x86-64 clang 3.5.1
x86-64 clang 3.5.2
x86-64 clang 3.6
x86-64 clang 3.6 (assertions)
x86-64 clang 3.7
x86-64 clang 3.7 (assertions)
x86-64 clang 3.7.1
x86-64 clang 3.8
x86-64 clang 3.8 (assertions)
x86-64 clang 3.8.1
x86-64 clang 3.9.0
x86-64 clang 3.9.0 (assertions)
x86-64 clang 3.9.1
x86-64 clang 4.0.0
x86-64 clang 4.0.0 (assertions)
x86-64 clang 4.0.1
x86-64 clang 5.0.0
x86-64 clang 5.0.0 (assertions)
x86-64 clang 5.0.1
x86-64 clang 5.0.2
x86-64 clang 6.0.0
x86-64 clang 6.0.0 (assertions)
x86-64 clang 6.0.1
x86-64 clang 7.0.0
x86-64 clang 7.0.0 (assertions)
x86-64 clang 7.0.1
x86-64 clang 7.1.0
x86-64 clang 8.0.0
x86-64 clang 8.0.0 (assertions)
x86-64 clang 8.0.1
x86-64 clang 9.0.0
x86-64 clang 9.0.0 (assertions)
x86-64 clang 9.0.1
x86-64 clang rocm-4.5.2
x86-64 clang rocm-5.0.2
x86-64 clang rocm-5.1.3
x86-64 clang rocm-5.2.3
x86-64 clang rocm-5.3.3
x86-64 clang rocm-5.7.0
x86-64 clang rocm-6.0.2
x86-64 clang rocm-6.1.2
x86-64 gcc (contract labels)
x86-64 gcc (contracts natural syntax)
x86-64 gcc (contracts)
x86-64 gcc (coroutines)
x86-64 gcc (modules)
x86-64 gcc (trunk)
x86-64 gcc 10.1
x86-64 gcc 10.2
x86-64 gcc 10.3
x86-64 gcc 10.3 (assertions)
x86-64 gcc 10.4
x86-64 gcc 10.4 (assertions)
x86-64 gcc 10.5
x86-64 gcc 10.5 (assertions)
x86-64 gcc 11.1
x86-64 gcc 11.1 (assertions)
x86-64 gcc 11.2
x86-64 gcc 11.2 (assertions)
x86-64 gcc 11.3
x86-64 gcc 11.3 (assertions)
x86-64 gcc 11.4
x86-64 gcc 11.4 (assertions)
x86-64 gcc 12.1
x86-64 gcc 12.1 (assertions)
x86-64 gcc 12.2
x86-64 gcc 12.2 (assertions)
x86-64 gcc 12.3
x86-64 gcc 12.3 (assertions)
x86-64 gcc 12.4
x86-64 gcc 12.4 (assertions)
x86-64 gcc 13.1
x86-64 gcc 13.1 (assertions)
x86-64 gcc 13.2
x86-64 gcc 13.2 (assertions)
x86-64 gcc 13.3
x86-64 gcc 13.3 (assertions)
x86-64 gcc 14.1
x86-64 gcc 14.1 (assertions)
x86-64 gcc 14.2
x86-64 gcc 14.2 (assertions)
x86-64 gcc 3.4.6
x86-64 gcc 4.0.4
x86-64 gcc 4.1.2
x86-64 gcc 4.4.7
x86-64 gcc 4.5.3
x86-64 gcc 4.6.4
x86-64 gcc 4.7.1
x86-64 gcc 4.7.2
x86-64 gcc 4.7.3
x86-64 gcc 4.7.4
x86-64 gcc 4.8.1
x86-64 gcc 4.8.2
x86-64 gcc 4.8.3
x86-64 gcc 4.8.4
x86-64 gcc 4.8.5
x86-64 gcc 4.9.0
x86-64 gcc 4.9.1
x86-64 gcc 4.9.2
x86-64 gcc 4.9.3
x86-64 gcc 4.9.4
x86-64 gcc 5.1
x86-64 gcc 5.2
x86-64 gcc 5.3
x86-64 gcc 5.4
x86-64 gcc 5.5
x86-64 gcc 6.1
x86-64 gcc 6.2
x86-64 gcc 6.3
x86-64 gcc 6.4
x86-64 gcc 6.5
x86-64 gcc 7.1
x86-64 gcc 7.2
x86-64 gcc 7.3
x86-64 gcc 7.4
x86-64 gcc 7.5
x86-64 gcc 8.1
x86-64 gcc 8.2
x86-64 gcc 8.3
x86-64 gcc 8.4
x86-64 gcc 8.5
x86-64 gcc 9.1
x86-64 gcc 9.2
x86-64 gcc 9.3
x86-64 gcc 9.4
x86-64 gcc 9.5
x86-64 icc 13.0.1
x86-64 icc 16.0.3
x86-64 icc 17.0.0
x86-64 icc 18.0.0
x86-64 icc 19.0.0
x86-64 icc 19.0.1
x86-64 icc 2021.1.2
x86-64 icc 2021.10.0
x86-64 icc 2021.2.0
x86-64 icc 2021.3.0
x86-64 icc 2021.4.0
x86-64 icc 2021.5.0
x86-64 icc 2021.6.0
x86-64 icc 2021.7.0
x86-64 icc 2021.7.1
x86-64 icc 2021.8.0
x86-64 icc 2021.9.0
x86-64 icx 2021.1.2
x86-64 icx 2021.2.0
x86-64 icx 2021.3.0
x86-64 icx 2021.4.0
x86-64 icx 2022.0.0
x86-64 icx 2022.1.0
x86-64 icx 2022.2.0
x86-64 icx 2022.2.1
x86-64 icx 2023.0.0
x86-64 icx 2023.1.0
x86-64 icx 2023.2.1
x86-64 icx 2024.0.0
x86-64 icx 2024.1.0
x86-64 icx 2024.2.0
x86-64 icx 2025.0.0
x86-64 icx 2025.0.0
zig c++ 0.10.0
zig c++ 0.11.0
zig c++ 0.12.0
zig c++ 0.12.1
zig c++ 0.13.0
zig c++ 0.6.0
zig c++ 0.7.0
zig c++ 0.7.1
zig c++ 0.8.0
zig c++ 0.9.0
zig c++ trunk
Options
Source code
#include <assert.h> #include <immintrin.h> #include <stdint.h> #include <sys/random.h> #include <immintrin.h> #include <stdint.h> template <uint8_t Imm> static __m128i tern(__m128i a, __m128i b, __m128i c, __m128i d) { return _mm_ternarylogic_epi32(a, b, c, Imm); } template <uint8_t Imm> static __m128i tern_asm(__m128i a, __m128i b, __m128i c, __m128i d) { __asm__ volatile("vpternlogd %[Imm], %[c], %[b], %[a]\n" : [a] "+v"(a) : [b] "v"(b), [c] "v"(c), [Imm] "i"(Imm) :); return a; } __attribute__((noinline)) __m128i ternN(__m128i a, __m128i b, __m128i c, __m128i d, uint8_t Imm) { switch (Imm) { case 0x0: return tern<0x0>(a, b, c, d); case 0x1: return tern<0x1>(a, b, c, d); case 0x2: return tern<0x2>(a, b, c, d); case 0x3: return tern<0x3>(a, b, c, d); case 0x4: return tern<0x4>(a, b, c, d); case 0x5: return tern<0x5>(a, b, c, d); case 0x6: return tern<0x6>(a, b, c, d); case 0x7: return tern<0x7>(a, b, c, d); case 0x8: return tern<0x8>(a, b, c, d); case 0x9: return tern<0x9>(a, b, c, d); case 0xa: return tern<0xa>(a, b, c, d); case 0xb: return tern<0xb>(a, b, c, d); case 0xc: return tern<0xc>(a, b, c, d); case 0xd: return tern<0xd>(a, b, c, d); case 0xe: return tern<0xe>(a, b, c, d); case 0xf: return tern<0xf>(a, b, c, d); case 0x10: return tern<0x10>(a, b, c, d); case 0x11: return tern<0x11>(a, b, c, d); case 0x12: return tern<0x12>(a, b, c, d); case 0x13: return tern<0x13>(a, b, c, d); case 0x14: return tern<0x14>(a, b, c, d); case 0x15: return tern<0x15>(a, b, c, d); case 0x16: return tern<0x16>(a, b, c, d); case 0x17: return tern<0x17>(a, b, c, d); case 0x18: return tern<0x18>(a, b, c, d); case 0x19: return tern<0x19>(a, b, c, d); case 0x1a: return tern<0x1a>(a, b, c, d); case 0x1b: return tern<0x1b>(a, b, c, d); case 0x1c: return tern<0x1c>(a, b, c, d); case 0x1d: return tern<0x1d>(a, b, c, d); case 0x1e: return tern<0x1e>(a, b, c, d); case 0x1f: return tern<0x1f>(a, b, c, d); case 0x20: return tern<0x20>(a, b, c, d); case 0x21: return tern<0x21>(a, b, c, d); case 0x22: return tern<0x22>(a, b, c, d); case 0x23: return tern<0x23>(a, b, c, d); case 0x24: return tern<0x24>(a, b, c, d); case 0x25: return tern<0x25>(a, b, c, d); case 0x26: return tern<0x26>(a, b, c, d); case 0x27: return tern<0x27>(a, b, c, d); case 0x28: return tern<0x28>(a, b, c, d); case 0x29: return tern<0x29>(a, b, c, d); case 0x2a: return tern<0x2a>(a, b, c, d); case 0x2b: return tern<0x2b>(a, b, c, d); case 0x2c: return tern<0x2c>(a, b, c, d); case 0x2d: return tern<0x2d>(a, b, c, d); case 0x2e: return tern<0x2e>(a, b, c, d); case 0x2f: return tern<0x2f>(a, b, c, d); case 0x30: return tern<0x30>(a, b, c, d); case 0x31: return tern<0x31>(a, b, c, d); case 0x32: return tern<0x32>(a, b, c, d); case 0x33: return tern<0x33>(a, b, c, d); case 0x34: return tern<0x34>(a, b, c, d); case 0x35: return tern<0x35>(a, b, c, d); case 0x36: return tern<0x36>(a, b, c, d); case 0x37: return tern<0x37>(a, b, c, d); case 0x38: return tern<0x38>(a, b, c, d); case 0x39: return tern<0x39>(a, b, c, d); case 0x3a: return tern<0x3a>(a, b, c, d); case 0x3b: return tern<0x3b>(a, b, c, d); case 0x3c: return tern<0x3c>(a, b, c, d); case 0x3d: return tern<0x3d>(a, b, c, d); case 0x3e: return tern<0x3e>(a, b, c, d); case 0x3f: return tern<0x3f>(a, b, c, d); case 0x40: return tern<0x40>(a, b, c, d); case 0x41: return tern<0x41>(a, b, c, d); case 0x42: return tern<0x42>(a, b, c, d); case 0x43: return tern<0x43>(a, b, c, d); case 0x44: return tern<0x44>(a, b, c, d); case 0x45: return tern<0x45>(a, b, c, d); case 0x46: return tern<0x46>(a, b, c, d); case 0x47: return tern<0x47>(a, b, c, d); case 0x48: return tern<0x48>(a, b, c, d); case 0x49: return tern<0x49>(a, b, c, d); case 0x4a: return tern<0x4a>(a, b, c, d); case 0x4b: return tern<0x4b>(a, b, c, d); case 0x4c: return tern<0x4c>(a, b, c, d); case 0x4d: return tern<0x4d>(a, b, c, d); case 0x4e: return tern<0x4e>(a, b, c, d); case 0x4f: return tern<0x4f>(a, b, c, d); case 0x50: return tern<0x50>(a, b, c, d); case 0x51: return tern<0x51>(a, b, c, d); case 0x52: return tern<0x52>(a, b, c, d); case 0x53: return tern<0x53>(a, b, c, d); case 0x54: return tern<0x54>(a, b, c, d); case 0x55: return tern<0x55>(a, b, c, d); case 0x56: return tern<0x56>(a, b, c, d); case 0x57: return tern<0x57>(a, b, c, d); case 0x58: return tern<0x58>(a, b, c, d); case 0x59: return tern<0x59>(a, b, c, d); case 0x5a: return tern<0x5a>(a, b, c, d); case 0x5b: return tern<0x5b>(a, b, c, d); case 0x5c: return tern<0x5c>(a, b, c, d); case 0x5d: return tern<0x5d>(a, b, c, d); case 0x5e: return tern<0x5e>(a, b, c, d); case 0x5f: return tern<0x5f>(a, b, c, d); case 0x60: return tern<0x60>(a, b, c, d); case 0x61: return tern<0x61>(a, b, c, d); case 0x62: return tern<0x62>(a, b, c, d); case 0x63: return tern<0x63>(a, b, c, d); case 0x64: return tern<0x64>(a, b, c, d); case 0x65: return tern<0x65>(a, b, c, d); case 0x66: return tern<0x66>(a, b, c, d); case 0x67: return tern<0x67>(a, b, c, d); case 0x68: return tern<0x68>(a, b, c, d); case 0x69: return tern<0x69>(a, b, c, d); case 0x6a: return tern<0x6a>(a, b, c, d); case 0x6b: return tern<0x6b>(a, b, c, d); case 0x6c: return tern<0x6c>(a, b, c, d); case 0x6d: return tern<0x6d>(a, b, c, d); case 0x6e: return tern<0x6e>(a, b, c, d); case 0x6f: return tern<0x6f>(a, b, c, d); case 0x70: return tern<0x70>(a, b, c, d); case 0x71: return tern<0x71>(a, b, c, d); case 0x72: return tern<0x72>(a, b, c, d); case 0x73: return tern<0x73>(a, b, c, d); case 0x74: return tern<0x74>(a, b, c, d); case 0x75: return tern<0x75>(a, b, c, d); case 0x76: return tern<0x76>(a, b, c, d); case 0x77: return tern<0x77>(a, b, c, d); case 0x78: return tern<0x78>(a, b, c, d); case 0x79: return tern<0x79>(a, b, c, d); case 0x7a: return tern<0x7a>(a, b, c, d); case 0x7b: return tern<0x7b>(a, b, c, d); case 0x7c: return tern<0x7c>(a, b, c, d); case 0x7d: return tern<0x7d>(a, b, c, d); case 0x7e: return tern<0x7e>(a, b, c, d); case 0x7f: return tern<0x7f>(a, b, c, d); case 0x80: return tern<0x80>(a, b, c, d); case 0x81: return tern<0x81>(a, b, c, d); case 0x82: return tern<0x82>(a, b, c, d); case 0x83: return tern<0x83>(a, b, c, d); case 0x84: return tern<0x84>(a, b, c, d); case 0x85: return tern<0x85>(a, b, c, d); case 0x86: return tern<0x86>(a, b, c, d); case 0x87: return tern<0x87>(a, b, c, d); case 0x88: return tern<0x88>(a, b, c, d); case 0x89: return tern<0x89>(a, b, c, d); case 0x8a: return tern<0x8a>(a, b, c, d); case 0x8b: return tern<0x8b>(a, b, c, d); case 0x8c: return tern<0x8c>(a, b, c, d); case 0x8d: return tern<0x8d>(a, b, c, d); case 0x8e: return tern<0x8e>(a, b, c, d); case 0x8f: return tern<0x8f>(a, b, c, d); case 0x90: return tern<0x90>(a, b, c, d); case 0x91: return tern<0x91>(a, b, c, d); case 0x92: return tern<0x92>(a, b, c, d); case 0x93: return tern<0x93>(a, b, c, d); case 0x94: return tern<0x94>(a, b, c, d); case 0x95: return tern<0x95>(a, b, c, d); case 0x96: return tern<0x96>(a, b, c, d); case 0x97: return tern<0x97>(a, b, c, d); case 0x98: return tern<0x98>(a, b, c, d); case 0x99: return tern<0x99>(a, b, c, d); case 0x9a: return tern<0x9a>(a, b, c, d); case 0x9b: return tern<0x9b>(a, b, c, d); case 0x9c: return tern<0x9c>(a, b, c, d); case 0x9d: return tern<0x9d>(a, b, c, d); case 0x9e: return tern<0x9e>(a, b, c, d); case 0x9f: return tern<0x9f>(a, b, c, d); case 0xa0: return tern<0xa0>(a, b, c, d); case 0xa1: return tern<0xa1>(a, b, c, d); case 0xa2: return tern<0xa2>(a, b, c, d); case 0xa3: return tern<0xa3>(a, b, c, d); case 0xa4: return tern<0xa4>(a, b, c, d); case 0xa5: return tern<0xa5>(a, b, c, d); case 0xa6: return tern<0xa6>(a, b, c, d); case 0xa7: return tern<0xa7>(a, b, c, d); case 0xa8: return tern<0xa8>(a, b, c, d); case 0xa9: return tern<0xa9>(a, b, c, d); case 0xaa: return tern<0xaa>(a, b, c, d); case 0xab: return tern<0xab>(a, b, c, d); case 0xac: return tern<0xac>(a, b, c, d); case 0xad: return tern<0xad>(a, b, c, d); case 0xae: return tern<0xae>(a, b, c, d); case 0xaf: return tern<0xaf>(a, b, c, d); case 0xb0: return tern<0xb0>(a, b, c, d); case 0xb1: return tern<0xb1>(a, b, c, d); case 0xb2: return tern<0xb2>(a, b, c, d); case 0xb3: return tern<0xb3>(a, b, c, d); case 0xb4: return tern<0xb4>(a, b, c, d); case 0xb5: return tern<0xb5>(a, b, c, d); case 0xb6: return tern<0xb6>(a, b, c, d); case 0xb7: return tern<0xb7>(a, b, c, d); case 0xb8: return tern<0xb8>(a, b, c, d); case 0xb9: return tern<0xb9>(a, b, c, d); case 0xba: return tern<0xba>(a, b, c, d); case 0xbb: return tern<0xbb>(a, b, c, d); case 0xbc: return tern<0xbc>(a, b, c, d); case 0xbd: return tern<0xbd>(a, b, c, d); case 0xbe: return tern<0xbe>(a, b, c, d); case 0xbf: return tern<0xbf>(a, b, c, d); case 0xc0: return tern<0xc0>(a, b, c, d); case 0xc1: return tern<0xc1>(a, b, c, d); case 0xc2: return tern<0xc2>(a, b, c, d); case 0xc3: return tern<0xc3>(a, b, c, d); case 0xc4: return tern<0xc4>(a, b, c, d); case 0xc5: return tern<0xc5>(a, b, c, d); case 0xc6: return tern<0xc6>(a, b, c, d); case 0xc7: return tern<0xc7>(a, b, c, d); case 0xc8: return tern<0xc8>(a, b, c, d); case 0xc9: return tern<0xc9>(a, b, c, d); case 0xca: return tern<0xca>(a, b, c, d); case 0xcb: return tern<0xcb>(a, b, c, d); case 0xcc: return tern<0xcc>(a, b, c, d); case 0xcd: return tern<0xcd>(a, b, c, d); case 0xce: return tern<0xce>(a, b, c, d); case 0xcf: return tern<0xcf>(a, b, c, d); case 0xd0: return tern<0xd0>(a, b, c, d); case 0xd1: return tern<0xd1>(a, b, c, d); case 0xd2: return tern<0xd2>(a, b, c, d); case 0xd3: return tern<0xd3>(a, b, c, d); case 0xd4: return tern<0xd4>(a, b, c, d); case 0xd5: return tern<0xd5>(a, b, c, d); case 0xd6: return tern<0xd6>(a, b, c, d); case 0xd7: return tern<0xd7>(a, b, c, d); case 0xd8: return tern<0xd8>(a, b, c, d); case 0xd9: return tern<0xd9>(a, b, c, d); case 0xda: return tern<0xda>(a, b, c, d); case 0xdb: return tern<0xdb>(a, b, c, d); case 0xdc: return tern<0xdc>(a, b, c, d); case 0xdd: return tern<0xdd>(a, b, c, d); case 0xde: return tern<0xde>(a, b, c, d); case 0xdf: return tern<0xdf>(a, b, c, d); case 0xe0: return tern<0xe0>(a, b, c, d); case 0xe1: return tern<0xe1>(a, b, c, d); case 0xe2: return tern<0xe2>(a, b, c, d); case 0xe3: return tern<0xe3>(a, b, c, d); case 0xe4: return tern<0xe4>(a, b, c, d); case 0xe5: return tern<0xe5>(a, b, c, d); case 0xe6: return tern<0xe6>(a, b, c, d); case 0xe7: return tern<0xe7>(a, b, c, d); case 0xe8: return tern<0xe8>(a, b, c, d); case 0xe9: return tern<0xe9>(a, b, c, d); case 0xea: return tern<0xea>(a, b, c, d); case 0xeb: return tern<0xeb>(a, b, c, d); case 0xec: return tern<0xec>(a, b, c, d); case 0xed: return tern<0xed>(a, b, c, d); case 0xee: return tern<0xee>(a, b, c, d); case 0xef: return tern<0xef>(a, b, c, d); case 0xf0: return tern<0xf0>(a, b, c, d); case 0xf1: return tern<0xf1>(a, b, c, d); case 0xf2: return tern<0xf2>(a, b, c, d); case 0xf3: return tern<0xf3>(a, b, c, d); case 0xf4: return tern<0xf4>(a, b, c, d); case 0xf5: return tern<0xf5>(a, b, c, d); case 0xf6: return tern<0xf6>(a, b, c, d); case 0xf7: return tern<0xf7>(a, b, c, d); case 0xf8: return tern<0xf8>(a, b, c, d); case 0xf9: return tern<0xf9>(a, b, c, d); case 0xfa: return tern<0xfa>(a, b, c, d); case 0xfb: return tern<0xfb>(a, b, c, d); case 0xfc: return tern<0xfc>(a, b, c, d); case 0xfd: return tern<0xfd>(a, b, c, d); case 0xfe: return tern<0xfe>(a, b, c, d); case 0xff: return tern<0xff>(a, b, c, d); default: __builtin_unreachable(); } } __attribute__((noinline)) __m128i ternN_asm(__m128i a, __m128i b, __m128i c, __m128i d, uint8_t Imm) { switch (Imm) { case 0x0: return tern_asm<0x0>(a, b, c, d); case 0x1: return tern_asm<0x1>(a, b, c, d); case 0x2: return tern_asm<0x2>(a, b, c, d); case 0x3: return tern_asm<0x3>(a, b, c, d); case 0x4: return tern_asm<0x4>(a, b, c, d); case 0x5: return tern_asm<0x5>(a, b, c, d); case 0x6: return tern_asm<0x6>(a, b, c, d); case 0x7: return tern_asm<0x7>(a, b, c, d); case 0x8: return tern_asm<0x8>(a, b, c, d); case 0x9: return tern_asm<0x9>(a, b, c, d); case 0xa: return tern_asm<0xa>(a, b, c, d); case 0xb: return tern_asm<0xb>(a, b, c, d); case 0xc: return tern_asm<0xc>(a, b, c, d); case 0xd: return tern_asm<0xd>(a, b, c, d); case 0xe: return tern_asm<0xe>(a, b, c, d); case 0xf: return tern_asm<0xf>(a, b, c, d); case 0x10: return tern_asm<0x10>(a, b, c, d); case 0x11: return tern_asm<0x11>(a, b, c, d); case 0x12: return tern_asm<0x12>(a, b, c, d); case 0x13: return tern_asm<0x13>(a, b, c, d); case 0x14: return tern_asm<0x14>(a, b, c, d); case 0x15: return tern_asm<0x15>(a, b, c, d); case 0x16: return tern_asm<0x16>(a, b, c, d); case 0x17: return tern_asm<0x17>(a, b, c, d); case 0x18: return tern_asm<0x18>(a, b, c, d); case 0x19: return tern_asm<0x19>(a, b, c, d); case 0x1a: return tern_asm<0x1a>(a, b, c, d); case 0x1b: return tern_asm<0x1b>(a, b, c, d); case 0x1c: return tern_asm<0x1c>(a, b, c, d); case 0x1d: return tern_asm<0x1d>(a, b, c, d); case 0x1e: return tern_asm<0x1e>(a, b, c, d); case 0x1f: return tern_asm<0x1f>(a, b, c, d); case 0x20: return tern_asm<0x20>(a, b, c, d); case 0x21: return tern_asm<0x21>(a, b, c, d); case 0x22: return tern_asm<0x22>(a, b, c, d); case 0x23: return tern_asm<0x23>(a, b, c, d); case 0x24: return tern_asm<0x24>(a, b, c, d); case 0x25: return tern_asm<0x25>(a, b, c, d); case 0x26: return tern_asm<0x26>(a, b, c, d); case 0x27: return tern_asm<0x27>(a, b, c, d); case 0x28: return tern_asm<0x28>(a, b, c, d); case 0x29: return tern_asm<0x29>(a, b, c, d); case 0x2a: return tern_asm<0x2a>(a, b, c, d); case 0x2b: return tern_asm<0x2b>(a, b, c, d); case 0x2c: return tern_asm<0x2c>(a, b, c, d); case 0x2d: return tern_asm<0x2d>(a, b, c, d); case 0x2e: return tern_asm<0x2e>(a, b, c, d); case 0x2f: return tern_asm<0x2f>(a, b, c, d); case 0x30: return tern_asm<0x30>(a, b, c, d); case 0x31: return tern_asm<0x31>(a, b, c, d); case 0x32: return tern_asm<0x32>(a, b, c, d); case 0x33: return tern_asm<0x33>(a, b, c, d); case 0x34: return tern_asm<0x34>(a, b, c, d); case 0x35: return tern_asm<0x35>(a, b, c, d); case 0x36: return tern_asm<0x36>(a, b, c, d); case 0x37: return tern_asm<0x37>(a, b, c, d); case 0x38: return tern_asm<0x38>(a, b, c, d); case 0x39: return tern_asm<0x39>(a, b, c, d); case 0x3a: return tern_asm<0x3a>(a, b, c, d); case 0x3b: return tern_asm<0x3b>(a, b, c, d); case 0x3c: return tern_asm<0x3c>(a, b, c, d); case 0x3d: return tern_asm<0x3d>(a, b, c, d); case 0x3e: return tern_asm<0x3e>(a, b, c, d); case 0x3f: return tern_asm<0x3f>(a, b, c, d); case 0x40: return tern_asm<0x40>(a, b, c, d); case 0x41: return tern_asm<0x41>(a, b, c, d); case 0x42: return tern_asm<0x42>(a, b, c, d); case 0x43: return tern_asm<0x43>(a, b, c, d); case 0x44: return tern_asm<0x44>(a, b, c, d); case 0x45: return tern_asm<0x45>(a, b, c, d); case 0x46: return tern_asm<0x46>(a, b, c, d); case 0x47: return tern_asm<0x47>(a, b, c, d); case 0x48: return tern_asm<0x48>(a, b, c, d); case 0x49: return tern_asm<0x49>(a, b, c, d); case 0x4a: return tern_asm<0x4a>(a, b, c, d); case 0x4b: return tern_asm<0x4b>(a, b, c, d); case 0x4c: return tern_asm<0x4c>(a, b, c, d); case 0x4d: return tern_asm<0x4d>(a, b, c, d); case 0x4e: return tern_asm<0x4e>(a, b, c, d); case 0x4f: return tern_asm<0x4f>(a, b, c, d); case 0x50: return tern_asm<0x50>(a, b, c, d); case 0x51: return tern_asm<0x51>(a, b, c, d); case 0x52: return tern_asm<0x52>(a, b, c, d); case 0x53: return tern_asm<0x53>(a, b, c, d); case 0x54: return tern_asm<0x54>(a, b, c, d); case 0x55: return tern_asm<0x55>(a, b, c, d); case 0x56: return tern_asm<0x56>(a, b, c, d); case 0x57: return tern_asm<0x57>(a, b, c, d); case 0x58: return tern_asm<0x58>(a, b, c, d); case 0x59: return tern_asm<0x59>(a, b, c, d); case 0x5a: return tern_asm<0x5a>(a, b, c, d); case 0x5b: return tern_asm<0x5b>(a, b, c, d); case 0x5c: return tern_asm<0x5c>(a, b, c, d); case 0x5d: return tern_asm<0x5d>(a, b, c, d); case 0x5e: return tern_asm<0x5e>(a, b, c, d); case 0x5f: return tern_asm<0x5f>(a, b, c, d); case 0x60: return tern_asm<0x60>(a, b, c, d); case 0x61: return tern_asm<0x61>(a, b, c, d); case 0x62: return tern_asm<0x62>(a, b, c, d); case 0x63: return tern_asm<0x63>(a, b, c, d); case 0x64: return tern_asm<0x64>(a, b, c, d); case 0x65: return tern_asm<0x65>(a, b, c, d); case 0x66: return tern_asm<0x66>(a, b, c, d); case 0x67: return tern_asm<0x67>(a, b, c, d); case 0x68: return tern_asm<0x68>(a, b, c, d); case 0x69: return tern_asm<0x69>(a, b, c, d); case 0x6a: return tern_asm<0x6a>(a, b, c, d); case 0x6b: return tern_asm<0x6b>(a, b, c, d); case 0x6c: return tern_asm<0x6c>(a, b, c, d); case 0x6d: return tern_asm<0x6d>(a, b, c, d); case 0x6e: return tern_asm<0x6e>(a, b, c, d); case 0x6f: return tern_asm<0x6f>(a, b, c, d); case 0x70: return tern_asm<0x70>(a, b, c, d); case 0x71: return tern_asm<0x71>(a, b, c, d); case 0x72: return tern_asm<0x72>(a, b, c, d); case 0x73: return tern_asm<0x73>(a, b, c, d); case 0x74: return tern_asm<0x74>(a, b, c, d); case 0x75: return tern_asm<0x75>(a, b, c, d); case 0x76: return tern_asm<0x76>(a, b, c, d); case 0x77: return tern_asm<0x77>(a, b, c, d); case 0x78: return tern_asm<0x78>(a, b, c, d); case 0x79: return tern_asm<0x79>(a, b, c, d); case 0x7a: return tern_asm<0x7a>(a, b, c, d); case 0x7b: return tern_asm<0x7b>(a, b, c, d); case 0x7c: return tern_asm<0x7c>(a, b, c, d); case 0x7d: return tern_asm<0x7d>(a, b, c, d); case 0x7e: return tern_asm<0x7e>(a, b, c, d); case 0x7f: return tern_asm<0x7f>(a, b, c, d); case 0x80: return tern_asm<0x80>(a, b, c, d); case 0x81: return tern_asm<0x81>(a, b, c, d); case 0x82: return tern_asm<0x82>(a, b, c, d); case 0x83: return tern_asm<0x83>(a, b, c, d); case 0x84: return tern_asm<0x84>(a, b, c, d); case 0x85: return tern_asm<0x85>(a, b, c, d); case 0x86: return tern_asm<0x86>(a, b, c, d); case 0x87: return tern_asm<0x87>(a, b, c, d); case 0x88: return tern_asm<0x88>(a, b, c, d); case 0x89: return tern_asm<0x89>(a, b, c, d); case 0x8a: return tern_asm<0x8a>(a, b, c, d); case 0x8b: return tern_asm<0x8b>(a, b, c, d); case 0x8c: return tern_asm<0x8c>(a, b, c, d); case 0x8d: return tern_asm<0x8d>(a, b, c, d); case 0x8e: return tern_asm<0x8e>(a, b, c, d); case 0x8f: return tern_asm<0x8f>(a, b, c, d); case 0x90: return tern_asm<0x90>(a, b, c, d); case 0x91: return tern_asm<0x91>(a, b, c, d); case 0x92: return tern_asm<0x92>(a, b, c, d); case 0x93: return tern_asm<0x93>(a, b, c, d); case 0x94: return tern_asm<0x94>(a, b, c, d); case 0x95: return tern_asm<0x95>(a, b, c, d); case 0x96: return tern_asm<0x96>(a, b, c, d); case 0x97: return tern_asm<0x97>(a, b, c, d); case 0x98: return tern_asm<0x98>(a, b, c, d); case 0x99: return tern_asm<0x99>(a, b, c, d); case 0x9a: return tern_asm<0x9a>(a, b, c, d); case 0x9b: return tern_asm<0x9b>(a, b, c, d); case 0x9c: return tern_asm<0x9c>(a, b, c, d); case 0x9d: return tern_asm<0x9d>(a, b, c, d); case 0x9e: return tern_asm<0x9e>(a, b, c, d); case 0x9f: return tern_asm<0x9f>(a, b, c, d); case 0xa0: return tern_asm<0xa0>(a, b, c, d); case 0xa1: return tern_asm<0xa1>(a, b, c, d); case 0xa2: return tern_asm<0xa2>(a, b, c, d); case 0xa3: return tern_asm<0xa3>(a, b, c, d); case 0xa4: return tern_asm<0xa4>(a, b, c, d); case 0xa5: return tern_asm<0xa5>(a, b, c, d); case 0xa6: return tern_asm<0xa6>(a, b, c, d); case 0xa7: return tern_asm<0xa7>(a, b, c, d); case 0xa8: return tern_asm<0xa8>(a, b, c, d); case 0xa9: return tern_asm<0xa9>(a, b, c, d); case 0xaa: return tern_asm<0xaa>(a, b, c, d); case 0xab: return tern_asm<0xab>(a, b, c, d); case 0xac: return tern_asm<0xac>(a, b, c, d); case 0xad: return tern_asm<0xad>(a, b, c, d); case 0xae: return tern_asm<0xae>(a, b, c, d); case 0xaf: return tern_asm<0xaf>(a, b, c, d); case 0xb0: return tern_asm<0xb0>(a, b, c, d); case 0xb1: return tern_asm<0xb1>(a, b, c, d); case 0xb2: return tern_asm<0xb2>(a, b, c, d); case 0xb3: return tern_asm<0xb3>(a, b, c, d); case 0xb4: return tern_asm<0xb4>(a, b, c, d); case 0xb5: return tern_asm<0xb5>(a, b, c, d); case 0xb6: return tern_asm<0xb6>(a, b, c, d); case 0xb7: return tern_asm<0xb7>(a, b, c, d); case 0xb8: return tern_asm<0xb8>(a, b, c, d); case 0xb9: return tern_asm<0xb9>(a, b, c, d); case 0xba: return tern_asm<0xba>(a, b, c, d); case 0xbb: return tern_asm<0xbb>(a, b, c, d); case 0xbc: return tern_asm<0xbc>(a, b, c, d); case 0xbd: return tern_asm<0xbd>(a, b, c, d); case 0xbe: return tern_asm<0xbe>(a, b, c, d); case 0xbf: return tern_asm<0xbf>(a, b, c, d); case 0xc0: return tern_asm<0xc0>(a, b, c, d); case 0xc1: return tern_asm<0xc1>(a, b, c, d); case 0xc2: return tern_asm<0xc2>(a, b, c, d); case 0xc3: return tern_asm<0xc3>(a, b, c, d); case 0xc4: return tern_asm<0xc4>(a, b, c, d); case 0xc5: return tern_asm<0xc5>(a, b, c, d); case 0xc6: return tern_asm<0xc6>(a, b, c, d); case 0xc7: return tern_asm<0xc7>(a, b, c, d); case 0xc8: return tern_asm<0xc8>(a, b, c, d); case 0xc9: return tern_asm<0xc9>(a, b, c, d); case 0xca: return tern_asm<0xca>(a, b, c, d); case 0xcb: return tern_asm<0xcb>(a, b, c, d); case 0xcc: return tern_asm<0xcc>(a, b, c, d); case 0xcd: return tern_asm<0xcd>(a, b, c, d); case 0xce: return tern_asm<0xce>(a, b, c, d); case 0xcf: return tern_asm<0xcf>(a, b, c, d); case 0xd0: return tern_asm<0xd0>(a, b, c, d); case 0xd1: return tern_asm<0xd1>(a, b, c, d); case 0xd2: return tern_asm<0xd2>(a, b, c, d); case 0xd3: return tern_asm<0xd3>(a, b, c, d); case 0xd4: return tern_asm<0xd4>(a, b, c, d); case 0xd5: return tern_asm<0xd5>(a, b, c, d); case 0xd6: return tern_asm<0xd6>(a, b, c, d); case 0xd7: return tern_asm<0xd7>(a, b, c, d); case 0xd8: return tern_asm<0xd8>(a, b, c, d); case 0xd9: return tern_asm<0xd9>(a, b, c, d); case 0xda: return tern_asm<0xda>(a, b, c, d); case 0xdb: return tern_asm<0xdb>(a, b, c, d); case 0xdc: return tern_asm<0xdc>(a, b, c, d); case 0xdd: return tern_asm<0xdd>(a, b, c, d); case 0xde: return tern_asm<0xde>(a, b, c, d); case 0xdf: return tern_asm<0xdf>(a, b, c, d); case 0xe0: return tern_asm<0xe0>(a, b, c, d); case 0xe1: return tern_asm<0xe1>(a, b, c, d); case 0xe2: return tern_asm<0xe2>(a, b, c, d); case 0xe3: return tern_asm<0xe3>(a, b, c, d); case 0xe4: return tern_asm<0xe4>(a, b, c, d); case 0xe5: return tern_asm<0xe5>(a, b, c, d); case 0xe6: return tern_asm<0xe6>(a, b, c, d); case 0xe7: return tern_asm<0xe7>(a, b, c, d); case 0xe8: return tern_asm<0xe8>(a, b, c, d); case 0xe9: return tern_asm<0xe9>(a, b, c, d); case 0xea: return tern_asm<0xea>(a, b, c, d); case 0xeb: return tern_asm<0xeb>(a, b, c, d); case 0xec: return tern_asm<0xec>(a, b, c, d); case 0xed: return tern_asm<0xed>(a, b, c, d); case 0xee: return tern_asm<0xee>(a, b, c, d); case 0xef: return tern_asm<0xef>(a, b, c, d); case 0xf0: return tern_asm<0xf0>(a, b, c, d); case 0xf1: return tern_asm<0xf1>(a, b, c, d); case 0xf2: return tern_asm<0xf2>(a, b, c, d); case 0xf3: return tern_asm<0xf3>(a, b, c, d); case 0xf4: return tern_asm<0xf4>(a, b, c, d); case 0xf5: return tern_asm<0xf5>(a, b, c, d); case 0xf6: return tern_asm<0xf6>(a, b, c, d); case 0xf7: return tern_asm<0xf7>(a, b, c, d); case 0xf8: return tern_asm<0xf8>(a, b, c, d); case 0xf9: return tern_asm<0xf9>(a, b, c, d); case 0xfa: return tern_asm<0xfa>(a, b, c, d); case 0xfb: return tern_asm<0xfb>(a, b, c, d); case 0xfc: return tern_asm<0xfc>(a, b, c, d); case 0xfd: return tern_asm<0xfd>(a, b, c, d); case 0xfe: return tern_asm<0xfe>(a, b, c, d); case 0xff: return tern_asm<0xff>(a, b, c, d); default: __builtin_unreachable(); } } static void randomize_buf(uint8_t *p, uint64_t sz) { int64_t ret = getrandom(p, sz, 0); assert(ret > 0 && ((uint64_t)ret) == sz); } static uint8_t *random_buf(uint64_t sz) { uint8_t *p = (uint8_t *)malloc(sz); assert(p); randomize_buf(p, sz); return p; } int main() { enum { K_sz = 1 << 20, K_off = 4 * sizeof(__m128i) }; uint8_t *p = random_buf(K_sz); uint32_t i; for (;;) { for (i = 0; i < K_sz; i += K_off) { __m128i vecs[4]; __m128i new_r, ref_r; __builtin_memcpy(&vecs, p + i, K_off); for (uint32_t imm = 0; imm < 256; ++imm) { ref_r = ternN(vecs[0], vecs[1], vecs[2], vecs[3], imm); new_r = ternN_asm(vecs[0], vecs[1], vecs[2], vecs[3], imm); assert(!__builtin_memcmp(&ref_r, &new_r, sizeof(__m128i))); } } randomize_buf(p, K_sz); } }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree