summaryrefslogtreecommitdiff
path: root/gas/config/bfin-parse.y
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2009-09-03 15:36:02 +0000
committerJie Zhang <jie.zhang@analog.com>2009-09-03 15:36:02 +0000
commit73fcb4f4c5ce88bf5978e1618f57805f692fa8a7 (patch)
tree105259c04849b3056598098cb72988df8e436221 /gas/config/bfin-parse.y
parent81750ae6a22c8b17d3d33733b5a4097b44c0cfaf (diff)
downloadbinutils-redhat-73fcb4f4c5ce88bf5978e1618f57805f692fa8a7.tar.gz
* config/bfin-parse.y (asm_1): Add LOOP_BEGIN and LOOP_END.
* config/tc-bfin.c (bfin_start_line_hook): Remove. (bfin_loop_beginend): New. * config/tc-bfin.h (bfin_start_line_hook): Don't declare. (md_start_line_hook): Don't define. * config/bfin-aux.h (bfin_loop_beginend): Declare. testsuite/ * gas/bfin/loop.s, gas/bfin/loop.d: New test. * gas/bfin/loop2.s, gas/bfin/loop2.d: New test. * gas/bfin/loop3.s, gas/bfin/loop3.d: New test. * gas/bfin/bfin.exp: Add the new tests.
Diffstat (limited to 'gas/config/bfin-parse.y')
-rw-r--r--gas/config/bfin-parse.y21
1 files changed, 21 insertions, 0 deletions
diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y
index 72db6d9182..719edafd5d 100644
--- a/gas/config/bfin-parse.y
+++ b/gas/config/bfin-parse.y
@@ -3525,6 +3525,27 @@ asm_1:
else
return yyerror ("Bad register or values for LOOP");
}
+
+/* LOOP_BEGIN. */
+ | LOOP_BEGIN expr
+ {
+ if (!IS_RELOC ($2))
+ return yyerror ("Invalid expression in LOOP_BEGIN statement");
+
+ bfin_loop_beginend ($2, 1);
+ $$ = 0;
+ }
+
+/* LOOP_END. */
+ | LOOP_END expr
+ {
+ if (!IS_RELOC ($2))
+ return yyerror ("Invalid expression in LOOP_END statement");
+
+ bfin_loop_beginend ($2, 0);
+ $$ = 0;
+ }
+
/* pseudoDEBUG. */
| DBG