public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: Jim Wilson <wilson@cygnus.com> To: Toon Moene <toon@moene.indiv.nluug.nl> Cc: "Billinghurst, David (RTD)" <David.Billinghurst@riotinto.com.au>, "'egcs-bugs@egcs.cygnus.com'" <egcs-bugs@egcs.cygnus.com> Subject: Re: single precision complex bug in g77 - was Testing g77 with LAPACK 3.0 Date: Sat, 31 Jul 1999 23:33:00 -0000 [thread overview] Message-ID: <199907080032.RAA26170@rtl.cygnus.com> (raw) In-Reply-To: <3783B4A2.525A830B@moene.indiv.nluug.nl> Using current egcs development sources, it works if I compile with -O, and fails without. Without optimization, it is a calling convention problem. We try to pass a single precision complex to the function cabs1.0, which requires loading two SFmode values. We generate RTL to load them both into the same register and this code obviously doesn't work. (insn 26 24 28 (set (reg:SF 4 a0) (mem/f:SF (reg:SI 77) 0)) -1 (nil) (nil)) (insn 28 26 30 (set (reg:SF 4 a0) (mem/f:SF (plus:SI (reg:SI 77) (const_int 4 [0x4])) 0)) -1 (nil) (nil)) This has always been a problem with the complex support. There was some discussion last year about trying to fix this in the alpha port, but I don't know what came of that. The bad code comes from emit_move_insn_1 in the CONCAT case. It does => emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code) (gen_realpart (submode, x), gen_realpart (submode, y))); emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code) (gen_imagpart (submode, x), gen_imagpart (submode, y))); which emits two loads into the same register when x is a register big enough to hold the entire complex value. This code can work for registers only if the register is equal to or smaller than one half the size of the complex type. The single register was chosen by the mips FUNCTION_ARG macro. The problem can probably be fixed in either area. It isn't clear which is best. We need to make sure that we emit correct ABI compliant code for this case which may constrain the possible solutions. Jim
next prev parent reply other threads:[~1999-07-31 23:33 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 1999-07-07 5:31 Billinghurst, David (RTD) 1999-07-31 23:33 ` Toon Moene 1999-07-31 23:33 ` Jim Wilson [this message] 1999-07-08 13:55 ` Toon Moene 1999-07-31 23:33 ` Jim Wilson 1999-07-23 13:07 ` Toon Moene 1999-07-31 23:33 ` Jeffrey A Law 1999-07-31 23:33 ` craig 1999-07-09 9:24 ` Jeffrey A Law 1999-07-09 10:47 ` craig 1999-07-31 23:33 ` Jeffrey A Law 1999-07-31 23:33 ` craig 1999-07-09 11:21 ` Toon Moene 1999-07-13 18:58 Billinghurst, David (RTD) 1999-07-14 1:19 ` craig 1999-07-13 22:02 Jeffrey A Law 1999-07-13 23:13 Billinghurst, David (RTD) 1999-07-31 23:33 R. Kelley Cook 1999-07-31 23:33 ` Toon Moene 1999-07-31 23:33 ` Jeffrey A Law 1999-07-31 23:33 Billinghurst, David (RTD)
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=199907080032.RAA26170@rtl.cygnus.com \ --to=wilson@cygnus.com \ --cc=David.Billinghurst@riotinto.com.au \ --cc=egcs-bugs@egcs.cygnus.com \ --cc=toon@moene.indiv.nluug.nl \ /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).