From 27bb33cf02e9a91b824fdad560e8233f1543ba39 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 19 Jul 2016 09:00:17 -0700 Subject: [PATCH] lzms_common.c: support x32 ABI in find_next_opcode_sse4_2() --- src/lzms_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lzms_common.c b/src/lzms_common.c index 380b7431..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 @@ -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" -- 2.43.0