aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.cc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2025-09-02 15:58:26 -0700
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2025-09-02 15:58:26 -0700
commit071b4126c613881f4cb25b4e5c39032964827f88 (patch)
tree7ed805786566918630d1d617b1ed8f7310f5fd8e /gcc/dwarf2out.cc
parent845d23f3ea08ba873197c275a8857eee7edad996 (diff)
parentcaa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff)
downloadgcc-devel/gfortran-test.zip
gcc-devel/gfortran-test.tar.gz
gcc-devel/gfortran-test.tar.bz2
Merge branch 'master' into gfortran-testdevel/gfortran-test
Diffstat (limited to 'gcc/dwarf2out.cc')
-rw-r--r--gcc/dwarf2out.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index d1a55db..0bd8474 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -12997,9 +12997,25 @@ output_one_line_info_table (dw_line_info_table *table)
view++;
- dw2_asm_output_data (1, DW_LNS_fixed_advance_pc, "fixed advance PC, increment view to %i", view);
- dw2_asm_output_delta (2, line_label, prev_label,
- "from %s to %s", prev_label, line_label);
+ if (HAVE_AS_LEB128)
+ {
+ /* Using DW_LNS_advance_pc with label delta is only valid if
+ Minimum Instruction Length in the header is 1, but that is
+ what we use on all targets. */
+ dw2_asm_output_data (1, DW_LNS_advance_pc,
+ "advance PC, increment view to %i", view);
+ dw2_asm_output_delta_uleb128 (line_label, prev_label,
+ "from %s to %s", prev_label,
+ line_label);
+ }
+ else
+ {
+ dw2_asm_output_data (1, DW_LNS_fixed_advance_pc,
+ "fixed advance PC, increment view to %i",
+ view);
+ dw2_asm_output_delta (2, line_label, prev_label,
+ "from %s to %s", prev_label, line_label);
+ }
prev_addr = ent;
break;