]> gcc.gnu.org Git - gcc.git/commitdiff
PR testsuite/80759 Fix -mcall-ms2sysv-xlogues on Darwin and Solaris
authorDaniel Santos <daniel.santos@pobox.com>
Mon, 24 Jul 2017 21:59:57 +0000 (21:59 +0000)
committerDaniel Santos <dansan@gcc.gnu.org>
Mon, 24 Jul 2017 21:59:57 +0000 (21:59 +0000)
2017-07-24  Daniel Santos  <daniel.santos@pobox.com>

PR testsuite/80759
* config.host: include i386/t-msabi for darwin and solaris.
* config/i386/i386-asm.h
(ELFFN): Rename to FN_TYPE.
(FN_SIZE): New macro.
(FN_HIDDEN): Likewise.
(ASMNAME): Likewise.
(FUNC_START): Rename to FUNC_BEGIN, use ASMNAME, replace .global with
.globl.
(HIDDEN_FUNC): Use ASMNAME and .globl instead of .global.
(SSE_SAVE): Convert to cpp macro, hard-code offset (always 0x60).
* config/i386/resms64.S: Use SSE_SAVE as cpp macro instead of gas
.macro.
* config/i386/resms64f.S: Likewise.
* config/i386/resms64fx.S: Likewise.
* config/i386/resms64x.S: Likewise.
* config/i386/savms64.S: Likewise.
* config/i386/savms64f.S: Likewise.

From-SVN: r250488

libgcc/ChangeLog
libgcc/config.host
libgcc/config/i386/i386-asm.h
libgcc/config/i386/resms64.S
libgcc/config/i386/resms64f.S
libgcc/config/i386/resms64fx.S
libgcc/config/i386/resms64x.S
libgcc/config/i386/savms64.S
libgcc/config/i386/savms64f.S

index db33eea13781649e62436091ec62cb0b3e6e7518..cb25039b1a7f95c945f3e20fa0431e0461c03afc 100644 (file)
@@ -1,3 +1,24 @@
+2017-07-24  Daniel Santos  <daniel.santos@pobox.com>
+
+       PR testsuite/80759
+       * config.host: include i386/t-msabi for darwin and solaris.
+       * config/i386/i386-asm.h
+       (ELFFN): Rename to FN_TYPE.
+       (FN_SIZE): New macro.
+       (FN_HIDDEN): Likewise.
+       (ASMNAME): Likewise.
+       (FUNC_START): Rename to FUNC_BEGIN, use ASMNAME, replace .global with
+       .globl.
+       (HIDDEN_FUNC): Use ASMNAME and .globl instead of .global.
+       (SSE_SAVE): Convert to cpp macro, hard-code offset (always 0x60).
+       * config/i386/resms64.S: Use SSE_SAVE as cpp macro instead of gas
+       .macro.
+       * config/i386/resms64f.S: Likewise.
+       * config/i386/resms64fx.S: Likewise.
+       * config/i386/resms64x.S: Likewise.
+       * config/i386/savms64.S: Likewise.
+       * config/i386/savms64f.S: Likewise.
+
 2017-07-19  John Marino  <gnugcc@marino.st>
 
        * config/i386/dragonfly-unwind.h: Handle sigtramp relocation.
index a5ab45363213d7e78e1252a595b675def20ef054..ae8836e88918ec63a3b3474fc2617fef56e48cfb 100644 (file)
@@ -581,12 +581,12 @@ hppa*-*-openbsd*)
        tmake_file="$tmake_file pa/t-openbsd"
        ;;
 i[34567]86-*-darwin*)
-       tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+       tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        tm_file="$tm_file i386/darwin-lib.h"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        ;;
 x86_64-*-darwin*)
-       tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+       tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        tm_file="$tm_file i386/darwin-lib.h"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        ;;
@@ -663,7 +663,7 @@ i[34567]86-*-rtems*)
        extra_parts="$extra_parts crti.o crtn.o"
        ;;
 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
-       tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+       tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        tm_file="${tm_file} i386/elf-lib.h"
        md_unwind_header=i386/sol2-unwind.h
index c613e9fd83ddfd0095921d14dbc008625fbbe860..1387fd24b4f9c2128a18c25fc74d0fe172187d0d 100644 (file)
@@ -26,22 +26,45 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #ifndef I386_ASM_H
 #define I386_ASM_H
 
+#include "auto-host.h"
+
+/* These macros currently support GNU/Linux, Solaris and Darwin.  */
+
 #ifdef __ELF__
-# define ELFFN(fn) .type fn,@function
+# define FN_TYPE(fn) .type fn,@function
+# define FN_SIZE(fn) .size fn,.-fn
+# ifdef HAVE_GAS_HIDDEN
+#  define FN_HIDDEN(fn) .hidden fn
+# endif
+#else
+# define FN_TYPE(fn)
+# define FN_SIZE(fn)
+#endif
+
+#ifndef FN_HIDDEN
+# define FN_HIDDEN(fn)
+#endif
+
+#ifdef __USER_LABEL_PREFIX__
+# define ASMNAME2(prefix, name)        prefix ## name
+# define ASMNAME1(prefix, name)        ASMNAME2(prefix, name)
+# define ASMNAME(name)         ASMNAME1(__USER_LABEL_PREFIX__, name)
 #else
-# define ELFFN(fn)
+# define ASMNAME(name)         name
 #endif
 
-#define FUNC_START(fn) \
-       .global fn;     \
-       ELFFN (fn);     \
-fn:
+#define FUNC_BEGIN(fn)         \
+       .globl ASMNAME(fn);     \
+       FN_TYPE (ASMNAME(fn));  \
+ASMNAME(fn):
 
-#define HIDDEN_FUNC(fn)\
-       FUNC_START (fn) \
-       .hidden fn;     \
+#define HIDDEN_FUNC(fn)                \
+       .globl ASMNAME(fn);     \
+       FN_TYPE(ASMNAME(fn));   \
+       FN_HIDDEN(ASMNAME(fn)); \
+ASMNAME(fn):
 
-#define FUNC_END(fn) .size fn,.-fn
+#define FUNC_END(fn) FN_SIZE(ASMNAME(fn))
 
 #ifdef __SSE2__
 # ifdef __AVX__
@@ -51,32 +74,30 @@ fn:
 # endif
 
 /* Save SSE registers 6-15. off is the offset of rax to get to xmm6.  */
-.macro SSE_SAVE off=0
-       MOVAPS %xmm15,(\off - 0x90)(%rax)
-       MOVAPS %xmm14,(\off - 0x80)(%rax)
-       MOVAPS %xmm13,(\off - 0x70)(%rax)
-       MOVAPS %xmm12,(\off - 0x60)(%rax)
-       MOVAPS %xmm11,(\off - 0x50)(%rax)
-       MOVAPS %xmm10,(\off - 0x40)(%rax)
-       MOVAPS %xmm9, (\off - 0x30)(%rax)
-       MOVAPS %xmm8, (\off - 0x20)(%rax)
-       MOVAPS %xmm7, (\off - 0x10)(%rax)
-       MOVAPS %xmm6, \off(%rax)
-.endm
+#define SSE_SAVE                  \
+       MOVAPS %xmm15,-0x30(%rax); \
+       MOVAPS %xmm14,-0x20(%rax); \
+       MOVAPS %xmm13,-0x10(%rax); \
+       MOVAPS %xmm12,     (%rax); \
+       MOVAPS %xmm11, 0x10(%rax); \
+       MOVAPS %xmm10, 0x20(%rax); \
+       MOVAPS %xmm9,  0x30(%rax); \
+       MOVAPS %xmm8,  0x40(%rax); \
+       MOVAPS %xmm7,  0x50(%rax); \
+       MOVAPS %xmm6,  0x60(%rax)
 
 /* Restore SSE registers 6-15. off is the offset of rsi to get to xmm6.  */
-.macro SSE_RESTORE off=0
-       MOVAPS (\off - 0x90)(%rsi), %xmm15
-       MOVAPS (\off - 0x80)(%rsi), %xmm14
-       MOVAPS (\off - 0x70)(%rsi), %xmm13
-       MOVAPS (\off - 0x60)(%rsi), %xmm12
-       MOVAPS (\off - 0x50)(%rsi), %xmm11
-       MOVAPS (\off - 0x40)(%rsi), %xmm10
-       MOVAPS (\off - 0x30)(%rsi), %xmm9
-       MOVAPS (\off - 0x20)(%rsi), %xmm8
-       MOVAPS (\off - 0x10)(%rsi), %xmm7
-       MOVAPS \off(%rsi), %xmm6
-.endm
+#define SSE_RESTORE                \
+       MOVAPS -0x30(%rsi), %xmm15; \
+       MOVAPS -0x20(%rsi), %xmm14; \
+       MOVAPS -0x10(%rsi), %xmm13; \
+       MOVAPS      (%rsi), %xmm12; \
+       MOVAPS  0x10(%rsi), %xmm11; \
+       MOVAPS  0x20(%rsi), %xmm10; \
+       MOVAPS  0x30(%rsi), %xmm9 ; \
+       MOVAPS  0x40(%rsi), %xmm8 ; \
+       MOVAPS  0x50(%rsi), %xmm7 ; \
+       MOVAPS  0x60(%rsi), %xmm6
 
 #endif /* __SSE2__ */
 #endif /* I386_ASM_H */
index f47e2f066fb31b629e56e8faa714d68ea18faef9..f842c20a77ae670dd342ea4bec2b197e8cb11652 100644 (file)
@@ -43,7 +43,7 @@ HIDDEN_FUNC(__resms64_13)
        mov     -0x48(%rsi),%rbx
 HIDDEN_FUNC(__resms64_12)
        mov     -0x40(%rsi),%rdi
-       SSE_RESTORE off=0x60
+       SSE_RESTORE
        mov     -0x38(%rsi),%rsi
        ret
 FUNC_END(__resms64_12)
index 817da60cf1595adc22fce3c5ae9793f348acbbef..81946cda9449f67b064b2fbc3625fae30f14ac1f 100644 (file)
@@ -42,7 +42,7 @@ HIDDEN_FUNC(__resms64f_13)
        mov     -0x48(%rsi),%rbx
 HIDDEN_FUNC(__resms64f_12)
        mov     -0x40(%rsi),%rdi
-       SSE_RESTORE off=0x60
+       SSE_RESTORE
        mov     -0x38(%rsi),%rsi
        ret
 FUNC_END(__resms64f_12)
index 5dba5848dee0688399fa55b1ee1723313329d96d..acf34fa08371cfb6d2d7de48ccf0aa71d6c1555b 100644 (file)
@@ -43,7 +43,7 @@ HIDDEN_FUNC(__resms64fx_13)
        mov     -0x48(%rsi),%rbx
 HIDDEN_FUNC(__resms64fx_12)
        mov     -0x40(%rsi),%rdi
-       SSE_RESTORE off=0x60
+       SSE_RESTORE
        mov     -0x38(%rsi),%rsi
        leaveq
        ret
index 7770447cf382423db1bc3ca921e529cb01468e09..e27aab7d88182add1dd09a523a013c138398ee50 100644 (file)
@@ -44,7 +44,7 @@ HIDDEN_FUNC(__resms64x_13)
        mov     -0x48(%rsi),%rbx
 HIDDEN_FUNC(__resms64x_12)
        mov     -0x40(%rsi),%rdi
-       SSE_RESTORE off=0x60
+       SSE_RESTORE
        mov     -0x38(%rsi),%rsi
        mov     %r10,%rsp
        ret
index 2067dd8614f36941fbaa908393661c0c56479a82..44dda46ec5475c74a4e404d05e95882d8b42b67c 100644 (file)
@@ -44,7 +44,7 @@ HIDDEN_FUNC(__savms64_13)
 HIDDEN_FUNC(__savms64_12)
        mov     %rdi,-0x40(%rax)
        mov     %rsi,-0x38(%rax)
-       SSE_SAVE off=0x60
+       SSE_SAVE
        ret
 FUNC_END(__savms64_12)
 FUNC_END(__savms64_13)
index 81583b6eb689862b134bee41be50a1d38dc9f9dc..64e91ac0394a4df5866f87b7cfe056425bd3ebca 100644 (file)
@@ -43,7 +43,7 @@ HIDDEN_FUNC(__savms64f_13)
 HIDDEN_FUNC(__savms64f_12)
        mov     %rdi,-0x40(%rax)
        mov     %rsi,-0x38(%rax)
-       SSE_SAVE off=0x60
+       SSE_SAVE
        ret
 FUNC_END(__savms64f_12)
 FUNC_END(__savms64f_13)
This page took 0.091526 seconds and 5 git commands to generate.