1 /* tc-ns32k.h -- Opcode table for National Semi 32k processor
2 Copyright (C) 1987, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
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 2, or (at your option)
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.
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, 59 Temple Place - Suite 330, Boston, MA
23 #define TARGET_BYTES_BIG_ENDIAN 0
25 #define TC_PCREL_ADJUST(F) md_pcrel_adjust(F)
28 #define NO_RELOC BFD_RELOC_NONE
30 #define TARGET_ARCH bfd_arch_ns32k
32 #ifndef TARGET_FORMAT /* Maybe defined in te-*.h */
33 #define TARGET_FORMAT "a.out-pc532-mach"
39 #define LOCAL_LABELS_FB 1
43 #define tc_aout_pre_write_hook(x) {;} /* not used */
44 #define tc_crawl_symbol_chain(a) {;} /* not used */
45 #define tc_headers_hook(a) {;} /* not used */
47 #ifdef SEQUENT_COMPATABILITY
63 #define TC_CONS_FIX_NEW cons_fix_new_ns32k
64 extern void fix_new_ns32k_exp
PARAMS((fragS
*frag
,
70 bit_fixS
*bit_fixP
, /* really bit_fixS */
73 unsigned int opcode_offset
));
76 extern void fix_new_ns32k
PARAMS ((fragS
*frag
,
79 struct symbol
*add_symbol
,
83 bit_fixS
*bit_fixP
, /* really bit_fixS */
86 unsigned int opcode_offset
));
88 extern void cons_fix_new_ns32k
PARAMS ((fragS
*frag
,
93 /* the NS32x32 has a non 0 nop instruction which should be used in aligns */
94 #define NOP_OPCODE 0xa2
98 extern const struct relax_type md_relax_table
[];
99 #define TC_GENERIC_RELAX_TABLE md_relax_table
102 #define TC_FRAG_INIT(X) \
105 frag_opcode_frag(X) = NULL; \
106 frag_opcode_offset(X) = 0; \
111 /* Accessor macros for things which may move around */
112 #define frag_opcode_frag(X) (X)->fr_targ.fr_ns32k.fr_opcode_fragP
113 #define frag_opcode_offset(X) (X)->fr_targ.fr_ns32k.fr_opcode_offset
114 #define frag_bsr(X) (X)->fr_targ.fr_ns32k.fr_bsr
116 #define TC_FIX_TYPE \
119 fragS *opcode_fragP; \
120 unsigned int opcode_offset; \
121 unsigned int bsr : 1; \
124 /* Accessor macros for things which may move around.
125 See comments in write.h. */
126 #define fix_im_disp(X) (X)->fx_im_disp
127 #define fix_bit_fixP(X) (X)->fx_bit_fixP
128 #define fix_opcode_frag(X) (X)->tc_fix_data.opcode_fragP
129 #define fix_opcode_offset(X) (X)->tc_fix_data.opcode_offset
130 #define fix_bsr(X) (X)->tc_fix_data.bsr
132 #define TC_INIT_FIX_DATA(X) \
135 fix_opcode_frag(X) = NULL; \
136 fix_opcode_offset(X) = 0; \
141 #define TC_FIX_DATA_PRINT(FILE, FIXP) \
144 fprintf((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
145 (unsigned long) fix_opcode_frag (FIXP), \
146 fix_opcode_offset (FIXP), \