xref: /netbsd-src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
1 /* tc-vax.h -- Header file for tc-vax.c.
2    Copyright (C) 1987-2022 Free Software Foundation, Inc.
3 
4    This file is part of GAS, the GNU Assembler.
5 
6    GAS is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3, or (at your option)
9    any later version.
10 
11    GAS is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15 
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, 51 Franklin Street - Fifth Floor, Boston, MA
19    02110-1301, USA.  */
20 
21 #define TC_VAX 1
22 
23 #define TARGET_BYTES_BIG_ENDIAN 0
24 
25 #ifdef OBJ_AOUT
26 #ifdef TE_NetBSD
27 #define TARGET_FORMAT "a.out-vax-netbsd"
28 #endif
29 #ifndef TARGET_FORMAT
30 #define TARGET_FORMAT "a.out-vax-bsd"
31 #endif
32 #endif
33 
34 #ifdef OBJ_VMS
35 #define TARGET_FORMAT "vms-vax"
36 #endif
37 
38 #ifdef OBJ_ELF
39 #define TARGET_FORMAT "elf32-vax"
40 #define DIFF_EXPR_OK 1
41 #define CFI_DIFF_EXPR_OK 0
42 #endif
43 
44 #define TARGET_ARCH	bfd_arch_vax
45 
46 #define NO_RELOC	BFD_RELOC_NONE
47 #define NOP_OPCODE	0x01
48 
49 #define md_operand(x)
50 
51 #ifdef OBJ_ELF
52 #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) vax_cons (EXP, NBYTES)
53 #define TC_CONS_FIX_NEW vax_cons_fix_new
54 bfd_reloc_code_real_type vax_cons (expressionS *, int);
55 void vax_cons_fix_new (struct frag *, int, unsigned int, struct expressionS *,
56 		       bfd_reloc_code_real_type);
57 #endif
58 
59 extern const struct relax_type md_relax_table[];
60 #define TC_GENERIC_RELAX_TABLE md_relax_table
61 
62 /* Values passed to md_apply_fix don't include symbol values.  */
63 #define MD_APPLY_SYM_VALUE(FIX) 0
64 
65 #define tc_fix_adjustable(FIX)					\
66 	((FIX)->fx_r_type != BFD_RELOC_VTABLE_INHERIT		\
67 	 && (FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL		\
68 	 && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL		\
69 	 && (FIX)->fx_r_type != BFD_RELOC_VTABLE_ENTRY		\
70 	 && ((FIX)->fx_pcrel					\
71 	     || ((FIX)->fx_subsy != NULL			\
72 		 && (S_GET_SEGMENT ((FIX)->fx_subsy)		\
73 		     == S_GET_SEGMENT ((FIX)->fx_addsy)))	\
74 	     || S_IS_LOCAL ((FIX)->fx_addsy)))
75 
76 #define TARGET_USE_CFIPOP 1
77 
78 #define tc_cfi_frame_initial_instructions vax_cfi_frame_initial_instructions
79 extern void vax_cfi_frame_initial_instructions (void);
80 
81 #define tc_regname_to_dw2regnum tc_vax_regname_to_dw2regnum
82 extern int tc_vax_regname_to_dw2regnum (char *);
83 
84 #define tc_cfi_emit_pcrel_expr vax_cfi_emit_pcrel_expr
85 extern void vax_cfi_emit_pcrel_expr (expressionS *, unsigned int);
86 
87 #define DWARF2_LINE_MIN_INSN_LENGTH     1
88 #define DWARF2_DEFAULT_RETURN_COLUMN    15
89 #define DWARF2_CIE_DATA_ALIGNMENT       -4
90