aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-26 19:46:34 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-26 19:46:34 +0000
commit9e8a86cf47fff89ae381ea3564f822de61826562 (patch)
treec4946ab031d9b0b044d5fbc4279f972ec92e7cfb /libgcc
parent372c2d93cda53104c31d4dde724c505965840554 (diff)
PR debug/83917
* config/i386/i386-asm.h (PACKAGE_VERSION, PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, PACKAGE_URL): Undefine between inclusion of auto-target.h and auto-host.h. (USE_GAS_CFI_DIRECTIVES): Define if not defined already based on __GCC_HAVE_DWARF2_CFI_ASM. (cfi_startproc, cfi_endproc, cfi_adjust_cfa_offset, cfi_def_cfa_register, cfi_def_cfa, cfi_register, cfi_offset, cfi_push, cfi_pop): Define. * config/i386/cygwin.S: Don't include auto-host.h here, just define USE_GAS_CFI_DIRECTIVES to 1 or 0 and include i386-asm.h. (cfi_startproc, cfi_endproc, cfi_adjust_cfa_offset, cfi_def_cfa_register, cfi_register, cfi_push, cfi_pop): Remove. * config/i386/resms64fx.h: Add cfi_* directives. * config/i386/resms64x.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog18
-rw-r--r--libgcc/config/i386/cygwin.S26
-rw-r--r--libgcc/config/i386/i386-asm.h39
-rw-r--r--libgcc/config/i386/resms64fx.h5
-rw-r--r--libgcc/config/i386/resms64x.h4
5 files changed, 70 insertions, 22 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 0e9e7759f62..d29f2f495e0 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,21 @@
+2018-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/83917
+ * config/i386/i386-asm.h (PACKAGE_VERSION, PACKAGE_NAME,
+ PACKAGE_STRING, PACKAGE_TARNAME, PACKAGE_URL): Undefine between
+ inclusion of auto-target.h and auto-host.h.
+ (USE_GAS_CFI_DIRECTIVES): Define if not defined already based on
+ __GCC_HAVE_DWARF2_CFI_ASM.
+ (cfi_startproc, cfi_endproc, cfi_adjust_cfa_offset,
+ cfi_def_cfa_register, cfi_def_cfa, cfi_register, cfi_offset, cfi_push,
+ cfi_pop): Define.
+ * config/i386/cygwin.S: Don't include auto-host.h here, just
+ define USE_GAS_CFI_DIRECTIVES to 1 or 0 and include i386-asm.h.
+ (cfi_startproc, cfi_endproc, cfi_adjust_cfa_offset,
+ cfi_def_cfa_register, cfi_register, cfi_push, cfi_pop): Remove.
+ * config/i386/resms64fx.h: Add cfi_* directives.
+ * config/i386/resms64x.h: Likewise.
+
2018-02-20 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/ieee754-df.S (__adddf3_aux): Add
diff --git a/libgcc/config/i386/cygwin.S b/libgcc/config/i386/cygwin.S
index 449b7d7b52e..f856be3e88a 100644
--- a/libgcc/config/i386/cygwin.S
+++ b/libgcc/config/i386/cygwin.S
@@ -23,31 +23,13 @@
* <http://www.gnu.org/licenses/>.
*/
-#include "auto-host.h"
-
#ifdef HAVE_GAS_CFI_SECTIONS_DIRECTIVE
+# define USE_GAS_CFI_DIRECTIVES 1
.cfi_sections .debug_frame
-# define cfi_startproc() .cfi_startproc
-# define cfi_endproc() .cfi_endproc
-# define cfi_adjust_cfa_offset(X) .cfi_adjust_cfa_offset X
-# define cfi_def_cfa_register(X) .cfi_def_cfa_register X
-# define cfi_register(D,S) .cfi_register D, S
-# ifdef __x86_64__
-# define cfi_push(X) .cfi_adjust_cfa_offset 8; .cfi_rel_offset X, 0
-# define cfi_pop(X) .cfi_adjust_cfa_offset -8; .cfi_restore X
-# else
-# define cfi_push(X) .cfi_adjust_cfa_offset 4; .cfi_rel_offset X, 0
-# define cfi_pop(X) .cfi_adjust_cfa_offset -4; .cfi_restore X
-# endif
#else
-# define cfi_startproc()
-# define cfi_endproc()
-# define cfi_adjust_cfa_offset(X)
-# define cfi_def_cfa_register(X)
-# define cfi_register(D,S)
-# define cfi_push(X)
-# define cfi_pop(X)
-#endif /* HAVE_GAS_CFI_SECTIONS_DIRECTIVE */
+# define USE_GAS_CFI_DIRECTIVES 0
+#endif
+#include "i386-asm.h"
#ifdef L_chkstk
/* Function prologue calls __chkstk to probe the stack when allocating more
diff --git a/libgcc/config/i386/i386-asm.h b/libgcc/config/i386/i386-asm.h
index 267133a9b75..dbf99564b0c 100644
--- a/libgcc/config/i386/i386-asm.h
+++ b/libgcc/config/i386/i386-asm.h
@@ -27,8 +27,47 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define I386_ASM_H
#include "auto-target.h"
+#undef PACKAGE_VERSION
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_URL
#include "auto-host.h"
+#ifndef USE_GAS_CFI_DIRECTIVES
+# ifdef __GCC_HAVE_DWARF2_CFI_ASM
+# define USE_GAS_CFI_DIRECTIVES 1
+# else
+# define USE_GAS_CFI_DIRECTIVES 0
+# endif
+#endif
+#if USE_GAS_CFI_DIRECTIVES
+# define cfi_startproc() .cfi_startproc
+# define cfi_endproc() .cfi_endproc
+# define cfi_adjust_cfa_offset(X) .cfi_adjust_cfa_offset X
+# define cfi_def_cfa_register(X) .cfi_def_cfa_register X
+# define cfi_def_cfa(R,O) .cfi_def_cfa R, O
+# define cfi_register(D,S) .cfi_register D, S
+# define cfi_offset(R,O) .cfi_offset R, O
+# ifdef __x86_64__
+# define cfi_push(X) .cfi_adjust_cfa_offset 8; .cfi_rel_offset X, 0
+# define cfi_pop(X) .cfi_adjust_cfa_offset -8; .cfi_restore X
+# else
+# define cfi_push(X) .cfi_adjust_cfa_offset 4; .cfi_rel_offset X, 0
+# define cfi_pop(X) .cfi_adjust_cfa_offset -4; .cfi_restore X
+# endif
+#else
+# define cfi_startproc()
+# define cfi_endproc()
+# define cfi_adjust_cfa_offset(X)
+# define cfi_def_cfa_register(X)
+# define cfi_def_cfa(R,O)
+# define cfi_register(D,S)
+# define cfi_offset(R,O)
+# define cfi_push(X)
+# define cfi_pop(X)
+#endif
+
#define PASTE2(a, b) PASTE2a(a, b)
#define PASTE2a(a, b) a ## b
diff --git a/libgcc/config/i386/resms64fx.h b/libgcc/config/i386/resms64fx.h
index c5f63d879fe..88d36f39ac8 100644
--- a/libgcc/config/i386/resms64fx.h
+++ b/libgcc/config/i386/resms64fx.h
@@ -33,6 +33,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
* from the function. */
.text
+ cfi_startproc()
+ cfi_offset(%rbp, -16)
+ cfi_def_cfa(%rbp, 16)
MS2SYSV_STUB_BEGIN(resms64fx_17)
mov -0x68(%rsi),%r15
MS2SYSV_STUB_BEGIN(resms64fx_16)
@@ -48,7 +51,9 @@ MS2SYSV_STUB_BEGIN(resms64fx_12)
SSE_RESTORE
mov -0x38(%rsi),%rsi
leaveq
+ cfi_def_cfa(%rsp, 8)
ret
+ cfi_endproc()
MS2SYSV_STUB_END(resms64fx_12)
MS2SYSV_STUB_END(resms64fx_13)
MS2SYSV_STUB_END(resms64fx_14)
diff --git a/libgcc/config/i386/resms64x.h b/libgcc/config/i386/resms64x.h
index 1b44938ae7c..cf6830f3fd7 100644
--- a/libgcc/config/i386/resms64x.h
+++ b/libgcc/config/i386/resms64x.h
@@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
* function. */
.text
+ cfi_startproc()
+ cfi_def_cfa(%r10, 8)
MS2SYSV_STUB_BEGIN(resms64x_18)
mov -0x70(%rsi),%r15
MS2SYSV_STUB_BEGIN(resms64x_17)
@@ -49,7 +51,9 @@ MS2SYSV_STUB_BEGIN(resms64x_12)
SSE_RESTORE
mov -0x38(%rsi),%rsi
mov %r10,%rsp
+ cfi_def_cfa_register(%rsp)
ret
+ cfi_endproc()
MS2SYSV_STUB_END(resms64x_12)
MS2SYSV_STUB_END(resms64x_13)
MS2SYSV_STUB_END(resms64x_14)