This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/67552] [meta] x86 interrupt attribute
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Sep 2015 17:43:25 +0000
- Subject: [Bug other/67552] [meta] x86 interrupt attribute
- Auto-submitted: auto-generated
- References: <bug-67552-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67552
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
X87 instructions should be disallowed in interrupt handler:
[hjl@gnu-6 interrupt-1]$ cat f.i
extern long double y, x;
void
__attribute__((interrupt))
fn1 (void)
{
x += y;
}
[hjl@gnu-6 interrupt-1]$ make f.s
/export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-5/build-x86_64-linux/gcc/ -O2 -S -o f.s f.i
[hjl@gnu-6 interrupt-1]$ cat f.s
.file "f.i"
.section .text.unlikely,"ax",@progbits
.LCOLDB1:
.text
.LHOTB1:
.p2align 4,,15
.globl fn1
.type fn1, @function
fn1:
.LFB0:
.cfi_startproc
fldt y(%rip)
addq $-128, %rsp
fldt x(%rip)
faddp %st, %st(1)
fstpt x(%rip)
ret
.cfi_endproc
.LFE0:
.size fn1, .-fn1
.section .text.unlikely
.LCOLDE1:
.text
.LHOTE1:
.ident "GCC: (GNU) 5.2.1 20150911"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 interrupt-1]$