]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/config/tc-ns32k.h
gas/testsuite/
[thirdparty/binutils-gdb.git] / gas / config / tc-ns32k.h
CommitLineData
252b5132 1/* tc-ns32k.h -- Opcode table for National Semi 32k processor
ea1562b3 2 Copyright 1987, 1992, 1993, 1994, 1995, 1997, 2000, 2002, 2005
f7e42eb4 3 Free Software Foundation, Inc.
252b5132
RH
4
5 This file is part of GAS, the GNU Assembler.
6
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
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
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
4b4da160
NC
19 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20 02110-1301, USA. */
252b5132
RH
21
22#define TC_NS32K
23
24#define TARGET_BYTES_BIG_ENDIAN 0
25
26#define TC_PCREL_ADJUST(F) md_pcrel_adjust(F)
ea1562b3 27extern int md_pcrel_adjust (fragS *);
252b5132 28
252b5132
RH
29#define NO_RELOC BFD_RELOC_NONE
30
31#define TARGET_ARCH bfd_arch_ns32k
32
ea1562b3 33#ifndef TARGET_FORMAT /* Maybe defined in te-*.h. */
252b5132
RH
34#define TARGET_FORMAT "a.out-pc532-mach"
35#endif
252b5132
RH
36
37#define LOCAL_LABELS_FB 1
38
39#include "bit_fix.h"
40
252b5132
RH
41#ifdef SEQUENT_COMPATABILITY
42#define DEF_MODEC 20
43#define DEF_MODEL 21
44#endif
45
46#ifndef DEF_MODEC
47#define DEF_MODEC 20
48#endif
49
50#ifndef DEF_MODEL
51#define DEF_MODEL 20
52#endif
53
54#define MAX_ARGS 4
55#define ARG_LEN 50
56
57#define TC_CONS_FIX_NEW cons_fix_new_ns32k
ea1562b3 58extern void cons_fix_new_ns32k (fragS *, int, int, expressionS *);
4eb6b71c
NC
59
60/* The NS32x32 has a non 0 nop instruction which should be used in aligns. */
252b5132
RH
61#define NOP_OPCODE 0xa2
62
63#define md_operand(x)
64
65extern const struct relax_type md_relax_table[];
66#define TC_GENERIC_RELAX_TABLE md_relax_table
67
68#define TC_FRAG_TYPE \
4eb6b71c
NC
69 struct \
70 { \
71 fragS * fr_opcode_fragP; \
72 unsigned int fr_opcode_offset; \
73 char fr_bsr; \
74 }
252b5132
RH
75
76#define TC_FRAG_INIT(X) \
77 do \
78 { \
79 frag_opcode_frag (X) = NULL; \
80 frag_opcode_offset (X) = 0; \
4eb6b71c 81 frag_bsr (X) = 0; \
252b5132 82 } \
814f6641 83 while (0)
252b5132 84
4eb6b71c 85/* Accessor macros for things which may move around. */
252b5132
RH
86#define frag_opcode_frag(X) (X)->tc_frag_data.fr_opcode_fragP
87#define frag_opcode_offset(X) (X)->tc_frag_data.fr_opcode_offset
88#define frag_bsr(X) (X)->tc_frag_data.fr_bsr
89
90#define TC_FIX_TYPE \
4eb6b71c
NC
91 struct \
92 { \
93 fragS * opcode_fragP; \
94 unsigned int opcode_offset; \
95 unsigned int bsr : 1; \
96 }
252b5132
RH
97
98/* Accessor macros for things which may move around.
99 See comments in write.h. */
100#define fix_im_disp(X) (X)->fx_im_disp
101#define fix_bit_fixP(X) (X)->fx_bit_fixP
102#define fix_opcode_frag(X) (X)->tc_fix_data.opcode_fragP
103#define fix_opcode_offset(X) (X)->tc_fix_data.opcode_offset
104#define fix_bsr(X) (X)->tc_fix_data.bsr
105
106#define TC_INIT_FIX_DATA(X) \
107 do \
108 { \
109 fix_opcode_frag(X) = NULL; \
110 fix_opcode_offset(X) = 0; \
111 fix_bsr(X) = 0; \
112 } \
814f6641 113 while (0)
252b5132 114
a161fe53 115#define TC_FIX_DATA_PRINT(FILE, FIX) \
252b5132
RH
116 do \
117 { \
814f6641 118 fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
a161fe53
AM
119 (unsigned long) fix_opcode_frag (FIX), \
120 fix_opcode_offset (FIX), \
121 fix_bsr (FIX)); \
252b5132 122 } \
814f6641 123 while (0)