Skip to main content

IAR Embedded Workbench for RH850 3.20.x

The base-relative23 memory access method

In this section:

The base-relative23 (brel23) access method uses the same base pointers and placeholder segments as the normal base-relative access method, but can access 8 Mbytes of ROM and 8 Mbytes of RAM, respectively.

Examples

Address of:

        movhi       hi1(relgp(MyVar)),gp,r1
        movea       lw1(relgp(MyVar)),r1,r1

Reading a global variable:

        ld.bu       M:relgp(MyVar)[gp],r6

Reading a global array using an unknown index:

        add         gp,r1
        Reading.bu  M:relgp(MyArr)[r1],r7

Reading a structure using a pointer:

        ld.b        (4)[r6],r1