diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-03-25 21:12:36 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2010-03-25 21:12:36 +0000 |
commit | 40b365969f7fd035dfa0c6ffe729fd2501b5f11d (patch) | |
tree | 759a27054778d995f168ca703e90f4f073545060 /gas/config/tc-tic6x.h | |
parent | aa7d318d60c595f97230f45575c882c73f7bdcf7 (diff) | |
download | binutils-gdb-40b365969f7fd035dfa0c6ffe729fd2501b5f11d.tar.gz |
bfd:
* Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
(ALL_MACHINES_CFILES): Add cpu-tic6x.c.
(BFD32_BACKENDS): Add elf32-tic6x.lo.
(BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
* Makefile.in: Regenerate.
* archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
(bfd_archures_list): Update.
* config.bfd (tic6x-*-elf): New.
* configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
New.
* configure: Regenerate.
* cpu-tic6x.c, elf32-tic6x.c: New.
* reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
* targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
(_bfd_target_vector): Update.
* bfd-in2.h, libbfd.h: Regenerate.
binutils:
* MAINTAINERS: Add self as TI C6X maintainer.
* NEWS: Add news entry for TI C6X support.
* readelf.c: Include elf/tic6x.h.
(guess_is_rela): Handle EM_TI_C6000.
(dump_relocations): Likewise.
(get_tic6x_dynamic_type): New.
(get_dynamic_type): Call it.
(get_machine_flags): Handle EF_C6000_REL.
(get_osabi_name): Handle machine-specific values only for relevant
machines. Handle C6X values.
(get_tic6x_segment_type): New.
(get_segment_type): Call it.
(get_tic6x_section_type_name): New.
(get_section_type_name): Call it.
(is_32bit_abs_reloc, is_16bit_abs_reloc, is_none_reloc): Handle
EM_TI_C6000.
gas:
* Makefile.am (TARGET_CPU_CFILES): Add config/tc-tic6x.c.
(TARGET_CPU_HFILES): Add config/tc-tic6x.h.
* Makefile.in: Regenerate.
* NEWS: Add news entry for TI C6X support.
* app.c (do_scrub_chars): Handle "||^" for TI C6X. Handle
TC_PREDICATE_START_CHAR and TC_PREDICATE_END_CHAR. Keep spaces in
operands if TC_KEEP_OPERAND_SPACES.
* configure.tgt (tic6x-*-*): New.
* config/tc-ia64.h (TC_PREDICATE_START_CHAR,
TC_PREDICATE_END_CHAR): Define.
* config/tc-tic6x.c, config/tc-tic6x.h: New.
* doc/Makefile.am (CPU_DOCS): Add c-tic6x.texi.
* doc/Makefile.in: Regenerate.
* doc/all.texi (TIC6X): Define.
* doc/as.texinfo: Add TI C6X documentation. Include c-tic6x.texi.
* doc/c-tic6x.texi: New.
gas/testsuite:
* gas/tic6x: New directory and testcases.
include:
* dis-asm.h (print_insn_tic6x): Declare.
include/elf:
* common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define.
* tic6x.h: New.
include/opcode:
* tic6x-control-registers.h, tic6x-insn-formats.h,
tic6x-opcode-table.h, tic6x.h: New.
ld:
* Makefile.am (ALL_EMULATIONS): Add eelf32_tic6x_be.o and
eelf32_tic6x_le.o.
(eelf32_tic6x_be.c, eelf32_tic6x_le.c): New.
* NEWS: Add news entry for TI C6X support.
* configure.tgt (tic6x-*-*): New.
* emulparams/elf32_tic6x_be.sh, emulparams/elf32_tic6x_le.sh: New.
ld/testsuite:
* ld-elf/flags1.d, ld-elf/merge.d: XFAIL for tic6x-*-*.
* ld-elf/sec-to-seg.exp: Set B_test_same_seg to 0 for tic6x-*-*.
* ld-tic6x: New directory and testcases.
opcodes:
* Makefile.am (TARGET_LIBOPCODES_CFILES): Add tic6x-dis.c.
* Makefile.in: Regenerate.
* configure.in (bfd_tic6x_arch): New.
* configure: Regenerate.
* disassemble.c (ARCH_tic6x): Define if ARCH_all.
(disassembler): Handle TI C6X.
* tic6x-dis.c: New.
Diffstat (limited to 'gas/config/tc-tic6x.h')
-rw-r--r-- | gas/config/tc-tic6x.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/gas/config/tc-tic6x.h b/gas/config/tc-tic6x.h new file mode 100644 index 00000000000..05c3db8bd45 --- /dev/null +++ b/gas/config/tc-tic6x.h @@ -0,0 +1,111 @@ +/* Definitions for TI C6X assembler. + Copyright 2010 + Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#define TC_TIC6X 1 +#define TARGET_BYTES_BIG_ENDIAN 0 +#define WORKING_DOT_WORD +#define DOUBLEBAR_PARALLEL +#define DWARF2_LINE_MIN_INSN_LENGTH 2 +#define MD_APPLY_SYM_VALUE(FIX) 0 +#define TC_PREDICATE_START_CHAR '[' +#define TC_PREDICATE_END_CHAR ']' +/* For TI C6X, we keep spaces in what the preprocessor considers + operands as they may separate functional unit specifiers from + operands. */ +#define TC_KEEP_OPERAND_SPACES 1 + +#define TARGET_ARCH bfd_arch_tic6x +#define TARGET_FORMAT (target_big_endian \ + ? "elf32-tic6x-be" \ + : "elf32-tic6x-le") + +typedef struct +{ + /* Number of instructions in the current execute packet. */ + unsigned int num_execute_packet_insns; + + /* 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; + + /* Whether compact instructions are forbidden here. */ + bfd_boolean nocmp; + + /* 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). */ + char *last_insn_lsb; + + /* If there has been an SPMASK instruction in the current execute + packet, a pointer to the first byte in it (for processing + ||^); otherwise NULL. */ + char *spmask_addr; + + /* If an SPLOOP-family instruction has been seen, and a following + SPKERNEL-family instruction has not yet been seen, the ii value + from the SPLOOP instruction (in the range 1 to 14); otherwise + 0. */ + int sploop_ii; +} tic6x_segment_info_type; +#define TC_SEGMENT_INFO_TYPE tic6x_segment_info_type + +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 + instruction, whereas a non-constant represents a DP-relative + value counting in the appropriate units). */ + bfd_boolean fix_adda; +} tic6x_fix_info; +#define TC_FIX_TYPE tic6x_fix_info +#define TC_INIT_FIX_DATA(fixP) tic6x_init_fix_data (fixP) +struct fix; +extern void tic6x_init_fix_data (struct fix *fixP); + +#define md_after_parse_args() tic6x_after_parse_args () +extern void tic6x_after_parse_args (void); + +#define md_cleanup() tic6x_cleanup () +extern void tic6x_cleanup (void); + +#define md_cons_align(n) tic6x_cons_align (n) +extern void tic6x_cons_align (int n); + +#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, + enum expr_mode mode, char *nextchar); + +#define md_start_line_hook() tic6x_start_line_hook () +extern void tic6x_start_line_hook (void); + +#define TC_CONS_FIX_NEW(frag, where, size, exp) \ + tic6x_cons_fix_new (frag, where, size, exp) +extern void tic6x_cons_fix_new (fragS *frag, int where, int size, + expressionS *exp); + +#define tc_frob_label(sym) tic6x_frob_label (sym) +extern void tic6x_frob_label (symbolS *sym); + +#define tc_unrecognized_line(c) tic6x_unrecognized_line (c) +extern int tic6x_unrecognized_line (int c); |