Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Issues with compiler failures



On Mon, Apr 01, 2019 at 10:11:07AM -0400, Paul Koning wrote:
> 
> 
> > On Apr 1, 2019, at 6:06 AM, maya%netbsd.org@localhost wrote:
> > 
> > I accidentally came across the same failure while working on GCC.
> > It's saying "we are seeing a pseudo-register in post-reload".
> > 
> > It's possible that the PSW needs to be considered a hard register, but I
> > am not sure yet!
> 
> Not as PSW.  GCC does deal with condition codes, but they are implicit in the old (CC0) back end.  When you convert to CCmode, the condition code register is indeed a hard register.  That still isn't exactly PSW; there's more in PSW than just condition codes and those other bits aren't seen by GCC.
> 
> If you have an ISA with multiple condition code registers that would correspond to multiple GCC registers, probably hard registers, and they might not all have the same mode.  Consider pdp11, which has two: the condition bits in the PSW which GCC knows as a register of CCmode, and the similar bits in the FPU status which is a different register with a value in FCCmode.  VAX is easier with just one set of condition bits.
> 
> I've had some bugs like you're seeing; I'll try to remember what created them.
> 
> 	paul
> 

I tried to creduce the blake2b crash and got a second crash:
> cat blake2b.new.i
long long a;
b;
unsigned char c;
d() {
  long long e[6];
  a = b + e[c];
}

> ~/vax/tooldir.NetBSD-8.99.31-amd64/bin/vax--netbsdelf-gcc blake2b.new.i -O2
...
blake2b.new.i:7:1: internal compiler error: in reg_overlap_mentioned_for_reload_p, at reload.c:6591

That one doesn't even sound like something that a backend can trigger,
but a bug in reload somewhere.

I guess it's back to the original plan of switching away from reload?
:-)

I got the PSW idea because making the CCmode a hard register made things
stop violently crashing for me! (I saw in pdp11).

Skimming the VAX instructions, it looks like they can be set to 3
different categories:

clobbers N/Z/V/C
clobbers N/Z/V
no condition code change

wouldn't it make sense to have CCmode for NZVC and a second more for
just N/Z/V? Although I guess that it matters whether something ever
cares about just the carry flag!


Home | Main Index | Thread Index | Old Index