1diff -urN -x .git orig/thirdparty/libressl/avoid-BSWAP-assembly-for-ARM-v6.patch patched/thirdparty/libressl/avoid-BSWAP-assembly-for-ARM-v6.patch 2--- orig/thirdparty/libressl/avoid-BSWAP-assembly-for-ARM-v6.patch 1970-01-01 09:00:00.000000000 +0900 3+++ patched/thirdparty/libressl/avoid-BSWAP-assembly-for-ARM-v6.patch 2020-08-07 23:14:46.196764271 +0900 4@@ -0,0 +1,30 @@ 5+This patch was imported from the libressl potable. 6+https://github.com/libressl-portable/portable/commit/a9332ccecfce63bf54924e70c11f420edd3ae312 7+ 8+From a9332ccecfce63bf54924e70c11f420edd3ae312 Mon Sep 17 00:00:00 2001 9+From: Brent Cook <bcook@openbsd.org> 10+Date: Sun, 17 Jul 2016 18:12:23 -0500 11+Subject: [PATCH] avoid BSWAP assembly for ARM <= v6 12+ 13+diff -urN orig/crypto/modes/modes_lcl.h patched/crypto/modes/modes_lcl.h 14+--- orig/crypto/modes/modes_lcl.h 2018-11-18 21:27:10.000000000 +0900 15++++ patched/crypto/modes/modes_lcl.h 2020-08-07 23:11:01.960764745 +0900 16+@@ -45,14 +45,16 @@ 17+ asm ("bswapl %0" \ 18+ : "+r"(ret)); ret; }) 19+ # elif (defined(__arm__) || defined(__arm)) && !defined(__STRICT_ALIGNMENT) 20+-# define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ 21++# if (__ARM_ARCH >= 6) 22++# define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ 23+ asm ("rev %0,%0; rev %1,%1" \ 24+ : "+r"(hi),"+r"(lo)); \ 25+ (u64)hi<<32|lo; }) 26+-# define BSWAP4(x) ({ u32 ret; \ 27++# define BSWAP4(x) ({ u32 ret; \ 28+ asm ("rev %0,%1" \ 29+ : "=r"(ret) : "r"((u32)(x))); \ 30+ ret; }) 31++# endif 32+ # endif 33+ #endif 34+ #endif 35