tc-or1k.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* tc-or1k.h -- Header file for tc-or1k.c.
  2. Copyright (C) 2001-2022 Free Software Foundation, Inc.
  3. This file is part of GAS, the GNU Assembler.
  4. GAS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. GAS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, see <http://www.gnu.org/licenses/> */
  14. #define TC_OR1K
  15. #define LISTING_HEADER "Or1k GAS "
  16. /* The target BFD architecture. */
  17. #define TARGET_ARCH bfd_arch_or1k
  18. extern unsigned long or1k_machine;
  19. #define TARGET_MACH (or1k_machine)
  20. #define TARGET_FORMAT "elf32-or1k"
  21. #define TARGET_BYTES_BIG_ENDIAN 1
  22. extern const char or1k_comment_chars [];
  23. #define tc_comment_chars or1k_comment_chars
  24. /* Permit temporary numeric labels. */
  25. #define LOCAL_LABELS_FB 1
  26. #define DIFF_EXPR_OK 1 /* .-foo gets turned into PC relative relocs. */
  27. /* We don't need to handle .word strangely. */
  28. #define WORKING_DOT_WORD
  29. /* Values passed to md_apply_fix don't include the symbol value. */
  30. #define MD_APPLY_SYM_VALUE(FIX) 0
  31. #define md_apply_fix or1k_apply_fix
  32. extern void or1k_apply_fix (struct fix *, valueT *, segT);
  33. extern bool or1k_fix_adjustable (struct fix *);
  34. #define tc_fix_adjustable(FIX) or1k_fix_adjustable (FIX)
  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. /* For 8 vs 16 vs 32 bit branch selection. */
  38. extern const struct relax_type md_relax_table[];
  39. #define TC_GENERIC_RELAX_TABLE md_relax_table
  40. #define elf_tc_final_processing or1k_elf_final_processing
  41. void or1k_elf_final_processing (void);
  42. /* Enable cfi directives. */
  43. #define TARGET_USE_CFIPOP 1
  44. /* Stack grows to lower addresses and wants 4 byte boundary. */
  45. #define DWARF2_CIE_DATA_ALIGNMENT -4
  46. /* Define the column that represents the PC. */
  47. #define DWARF2_DEFAULT_RETURN_COLUMN 9
  48. /* or1k instructions are 4 bytes long. */
  49. #define DWARF2_LINE_MIN_INSN_LENGTH 4
  50. #define tc_cfi_frame_initial_instructions \
  51. or1k_cfi_frame_initial_instructions
  52. extern void or1k_cfi_frame_initial_instructions (void);
  53. #define md_single_noop_insn "l.nop"