[gccsdk] Patching as/objasm to allow expressions with record

John Tytgat John.Tytgat at aaug.net
Mon Oct 5 17:35:27 PDT 2009

In message <1254752078.23233.29.camel at duiker>
          John-Mark Bell <jmb at netsurf-browser.org> wrote:

> On Mon, 2009-09-28 at 23:34 +0100, John Tytgat wrote:
> > In message <bc19e7a150.belles at ivy.at.home>
> >           Christopher Martin <belles at internode.on.net> wrote:
> > 
> > > There appears to have been a longstanding issue with the as/objasm
> > > assembler included in GCC 3 and 4 for RISC OS. In short, many
> > > expressions that included symbols defined in record layouts could not be
> > > evaluated.
> > 
> > Much appreciated, thanks.  I've applied your patch and a test case:
> > <URL:http://www.riscos.info/websvn/revision.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Friscos%2Fasasm%2F&rev=4144>.
> Hm. There's something wrong here.
> Firstly, tests_pass/record_basic.s fails.
> The reference data for LDR r5, #|lbl1| + |lbl2| should be LDR r5,#9
> Similarly for the preincrement in the subsequent test.

Indeed, I don't understand why I didn't see that.

> Secondly, tests_pass/register_based_map.s fails. All accesses to symbols
> defined in the map become PC-relative, which is completely incorrect.

Yes :-( And this one I failed as well to see.

Christopher, this means that your change is not correct.  I tried to
find if there isn't a better one but failed to see the obvious fix.  I've
reverted the r4144 change in storage.c in the meanwhile.

Thanks for this feedback,
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven

More information about the gcc mailing list