]> wimlib.net Git - wimlib/commitdiff
lzx-common.c: Use sle32 for target in e8 translation
authorEric Biggers <ebiggers3@gmail.com>
Thu, 7 Aug 2014 02:50:36 +0000 (21:50 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 7 Aug 2014 02:53:59 +0000 (21:53 -0500)
src/lzx-common.c

index e61629e700dfa8414fc3e18665c244bf1e0c09ba..b2eeb7d1e54f1bbdfcabbae8d708ff8fd7e220d4 100644 (file)
@@ -115,7 +115,7 @@ lzx_get_num_main_syms(u32 window_size)
 }
 
 static void
 }
 
 static void
-do_translate_target(s32 *target, s32 input_pos)
+do_translate_target(sle32 *target, s32 input_pos)
 {
        s32 abs_offset, rel_offset;
 
 {
        s32 abs_offset, rel_offset;
 
@@ -134,7 +134,7 @@ do_translate_target(s32 *target, s32 input_pos)
 }
 
 static void
 }
 
 static void
-undo_translate_target(s32 *target, s32 input_pos)
+undo_translate_target(sle32 *target, s32 input_pos)
 {
        s32 abs_offset, rel_offset;
 
 {
        s32 abs_offset, rel_offset;
 
@@ -189,7 +189,7 @@ inline  /* Although inlining the 'process_target' function still speeds up the
           SSE2 case, it bloats the binary more.  */
 #endif
 void
           SSE2 case, it bloats the binary more.  */
 #endif
 void
-lzx_e8_filter(u8 *data, u32 size, void (*process_target)(s32 *, s32))
+lzx_e8_filter(u8 *data, u32 size, void (*process_target)(sle32 *, s32))
 {
 #ifdef __SSE2__
        /* SSE2 vectorized implementation for x86_64.  This speeds up LZX
 {
 #ifdef __SSE2__
        /* SSE2 vectorized implementation for x86_64.  This speeds up LZX
@@ -244,7 +244,7 @@ lzx_e8_filter(u8 *data, u32 size, void (*process_target)(s32 *, s32))
 
                                        /* Do (or undo) the e8 translation.  */
                                        u8 *p8 = (u8 *)p128 + bit;
 
                                        /* Do (or undo) the e8 translation.  */
                                        u8 *p8 = (u8 *)p128 + bit;
-                                       (*process_target)((s32 *)(p8 + 1),
+                                       (*process_target)((sle32 *)(p8 + 1),
                                                          p8 - data);
 
                                        /* Don't start an e8 translation in the
                                                          p8 - data);
 
                                        /* Don't start an e8 translation in the
@@ -274,7 +274,7 @@ lzx_e8_filter(u8 *data, u32 size, void (*process_target)(s32 *, s32))
                u8 *p8_end = data + size - 10;
                do {
                        if (*p8 == 0xe8) {
                u8 *p8_end = data + size - 10;
                do {
                        if (*p8 == 0xe8) {
-                               (*process_target)((s32 *)(p8 + 1), p8 - data);
+                               (*process_target)((sle32 *)(p8 + 1), p8 - data);
                                p8 += 5;
                        } else {
                                p8++;
                                p8 += 5;
                        } else {
                                p8++;