This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas/ARM - tidy up of syntax-parsing sub-functions
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: binutils at sources dot redhat dot com, nickc at redhat dot com
- Cc: Richard dot Earnshaw at arm dot com
- Date: Wed, 05 Dec 2001 13:14:23 +0000
- Subject: gas/ARM - tidy up of syntax-parsing sub-functions
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
The FLAGS arguments to the routines that parse the individual opcodes is
now redundant. This patch removes it entirely, and cleans up the
prototype warnings.
R.
<date> Richard Earnshaw (rearnsha@arm.com)
* tc-arm.c (do_arit, do_cmp, do_mov, do_ldst, do_ldstt, do_ldmstm)
(do_branch, do_swi, do_adr, do_adrl, do_empty, do_mul, do_mla)
(do_swap, do_msr, do_mrs, do_mull, do_ldstv4, do_bx, do_blx)
(do_bkpt, do_clz, do_lstc2, do_cdp2, do_co_reg2, do_smla, do_smlal)
(do_smul, do_qadd, do_pld, do_ldrd, do_co_reg2c, do_cdp, do_lstc)
(do_co_reg, do_fpa_ctrl, do_fpa_ldst, do_fpa_ldmstm, do_fpa_monadic)
(do_fpa_dyadic, do_fpa_cmp, do_fpa_from_reg, do_fpa_to_reg, do_mia)
(do_mar, do_mra, do_c_binops, do_c_binops_1, do_c_binops_2)
(do_c_binops_3, do_c_triple, do_c_triple_4, do_c_triple_5, do_c_quad)
(do_c_quad_6, do_c_dspsc, do_c_dspsc_1, do_c_dspsc_2, do_c_shift)
(do_c_shift_1, do_c_shift_2, do_c_ldst, do_c_ldst_1, do_c_ldst_2)
(do_c_ldst_3, do_c_ldst_4, do_branch25): Delete redundant argument,
FLAGS.
(struct asm_opcode): Adjust parms field accordingly.
(md_assemble): Don't pass dummy second argument when calling worker
functions.
(build_arm_ops_hsh): Add prototype
(BAD_FLAGS): Delete.
Index: tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.104
diff -p -r1.104 tc-arm.c
*** tc-arm.c 2001/12/05 11:59:26 1.104
--- tc-arm.c 2001/12/05 13:13:03
*************** enum cirrus_regtype
*** 481,580 ****
/* Functions called by parser. */
/* ARM instructions. */
! static void do_arit PARAMS ((char *, unsigned long));
! static void do_cmp PARAMS ((char *, unsigned long));
! static void do_mov PARAMS ((char *, unsigned long));
! static void do_ldst PARAMS ((char *, unsigned long));
! static void do_ldstt PARAMS ((char *, unsigned long));
! static void do_ldmstm PARAMS ((char *, unsigned long));
! static void do_branch PARAMS ((char *, unsigned long));
! static void do_swi PARAMS ((char *, unsigned long));
/* Pseudo Op codes. */
! static void do_adr PARAMS ((char *, unsigned long));
! static void do_adrl PARAMS ((char *, unsigned long));
! static void do_empty PARAMS ((char *, unsigned long));
/* ARM v2. */
! static void do_mul PARAMS ((char *, unsigned long));
! static void do_mla PARAMS ((char *, unsigned long));
/* ARM v2S. */
! static void do_swap PARAMS ((char *, unsigned long));
/* ARM v3. */
! static void do_msr PARAMS ((char *, unsigned long));
! static void do_mrs PARAMS ((char *, unsigned long));
/* ARM v3M. */
! static void do_mull PARAMS ((char *, unsigned long));
/* ARM v4. */
! static void do_ldstv4 PARAMS ((char *, unsigned long));
/* ARM v4T. */
! static void do_bx PARAMS ((char *, unsigned long));
/* ARM v5. */
! static void do_blx PARAMS ((char *, unsigned long));
! static void do_bkpt PARAMS ((char *, unsigned long));
! static void do_clz PARAMS ((char *, unsigned long));
! static void do_lstc2 PARAMS ((char *, unsigned long));
! static void do_cdp2 PARAMS ((char *, unsigned long));
! static void do_co_reg2 PARAMS ((char *, unsigned long));
/* ARM v5ExP. */
! static void do_smla PARAMS ((char *, unsigned long));
! static void do_smlal PARAMS ((char *, unsigned long));
! static void do_smul PARAMS ((char *, unsigned long));
! static void do_qadd PARAMS ((char *, unsigned long));
/* ARM v5E. */
! static void do_pld PARAMS ((char *, unsigned long));
! static void do_ldrd PARAMS ((char *, unsigned long));
! static void do_co_reg2c PARAMS ((char *, unsigned long));
/* Coprocessor Instructions. */
! static void do_cdp PARAMS ((char *, unsigned long));
! static void do_lstc PARAMS ((char *, unsigned long));
! static void do_co_reg PARAMS ((char *, unsigned long));
/* FPA instructions. */
! static void do_fpa_ctrl PARAMS ((char *, unsigned long));
! static void do_fpa_ldst PARAMS ((char *, unsigned long));
! static void do_fpa_ldmstm PARAMS ((char *, unsigned long));
! static void do_fpa_dyadic PARAMS ((char *, unsigned long));
! static void do_fpa_monadic PARAMS ((char *, unsigned long));
! static void do_fpa_cmp PARAMS ((char *, unsigned long));
! static void do_fpa_from_reg PARAMS ((char *, unsigned long));
! static void do_fpa_to_reg PARAMS ((char *, unsigned long));
/* XScale. */
! static void do_mia PARAMS ((char *, unsigned long));
! static void do_mar PARAMS ((char *, unsigned long));
! static void do_mra PARAMS ((char *, unsigned long));
!
! /* ARM_EXT_MAVERICK. */
! static void do_c_binops PARAMS ((char *, unsigned long, int));
! static void do_c_binops_1 PARAMS ((char *, unsigned long));
! static void do_c_binops_2 PARAMS ((char *, unsigned long));
! static void do_c_binops_3 PARAMS ((char *, unsigned long));
! static void do_c_triple PARAMS ((char *, unsigned long, int));
! static void do_c_triple_4 PARAMS ((char *, unsigned long));
! static void do_c_triple_5 PARAMS ((char *, unsigned long));
! static void do_c_quad PARAMS ((char *, unsigned long, int));
! static void do_c_quad_6 PARAMS ((char *, unsigned long));
! static void do_c_dspsc PARAMS ((char *, unsigned long, int));
! static void do_c_dspsc_1 PARAMS ((char *, unsigned long));
! static void do_c_dspsc_2 PARAMS ((char *, unsigned long));
! static void do_c_shift PARAMS ((char *, unsigned long, int));
! static void do_c_shift_1 PARAMS ((char *, unsigned long));
! static void do_c_shift_2 PARAMS ((char *, unsigned long));
! static void do_c_ldst PARAMS ((char *, unsigned long, int));
! static void do_c_ldst_1 PARAMS ((char *, unsigned long));
! static void do_c_ldst_2 PARAMS ((char *, unsigned long));
! static void do_c_ldst_3 PARAMS ((char *, unsigned long));
! static void do_c_ldst_4 PARAMS ((char *, unsigned long));
static int cirrus_reg_required_here PARAMS ((char **, int,
enum cirrus_regtype));
static int cirrus_valid_reg PARAMS ((int, enum cirrus_regtype));
--- 481,580 ----
/* Functions called by parser. */
/* ARM instructions. */
! static void do_arit PARAMS ((char *));
! static void do_cmp PARAMS ((char *));
! static void do_mov PARAMS ((char *));
! static void do_ldst PARAMS ((char *));
! static void do_ldstt PARAMS ((char *));
! static void do_ldmstm PARAMS ((char *));
! static void do_branch PARAMS ((char *));
! static void do_swi PARAMS ((char *));
/* Pseudo Op codes. */
! static void do_adr PARAMS ((char *));
! static void do_adrl PARAMS ((char *));
! static void do_empty PARAMS ((char *));
/* ARM v2. */
! static void do_mul PARAMS ((char *));
! static void do_mla PARAMS ((char *));
/* ARM v2S. */
! static void do_swap PARAMS ((char *));
/* ARM v3. */
! static void do_msr PARAMS ((char *));
! static void do_mrs PARAMS ((char *));
/* ARM v3M. */
! static void do_mull PARAMS ((char *));
/* ARM v4. */
! static void do_ldstv4 PARAMS ((char *));
/* ARM v4T. */
! static void do_bx PARAMS ((char *));
/* ARM v5. */
! static void do_blx PARAMS ((char *));
! static void do_bkpt PARAMS ((char *));
! static void do_clz PARAMS ((char *));
! static void do_lstc2 PARAMS ((char *));
! static void do_cdp2 PARAMS ((char *));
! static void do_co_reg2 PARAMS ((char *));
/* ARM v5ExP. */
! static void do_smla PARAMS ((char *));
! static void do_smlal PARAMS ((char *));
! static void do_smul PARAMS ((char *));
! static void do_qadd PARAMS ((char *));
/* ARM v5E. */
! static void do_pld PARAMS ((char *));
! static void do_ldrd PARAMS ((char *));
! static void do_co_reg2c PARAMS ((char *));
/* Coprocessor Instructions. */
! static void do_cdp PARAMS ((char *));
! static void do_lstc PARAMS ((char *));
! static void do_co_reg PARAMS ((char *));
/* FPA instructions. */
! static void do_fpa_ctrl PARAMS ((char *));
! static void do_fpa_ldst PARAMS ((char *));
! static void do_fpa_ldmstm PARAMS ((char *));
! static void do_fpa_dyadic PARAMS ((char *));
! static void do_fpa_monadic PARAMS ((char *));
! static void do_fpa_cmp PARAMS ((char *));
! static void do_fpa_from_reg PARAMS ((char *));
! static void do_fpa_to_reg PARAMS ((char *));
/* XScale. */
! static void do_mia PARAMS ((char *));
! static void do_mar PARAMS ((char *));
! static void do_mra PARAMS ((char *));
!
! /* Maverick. */
! static void do_c_binops PARAMS ((char *, int));
! static void do_c_binops_1 PARAMS ((char *));
! static void do_c_binops_2 PARAMS ((char *));
! static void do_c_binops_3 PARAMS ((char *));
! static void do_c_triple PARAMS ((char *, int));
! static void do_c_triple_4 PARAMS ((char *));
! static void do_c_triple_5 PARAMS ((char *));
! static void do_c_quad PARAMS ((char *, int));
! static void do_c_quad_6 PARAMS ((char *));
! static void do_c_dspsc PARAMS ((char *, int));
! static void do_c_dspsc_1 PARAMS ((char *));
! static void do_c_dspsc_2 PARAMS ((char *));
! static void do_c_shift PARAMS ((char *, int));
! static void do_c_shift_1 PARAMS ((char *));
! static void do_c_shift_2 PARAMS ((char *));
! static void do_c_ldst PARAMS ((char *, int));
! static void do_c_ldst_1 PARAMS ((char *));
! static void do_c_ldst_2 PARAMS ((char *));
! static void do_c_ldst_3 PARAMS ((char *));
! static void do_c_ldst_4 PARAMS ((char *));
static int cirrus_reg_required_here PARAMS ((char **, int,
enum cirrus_regtype));
static int cirrus_valid_reg PARAMS ((int, enum cirrus_regtype));
*************** static void thumb_add_sub PARAMS ((char
*** 616,628 ****
static void insert_reg PARAMS ((int));
static void thumb_shift PARAMS ((char *, int));
static void thumb_mov_compare PARAMS ((char *, int));
static void set_constant_flonums PARAMS ((void));
static valueT md_chars_to_number PARAMS ((char *, int));
static void insert_reg_alias PARAMS ((char *, int));
static void output_inst PARAMS ((void));
static int accum0_required_here PARAMS ((char **));
static int ld_mode_required_here PARAMS ((char **));
! static void do_branch25 PARAMS ((char *, unsigned long));
static symbolS * find_real_start PARAMS ((symbolS *));
#ifdef OBJ_ELF
static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
--- 616,629 ----
static void insert_reg PARAMS ((int));
static void thumb_shift PARAMS ((char *, int));
static void thumb_mov_compare PARAMS ((char *, int));
+ static void build_arm_ops_hsh PARAMS ((void));
static void set_constant_flonums PARAMS ((void));
static valueT md_chars_to_number PARAMS ((char *, int));
static void insert_reg_alias PARAMS ((char *, int));
static void output_inst PARAMS ((void));
static int accum0_required_here PARAMS ((char **));
static int ld_mode_required_here PARAMS ((char **));
! static void do_branch25 PARAMS ((char *));
static symbolS * find_real_start PARAMS ((symbolS *));
#ifdef OBJ_ELF
static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
*************** struct asm_opcode
*** 666,672 ****
unsigned long variant;
/* Function to call to parse args. */
! void (* parms) PARAMS ((char *, unsigned long));
};
static const struct asm_opcode insns[] =
--- 667,673 ----
unsigned long variant;
/* Function to call to parse args. */
! void (* parms) PARAMS ((char *));
};
static const struct asm_opcode insns[] =
*************** static const struct asm_opcode insns[] =
*** 779,785 ****
NickC: but this is wrong because the bits 16 through 19 are
handled by the PSR_xxx defines above. */
! /* ARM 7M long multiplies - need signed/unsigned flags! */
{"smull", 0xe0c00090, 5, ARM_EXT_V3M, do_mull},
{"smulls", 0xe0d00090, 5, ARM_EXT_V3M, do_mull},
{"umull", 0xe0800090, 5, ARM_EXT_V3M, do_mull},
--- 780,786 ----
NickC: but this is wrong because the bits 16 through 19 are
handled by the PSR_xxx defines above. */
! /* ARM 7M long multiplies. */
{"smull", 0xe0c00090, 5, ARM_EXT_V3M, do_mull},
{"smulls", 0xe0d00090, 5, ARM_EXT_V3M, do_mull},
{"umull", 0xe0800090, 5, ARM_EXT_V3M, do_mull},
*************** static const struct reg_entry reg_table[
*** 1688,1694 ****
#define BAD_ARGS _("Bad arguments to instruction")
#define BAD_PC _("r15 not allowed here")
- #define BAD_FLAGS _("Instruction should not have flags")
#define BAD_COND _("Instruction is not conditional")
#define ERR_NO_ACCUM _("acc0 expected")
--- 1689,1694 ----
*************** cp_address_required_here (str)
*** 2716,2735 ****
}
static void
! do_empty (str, flags)
char * str;
- unsigned long flags;
{
/* Do nothing really. */
- inst.instruction |= flags; /* This is pointless. */
end_of_line (str);
return;
}
static void
! do_mrs (str, flags)
char *str;
- unsigned long flags;
{
int skip = 0;
--- 2716,2732 ----
}
static void
! do_empty (str)
char * str;
{
/* Do nothing really. */
end_of_line (str);
return;
}
static void
! do_mrs (str)
char *str;
{
int skip = 0;
*************** do_mrs (str, flags)
*** 2771,2777 ****
inst.instruction |= SPSR_BIT;
str += skip;
- inst.instruction |= flags;
end_of_line (str);
}
--- 2768,2773 ----
*************** do_mrs (str, flags)
*** 2780,2788 ****
"{C|S}PSR_f, #expression". */
static void
! do_msr (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 2776,2783 ----
"{C|S}PSR_f, #expression". */
static void
! do_msr (str)
char * str;
{
skip_whitespace (str);
*************** do_msr (str, flags)
*** 2800,2806 ****
if (reg_required_here (& str, 0) != FAIL)
{
inst.error = NULL;
- inst.instruction |= flags;
end_of_line (str);
return;
}
--- 2795,2800 ----
*************** do_msr (str, flags)
*** 2834,2840 ****
}
#endif
! flags |= INST_IMMEDIATE;
if (inst.reloc.exp.X_add_symbol)
{
--- 2828,2834 ----
}
#endif
! inst.instruction |= INST_IMMEDIATE;
if (inst.reloc.exp.X_add_symbol)
{
*************** do_msr (str, flags)
*** 2855,2861 ****
}
inst.error = NULL;
- inst.instruction |= flags;
end_of_line (str);
}
--- 2849,2854 ----
*************** do_msr (str, flags)
*** 2866,2874 ****
SMLAL RdLo, RdHi, Rm, Rs. */
static void
! do_mull (str, flags)
char * str;
- unsigned long flags;
{
int rdlo, rdhi, rm, rs;
--- 2859,2866 ----
SMLAL RdLo, RdHi, Rm, Rs. */
static void
! do_mull (str)
char * str;
{
int rdlo, rdhi, rm, rs;
*************** do_mull (str, flags)
*** 2912,2926 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_mul (str, flags)
char * str;
- unsigned long flags;
{
int rd, rm;
--- 2904,2916 ----
return;
}
end_of_line (str);
return;
}
static void
! do_mul (str)
char * str;
{
int rd, rm;
*************** do_mul (str, flags)
*** 2968,2982 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_mla (str, flags)
char * str;
- unsigned long flags;
{
int rd, rm;
--- 2958,2970 ----
return;
}
end_of_line (str);
return;
}
static void
! do_mla (str)
char * str;
{
int rd, rm;
*************** do_mla (str, flags)
*** 3026,3032 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
--- 3014,3019 ----
*************** ld_mode_required_here (string)
*** 3181,3189 ****
Error if any register is R15. */
static void
! do_smla (str, flags)
char * str;
- unsigned long flags;
{
int rd, rm, rs, rn;
--- 3168,3175 ----
Error if any register is R15. */
static void
! do_smla (str)
char * str;
{
int rd, rm, rs, rn;
*************** do_smla (str, flags)
*** 3201,3209 ****
else if (rd == REG_PC || rm == REG_PC || rs == REG_PC || rn == REG_PC)
inst.error = BAD_PC;
- else if (flags)
- inst.error = BAD_FLAGS;
-
else
end_of_line (str);
}
--- 3187,3192 ----
*************** do_smla (str, flags)
*** 3214,3222 ****
Warning if Rdlo == Rdhi. */
static void
! do_smlal (str, flags)
char * str;
- unsigned long flags;
{
int rdlo, rdhi, rm, rs;
--- 3197,3204 ----
Warning if Rdlo == Rdhi. */
static void
! do_smlal (str)
char * str;
{
int rdlo, rdhi, rm, rs;
*************** do_smlal (str, flags)
*** 3243,3252 ****
if (rdlo == rdhi)
as_tsktsk (_("rdhi and rdlo must be different"));
! if (flags)
! inst.error = BAD_FLAGS;
! else
! end_of_line (str);
}
/* ARM V5E (El Segundo) signed-multiply (argument parse)
--- 3225,3231 ----
if (rdlo == rdhi)
as_tsktsk (_("rdhi and rdlo must be different"));
! end_of_line (str);
}
/* ARM V5E (El Segundo) signed-multiply (argument parse)
*************** do_smlal (str, flags)
*** 3254,3262 ****
Error if any register is R15. */
static void
! do_smul (str, flags)
char * str;
- unsigned long flags;
{
int rd, rm, rs;
--- 3233,3240 ----
Error if any register is R15. */
static void
! do_smul (str)
char * str;
{
int rd, rm, rs;
*************** do_smul (str, flags)
*** 3272,3280 ****
else if (rd == REG_PC || rm == REG_PC || rs == REG_PC)
inst.error = BAD_PC;
- else if (flags)
- inst.error = BAD_FLAGS;
-
else
end_of_line (str);
}
--- 3250,3255 ----
*************** do_smul (str, flags)
*** 3284,3292 ****
Error if any register is R15. */
static void
! do_qadd (str, flags)
char * str;
- unsigned long flags;
{
int rd, rm, rn;
--- 3259,3266 ----
Error if any register is R15. */
static void
! do_qadd (str)
char * str;
{
int rd, rm, rn;
*************** do_qadd (str, flags)
*** 3302,3310 ****
else if (rd == REG_PC || rm == REG_PC || rn == REG_PC)
inst.error = BAD_PC;
- else if (flags)
- inst.error = BAD_FLAGS;
-
else
end_of_line (str);
}
--- 3276,3281 ----
*************** do_qadd (str, flags)
*** 3319,3327 ****
Result unpredicatable if Rd or Rn is R15. */
static void
! do_co_reg2c (str, flags)
char * str;
- unsigned long flags;
{
int rd, rn;
--- 3290,3297 ----
Result unpredicatable if Rd or Rn is R15. */
static void
! do_co_reg2c (str)
char * str;
{
int rd, rn;
*************** do_co_reg2c (str, flags)
*** 3371,3379 ****
return;
}
- if (flags)
- inst.error = BAD_COND;
-
end_of_line (str);
}
--- 3341,3346 ----
*************** do_co_reg2c (str, flags)
*** 3383,3400 ****
Error if Rd or Rm are R15. */
static void
! do_clz (str, flags)
char * str;
- unsigned long flags;
{
int rd, rm;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (str);
if (((rd = reg_required_here (& str, 12)) == FAIL)
--- 3350,3360 ----
Error if Rd or Rm are R15. */
static void
! do_clz (str)
char * str;
{
int rd, rm;
skip_whitespace (str);
if (((rd = reg_required_here (& str, 12)) == FAIL)
*************** do_clz (str, flags)
*** 3416,3428 ****
Otherwise, it's the same as LDC/STC. */
static void
! do_lstc2 (str, flags)
char * str;
- unsigned long flags;
{
- if (flags)
- inst.error = BAD_COND;
-
skip_whitespace (str);
if (co_proc_number (& str) == FAIL)
--- 3376,3384 ----
Otherwise, it's the same as LDC/STC. */
static void
! do_lstc2 (str)
char * str;
{
skip_whitespace (str);
if (co_proc_number (& str) == FAIL)
*************** do_lstc2 (str, flags)
*** 3452,3460 ****
Otherwise, it's the same as CDP. */
static void
! do_cdp2 (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 3408,3415 ----
Otherwise, it's the same as CDP. */
static void
! do_cdp2 (str)
char * str;
{
skip_whitespace (str);
*************** do_cdp2 (str, flags)
*** 3507,3515 ****
}
}
- if (flags)
- inst.error = BAD_FLAGS;
-
end_of_line (str);
}
--- 3462,3467 ----
*************** do_cdp2 (str, flags)
*** 3520,3528 ****
Otherwise, it's the same as MCR/MRC. */
static void
! do_co_reg2 (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 3472,3479 ----
Otherwise, it's the same as MCR/MRC. */
static void
! do_co_reg2 (str)
char * str;
{
skip_whitespace (str);
*************** do_co_reg2 (str, flags)
*** 3575,3583 ****
}
}
- if (flags)
- inst.error = BAD_COND;
-
end_of_line (str);
}
--- 3526,3531 ----
*************** do_t_bkpt (str)
*** 3624,3632 ****
new one that can cope with setting one extra bit (the H bit). */
static void
! do_branch25 (str, flags)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
if (my_get_expression (& inst.reloc.exp, & str))
return;
--- 3572,3579 ----
new one that can cope with setting one extra bit (the H bit). */
static void
! do_branch25 (str)
char * str;
{
if (my_get_expression (& inst.reloc.exp, & str))
return;
*************** do_branch25 (str, flags)
*** 3679,3697 ****
Also, the <target_addr> can be 25 bits, hence has its own reloc. */
static void
! do_blx (str, flags)
char * str;
- unsigned long flags;
{
char * mystr = str;
int rm;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (mystr);
rm = reg_required_here (& mystr, 0);
--- 3626,3637 ----
Also, the <target_addr> can be 25 bits, hence has its own reloc. */
static void
! do_blx (str)
char * str;
{
char * mystr = str;
int rm;
skip_whitespace (mystr);
rm = reg_required_here (& mystr, 0);
*************** do_blx (str, flags)
*** 3704,3710 ****
Use the condition code our caller put in inst.instruction.
Pass ourselves off as a BX with a funny opcode. */
inst.instruction |= 0x012fff30;
! do_bx (str, flags);
}
else
{
--- 3644,3650 ----
Use the condition code our caller put in inst.instruction.
Pass ourselves off as a BX with a funny opcode. */
inst.instruction |= 0x012fff30;
! do_bx (str);
}
else
{
*************** do_blx (str, flags)
*** 3719,3725 ****
/* Process like a B/BL, but with a different reloc.
Note that B/BL expecte fffffe, not 0, offset in the opcode table. */
! do_branch25 (str, flags);
}
}
--- 3659,3665 ----
/* Process like a B/BL, but with a different reloc.
Note that B/BL expecte fffffe, not 0, offset in the opcode table. */
! do_branch25 (str);
}
}
*************** do_t_blx (str)
*** 3771,3783 ****
BKPT <16 bit unsigned immediate>
Instruction is not conditional.
The bit pattern given in insns[] has the COND_ALWAYS condition,
! and it is an error if the caller tried to override that.
! Note "flags" is nonzero if a flag was supplied (which is an error). */
static void
! do_bkpt (str, flags)
char * str;
- unsigned long flags;
{
expressionS expr;
unsigned long number;
--- 3711,3721 ----
BKPT <16 bit unsigned immediate>
Instruction is not conditional.
The bit pattern given in insns[] has the COND_ALWAYS condition,
! and it is an error if the caller tried to override that. */
static void
! do_bkpt (str)
char * str;
{
expressionS expr;
unsigned long number;
*************** do_bkpt (str, flags)
*** 3812,3820 ****
inst.instruction |= number & 0xf;
end_of_line (str);
-
- if (flags)
- inst.error = BAD_FLAGS;
}
/* Xscale multiply-accumulate (argument parse)
--- 3750,3755 ----
*************** do_bkpt (str, flags)
*** 3823,3839 ****
MIAxycc acc0,Rm,Rs. */
static void
! do_mia (str, flags)
char * str;
- unsigned long flags;
{
int rs;
int rm;
-
- if (flags)
- as_bad (BAD_FLAGS);
! else if (accum0_required_here (& str) == FAIL)
inst.error = ERR_NO_ACCUM;
else if (skip_past_comma (& str) == FAIL
--- 3758,3770 ----
MIAxycc acc0,Rm,Rs. */
static void
! do_mia (str)
char * str;
{
int rs;
int rm;
! if (accum0_required_here (& str) == FAIL)
inst.error = ERR_NO_ACCUM;
else if (skip_past_comma (& str) == FAIL
*************** do_mia (str, flags)
*** 3857,3872 ****
MARcc acc0,RdLo,RdHi. */
static void
! do_mar (str, flags)
char * str;
- unsigned long flags;
{
int rdlo, rdhi;
! if (flags)
! as_bad (BAD_FLAGS);
!
! else if (accum0_required_here (& str) == FAIL)
inst.error = ERR_NO_ACCUM;
else if (skip_past_comma (& str) == FAIL
--- 3788,3799 ----
MARcc acc0,RdLo,RdHi. */
static void
! do_mar (str)
char * str;
{
int rdlo, rdhi;
! if (accum0_required_here (& str) == FAIL)
inst.error = ERR_NO_ACCUM;
else if (skip_past_comma (& str) == FAIL
*************** do_mar (str, flags)
*** 3890,3908 ****
MRAcc RdLo,RdHi,acc0. */
static void
! do_mra (str, flags)
char * str;
- unsigned long flags;
{
int rdlo;
int rdhi;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (str);
if ((rdlo = reg_required_here (& str, 12)) == FAIL)
--- 3817,3828 ----
MRAcc RdLo,RdHi,acc0. */
static void
! do_mra (str)
char * str;
{
int rdlo;
int rdhi;
skip_whitespace (str);
if ((rdlo = reg_required_here (& str, 12)) == FAIL)
*************** do_mra (str, flags)
*** 3933,3950 ****
Syntactically, like LDR with B=1, W=0, L=1. */
static void
! do_pld (str, flags)
char * str;
- unsigned long flags;
{
int rd;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (str);
if (* str != '[')
--- 3853,3863 ----
Syntactically, like LDR with B=1, W=0, L=1. */
static void
! do_pld (str)
char * str;
{
int rd;
skip_whitespace (str);
if (* str != '[')
*************** do_pld (str, flags)
*** 4023,4031 ****
STRccD R, mode. */
static void
! do_ldrd (str, flags)
char * str;
- unsigned long flags;
{
int rd;
int rn;
--- 3936,3943 ----
STRccD R, mode. */
static void
! do_ldrd (str)
char * str;
{
int rd;
int rn;
*************** do_ldrd (str, flags)
*** 4055,4061 ****
if (rd == REG_LR)
{
! inst.error = _("r12 or r14 not allowed here");
return;
}
--- 3967,3973 ----
if (rd == REG_LR)
{
! inst.error = _("r14 not allowed here");
return;
}
*************** fp_op2 (str)
*** 4564,4572 ****
}
static void
! do_arit (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 4476,4483 ----
}
static void
! do_arit (str)
char * str;
{
skip_whitespace (str);
*************** do_arit (str, flags)
*** 4581,4595 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_adr (str, flags)
char * str;
- unsigned long flags;
{
/* This is a pseudo-op of the form "adr rd, label" to be converted
into a relative address of the form "add rd, pc, #label-.-8". */
--- 4492,4504 ----
return;
}
end_of_line (str);
return;
}
static void
! do_adr (str)
char * str;
{
/* This is a pseudo-op of the form "adr rd, label" to be converted
into a relative address of the form "add rd, pc, #label-.-8". */
*************** do_adr (str, flags)
*** 4614,4622 ****
}
static void
! do_adrl (str, flags)
char * str;
- unsigned long flags;
{
/* This is a pseudo-op of the form "adrl rd, label" to be converted
into a relative address of the form:
--- 4523,4530 ----
}
static void
! do_adrl (str)
char * str;
{
/* This is a pseudo-op of the form "adrl rd, label" to be converted
into a relative address of the form:
*************** do_adrl (str, flags)
*** 4647,4655 ****
}
static void
! do_cmp (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 4555,4562 ----
}
static void
! do_cmp (str)
char * str;
{
skip_whitespace (str);
*************** do_cmp (str, flags)
*** 4668,4682 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_mov (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 4575,4587 ----
return;
}
end_of_line (str);
return;
}
static void
! do_mov (str)
char * str;
{
skip_whitespace (str);
*************** do_mov (str, flags)
*** 4695,4701 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
--- 4600,4605 ----
*************** ldst_extend (str)
*** 4760,4768 ****
}
static void
! do_ldst (str, flags)
char * str;
- unsigned long flags;
{
int pre_inc = 0;
int conflict_reg;
--- 4664,4671 ----
}
static void
! do_ldst (str)
char * str;
{
int pre_inc = 0;
int conflict_reg;
*************** do_ldst (str, flags)
*** 4783,4790 ****
return;
}
- flags = 0;
-
if (*str == '[')
{
int reg;
--- 4686,4691 ----
*************** do_ldst (str, flags)
*** 4933,4941 ****
}
static void
! do_ldstt (str, flags)
char * str;
- unsigned long flags;
{
int conflict_reg;
--- 4834,4841 ----
}
static void
! do_ldstt (str)
char * str;
{
int conflict_reg;
*************** ldst_extend_v4 (str)
*** 5074,5082 ****
/* Halfword and signed-byte load/store operations. */
static void
! do_ldstv4 (str, flags)
char * str;
- unsigned long flags;
{
int pre_inc = 0;
int conflict_reg;
--- 4974,4981 ----
/* Halfword and signed-byte load/store operations. */
static void
! do_ldstv4 (str)
char * str;
{
int pre_inc = 0;
int conflict_reg;
*************** reg_list (strp)
*** 5391,5399 ****
}
static void
! do_ldmstm (str, flags)
char * str;
- unsigned long flags;
{
int base_reg;
long range;
--- 5290,5297 ----
}
static void
! do_ldmstm (str)
char * str;
{
int base_reg;
long range;
*************** do_ldmstm (str, flags)
*** 5431,5445 ****
inst.instruction |= LDM_TYPE_2_OR_3;
}
! inst.instruction |= flags | range;
end_of_line (str);
return;
}
static void
! do_swi (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 5329,5342 ----
inst.instruction |= LDM_TYPE_2_OR_3;
}
! inst.instruction |= range;
end_of_line (str);
return;
}
static void
! do_swi (str)
char * str;
{
skip_whitespace (str);
*************** do_swi (str, flags)
*** 5452,5468 ****
inst.reloc.type = BFD_RELOC_ARM_SWI;
inst.reloc.pc_rel = 0;
- inst.instruction |= flags;
-
end_of_line (str);
return;
}
static void
! do_swap (str, flags)
char * str;
- unsigned long flags;
{
int reg;
--- 5349,5362 ----
inst.reloc.type = BFD_RELOC_ARM_SWI;
inst.reloc.pc_rel = 0;
end_of_line (str);
return;
}
static void
! do_swap (str)
char * str;
{
int reg;
*************** do_swap (str, flags)
*** 5517,5531 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_branch (str, flags)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
if (my_get_expression (&inst.reloc.exp, &str))
return;
--- 5411,5423 ----
return;
}
end_of_line (str);
return;
}
static void
! do_branch (str)
char * str;
{
if (my_get_expression (&inst.reloc.exp, &str))
return;
*************** do_branch (str, flags)
*** 5569,5577 ****
}
static void
! do_bx (str, flags)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
int reg;
--- 5461,5468 ----
}
static void
! do_bx (str)
char * str;
{
int reg;
*************** do_bx (str, flags)
*** 5591,5599 ****
}
static void
! do_cdp (str, flags)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
/* Co-processor data operation.
Format: CDP{cond} CP#,<expr>,CRd,CRn,CRm{,<expr>} */
--- 5482,5489 ----
}
static void
! do_cdp (str)
char * str;
{
/* Co-processor data operation.
Format: CDP{cond} CP#,<expr>,CRd,CRn,CRm{,<expr>} */
*************** do_cdp (str, flags)
*** 5653,5661 ****
}
static void
! do_lstc (str, flags)
char * str;
- unsigned long flags;
{
/* Co-processor register load/store.
Format: <LDC|STC{cond}[L] CP#,CRd,<address> */
--- 5543,5550 ----
}
static void
! do_lstc (str)
char * str;
{
/* Co-processor register load/store.
Format: <LDC|STC{cond}[L] CP#,CRd,<address> */
*************** do_lstc (str, flags)
*** 5685,5699 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_co_reg (str, flags)
char * str;
- unsigned long flags;
{
/* Co-processor register transfer.
Format: <MCR|MRC>{cond} CP#,<expr1>,Rd,CRn,CRm{,<expr2>} */
--- 5574,5586 ----
return;
}
end_of_line (str);
return;
}
static void
! do_co_reg (str)
char * str;
{
/* Co-processor register transfer.
Format: <MCR|MRC>{cond} CP#,<expr1>,Rd,CRn,CRm{,<expr2>} */
*************** do_co_reg (str, flags)
*** 5748,5766 ****
return;
}
}
- if (flags)
- {
- inst.error = BAD_COND;
- }
end_of_line (str);
return;
}
static void
! do_fpa_ctrl (str, flags)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
/* FP control registers.
Format: <WFS|RFS|WFC|RFC>{cond} Rn */
--- 5635,5648 ----
return;
}
}
end_of_line (str);
return;
}
static void
! do_fpa_ctrl (str)
char * str;
{
/* FP control registers.
Format: <WFS|RFS|WFC|RFC>{cond} Rn */
*************** do_fpa_ctrl (str, flags)
*** 5779,5787 ****
}
static void
! do_fpa_ldst (str, flags)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
skip_whitespace (str);
--- 5661,5668 ----
}
static void
! do_fpa_ldst (str)
char * str;
{
skip_whitespace (str);
*************** do_fpa_ldst (str, flags)
*** 5804,5812 ****
}
static void
! do_fpa_ldmstm (str, flags)
char * str;
- unsigned long flags;
{
int num_regs;
--- 5685,5692 ----
}
static void
! do_fpa_ldmstm (str)
char * str;
{
int num_regs;
*************** do_fpa_ldmstm (str, flags)
*** 5930,5936 ****
}
}
! inst.instruction |= flags | offset;
}
else if (skip_past_comma (&str) == FAIL
|| cp_address_required_here (&str) == FAIL)
--- 5810,5816 ----
}
}
! inst.instruction |= offset;
}
else if (skip_past_comma (&str) == FAIL
|| cp_address_required_here (&str) == FAIL)
*************** do_fpa_ldmstm (str, flags)
*** 5944,5952 ****
}
static void
! do_fpa_dyadic (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 5824,5831 ----
}
static void
! do_fpa_dyadic (str)
char * str;
{
skip_whitespace (str);
*************** do_fpa_dyadic (str, flags)
*** 5973,5987 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_fpa_monadic (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 5852,5864 ----
return;
}
end_of_line (str);
return;
}
static void
! do_fpa_monadic (str)
char * str;
{
skip_whitespace (str);
*************** do_fpa_monadic (str, flags)
*** 6000,6014 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_fpa_cmp (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 5877,5889 ----
return;
}
end_of_line (str);
return;
}
static void
! do_fpa_cmp (str)
char * str;
{
skip_whitespace (str);
*************** do_fpa_cmp (str, flags)
*** 6027,6041 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_fpa_from_reg (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 5902,5914 ----
return;
}
end_of_line (str);
return;
}
static void
! do_fpa_from_reg (str)
char * str;
{
skip_whitespace (str);
*************** do_fpa_from_reg (str, flags)
*** 6054,6068 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
! do_fpa_to_reg (str, flags)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
--- 5927,5939 ----
return;
}
end_of_line (str);
return;
}
static void
! do_fpa_to_reg (str)
char * str;
{
skip_whitespace (str);
*************** do_fpa_to_reg (str, flags)
*** 6077,6083 ****
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
--- 5948,5953 ----
*************** cirrus_reg_required_here (str, shift, re
*** 6806,6928 ****
/* Wrapper functions. */
static void
! do_c_binops_1 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_binops (str, flags, CIRRUS_MODE1);
}
static void
! do_c_binops_2 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_binops (str, flags, CIRRUS_MODE2);
}
static void
! do_c_binops_3 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_binops (str, flags, CIRRUS_MODE3);
}
static void
! do_c_triple_4 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_triple (str, flags, CIRRUS_MODE4);
}
static void
! do_c_triple_5 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_triple (str, flags, CIRRUS_MODE5);
}
static void
! do_c_quad_6 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_quad (str, flags, CIRRUS_MODE6);
}
static void
! do_c_dspsc_1 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_dspsc (str, flags, CIRRUS_MODE1);
}
static void
! do_c_dspsc_2 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_dspsc (str, flags, CIRRUS_MODE2);
}
static void
! do_c_shift_1 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_shift (str, flags, CIRRUS_MODE1);
}
static void
! do_c_shift_2 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_shift (str, flags, CIRRUS_MODE2);
}
static void
! do_c_ldst_1 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_ldst (str, flags, CIRRUS_MODE1);
}
static void
! do_c_ldst_2 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_ldst (str, flags, CIRRUS_MODE2);
}
static void
! do_c_ldst_3 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_ldst (str, flags, CIRRUS_MODE3);
}
static void
! do_c_ldst_4 (str, flags)
char * str;
- unsigned long flags;
{
! do_c_ldst (str, flags, CIRRUS_MODE4);
}
/* Isnsn like "foo X,Y". */
static void
! do_c_binops (str, flags, mode)
char * str;
- unsigned long flags;
int mode;
{
int shift1, shift2;
--- 6676,6783 ----
/* Wrapper functions. */
static void
! do_c_binops_1 (str)
char * str;
{
! do_c_binops (str, CIRRUS_MODE1);
}
static void
! do_c_binops_2 (str)
char * str;
{
! do_c_binops (str, CIRRUS_MODE2);
}
static void
! do_c_binops_3 (str)
char * str;
{
! do_c_binops (str, CIRRUS_MODE3);
}
static void
! do_c_triple_4 (str)
char * str;
{
! do_c_triple (str, CIRRUS_MODE4);
}
static void
! do_c_triple_5 (str)
char * str;
{
! do_c_triple (str, CIRRUS_MODE5);
}
static void
! do_c_quad_6 (str)
char * str;
{
! do_c_quad (str, CIRRUS_MODE6);
}
static void
! do_c_dspsc_1 (str)
char * str;
{
! do_c_dspsc (str, CIRRUS_MODE1);
}
static void
! do_c_dspsc_2 (str)
char * str;
{
! do_c_dspsc (str, CIRRUS_MODE2);
}
static void
! do_c_shift_1 (str)
char * str;
{
! do_c_shift (str, CIRRUS_MODE1);
}
static void
! do_c_shift_2 (str)
char * str;
{
! do_c_shift (str, CIRRUS_MODE2);
}
static void
! do_c_ldst_1 (str)
char * str;
{
! do_c_ldst (str, CIRRUS_MODE1);
}
static void
! do_c_ldst_2 (str)
char * str;
{
! do_c_ldst (str, CIRRUS_MODE2);
}
static void
! do_c_ldst_3 (str)
char * str;
{
! do_c_ldst (str, CIRRUS_MODE3);
}
static void
! do_c_ldst_4 (str)
char * str;
{
! do_c_ldst (str, CIRRUS_MODE4);
}
/* Isnsn like "foo X,Y". */
static void
! do_c_binops (str, mode)
char * str;
int mode;
{
int shift1, shift2;
*************** do_c_binops (str, flags, mode)
*** 6941,6957 ****
}
else
end_of_line (str);
-
- inst.instruction |= flags;
- return;
}
/* Isnsn like "foo X,Y,Z". */
static void
! do_c_triple (str, flags, mode)
char * str;
- unsigned long flags;
int mode;
{
int shift1, shift2, shift3;
--- 6796,6808 ----
}
else
end_of_line (str);
}
/* Isnsn like "foo X,Y,Z". */
static void
! do_c_triple (str, mode)
char * str;
int mode;
{
int shift1, shift2, shift3;
*************** do_c_triple (str, flags, mode)
*** 6973,6990 ****
}
else
end_of_line (str);
-
- inst.instruction |= flags;
- return;
}
/* Isnsn like "foo W,X,Y,Z".
where W=MVAX[0:3] and X,Y,Z=MVFX[0:15]. */
static void
! do_c_quad (str, flags, mode)
char * str;
- unsigned long flags;
int mode;
{
int shift1, shift2, shift3, shift4;
--- 6824,6837 ----
}
else
end_of_line (str);
}
/* Isnsn like "foo W,X,Y,Z".
where W=MVAX[0:3] and X,Y,Z=MVFX[0:15]. */
static void
! do_c_quad (str, mode)
char * str;
int mode;
{
int shift1, shift2, shift3, shift4;
*************** do_c_quad (str, flags, mode)
*** 7014,7031 ****
}
else
end_of_line (str);
-
- inst.instruction |= flags;
- return;
}
/* cfmvsc32<cond> DSPSC,MVFX[15:0].
cfmv32sc<cond> MVFX[15:0],DSPSC. */
static void
! do_c_dspsc (str, flags, mode)
char * str;
- unsigned long flags;
int mode;
{
int error;
--- 6861,6874 ----
}
else
end_of_line (str);
}
/* cfmvsc32<cond> DSPSC,MVFX[15:0].
cfmv32sc<cond> MVFX[15:0],DSPSC. */
static void
! do_c_dspsc (str, mode)
char * str;
int mode;
{
int error;
*************** do_c_dspsc (str, flags, mode)
*** 7058,7068 ****
}
else
{
- inst.instruction |= flags;
end_of_line (str);
}
-
- return;
}
/* Cirrus shift immediate instructions.
--- 6901,6908 ----
*************** do_c_dspsc (str, flags, mode)
*** 7070,7078 ****
cfsh64<cond> MVDX[15:0],MVDX[15:0],Shift[6:0]. */
static void
! do_c_shift (str, flags, mode)
char * str;
- unsigned long flags;
int mode;
{
int error;
--- 6910,6917 ----
cfsh64<cond> MVDX[15:0],MVDX[15:0],Shift[6:0]. */
static void
! do_c_shift (str, mode)
char * str;
int mode;
{
int error;
*************** do_c_shift (str, flags, mode)
*** 7139,7149 ****
imm = (imm & 0xf) | ((imm & 0x70) << 1);
inst.instruction |= imm;
- inst.instruction |= flags;
-
end_of_line (str);
-
- return;
}
static int
--- 6978,6984 ----
*************** cirrus_parse_offset (str, negative)
*** 7192,7200 ****
<insn><cond> CRd,[Rn],<offset>. */
static void
! do_c_ldst (str, flags, mode)
char * str;
- unsigned long flags;
int mode;
{
int offset, negative;
--- 7027,7034 ----
<insn><cond> CRd,[Rn],<offset>. */
static void
! do_c_ldst (str, mode)
char * str;
int mode;
{
int offset, negative;
*************** do_c_ldst (str, flags, mode)
*** 7257,7264 ****
inst.instruction |= CP_T_UD; /* Postive, so set bit U. */
inst.instruction |= offset >> 2;
- inst.instruction |= flags;
-
end_of_line (str);
return;
--- 7091,7096 ----
*************** md_assemble (str)
*** 9024,9030 ****
inst.instruction = opcode->value;
inst.size = INSN_SIZE;
! (*opcode->parms) (p, 0);
output_inst ();
return;
}
--- 8856,8862 ----
inst.instruction = opcode->value;
inst.size = INSN_SIZE;
! (*opcode->parms) (p);
output_inst ();
return;
}