tc-score.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* tc-score.h -- Score specific file for assembler
  2. Copyright (C) 2006-2015 Free Software Foundation, Inc.
  3. Contributed by:
  4. Brain.lin (brain.lin@sunplusct.com)
  5. Mei Ligang (ligang@sunnorth.com.cn)
  6. Pei-Lin Tsai (pltsai@sunplus.com)
  7. This file is part of GAS, the GNU Assembler.
  8. GAS is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 3, or (at your option)
  11. any later version.
  12. GAS is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with GAS; see the file COPYING. If not, write to the Free
  18. Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  19. MA 02110-1301, USA. */
  20. #ifndef TC_SCORE
  21. #define TC_SCORE
  22. #define TARGET_ARCH bfd_arch_score
  23. #define WORKING_DOT_WORD
  24. #define DIFF_EXPR_OK
  25. #define RELOC_EXPANSION_POSSIBLE
  26. #define MAX_RELOC_EXPANSION 2
  27. #define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4)
  28. #define md_undefined_symbol(name) NULL
  29. #define TARGET_FORMAT (target_big_endian ? "elf32-bigscore" : "elf32-littlescore")
  30. #define md_relax_frag(segment, fragp, stretch) score_relax_frag (segment, fragp, stretch)
  31. extern int score_relax_frag (asection *, struct frag *, long);
  32. /* #define md_frag_check(fragp) score_frag_check (fragp) */
  33. extern void score_frag_check (fragS *);
  34. #define TC_VALIDATE_FIX(FIXP, SEGTYPE, SKIP) score_validate_fix (FIXP)
  35. extern void score_validate_fix (struct fix *);
  36. #define TC_FORCE_RELOCATION(FIXP) score_force_relocation (FIXP)
  37. extern int score_force_relocation (struct fix *);
  38. #define tc_fix_adjustable(fixp) score_fix_adjustable (fixp)
  39. extern bfd_boolean score_fix_adjustable (struct fix *);
  40. #define elf_tc_final_processing score_elf_final_processing
  41. extern void score_elf_final_processing (void);
  42. struct score_tc_frag_data
  43. {
  44. unsigned int is_insn;
  45. struct fix *fixp;
  46. };
  47. #define TC_FRAG_TYPE struct score_tc_frag_data
  48. #define TC_FRAG_INIT(FRAGP) \
  49. do \
  50. { \
  51. (FRAGP)->tc_frag_data.is_insn = (((FRAGP)->fr_type == rs_machine_dependent) ? 1 : 0); \
  52. } \
  53. while (0)
  54. #ifdef OBJ_ELF
  55. #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
  56. #else
  57. #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
  58. #endif
  59. #endif /*TC_SCORE */