From: Alan Modra <amodra@gmail.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 1/6] PowerPC64, fix calls to _mcount
Date: Thu, 01 Jun 2017 13:08:00 -0000 [thread overview]
Message-ID: <20170601130823.GG8842@bubble.grove.modra.org> (raw)
In-Reply-To: <20170601130442.GF8842@bubble.grove.modra.org>
The macros used in assembly were broken on powerpc64 ELFv1.
* sysdeps/powerpc/powerpc64/sysdep.h: (call_mcount_parm_offset): Delete.
(SAVE_ARG, REST_ARG, CFI_SAVE_ARG): Correct.
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
index db7c1d7..409734a 100644
--- a/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/powerpc/powerpc64/sysdep.h
@@ -58,29 +58,24 @@
#endif
/* Support macros for CALL_MCOUNT. */
-#if _CALL_ELF == 2
-#define call_mcount_parm_offset (-64)
-#else
-#define call_mcount_parm_offset FRAME_PARM_SAVE
-#endif
.macro SAVE_ARG NARG
.if \NARG
SAVE_ARG \NARG-1
- std 2+\NARG,call_mcount_parm_offset-8+8*(\NARG)(1)
+ std 2+\NARG,-FRAME_MIN_SIZE_PARM+FRAME_PARM_SAVE-8+8*(\NARG)(1)
.endif
.endm
.macro REST_ARG NARG
.if \NARG
REST_ARG \NARG-1
- ld 2+\NARG,FRAME_MIN_SIZE_PARM+call_mcount_parm_offset-8+8*(\NARG)(1)
+ ld 2+\NARG,FRAME_PARM_SAVE-8+8*(\NARG)(1)
.endif
.endm
.macro CFI_SAVE_ARG NARG
.if \NARG
CFI_SAVE_ARG \NARG-1
- cfi_offset(2+\NARG,call_mcount_parm_offset-8+8*(\NARG))
+ cfi_offset(2+\NARG,-FRAME_MIN_SIZE_PARM+FRAME_PARM_SAVE-8+8*(\NARG))
.endif
.endm
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2017-06-01 13:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
2017-06-01 13:08 ` Alan Modra [this message]
2017-06-12 18:07 ` [PATCH 1/6] PowerPC64, fix calls to _mcount Tulio Magno Quites Machado Filho
2017-06-01 13:09 ` [PATCH 3/6] PowerPC64 sysdep.h tidy Alan Modra
2017-06-12 18:12 ` Tulio Magno Quites Machado Filho
2017-06-13 1:27 ` Alan Modra
2017-06-13 17:05 ` Tulio Magno Quites Machado Filho
2017-06-01 13:09 ` [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE Alan Modra
2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
2017-06-01 13:10 ` [PATCH 4/6] strncpy, stpncpy and strstr fixes Alan Modra
2017-06-12 19:55 ` Tulio Magno Quites Machado Filho
2017-06-01 13:11 ` [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
2017-06-03 4:46 ` Alan Modra
2017-06-13 18:21 ` Tulio Magno Quites Machado Filho
2017-06-14 8:53 ` Alan Modra
2017-06-01 13:11 ` [PATCH 5/6] PowerPC64 ENTRY_TOCLESS Alan Modra
2017-06-13 12:23 ` Tulio Magno Quites Machado Filho
2017-06-13 14:46 ` Alan Modra
2017-06-13 17:07 ` Tulio Magno Quites Machado Filho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170601130823.GG8842@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).