diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
commit | be1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch) | |
tree | 1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/test/Parser/asm-constraints-pr7869.c | |
parent | c4626a62754862d20b41e8a46a3574264ea80e6d (diff) | |
parent | f1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/Parser/asm-constraints-pr7869.c')
-rw-r--r-- | clang/test/Parser/asm-constraints-pr7869.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/clang/test/Parser/asm-constraints-pr7869.c b/clang/test/Parser/asm-constraints-pr7869.c new file mode 100644 index 0000000..db36991 --- /dev/null +++ b/clang/test/Parser/asm-constraints-pr7869.c @@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s + +int a, b, c, d, e, f, g, h, i, j, k, l; + +void +f1 (void) +{ + __asm__ volatile ("" + : [a] "+r" (a), [b] "+r" (b), [c] "+r" (c), [d] "+r" (d), + [e] "+r" (e), [f] "+r" (f), [g] "+r" (g), [h] "+r" (h), + [i] "+r" (i), [j] "+r" (j), [k] "+r" (k), [l] "+r" (l)); +} + +void +f2 (void) +{ + __asm__ volatile ("" + : [a] "+r,m" (a), [b] "+r,m" (b), [c] "+r,m" (c), [d] "+r,m" (d), + [e] "+r,m" (e), [f] "+r,m" (f), [g] "+r,m" (g), [h] "+r,m" (h), + [i] "+r,m" (i), [j] "+r,m" (j), [k] "+r,m" (k), [l] "+r,m" (l)); +} + +void +f3 (void) +{ + __asm__ volatile ("" + : [a] "=r" (a), [b] "=r" (b), [c] "=r" (c), [d] "=r" (d), + [e] "=r" (e), [f] "=r" (f), [g] "=r" (g), [h] "=r" (h), + [i] "=r" (i), [j] "=r" (j), [k] "=r" (k), [l] "=r" (l) + : "[a]" (a), "[b]" (b), "[c]" (c), "[d]" (d), + "[e]" (e), "[f]" (f), "[g]" (g), "[h]" (h), + "[i]" (i), "[j]" (j), "[k]" (k), "[l]" (l)); +} + +void +f4 (void) +{ + __asm__ volatile ("" + : [a] "=r,m" (a), [b] "=r,m" (b), [c] "=r,m" (c), [d] "=r,m" (d), + [e] "=r,m" (e), [f] "=r,m" (f), [g] "=r,m" (g), [h] "=r,m" (h), + [i] "=r,m" (i), [j] "=r,m" (j), [k] "=r,m" (k), [l] "=r,m" (l) + : "[a],m" (a), "[b],m" (b), "[c],m" (c), "[d],m" (d), + "[e],m" (e), "[f],m" (f), "[g],m" (g), "[h],m" (h), + "[i],m" (i), "[j],m" (j), "[k],m" (k), "[l],m" (l)); +} |