* 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.
This commit is contained in:
parent
aece7d2e74
commit
e07e6e58be
@ -1,9 +1,65 @@
|
||||
2009-06-22 Daniel Gutson <dgutson@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2009-06-20 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 10302
|
||||
* doc/as.texinfo (Section <ELF "M,S" flag>): Clarify tail merge.
|
||||
|
||||
=======
|
||||
2009-06-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||
|
||||
* config/tc-s390.c (md_gather_operands): Accept an instruction
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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. */
|
||||
|
@ -227,6 +227,11 @@ instructions; that is, it should behave as though the file starts with a
|
||||
This option specifies that the output generated by the assembler should
|
||||
be marked as supporting interworking.
|
||||
|
||||
@cindex @code{-mauto-it} command line option, ARM
|
||||
@item -mauto-it
|
||||
This option enables the automatic generation of IT instructions for
|
||||
conditional instructions not covered by an IT block.
|
||||
|
||||
@cindex @code{-mapcs} command line option, ARM
|
||||
@item -mapcs @code{[26|32]}
|
||||
This option specifies that the output generated by the assembler should
|
||||
|
@ -1,3 +1,26 @@
|
||||
2009-06-22 Daniel Gutson <dgutson@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2009-06-19 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* gas/cfi/cfi-common-7.s: Skip a multiple of four.
|
||||
|
@ -1,62 +1,62 @@
|
||||
# name: Mixed 16 and 32-bit Thumb conditional instructions
|
||||
# as: -march=armv6kt2
|
||||
#skip: *-*-*aout*
|
||||
# objdump: -dr --prefix-addresses --show-raw-insn
|
||||
# Many of these patterns use "(eq|s)". These should be changed to just "eq"
|
||||
# once the disassembler is fixed. Likewise for "(eq)?"
|
||||
# Modifications to this file shall be mirrored to thumb2_it_auto.d
|
||||
|
||||
.*: +file format .*arm.*
|
||||
|
||||
Disassembly of section .text:
|
||||
0+000 <[^>]+> bf05 ittet eq
|
||||
0+002 <[^>]+> 1880 add(eq|s) r0, r0, r2
|
||||
0+004 <[^>]+> 4440 add(eq)? r0, r8
|
||||
0+006 <[^>]+> 1888 add(ne|s) r0, r1, r2
|
||||
0+008 <[^>]+> eb11 0002 adds(eq)?.w r0, r1, r2
|
||||
0+002 <[^>]+> 1880 addeq r0, r0, r2
|
||||
0+004 <[^>]+> 4440 addeq r0, r8
|
||||
0+006 <[^>]+> 1888 addne r0, r1, r2
|
||||
0+008 <[^>]+> eb11 0002 addseq.w r0, r1, r2
|
||||
0+00c <[^>]+> 4410 add r0, r2
|
||||
0+00e <[^>]+> 4440 add r0, r8
|
||||
0+010 <[^>]+> 1880 adds r0, r0, r2
|
||||
0+012 <[^>]+> eb10 0008 adds.w r0, r0, r8
|
||||
0+016 <[^>]+> 1888 adds r0, r1, r2
|
||||
0+018 <[^>]+> bf0a itet eq
|
||||
0+01a <[^>]+> 4310 orr(eq|s) r0, r2
|
||||
0+01c <[^>]+> ea40 0008 orr(ne)?.w r0, r0, r8
|
||||
0+020 <[^>]+> ea50 0002 orrs(eq)?.w r0, r0, r2
|
||||
0+01a <[^>]+> 4310 orreq r0, r2
|
||||
0+01c <[^>]+> ea40 0008 orrne.w r0, r0, r8
|
||||
0+020 <[^>]+> ea50 0002 orrseq.w r0, r0, r2
|
||||
0+024 <[^>]+> ea40 0002 orr.w r0, r0, r2
|
||||
0+028 <[^>]+> ea40 0008 orr.w r0, r0, r8
|
||||
0+02c <[^>]+> 4310 orrs r0, r2
|
||||
0+02e <[^>]+> bf01 itttt eq
|
||||
0+030 <[^>]+> 4090 lsl(eq|s) r0, r2
|
||||
0+032 <[^>]+> fa00 f008 lsl(eq)?.w r0, r0, r8
|
||||
0+036 <[^>]+> fa01 f002 lsl(eq)?.w r0, r1, r2
|
||||
0+03a <[^>]+> fa10 f002 lsls(eq)?.w r0, r0, r2
|
||||
0+030 <[^>]+> 4090 lsleq r0, r2
|
||||
0+032 <[^>]+> fa00 f008 lsleq.w r0, r0, r8
|
||||
0+036 <[^>]+> fa01 f002 lsleq.w r0, r1, r2
|
||||
0+03a <[^>]+> fa10 f002 lslseq.w r0, r0, r2
|
||||
0+03e <[^>]+> bf02 ittt eq
|
||||
0+040 <[^>]+> 0048 lsl(eq|s) r0, r1, #1
|
||||
0+042 <[^>]+> ea4f 0048 mov(eq)?.w r0, r8, lsl #1
|
||||
0+046 <[^>]+> ea5f 0040 movs(eq)?.w r0, r0, lsl #1
|
||||
0+040 <[^>]+> 0048 lsleq r0, r1, #1
|
||||
0+042 <[^>]+> ea4f 0048 moveq.w r0, r8, lsl #1
|
||||
0+046 <[^>]+> ea5f 0040 movseq.w r0, r0, lsl #1
|
||||
0+04a <[^>]+> fa00 f002 lsl.w r0, r0, r2
|
||||
0+04e <[^>]+> 4090 lsls r0, r2
|
||||
0+050 <[^>]+> ea4f 0041 mov.w r0, r1, lsl #1
|
||||
0+054 <[^>]+> 0048 lsls r0, r1, #1
|
||||
0+056 <[^>]+> bf01 itttt eq
|
||||
0+058 <[^>]+> 4288 cmp(eq)? r0, r1
|
||||
0+05a <[^>]+> 4540 cmp(eq)? r0, r8
|
||||
0+05c <[^>]+> 4608 mov(eq)? r0, r1
|
||||
0+05e <[^>]+> ea5f 0001 movs(eq)?.w r0, r1
|
||||
0+058 <[^>]+> 4288 cmpeq r0, r1
|
||||
0+05a <[^>]+> 4540 cmpeq r0, r8
|
||||
0+05c <[^>]+> 4608 moveq r0, r1
|
||||
0+05e <[^>]+> ea5f 0001 movseq.w r0, r1
|
||||
0+062 <[^>]+> bf08 it eq
|
||||
0+064 <[^>]+> 4640 mov(eq)? r0, r8
|
||||
0+066 <[^>]+> 4608 mov(eq)? r0, r1
|
||||
0+064 <[^>]+> 4640 moveq r0, r8
|
||||
0+066 <[^>]+> 4608 mov r0, r1
|
||||
0+068 <[^>]+> 1c08 adds r0, r1, #0
|
||||
0+06a <[^>]+> ea5f 0008 movs.w r0, r8
|
||||
0+06e <[^>]+> bf01 itttt eq
|
||||
0+070 <[^>]+> 43c8 mvn(eq|s) r0, r1
|
||||
0+072 <[^>]+> ea6f 0008 mvn(eq)?.w r0, r8
|
||||
0+076 <[^>]+> ea7f 0001 mvns(eq)?.w r0, r1
|
||||
0+07a <[^>]+> 42c8 cmn(eq)? r0, r1
|
||||
0+070 <[^>]+> 43c8 mvneq r0, r1
|
||||
0+072 <[^>]+> ea6f 0008 mvneq.w r0, r8
|
||||
0+076 <[^>]+> ea7f 0001 mvnseq.w r0, r1
|
||||
0+07a <[^>]+> 42c8 cmneq r0, r1
|
||||
0+07c <[^>]+> ea6f 0001 mvn.w r0, r1
|
||||
0+080 <[^>]+> 43c8 mvns r0, r1
|
||||
0+082 <[^>]+> bf02 ittt eq
|
||||
0+084 <[^>]+> 4248 neg(eq|s) r0, r1
|
||||
0+086 <[^>]+> f1c8 0000 rsb(eq)? r0, r8, #0 ; 0x0
|
||||
0+08a <[^>]+> f1d1 0000 rsbs(eq)? r0, r1, #0 ; 0x0
|
||||
0+084 <[^>]+> 4248 negeq r0, r1
|
||||
0+086 <[^>]+> f1c8 0000 rsbeq r0, r8, #0 ; 0x0
|
||||
0+08a <[^>]+> f1d1 0000 rsbseq r0, r1, #0 ; 0x0
|
||||
0+08e <[^>]+> f1c1 0000 rsb r0, r1, #0 ; 0x0
|
||||
0+092 <[^>]+> 4248 negs r0, r1
|
||||
|
@ -1,3 +1,4 @@
|
||||
#name: Invalid IT instructions
|
||||
#as:
|
||||
#error-output: thumb2_it_bad.l
|
||||
# Modifications to this test shall be mirrored to thumb2_it_bad_auto.d.
|
||||
|
@ -9,4 +9,4 @@
|
||||
[^:]*:17: Error: instruction not allowed in IT block -- `cpseq #0x10'
|
||||
[^:]*:19: Error: instruction is always unconditional -- `bkpteq 0'
|
||||
[^:]*:20: Error: instruction not allowed in IT block -- `setendeq le'
|
||||
[^:]*:22: Error: instruction not allowed in IT block -- `iteq eq'
|
||||
[^:]*:22: Error: IT falling in the range of a previous IT block -- `iteq eq'
|
||||
|
Loading…
x
Reference in New Issue
Block a user