openbsd-ports/security/libnettle/patches/patch-arm64_chacha-4core_asm
2023-01-19 12:23:58 +00:00

22 lines
534 B
Plaintext

Index: arm64/chacha-4core.asm
--- arm64/chacha-4core.asm.orig
+++ arm64/chacha-4core.asm
@@ -146,7 +146,8 @@ PROLOGUE(_nettle_chacha_4core)
C Save callee-save registers
fmov x3, d8
- adr x4, .Lcnts
+ adrp x4, .Lcnts
+ add x4, x4, :lo12:.Lcnts
ld1 {TMP3.4s,ROT24.4s},[x4]
C Load state and splat
@@ -230,6 +231,7 @@ PROLOGUE(_nettle_chacha_4core32)
b .Lshared_entry
EPILOGUE(_nettle_chacha_4core32)
+.rodata
.align 4
.Lcnts: .long 0,1,2,3 C increments
.Lrot24: .long 0x02010003,0x06050407,0x0a09080b,0x0e0d0c0f