Forums - Global pointer and relative addressing

2 posts / 0 new
Last post
Global pointer and relative addressing
jzhang
Join Date: 26 Aug 14
Posts: 3
Posted: Wed, 2014-10-01 11:55

Hello, I tried to follow some example code given in the Hexagon_Doument_budle (Programmer's reference manual (V5/V55)), and got some run time errors. Could someone give me a help? Thanks Here is a description of the problem. According Section 2.3.8 Global pointer on page 45 and Section 5.8.4 Global pointer relative on page 87, I wrote the following assembly code.

.TEXT

.p2align 2

.globl myRE

myRE:

R7 =##0xd630

GP=R7

R6 =memw(GP+#200);

jumpr r31

when I tried to compile and run it, I got the following run time error message:

CRASH from thread 0!

I think the exception was: Error, cause: Misaligned @0xabde

 

 

  • Up0
  • Down0
jmay Moderator
Join Date: 11 Sep 13
Posts: 34
Posted: Wed, 2014-10-01 14:11

Qusetions:

- In what context are you running this, on target, on sim, in a dynamic module, in standalone, ....

- What do you expect to be at address 0xd630

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.