diff options
author | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
---|---|---|
committer | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
commit | 222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch) | |
tree | 7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/Parser/asm-constraints-pr7869.c | |
parent | 3d206f03985b50beacae843d880bccdc91a9f424 (diff) |
Add the clang library to the repo (with some of my changes, too).
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)); +} |