This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 15 Nov 2014 15:14:32 -0800
- Subject: Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
- Authentication-results: sourceware.org; auth=none
- References: <4E4C1272-79FF-464B-A93E-9D0A2FED3544 at gmail dot com> <F76E2222-D113-4A4F-93DD-717F440E4E69 at gmail dot com> <A637FFBF-BD1A-4C34-BFBA-5ECCC1F2F0D8 at gmail dot com> <EE8250E8-9877-4362-8736-4E7976ABC1B3 at gmail dot com> <CAMe9rOp+C8Jy=KHv99_6pXF9mjkmmuYjHDywcox+WhpjYRLS1Q at mail dot gmail dot com> <0368C764-AF90-4A7D-89D3-BE836D9FF617 at gmail dot com> <CAMe9rOoJScghh7p4nrudfAtR8v-kEQKSEzwFdR8r6TGAtVjD6w at mail dot gmail dot com>
On Sat, Nov 15, 2014 at 12:29 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Nov 15, 2014 at 12:22 PM, FX <fxcoudert@gmail.com> wrote:
>>> This looks wrong. This test should pass for 64-bit or ia32 && nonpic.
>>
>> It was Kaiâs original testcase, so I donât want to modify it too much, other than make it skip where it clearly fails.
>>
>
> Original bug report was filed against x86-64:
>
> The attached testcase is a greatly reduced interpreter loop,
> containing a simple load and indirect branch:
>
> goto *addresses[*pc++]
>
> gcc 4.8.2 (as well as older versions) with -O2 produces the following
> x86-64 output:
>
> movq addresses.1721(,%rax,8), %rax
> jmp *%rax
>
> Since the loaded value is not used after the branch, there's no need
> to hold it in a register, so the load could be folded into the branch.
> This would improve code size and instruction count.
>
> Add a testcase only for ia32 makes no senses at all.
>
I checked in this to run it on non-x32 targets.
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 217612)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2014-11-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/sibcall-1.c: Don't run on x32 targets,
+ instead of run on ia32 targets.
+
2014-11-15 Marek Polacek <polacek@redhat.com>
PR middle-end/63884
Index: gcc.target/i386/sibcall-1.c
===================================================================
--- gcc.target/i386/sibcall-1.c (revision 217612)
+++ gcc.target/i386/sibcall-1.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ia32 && nonpic } } } */
+/* { dg-do compile { target { { ! x32 } && nonpic } } } */
/* { dg-options "-O2" } */
extern int (*foo)(int);
--
H.J.