]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/commitdiff
Fix the incorrect diagnosics on illegal system registers.
authorYufeng Zhang <yufeng.zhang@arm.com>
Tue, 12 Feb 2013 14:39:54 +0000 (14:39 +0000)
committerYufeng Zhang <yufeng.zhang@arm.com>
Tue, 12 Feb 2013 14:39:54 +0000 (14:39 +0000)
gas/

* config/tc-aarch64.c (parse_operands): Change to compare the result
of function call 'parse_sys_reg' with 'PARSE_FAIL' instead of 'FALSE'.

gas/testsuite/

* gas/aarch64/diagnostic.s: Add test.
* gas/aarch64/diagnostic.l: Update.

gas/ChangeLog
gas/config/tc-aarch64.c
gas/testsuite/ChangeLog
gas/testsuite/gas/aarch64/diagnostic.l
gas/testsuite/gas/aarch64/diagnostic.s

index d08861f6a1adb2db7318b13dcbd6d5e0a55dbf14..b2de7ae05a65d3477fdce4b362e33ddd4261b851 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-12  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+       * config/tc-aarch64.c (parse_operands): Change to compare the result
+       of function call 'parse_sys_reg' with 'PARSE_FAIL' instead of 'FALSE'.
+
 2013-01-29  Roland McGrath  <mcgrathr@google.com>
 
        * config/tc-arm.c (md_apply_fix): Use as_bad_where for "bad
index b62bd7a788bc0b8eab232452648a2f456e552091..0ec40e7dad2a65f50826366f8c26ed320c6057f3 100644 (file)
@@ -1,6 +1,7 @@
 /* tc-aarch64.c -- Assemble for the AArch64 ISA
 
-   Copyright 2009, 2010, 2011, 2012  Free Software Foundation, Inc.
+   Copyright 2009, 2010, 2011, 2012, 2013
+   Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GAS.
@@ -5003,7 +5004,8 @@ parse_operands (char *str, const aarch64_opcode *opcode)
          break;
 
        case AARCH64_OPND_SYSREG:
-         if ((val = parse_sys_reg (&str, aarch64_sys_regs_hsh, 1)) == FALSE)
+         if ((val = parse_sys_reg (&str, aarch64_sys_regs_hsh, 1))
+             == PARSE_FAIL)
            {
              set_syntax_error (_("unknown or missing system register name"));
              goto failure;
@@ -5012,7 +5014,8 @@ parse_operands (char *str, const aarch64_opcode *opcode)
          break;
 
        case AARCH64_OPND_PSTATEFIELD:
-         if ((val = parse_sys_reg (&str, aarch64_pstatefield_hsh, 0)) == FALSE)
+         if ((val = parse_sys_reg (&str, aarch64_pstatefield_hsh, 0))
+             == PARSE_FAIL)
            {
              set_syntax_error (_("unknown or missing PSTATE field name"));
              goto failure;
index ecaf9e651daa905dc1d8e0d69bb6d199f7297f89..e6553639fc06e32bf6e6d8eed9dd3a7907c7be6d 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-12  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+       * gas/aarch64/diagnostic.s: Add test.
+       * gas/aarch64/diagnostic.l: Update.
+
 2013-02-12  Yufeng Zhang  <yufeng.zhang@arm.com>
 
        * gas/aarch64/int-insns.d: Update.
index 714a2f0514ccdf0cb2c6c03423668d361d80d045..cd8b3e2b753afca8e06701a76b7c79c6b15ceaa8 100644 (file)
@@ -85,3 +85,4 @@
 [^:]*:87: Error: immediate offset out of range -256 to 252 at operand 3 -- `ldnp w7,w15,\[x3,#256\]'
 [^:]*:88: Error: shift is not permitted at operand 2 -- `movi v1.2d,4294967295,lsl#0'
 [^:]*:89: Error: shift amount non-zero at operand 2 -- `movi v1.8b,97,lsl#8'
+[^:]*:90: Error: unknown or missing system register name at operand 1 -- `msr dummy,x1'
index 2b1c01c00e02599685bb5a99109c24da06e1d3d6..1fa1b7426f38e4f2c58bc075f606dfd4790ef4ad 100644 (file)
@@ -87,3 +87,4 @@
        ldnp    w7, w15, [x3, #256]
        movi    v1.2d, 4294967295, lsl #0
        movi    v1.8b, 97, lsl #8
+       msr     dummy, x1