From patchwork Fri Dec 16 01:36:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1819 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp1075013vsa; Thu, 15 Dec 2016 17:37:04 -0800 (PST) X-Received: by 10.28.191.130 with SMTP id o2mr918402wmi.97.1481852224368; Thu, 15 Dec 2016 17:37:04 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i125si1048938wmg.121.2016.12.15.17.37.04; Thu, 15 Dec 2016 17:37:04 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F01DA689B12; Fri, 16 Dec 2016 03:36:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wj0-f193.google.com (mail-wj0-f193.google.com [209.85.210.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2958D680D0B for ; Fri, 16 Dec 2016 03:36:49 +0200 (EET) Received: by mail-wj0-f193.google.com with SMTP id kp2so12342159wjc.0 for ; Thu, 15 Dec 2016 17:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=58tpNUchaOytUg+tluXcVMGyVPKpiIuv69oOO9UxKbI=; b=hqBzolpphpY3uRAchoRttun0jkUtqW8KPWintwA+geOGoI6FuGSR8pT20XX0rbpcBO kGSYTrpLFC3A9gXPEzr9kdVK0f9m0DTYsX8eoCLN1/Z/w1ilR8GhzUHu5GB6l6gZEAqN PAGvSWozRO339DKSKDy7piS8FlnR0J1e60KtqWGzh3Eem8gsOgjX1XgdSO9yd5eDF3Gy 1bDQ4+RirW9FWJXu60n48EXZATk39jGCBxiHn29WOB2jeKoWVPWL/rhZ61ve06Qn10uG 3nf+wkTL9BT07Rd0SA8d/M01yhUe/RMHelLyg4/dzomBXB/CG09mCgfZ6kNG+UYk+spm SSCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=58tpNUchaOytUg+tluXcVMGyVPKpiIuv69oOO9UxKbI=; b=oy6syROnuoROJOGh6xcZ3ePtTo0ycgFR4AuCWNtHyLvuXY/r1ECpfpKhme/VYr8lT6 +mwx5pN72T68nhDn4GUJjGV+5HtUDvH0V/577i1LJxIxuWkMkLUHGYNFv7g9TV0QzE/n 4nJ7YdFUgAqVIzVFiWtggbG4O6kZBgz3BzvwQYNtrM1T9Y1ZR5Vpkn5YAs+sXBrMZWWc JOvzfTRI1xS5tKyTFANY9/ktZdWEoFWYdzj4ks0q2r9b6PYysSxc/k7hXKRPv52Lpc0d ZBfXNnug2FwChHQK/c9NegUfPWhVbeO6zvSToxJVViTvqz0yRPe/WNnaboHeYHC59Ioz NmOw== X-Gm-Message-State: AIkVDXJVT9+GeE97Kd2Ay9RbugqkcmeVhZ4YF81jP7f/E2+9hvSFqnwBN0DeP4xofBPUSQ== X-Received: by 10.195.30.165 with SMTP id kf5mr307577wjd.41.1481852214810; Thu, 15 Dec 2016 17:36:54 -0800 (PST) Received: from [192.168.2.21] (p5B095AC6.dip0.t-ipconnect.de. [91.9.90.198]) by smtp.googlemail.com with ESMTPSA id q65sm1049391wmd.6.2016.12.15.17.36.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 17:36:54 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches Message-ID: <1d169ce9-caa2-3a6a-3f5b-7d2b77d5b513@googlemail.com> Date: Fri, 16 Dec 2016 02:36:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] swscale: also save ebx register when using PIE X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Otherwise the build fails when configuring with --toolchain=hardened --disable-pic on i386 using gcc 4.8: error: PIC register clobbered by '%ebx' in 'asm' Signed-off-by: Andreas Cadhalpun --- libswscale/x86/hscale_fast_bilinear_simd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libswscale/x86/hscale_fast_bilinear_simd.c b/libswscale/x86/hscale_fast_bilinear_simd.c index 2cba5f0..3f0f5f5 100644 --- a/libswscale/x86/hscale_fast_bilinear_simd.c +++ b/libswscale/x86/hscale_fast_bilinear_simd.c @@ -199,7 +199,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst, #if ARCH_X86_64 uint64_t retsave; #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) uint64_t ebxsave; #endif #endif @@ -209,7 +209,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst, "mov -8(%%rsp), %%"FF_REG_a" \n\t" "mov %%"FF_REG_a", %5 \n\t" // retsave #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) "mov %%"FF_REG_b", %5 \n\t" // ebxsave #endif #endif @@ -255,7 +255,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst, "mov %5, %%"FF_REG_a" \n\t" "mov %%"FF_REG_a", -8(%%rsp) \n\t" #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) "mov %5, %%"FF_REG_b" \n\t" #endif #endif @@ -264,12 +264,12 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst, #if ARCH_X86_64 ,"m"(retsave) #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) ,"m" (ebxsave) #endif #endif : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D -#if ARCH_X86_64 || !defined(PIC) +#if ARCH_X86_64 || !(defined(PIC) || defined(__PIE__)) ,"%"FF_REG_b #endif ); @@ -289,7 +289,7 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2, #if ARCH_X86_64 DECLARE_ALIGNED(8, uint64_t, retsave); #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) DECLARE_ALIGNED(8, uint64_t, ebxsave); #endif #endif @@ -298,7 +298,7 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2, "mov -8(%%rsp), %%"FF_REG_a" \n\t" "mov %%"FF_REG_a", %7 \n\t" // retsave #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) "mov %%"FF_REG_b", %7 \n\t" // ebxsave #endif #endif @@ -332,7 +332,7 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2, "mov %7, %%"FF_REG_a" \n\t" "mov %%"FF_REG_a", -8(%%rsp) \n\t" #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) "mov %7, %%"FF_REG_b" \n\t" #endif #endif @@ -341,12 +341,12 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2, #if ARCH_X86_64 ,"m"(retsave) #else -#if defined(PIC) +#if defined(PIC) || defined(__PIE__) ,"m" (ebxsave) #endif #endif : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D -#if ARCH_X86_64 || !defined(PIC) +#if ARCH_X86_64 || !(defined(PIC) || defined(__PIE__)) ,"%"FF_REG_b #endif );