[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: Cannot find the bug
From:       Peter Kuschnerus <peter.kuschnerus () gmx ! de>
Date:       2010-08-01 15:09:54
Message-ID: loom.20100801T165449-114 () post ! gmane ! org
[Download RAW message or body]

Anders Magnusson <ragge <at> ludd.ltu.se> writes:

> 
> > #define BITOOR(x) (x)
> Hm, BITOOR should convert a bit address to a word address, so you probably
> want something to be done there.
In most arch exept m16c,pdp10,vax, is exactly this definition.
You do not mean, that they are all wrong ??
   
> Hm, I'm wondering what you are doing   Usually each register has
> a fixed number that is compiled-in.
> 
> Anyway, put in a printf last in reader.c:findaof() to see what aof[tnr]
> became set to.  That should not be 0.
> 
This printf was not successfull.
Was not run during dump.

I made a change im my code.
For rmames now I use an array of constants.
For my register-renaming I use an alternative array used during emitting.
The dump looks now this way:
        .text
        .global (test)
Entering pass2
PROLOG (0x809702c): test (local) regs 0xffffffff autos -1 mintemp 100 minlbl 12
DEFLAB (0x8097070): L12
DEFLAB (0x8097084): L14
NODE (0x80970bc):
0x80956b8) =, int, REG 0 , SU= 0(@REG,,,,,,)
    0x8095660) TEMP 100, int, REG 0 , SU= 0(@REG,,,,,,)
    0x8095248) ICON 1, int, REG 0 , SU= 0(@REG,,,,,,)
NODE (0x80970d8):
0x809568c) CALL, uchar, REG 0 , SU= 0(@REG,,,,,,)
    0x8095780) ICON func, PTR FTN uchar, REG 0 , SU= 0(@REG,,,,,,)
    0x809585c) =, PTR int, REG 0 , SU= 0(@REG,,,,,,)
        0x8095830) REG 0, PTR int, REG 0 , SU= 0(@REG,,,,,,)
        0x809546c) U&, PTR int, REG 0 , SU= 0(@REG,,,,,,)
            0x80957d8) TEMP 100, int, REG 0 , SU= 0(@REG,,,,,,)
DEFLAB (0x80970ec): L13
EPILOG (0x8097100): test (local) regs 0x0 autos 0 mintemp 102 minlbl 15
Efter ADDROF/TEMP
PROLOG (0x809702c): test (local) regs 0xffffffff autos -1 mintemp 100 minlbl 12
DEFLAB (0x8097070): L12
DEFLAB (0x8097084): L14
NODE (0x80970bc):
0x80956b8) =, int, REG 0 , SU= 0(@REG,,,,,,)
    0x8095660) TEMP 100, int, REG 0 , SU= 0(@REG,,,,,,)
    0x8095248) ICON 1, int, REG 0 , SU= 0(@REG,,,,,,)
NODE (0x80970d8):
0x809568c) CALL, uchar, REG 0 , SU= 0(@REG,,,,,,)
    0x8095780) ICON func, PTR FTN uchar, REG 0 , SU= 0(@REG,,,,,,)
    0x809585c) =, PTR int, REG 0 , SU= 0(@REG,,,,,,)
        0x8095830) REG 0, PTR int, REG 0 , SU= 0(@REG,,,,,,)
        0x809546c) U&, PTR int, REG 0 , SU= 0(@REG,,,,,,)
            0x80957d8) TEMP 100, int, REG 0 , SU= 0(@REG,,,,,,)
DEFLAB (0x80970ec): L13
EPILOG (0x8097100): test (local) regs 0x0 autos 0 mintemp 102 minlbl 15
<stdin>, line 7: compiler error: Cannot generate code, node 0x809546c op U&
0x809568c) CALL, uchar, REG 0 , SU= 0(@REG,,,,,,)
    0x8095780) ICON func, PTR FTN uchar, REG 0 , SU= 0(@REG,,,,,,)
    0x809585c) =, PTR int, REG 0 , SU= 0(@REG,,,,,,)
        0x8095830) REG 0, PTR int, REG 0 , SU= 0(@REG,,,,,,)
        0x809546c) U&, PTR int, REG 0 , SU= 0(@REG,,,,,,)
            0x80957d8) TEMP 100, int, REG 0 , SU= 0(@REG,,,,,,)

Best Regards
Peter Kuschnerus


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic