2009-04-02 00:51:16     assembly instruction usage

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2009-04-02 00:51:16     assembly instruction usage

svs k (INDIA)

Message: 71991   

 

Hi,

 

I have declared  an int  buffer of size 256 in a C file.

 

int buff[256] = {0x00000000,0x04c11db7,0x09823b6e,.....................,0x0d4326d9};

 

i have to access the buffer in asm file.I am using the instruction as mentioned below,

 

p3.l  = _buff;

p3.h = _buff;

 

the buffer is at address 0x5179f8.  But the p3 register holds only  0x179f8.  Can you please tell how to get the actual address in P3.

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2009-04-02 04:31:05     Re: assembly instruction usage

Mike Frysinger (UNITED STATES)

Message: 72025   

 

what toolchain are you using ?  what command exactly are you running ?

QuoteReplyEditDelete

 

 

2009-04-02 05:06:29     Re: assembly instruction usage

nive n (INDIA)

Message: 72028   

 

Hi,

 

I am using  2008r1.5-14 toolchain.

 

I am using the asm files in my application. Here compilation is success and an exe is generated for my application.

 

If I dump that exe using the command,

 

bfin-linux-uclibc-objdump  -ld MetaExtract >dump

 

i can see the address which is assigned to p3 register as

 

   107ec:       0b e1 f8 79     P3.L = 0x79f8;          /* (31224)      P3=0x79f8 */

   107f0:       4b e1 01 00     P3.H = 0x1;             /* (  1)        P3=0x179f8 <_buff> */

 

I have also checked the address of buff by printing its addr in the console. It says 0x5179f8.

 

 

 

Thanks & Regards,

 

Nive

 

 

QuoteReplyEditDelete

 

 

2009-04-02 05:15:38     Re: assembly instruction usage

Mike Frysinger (UNITED STATES)

Message: 72030   

 

please read the documentation:

docs.blackfin.uclinux.org/doku.php?id=simple_hello_world_application_example_asm#assembly_code_fdpic_elf_1

QuoteReplyEditDelete

 

 

2009-04-02 06:18:50     Re: assembly instruction usage

svs k (INDIA)

Message: 72035   

 

Thanks Mike. I was able to access the buffer correctly.

QuoteReplyEditDelete

Attachments

    Outcomes