0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib
Frank Denis 1d96a17af4
crypto.aescrypto.encrypt: do not add the round key in an asm block (#14899)
Apple M1/M2 have an EOR3 instruction that can XOR 2 operands with
another one, and LLVM knows how to take advantage of it.

However, two EOR can't be automatically combined into an EOR3 if
one of them is in an assembly block.

That simple change speeds up ciphers doing an AES round immediately
followed by a XOR operation on Apple Silicon.

Before:

   aegis-128l mac:      12534 MiB/s
    aegis-256 mac:       6722 MiB/s
       aegis-128l:      10634 MiB/s
        aegis-256:       6133 MiB/s
       aes128-gcm:       3890 MiB/s
       aes256-gcm:       3122 MiB/s
       aes128-ocb:       2832 MiB/s
       aes256-ocb:       2057 MiB/s

After:

   aegis-128l mac:      15667 MiB/s
    aegis-256 mac:       8240 MiB/s
       aegis-128l:      12656 MiB/s
        aegis-256:       7214 MiB/s
       aes128-gcm:       3976 MiB/s
       aes256-gcm:       3202 MiB/s
       aes128-ocb:       2835 MiB/s
       aes256-ocb:       2118 MiB/s
History 2023-03-13 07:06:27 +00:00
..
compiler_rt compiler_rt: fix rare case in udivei4 2023-03-07 03:00:08 -05:00
docs Zir: move set_cold from Inst.Tag to Inst.Extended 2023-03-03 21:16:21 +01:00
include C backend: improve ergonomics of zig.h a little bit 2022-11-13 16:50:16 -07:00
init-exe fix init-exe, init-lib templates 2023-01-31 15:09:35 -07:00
init-lib fix init-exe, init-lib templates 2023-01-31 15:09:35 -07:00
libc mingw: stop using K&R-style function definitions 2023-02-01 22:11:16 -05:00
libcxx dragonfly: port libc++ 2023-01-02 19:18:33 -05:00
libcxxabi update libcxxabi to LLVM 15 2022-08-04 18:02:01 -07:00
libunwind update libunwind to LLVM 15 2022-08-04 18:09:10 -07:00
std crypto.aescrypto.encrypt: do not add the round key in an asm block (#14899) 2023-03-13 07:06:27 +00:00
tsan update libcxx, libcxxabi, libunwind, and tsan to llvm 13 rc1 2021-08-16 23:32:13 -07:00
build_runner.zig Add --build-runner zig build option (#14742) 2023-03-01 13:20:01 -05:00
c.zig Add support for mips64/mips64el 2023-02-04 15:19:53 -05:00
compiler_rt.zig compiler_rt: declutter int.zig, add mulXi3 tests (#14623) 2023-02-24 13:27:02 -05:00
ssp.zig all: rename i386 to x86 2022-11-04 00:09:27 +03:30
test_runner.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
zig.h zig.h: implement zig_breakpoint and zig_trap for more targets 2023-03-07 12:46:35 -05:00