diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-04-27 23:43:25 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2010-04-27 23:43:25 +0000 |
commit | d99e5b3995477e20acc8eb9b1e0427a8c0f7f993 (patch) | |
tree | a81cb178e7be0faf99a20c812978aaebaf18a36c /gas/config/tc-tic6x.h | |
parent | 67f1675e78ba8e08a782ee57486cde949409dd2a (diff) | |
download | gdb-d99e5b3995477e20acc8eb9b1e0427a8c0f7f993.zip gdb-d99e5b3995477e20acc8eb9b1e0427a8c0f7f993.tar.gz gdb-d99e5b3995477e20acc8eb9b1e0427a8c0f7f993.tar.bz2 |
gas:
* config/tc-tic6x.h (tic6x_label_list): New.
(tic6x_segment_info_type): Keep a list of labels and a current
frag instead of a boolean for whether labels seen and a count of
instructions.
(tic6x_frag_info, TC_FRAG_TYPE, TC_FRAG_INIT, tic6x_frag_init,
md_do_align, tic6x_do_align, md_end, tic6x_end): New.
* config/tc-tic6x.c (tic6x_frob_label): Put label on list.
(tic6x_cleanup): Correct comment.
(tic6x_free_label_list): New.
(tic6x_cons_align): Free label list and update for
tic6x_segment_info_type changes.
(tic6x_do_align): New.
(md_assemble): Handle list of labels and saved frag for execute
packet. Create machine-dependent frag for new execute packet and
adjust labels accordingly.
(tic6x_adjust_section, tic6x_frag_init, tic6x_end): New.
(md_convert_frag, md_estimate_size_before_relax): Update comments.
gas/testsuite:
* gas/tic6x/align-1-be.d, gas/tic6x/align-1.d,
gas/tic6x/align-1.s, gas/tic6x/align-2.d, gas/tic6x/align-2.s:
New.
Diffstat (limited to 'gas/config/tc-tic6x.h')
-rw-r--r-- | gas/config/tc-tic6x.h | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/gas/config/tc-tic6x.h b/gas/config/tc-tic6x.h index 087b9e9..0285db4 100644 --- a/gas/config/tc-tic6x.h +++ b/gas/config/tc-tic6x.h @@ -37,19 +37,26 @@ ? "elf32-tic6x-be" \ : "elf32-tic6x-le") -typedef struct +typedef struct tic6x_label_list { - /* Number of instructions in the current execute packet. */ - unsigned int num_execute_packet_insns; + struct tic6x_label_list *next; + symbolS *label; +} tic6x_label_list; - /* Whether a label has been seen since the last instruction or data - (in which case a following instruction may not have parallel - bars, but must start a new execute packet). */ - bfd_boolean seen_label; +typedef struct +{ + /* Any labels seen since the last instruction or data. If not NULL, + a following instruction may not have parallel bars, but must + start a new execute packet. */ + tic6x_label_list *label_list; /* Whether compact instructions are forbidden here. */ bfd_boolean nocmp; + /* If there is a current execute packet, the frag being used for + that execute packet. */ + fragS *execute_packet_frag; + /* If there is a current execute packet, a pointer to the least-significant byte of the last instruction in it (for setting the p-bit). */ @@ -70,6 +77,20 @@ typedef struct typedef struct { + /* Whether this machine-dependent frag is used for instructions (as + opposed to code alignment). */ + bfd_boolean is_insns; + + /* For a frag used for instructions, whether it is may cross a fetch + packet boundary (subject to alignment requirements). */ + bfd_boolean can_cross_fp_boundary; +} tic6x_frag_info; +#define TC_FRAG_TYPE tic6x_frag_info +#define TC_FRAG_INIT(fragP) tic6x_frag_init (fragP) +extern void tic6x_frag_init (fragS *fragp); + +typedef struct +{ /* Whether this fix was for an ADDA instruction. If so, a constant resulting from resolving the fix should be implicitly shifted left (it represents a value to be encoded literally in the @@ -91,6 +112,16 @@ extern void tic6x_cleanup (void); #define md_cons_align(n) tic6x_cons_align (n) extern void tic6x_cons_align (int n); +#define md_do_align(n, fill, len, max, label) \ + do { \ + if (tic6x_do_align (n, fill, len, max)) \ + goto label; \ + } while (0) +extern bfd_boolean tic6x_do_align (int n, char *fill, int len, int max); + +#define md_end() tic6x_end (); +extern void tic6x_end (void); + #define md_parse_name(name, exprP, mode, nextcharP) \ tic6x_parse_name (name, exprP, mode, nextcharP) extern int tic6x_parse_name (const char *name, expressionS *exprP, |