From patchwork Fri Apr 13 20:43:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Chaudhry X-Patchwork-Id: 8438 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp1178142jad; Fri, 13 Apr 2018 13:49:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx48fweFMmzDciXWCLlqcUN/lWwln0jTEMO6TK6oTi3/WzMMpLUpxApM0aO8vjugutxur1oE2 X-Received: by 10.223.154.171 with SMTP id a40mr5109642wrc.176.1523652557613; Fri, 13 Apr 2018 13:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523652557; cv=none; d=google.com; s=arc-20160816; b=OTXWqySAHw/CaGhwlR0OIdTPLstTckk7Fhec49tr7U/dXkdp9g3cKEB2ftMihl7M2U wcqCclHittTZkQgKK4p9zT9c7HcO5K6pLgyCgF27tYkBhU0/Xgw/vvviSlliCFkxmCd2 a47IZkGYPuElTEmz0yihuSVH/3yMfk4MWcUxCdiHO59gkh8Lh3ik7OwMoaPtW3byjELn Zg9VWqrHlTtnOA6CnlKY9V15gZXiWEiWKSz0ELuy0spziiNtlaR3FRsfeUQLtHtRJKkS oHOD6NLT+owHYH0ZKT+AeKvdswgcdFp/ph+Uejd0KP2YJ9h6LL4yiZyQRMcs41N/TW6c yT1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=XMmzNOzaqOL2XdEE4PMcDkHgMX7PdjPrnrXHe4hc5Hw=; b=KALnySMOFFfhxtmCQUzCGjaRG0OAj2dvdVhnDRjkDY40mgVAs/BgUqkrHj7zrdUucp 03iF/48CV9slwHY9FQIcbxYC/ulyvkbgmp3qwV3eMGujMxC4bkxS74M5IAEs6aoLJ0cY qLJJ6Od++FYWgF5WnNxd3W7/orlljpsl4/PSyY1yqaUV5BlnIgysgdU6A9qbk8UO1IbD h0Tpoh6Y1FnWZdg9LNLHnkwCexN5N/x5vBu6n7evziNcpj2yClOn7wAd0eZehcnclZU7 c62G3MnissfUulmVlFdYnv5h1j49QE2kreH6sB1S1139oi7pV2fKoETybm5ur1nTJy8e yEcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b=RnpKEmUI; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u17si3494354wra.333.2018.04.13.13.49.16; Fri, 13 Apr 2018 13:49:17 -0700 (PDT) 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=@chromium.org header.s=google header.b=RnpKEmUI; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 15AC4689DAE; Fri, 13 Apr 2018 23:48:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb0-f181.google.com (mail-yb0-f181.google.com [209.85.213.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A871B689C67 for ; Fri, 13 Apr 2018 23:48:43 +0300 (EEST) Received: by mail-yb0-f181.google.com with SMTP id i13-v6so4924099ybl.4 for ; Fri, 13 Apr 2018 13:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=TqiyoVs8tamjNNWwq076+49mXOlJWtfdwN6VeXkcJfM=; b=RnpKEmUI/J0buf/AXHqgdblHZdvW2rAEV0O92T4mKMzhl97spqwaUD+oTAQENbv4pO ursvUvTn2NRJ0jXgAG3MnR54TnTH7CejJzVJg58quGl2ecCMpirn/TG47xoiB+vLTBL8 b/f7oCOiqBbDMGYwwxoZ/Net19N5Je+rfuXIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TqiyoVs8tamjNNWwq076+49mXOlJWtfdwN6VeXkcJfM=; b=abtGca1nDNjhUvlVvcrQwUR5EBq6SlzlyUYAT9o1kU9fMusNsPrjM+CtgcIsY+Up/7 91lnprz9M6by8f+p0igGkJFKmAarEX/zVM2Z2DiNvyFxpsTL1gulAPQJ1Qxvi5KsDn/F XUl0NH+t7xsNiwcQqLkeMshOjSDGDQsEnhC6OahAIhH4/dlHmO8TUZdZg71YKbjEJn5Q ePWfxTSPmIZMIQLb5w9OkYXTPigZM2yn3U4W2Uceh6qDM4CCQlEJr74UTuNUeiKyRmZQ qQ7zwQTgpAZZzWUX049ypMZf2JTJSex/PuXoEgbn/Ict1LQt5MQS17tXp4zg1h5fYvDg QzHA== X-Gm-Message-State: ALQs6tC3uPrDxpUfGmIfpBXj71s7gsMUnT4NU1B1KTVu0k0SBYVg6WRX X6LMBsImbZ48Yl9mIfnlCgsIsgpN9B4= X-Received: by 2002:a25:5188:: with SMTP id f130-v6mr6209770ybb.192.1523652226111; Fri, 13 Apr 2018 13:43:46 -0700 (PDT) Received: from mail-yb0-f172.google.com (mail-yb0-f172.google.com. [209.85.213.172]) by smtp.gmail.com with ESMTPSA id z20sm2775272ywj.70.2018.04.13.13.43.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 13:43:45 -0700 (PDT) Received: by mail-yb0-f172.google.com with SMTP id y5-v6so296632ybg.0 for ; Fri, 13 Apr 2018 13:43:45 -0700 (PDT) X-Received: by 2002:a5b:2c6:: with SMTP id h6-v6mr6062435ybp.324.1523652224925; Fri, 13 Apr 2018 13:43:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:2c4a:0:0:0:0:0 with HTTP; Fri, 13 Apr 2018 13:43:44 -0700 (PDT) From: Rahul Chaudhry Date: Fri, 13 Apr 2018 13:43:44 -0700 X-Gmail-Original-Message-ID: Message-ID: To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2. 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" When compiling for THUMB-2, the conditional branch to PLT results in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation in THUMB-2 (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Adding an "it eq" before the branch converts it into an unconditional branch, which uses R_ARM_THM_JUMP24 relocation that has a range of 16MB. See https://github.com/android-ndk/ndk/issues/337 for background. The current workaround is to disable neon during gstreamer build, which is not optimal and can be reverted after this patch. Rahul From 8dbb701398cf26a6a2f4686f871c5032dcbf1158 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Thu, 12 Apr 2018 16:27:31 -0700 Subject: [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2. When compiling for THUMB-2, the conditional branch to PLT results in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation in THUMB-2 (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Adding an "it eq" before the branch converts it into an unconditional branch, which uses R_ARM_THM_JUMP24 relocation that has a range of 16MB. --- libswresample/arm/audio_convert_neon.S | 1 + 1 file changed, 1 insertion(+) diff --git libswresample/arm/audio_convert_neon.S libswresample/arm/audio_convert_neon.S index 1f88316ddec838dfe791b08cbe72533207994741..bc933fb4bd00071702f553cc0f3e74797c33ab12 100644 --- libswresample/arm/audio_convert_neon.S +++ libswresample/arm/audio_convert_neon.S @@ -134,6 +134,7 @@ function swri_oldapi_conv_fltp_to_s16_nch_neon, export=1 itt lt ldrlt r1, [r1] blt X(swri_oldapi_conv_flt_to_s16_neon) + it eq beq X(swri_oldapi_conv_fltp_to_s16_2ch_neon) push {r4-r8, lr} -- 2.13.5