public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amodra at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65810] powerpc64 libgfortran alignment issue? Date: Mon, 20 Apr 2015 05:24:00 -0000 [thread overview] Message-ID: <bug-65810-4-AXlRohVroo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65810-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65810 Alan Modra <amodra at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2015-04-20 Assignee|unassigned at gcc dot gnu.org |amodra at gmail dot com Ever confirmed|0 |1 --- Comment #4 from Alan Modra <amodra at gmail dot com> --- Here's the bad code 0x00000fffb7f6c438 <write_float+3736>: addis r9,r2,-2 0x00000fffb7f6c43c <write_float+3740>: li r27,0 0x00000fffb7f6c440 <write_float+3744>: lfd f24,32760(r9) 0x00000fffb7f6c444 <write_float+3748>: lfd f25,-32768(r9) It's from write_float.def:888 r *= 10; so is supposed to be loading up 10.0L but instead gets a completely bogus low double as seen in "d" below. __gcc_qmul (a=1, b=0, c=10, d=-7.3968712249802237e+209) So not something odd in libgfortran.. Hmm p/x $r2 $31 = 0xfffb7fa1bd8 So, gcc emits toc sections with alignment of 8 bytes, which the linker respects, leading to a toc pointer (r2) that can only be assumed to be 8 byte aligned. This completely breaks rs6000.c:offsettable_ok_by_alignment. My bug. Short term fix will be to limit offsettable_ok_by_alignment to 8 byte alignment. Longer term, modify the linker to increase r2 alignment.
next prev parent reply other threads:[~2015-04-20 5:24 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-20 0:10 [Bug target/65810] New: " amodra at gmail dot com 2015-04-20 1:43 ` [Bug target/65810] " jvdelisle at gcc dot gnu.org 2015-04-20 2:15 ` bergner at gcc dot gnu.org 2015-04-20 3:14 ` amodra at gmail dot com 2015-04-20 5:24 ` amodra at gmail dot com [this message] 2015-04-20 9:45 ` [Bug target/65810] powerpc64 alignment of r2 insufficient for loading long-double constants dominiq at lps dot ens.fr 2015-04-20 13:14 ` amodra at gmail dot com 2015-04-28 3:48 ` amodra at gcc dot gnu.org 2015-04-28 3:50 ` amodra at gmail dot com
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=bug-65810-4-AXlRohVroo@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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).