public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Unaligned double
@ 2001-10-16 11:53 Mark Klein
  2001-10-16 12:39 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Klein @ 2001-10-16 11:53 UTC (permalink / raw)
  To: Joern Rennecke; +Cc: gcc, Richard Henderson

Joern Renneck wrote:

 > The way the insn number changes hints that this is probably done by
 > combine.

This was unoptimized code and I never saw combine_instructions called
in my test.

 > pa32-regs.h is rather odd in that it defines CLASS_CANNOT_CHANGE_MODE
 > as NO_REGS and then goes on to define CLASS_CANNOT_CHANGE_MODE_P to
 > reject size-changing mode changes. The latter is made ineffective by
 > the former.

I changed my pa32-regs.h such that CLASS_CANNOT_CHANGE_MODE is (FP_REGS)
as is done in pa64-regs.h and that resolves this issue. However, I'm not
sure what else it might break on PA 1.1 platforms as I can't test there.

Richard, it appears by the ChangeLog that you made the original changes
to pa32-regs.h and pa64-regs.h. Was there a specific reason that the
macro was NO_REGS in pa32 and FP_REGS in pa64?

Regards,


M.


--
Mark Klein                                    DIS International, Ltd.
http://www.dis.com                            415-892-8400
PGP Public Key Available
--

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Unaligned double
@ 2001-10-20  6:33 Mark Klein
  2001-10-22 16:23 ` Joern Rennecke
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Klein @ 2001-10-20  6:33 UTC (permalink / raw)
  To: law; +Cc: gcc

 >I'd start by looking to see if local, global or reload assigned %fr9R to
 >pseudo 96.  That will determine how to proceed.
 >jeff
 >

test.cc.19.lreg contains:

(insn 28 26 30 (set (subreg:SI (reg:DF 96) 1)
         (reg:SI 102)) 68 {*pa.md:2088} (nil)
     (expr_list:REG_DEAD (reg:SI 102)
         (nil)))

and test.cc.20.greg contains:


(insn 62 26 28 (set (reg:DF 42 %fr9)
         (reg:DF 40 %fr8 [96])) 111 {*pa.md:2917} (nil)
     (nil))

(insn 28 62 68 (set (reg:SI 21 %r21)
         (reg:SI 19 %r19 [102])) 68 {*pa.md:2088} (nil)
     (nil))

(insn 68 28 65 (set (reg:SI 43 %fr9R [42])
         (reg:SI 21 %r21)) 68 {*pa.md:2088} (nil)
     (nil))

So that should indicate global.

BTW - I took Joern Rennecke's suggestion about setting
CLASS_CANNOT_CHANGE_MODE to FP_REGS and the issue appears to be
resolved. But, I'm not sure if that breaks anything else because
I'm not sure why it was NO_REGS for pa32 and FP_REGS for pa64.

Regards,


M.


--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Unaligned double
@ 2001-10-15  9:39 Mark Klein
  2001-10-16  2:31 ` Joern Rennecke
  2001-10-19 10:50 ` law
  0 siblings, 2 replies; 8+ messages in thread
From: Mark Klein @ 2001-10-15  9:39 UTC (permalink / raw)
  To: law; +Cc: gcc

Hi.

The following used to work on 2.95.x and fails on 3.0.x for PA 1.0
semantics:

class ua_double
{
     double l;
public:
    ua_double &operator =(double l_) { l = l_; return *this; };
    operator double () { return l; };
}__attribute__((aligned(2), packed));

void addHoldFile(void);

void addHoldFile ()
{
    double dpAmount;
    struct
    {
       long lVal;
       ua_double dpAmount;
    } saRec;

    dpAmount = saRec.dpAmount;
}

...

(insn 28 26 30 (set (subreg:SI (reg:DF 96) 1)
         (reg:SI 102)) 68 {*pa.md:2088} (nil)
     (expr_list:REG_DEAD (reg:SI 102)
         (nil)))

which becomes:

(insn 68 28 65 (set (reg:SI 43 %fr9R [42])
         (reg:SI 21 %r21)) 68 {*pa.md:2088} (nil)
     (nil))

[snip]

test.cc: In member function `ua_double::operator double()':
test.cc:6: Insn does not satisfy its constraints:

(insn 68 28 30 (set (reg:SI 43 %fr9R [42])
         (reg:SI 21 %r21)) 68 {*pa.md:2088} (nil)
     (nil))
test.cc:6: Internal compiler error in extract_constrain_insn_cached, at recog.c
    :2133
Please submit a full bug report,

Note that I am using PA 1.0 as the architecture and %fr9R should not be
used. In fact:

regno: 43, not_usable: 1, used_by_other_reload: 0, mode: DF, mode_ok: 0

I can not figure out how or where %fr9R is getting emitted.

Any clues would be appreciated.

Regards,


M.
--
Mark Klein                                    DIS International, Ltd.
http://www.dis.com                            415-892-8400
PGP Public Key Available
--

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-10-22 16:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-16 11:53 Unaligned double Mark Klein
2001-10-16 12:39 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2001-10-20  6:33 Mark Klein
2001-10-22 16:23 ` Joern Rennecke
2001-10-15  9:39 Mark Klein
2001-10-16  2:31 ` Joern Rennecke
2001-10-16  4:28   ` Joern Rennecke
2001-10-19 10:50 ` law

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).