This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/67552] [meta] x86 interrupt attribute


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]$


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]