ASM macro gives unrelocatable expression error - VxWorks

This is a discussion on ASM macro gives unrelocatable expression error - VxWorks ; The VxWorks Diab PPC compiler does not seem to understand the following assembler macro .macro stvx vs,ra,rb .long (31 .endm which is referenced in the code as: stvx 0,0,3 I got the following error: Macro stvx, line 1 Defined in ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ASM macro gives unrelocatable expression error

  1. ASM macro gives unrelocatable expression error

    The VxWorks Diab PPC compiler does not seem to understand the following
    assembler macro

    .macro stvx vs,ra,rb
    .long (31<<26)+(\\vs<<21)+(\\ra<<16)+(\\rb<<11)+231*2
    .endm

    which is referenced in the code as:

    stvx 0,0,3

    I got the following error:

    Macro stvx, line 1 Defined in "/var/tmp/dtmpBAAa10847": invoked at
    "/var/tmp/dtmpBAAa10847", line 11595: error: unrelocatable
    expression


    Any thoughts would be appreciated.
    ~~~~


  2. Re: ASM macro gives unrelocatable expression error

    I solved this by changing the macro definition from GNU form:

    .macro lvx vd,ra,rb

    to Diab form: lvx: .macro vd,ra,rb

    and the problem went away and now I get to compile in VxWorks Diab.


+ Reply to Thread