From: Julia Koval Date: Thu, 9 Jun 2016 18:31:35 +0000 (+0200) Subject: Fix x86 interrupt tests for -fpic and -march=corei7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4df99d922832b3d5b88683ddb301c186cc72249e;p=gcc.git Fix x86 interrupt tests for -fpic and -march=corei7 2016-06-09 Julia Koval * gcc.target/i386/interrupt-12.c: Fix test for -fpic and corei7. * gcc.target/i386/interrupt-13.c: Likewise. * gcc.target/i386/interrupt-15.c: Likewise. * gcc.target/i386/interrupt-14.c: Fix test for -fpic. * gcc.target/i386/interrupt-24.c: Likewise. * gcc.target/i386/interrupt-3.c: Fix test for corei7. * gcc.target/i386/interrupt-9.c: Likewise. * gcc.target/i386/interrupt-redzone-2.c: Likewise. From-SVN: r237272 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9ae6294a1ce..d2f9a702c4b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2016-06-09 Julia Koval + + * gcc.target/i386/interrupt-12.c: Fix test for -fpic and corei7. + * gcc.target/i386/interrupt-13.c: Likewise. + * gcc.target/i386/interrupt-15.c: Likewise. + * gcc.target/i386/interrupt-14.c: Fix test for -fpic. + * gcc.target/i386/interrupt-24.c: Likewise. + * gcc.target/i386/interrupt-3.c: Fix test for corei7. + * gcc.target/i386/interrupt-9.c: Likewise. + * gcc.target/i386/interrupt-redzone-2.c: Likewise. + 2016-06-09 Martin Sebor PR c/70883 diff --git a/gcc/testsuite/gcc.target/i386/interrupt-12.c b/gcc/testsuite/gcc.target/i386/interrupt-12.c index b04de5fa75d..23780050d76 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-12.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-12.c @@ -15,16 +15,16 @@ fn1 (void *frame, uword_t error) /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(b|c|d)x" } } */ /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)si" } } */ /* { dg-final { scan-assembler-not "(push|pop)l\[\\t \]*%edi" { target ia32 } } } */ -/* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%rax" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%rax" { target { { ! ia32 } && nonpic } } } } */ /* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%r\[0-9\]+" { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "push(?:l|q)\[\\t \]*%(?:r|e)bp" 1 } } */ -/* { dg-final { scan-assembler-times "leave" 1 } } */ +/* { dg-final { scan-assembler-times "leave" 1 { target nonpic } } } */ /* { dg-final { scan-assembler-times "pushl\[\\t \]*%eax" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "movl\[\\t \]*-4\\(%ebp\\),\[\\t \]*%eax" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "pushq\[\\t \]*%rdi" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "addl\[\\t \]*\\\$4,\[\\t \]*%esp" 1 { target ia32 } } } */ -/* { dg-final { scan-assembler-times "add(?:l|q)\[\\t \]*\\\$8,\[\\t \]*%\[re\]?sp" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 1 { target { { ! ia32 } && nonpic } } } } */ +/* { dg-final { scan-assembler "(addl|leal).*4.*%esp" { target ia32 } } } */ +/* { dg-final { scan-assembler "(add|lea)(?:l|q)\[\\t \]*\\\$?8.*,\[\\t \]*%\[re\]?sp" { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "iret" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "iretq" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "\tcld" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-13.c b/gcc/testsuite/gcc.target/i386/interrupt-13.c index 018602fd013..378145ec672 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-13.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-13.c @@ -15,16 +15,16 @@ fn1 (void *frame, uword_t error) /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(b|c|d)x" } } */ /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)si" } } */ /* { dg-final { scan-assembler-not "(push|pop)l\[\\t \]*%edi" { target ia32 } } } */ -/* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%rax" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%rax" { target { { ! ia32 } && nonpic } } } } */ /* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%r\[0-9\]+" { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "push(?:l|q)\[\\t \]*%(?:r|e)bp" 1 } } */ -/* { dg-final { scan-assembler-times "leave" 1 } } */ +/* { dg-final { scan-assembler-times "leave" 1 { target nonpic } } } */ /* { dg-final { scan-assembler-times "pushl\[\\t \]*%eax" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "movl\[\\t \]*-4\\(%ebp\\),\[\\t \]*%eax" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "pushq\[\\t \]*%rdi" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "addl\[\\t \]*\\\$4,\[\\t \]*%esp" 1 { target ia32 } } } */ -/* { dg-final { scan-assembler-times "add(?:l|q)\[\\t \]*\\\$8,\[\\t \]*%\[re\]?sp" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 1 { target { { ! ia32 } && nonpic } } } } */ +/* { dg-final { scan-assembler "(addl|leal).*4.*%esp" { target ia32 } } } */ +/* { dg-final { scan-assembler "(add|lea)(?:l|q)\[\\t \]*\\\$?8.*,\[\\t \]*%\[re\]?sp" { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "iret" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "iretq" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "\tcld" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-14.c b/gcc/testsuite/gcc.target/i386/interrupt-14.c index 6ed2cf2e42a..f574f4fafac 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-14.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-14.c @@ -18,7 +18,7 @@ fn2 (void *frame) } /* { dg-final { scan-assembler-not "movups\[\\t .\]*%(x|y|z)mm\[0-9\]+" } } */ -/* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(a|b|c|d)x" } } */ +/* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(a|b|c|d)x" { target nonpic } } } */ /* { dg-final { scan-assembler-not "(push|pop)l\[\\t \]*%edi" { target ia32 } } } */ /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)si" } } */ /* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%r\[8-9\]+" { target { ! ia32 } } } } */ @@ -26,7 +26,7 @@ fn2 (void *frame) /* { dg-final { scan-assembler-times "push(?:l|q)\[\\t \]*%(?:r|e)bp" 2 } } */ /* { dg-final { scan-assembler-times "leave" 2 { target ia32 } } } */ /* { dg-final { scan-assembler-times "pushq\[\\t \]*%rdi" 2 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 2 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 2 { target { { ! ia32 } && nonpic } } } } */ /* { dg-final { scan-assembler-times "iret" 2 { target ia32 } } } */ /* { dg-final { scan-assembler-times "iretq" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "\tcld" 2 } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-15.c b/gcc/testsuite/gcc.target/i386/interrupt-15.c index 9b53abee652..701ab2f4d33 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-15.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-15.c @@ -22,16 +22,16 @@ fn2 (void *frame, uword_t error) /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(b|c|d)x" } } */ /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)si" } } */ /* { dg-final { scan-assembler-not "(push|pop)l\[\\t \]*%edi" { target ia32 } } } */ -/* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%rax" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%rax" { target { { ! ia32 } && nonpic } } } } */ /* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%r\[0-9\]+" { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "push(?:l|q)\[\\t \]*%(?:r|e)bp" 2 } } */ -/* { dg-final { scan-assembler-times "leave" 2 } } */ +/* { dg-final { scan-assembler-times "leave" 2 { target nonpic } } } */ /* { dg-final { scan-assembler-times "pushl\[\\t \]*%eax" 2 { target ia32 } } } */ /* { dg-final { scan-assembler-times "movl\[\\t \]*-4\\(%ebp\\),\[\\t \]*%eax" 2 { target ia32 } } } */ /* { dg-final { scan-assembler-times "pushq\[\\t \]*%rdi" 2 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 2 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "addl\[\\t \]*\\\$4,\[\\t \]*%esp" 2 { target ia32 } } } */ -/* { dg-final { scan-assembler-times "add(?:l|q)\[\\t \]*\\\$8,\[\\t \]*%\[re\]?sp" 2 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "movq\[\\t \]*-8\\(%(?:r|e)bp\\),\[\\t \]*%rdi" 2 { target { { ! ia32 } && nonpic } } } } */ +/* { dg-final { scan-assembler "(addl|leal).*4.*%esp" { target ia32 } } } */ +/* { dg-final { scan-assembler "(add|lea)(?:l|q)\[\\t \]*\\\$?8.*,\[\\t \]*%\[re\]?sp" { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "iret" 2 { target ia32 } } } */ /* { dg-final { scan-assembler-times "iretq" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "\tcld" 2 } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-24.c b/gcc/testsuite/gcc.target/i386/interrupt-24.c index 0b95660128e..f7ec9da3f2b 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-24.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-24.c @@ -13,7 +13,7 @@ foo (int i0, int i1, int i2, int i3, int i4, int i5, int i6, } /* { dg-final { scan-assembler-not "movups\[\\t \]*%(x|y|z)mm\[0-9\]+" } } */ -/* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(a|b|c|d)x" } } */ +/* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(a|b|c|d)x" { target nonpic } } } */ /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)(d|s)i" } } */ /* { dg-final { scan-assembler-not "(push|pop)(l|q)\[\\t \]*%(r|e)bp" } } */ /* { dg-final { scan-assembler-not "(push|pop)q\[\\t \]*%r\[0-9\]+" { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-3.c b/gcc/testsuite/gcc.target/i386/interrupt-3.c index ec7dc71cfbc..6b53e1347e3 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-3.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-3.c @@ -9,8 +9,8 @@ fn (void* frame, uword_t error) { } -/* { dg-final { scan-assembler-times "add(?:l|q)\[\\t \]*\\\$8,\[\\t \]*%\[re\]?sp" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "addl\[\\t \]*\\\$4,\[\\t \]*%esp" 1 { target ia32 } } } */ +/* { dg-final { scan-assembler "(add|lea)(?:l|q)\[\\t \]*\\\$?8.*,\[\\t \]*%\[re\]?sp" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "(addl|leal).*4.*%esp" { target ia32 } } } */ /* { dg-final { scan-assembler-times "iret" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "iretq" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-not "\tcld" } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-9.c b/gcc/testsuite/gcc.target/i386/interrupt-9.c index 490fb9c423b..2a297b25f5e 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-9.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-9.c @@ -15,8 +15,8 @@ foo (void *frame, uword_t error_code) } /* { dg-final { scan-assembler-times "and\[lq\]?\[^\\n\]*-64,\[^\\n\]*sp" 1 } } */ -/* { dg-final { scan-assembler-times "add(?:l|q)\[\\t \]*\\\$8,\[\\t \]*%\[re\]?sp" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "addl\[\\t \]*\\\$4,\[\\t \]*%esp" 1 { target ia32 } } } */ +/* { dg-final { scan-assembler "(add|lea)(?:l|q)\[\\t \]*\\\$?8.*,\[\\t \]*%\[re\]?sp" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "(addl|leal).*4.*%esp" { target ia32 } } } */ /* { dg-final { scan-assembler-times "iret" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "iretq" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "\tcld" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c b/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c index a3fa776e2db..2577f43c916 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c @@ -29,5 +29,5 @@ fn (void *frame) "=m" (i12), "=m" (i13), "=m" (c)); } -/* { dg-final { scan-assembler-times "(?:sub|add)(?:l|q)\[\\t \]*\\\$\[0-9\]*,\[\\t \]*%\[re\]?sp" 2 } } */ +/* { dg-final { scan-assembler "(?:sub|add|lea)(?:l|q)\[\\t \]*.*\\\$?\[0-9\]*.*,\[\\t \]*%\[re\]?sp" } } */ /* { dg-final { scan-assembler-not "\tcld" } } */