This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add .cfi_val_offset GAS command.


On 10/03/2016 07:49 PM, Maciej W. Rozycki wrote:
> On Wed, 28 Sep 2016, Andreas Krebbel wrote:
> 
>> This patch adds support for .cfi_val_offset GAS pseudo command which
>> maps to DW_CFA_val_offset and DW_CFA_val_offset_sf.
> 
>  This adds a new failure with `mips64-openbsd' and `mips64el-openbsd':
> 
> regexp_diff match failure
> regexp "^  Augmentation data:     [01]b$"
> line   "  Augmentation data:     0c"
> FAIL: CFI common 8
> 
> -- what's the right fix?

The patch just copied the regexp pattern from the other CFI tests. Many of the CFI tests appear to
fail on MIPS64.

Mostly because the augmentation string does not match the regexp. This is because MIPS64 doesn't use
the default of 4 for DWARF2_FDE_RELOC_SIZE which ends up as "b" in the augmentation string. MIPS64
uses the address size which is 8 resulting in "c".

Adding c to the regexp fixes a couple of them. Other also need adjustments in the FDE header lines
due to different sizes/offsets. Fixed with the attached patch. I've only made sure that the
testcases pass. While the offsets look plausible to me a MIPS maintainer should probably verify
whether the values are actually expected.

Checked with cross binutils:

< FAIL: CFI on mips, 1
< FAIL: CFI common 1
< FAIL: CFI common 2
< FAIL: CFI common 3
< FAIL: CFI common 4
< FAIL: CFI common 5
< FAIL: CFI common 7
< FAIL: CFI common 8
243,244c235,236
< # of expected passes          5290
< # of unexpected failures      63
---
> # of expected passes          5298
> # of unexpected failures      55

gas/ChangeLog:

2016-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* testsuite/gas/cfi/cfi-common-1.d: Adjust regexps for mips64.
	* testsuite/gas/cfi/cfi-common-2.d: Likewise.
	* testsuite/gas/cfi/cfi-common-3.d: Likewise.
	* testsuite/gas/cfi/cfi-common-4.d: Likewise.
	* testsuite/gas/cfi/cfi-common-5.d: Likewise.
	* testsuite/gas/cfi/cfi-common-7.d: Likewise.
	* testsuite/gas/cfi/cfi-common-8.d: Likewise.
	* testsuite/gas/cfi/cfi-mips-1.d: Likewise.
---
 gas/testsuite/gas/cfi/cfi-common-1.d | 2 +-
 gas/testsuite/gas/cfi/cfi-common-2.d | 4 ++--
 gas/testsuite/gas/cfi/cfi-common-3.d | 4 ++--
 gas/testsuite/gas/cfi/cfi-common-4.d | 6 +++---
 gas/testsuite/gas/cfi/cfi-common-5.d | 6 +++---
 gas/testsuite/gas/cfi/cfi-common-7.d | 4 ++--
 gas/testsuite/gas/cfi/cfi-common-8.d | 2 +-
 gas/testsuite/gas/cfi/cfi-mips-1.d   | 4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/gas/testsuite/gas/cfi/cfi-common-1.d b/gas/testsuite/gas/cfi/cfi-common-1.d
index 40000b8..876c5f2 100644
--- a/gas/testsuite/gas/cfi/cfi-common-1.d
+++ b/gas/testsuite/gas/cfi/cfi-common-1.d
@@ -9,7 +9,7 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]

   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 1e7092c..41bbb05 100644
--- a/gas/testsuite/gas/cfi/cfi-common-2.d
+++ b/gas/testsuite/gas/cfi/cfi-common-2.d
@@ -9,9 +9,9 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]
 #...
-00000014 0+00[12][c0] 0+0018 FDE cie=0+0000 pc=.*
+00000014 0+00[12][c08] 0+0018 FDE cie=0+0000 pc=.*
   DW_CFA_advance_loc: 4 to .*
   DW_CFA_def_cfa: r0( \([er]ax\)|) ofs 16
   DW_CFA_advance_loc: 4 to .*
diff --git a/gas/testsuite/gas/cfi/cfi-common-3.d b/gas/testsuite/gas/cfi/cfi-common-3.d
index 954556d..7013c2f 100644
--- a/gas/testsuite/gas/cfi/cfi-common-3.d
+++ b/gas/testsuite/gas/cfi/cfi-common-3.d
@@ -9,9 +9,9 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]
 #...
-00000014 0+0010 0+0018 FDE cie=00000000 pc=.*
+00000014 0+001[08] 0+0018 FDE cie=00000000 pc=.*
   DW_CFA_advance_loc: 4 to .*
   DW_CFA_remember_state
   DW_CFA_restore_state
diff --git a/gas/testsuite/gas/cfi/cfi-common-4.d b/gas/testsuite/gas/cfi/cfi-common-4.d
index 24b218b..a2a4a5c 100644
--- a/gas/testsuite/gas/cfi/cfi-common-4.d
+++ b/gas/testsuite/gas/cfi/cfi-common-4.d
@@ -9,13 +9,13 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]
 #...
-00000014 0+0010 0+0018 FDE cie=0+0000 pc=.*
+00000014 0+001[08] 0+0018 FDE cie=0+0000 pc=.*
   DW_CFA_remember_state
   DW_CFA_restore_state
 #...
-00000028 0+001[04] 0+002c FDE cie=0+0000 pc=.*
+000000(28|30) 0+001[04c] 0+00(2c|34) FDE cie=0+0000 pc=.*
   DW_CFA_remember_state
   DW_CFA_restore_state
 #pass
diff --git a/gas/testsuite/gas/cfi/cfi-common-5.d b/gas/testsuite/gas/cfi/cfi-common-5.d
index fa2292f..75f5138 100644
--- a/gas/testsuite/gas/cfi/cfi-common-5.d
+++ b/gas/testsuite/gas/cfi/cfi-common-5.d
@@ -8,15 +8,15 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]
 #...
-00000014 0+0014 0+0018 FDE cie=0+0000 pc=.*
+00000014 0+001[4c] 0+0018 FDE cie=0+0000 pc=.*
   DW_CFA_advance_loc: 4 to .*
   DW_CFA_remember_state
   DW_CFA_advance_loc: 4 to .*
   DW_CFA_restore_state
 #...
-0000002c 0+001[48] 0+0030 FDE cie=0+0000 pc=.*
+000000(2c|34) 0+00[12][048] 0+00(30|38) FDE cie=0+0000 pc=.*
   DW_CFA_advance_loc: 4 to .*
   DW_CFA_def_cfa: r0( \([er]ax\)|) ofs 16
   DW_CFA_advance_loc: 4 to .*
diff --git a/gas/testsuite/gas/cfi/cfi-common-7.d b/gas/testsuite/gas/cfi/cfi-common-7.d
index 3241a9f..d216ac4 100644
--- a/gas/testsuite/gas/cfi/cfi-common-7.d
+++ b/gas/testsuite/gas/cfi/cfi-common-7.d
@@ -9,13 +9,13 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]

   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop

-00000014 0+00(18|1c|20) 0+0018 FDE cie=0+0000 pc=.*
+00000014 0+00(18|1c|20|28) 0+0018 FDE cie=0+0000 pc=.*
   DW_CFA_advance_loc: 16 to .*
   DW_CFA_def_cfa: r0( \([er]ax\)|) ofs 16
   DW_CFA_advance_loc[24]: 75040 to .*
diff --git a/gas/testsuite/gas/cfi/cfi-common-8.d b/gas/testsuite/gas/cfi/cfi-common-8.d
index 6155690..7004741 100644
--- a/gas/testsuite/gas/cfi/cfi-common-8.d
+++ b/gas/testsuite/gas/cfi/cfi-common-8.d
@@ -9,7 +9,7 @@ Contents of the .eh_frame section:
   Code alignment factor: .*
   Data alignment factor: .*
   Return address column: .*
-  Augmentation data:     [01]b
+  Augmentation data:     [01][abc]

   DW_CFA_nop
   DW_CFA_nop
diff --git a/gas/testsuite/gas/cfi/cfi-mips-1.d b/gas/testsuite/gas/cfi/cfi-mips-1.d
index 6635b9f..3b17aec 100644
--- a/gas/testsuite/gas/cfi/cfi-mips-1.d
+++ b/gas/testsuite/gas/cfi/cfi-mips-1.d
@@ -8,14 +8,14 @@ Contents of the .eh_frame section:
   Code alignment factor: 1
   Data alignment factor: -4
   Return address column: 31
-  Augmentation data:     0b
+  Augmentation data:     0[bc]

   DW_CFA_def_cfa_register: r29
   DW_CFA_def_cfa: r29 ofs 0
   DW_CFA_nop
   DW_CFA_nop

-0+0018 0+001c 0+001c FDE cie=0+0000 pc=0+0000..0+002c
+0+0018 0+00(1c|24) 0+001c FDE cie=0+0000 pc=0+0000..0+002c
   DW_CFA_advance_loc: 4 to 0+0004
   DW_CFA_def_cfa_offset: 8
   DW_CFA_advance_loc: 4 to 0+0008
-- 
2.9.1



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]