]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/x86/asm.h
Merge commit '7c5ca546a0747a20c7f7fb5550455c3042699ee9'
[ffmpeg] / libavutil / x86 / asm.h
index 5328e2bfc94c3e9544ffe55063dfec457b3ffd69..2cecc980a5b8d948cfbc0a6f453ea1d8fdc12fc0 100644 (file)
@@ -111,6 +111,8 @@ typedef int x86_reg;
 #   define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a)
 #   define NAMED_CONSTRAINTS_ADD(...)
 #   define NAMED_CONSTRAINTS(...)
+#   define NAMED_CONSTRAINTS_ARRAY_ADD(...)
+#   define NAMED_CONSTRAINTS_ARRAY(...)
 #else
     /* When direct symbol references are used in code passed to a compiler that does not support them
      *  then these references need to be converted to named asm constraints instead.
@@ -141,6 +143,10 @@ typedef int x86_reg;
 #   define NAMED_CONSTRAINTS_ADD(...) , FOR_EACH_VA(NAME_CONSTRAINT,__VA_ARGS__)
     // Same but without comma for when there are no previously defined constraints
 #   define NAMED_CONSTRAINTS(...) FOR_EACH_VA(NAME_CONSTRAINT,__VA_ARGS__)
+    // Same as above NAMED_CONSTRAINTS except used for passing arrays/pointers instead of normal variables
+#   define NAME_CONSTRAINT_ARRAY(x) [x] "m"(*x)
+#   define NAMED_CONSTRAINTS_ARRAY_ADD(...) , FOR_EACH_VA(NAME_CONSTRAINT_ARRAY,__VA_ARGS__)
+#   define NAMED_CONSTRAINTS_ARRAY(...) FOR_EACH_VA(NAME_CONSTRAINT_ARRAY,__VA_ARGS__)
 #endif
 
 #endif /* AVUTIL_X86_ASM_H */