diff options
author | Richard Henderson <rth@redhat.com> | 2001-12-23 22:15:31 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-12-23 22:15:31 -0800 |
commit | 7abcb63a4201377eaf76df5eb4d18265f3848818 (patch) | |
tree | 88ce145b6021c196dc1ca65dc4fcae3d5145d98d /gcc | |
parent | 6be2e1f88c80e2cb686d02ac55a518b819900ead (diff) | |
download | gcc-7abcb63a4201377eaf76df5eb4d18265f3848818.zip gcc-7abcb63a4201377eaf76df5eb4d18265f3848818.tar.gz gcc-7abcb63a4201377eaf76df5eb4d18265f3848818.tar.bz2 |
stmt.c (resolve_operand_names): Handle operand modifiers.
* stmt.c (resolve_operand_names): Handle operand modifiers.
* gcc.dg/asm-4.c: Test operand modifiers.
From-SVN: r48299
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/stmt.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/asm-4.c | 6 |
4 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4996eb1..7df5b18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2001-12-23 Richard Henderson <rth@redhat.com> + * stmt.c (resolve_operand_names): Handle operand modifiers. + +2001-12-23 Richard Henderson <rth@redhat.com> + * stmt.c (parse_input_constraint): Break out from ... (expand_asm_operands): ... here. Loop over the operands twice, the first time only calling mark_addressable. Correct and simplify @@ -2080,8 +2080,16 @@ resolve_operand_names (string, outputs, inputs, pconstraints) p = buffer; while ((p = strchr (p, '%')) != NULL) { - if (*++p != '[') - continue; + if (p[1] == '[') + p += 1; + else if (ISALPHA (p[1]) && p[2] == '[') + p += 2; + else + { + p += 1; + continue; + } + p = resolve_operand_name_1 (p, outputs, inputs); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1b6eb89..cddb9ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2001-12-23 Richard Henderson <rth@redhat.com> + * gcc.dg/asm-4.c: Test operand modifiers. + +2001-12-23 Richard Henderson <rth@redhat.com> + * gcc.c-torture/execute/20011219-1.c (main): Make "i" a long. 2001-12-23 Joseph S. Myers <jsm28@cam.ac.uk> diff --git a/gcc/testsuite/gcc.dg/asm-4.c b/gcc/testsuite/gcc.dg/asm-4.c index 662f5d5..862888a 100644 --- a/gcc/testsuite/gcc.dg/asm-4.c +++ b/gcc/testsuite/gcc.dg/asm-4.c @@ -3,12 +3,14 @@ int main() { - int x; + int x, y, z; asm volatile ("test0 X%0Y%[arg]Z" : [arg] "=g" (x)); - asm volatile ("test1 X%[out]Y%[in]Z" : [out] "=g" (x) : [in] "0"(x)); + asm volatile ("test1 X%[out]Y%[in]Z" : [out] "=g" (y) : [in] "0"(y)); + asm volatile ("test2 X%a0Y%a[arg]Z" : : [arg] "p" (&z)); } /* ??? Someone explain why the back reference dosn't work. */ /* { dontdg-final { scan-assembler "test0 X(.*)Y\1Z" } } */ /* { dontdg-final { scan-assembler "test1 X(.*)Y\1Z" } } */ +/* { dontdg-final { scan-assembler "test2 X(.*)Y\1Z" } } */ |