[x265] [PATCH 18 of 20] x86inc: Fix call with memory operands

vignesh at multicorewareinc.com vignesh at multicorewareinc.com
Mon Jun 12 07:38:00 CEST 2017


# HG changeset patch
# User Vignesh Vijayakumar
# Date 1496833029 -19800
#      Wed Jun 07 16:27:09 2017 +0530
# Node ID f90f9db1a86d6eccb0ce6859dc5498f32892b9d8
# Parent  c9cc85dda7c070800ad4f86a9c9ba82300b275da
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.

diff -r c9cc85dda7c0 -r f90f9db1a86d source/common/x86/x86inc.asm
--- a/source/common/x86/x86inc.asm	Wed Jun 07 11:33:40 2017 +0530
+++ b/source/common/x86/x86inc.asm	Wed Jun 07 16:27:09 2017 +0530
@@ -985,7 +985,11 @@
 
 ; 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 x265-devel mailing list