[x264-devel] x86inc: Fix call with memory operands

Henrik Gramner git at videolan.org
Mon May 22 00:00:55 CEST 2017


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Wed Mar 29 16:43:57 2017 +0200| [50a9dd78263191474c948d53e837348abd0bf316] | committer: Henrik Gramner

x86inc: Fix call with memory operands

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.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=50a9dd78263191474c948d53e837348abd0bf316
---

 common/x86/x86inc.asm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index 03304c4a..6c2edf9a 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -1032,7 +1032,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



More information about the x264-devel mailing list