diff options
author | Alexandre Oliva <oliva@adacore.com> | 2024-11-07 02:46:57 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2024-11-07 02:46:57 -0300 |
commit | d17a2e8bfc91a8e401a2d8c61e23fba36e28a43d (patch) | |
tree | 92a65ef6ff316eef4df4119aec1d2377777c8c4b | |
parent | 1e2ae65a7f01fa3dcdbfd1bb5bc87b860172336d (diff) | |
download | gcc-d17a2e8bfc91a8e401a2d8c61e23fba36e28a43d.zip gcc-d17a2e8bfc91a8e401a2d8c61e23fba36e28a43d.tar.gz gcc-d17a2e8bfc91a8e401a2d8c61e23fba36e28a43d.tar.bz2 |
[testsuite] fix pr70321.c PIC expectations
When we select a non-bx get_pc_thunk, we get an extra mov to set up
the PIC register before the abort call. Expect that mov or a
get_pc_thunk.bx call.
for gcc/testsuite/ChangeLog
* gcc.target/i386/pr70321.c: Cope with non-bx get_pc_thunk.
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr70321.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr70321.c b/gcc/testsuite/gcc.target/i386/pr70321.c index 58f5f56..287b7da 100644 --- a/gcc/testsuite/gcc.target/i386/pr70321.c +++ b/gcc/testsuite/gcc.target/i386/pr70321.c @@ -9,4 +9,8 @@ void foo (long long ixi) /* { dg-final { scan-assembler-times "mov" 1 { target nonpic } } } */ /* get_pc_thunk adds an extra mov insn. */ -/* { dg-final { scan-assembler-times "mov" 2 { target { ! nonpic } } } } */ +/* Choosing a non-bx get_pc_thunk requires another mov before the abort call. + So we require a match of either that mov or the get_pc_thunk.bx call, in + addition to the other 2 movs. (Hopefully there won't be more calls for a + false positive.) */ +/* { dg-final { scan-assembler-times "mov|call\[^\n\r]*get_pc_thunk\.bx" 3 { target { ! nonpic } } } } */ |