On Wednesday 24 January 2018,Philipp Klaus Krause <p...@spth.de> wrote:
> Am 23.01.2018 um 23:51 schrieb Richard Hodges:

> > The function readint() in peep.c complains because it gets the string
> > '[_ptr_rx]'.

> It's a bug. I'll fix it and add a few inline asm test cases.

Okay, thanks.

> In testing, the peephole optimizer mostly sees code generated by SDCC,
> so not everything gets tested well. In particular, SDCC doesn't use []
> adressing modes much (as they rarely provide an advantage).

Yes, this case favors using X as the index.

> >       000125 CE 00 34         [ 2]  269         ldw     x, _ptr_rx
> >       000128 76               [ 1]  270         rrc     (x)

Versus:

> >       000129 72 36 00 34      [ 4]  271         rrc     [_ptr_rx]

Thanks,
-Richard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to