Skip to content

Commit

Permalink
add multiarc/7z patch
Browse files Browse the repository at this point in the history
  • Loading branch information
spvkgn committed Nov 11, 2024
1 parent 21778bc commit b13406e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions far2l/patches/7z.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/multiarc/src/formats/7z/C/SwapBytes.c b/multiarc/src/formats/7z/C/SwapBytes.c
index 9290592..123a64b 100644
--- a/multiarc/src/formats/7z/C/SwapBytes.c
+++ b/multiarc/src/formats/7z/C/SwapBytes.c
@@ -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__ ("rev16 %x0,%x0" : "+r" (v));
+ #define SWAP4_64_VAR(v) __asm__ ("rev32 %x0,%x0" : "+r" (v));

#else // is not ARM64-GNU

@@ -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__ ("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__ ("rev16 %0,%0" : "+r" (v)); // for clang/gcc
// asm ("rev16 %r0,%r0" : "+r" (a)); // for gcc
#endif

1 change: 1 addition & 0 deletions far2l/patches/series
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
far2l-src-cfg-ConfigOpt.cpp.patch
7z.patch

0 comments on commit b13406e

Please sign in to comment.