aboutsummaryrefslogtreecommitdiff
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
commitd3a50e14198b40513ff5cebd62b8161bba9223fa (patch)
tree3630efb811c205daedd2bcb566d1eab49a81724e /gas/config/bfin-parse.y
parentfcbc2f09401545b9b5a8fc09d421a90377c6aa79 (diff)
downloadgdb-d3a50e14198b40513ff5cebd62b8161bba9223fa.zip
gdb-d3a50e14198b40513ff5cebd62b8161bba9223fa.tar.gz
gdb-d3a50e14198b40513ff5cebd62b8161bba9223fa.tar.bz2
* 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 72db6d9..719edaf 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