diff options
author | Matt Oliver <protogonoi@gmail.com> | 2014-05-07 14:16:26 +1000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-07 15:02:45 +0200 |
commit | 1898c2f49da3151fbce04ecf35971005707a609d (patch) | |
tree | 8a34d0bdd66b30c062c1a24d8bdf7b9759d40d2a /libavutil/x86 | |
parent | 134206ca7a3d395c827e6a041f7f01e5fb9e1693 (diff) | |
download | ffmpeg-1898c2f49da3151fbce04ecf35971005707a609d.tar.gz |
inline asm: fix arrays as named constraints.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/asm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/x86/asm.h b/libavutil/x86/asm.h index 5328e2bfc9..2cecc980a5 100644 --- a/libavutil/x86/asm.h +++ b/libavutil/x86/asm.h @@ -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 */ |