]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libgcc/config/i386/i386-asm.h
1 /* Defines common perprocessor and assembly macros for use by various stubs.
2 Copyright (C) 2016-2017 Free Software Foundation, Inc.
3 Contributed by Daniel Santos <daniel.santos@pobox.com>
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
30 # define ELFFN(fn) .type fn,@function
35 #define FUNC_START(fn) \
40 #define HIDDEN_FUNC(fn)\
44 #define FUNC_END(fn) .size fn,.-fn
48 # define MOVAPS vmovaps
50 # define MOVAPS movaps
53 /* Save SSE registers 6-15. off is the offset of rax to get to xmm6. */
55 MOVAPS
%xmm15
,(\off
- 0x90)(%rax
)
56 MOVAPS
%xmm14
,(\off
- 0x80)(%rax
)
57 MOVAPS
%xmm13
,(\off
- 0x70)(%rax
)
58 MOVAPS
%xmm12
,(\off
- 0x60)(%rax
)
59 MOVAPS
%xmm11
,(\off
- 0x50)(%rax
)
60 MOVAPS
%xmm10
,(\off
- 0x40)(%rax
)
61 MOVAPS
%xmm9
, (\off
- 0x30)(%rax
)
62 MOVAPS
%xmm8
, (\off
- 0x20)(%rax
)
63 MOVAPS
%xmm7
, (\off
- 0x10)(%rax
)
64 MOVAPS
%xmm6
, \
off(%rax
)
67 /* Restore SSE registers 6-15. off is the offset of rsi to get to xmm6. */
68 .macro SSE_RESTORE off
=0
69 MOVAPS (\off
- 0x90)(%rsi
), %xmm15
70 MOVAPS (\off
- 0x80)(%rsi
), %xmm14
71 MOVAPS (\off
- 0x70)(%rsi
), %xmm13
72 MOVAPS (\off
- 0x60)(%rsi
), %xmm12
73 MOVAPS (\off
- 0x50)(%rsi
), %xmm11
74 MOVAPS (\off
- 0x40)(%rsi
), %xmm10
75 MOVAPS (\off
- 0x30)(%rsi
), %xmm9
76 MOVAPS (\off
- 0x20)(%rsi
), %xmm8
77 MOVAPS (\off
- 0x10)(%rsi
), %xmm7
78 MOVAPS \
off(%rsi
), %xmm6
82 #endif /* I386_ASM_H */