1 /* dw2gencfi.c - Support for generating Dwarf2 CFI information.
2 Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 Free Software Foundation, Inc.
4 Contributed by Michal Ludvig <mludvig@suse.cz>
6 This file is part of GAS, the GNU Assembler.
8 GAS is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 GAS is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GAS; see the file COPYING. If not, write to the Free
20 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
24 #include "dw2gencfi.h"
26 #include "dwarf2dbg.h"
28 #ifdef TARGET_USE_CFIPOP
30 /* By default, use difference expressions if DIFF_EXPR_OK is defined. */
31 #ifndef CFI_DIFF_EXPR_OK
33 # define CFI_DIFF_EXPR_OK 1
35 # define CFI_DIFF_EXPR_OK 0
39 #ifndef CFI_DIFF_LSDA_OK
40 # define CFI_DIFF_LSDA_OK CFI_DIFF_EXPR_OK
43 #if CFI_DIFF_EXPR_OK == 1 && CFI_DIFF_LSDA_OK == 0
44 # error "CFI_DIFF_EXPR_OK should imply CFI_DIFF_LSDA_OK"
47 /* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
48 of the CIE. Default to 1 if not otherwise specified. */
49 #ifndef DWARF2_LINE_MIN_INSN_LENGTH
50 # define DWARF2_LINE_MIN_INSN_LENGTH 1
53 /* By default, use 32-bit relocations from .eh_frame into .text. */
54 #ifndef DWARF2_FDE_RELOC_SIZE
55 # define DWARF2_FDE_RELOC_SIZE 4
58 /* By default, use a read-only .eh_frame section. */
59 #ifndef DWARF2_EH_FRAME_READ_ONLY
60 # define DWARF2_EH_FRAME_READ_ONLY SEC_READONLY
63 #ifndef EH_FRAME_ALIGNMENT
64 # define EH_FRAME_ALIGNMENT (bfd_get_arch_size (stdoutput) == 64 ? 3 : 2)
67 #ifndef tc_cfi_frame_initial_instructions
68 # define tc_cfi_frame_initial_instructions() ((void)0)
72 # define DWARF2_FORMAT(SEC) dwarf2_format_32bit
75 #ifndef DWARF2_ADDR_SIZE
76 # define DWARF2_ADDR_SIZE(bfd) (bfd_arch_bits_per_address (bfd) / 8)
79 /* ??? Share this with dwarf2cfg.c. */
80 #ifndef TC_DWARF2_EMIT_OFFSET
81 #define TC_DWARF2_EMIT_OFFSET generic_dwarf2_emit_offset
83 /* Create an offset to .dwarf2_*. */
86 generic_dwarf2_emit_offset (symbolS
*symbol
, unsigned int size
)
91 exp
.X_add_symbol
= symbol
;
93 emit_expr (&exp
, size
);
97 struct cfi_escape_data
{
98 struct cfi_escape_data
*next
;
104 struct cfi_insn_data
*next
;
125 struct cfi_escape_data
*esc
;
128 unsigned reg
, encoding
;
136 struct fde_entry
*next
;
137 symbolS
*start_address
;
138 symbolS
*end_address
;
139 struct cfi_insn_data
*data
;
140 struct cfi_insn_data
**last
;
141 unsigned char per_encoding
;
142 unsigned char lsda_encoding
;
143 expressionS personality
;
145 unsigned int return_column
;
146 unsigned int signal_frame
;
151 struct cie_entry
*next
;
152 symbolS
*start_address
;
153 unsigned int return_column
;
154 unsigned int signal_frame
;
155 unsigned char per_encoding
;
156 unsigned char lsda_encoding
;
157 expressionS personality
;
158 struct cfi_insn_data
*first
, *last
;
162 /* List of FDE entries. */
163 static struct fde_entry
*all_fde_data
;
164 static struct fde_entry
**last_fde_data
= &all_fde_data
;
166 /* List of CIEs so that they could be reused. */
167 static struct cie_entry
*cie_root
;
169 /* Stack of old CFI data, for save/restore. */
172 struct cfa_save_data
*next
;
176 /* Current open FDE entry. */
179 struct fde_entry
*cur_fde_data
;
180 symbolS
*last_address
;
181 offsetT cur_cfa_offset
;
182 struct cfa_save_data
*cfa_save_stack
;
185 /* Construct a new FDE structure and add it to the end of the fde list. */
187 static struct fde_entry
*
188 alloc_fde_entry (void)
190 struct fde_entry
*fde
= (struct fde_entry
*)
191 xcalloc (1, sizeof (struct fde_entry
));
193 frchain_now
->frch_cfi_data
= (struct frch_cfi_data
*)
194 xcalloc (1, sizeof (struct frch_cfi_data
));
195 frchain_now
->frch_cfi_data
->cur_fde_data
= fde
;
196 *last_fde_data
= fde
;
197 last_fde_data
= &fde
->next
;
199 fde
->last
= &fde
->data
;
200 fde
->return_column
= DWARF2_DEFAULT_RETURN_COLUMN
;
201 fde
->per_encoding
= DW_EH_PE_omit
;
202 fde
->lsda_encoding
= DW_EH_PE_omit
;
207 /* The following functions are available for a backend to construct its
208 own unwind information, usually from legacy unwind directives. */
210 /* Construct a new INSN structure and add it to the end of the insn list
211 for the currently active FDE. */
213 static struct cfi_insn_data
*
214 alloc_cfi_insn_data (void)
216 struct cfi_insn_data
*insn
= (struct cfi_insn_data
*)
217 xcalloc (1, sizeof (struct cfi_insn_data
));
218 struct fde_entry
*cur_fde_data
= frchain_now
->frch_cfi_data
->cur_fde_data
;
220 *cur_fde_data
->last
= insn
;
221 cur_fde_data
->last
= &insn
->next
;
226 /* Construct a new FDE structure that begins at LABEL. */
229 cfi_new_fde (symbolS
*label
)
231 struct fde_entry
*fde
= alloc_fde_entry ();
232 fde
->start_address
= label
;
233 frchain_now
->frch_cfi_data
->last_address
= label
;
236 /* End the currently open FDE. */
239 cfi_end_fde (symbolS
*label
)
241 frchain_now
->frch_cfi_data
->cur_fde_data
->end_address
= label
;
242 free (frchain_now
->frch_cfi_data
);
243 frchain_now
->frch_cfi_data
= NULL
;
246 /* Set the return column for the current FDE. */
249 cfi_set_return_column (unsigned regno
)
251 frchain_now
->frch_cfi_data
->cur_fde_data
->return_column
= regno
;
254 /* Universal functions to store new instructions. */
257 cfi_add_CFA_insn(int insn
)
259 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
261 insn_ptr
->insn
= insn
;
265 cfi_add_CFA_insn_reg (int insn
, unsigned regno
)
267 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
269 insn_ptr
->insn
= insn
;
270 insn_ptr
->u
.r
= regno
;
274 cfi_add_CFA_insn_offset (int insn
, offsetT offset
)
276 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
278 insn_ptr
->insn
= insn
;
279 insn_ptr
->u
.i
= offset
;
283 cfi_add_CFA_insn_reg_reg (int insn
, unsigned reg1
, unsigned reg2
)
285 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
287 insn_ptr
->insn
= insn
;
288 insn_ptr
->u
.rr
.reg1
= reg1
;
289 insn_ptr
->u
.rr
.reg2
= reg2
;
293 cfi_add_CFA_insn_reg_offset (int insn
, unsigned regno
, offsetT offset
)
295 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
297 insn_ptr
->insn
= insn
;
298 insn_ptr
->u
.ri
.reg
= regno
;
299 insn_ptr
->u
.ri
.offset
= offset
;
302 /* Add a CFI insn to advance the PC from the last address to LABEL. */
305 cfi_add_advance_loc (symbolS
*label
)
307 struct cfi_insn_data
*insn
= alloc_cfi_insn_data ();
309 insn
->insn
= DW_CFA_advance_loc
;
310 insn
->u
.ll
.lab1
= frchain_now
->frch_cfi_data
->last_address
;
311 insn
->u
.ll
.lab2
= label
;
313 frchain_now
->frch_cfi_data
->last_address
= label
;
316 /* Add a DW_CFA_offset record to the CFI data. */
319 cfi_add_CFA_offset (unsigned regno
, offsetT offset
)
321 unsigned int abs_data_align
;
323 gas_assert (DWARF2_CIE_DATA_ALIGNMENT
!= 0);
324 cfi_add_CFA_insn_reg_offset (DW_CFA_offset
, regno
, offset
);
326 abs_data_align
= (DWARF2_CIE_DATA_ALIGNMENT
< 0
327 ? -DWARF2_CIE_DATA_ALIGNMENT
: DWARF2_CIE_DATA_ALIGNMENT
);
328 if (offset
% abs_data_align
)
329 as_bad (_("register save offset not a multiple of %u"), abs_data_align
);
332 /* Add a DW_CFA_def_cfa record to the CFI data. */
335 cfi_add_CFA_def_cfa (unsigned regno
, offsetT offset
)
337 cfi_add_CFA_insn_reg_offset (DW_CFA_def_cfa
, regno
, offset
);
338 frchain_now
->frch_cfi_data
->cur_cfa_offset
= offset
;
341 /* Add a DW_CFA_register record to the CFI data. */
344 cfi_add_CFA_register (unsigned reg1
, unsigned reg2
)
346 cfi_add_CFA_insn_reg_reg (DW_CFA_register
, reg1
, reg2
);
349 /* Add a DW_CFA_def_cfa_register record to the CFI data. */
352 cfi_add_CFA_def_cfa_register (unsigned regno
)
354 cfi_add_CFA_insn_reg (DW_CFA_def_cfa_register
, regno
);
357 /* Add a DW_CFA_def_cfa_offset record to the CFI data. */
360 cfi_add_CFA_def_cfa_offset (offsetT offset
)
362 cfi_add_CFA_insn_offset (DW_CFA_def_cfa_offset
, offset
);
363 frchain_now
->frch_cfi_data
->cur_cfa_offset
= offset
;
367 cfi_add_CFA_restore (unsigned regno
)
369 cfi_add_CFA_insn_reg (DW_CFA_restore
, regno
);
373 cfi_add_CFA_undefined (unsigned regno
)
375 cfi_add_CFA_insn_reg (DW_CFA_undefined
, regno
);
379 cfi_add_CFA_same_value (unsigned regno
)
381 cfi_add_CFA_insn_reg (DW_CFA_same_value
, regno
);
385 cfi_add_CFA_remember_state (void)
387 struct cfa_save_data
*p
;
389 cfi_add_CFA_insn (DW_CFA_remember_state
);
391 p
= (struct cfa_save_data
*) xmalloc (sizeof (*p
));
392 p
->cfa_offset
= frchain_now
->frch_cfi_data
->cur_cfa_offset
;
393 p
->next
= frchain_now
->frch_cfi_data
->cfa_save_stack
;
394 frchain_now
->frch_cfi_data
->cfa_save_stack
= p
;
398 cfi_add_CFA_restore_state (void)
400 struct cfa_save_data
*p
;
402 cfi_add_CFA_insn (DW_CFA_restore_state
);
404 p
= frchain_now
->frch_cfi_data
->cfa_save_stack
;
407 frchain_now
->frch_cfi_data
->cur_cfa_offset
= p
->cfa_offset
;
408 frchain_now
->frch_cfi_data
->cfa_save_stack
= p
->next
;
412 as_bad (_("CFI state restore without previous remember"));
416 /* Parse CFI assembler directives. */
418 static void dot_cfi (int);
419 static void dot_cfi_escape (int);
420 static void dot_cfi_sections (int);
421 static void dot_cfi_startproc (int);
422 static void dot_cfi_endproc (int);
423 static void dot_cfi_personality (int);
424 static void dot_cfi_lsda (int);
425 static void dot_cfi_val_encoded_addr (int);
427 /* Fake CFI type; outside the byte range of any real CFI insn. */
428 #define CFI_adjust_cfa_offset 0x100
429 #define CFI_return_column 0x101
430 #define CFI_rel_offset 0x102
431 #define CFI_escape 0x103
432 #define CFI_signal_frame 0x104
433 #define CFI_val_encoded_addr 0x105
435 const pseudo_typeS cfi_pseudo_table
[] =
437 { "cfi_sections", dot_cfi_sections
, 0 },
438 { "cfi_startproc", dot_cfi_startproc
, 0 },
439 { "cfi_endproc", dot_cfi_endproc
, 0 },
440 { "cfi_def_cfa", dot_cfi
, DW_CFA_def_cfa
},
441 { "cfi_def_cfa_register", dot_cfi
, DW_CFA_def_cfa_register
},
442 { "cfi_def_cfa_offset", dot_cfi
, DW_CFA_def_cfa_offset
},
443 { "cfi_adjust_cfa_offset", dot_cfi
, CFI_adjust_cfa_offset
},
444 { "cfi_offset", dot_cfi
, DW_CFA_offset
},
445 { "cfi_rel_offset", dot_cfi
, CFI_rel_offset
},
446 { "cfi_register", dot_cfi
, DW_CFA_register
},
447 { "cfi_return_column", dot_cfi
, CFI_return_column
},
448 { "cfi_restore", dot_cfi
, DW_CFA_restore
},
449 { "cfi_undefined", dot_cfi
, DW_CFA_undefined
},
450 { "cfi_same_value", dot_cfi
, DW_CFA_same_value
},
451 { "cfi_remember_state", dot_cfi
, DW_CFA_remember_state
},
452 { "cfi_restore_state", dot_cfi
, DW_CFA_restore_state
},
453 { "cfi_window_save", dot_cfi
, DW_CFA_GNU_window_save
},
454 { "cfi_escape", dot_cfi_escape
, 0 },
455 { "cfi_signal_frame", dot_cfi
, CFI_signal_frame
},
456 { "cfi_personality", dot_cfi_personality
, 0 },
457 { "cfi_lsda", dot_cfi_lsda
, 0 },
458 { "cfi_val_encoded_addr", dot_cfi_val_encoded_addr
, 0 },
463 cfi_parse_separator (void)
466 if (*input_line_pointer
== ',')
467 input_line_pointer
++;
469 as_bad (_("missing separator"));
472 #ifndef tc_parse_to_dw2regnum
474 tc_parse_to_dw2regnum(expressionS
*exp
)
476 # ifdef tc_regname_to_dw2regnum
478 if (is_name_beginner (*input_line_pointer
)
479 || (*input_line_pointer
== '%'
480 && is_name_beginner (*++input_line_pointer
)))
484 name
= input_line_pointer
;
485 c
= get_symbol_end ();
487 exp
->X_op
= O_constant
;
488 exp
->X_add_number
= tc_regname_to_dw2regnum (name
);
490 *input_line_pointer
= c
;
494 expression_and_evaluate (exp
);
504 tc_parse_to_dw2regnum (&exp
);
509 regno
= exp
.X_add_number
;
519 as_bad (_("bad register expression"));
527 cfi_parse_const (void)
529 return get_absolute_expression ();
538 if (frchain_now
->frch_cfi_data
== NULL
)
540 as_bad (_("CFI instruction used without previous .cfi_startproc"));
541 ignore_rest_of_line ();
545 /* If the last address was not at the current PC, advance to current. */
546 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
547 || S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
549 cfi_add_advance_loc (symbol_temp_new_now ());
554 reg1
= cfi_parse_reg ();
555 cfi_parse_separator ();
556 offset
= cfi_parse_const ();
557 cfi_add_CFA_offset (reg1
, offset
);
561 reg1
= cfi_parse_reg ();
562 cfi_parse_separator ();
563 offset
= cfi_parse_const ();
564 cfi_add_CFA_offset (reg1
,
565 offset
- frchain_now
->frch_cfi_data
->cur_cfa_offset
);
569 reg1
= cfi_parse_reg ();
570 cfi_parse_separator ();
571 offset
= cfi_parse_const ();
572 cfi_add_CFA_def_cfa (reg1
, offset
);
575 case DW_CFA_register
:
576 reg1
= cfi_parse_reg ();
577 cfi_parse_separator ();
578 reg2
= cfi_parse_reg ();
579 cfi_add_CFA_register (reg1
, reg2
);
582 case DW_CFA_def_cfa_register
:
583 reg1
= cfi_parse_reg ();
584 cfi_add_CFA_def_cfa_register (reg1
);
587 case DW_CFA_def_cfa_offset
:
588 offset
= cfi_parse_const ();
589 cfi_add_CFA_def_cfa_offset (offset
);
592 case CFI_adjust_cfa_offset
:
593 offset
= cfi_parse_const ();
594 cfi_add_CFA_def_cfa_offset (frchain_now
->frch_cfi_data
->cur_cfa_offset
601 reg1
= cfi_parse_reg ();
602 cfi_add_CFA_restore (reg1
);
604 if (*input_line_pointer
!= ',')
606 ++input_line_pointer
;
610 case DW_CFA_undefined
:
613 reg1
= cfi_parse_reg ();
614 cfi_add_CFA_undefined (reg1
);
616 if (*input_line_pointer
!= ',')
618 ++input_line_pointer
;
622 case DW_CFA_same_value
:
623 reg1
= cfi_parse_reg ();
624 cfi_add_CFA_same_value (reg1
);
627 case CFI_return_column
:
628 reg1
= cfi_parse_reg ();
629 cfi_set_return_column (reg1
);
632 case DW_CFA_remember_state
:
633 cfi_add_CFA_remember_state ();
636 case DW_CFA_restore_state
:
637 cfi_add_CFA_restore_state ();
640 case DW_CFA_GNU_window_save
:
641 cfi_add_CFA_insn (DW_CFA_GNU_window_save
);
644 case CFI_signal_frame
:
645 frchain_now
->frch_cfi_data
->cur_fde_data
->signal_frame
= 1;
652 demand_empty_rest_of_line ();
656 dot_cfi_escape (int ignored ATTRIBUTE_UNUSED
)
658 struct cfi_escape_data
*head
, **tail
, *e
;
659 struct cfi_insn_data
*insn
;
661 if (frchain_now
->frch_cfi_data
== NULL
)
663 as_bad (_("CFI instruction used without previous .cfi_startproc"));
664 ignore_rest_of_line ();
668 /* If the last address was not at the current PC, advance to current. */
669 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
670 || S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
672 cfi_add_advance_loc (symbol_temp_new_now ());
677 e
= (struct cfi_escape_data
*) xmalloc (sizeof (*e
));
678 do_parse_cons_expression (&e
->exp
, 1);
682 while (*input_line_pointer
++ == ',');
685 insn
= alloc_cfi_insn_data ();
686 insn
->insn
= CFI_escape
;
689 --input_line_pointer
;
690 demand_empty_rest_of_line ();
694 dot_cfi_personality (int ignored ATTRIBUTE_UNUSED
)
696 struct fde_entry
*fde
;
699 if (frchain_now
->frch_cfi_data
== NULL
)
701 as_bad (_("CFI instruction used without previous .cfi_startproc"));
702 ignore_rest_of_line ();
706 fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
707 encoding
= cfi_parse_const ();
708 if (encoding
== DW_EH_PE_omit
)
710 demand_empty_rest_of_line ();
711 fde
->per_encoding
= encoding
;
715 if ((encoding
& 0xff) != encoding
716 || ((encoding
& 0x70) != 0
717 #if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
718 && (encoding
& 0x70) != DW_EH_PE_pcrel
721 /* leb128 can be handled, but does something actually need it? */
722 || (encoding
& 7) == DW_EH_PE_uleb128
723 || (encoding
& 7) > DW_EH_PE_udata8
)
725 as_bad (_("invalid or unsupported encoding in .cfi_personality"));
726 ignore_rest_of_line ();
730 if (*input_line_pointer
++ != ',')
732 as_bad (_(".cfi_personality requires encoding and symbol arguments"));
733 ignore_rest_of_line ();
737 expression_and_evaluate (&fde
->personality
);
738 switch (fde
->personality
.X_op
)
743 if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
744 encoding
= DW_EH_PE_omit
;
747 encoding
= DW_EH_PE_omit
;
751 fde
->per_encoding
= encoding
;
753 if (encoding
== DW_EH_PE_omit
)
755 as_bad (_("wrong second argument to .cfi_personality"));
756 ignore_rest_of_line ();
760 demand_empty_rest_of_line ();
764 dot_cfi_lsda (int ignored ATTRIBUTE_UNUSED
)
766 struct fde_entry
*fde
;
769 if (frchain_now
->frch_cfi_data
== NULL
)
771 as_bad (_("CFI instruction used without previous .cfi_startproc"));
772 ignore_rest_of_line ();
776 fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
777 encoding
= cfi_parse_const ();
778 if (encoding
== DW_EH_PE_omit
)
780 demand_empty_rest_of_line ();
781 fde
->lsda_encoding
= encoding
;
785 if ((encoding
& 0xff) != encoding
786 || ((encoding
& 0x70) != 0
787 #if CFI_DIFF_LSDA_OK || defined tc_cfi_emit_pcrel_expr
788 && (encoding
& 0x70) != DW_EH_PE_pcrel
791 /* leb128 can be handled, but does something actually need it? */
792 || (encoding
& 7) == DW_EH_PE_uleb128
793 || (encoding
& 7) > DW_EH_PE_udata8
)
795 as_bad (_("invalid or unsupported encoding in .cfi_lsda"));
796 ignore_rest_of_line ();
800 if (*input_line_pointer
++ != ',')
802 as_bad (_(".cfi_lsda requires encoding and symbol arguments"));
803 ignore_rest_of_line ();
807 fde
->lsda_encoding
= encoding
;
809 expression_and_evaluate (&fde
->lsda
);
810 switch (fde
->lsda
.X_op
)
815 if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
816 encoding
= DW_EH_PE_omit
;
819 encoding
= DW_EH_PE_omit
;
823 fde
->lsda_encoding
= encoding
;
825 if (encoding
== DW_EH_PE_omit
)
827 as_bad (_("wrong second argument to .cfi_lsda"));
828 ignore_rest_of_line ();
832 demand_empty_rest_of_line ();
836 dot_cfi_val_encoded_addr (int ignored ATTRIBUTE_UNUSED
)
838 struct cfi_insn_data
*insn_ptr
;
841 if (frchain_now
->frch_cfi_data
== NULL
)
843 as_bad (_("CFI instruction used without previous .cfi_startproc"));
844 ignore_rest_of_line ();
848 /* If the last address was not at the current PC, advance to current. */
849 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
850 || S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
852 cfi_add_advance_loc (symbol_temp_new_now ());
854 insn_ptr
= alloc_cfi_insn_data ();
855 insn_ptr
->insn
= CFI_val_encoded_addr
;
857 insn_ptr
->u
.ea
.reg
= cfi_parse_reg ();
859 cfi_parse_separator ();
860 encoding
= cfi_parse_const ();
861 if ((encoding
& 0xff) != encoding
862 || ((encoding
& 0x70) != 0
863 #if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
864 && (encoding
& 0x70) != DW_EH_PE_pcrel
867 /* leb128 can be handled, but does something actually need it? */
868 || (encoding
& 7) == DW_EH_PE_uleb128
869 || (encoding
& 7) > DW_EH_PE_udata8
)
871 as_bad (_("invalid or unsupported encoding in .cfi_lsda"));
872 encoding
= DW_EH_PE_omit
;
875 cfi_parse_separator ();
876 expression_and_evaluate (&insn_ptr
->u
.ea
.exp
);
877 switch (insn_ptr
->u
.ea
.exp
.X_op
)
882 if ((encoding
& 0x70) != DW_EH_PE_pcrel
)
885 encoding
= DW_EH_PE_omit
;
889 insn_ptr
->u
.ea
.encoding
= encoding
;
890 if (encoding
== DW_EH_PE_omit
)
892 as_bad (_("wrong third argument to .cfi_val_encoded_addr"));
893 ignore_rest_of_line ();
897 demand_empty_rest_of_line ();
900 /* By default emit .eh_frame only, not .debug_frame. */
901 #define CFI_EMIT_eh_frame (1 << 0)
902 #define CFI_EMIT_debug_frame (1 << 1)
903 static int cfi_sections
= CFI_EMIT_eh_frame
;
906 dot_cfi_sections (int ignored ATTRIBUTE_UNUSED
)
911 if (is_name_beginner (*input_line_pointer
))
916 name
= input_line_pointer
;
917 c
= get_symbol_end ();
919 if (strcmp (name
, ".eh_frame") == 0)
920 sections
|= CFI_EMIT_eh_frame
;
921 else if (strcmp (name
, ".debug_frame") == 0)
922 sections
|= CFI_EMIT_debug_frame
;
925 *input_line_pointer
= c
;
926 input_line_pointer
= name
;
930 *input_line_pointer
= c
;
932 if (*input_line_pointer
== ',')
934 name
= input_line_pointer
++;
936 if (!is_name_beginner (*input_line_pointer
))
938 input_line_pointer
= name
;
942 else if (is_name_beginner (*input_line_pointer
))
946 demand_empty_rest_of_line ();
947 cfi_sections
= sections
;
951 dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED
)
955 if (frchain_now
->frch_cfi_data
!= NULL
)
957 as_bad (_("previous CFI entry not closed (missing .cfi_endproc)"));
958 ignore_rest_of_line ();
962 cfi_new_fde (symbol_temp_new_now ());
965 if (is_name_beginner (*input_line_pointer
))
969 name
= input_line_pointer
;
970 c
= get_symbol_end ();
972 if (strcmp (name
, "simple") == 0)
975 *input_line_pointer
= c
;
978 input_line_pointer
= name
;
980 demand_empty_rest_of_line ();
982 frchain_now
->frch_cfi_data
->cur_cfa_offset
= 0;
984 tc_cfi_frame_initial_instructions ();
988 dot_cfi_endproc (int ignored ATTRIBUTE_UNUSED
)
990 if (frchain_now
->frch_cfi_data
== NULL
)
992 as_bad (_(".cfi_endproc without corresponding .cfi_startproc"));
993 ignore_rest_of_line ();
997 cfi_end_fde (symbol_temp_new_now ());
999 demand_empty_rest_of_line ();
1003 /* Emit a single byte into the current segment. */
1008 FRAG_APPEND_1_CHAR (byte
);
1011 /* Emit a two-byte word into the current segment. */
1016 md_number_to_chars (frag_more (2), data
, 2);
1019 /* Emit a four byte word into the current segment. */
1024 md_number_to_chars (frag_more (4), data
, 4);
1027 /* Emit an unsigned "little-endian base 128" number. */
1030 out_uleb128 (addressT value
)
1032 output_leb128 (frag_more (sizeof_leb128 (value
, 0)), value
, 0);
1035 /* Emit an unsigned "little-endian base 128" number. */
1038 out_sleb128 (offsetT value
)
1040 output_leb128 (frag_more (sizeof_leb128 (value
, 1)), value
, 1);
1044 output_cfi_insn (struct cfi_insn_data
*insn
)
1051 case DW_CFA_advance_loc
:
1053 symbolS
*from
= insn
->u
.ll
.lab1
;
1054 symbolS
*to
= insn
->u
.ll
.lab2
;
1056 if (symbol_get_frag (to
) == symbol_get_frag (from
))
1058 addressT delta
= S_GET_VALUE (to
) - S_GET_VALUE (from
);
1059 addressT scaled
= delta
/ DWARF2_LINE_MIN_INSN_LENGTH
;
1062 out_one (DW_CFA_advance_loc
+ scaled
);
1063 else if (scaled
<= 0xFF)
1065 out_one (DW_CFA_advance_loc1
);
1068 else if (scaled
<= 0xFFFF)
1070 out_one (DW_CFA_advance_loc2
);
1075 out_one (DW_CFA_advance_loc4
);
1083 exp
.X_op
= O_subtract
;
1084 exp
.X_add_symbol
= to
;
1085 exp
.X_op_symbol
= from
;
1086 exp
.X_add_number
= 0;
1088 /* The code in ehopt.c expects that one byte of the encoding
1089 is already allocated to the frag. This comes from the way
1090 that it scans the .eh_frame section looking first for the
1091 .byte DW_CFA_advance_loc4. */
1092 *frag_more (1) = DW_CFA_advance_loc4
;
1094 frag_var (rs_cfa
, 4, 0, DWARF2_LINE_MIN_INSN_LENGTH
<< 3,
1095 make_expr_symbol (&exp
), frag_now_fix () - 1,
1101 case DW_CFA_def_cfa
:
1102 offset
= insn
->u
.ri
.offset
;
1105 out_one (DW_CFA_def_cfa_sf
);
1106 out_uleb128 (insn
->u
.ri
.reg
);
1107 out_sleb128 (offset
/ DWARF2_CIE_DATA_ALIGNMENT
);
1111 out_one (DW_CFA_def_cfa
);
1112 out_uleb128 (insn
->u
.ri
.reg
);
1113 out_uleb128 (offset
);
1117 case DW_CFA_def_cfa_register
:
1118 case DW_CFA_undefined
:
1119 case DW_CFA_same_value
:
1120 out_one (insn
->insn
);
1121 out_uleb128 (insn
->u
.r
);
1124 case DW_CFA_def_cfa_offset
:
1128 out_one (DW_CFA_def_cfa_offset_sf
);
1129 out_sleb128 (offset
/ DWARF2_CIE_DATA_ALIGNMENT
);
1133 out_one (DW_CFA_def_cfa_offset
);
1134 out_uleb128 (offset
);
1138 case DW_CFA_restore
:
1142 out_one (DW_CFA_restore
+ regno
);
1146 out_one (DW_CFA_restore_extended
);
1147 out_uleb128 (regno
);
1152 regno
= insn
->u
.ri
.reg
;
1153 offset
= insn
->u
.ri
.offset
/ DWARF2_CIE_DATA_ALIGNMENT
;
1156 out_one (DW_CFA_offset_extended_sf
);
1157 out_uleb128 (regno
);
1158 out_sleb128 (offset
);
1160 else if (regno
<= 0x3F)
1162 out_one (DW_CFA_offset
+ regno
);
1163 out_uleb128 (offset
);
1167 out_one (DW_CFA_offset_extended
);
1168 out_uleb128 (regno
);
1169 out_uleb128 (offset
);
1173 case DW_CFA_register
:
1174 out_one (DW_CFA_register
);
1175 out_uleb128 (insn
->u
.rr
.reg1
);
1176 out_uleb128 (insn
->u
.rr
.reg2
);
1179 case DW_CFA_remember_state
:
1180 case DW_CFA_restore_state
:
1181 out_one (insn
->insn
);
1184 case DW_CFA_GNU_window_save
:
1185 out_one (DW_CFA_GNU_window_save
);
1190 struct cfi_escape_data
*e
;
1191 for (e
= insn
->u
.esc
; e
; e
= e
->next
)
1192 emit_expr (&e
->exp
, 1);
1196 case CFI_val_encoded_addr
:
1198 unsigned encoding
= insn
->u
.ea
.encoding
;
1199 offsetT encoding_size
;
1201 if (encoding
== DW_EH_PE_omit
)
1203 out_one (DW_CFA_val_expression
);
1204 out_uleb128 (insn
->u
.ea
.reg
);
1206 switch (encoding
& 0x7)
1208 case DW_EH_PE_absptr
:
1209 encoding_size
= DWARF2_ADDR_SIZE (stdoutput
);
1211 case DW_EH_PE_udata2
:
1214 case DW_EH_PE_udata4
:
1217 case DW_EH_PE_udata8
:
1224 /* If the user has requested absolute encoding,
1225 then use the smaller DW_OP_addr encoding. */
1226 if (insn
->u
.ea
.encoding
== DW_EH_PE_absptr
)
1228 out_uleb128 (1 + encoding_size
);
1229 out_one (DW_OP_addr
);
1233 out_uleb128 (1 + 1 + encoding_size
);
1234 out_one (DW_OP_GNU_encoded_addr
);
1237 if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
1239 #if CFI_DIFF_EXPR_OK
1240 insn
->u
.ea
.exp
.X_op
= O_subtract
;
1241 insn
->u
.ea
.exp
.X_op_symbol
= symbol_temp_new_now ();
1242 #elif defined (tc_cfi_emit_pcrel_expr)
1243 tc_cfi_emit_pcrel_expr (&insn
->u
.ea
.exp
, encoding_size
);
1250 emit_expr (&insn
->u
.ea
.exp
, encoding_size
);
1260 encoding_size (unsigned char encoding
)
1262 if (encoding
== DW_EH_PE_omit
)
1264 switch (encoding
& 0x7)
1267 return bfd_get_arch_size (stdoutput
) == 64 ? 8 : 4;
1268 case DW_EH_PE_udata2
:
1270 case DW_EH_PE_udata4
:
1272 case DW_EH_PE_udata8
:
1280 output_cie (struct cie_entry
*cie
, bfd_boolean eh_frame
, int align
)
1282 symbolS
*after_size_address
, *end_address
;
1284 struct cfi_insn_data
*i
;
1285 offsetT augmentation_size
;
1287 enum dwarf2_format fmt
= DWARF2_FORMAT (now_seg
);
1289 cie
->start_address
= symbol_temp_new_now ();
1290 after_size_address
= symbol_temp_make ();
1291 end_address
= symbol_temp_make ();
1293 exp
.X_op
= O_subtract
;
1294 exp
.X_add_symbol
= end_address
;
1295 exp
.X_op_symbol
= after_size_address
;
1296 exp
.X_add_number
= 0;
1298 if (eh_frame
|| fmt
== dwarf2_format_32bit
)
1299 emit_expr (&exp
, 4); /* Length. */
1302 if (fmt
== dwarf2_format_64bit
)
1304 emit_expr (&exp
, 8); /* Length. */
1306 symbol_set_value_now (after_size_address
);
1308 out_four (0); /* CIE id. */
1311 out_four (-1); /* CIE id. */
1312 if (fmt
!= dwarf2_format_32bit
)
1315 out_one (DW_CIE_VERSION
); /* Version. */
1318 out_one ('z'); /* Augmentation. */
1319 if (cie
->per_encoding
!= DW_EH_PE_omit
)
1321 if (cie
->lsda_encoding
!= DW_EH_PE_omit
)
1325 if (cie
->signal_frame
)
1328 out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH
); /* Code alignment. */
1329 out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT
); /* Data alignment. */
1330 if (DW_CIE_VERSION
== 1) /* Return column. */
1331 out_one (cie
->return_column
);
1333 out_uleb128 (cie
->return_column
);
1336 augmentation_size
= 1 + (cie
->lsda_encoding
!= DW_EH_PE_omit
);
1337 if (cie
->per_encoding
!= DW_EH_PE_omit
)
1338 augmentation_size
+= 1 + encoding_size (cie
->per_encoding
);
1339 out_uleb128 (augmentation_size
); /* Augmentation size. */
1341 if (cie
->per_encoding
!= DW_EH_PE_omit
)
1343 offsetT size
= encoding_size (cie
->per_encoding
);
1344 out_one (cie
->per_encoding
);
1345 exp
= cie
->personality
;
1346 if ((cie
->per_encoding
& 0x70) == DW_EH_PE_pcrel
)
1348 #if CFI_DIFF_EXPR_OK
1349 exp
.X_op
= O_subtract
;
1350 exp
.X_op_symbol
= symbol_temp_new_now ();
1351 emit_expr (&exp
, size
);
1352 #elif defined (tc_cfi_emit_pcrel_expr)
1353 tc_cfi_emit_pcrel_expr (&exp
, size
);
1359 emit_expr (&exp
, size
);
1362 if (cie
->lsda_encoding
!= DW_EH_PE_omit
)
1363 out_one (cie
->lsda_encoding
);
1366 switch (DWARF2_FDE_RELOC_SIZE
)
1369 enc
= DW_EH_PE_sdata2
;
1372 enc
= DW_EH_PE_sdata4
;
1375 enc
= DW_EH_PE_sdata8
;
1380 #if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
1381 enc
|= DW_EH_PE_pcrel
;
1387 for (i
= cie
->first
; i
!= cie
->last
; i
= i
->next
)
1388 output_cfi_insn (i
);
1390 frag_align (align
, DW_CFA_nop
, 0);
1391 symbol_set_value_now (end_address
);
1395 output_fde (struct fde_entry
*fde
, struct cie_entry
*cie
,
1396 bfd_boolean eh_frame
, struct cfi_insn_data
*first
,
1399 symbolS
*after_size_address
, *end_address
;
1401 offsetT augmentation_size
;
1402 enum dwarf2_format fmt
= DWARF2_FORMAT (now_seg
);
1406 after_size_address
= symbol_temp_make ();
1407 end_address
= symbol_temp_make ();
1409 exp
.X_op
= O_subtract
;
1410 exp
.X_add_symbol
= end_address
;
1411 exp
.X_op_symbol
= after_size_address
;
1412 exp
.X_add_number
= 0;
1413 if (eh_frame
|| fmt
== dwarf2_format_32bit
)
1417 if (fmt
== dwarf2_format_64bit
)
1421 emit_expr (&exp
, offset_size
); /* Length. */
1422 symbol_set_value_now (after_size_address
);
1426 exp
.X_op
= O_subtract
;
1427 exp
.X_add_symbol
= after_size_address
;
1428 exp
.X_op_symbol
= cie
->start_address
;
1429 exp
.X_add_number
= 0;
1430 emit_expr (&exp
, offset_size
); /* CIE offset. */
1434 TC_DWARF2_EMIT_OFFSET (cie
->start_address
, offset_size
);
1439 exp
.X_op
= O_subtract
;
1440 exp
.X_add_number
= 0;
1441 #if CFI_DIFF_EXPR_OK
1442 exp
.X_add_symbol
= fde
->start_address
;
1443 exp
.X_op_symbol
= symbol_temp_new_now ();
1444 emit_expr (&exp
, DWARF2_FDE_RELOC_SIZE
); /* Code offset. */
1446 exp
.X_op
= O_symbol
;
1447 exp
.X_add_symbol
= fde
->start_address
;
1448 #ifdef tc_cfi_emit_pcrel_expr
1449 tc_cfi_emit_pcrel_expr (&exp
, DWARF2_FDE_RELOC_SIZE
); /* Code offset. */
1451 emit_expr (&exp
, DWARF2_FDE_RELOC_SIZE
); /* Code offset. */
1454 addr_size
= DWARF2_FDE_RELOC_SIZE
;
1458 exp
.X_op
= O_symbol
;
1459 exp
.X_add_symbol
= fde
->start_address
;
1460 exp
.X_add_number
= 0;
1461 addr_size
= DWARF2_ADDR_SIZE (stdoutput
);
1462 emit_expr (&exp
, addr_size
);
1465 exp
.X_op
= O_subtract
;
1466 exp
.X_add_symbol
= fde
->end_address
;
1467 exp
.X_op_symbol
= fde
->start_address
; /* Code length. */
1468 exp
.X_add_number
= 0;
1469 emit_expr (&exp
, addr_size
);
1471 augmentation_size
= encoding_size (fde
->lsda_encoding
);
1473 out_uleb128 (augmentation_size
); /* Augmentation size. */
1475 if (fde
->lsda_encoding
!= DW_EH_PE_omit
)
1478 if ((fde
->lsda_encoding
& 0x70) == DW_EH_PE_pcrel
)
1480 #if CFI_DIFF_LSDA_OK
1481 exp
.X_op
= O_subtract
;
1482 exp
.X_op_symbol
= symbol_temp_new_now ();
1483 emit_expr (&exp
, augmentation_size
);
1484 #elif defined (tc_cfi_emit_pcrel_expr)
1485 tc_cfi_emit_pcrel_expr (&exp
, augmentation_size
);
1491 emit_expr (&exp
, augmentation_size
);
1494 for (; first
; first
= first
->next
)
1495 output_cfi_insn (first
);
1497 frag_align (align
, DW_CFA_nop
, 0);
1498 symbol_set_value_now (end_address
);
1501 static struct cie_entry
*
1502 select_cie_for_fde (struct fde_entry
*fde
, bfd_boolean eh_frame
,
1503 struct cfi_insn_data
**pfirst
, int align
)
1505 struct cfi_insn_data
*i
, *j
;
1506 struct cie_entry
*cie
;
1508 for (cie
= cie_root
; cie
; cie
= cie
->next
)
1510 if (cie
->return_column
!= fde
->return_column
1511 || cie
->signal_frame
!= fde
->signal_frame
1512 || cie
->per_encoding
!= fde
->per_encoding
1513 || cie
->lsda_encoding
!= fde
->lsda_encoding
)
1515 if (cie
->per_encoding
!= DW_EH_PE_omit
)
1517 if (cie
->personality
.X_op
!= fde
->personality
.X_op
1518 || cie
->personality
.X_add_number
1519 != fde
->personality
.X_add_number
)
1521 switch (cie
->personality
.X_op
)
1524 if (cie
->personality
.X_unsigned
!= fde
->personality
.X_unsigned
)
1528 if (cie
->personality
.X_add_symbol
1529 != fde
->personality
.X_add_symbol
)
1536 for (i
= cie
->first
, j
= fde
->data
;
1537 i
!= cie
->last
&& j
!= NULL
;
1538 i
= i
->next
, j
= j
->next
)
1540 if (i
->insn
!= j
->insn
)
1544 case DW_CFA_advance_loc
:
1545 case DW_CFA_remember_state
:
1546 /* We reached the first advance/remember in the FDE,
1547 but did not reach the end of the CIE list. */
1551 case DW_CFA_def_cfa
:
1552 if (i
->u
.ri
.reg
!= j
->u
.ri
.reg
)
1554 if (i
->u
.ri
.offset
!= j
->u
.ri
.offset
)
1558 case DW_CFA_register
:
1559 if (i
->u
.rr
.reg1
!= j
->u
.rr
.reg1
)
1561 if (i
->u
.rr
.reg2
!= j
->u
.rr
.reg2
)
1565 case DW_CFA_def_cfa_register
:
1566 case DW_CFA_restore
:
1567 case DW_CFA_undefined
:
1568 case DW_CFA_same_value
:
1569 if (i
->u
.r
!= j
->u
.r
)
1573 case DW_CFA_def_cfa_offset
:
1574 if (i
->u
.i
!= j
->u
.i
)
1579 case CFI_val_encoded_addr
:
1580 /* Don't bother matching these for now. */
1588 /* Success if we reached the end of the CIE list, and we've either
1589 run out of FDE entries or we've encountered an advance,
1590 remember, or escape. */
1593 || j
->insn
== DW_CFA_advance_loc
1594 || j
->insn
== DW_CFA_remember_state
1595 || j
->insn
== CFI_escape
1596 || j
->insn
== CFI_val_encoded_addr
))
1605 cie
= (struct cie_entry
*) xmalloc (sizeof (struct cie_entry
));
1606 cie
->next
= cie_root
;
1608 cie
->return_column
= fde
->return_column
;
1609 cie
->signal_frame
= fde
->signal_frame
;
1610 cie
->per_encoding
= fde
->per_encoding
;
1611 cie
->lsda_encoding
= fde
->lsda_encoding
;
1612 cie
->personality
= fde
->personality
;
1613 cie
->first
= fde
->data
;
1615 for (i
= cie
->first
; i
; i
= i
->next
)
1616 if (i
->insn
== DW_CFA_advance_loc
1617 || i
->insn
== DW_CFA_remember_state
1618 || i
->insn
== CFI_escape
1619 || i
->insn
== CFI_val_encoded_addr
)
1625 output_cie (cie
, eh_frame
, align
);
1630 #ifdef md_reg_eh_frame_to_debug_frame
1632 cfi_change_reg_numbers (struct cfi_insn_data
*insn
)
1634 for (; insn
; insn
= insn
->next
)
1637 case DW_CFA_advance_loc
:
1638 case DW_CFA_def_cfa_offset
:
1639 case DW_CFA_remember_state
:
1640 case DW_CFA_restore_state
:
1641 case DW_CFA_GNU_window_save
:
1645 case DW_CFA_def_cfa
:
1647 insn
->u
.ri
.reg
= md_reg_eh_frame_to_debug_frame (insn
->u
.ri
.reg
);
1650 case DW_CFA_def_cfa_register
:
1651 case DW_CFA_undefined
:
1652 case DW_CFA_same_value
:
1653 case DW_CFA_restore
:
1654 insn
->u
.r
= md_reg_eh_frame_to_debug_frame (insn
->u
.r
);
1657 case DW_CFA_register
:
1658 insn
->u
.rr
.reg1
= md_reg_eh_frame_to_debug_frame (insn
->u
.rr
.reg1
);
1659 insn
->u
.rr
.reg2
= md_reg_eh_frame_to_debug_frame (insn
->u
.rr
.reg2
);
1662 case CFI_val_encoded_addr
:
1663 insn
->u
.ea
.reg
= md_reg_eh_frame_to_debug_frame (insn
->u
.ea
.reg
);
1671 #define cfi_change_reg_numbers(insn) do { } while (0)
1678 struct fde_entry
*fde
;
1679 int save_flag_traditional_format
;
1681 if (all_fde_data
== 0)
1684 if ((cfi_sections
& CFI_EMIT_eh_frame
) != 0)
1686 /* Open .eh_frame section. */
1687 cfi_seg
= subseg_new (".eh_frame", 0);
1688 bfd_set_section_flags (stdoutput
, cfi_seg
,
1689 SEC_ALLOC
| SEC_LOAD
| SEC_DATA
1690 | DWARF2_EH_FRAME_READ_ONLY
);
1691 subseg_set (cfi_seg
, 0);
1692 record_alignment (cfi_seg
, EH_FRAME_ALIGNMENT
);
1694 #ifdef md_fix_up_eh_frame
1695 md_fix_up_eh_frame (cfi_seg
);
1698 /* Make sure check_eh_frame doesn't do anything with our output. */
1699 save_flag_traditional_format
= flag_traditional_format
;
1700 flag_traditional_format
= 1;
1702 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
1704 struct cfi_insn_data
*first
;
1705 struct cie_entry
*cie
;
1707 if (fde
->end_address
== NULL
)
1709 as_bad (_("open CFI at the end of file; missing .cfi_endproc directive"));
1710 fde
->end_address
= fde
->start_address
;
1713 cie
= select_cie_for_fde (fde
, TRUE
, &first
, 2);
1714 output_fde (fde
, cie
, TRUE
, first
,
1715 fde
->next
== NULL
? EH_FRAME_ALIGNMENT
: 2);
1718 flag_traditional_format
= save_flag_traditional_format
;
1721 if ((cfi_sections
& CFI_EMIT_debug_frame
) != 0)
1723 struct cie_entry
*cie
, *cie_next
;
1724 int alignment
= ffs (DWARF2_ADDR_SIZE (stdoutput
)) - 1;
1726 for (cie
= cie_root
; cie
; cie
= cie_next
)
1728 cie_next
= cie
->next
;
1729 free ((void *) cie
);
1733 /* Open .debug_frame section. */
1734 cfi_seg
= subseg_new (".debug_frame", 0);
1735 bfd_set_section_flags (stdoutput
, cfi_seg
,
1736 SEC_READONLY
| SEC_DEBUGGING
);
1737 subseg_set (cfi_seg
, 0);
1738 record_alignment (cfi_seg
, alignment
);
1740 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
1742 struct cfi_insn_data
*first
;
1744 if (fde
->end_address
== NULL
)
1746 as_bad (_("open CFI at the end of file; missing .cfi_endproc directive"));
1747 fde
->end_address
= fde
->start_address
;
1750 fde
->per_encoding
= DW_EH_PE_omit
;
1751 fde
->lsda_encoding
= DW_EH_PE_omit
;
1752 cfi_change_reg_numbers (fde
->data
);
1753 cie
= select_cie_for_fde (fde
, FALSE
, &first
, alignment
);
1754 output_fde (fde
, cie
, FALSE
, first
, alignment
);
1759 #else /* TARGET_USE_CFIPOP */
1764 #endif /* TARGET_USE_CFIPOP */