public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Problem in hfa_element_mode for IA64
@ 2002-03-31 15:49 Richard Kenner
  2002-03-31 16:06 ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Kenner @ 2002-03-31 15:49 UTC (permalink / raw)
  To: rth; +Cc: gcc

    > But Arr1 is SImode since layout_type sets its mode to an integer mode.

    This seems weird.

Why?  We do it for records.

Suppose we have an array of two chars with alignment of two bytes.  Shouldn't
it be HImode?

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

* Re: Problem in hfa_element_mode for IA64
  2002-03-31 15:49 Problem in hfa_element_mode for IA64 Richard Kenner
@ 2002-03-31 16:06 ` Florian Weimer
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2002-03-31 16:06 UTC (permalink / raw)
  To: Richard Kenner; +Cc: rth, gcc

kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

>     > But Arr1 is SImode since layout_type sets its mode to an integer mode.
>
>     This seems weird.
>
> Why?  We do it for records.
>
> Suppose we have an array of two chars with alignment of two bytes.  Shouldn't
> it be HImode?

Wouldn't this mean that two consecutive writes to both characters are
combined into a single halfword write?

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

* Re: Problem in hfa_element_mode for IA64
@ 2002-03-31 18:58 Richard Kenner
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Kenner @ 2002-03-31 18:58 UTC (permalink / raw)
  To: fw; +Cc: gcc

    > Suppose we have an array of two chars with alignment of two bytes.
    > Shouldn't it be HImode?

    Wouldn't this mean that two consecutive writes to both characters are
    combined into a single halfword write?

I suppose it's related to that, but the major effect is that the array, as a
whole, could live in a register.

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

* Re: Problem in hfa_element_mode for IA64
  2002-03-31 14:13 Richard Kenner
@ 2002-03-31 14:52 ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2002-03-31 14:52 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc

On Sun, Mar 31, 2002 at 03:11:37PM -0500, Richard Kenner wrote:
> But Arr1 is SImode since layout_type sets its mode to an integer mode.

This seems weird.


r~

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

* Problem in hfa_element_mode for IA64
@ 2002-03-31 14:13 Richard Kenner
  2002-03-31 14:52 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Kenner @ 2002-03-31 14:13 UTC (permalink / raw)
  To: gcc

Consider the following tiny Ada program (this can't be reproduced in C
since we don't have arguments of ARRAY_TYPE):

procedure Tbg0331 is
   type Arr1 is array (1..1) of Float;
   procedure Foo (X: Arr1);
   pragma Import (Ada, Foo);
   X: Arr1;
begin
   Foo (X);
end Tbg0331;

This blows up because hfa_element_mdoe when applied to type Arr1 says
it's SFmode since it's an array of SFmode.

But Arr1 is SImode since layout_type sets its mode to an integer mode.

So we try to call emit_move_insn with SFmode output and SImode input
and that aborts.

Who's wrong here?

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

end of thread, other threads:[~2002-03-31 22:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-31 15:49 Problem in hfa_element_mode for IA64 Richard Kenner
2002-03-31 16:06 ` Florian Weimer
  -- strict thread matches above, loose matches on Subject: below --
2002-03-31 18:58 Richard Kenner
2002-03-31 14:13 Richard Kenner
2002-03-31 14:52 ` Richard Henderson

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