X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Flzms_common.c;h=fb13a4358c5469a79d0c4c5e101c03ee2f9e59db;hb=2f41998788d213038036a1cc863affa3818ba4d3;hp=57c17d4d3a5a1ba9bf3b5acff6edcbfeb0a0cb4b;hpb=0096c56e9a0ee15f708523075d67ea7a1d77b456;p=wimlib diff --git a/src/lzms_common.c b/src/lzms_common.c index 57c17d4d..fb13a435 100644 --- a/src/lzms_common.c +++ b/src/lzms_common.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2013, 2014 Eric Biggers + * Copyright (C) 2013-2016 Eric Biggers * * This file is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free @@ -379,7 +379,7 @@ lzms_dilute_symbol_frequencies(u32 freqs[], unsigned num_syms) #ifdef __x86_64__ -static inline u8 * +static forceinline u8 * find_next_opcode_sse4_2(u8 *p) { const __v16qi potential_opcodes = (__v16qi) {0x48, 0x4C, 0xE8, 0xE9, 0xF0, 0xFF}; @@ -391,7 +391,11 @@ find_next_opcode_sse4_2(u8 *p) " pcmpestri $0x0, (%[p]), %[potential_opcodes] \n" " jnc 1b \n" "2: \n" + #ifdef __ILP32__ /* x32 ABI (x86_64 with 32-bit pointers) */ + " add %%ecx, %[p] \n" + #else " add %%rcx, %[p] \n" + #endif : [p] "+r" (p) : [potential_opcodes] "x" (potential_opcodes), "a" (6), "d" (16) : "rcx", "cc" @@ -401,7 +405,7 @@ find_next_opcode_sse4_2(u8 *p) } #endif /* __x86_64__ */ -static inline u8 * +static forceinline u8 * find_next_opcode_default(u8 *p) { /* @@ -433,7 +437,7 @@ find_next_opcode_default(u8 *p) return p; } -static inline u8 * +static forceinline u8 * translate_if_needed(u8 *data, u8 *p, s32 *last_x86_pos, s32 last_target_usages[], bool undo) {