From patchwork Mon Nov 14 10:32:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 1420 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp975280vsb; Mon, 14 Nov 2016 02:50:39 -0800 (PST) X-Received: by 10.194.79.5 with SMTP id f5mr22223318wjx.13.1479120638954; Mon, 14 Nov 2016 02:50:38 -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 o7si11158589wjw.219.2016.11.14.02.50.38; Mon, 14 Nov 2016 02:50:38 -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=@martin-st.20150623.gappssmtp.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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F3210689D3F; Mon, 14 Nov 2016 12:50:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55141689CD9 for ; Mon, 14 Nov 2016 12:50:31 +0200 (EET) Received: by mail-lf0-f67.google.com with SMTP id o141so6642987lff.1 for ; Mon, 14 Nov 2016 02:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=afDVYw1d2n7A0xCIy86GbxdDfnaT51d5JRalJNBEs6Q=; b=zw0vou650pMvhL9paP1lmL5b/oN7ciCYN1tRD61cEFUcIdaXZGnOCc1+hDfeFbNPip sssHX8SxH7OQtfSFZzDpPDpipX9YaivXhvEEUXm9DiIfS5vJXAKfQAiAu3B8ooU4MBxh jbUJ0slIKJpqS499EqYoelxOR5CVb9W/9YhRgaqxcXMvU9WZA8MJPlcE48mSkxVEVxpj 1UUJLlQ/nQ27GA/MT1IbWhjusfJO4BXVOr3qDkxg9v1DQffhYD9CxG5IScg+j4q5lsk5 fBUDJaysrmfl1UQvDS+tW7hvrta/mCpOW2qA6dR0MLgUCpVOOCS3jIxz6cX4zZyX+1ei iQog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=afDVYw1d2n7A0xCIy86GbxdDfnaT51d5JRalJNBEs6Q=; b=goodLKrftHlpQXR1yfjHLl1iBTyN4SDV70RX6/3aKSuGQjkwsT0Jn9A2TAwh0HXeaH HMN5HFxtiVjcvVTVBACoRMsZsoYypDPYgmEd2erBQxe85cx7LWxNUaHpaLvhYLX1G4Cz uh+EkuwaSDtdLxh0dMnIMxVAe9PewrPLbuSmxxoofW/WvmczPjSpUToPy5CAwu+RCso9 LKwk8LgiqKbScZeXP7rSt+Aqlkojxjzm/stSZK6yD/+4nNzmEAhXY22MneL7rVyS9j83 s9KLMnG8psm5iZhiBxmcYjwL8VveoBkeSO8O8UxPwHwsFoqb3GK74sYGHz3FWNjK16eT 2xKg== X-Gm-Message-State: ABUngvfCHYYWjUOVBjHfJwqewMrv/SJVi1TcilPWWNUpDoNH6J3h7ZYNODijBs3aDRZNAA== X-Received: by 10.25.37.134 with SMTP id l128mr6142089lfl.120.1479119550347; Mon, 14 Nov 2016 02:32:30 -0800 (PST) Received: from localhost.localdomain ([2001:470:28:852:907f:a7ad:5ca8:25a7]) by smtp.gmail.com with ESMTPSA id w67sm4845727lff.16.2016.11.14.02.32.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Nov 2016 02:32:29 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 14 Nov 2016 12:32:20 +0200 Message-Id: <1479119547-7392-2-git-send-email-martin@martin.st> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479119547-7392-1-git-send-email-martin@martin.st> References: <1479119547-7392-1-git-send-email-martin@martin.st> Subject: [FFmpeg-devel] [PATCH 2/9] arm: Clear the gp register alias at the end of functions 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" We reset .Lpic_gp to zero at the start of each function, which means that the logic within movrelx for clearing gp when necessary will be missed. This fixes using movrelx in different functions with a different helper register. This is cherry-picked from libav commit 824e8c284054f323f854892d1b4739239ed1fdc7. --- libavutil/arm/asm.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index e9b0bca..b0a6e50 100644 --- a/libavutil/arm/asm.S +++ b/libavutil/arm/asm.S @@ -77,6 +77,9 @@ ELF .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable put_pic %(.Lpic_idx - 1) .noaltmacro .endif + .if .Lpic_gp + .unreq gp + .endif ELF .size \name, . - \name FUNC .endfunc .purgem endfunc