xref: /dflybsd-src/contrib/gcc-8.0/gcc/dwarf2out.h (revision 38fd149817dfbff97799f62fcb70be98c4e32523)
1*38fd1498Szrj /* dwarf2out.h - Various declarations for functions found in dwarf2out.c
2*38fd1498Szrj    Copyright (C) 1998-2018 Free Software Foundation, Inc.
3*38fd1498Szrj 
4*38fd1498Szrj This file is part of GCC.
5*38fd1498Szrj 
6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify it under
7*38fd1498Szrj the terms of the GNU General Public License as published by the Free
8*38fd1498Szrj Software Foundation; either version 3, or (at your option) any later
9*38fd1498Szrj version.
10*38fd1498Szrj 
11*38fd1498Szrj GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12*38fd1498Szrj WARRANTY; without even the implied warranty of MERCHANTABILITY or
13*38fd1498Szrj FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14*38fd1498Szrj for more details.
15*38fd1498Szrj 
16*38fd1498Szrj You should have received a copy of the GNU General Public License
17*38fd1498Szrj along with GCC; see the file COPYING3.  If not see
18*38fd1498Szrj <http://www.gnu.org/licenses/>.  */
19*38fd1498Szrj 
20*38fd1498Szrj #ifndef GCC_DWARF2OUT_H
21*38fd1498Szrj #define GCC_DWARF2OUT_H 1
22*38fd1498Szrj 
23*38fd1498Szrj #include "dwarf2.h"	/* ??? Remove this once only used by dwarf2foo.c.  */
24*38fd1498Szrj 
25*38fd1498Szrj typedef struct die_struct *dw_die_ref;
26*38fd1498Szrj typedef const struct die_struct *const_dw_die_ref;
27*38fd1498Szrj 
28*38fd1498Szrj typedef struct dw_val_node *dw_val_ref;
29*38fd1498Szrj typedef struct dw_cfi_node *dw_cfi_ref;
30*38fd1498Szrj typedef struct dw_loc_descr_node *dw_loc_descr_ref;
31*38fd1498Szrj typedef struct dw_loc_list_struct *dw_loc_list_ref;
32*38fd1498Szrj typedef struct dw_discr_list_node *dw_discr_list_ref;
33*38fd1498Szrj typedef wide_int *wide_int_ptr;
34*38fd1498Szrj 
35*38fd1498Szrj 
36*38fd1498Szrj /* Call frames are described using a sequence of Call Frame
37*38fd1498Szrj    Information instructions.  The register number, offset
38*38fd1498Szrj    and address fields are provided as possible operands;
39*38fd1498Szrj    their use is selected by the opcode field.  */
40*38fd1498Szrj 
41*38fd1498Szrj enum dw_cfi_oprnd_type {
42*38fd1498Szrj   dw_cfi_oprnd_unused,
43*38fd1498Szrj   dw_cfi_oprnd_reg_num,
44*38fd1498Szrj   dw_cfi_oprnd_offset,
45*38fd1498Szrj   dw_cfi_oprnd_addr,
46*38fd1498Szrj   dw_cfi_oprnd_loc,
47*38fd1498Szrj   dw_cfi_oprnd_cfa_loc
48*38fd1498Szrj };
49*38fd1498Szrj 
50*38fd1498Szrj typedef union GTY(()) {
51*38fd1498Szrj   unsigned int GTY ((tag ("dw_cfi_oprnd_reg_num"))) dw_cfi_reg_num;
52*38fd1498Szrj   HOST_WIDE_INT GTY ((tag ("dw_cfi_oprnd_offset"))) dw_cfi_offset;
53*38fd1498Szrj   const char * GTY ((tag ("dw_cfi_oprnd_addr"))) dw_cfi_addr;
54*38fd1498Szrj   struct dw_loc_descr_node * GTY ((tag ("dw_cfi_oprnd_loc"))) dw_cfi_loc;
55*38fd1498Szrj   struct dw_cfa_location * GTY ((tag ("dw_cfi_oprnd_cfa_loc")))
56*38fd1498Szrj     dw_cfi_cfa_loc;
57*38fd1498Szrj } dw_cfi_oprnd;
58*38fd1498Szrj 
59*38fd1498Szrj struct GTY(()) dw_cfi_node {
60*38fd1498Szrj   enum dwarf_call_frame_info dw_cfi_opc;
61*38fd1498Szrj   dw_cfi_oprnd GTY ((desc ("dw_cfi_oprnd1_desc (%1.dw_cfi_opc)")))
62*38fd1498Szrj     dw_cfi_oprnd1;
63*38fd1498Szrj   dw_cfi_oprnd GTY ((desc ("dw_cfi_oprnd2_desc (%1.dw_cfi_opc)")))
64*38fd1498Szrj     dw_cfi_oprnd2;
65*38fd1498Szrj };
66*38fd1498Szrj 
67*38fd1498Szrj 
68*38fd1498Szrj typedef vec<dw_cfi_ref, va_gc> *cfi_vec;
69*38fd1498Szrj 
70*38fd1498Szrj typedef struct dw_fde_node *dw_fde_ref;
71*38fd1498Szrj 
72*38fd1498Szrj /* All call frame descriptions (FDE's) in the GCC generated DWARF
73*38fd1498Szrj    refer to a single Common Information Entry (CIE), defined at
74*38fd1498Szrj    the beginning of the .debug_frame section.  This use of a single
75*38fd1498Szrj    CIE obviates the need to keep track of multiple CIE's
76*38fd1498Szrj    in the DWARF generation routines below.  */
77*38fd1498Szrj 
78*38fd1498Szrj struct GTY(()) dw_fde_node {
79*38fd1498Szrj   tree decl;
80*38fd1498Szrj   const char *dw_fde_begin;
81*38fd1498Szrj   const char *dw_fde_current_label;
82*38fd1498Szrj   const char *dw_fde_end;
83*38fd1498Szrj   const char *dw_fde_vms_end_prologue;
84*38fd1498Szrj   const char *dw_fde_vms_begin_epilogue;
85*38fd1498Szrj   const char *dw_fde_second_begin;
86*38fd1498Szrj   const char *dw_fde_second_end;
87*38fd1498Szrj   cfi_vec dw_fde_cfi;
88*38fd1498Szrj   int dw_fde_switch_cfi_index; /* Last CFI before switching sections.  */
89*38fd1498Szrj   HOST_WIDE_INT stack_realignment;
90*38fd1498Szrj 
91*38fd1498Szrj   unsigned funcdef_number;
92*38fd1498Szrj   unsigned fde_index;
93*38fd1498Szrj 
94*38fd1498Szrj   /* Dynamic realign argument pointer register.  */
95*38fd1498Szrj   unsigned int drap_reg;
96*38fd1498Szrj   /* Virtual dynamic realign argument pointer register.  */
97*38fd1498Szrj   unsigned int vdrap_reg;
98*38fd1498Szrj   /* These 3 flags are copied from rtl_data in function.h.  */
99*38fd1498Szrj   unsigned all_throwers_are_sibcalls : 1;
100*38fd1498Szrj   unsigned uses_eh_lsda : 1;
101*38fd1498Szrj   unsigned nothrow : 1;
102*38fd1498Szrj   /* Whether we did stack realign in this call frame.  */
103*38fd1498Szrj   unsigned stack_realign : 1;
104*38fd1498Szrj   /* Whether dynamic realign argument pointer register has been saved.  */
105*38fd1498Szrj   unsigned drap_reg_saved: 1;
106*38fd1498Szrj   /* True iff dw_fde_begin label is in text_section or cold_text_section.  */
107*38fd1498Szrj   unsigned in_std_section : 1;
108*38fd1498Szrj   /* True iff dw_fde_second_begin label is in text_section or
109*38fd1498Szrj      cold_text_section.  */
110*38fd1498Szrj   unsigned second_in_std_section : 1;
111*38fd1498Szrj };
112*38fd1498Szrj 
113*38fd1498Szrj 
114*38fd1498Szrj /* This is how we define the location of the CFA. We use to handle it
115*38fd1498Szrj    as REG + OFFSET all the time,  but now it can be more complex.
116*38fd1498Szrj    It can now be either REG + CFA_OFFSET or *(REG + BASE_OFFSET) + CFA_OFFSET.
117*38fd1498Szrj    Instead of passing around REG and OFFSET, we pass a copy
118*38fd1498Szrj    of this structure.  */
119*38fd1498Szrj struct GTY(()) dw_cfa_location {
120*38fd1498Szrj   poly_int64_pod offset;
121*38fd1498Szrj   poly_int64_pod base_offset;
122*38fd1498Szrj   /* REG is in DWARF_FRAME_REGNUM space, *not* normal REGNO space.  */
123*38fd1498Szrj   unsigned int reg;
124*38fd1498Szrj   BOOL_BITFIELD indirect : 1;  /* 1 if CFA is accessed via a dereference.  */
125*38fd1498Szrj   BOOL_BITFIELD in_use : 1;    /* 1 if a saved cfa is stored here.  */
126*38fd1498Szrj };
127*38fd1498Szrj 
128*38fd1498Szrj 
129*38fd1498Szrj /* Each DIE may have a series of attribute/value pairs.  Values
130*38fd1498Szrj    can take on several forms.  The forms that are used in this
131*38fd1498Szrj    implementation are listed below.  */
132*38fd1498Szrj 
133*38fd1498Szrj enum dw_val_class
134*38fd1498Szrj {
135*38fd1498Szrj   dw_val_class_none,
136*38fd1498Szrj   dw_val_class_addr,
137*38fd1498Szrj   dw_val_class_offset,
138*38fd1498Szrj   dw_val_class_loc,
139*38fd1498Szrj   dw_val_class_loc_list,
140*38fd1498Szrj   dw_val_class_range_list,
141*38fd1498Szrj   dw_val_class_const,
142*38fd1498Szrj   dw_val_class_unsigned_const,
143*38fd1498Szrj   dw_val_class_const_double,
144*38fd1498Szrj   dw_val_class_wide_int,
145*38fd1498Szrj   dw_val_class_vec,
146*38fd1498Szrj   dw_val_class_flag,
147*38fd1498Szrj   dw_val_class_die_ref,
148*38fd1498Szrj   dw_val_class_fde_ref,
149*38fd1498Szrj   dw_val_class_lbl_id,
150*38fd1498Szrj   dw_val_class_lineptr,
151*38fd1498Szrj   dw_val_class_str,
152*38fd1498Szrj   dw_val_class_macptr,
153*38fd1498Szrj   dw_val_class_loclistsptr,
154*38fd1498Szrj   dw_val_class_file,
155*38fd1498Szrj   dw_val_class_data8,
156*38fd1498Szrj   dw_val_class_decl_ref,
157*38fd1498Szrj   dw_val_class_vms_delta,
158*38fd1498Szrj   dw_val_class_high_pc,
159*38fd1498Szrj   dw_val_class_discr_value,
160*38fd1498Szrj   dw_val_class_discr_list,
161*38fd1498Szrj   dw_val_class_const_implicit,
162*38fd1498Szrj   dw_val_class_unsigned_const_implicit,
163*38fd1498Szrj   dw_val_class_file_implicit,
164*38fd1498Szrj   dw_val_class_view_list,
165*38fd1498Szrj   dw_val_class_symview
166*38fd1498Szrj };
167*38fd1498Szrj 
168*38fd1498Szrj /* Describe a floating point constant value, or a vector constant value.  */
169*38fd1498Szrj 
170*38fd1498Szrj struct GTY(()) dw_vec_const {
171*38fd1498Szrj   void * GTY((atomic)) array;
172*38fd1498Szrj   unsigned length;
173*38fd1498Szrj   unsigned elt_size;
174*38fd1498Szrj };
175*38fd1498Szrj 
176*38fd1498Szrj /* Describe a single value that a discriminant can match.
177*38fd1498Szrj 
178*38fd1498Szrj    Discriminants (in the "record variant part" meaning) are scalars.
179*38fd1498Szrj    dw_discr_list_ref and dw_discr_value are a mean to describe a set of
180*38fd1498Szrj    discriminant values that are matched by a particular variant.
181*38fd1498Szrj 
182*38fd1498Szrj    Discriminants can be signed or unsigned scalars, and can be discriminants
183*38fd1498Szrj    values.  Both have to be consistent, though.  */
184*38fd1498Szrj 
185*38fd1498Szrj struct GTY(()) dw_discr_value {
186*38fd1498Szrj   int pos; /* Whether the discriminant value is positive (unsigned).  */
187*38fd1498Szrj   union
188*38fd1498Szrj     {
189*38fd1498Szrj       HOST_WIDE_INT GTY ((tag ("0"))) sval;
190*38fd1498Szrj       unsigned HOST_WIDE_INT GTY ((tag ("1"))) uval;
191*38fd1498Szrj     }
192*38fd1498Szrj   GTY ((desc ("%1.pos"))) v;
193*38fd1498Szrj };
194*38fd1498Szrj 
195*38fd1498Szrj struct addr_table_entry;
196*38fd1498Szrj 
197*38fd1498Szrj /* The dw_val_node describes an attribute's value, as it is
198*38fd1498Szrj    represented internally.  */
199*38fd1498Szrj 
200*38fd1498Szrj struct GTY(()) dw_val_node {
201*38fd1498Szrj   enum dw_val_class val_class;
202*38fd1498Szrj   struct addr_table_entry * GTY(()) val_entry;
203*38fd1498Szrj   union dw_val_struct_union
204*38fd1498Szrj     {
205*38fd1498Szrj       rtx GTY ((tag ("dw_val_class_addr"))) val_addr;
206*38fd1498Szrj       unsigned HOST_WIDE_INT GTY ((tag ("dw_val_class_offset"))) val_offset;
207*38fd1498Szrj       dw_loc_list_ref GTY ((tag ("dw_val_class_loc_list"))) val_loc_list;
208*38fd1498Szrj       dw_die_ref GTY ((tag ("dw_val_class_view_list"))) val_view_list;
209*38fd1498Szrj       dw_loc_descr_ref GTY ((tag ("dw_val_class_loc"))) val_loc;
210*38fd1498Szrj       HOST_WIDE_INT GTY ((default)) val_int;
211*38fd1498Szrj       unsigned HOST_WIDE_INT
212*38fd1498Szrj 	GTY ((tag ("dw_val_class_unsigned_const"))) val_unsigned;
213*38fd1498Szrj       double_int GTY ((tag ("dw_val_class_const_double"))) val_double;
214*38fd1498Szrj       wide_int_ptr GTY ((tag ("dw_val_class_wide_int"))) val_wide;
215*38fd1498Szrj       dw_vec_const GTY ((tag ("dw_val_class_vec"))) val_vec;
216*38fd1498Szrj       struct dw_val_die_union
217*38fd1498Szrj 	{
218*38fd1498Szrj 	  dw_die_ref die;
219*38fd1498Szrj 	  int external;
220*38fd1498Szrj 	} GTY ((tag ("dw_val_class_die_ref"))) val_die_ref;
221*38fd1498Szrj       unsigned GTY ((tag ("dw_val_class_fde_ref"))) val_fde_index;
222*38fd1498Szrj       struct indirect_string_node * GTY ((tag ("dw_val_class_str"))) val_str;
223*38fd1498Szrj       char * GTY ((tag ("dw_val_class_lbl_id"))) val_lbl_id;
224*38fd1498Szrj       unsigned char GTY ((tag ("dw_val_class_flag"))) val_flag;
225*38fd1498Szrj       struct dwarf_file_data * GTY ((tag ("dw_val_class_file"))) val_file;
226*38fd1498Szrj       struct dwarf_file_data *
227*38fd1498Szrj 	GTY ((tag ("dw_val_class_file_implicit"))) val_file_implicit;
228*38fd1498Szrj       unsigned char GTY ((tag ("dw_val_class_data8"))) val_data8[8];
229*38fd1498Szrj       tree GTY ((tag ("dw_val_class_decl_ref"))) val_decl_ref;
230*38fd1498Szrj       struct dw_val_vms_delta_union
231*38fd1498Szrj 	{
232*38fd1498Szrj 	  char * lbl1;
233*38fd1498Szrj 	  char * lbl2;
234*38fd1498Szrj 	} GTY ((tag ("dw_val_class_vms_delta"))) val_vms_delta;
235*38fd1498Szrj       dw_discr_value GTY ((tag ("dw_val_class_discr_value"))) val_discr_value;
236*38fd1498Szrj       dw_discr_list_ref GTY ((tag ("dw_val_class_discr_list"))) val_discr_list;
237*38fd1498Szrj       char * GTY ((tag ("dw_val_class_symview"))) val_symbolic_view;
238*38fd1498Szrj     }
239*38fd1498Szrj   GTY ((desc ("%1.val_class"))) v;
240*38fd1498Szrj };
241*38fd1498Szrj 
242*38fd1498Szrj /* Locations in memory are described using a sequence of stack machine
243*38fd1498Szrj    operations.  */
244*38fd1498Szrj 
245*38fd1498Szrj struct GTY((chain_next ("%h.dw_loc_next"))) dw_loc_descr_node {
246*38fd1498Szrj   dw_loc_descr_ref dw_loc_next;
247*38fd1498Szrj   ENUM_BITFIELD (dwarf_location_atom) dw_loc_opc : 8;
248*38fd1498Szrj   /* Used to distinguish DW_OP_addr with a direct symbol relocation
249*38fd1498Szrj      from DW_OP_addr with a dtp-relative symbol relocation.  */
250*38fd1498Szrj   unsigned int dtprel : 1;
251*38fd1498Szrj   /* For DW_OP_pick, DW_OP_dup and DW_OP_over operations: true iff.
252*38fd1498Szrj      it targets a DWARF prodecure argument.  In this case, it needs to be
253*38fd1498Szrj      relocated according to the current frame offset.  */
254*38fd1498Szrj   unsigned int frame_offset_rel : 1;
255*38fd1498Szrj   int dw_loc_addr;
256*38fd1498Szrj   dw_val_node dw_loc_oprnd1;
257*38fd1498Szrj   dw_val_node dw_loc_oprnd2;
258*38fd1498Szrj };
259*38fd1498Szrj 
260*38fd1498Szrj /* A variant (inside a record variant part) is selected when the corresponding
261*38fd1498Szrj    discriminant matches its set of values (see the comment for dw_discr_value).
262*38fd1498Szrj    The following datastructure holds such matching information.  */
263*38fd1498Szrj 
264*38fd1498Szrj struct GTY(()) dw_discr_list_node {
265*38fd1498Szrj   dw_discr_list_ref dw_discr_next;
266*38fd1498Szrj 
267*38fd1498Szrj   dw_discr_value dw_discr_lower_bound;
268*38fd1498Szrj   dw_discr_value dw_discr_upper_bound;
269*38fd1498Szrj   /* This node represents only the value in dw_discr_lower_bound when it's
270*38fd1498Szrj      zero.  It represents the range between the two fields (bounds included)
271*38fd1498Szrj      otherwise.  */
272*38fd1498Szrj   int dw_discr_range;
273*38fd1498Szrj };
274*38fd1498Szrj 
275*38fd1498Szrj /* Interface from dwarf2out.c to dwarf2cfi.c.  */
276*38fd1498Szrj extern struct dw_loc_descr_node *build_cfa_loc
277*38fd1498Szrj   (dw_cfa_location *, poly_int64);
278*38fd1498Szrj extern struct dw_loc_descr_node *build_cfa_aligned_loc
279*38fd1498Szrj   (dw_cfa_location *, poly_int64, HOST_WIDE_INT);
280*38fd1498Szrj extern struct dw_loc_descr_node *mem_loc_descriptor
281*38fd1498Szrj   (rtx, machine_mode mode, machine_mode mem_mode,
282*38fd1498Szrj    enum var_init_status);
283*38fd1498Szrj extern bool loc_descr_equal_p (dw_loc_descr_ref, dw_loc_descr_ref);
284*38fd1498Szrj extern dw_fde_ref dwarf2out_alloc_current_fde (void);
285*38fd1498Szrj 
286*38fd1498Szrj extern unsigned long size_of_locs (dw_loc_descr_ref);
287*38fd1498Szrj extern void output_loc_sequence (dw_loc_descr_ref, int);
288*38fd1498Szrj extern void output_loc_sequence_raw (dw_loc_descr_ref);
289*38fd1498Szrj 
290*38fd1498Szrj /* Interface from dwarf2cfi.c to dwarf2out.c.  */
291*38fd1498Szrj extern void lookup_cfa_1 (dw_cfi_ref cfi, dw_cfa_location *loc,
292*38fd1498Szrj 			  dw_cfa_location *remember);
293*38fd1498Szrj extern bool cfa_equal_p (const dw_cfa_location *, const dw_cfa_location *);
294*38fd1498Szrj 
295*38fd1498Szrj extern void output_cfi (dw_cfi_ref, dw_fde_ref, int);
296*38fd1498Szrj 
297*38fd1498Szrj extern GTY(()) cfi_vec cie_cfi_vec;
298*38fd1498Szrj 
299*38fd1498Szrj /* Interface from dwarf2*.c to the rest of the compiler.  */
300*38fd1498Szrj extern enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc
301*38fd1498Szrj   (enum dwarf_call_frame_info cfi);
302*38fd1498Szrj extern enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc
303*38fd1498Szrj   (enum dwarf_call_frame_info cfi);
304*38fd1498Szrj 
305*38fd1498Szrj extern void output_cfi_directive (FILE *f, struct dw_cfi_node *cfi);
306*38fd1498Szrj 
307*38fd1498Szrj extern void dwarf2out_emit_cfi (dw_cfi_ref cfi);
308*38fd1498Szrj 
309*38fd1498Szrj extern void debug_dwarf (void);
310*38fd1498Szrj struct die_struct;
311*38fd1498Szrj extern void debug_dwarf_die (struct die_struct *);
312*38fd1498Szrj extern void debug_dwarf_loc_descr (dw_loc_descr_ref);
313*38fd1498Szrj extern void debug (die_struct &ref);
314*38fd1498Szrj extern void debug (die_struct *ptr);
315*38fd1498Szrj extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
316*38fd1498Szrj #ifdef VMS_DEBUGGING_INFO
317*38fd1498Szrj extern void dwarf2out_vms_debug_main_pointer (void);
318*38fd1498Szrj #endif
319*38fd1498Szrj 
320*38fd1498Szrj enum array_descr_ordering
321*38fd1498Szrj {
322*38fd1498Szrj   array_descr_ordering_default,
323*38fd1498Szrj   array_descr_ordering_row_major,
324*38fd1498Szrj   array_descr_ordering_column_major
325*38fd1498Szrj };
326*38fd1498Szrj 
327*38fd1498Szrj #define DWARF2OUT_ARRAY_DESCR_INFO_MAX_DIMEN 16
328*38fd1498Szrj 
329*38fd1498Szrj struct array_descr_info
330*38fd1498Szrj {
331*38fd1498Szrj   int ndimensions;
332*38fd1498Szrj   enum array_descr_ordering ordering;
333*38fd1498Szrj   tree element_type;
334*38fd1498Szrj   tree base_decl;
335*38fd1498Szrj   tree data_location;
336*38fd1498Szrj   tree allocated;
337*38fd1498Szrj   tree associated;
338*38fd1498Szrj   tree stride;
339*38fd1498Szrj   tree rank;
340*38fd1498Szrj   bool stride_in_bits;
341*38fd1498Szrj   struct array_descr_dimen
342*38fd1498Szrj     {
343*38fd1498Szrj       /* GCC uses sizetype for array indices, so lower_bound and upper_bound
344*38fd1498Szrj 	 will likely be "sizetype" values. However, bounds may have another
345*38fd1498Szrj 	 type in the original source code.  */
346*38fd1498Szrj       tree bounds_type;
347*38fd1498Szrj       tree lower_bound;
348*38fd1498Szrj       tree upper_bound;
349*38fd1498Szrj 
350*38fd1498Szrj       /* Only Fortran uses more than one dimension for array types.  For other
351*38fd1498Szrj 	 languages, the stride can be rather specified for the whole array.  */
352*38fd1498Szrj       tree stride;
353*38fd1498Szrj     } dimen[DWARF2OUT_ARRAY_DESCR_INFO_MAX_DIMEN];
354*38fd1498Szrj };
355*38fd1498Szrj 
356*38fd1498Szrj enum fixed_point_scale_factor
357*38fd1498Szrj {
358*38fd1498Szrj   fixed_point_scale_factor_binary,
359*38fd1498Szrj   fixed_point_scale_factor_decimal,
360*38fd1498Szrj   fixed_point_scale_factor_arbitrary
361*38fd1498Szrj };
362*38fd1498Szrj 
363*38fd1498Szrj struct fixed_point_type_info
364*38fd1498Szrj {
365*38fd1498Szrj   /* A scale factor is the value one has to multiply with physical data in
366*38fd1498Szrj      order to get the fixed point logical data.  The DWARF standard enables one
367*38fd1498Szrj      to encode it in three ways.  */
368*38fd1498Szrj   enum fixed_point_scale_factor scale_factor_kind;
369*38fd1498Szrj   union
370*38fd1498Szrj     {
371*38fd1498Szrj       /* For binary scale factor, the scale factor is: 2 ** binary.  */
372*38fd1498Szrj       int binary;
373*38fd1498Szrj       /* For decimal scale factor, the scale factor is: 10 ** binary.  */
374*38fd1498Szrj       int decimal;
375*38fd1498Szrj       /* For arbitrary scale factor, the scale factor is:
376*38fd1498Szrj 	 numerator / denominator.  */
377*38fd1498Szrj       struct
378*38fd1498Szrj 	{
379*38fd1498Szrj 	  unsigned HOST_WIDE_INT numerator;
380*38fd1498Szrj 	  HOST_WIDE_INT denominator;
381*38fd1498Szrj 	} arbitrary;
382*38fd1498Szrj     } scale_factor;
383*38fd1498Szrj };
384*38fd1498Szrj 
385*38fd1498Szrj void dwarf2out_c_finalize (void);
386*38fd1498Szrj 
387*38fd1498Szrj #endif /* GCC_DWARF2OUT_H */
388