.ltorg and relative address issues

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

.ltorg and relative address issues

832件の閲覧回数
alexeypelykh
Contributor I

Here's part of source file:

...

.ltorg

...

    ldr        r3,=0x7FFFFFF

    ldr        r3,=0x8000001

    ldr        r3,=0x8000000

    ldr        r5,=0x8000000

    ldr        r5,=0x8000001

...

Compiled version looks like:

0x00002e34:    ldr r3,[pc,#0x250]

0x00002e38:    ldr r3,[pc,#0x250]

0x00002e3c:    ldr r3,0x00003514 (0x3514)
0x00002e40:    ldr r5,0x0000351C (0x351c)

0x00002e44:    ldr r5,[pc,#0x244]


As you can see, mwasmarm produces incorrect instructions. This issue is connected with ltorg for sure, since if to move these instuctions around, this issue fixes by itself. Probably this is issue in mwasmarm itself, since in this situation seems that it behaves itself too smart. Has anyone experienced similar issue?

 

ラベル(1)
0 件の賞賛
返信
0 返答(返信)