From 44dc3264c899005349d14c2e62fddbc5304e00ec Mon Sep 17 00:00:00 2001 From: jiez Date: Fri, 22 Aug 2008 07:21:48 +0000 Subject: [PATCH] * config/bfin-lex.l (NUMBER): Protect special `.'. testsuite/ * gas/bfin/misc.s: New test. * gas/bfin/misc.d: New test. * gas/bfin/bfin.exp: Add misc test. --- gas/ChangeLog | 4 ++++ gas/config/bfin-lex.l | 2 +- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/bfin/bfin.exp | 1 + gas/testsuite/gas/bfin/misc.d | 9 +++++++++ gas/testsuite/gas/bfin/misc.s | 6 ++++++ 6 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/bfin/misc.d create mode 100644 gas/testsuite/gas/bfin/misc.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 3066c52f49..5ab7202142 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2008-08-22 Jie Zhang + + * config/bfin-lex.l (NUMBER): Protect special `.'. + 2008-08-22 Alan Modra * symbols.c (symbol_clone): Ensure clones are not external. diff --git a/gas/config/bfin-lex.l b/gas/config/bfin-lex.l index b2194dbfc5..d74c7f3957 100644 --- a/gas/config/bfin-lex.l +++ b/gas/config/bfin-lex.l @@ -293,7 +293,7 @@ abort return ABORT; [iI][fF][lL][uU][sS][hH] return IFLUSH; [fF][lL][uU][sS][hH][iI][nN][vV] return FLUSHINV; [fF][lL][uU][sS][hH] return FLUSH; -([0-9]+)|(0[xX][0-9a-fA-F]+)|([bhfodBHOFD]#[0-9a-fA-F]+)|(0.[0-9]+) { +([0-9]+)|(0[xX][0-9a-fA-F]+)|([bhfodBHOFD]#[0-9a-fA-F]+)|(0"."[0-9]+) { yylval.value = parse_int (&yytext); return NUMBER; } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 03f64458f0..633a4b4732 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-08-22 Jie Zhang + + * gas/bfin/misc.s: New test. + * gas/bfin/misc.d: New test. + * gas/bfin/bfin.exp: Add misc test. + 2008-08-21 Richard Henderson * gas/cfi/cfi-common-1.d: Allow for differing offsets, and diff --git a/gas/testsuite/gas/bfin/bfin.exp b/gas/testsuite/gas/bfin/bfin.exp index 2b8975be74..e446346399 100644 --- a/gas/testsuite/gas/bfin/bfin.exp +++ b/gas/testsuite/gas/bfin/bfin.exp @@ -18,6 +18,7 @@ if [istarget bfin*-*-*] { run_dump_test "load" run_dump_test "logical" run_dump_test "logical2" + run_dump_test "misc" run_dump_test "move" run_dump_test "move2" run_dump_test "parallel" diff --git a/gas/testsuite/gas/bfin/misc.d b/gas/testsuite/gas/bfin/misc.d new file mode 100644 index 0000000000..6e0ff49aa3 --- /dev/null +++ b/gas/testsuite/gas/bfin/misc.d @@ -0,0 +1,9 @@ +#objdump: -d +#name: misc +.*: +file format .* + +Disassembly of section .text: + +00000000 <_misc>: + 0: 00 e1 00 00 R0.L = 0x0;.* + diff --git a/gas/testsuite/gas/bfin/misc.s b/gas/testsuite/gas/bfin/misc.s new file mode 100644 index 0000000000..c2f7376a81 --- /dev/null +++ b/gas/testsuite/gas/bfin/misc.s @@ -0,0 +1,6 @@ + .text + .global _misc +_misc: + /* Check "0 & 0xffff" is parsed correctly. */ + r0.l = 0 & 0xffff; + -- 2.11.0