summaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2013-07-14 14:16:02 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2013-07-14 14:16:02 +0000
commitf17c776c50d972d2de6ca4d281b448e8d8854699 (patch)
tree3cb65251ffecf93512013e883cd7f031a7d1ad55 /gas/testsuite
parent1c3af6e27747c5dc383924f1b95099e535ee6f86 (diff)
downloadbinutils-redhat-f17c776c50d972d2de6ca4d281b448e8d8854699.tar.gz
gas/
* config/tc-mips.c (mips_prefer_vec_regno, mips_parse_register): New functions, split out from... (reg_lookup): ...here. Remove itbl support. (reglist_lookup): Delete. (mips_operand_token_type): New enum. (mips_operand_token): New structure. (mips_operand_tokens): New variable. (mips_add_token, mips_parse_base_start, mips_parse_argument_token) (mips_parse_arguments): New functions. (md_begin): Initialize mips_operand_tokens. (mips_arg_info): Add a token field. Remove optional_reg field. (match_char, match_expression): New functions. (match_const_int): Use match_expression. Remove "s" argument and return a boolean result. Remove O_register handling. (match_regno, match_reg, match_reg_range): New functions. (match_int_operand, match_mapped_int_operand, match_msb_operand) (match_reg_operand, match_reg_pair_operand, match_perf_reg_operand) (match_addiusp_operand, match_clo_clz_dest_operand) (match_lwm_swm_list_operand, match_entry_exit_operand) (match_save_restore_list_operand, match_mdmx_imm_reg_operand) (match_tied_reg_operand): Remove "s" argument and return a boolean result. Match tokens rather than text. Update calls to match_const_int. Rely on match_regno to call check_regno. (match_pcrel_operand, match_pc_operand): Replace "s" argument with "arg" argument. Return a boolean result. (parse_float_constant): Replace with... (match_float_constant): ...this new function. (match_operand): Remove "s" argument and return a boolean result. Update calls to subfunctions. (mips_ip, mips16_ip): Call mips_parse_arguments. Use match routines rather than string-parsing routines. Update handling of optional registers for token scheme. gas/testsuite/ * gas/mips/vr5400-ill.s, gas/mips/vr5400-ill.l: Add some more cases. * gas/mips/micromips-ill.s, gas/mips/micromips-ill.l: New test. * gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/micromips-ill.l9
-rw-r--r--gas/testsuite/gas/mips/micromips-ill.s9
-rw-r--r--gas/testsuite/gas/mips/mips.exp1
-rw-r--r--gas/testsuite/gas/mips/vr5400-ill.l2
-rw-r--r--gas/testsuite/gas/mips/vr5400-ill.s3
6 files changed, 30 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 47b2f0378b..45fe092323 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2013-07-14 Richard Sandiford <rdsandiford@googlemail.com>
+ * gas/mips/vr5400-ill.s, gas/mips/vr5400-ill.l: Add some more cases.
+ * gas/mips/micromips-ill.s, gas/mips/micromips-ill.l: New test.
+ * gas/mips/mips.exp: Run it.
+
+2013-07-14 Richard Sandiford <rdsandiford@googlemail.com>
+
* gas/mips/at-2.l: Remove duplicated $at warnings.
* gas/mips/ext-ill.l, gas/mips/lui-1.l, gas/mips/mips32r2-ill.l,
gas/mips/mips32r2-ill-nofp.l, gas/mips/mips32r2-ill-fp64.l,
diff --git a/gas/testsuite/gas/mips/micromips-ill.l b/gas/testsuite/gas/mips/micromips-ill.l
new file mode 100644
index 0000000000..8471f1fab0
--- /dev/null
+++ b/gas/testsuite/gas/mips/micromips-ill.l
@@ -0,0 +1,9 @@
+.*: Assembler messages:
+.*:2: Error: Invalid register range `lwm \$16-17,0\(\$4\)'
+.*:3: Error: Illegal operands `lwm \$17-\$16,0\(\$4\)'
+.*:4: Error: Illegal operands `lwm \$16-\$f17,0\(\$4\)'
+.*:5: Error: Illegal operands `lwm \$f16-\$17,0\(\$4\)'
+.*:6: Error: Illegal operands `li\.s \$4,foo'
+.*:7: Error: cannot create floating-point number
+.*:8: Error: Illegal operands `li\.s \$4,\$4'
+.*:9: Error: Illegal operands `li\.s 1.0'
diff --git a/gas/testsuite/gas/mips/micromips-ill.s b/gas/testsuite/gas/mips/micromips-ill.s
new file mode 100644
index 0000000000..e9987f6a1c
--- /dev/null
+++ b/gas/testsuite/gas/mips/micromips-ill.s
@@ -0,0 +1,9 @@
+ .set micromips
+ lwm $16-17,0($4)
+ lwm $17-$16,0($4)
+ lwm $16-$f17,0($4)
+ lwm $f16-$17,0($4)
+ li.s $4,foo
+ li.s $4,2.0e1000
+ li.s $4,$4
+ li.s 1.0
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 73127dd2e3..cc6946760f 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -1102,6 +1102,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "micromips-warn-branch-delay"
run_dump_test "micromips-warn-branch-delay-1"
run_dump_test "micromips-b16"
+ run_list_test "micromips-ill"
run_dump_test_arches "mcu" [mips_arch_list_matching mips32r2 \
!octeon]
diff --git a/gas/testsuite/gas/mips/vr5400-ill.l b/gas/testsuite/gas/mips/vr5400-ill.l
index 1351947a3c..0554c8aa52 100644
--- a/gas/testsuite/gas/mips/vr5400-ill.l
+++ b/gas/testsuite/gas/mips/vr5400-ill.l
@@ -11,3 +11,5 @@
.*:21: Error: Illegal operands `add.ob \$f2,\$v4,\$f6\[1\]'
.*:22: Error: Illegal operands `add.ob \$f2,\$f4,\$v6\[1\]'
.*:23: Error: Illegal operands `add.ob \$v2,\$v4,\$v6\[1\]'
+.*:25: Error: Vector element must be constant `add.ob \$f2,\$f4,\$f6\[foo\]'
+.*:26: Error: Missing `\]' `add.ob \$f2,\$f4,\$f6\[1}'
diff --git a/gas/testsuite/gas/mips/vr5400-ill.s b/gas/testsuite/gas/mips/vr5400-ill.s
index 88a48da4c2..ff7cb54e68 100644
--- a/gas/testsuite/gas/mips/vr5400-ill.s
+++ b/gas/testsuite/gas/mips/vr5400-ill.s
@@ -21,3 +21,6 @@
add.ob $f2,$v4,$f6[1]
add.ob $f2,$f4,$v6[1]
add.ob $v2,$v4,$v6[1]
+
+ add.ob $f2,$f4,$f6[foo]
+ add.ob $f2,$f4,$f6[1}