This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling with -m64 using attribute interrupt emits IRET not IRETQ
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Wink Saville <wink at saville dot com>
- Cc: Yulia Koval <vaalfreja at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Thu, 28 Jan 2016 11:15:18 -0800
- Subject: Re: Compiling with -m64 using attribute interrupt emits IRET not IRETQ
- Authentication-results: sourceware.org; auth=none
- References: <CAKk8isqhifc557h8Dj5a4kA5Ei64CpvJWoyrVHDngtjDfdw9ug at mail dot gmail dot com> <CAMe9rOq=4PCXXZLu1O-8ucce4PNJ9LBuVTvd2nD_dWZsVhvCPQ at mail dot gmail dot com> <CAMe9rOpOnbhFYDNaEefNqeX=rKDFhEzaeM6FxDgm7ZFBMLJ1Eg at mail dot gmail dot com> <CAKk8isrZJDgirrKdBbBiyq-P06tvv4+cNHO0k9eGWJg9=HS3qQ at mail dot gmail dot com>
On Thu, Jan 28, 2016 at 11:06 AM, Wink Saville <wink@saville.com> wrote:
> Thanks. How are you testing?
>
>
* { dg-do compile } */
/* { dg-options "-O2 -Wall -g" } */
void
__attribute__((interrupt))
fn (void *frame)
{
}
/* { dg-final { scan-assembler-not "add(l|q)\[\\t \]*\\$\[0-9\]*,\[\\t
\]*%\[re\]?sp" } } */
/* { dg-final { scan-assembler "iret" { target ia32 } } } */
/* { dg-final { scan-assembler "iretq" { target { ! ia32 } } } } */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The testcase scans for iretq if target isn't 32-bit.
--
H.J.