public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: denisc@overta.ru To: gcc-gnats@gcc.gnu.org Cc: Richard Earnshaw <rearnsha@arm.com> Subject: c/3037: ARM port: Wrong flow info after reload Date: Sat, 02 Jun 2001 02:26:00 -0000 [thread overview] Message-ID: <200106020916.NAA05836@localhost.localdomain> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2940 bytes --] >Number: 3037 >Category: c >Synopsis: ARM port: Wrong flow info after reload >Confidential: no >Severity: critical >Priority: high >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Sat Jun 02 02:26:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Denis >Release: 3.0 20010525 (prerelease) >Organization: None >Environment: System: Linux localhost 2.3.2 #6 ðÃà ïÃà 13 20:07:05 MSD 2000 i586 unknown Architecture: i586 host: i586-pc-linux-gnu build: i586-pc-linux-gnu target: arm-elf-linux-gnu configured with: /root/d/cvs/gcc-3.0/configure --target=arm-elf-linux --with-newlib --enable-languages=c : (reconfigured) /root/d/cvs/gcc-3.0/configure --target=arm-elf-linux --with-newlib --enable-languages=c --without-threads : (reconfigured) /root/d/cvs/gcc-3.0/configure --target=arm-elf-linux --with-newlib --enable-languages=c --disable-threads : (reconfigured) /root/d/cvs/gcc-3.0/configure --target=arm-elf-linux --with-newlib --enable-languages=c --disable-threads --disable-shared >Description: As I understand the ARM port have a `(define_expand "epilogue" ...)' And this `define_expand' don't emit the moves on RTL level for restoring a call-saved registers. While `update_life_info' executed after reload the `mark_regs_live_at_end' mark all registers used by the epilogue as being live at the end of the function and don't unmark it because RTL version of epilogue havn't a moves. >How-To-Repeat: typedef struct { int e; double d[40]; } mp_no; typedef union { int i[2]; double d; } number; static const number radix = {{0x41700000, 0x00000000} }, zero = {{0x00000000, 0x00000000} }, one = {{0x3ff00000, 0x00000000} }, mone = {{0xbff00000, 0x00000000} }; void __dbl_mp(double x, mp_no *y, int p) { int i,n; double u; if (x == zero.d) return; else if (x > zero.d) y->d[0] = one.d; else { y->d[0] = mone.d; x=-x; } for ( ; x < one.d; y->e -= one.d) x *= radix.d; } >Fix: One of: 1. emit a RTL moves in epilogue; 2. remove `(define_expand "epilogue" ...)' (Why it's needed ?) 3. Fix flow.c:mark_regs_live_at_end Fragment from flow.c:mark_regs_live_at_end: /* Mark all global registers, and all registers used by the epilogue as being live at the end of the function since they may be referenced by our caller. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (global_regs[i] || EPILOGUE_USES (i)) SET_REGNO_REG_SET (set, i); if (HAVE_epilogue && reload_completed) /* ---- May be fixed here ? */ { /* Mark all call-saved registers that we actually used. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (regs_ever_live[i] && ! call_used_regs[i] && ! LOCAL_REGNO (i)) SET_REGNO_REG_SET (set, i); } >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2001-06-02 2:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200106020916.NAA05836@localhost.localdomain \ --to=denisc@overta.ru \ --cc=gcc-gnats@gcc.gnu.org \ --cc=rearnsha@arm.com \ /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).