[FFmpeg-devel,1/5] x86inc: Fix call with memory operands

Submitted by James Darnley on June 8, 2017, 11:04 p.m.

Details

Message ID 20170608230502.29258-2-jdarnley@obe.tv
State New
Headers show

Commit Message

James Darnley June 8, 2017, 11:04 p.m.
From: Henrik Gramner <henrik@gramner.com>

We overload the `call` instruction with a macro, but it would misbehave when
the macro argument wasn't a valid identifier. Fix it by explicitly checking
if the argument is an identifier.
---
 libavutil/x86/x86inc.asm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Henrik Gramner June 9, 2017, 8:12 a.m.
On Fri, Jun 9, 2017 at 1:04 AM, James Darnley <jdarnley@obe.tv> wrote:
>  libavutil/x86/x86inc.asm | 6 +++++-

Bump the date in the header to 2017 as well. That was done in x264 as
part of an earlier commit but might as well squash it into this one.

Patch hide | download patch | download mbox

diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index 128ddc1089..f2a6a3f1db 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -1037,7 +1037,11 @@  INIT_XMM
 
 ; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't
 %macro call 1
-    call_internal %1 %+ SUFFIX, %1
+    %ifid %1
+        call_internal %1 %+ SUFFIX, %1
+    %else
+        call %1
+    %endif
 %endmacro
 %macro call_internal 2
     %xdefine %%i %2