Skip to content

Commit

Permalink
asm -> __asm__ __volatile__ (touch #2494)
Browse files Browse the repository at this point in the history
  • Loading branch information
elfmz committed Nov 17, 2024
1 parent 3c7df82 commit a9650f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions multiarc/src/formats/7z/C/SwapBytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ void Z7_FASTCALL
&& ( (defined(__GNUC__) && (__GNUC__ >= 4)) \
|| (defined(__clang__) && (__clang_major__ >= 4)))

#define SWAP2_64_VAR(v) asm ("rev16 %x0,%x0" : "+r" (v));
#define SWAP4_64_VAR(v) asm ("rev32 %x0,%x0" : "+r" (v));
#define SWAP2_64_VAR(v) __asm__ __volatile__ ("rev16 %x0,%x0" : "+r" (v));
#define SWAP4_64_VAR(v) __asm__ __volatile__ ("rev32 %x0,%x0" : "+r" (v));

#else // is not ARM64-GNU

Expand Down Expand Up @@ -593,9 +593,9 @@ SwapBytes4_64(CSwapUInt32 *items, const CSwapUInt32 *lim)
|| (defined(__clang__) && (__clang_major__ >= 4)))

#ifdef MY_CPU_64BIT
#define SWAP2_32_VAR(v) asm ("rev16 %w0,%w0" : "+r" (v));
#define SWAP2_32_VAR(v) __asm__ __volatile__ ("rev16 %w0,%w0" : "+r" (v));
#else
#define SWAP2_32_VAR(v) asm ("rev16 %0,%0" : "+r" (v)); // for clang/gcc
#define SWAP2_32_VAR(v) __asm__ __volatile__ ("rev16 %0,%0" : "+r" (v)); // for clang/gcc
// asm ("rev16 %r0,%r0" : "+r" (a)); // for gcc
#endif

Expand Down

0 comments on commit a9650f0

Please sign in to comment.