Browse Source
* 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.binutils-2_24-branch
8 changed files with 779 additions and 465 deletions
File diff suppressed because it is too large
@ -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' |
|||
@ -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 |
|||
Loading…
Reference in new issue