tc-metag.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* tc-metag.h -- Header file for tc-metag.c.
  2. Copyright (C) 2013-2015 Free Software Foundation, Inc.
  3. Contributed by Imagination Technologies Ltd.
  4. This file is part of GAS, the GNU Assembler.
  5. GAS is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. GAS is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GAS; see the file COPYING. If not, write to the Free
  15. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  16. 02110-1301, USA. */
  17. #define TC_METAG
  18. #define LISTING_HEADER "META GAS "
  19. /* The target BFD architecture. */
  20. #define TARGET_ARCH bfd_arch_metag
  21. #define TARGET_FORMAT "elf32-metag"
  22. #define TARGET_BYTES_BIG_ENDIAN 0
  23. /* Permit temporary numeric labels. */
  24. #define LOCAL_LABELS_FB 1
  25. #define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
  26. /* We don't need to handle .word strangely. */
  27. #define WORKING_DOT_WORD
  28. /* Values passed to md_apply_fix don't include the symbol value. */
  29. #define MD_APPLY_SYM_VALUE(FIX) 0
  30. #define tc_fix_adjustable(FIX) metag_fix_adjustable (FIX)
  31. extern bfd_boolean metag_fix_adjustable (struct fix *);
  32. #define TC_FORCE_RELOCATION(fix) metag_force_relocation (fix)
  33. extern int metag_force_relocation (struct fix *);
  34. #define TC_HANDLES_FX_DONE
  35. /* Call md_pcrel_from_section(), not md_pcrel_from(). */
  36. #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
  37. extern long md_pcrel_from_section (struct fix *, segT);
  38. #define HANDLE_ALIGN(fragp) metag_handle_align (fragp)
  39. extern void metag_handle_align (struct frag *);
  40. #define DWARF2_LINE_MIN_INSN_LENGTH 1
  41. #define md_parse_name(name, exprP, mode, nextcharP) \
  42. metag_parse_name ((name), (exprP), (mode), (nextcharP))
  43. extern int metag_parse_name (char const *, expressionS *, enum expr_mode, char *);
  44. /* This is used to construct expressions out of @GOTOFF, @PLT and @GOT
  45. symbols. The relocation type is stored in X_md. */
  46. #define O_PIC_reloc O_md1
  47. #define TC_CASE_SENSITIVE
  48. extern const char metag_symbol_chars[];
  49. #define tc_symbol_chars metag_symbol_chars