From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH 3/6] [3/6] gas: sframe: testsuite: add testcase for .cfi_negate_ra_state
Date: Wed, 14 Dec 2022 11:58:56 -0800 [thread overview]
Message-ID: <20221214195859.1233809-4-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20221214195859.1233809-1-indu.bhagat@oracle.com>
Previously, the common-empty-4 testcase ensured that
.cfi_negate_ra_state directive, if present, generates an empty SFrame
FDE. Now that the handling of .cfi_negate_ra_state is in place,
repurpose the testcase: add it as a new test for aarch64 target such
that a non-empty SFrame section with valid SFrame FREs are expected.
ChangeLog:
* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d: New test.
* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.s: Likewise.
* testsuite/gas/cfi-sframe/cfi-sframe.exp: Adjust the testcases
accordingly.
* testsuite/gas/cfi-sframe/common-empty-4.d: Removed.
* testsuite/gas/cfi-sframe/common-empty-4.s: Likewise.
---
.../gas/cfi-sframe/cfi-sframe-aarch64-2.d | 20 +++++++++++++++++++
...ommon-empty-4.s => cfi-sframe-aarch64-2.s} | 3 ++-
gas/testsuite/gas/cfi-sframe/cfi-sframe.exp | 2 +-
gas/testsuite/gas/cfi-sframe/common-empty-4.d | 14 -------------
4 files changed, 23 insertions(+), 16 deletions(-)
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d
rename gas/testsuite/gas/cfi-sframe/{common-empty-4.s => cfi-sframe-aarch64-2.s} (85%)
delete mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.d
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d
new file mode 100644
index 00000000000..59937c166cd
--- /dev/null
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d
@@ -0,0 +1,20 @@
+#as: --gsframe
+#objdump: --sframe=.sframe
+#name: SFrame cfi_negate_ra_state test
+#...
+Contents of the SFrame section .sframe:
+
+ Header :
+
+ Version: SFRAME_VERSION_1
+ Flags: NONE
+ Num FDEs: 1
+ Num FREs: 2
+
+ Function Index :
+ func idx \[0\]: pc = 0x0, size = 8 bytes
+ STARTPC + CFA + FP + RA +
+#...
+ 0+0004 +sp\+16 +u +u +
+
+#pass
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-4.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.s
similarity index 85%
rename from gas/testsuite/gas/cfi-sframe/common-empty-4.s
rename to gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.s
index f97ca2f7ff9..8106c937b39 100644
--- a/gas/testsuite/gas/cfi-sframe/common-empty-4.s
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.s
@@ -8,7 +8,8 @@
##
## .cfi_negate_ra_state CFI directive is used to convey this information.
##
-## SFrame does not have any means to represent this information at this time.
+## SFrame has support for this. This testcase ensures that the directive
+## is interpreted successfully.
.cfi_startproc
.long 0
.cfi_def_cfa_offset 16
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
index eb6da614c2f..f001fad0e8e 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
@@ -82,7 +82,6 @@ if { ([istarget "x86_64-*-*"] || [istarget "aarch64*-*-*"]) \
run_dump_test "common-empty-1"
run_dump_test "common-empty-2"
run_dump_test "common-empty-3"
- run_dump_test "common-empty-4"
}
# x86-64 specific tests
@@ -97,4 +96,5 @@ if { [istarget "x86_64-*-*"] && [gas_sframe_check] } then {
# aarch64 specific tests
if { [istarget "aarch64*-*-*"] && [gas_sframe_check] } then {
run_dump_test "cfi-sframe-aarch64-1"
+ run_dump_test "cfi-sframe-aarch64-2"
}
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-4.d b/gas/testsuite/gas/cfi-sframe/common-empty-4.d
deleted file mode 100644
index f7a6062d392..00000000000
--- a/gas/testsuite/gas/cfi-sframe/common-empty-4.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: --gsframe
-#objdump: --sframe=.sframe
-#name: SFrame supports only default return column
-#...
-Contents of the SFrame section .sframe:
-
- Header :
-
- Version: SFRAME_VERSION_1
- Flags: NONE
- Num FDEs: 0
- Num FREs: 0
-
-#pass
--
2.37.2
next prev parent reply other threads:[~2022-12-14 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 19:58 [PATCH 0/6] SFrame: support for .cfi_negate_ra_state in aarch64 Indu Bhagat
2022-12-14 19:58 ` [PATCH 1/6] [1/6] sframe.h: add support for .cfi_negate_ra_state Indu Bhagat
2022-12-14 19:58 ` [PATCH 2/6] [2/6] gas: sframe: " Indu Bhagat
2022-12-14 19:58 ` Indu Bhagat [this message]
2022-12-14 19:58 ` [PATCH 4/6] [4/6] libsframe: provide new access API for mangled RA bit Indu Bhagat
2022-12-14 19:58 ` [PATCH 5/6] [5/6] objdump/readelf: sframe: emit marker for FREs with mangled RA Indu Bhagat
2022-12-14 19:58 ` [PATCH 6/6] [6/6] sframe: doc: update spec for the mangled-RA bit in FRE Indu Bhagat
2022-12-16 16:39 ` [PATCH 0/6] SFrame: support for .cfi_negate_ra_state in aarch64 Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221214195859.1233809-4-indu.bhagat@oracle.com \
--to=indu.bhagat@oracle.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).