1/* hppa-aux.h -- Assembler for the PA - PA-RISC specific support routines
2   Copyright (C) 1989 Free Software Foundation, Inc.
3
4This file is part of GAS, the GNU Assembler.
5
6GAS is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GAS is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GAS; see the file COPYING.  If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20/*
21   HP PA-RISC support was contributed by the Center for Software Science
22   at the University of Utah.
23 */
24
25/* HP-PA support for Mach-O    ... USV */
26
27#ifndef HPPA_AUX_DEFINED
28#define HPPA_AUX_DEFINED
29
30typedef enum FPOF { SGL, DBL, ILLEGAL_FMT, QUAD } FP_Operand_Format;
31
32int pa_parse_number();
33
34int pa_parse_fp_cmp_cond();
35
36FP_Operand_Format pa_parse_fp_format();
37
38int pa_parse_nullif();
39
40int pa_parse_nonneg_cmpsub_cmpltr();
41
42int pa_parse_neg_cmpsub_cmpltr();
43
44int pa_parse_nonneg_add_cmpltr();
45
46int pa_parse_neg_add_cmpltr();
47
48/* A structure used during assembly of individual instructions */
49
50struct pa_it {
51    char    *error;
52    uint32_t opcode;
53#ifdef undef
54    symbol_dictS *nlistp;      /*** used to be:    struct nlist *nlistp; */
55#else
56    nlist_t *nlistp;
57#endif
58    expressionS exp;
59    int pcrel;
60    int pcrel_reloc;
61    FP_Operand_Format fpof1;   /* Floating Point Operand Format, operand 1 */
62    FP_Operand_Format fpof2;   /* Floating Point Operand Format, operand 2 */
63                               /* (used only for class 1 instructions --   */
64			       /* the conversion instructions)             */
65    int32_t field_selector;
66    unsigned int reloc;
67/*	enum reloc_type_hppa reloc; */
68    int code;
69    int32_t arg_reloc;
70};
71
72extern struct pa_it the_insn;
73
74/*
75  PA-89 floating point registers are arranged like this:
76
77
78  +--------------+--------------+
79  |   0 or 16L   |  16 or 16R   |
80  +--------------+--------------+
81  |   1 or 17L   |  17 or 17R   |
82  +--------------+--------------+
83  |              |              |
84
85  .              .              .
86  .              .              .
87  .              .              .
88
89  |              |              |
90  +--------------+--------------+
91  |  14 or 30L   |  30 or 30R   |
92  +--------------+--------------+
93  |  15 or 31L   |  31 or 31R   |
94  +--------------+--------------+
95
96
97  The following is a version of pa_parse_number that
98  handles the L/R notation and returns the correct
99  value to put into the instruction register field.
100  The correct value to put into the instruction is
101  encoded in the structure 'pa_89_fp_reg_struct'.
102
103 */
104
105struct pa_89_fp_reg_struct {
106  char number_part;
107  char L_R_select;
108};
109
110int need_89_opcode();
111int pa_89_parse_number();
112
113extern int getAbsoluteExpression(
114    char *str);
115extern int evaluateAbsolute(
116    expressionS exp,
117    int field_selector);
118extern int getExpression(
119    char *str);
120
121#endif /* HPPA_AUX_DEFINED */
122
123/* end hppa-aux.h */
124