tc-v850.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* tc-v850.h -- Header file for tc-v850.c.
  2. Copyright (C) 1996-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 GAS; see the file COPYING. If not, write to the Free
  14. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  15. 02110-1301, USA. */
  16. #define TC_V850
  17. #include "elf/v850.h"
  18. #define TARGET_BYTES_BIG_ENDIAN 0
  19. /* The target BFD architecture. */
  20. #define TARGET_ARCH v850_target_arch
  21. extern enum bfd_architecture v850_target_arch;
  22. /* The target BFD format. */
  23. #define TARGET_FORMAT v850_target_format
  24. extern const char * v850_target_format;
  25. #define md_operand(x)
  26. #define tc_fix_adjustable(FIX) v850_fix_adjustable (FIX)
  27. extern bool v850_fix_adjustable (struct fix *);
  28. #define TC_FORCE_RELOCATION(FIX) v850_force_relocation(FIX)
  29. extern int v850_force_relocation (struct fix *);
  30. #ifdef OBJ_ELF
  31. /* Values passed to md_apply_fix don't include the symbol value. */
  32. #define MD_APPLY_SYM_VALUE(FIX) 0
  33. #endif
  34. /* Permit temporary numeric labels. */
  35. #define LOCAL_LABELS_FB 1
  36. #define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs. */
  37. /* We don't need to handle .word strangely. */
  38. #define WORKING_DOT_WORD
  39. #define md_number_to_chars number_to_chars_littleendian
  40. /* We need to handle lo(), hi(), etc etc in .hword, .word, etc
  41. directives, so we have to parse "cons" expressions ourselves. */
  42. #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_cons_expression_v850 (EXP)
  43. extern bfd_reloc_code_real_type parse_cons_expression_v850 (expressionS *);
  44. #define TC_CONS_FIX_NEW cons_fix_new_v850
  45. extern void cons_fix_new_v850 (fragS *, int, int, expressionS *,
  46. bfd_reloc_code_real_type);
  47. #define TC_GENERIC_RELAX_TABLE md_relax_table
  48. extern const struct relax_type md_relax_table[];
  49. /* When relaxing, we need to generate
  50. relocations for alignment directives. */
  51. #define HANDLE_ALIGN(frag) v850_handle_align (frag)
  52. extern void v850_handle_align (fragS *);
  53. /* We need space in a frag's fixed size to allow for alignment when relaxing. */
  54. #define TC_FX_SIZE_SLACK(FIX) 2
  55. #define MD_PCREL_FROM_SECTION(FIX, SEC) v850_pcrel_from_section (FIX, SEC)
  56. extern long v850_pcrel_from_section (struct fix *, asection *);
  57. #define DWARF2_LINE_MIN_INSN_LENGTH 2
  58. /* We need to record the operand involved when a pseudo-reloc is
  59. processed so that the resulting value can be inserted correctly. */
  60. #define TC_FIX_TYPE void *
  61. #define TC_INIT_FIX_DATA(fixP) (fixP)->tc_fix_data = NULL
  62. #define md_end v850_md_end
  63. extern void v850_md_end (void);