[Bug target/69749] New: Use aligned spill/fill for vector register in interrupt handler
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Feb 10 15:39:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69749
Bug ID: 69749
Summary: Use aligned spill/fill for vector register in
interrupt handler
Product: gcc
Version: 5.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: vaalfreja at gmail dot com
Target Milestone: ---
On hjl/interrupt/stage1 branch, I got
[hjl@gnu-6 interrupt-2]$ cat y.c
extern void bar (void);
__attribute__((interrupt))
void
foo (void *frame)
{
bar ();
}
[hjl@gnu-6 interrupt-2]$ make y.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -S -O2 y.c
[hjl@gnu-6 interrupt-2]$ cat y.s
.file "y.c"
.text
.p2align 4,,15
.globl foo
.type foo, @function
foo:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
pushq %r11
pushq %r10
pushq %r9
pushq %r8
pushq %rdi
pushq %rsi
pushq %rcx
pushq %rdx
pushq %rax
andq $-16, %rsp
subq $256, %rsp
movups %xmm0, -328(%rbp)
.cfi_escape 0x10,0x11,0x3,0x76,0xb8,0x7d
.cfi_offset 11, -24
.cfi_offset 10, -32
.cfi_offset 9, -40
.cfi_offset 8, -48
.cfi_offset 5, -56
.cfi_offset 4, -64
.cfi_offset 2, -72
.cfi_offset 1, -80
.cfi_offset 0, -88
movups %xmm1, -312(%rbp)
.cfi_escape 0x10,0x12,0x3,0x76,0xc8,0x7d
movups %xmm2, -296(%rbp)
.cfi_escape 0x10,0x13,0x3,0x76,0xd8,0x7d
movups %xmm3, -280(%rbp)
.cfi_escape 0x10,0x14,0x3,0x76,0xe8,0x7d
movups %xmm4, -264(%rbp)
.cfi_escape 0x10,0x15,0x3,0x76,0xf8,0x7d
movups %xmm5, -248(%rbp)
.cfi_escape 0x10,0x16,0x3,0x76,0x88,0x7e
movups %xmm6, -232(%rbp)
.cfi_escape 0x10,0x17,0x3,0x76,0x98,0x7e
movups %xmm7, -216(%rbp)
.cfi_escape 0x10,0x18,0x3,0x76,0xa8,0x7e
movups %xmm8, -200(%rbp)
.cfi_escape 0x10,0x19,0x3,0x76,0xb8,0x7e
movups %xmm9, -184(%rbp)
.cfi_escape 0x10,0x1a,0x3,0x76,0xc8,0x7e
movups %xmm10, -168(%rbp)
.cfi_escape 0x10,0x1b,0x3,0x76,0xd8,0x7e
movups %xmm11, -152(%rbp)
.cfi_escape 0x10,0x1c,0x3,0x76,0xe8,0x7e
movups %xmm12, -136(%rbp)
.cfi_escape 0x10,0x1d,0x3,0x76,0xf8,0x7e
movups %xmm13, -120(%rbp)
.cfi_escape 0x10,0x1e,0x3,0x76,0x88,0x7f
movups %xmm14, -104(%rbp)
.cfi_escape 0x10,0x1f,0x3,0x76,0x98,0x7f
movups %xmm15, -88(%rbp)
.cfi_escape 0x10,0x20,0x3,0x76,0xa8,0x7f
cld
call bar
movups -328(%rbp), %xmm0
movups -312(%rbp), %xmm1
movups -296(%rbp), %xmm2
movups -280(%rbp), %xmm3
movups -264(%rbp), %xmm4
movups -248(%rbp), %xmm5
movups -232(%rbp), %xmm6
movups -216(%rbp), %xmm7
movups -200(%rbp), %xmm8
movups -184(%rbp), %xmm9
movups -168(%rbp), %xmm10
movups -152(%rbp), %xmm11
movups -136(%rbp), %xmm12
movups -120(%rbp), %xmm13
movups -104(%rbp), %xmm14
movups -88(%rbp), %xmm15
leaq -72(%rbp), %rsp
.cfi_restore 29
.cfi_restore 28
.cfi_restore 27
.cfi_restore 26
.cfi_restore 25
.cfi_restore 24
.cfi_restore 23
.cfi_restore 22
.cfi_restore 21
.cfi_restore 20
.cfi_restore 19
.cfi_restore 18
.cfi_restore 17
popq %rax
popq %rdx
popq %rcx
popq %rsi
popq %rdi
popq %r8
popq %r9
popq %r10
popq %r11
popq %rbp
.cfi_def_cfa 7, 8
iretq
.cfi_endproc
.LFE0:
.size foo, .-foo
.ident "GCC: (GNU) 6.0.0 20160209 (experimental)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 interrupt-2]$
We should use aligned spill/fill for vector registers.
More information about the Gcc-bugs
mailing list