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.
This commit is contained in:
parent
89565f1b17
commit
a92713e60e
8 changed files with 785 additions and 471 deletions
|
@ -1,3 +1,38 @@
|
|||
2013-07-14 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2013-07-14 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
* config/tc-mips.c (parse_float_constant): Split out from...
|
||||
|
|
1191
gas/config/tc-mips.c
1191
gas/config/tc-mips.c
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
|
9
gas/testsuite/gas/mips/micromips-ill.l
Normal file
9
gas/testsuite/gas/mips/micromips-ill.l
Normal file
|
@ -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'
|
9
gas/testsuite/gas/mips/micromips-ill.s
Normal file
9
gas/testsuite/gas/mips/micromips-ill.s
Normal file
|
@ -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
|
|
@ -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]
|
||||
|
|
|
@ -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}'
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue