aria: improve compiler compat by using __asm
gcc --std=c99 doesn't like the shorter "asm" (this broke all.sh)
This commit is contained in:
parent
2078725feb
commit
21662148f7
1 changed files with 3 additions and 3 deletions
|
@ -98,7 +98,7 @@ static void mbedtls_zeroize( void *v, size_t n ) {
|
||||||
static inline uint32_t aria_p1( uint32_t x )
|
static inline uint32_t aria_p1( uint32_t x )
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
asm( "rev16 %0, %1" : "=l" (r) : "l" (x) );
|
__asm( "rev16 %0, %1" : "=l" (r) : "l" (x) );
|
||||||
return( r );
|
return( r );
|
||||||
}
|
}
|
||||||
#define ARIA_P1 aria_p1
|
#define ARIA_P1 aria_p1
|
||||||
|
@ -149,7 +149,7 @@ static inline uint32_t aria_p1( uint32_t x )
|
||||||
static inline uint32_t aria_p3( uint32_t x )
|
static inline uint32_t aria_p3( uint32_t x )
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
asm( "rev %0, %1" : "=l" (r) : "l" (x) );
|
__asm( "rev %0, %1" : "=l" (r) : "l" (x) );
|
||||||
return( r );
|
return( r );
|
||||||
}
|
}
|
||||||
#define ARIA_P3 aria_p3
|
#define ARIA_P3 aria_p3
|
||||||
|
@ -168,7 +168,7 @@ static inline uint32_t aria_p3( uint32_t x )
|
||||||
defined(__i386__) || defined(__amd64__) || defined( __x86_64__)
|
defined(__i386__) || defined(__amd64__) || defined( __x86_64__)
|
||||||
static inline uint32_t aria_p3( uint32_t x )
|
static inline uint32_t aria_p3( uint32_t x )
|
||||||
{
|
{
|
||||||
asm( "bswap %0" : "=r" (x) : "0" (x) );
|
__asm( "bswap %0" : "=r" (x) : "0" (x) );
|
||||||
return( x );
|
return( x );
|
||||||
}
|
}
|
||||||
#define ARIA_P3 aria_p3
|
#define ARIA_P3 aria_p3
|
||||||
|
|
Loading…
Reference in a new issue