From 6ec51dba92b070c7c13558964c5bf07d767a1287 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 7 Mar 2004 08:51:21 +0000 Subject: [PATCH] * dw2gencfi.c (output_cie): Align length to 4 byte boundary. (cfi_finish): Likewise for fde. * gas/alpha/elf-reloc-8.d, gas/cfi/cfi-alpha-1.d, gas/cfi/cfi-alpha-2.d, gas/cfi/cfi-alpha-3.d, gas/cfi/cfi-common-1.d, gas/cfi/cfi-common-2.d, gas/cfi/cfi-common-3.d: Adjust offsets. --- gas/ChangeLog | 5 ++++ gas/dw2gencfi.c | 6 ++--- gas/testsuite/ChangeLog | 6 +++++ gas/testsuite/gas/alpha/elf-reloc-8.d | 34 +++++++++++++-------------- gas/testsuite/gas/cfi/cfi-alpha-1.d | 15 ++++++++---- gas/testsuite/gas/cfi/cfi-alpha-2.d | 4 ++-- gas/testsuite/gas/cfi/cfi-alpha-3.d | 20 ++++++++-------- gas/testsuite/gas/cfi/cfi-common-1.d | 10 ++++---- gas/testsuite/gas/cfi/cfi-common-2.d | 10 ++++---- gas/testsuite/gas/cfi/cfi-common-3.d | 11 ++++----- 10 files changed, 67 insertions(+), 54 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 6eaeed2cf58..4faf06ffe41 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2004-03-07 Richard Henderson + + * dw2gencfi.c (output_cie): Align length to 4 byte boundary. + (cfi_finish): Likewise for fde. + 2004-03-05 H.J. Lu * config/tc-ia64.c (md_assemble): Properly handle NULL diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index 3be7e20f5d2..ff0aa35353d 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -857,6 +857,7 @@ output_cie (struct cie_entry *cie) for (i = cie->first; i != cie->last; i = i->next) output_cfi_insn (i); + frag_align (2, 0, 0); symbol_set_value_now (end_address); } @@ -906,8 +907,7 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie, for (; first; first = first->next) output_cfi_insn (first); - if (align) - frag_align (align, 0, 0); + frag_align (align, 0, 0); symbol_set_value_now (end_address); } @@ -1035,7 +1035,7 @@ cfi_finish (void) struct cie_entry *cie; cie = select_cie_for_fde (fde, &first); - output_fde (fde, cie, first, fde->next == NULL ? EH_FRAME_ALIGNMENT : 0); + output_fde (fde, cie, first, fde->next == NULL ? EH_FRAME_ALIGNMENT : 2); } flag_traditional_format = save_flag_traditional_format; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 845af82d0d1..d041bb64762 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-03-07 Richard Henderson + + * gas/alpha/elf-reloc-8.d, gas/cfi/cfi-alpha-1.d, + gas/cfi/cfi-alpha-2.d, gas/cfi/cfi-alpha-3.d, gas/cfi/cfi-common-1.d, + gas/cfi/cfi-common-2.d, gas/cfi/cfi-common-3.d: Adjust offsets. + 2004-03-03 Kaz Kojima * gas/sh/sh64/err-dsp.s: Fix expected error message. diff --git a/gas/testsuite/gas/alpha/elf-reloc-8.d b/gas/testsuite/gas/alpha/elf-reloc-8.d index 32ebf97222a..8ba78c3c122 100644 --- a/gas/testsuite/gas/alpha/elf-reloc-8.d +++ b/gas/testsuite/gas/alpha/elf-reloc-8.d @@ -311,20 +311,20 @@ OFFSET *TYPE *VALUE RELOCATION RECORDS FOR \[\.eh_frame\]: OFFSET *TYPE *VALUE -0*000001b SREL32 \.init\.text -0*0000031 SREL32 \.init\.text\+0x0*0000050 -0*0000042 SREL32 \.init\.text\+0x0*0000080 -0*0000053 SREL32 \.init\.text\+0x0*00000b0 -0*0000074 SREL32 \.init\.text\+0x0*00002c0 -0*0000092 SREL32 \.init\.text\+0x0*00005a0 -0*00000aa SREL32 \.init\.text\+0x0*00005f0 -0*00000bb SREL32 \.init\.text\+0x0*0000610 -0*00000cc SREL32 \.init\.text\+0x0*0000630 -0*00000e6 SREL32 \.init\.text\+0x0*0000750 -0*000010a SREL32 \.init\.text\+0x0*0000990 -0*0000124 SREL32 \.init\.text\+0x0*0000a10 -0*0000135 SREL32 \.init\.text\+0x0*0000a20 -0*0000146 SREL32 \.init\.text\+0x0*0000a40 -0*000015e SREL32 \.init\.text\+0x0*0000a90 -0*000016f SREL32 \.init\.text\+0x0*0000aa0 -0*0000180 SREL32 \.text +0*000001c SREL32 \.init\.text +0*0000034 SREL32 \.init\.text\+0x0*0000050 +0*0000048 SREL32 \.init\.text\+0x0*0000080 +0*000005c SREL32 \.init\.text\+0x0*00000b0 +0*0000080 SREL32 \.init\.text\+0x0*00002c0 +0*00000a0 SREL32 \.init\.text\+0x0*00005a0 +0*00000b8 SREL32 \.init\.text\+0x0*00005f0 +0*00000cc SREL32 \.init\.text\+0x0*0000610 +0*00000e0 SREL32 \.init\.text\+0x0*0000630 +0*00000fc SREL32 \.init\.text\+0x0*0000750 +0*0000120 SREL32 \.init\.text\+0x0*0000990 +0*000013c SREL32 \.init\.text\+0x0*0000a10 +0*0000150 SREL32 \.init\.text\+0x0*0000a20 +0*0000164 SREL32 \.init\.text\+0x0*0000a40 +0*000017c SREL32 \.init\.text\+0x0*0000a90 +0*0000190 SREL32 \.init\.text\+0x0*0000aa0 +0*00001a4 SREL32 \.text diff --git a/gas/testsuite/gas/cfi/cfi-alpha-1.d b/gas/testsuite/gas/cfi/cfi-alpha-1.d index 73783e95d94..9568d3b9c28 100644 --- a/gas/testsuite/gas/cfi/cfi-alpha-1.d +++ b/gas/testsuite/gas/cfi/cfi-alpha-1.d @@ -2,7 +2,7 @@ #name: CFI on alpha The section .eh_frame contains: -00000000 0000000f 00000000 CIE +00000000 00000010 00000000 CIE Version: 1 Augmentation: "zR" Code alignment factor: 4 @@ -11,12 +11,19 @@ The section .eh_frame contains: Augmentation data: 1b DW_CFA_def_cfa_reg: r30 + DW_CFA_nop -00000013 00000019 00000017 FDE cie=00000000 pc=0000001b..0000004f - DW_CFA_advance_loc: 24 to 00000033 +00000014 00000020 00000018 FDE cie=00000000 pc=0000001c..00000050 + DW_CFA_advance_loc: 24 to 00000034 DW_CFA_def_cfa: r15 ofs 32 DW_CFA_offset: r26 at cfa-32 DW_CFA_offset: r9 at cfa-24 DW_CFA_offset: r15 at cfa-16 DW_CFA_offset: r34 at cfa-8 - + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop diff --git a/gas/testsuite/gas/cfi/cfi-alpha-2.d b/gas/testsuite/gas/cfi/cfi-alpha-2.d index 49f8cceeb8a..4a87da2d9a5 100644 --- a/gas/testsuite/gas/cfi/cfi-alpha-2.d +++ b/gas/testsuite/gas/cfi/cfi-alpha-2.d @@ -5,5 +5,5 @@ RELOCATION RECORDS FOR \[\.eh_frame\]: OFFSET TYPE VALUE -0*000001b SREL32 \.text -0*000002c SREL32 \.text\+0x0*0000004 +0*000001c SREL32 \.text +0*0000030 SREL32 \.text\+0x0*0000004 diff --git a/gas/testsuite/gas/cfi/cfi-alpha-3.d b/gas/testsuite/gas/cfi/cfi-alpha-3.d index 4d8bd887ee0..f3ad084235b 100644 --- a/gas/testsuite/gas/cfi/cfi-alpha-3.d +++ b/gas/testsuite/gas/cfi/cfi-alpha-3.d @@ -2,7 +2,7 @@ #name: CFI on alpha, 3 The section .eh_frame contains: -00000000 0000000f 00000000 CIE +00000000 00000010 00000000 CIE Version: 1 Augmentation: "zR" Code alignment factor: 4 @@ -11,26 +11,26 @@ The section .eh_frame contains: Augmentation data: 1b DW_CFA_def_cfa_reg: r30 + DW_CFA_nop -00000013 00000029 00000017 FDE cie=00000000 pc=0000001b..0000005b - DW_CFA_advance_loc: 4 to 0000001f +00000014 00000028 00000018 FDE cie=00000000 pc=0000001c..0000005c + DW_CFA_advance_loc: 4 to 00000020 DW_CFA_def_cfa_offset: 32 - DW_CFA_advance_loc: 4 to 00000023 + DW_CFA_advance_loc: 4 to 00000024 DW_CFA_offset: r26 at cfa-32 - DW_CFA_advance_loc: 4 to 00000027 + DW_CFA_advance_loc: 4 to 00000028 DW_CFA_offset: r9 at cfa-24 - DW_CFA_advance_loc: 4 to 0000002b + DW_CFA_advance_loc: 4 to 0000002c DW_CFA_offset: r15 at cfa-16 - DW_CFA_advance_loc: 4 to 0000002f + DW_CFA_advance_loc: 4 to 00000030 DW_CFA_offset: r34 at cfa-8 - DW_CFA_advance_loc: 4 to 00000033 + DW_CFA_advance_loc: 4 to 00000034 DW_CFA_def_cfa_reg: r15 - DW_CFA_advance_loc: 36 to 00000057 + DW_CFA_advance_loc: 36 to 00000058 DW_CFA_def_cfa: r30 ofs 0 DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop - DW_CFA_nop diff --git a/gas/testsuite/gas/cfi/cfi-common-1.d b/gas/testsuite/gas/cfi/cfi-common-1.d index 0634b702752..332c4774c0c 100644 --- a/gas/testsuite/gas/cfi/cfi-common-1.d +++ b/gas/testsuite/gas/cfi/cfi-common-1.d @@ -2,7 +2,7 @@ #name: CFI common 1 The section .eh_frame contains: -00000000 0000000d 00000000 CIE +00000000 00000010 00000000 CIE Version: 1 Augmentation: "zR" Code alignment factor: .* @@ -10,14 +10,14 @@ The section .eh_frame contains: Return address column: .* Augmentation data: 1b + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop -00000011 0000001b 00000015 FDE cie=00000000 pc=.* +00000014 00000018 00000018 FDE cie=00000000 pc=.* DW_CFA_advance_loc: 4 to .* DW_CFA_def_cfa: r0 ofs 16 DW_CFA_offset: r1 at cfa-8 DW_CFA_advance_loc: 4 to .* DW_CFA_def_cfa_offset: 32 DW_CFA_offset: r2 at cfa-24 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop diff --git a/gas/testsuite/gas/cfi/cfi-common-2.d b/gas/testsuite/gas/cfi/cfi-common-2.d index 4c50cdbb0c2..db8deb492b8 100644 --- a/gas/testsuite/gas/cfi/cfi-common-2.d +++ b/gas/testsuite/gas/cfi/cfi-common-2.d @@ -2,16 +2,15 @@ #name: CFI common 2 The section .eh_frame contains: -00000000 0000000d 00000000 CIE +00000000 00000010 00000000 CIE Version: 1 Augmentation: "zR" Code alignment factor: .* Data alignment factor: .* Return address column: .* Augmentation data: 1b - - -00000011 0000001[bf] 00000015 FDE cie=00000000 pc=.* +#... +00000014 00000020 00000018 FDE cie=00000000 pc=.* DW_CFA_advance_loc: 4 to .* DW_CFA_def_cfa: r0 ofs 16 DW_CFA_advance_loc: 4 to .* @@ -22,5 +21,4 @@ The section .eh_frame contains: DW_CFA_restore_state DW_CFA_advance_loc: 4 to .* DW_CFA_def_cfa_offset: 0 -# 64-bit arches will have here 4 times DW_CFA_nop -#... +#pass diff --git a/gas/testsuite/gas/cfi/cfi-common-3.d b/gas/testsuite/gas/cfi/cfi-common-3.d index 9ddbc457f3c..82a4193280f 100644 --- a/gas/testsuite/gas/cfi/cfi-common-3.d +++ b/gas/testsuite/gas/cfi/cfi-common-3.d @@ -2,19 +2,16 @@ #name: CFI common 3 The section .eh_frame contains: -00000000 0000000d 00000000 CIE +00000000 00000010 00000000 CIE Version: 1 Augmentation: "zR" Code alignment factor: .* Data alignment factor: .* Return address column: .* Augmentation data: 1b - - -00000011 00000013 00000015 FDE cie=00000000 pc=.* +#... +00000014 00000010 00000018 FDE cie=00000000 pc=.* DW_CFA_advance_loc: 4 to .* DW_CFA_remember_state DW_CFA_restore_state - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop +#pass -- 2.30.2