Fix for arm64_32 (aka ILP32) on Clang (attempt 2)

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-06-21 07:32:22 +01:00
parent b19f584f2c
commit 04cb9ac59e

View File

@ -78,10 +78,8 @@ static inline uint32_t mbedtls_get_unaligned_volatile_uint32(volatile const unsi
uint32_t r;
#if defined(__arm__) || defined(__thumb__) || defined(__thumb2__)
asm volatile ("ldr %0, [%1]" : "=r" (r) : "r" (p) :);
#elif defined(__aarch64__) && (SIZE_MAX == 0xffffffffffffffff)
asm volatile ("ldr %w0, [%1]" : "=r" (r) : "r" (p) :);
#elif defined(__aarch64__) && (SIZE_MAX == 0xffffffff)
asm volatile ("ldr %w0, [%w1]" : "=r" (r) : "r" (p) :);
#elif defined(__aarch64__)
asm volatile ("ldr %w0, [%1]" : "=r" (r) : "p" (p) :);
#endif
return r;
}