aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-06-22 14:40:28 +0000
committerNick Clifton <nickc@redhat.com>2009-06-22 14:40:28 +0000
commite07e6e58be1c5273ed79a25c80ba831e71ac86b1 (patch)
treeecefca4f0266b261cd360816a5f0a8c431cdd062 /gas/config/tc-arm.h
parentaece7d2e74d678af65da8ee7f4c0d5f6ce74c808 (diff)
downloadgdb-e07e6e58be1c5273ed79a25c80ba831e71ac86b1.zip
gdb-e07e6e58be1c5273ed79a25c80ba831e71ac86b1.tar.gz
gdb-e07e6e58be1c5273ed79a25c80ba831e71ac86b1.tar.bz2
* config/tc-arm.c (implicit_it_mode): New enum.
(implicit_it_mode): New global. (it_instruction_type): New enum. (arm_parse_it_mode): New function. (arm_long_opts): New option added. (arm_it): New field. (it_state): New enum. (now_it): New macro. (check_it_blocks_finished): New function. (insns[]): Use the IT Thumb opcodes for ARM too. (arm_cleanup): Call check_it_blocks_finished. (now_it_compatible): New function. (conditional_insn): New function. (set_it_insn_type): New macro. (set_it_insn_type_last): New macro. (do_it): Call automatic IT machinery functions. (do_t_add_sub): Likewise (do_t_arit3): Likewise. (do_t_arit3c): Likewise. (do_t_blx): Likewise. (do_t_branch): Likewise. (do_t_bkpt): Likewise. (do_t_branch23): Likewise. (do_t_bx): Likewise. (do_t_bxj): Likewise. (do_t_cps): Likewise. (do_t_cpsi): Likewise. (do_t_cbz): Likewise. (do_t_it): Likewise. (encode_thumb2_ldmstm): Likewise. (do_t_ldst): Likewise. (do_t_mov_cmp): Likewise. (do_t_mvn_tst): Likewise. (do_t_mul): Likewise. (do_t_neg): Likewise. (do_t_setend): Likewise. (do_t_shift): Likewise. (do_t_tb): Likewise. (output_it_inst): New function. (new_automatic_it_block): New function. (close_automatic_it_block): New function. (now_it_add_mask): New function. (it_fsm_pre_encode): New function. (handle_it_state): New function. (it_fsm_post_encode): New function. (force_automatic_it_block_close): New function. (in_it_block): New function. (md_assemble): Call automatic IT block machinery functions. (arm_frob_label): Likewise. (arm_opts): New element. * config/tc-arm.h (it_state): New enum. (current_it): New struct. (arm_segment_info_type): New member added. * doc/c-arm.texi: New option -mimplicit-it documented. * gas/arm/arm-it-auto.d: New test. * gas/arm/arm-it-auto.s: New file. * gas/arm/arm-it-auto-2.d: New test case. * gas/arm/arm-it-auto-2.s: New file. * gas/arm/arm-it-auto-3.d: New test case. * gas/arm/arm-it-auto-3.s: New file. * gas/arm/arm-it-bad.d: New test case. * gas/arm/arm-it-bad.l: New file. * gas/arm/arm-it-bad.s: New file. * gas/arm/arm-it-bad-2.d: New test case. * gas/arm/arm-it-bad-2.l: New file. * gas/arm/arm-it-bad-2.s: New file. * gas/arm/arm-it-bad-3.d: New test case. * gas/arm/arm-it-bad-3.l: New file. * gas/arm/arm-it-bad-3.s: New file. * gas/arm/thumb2_it_auto.d: New test. * gas/arm/thumb2_it_bad.l: Error message updated. * gas/arm/thumb2_it_bad_auto.d: New test. * gas/arm/thumb2_it.d: Comment added. * gas/arm/thumb2_it_bad.d: Comment added.
Diffstat (limited to 'gas/config/tc-arm.h')
-rw-r--r--gas/config/tc-arm.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index 13bc86a..05841df 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -82,7 +82,7 @@ struct fix;
#define TC_FORCE_RELOCATION(FIX) arm_force_relocation (FIX)
#define md_relax_frag(segment, fragp, stretch) \
- arm_relax_frag(segment, fragp, stretch)
+ arm_relax_frag (segment, fragp, stretch)
extern int arm_relax_frag (asection *, struct frag *, long);
#define md_optimize_expr(l,o,r) arm_optimize_expr (l, o, r)
@@ -123,6 +123,7 @@ bfd_boolean arm_is_eabi (void);
#define ARM_IS_THUMB(s) (ARM_GET_FLAG (s) & ARM_FLAG_THUMB)
#define ARM_IS_INTERWORK(s) (ARM_GET_FLAG (s) & ARM_FLAG_INTERWORK)
+
#ifdef OBJ_ELF
/* For ELF objects THUMB_IS_FUNC is inferred from
@@ -141,6 +142,7 @@ bfd_boolean arm_is_eabi (void);
#else
+
#define THUMB_IS_FUNC(s) (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)
#define ARM_IS_FUNC(s) (!THUMB_IS_FUNC (s) \
&& (symbol_get_bfdsym (s)->flags & BSF_FUNCTION))
@@ -151,6 +153,7 @@ bfd_boolean arm_is_eabi (void);
#define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC))
void arm_copy_symbol_attributes (symbolS *, symbolS *);
+
#ifndef TC_COPY_SYMBOL_ATTRIBUTES
#define TC_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
(arm_copy_symbol_attributes (DEST, SRC))
@@ -212,6 +215,21 @@ void arm_copy_symbol_attributes (symbolS *, symbolS *);
/* Registers are generally saved at negative offsets to the CFA. */
#define DWARF2_CIE_DATA_ALIGNMENT (-4)
+/* State variables for IT block handling. */
+enum it_state
+{
+ OUTSIDE_IT_BLOCK, MANUAL_IT_BLOCK, AUTOMATIC_IT_BLOCK
+};
+struct current_it
+{
+ int mask;
+ enum it_state state;
+ int cc;
+ int block_length;
+ char *insn;
+ int state_handled;
+};
+
#ifdef OBJ_ELF
# define obj_frob_symbol(sym, punt) armelf_frob_symbol ((sym), & (punt))
# define md_elf_section_change_hook() arm_elf_change_section ()
@@ -239,6 +257,7 @@ struct arm_segment_info_type
{
enum mstate mapstate;
unsigned int marked_pr_dependency;
+ struct current_it current_it;
};
/* We want .cfi_* pseudo-ops for generating unwind info. */