This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Non-representable subregs of subword pseudoregs


Eric Botcazou wrote:

>For example on SPARC64:
(I assume this has word_mode == DImode?)

>(insn 22 21 23 1 (set (reg:SI 109 [ D.1130 ])
>        (subreg:SI (reg:DI 126) 0)) 51 {*movsi_insn} (nil)
>    (nil))

While there's unfortunately some amount of confusion as to which
subregs are valid, exactly, I think it should be pretty clear
that *this* subreg is certainly *not* valid.

As per the documentation, subregs can be used to denote either
- a value re-interpreted in another mode (this always means lowpart)
or
- one of the words of a multi-word value (i.e. > word_mode)
or
- a combination of the two (a lowpart of one word of a multi-word)

Since (reg:DI 126) is a single-word value, and the subreg does
not denote the lowpart, it should be invalid.


>Is it simply illegal to create non-lowpart 
>subregs of subword pseudo regs?

I think so, yes.


Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]