Is there a better way to define an array in VSPA3 assembly code?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a better way to define an array in VSPA3 assembly code?

Jump to solution
5,589 Views
xuedongyang
Contributor II

Hi, NXP experts,

I need to define a local array of size 64 in assembly code and initialize it to zero. Each element is 32-bit word. I tried to define it in the following way (see attached screen shot). It works.

But my question is: is there a better way to define the array (something like, csirs_after_cc[64]) in one line, rather than define it with 64 lines? 

BTW, do you have any document to explain the assembly syntax, like .global, .data, .text, etc. I have LA1224 instruction set manual, but it does not include assembly syntax information.

xuedongyang_0-1643994772310.png

Thanks,

Xuedong Yang

 

0 Kudos
Reply
1 Solution
5,532 Views
yipingwang
NXP TechSupport
NXP TechSupport

The VSPA ISM pretty much covers the VSPA assembly instructions or opcodes. I found some definition of .text and .data in the CodeWarrior Development Studio for VSPA3 Architecture Application Binary Interface (ABI) Reference Manual. This document is provided as a part of CW for VSPA installation. So if customer has access to CW for VSPA, they can go to the installation folder like C:\Freescale\CW_VSPA_v10.3.2\VSPA\Help\PDF and find the document at this location on the machine where CW for VSPA is installed.

 

For your reference, I have also attached the document here. Please let me know if this is what you are looking for?

View solution in original post

0 Kudos
Reply
4 Replies
5,541 Views
xuedongyang
Contributor II

Thank you for your reply.

By the way, do you have any document to explain the assembly syntax, like .global, .data, .text, etc. I have LA1224 instruction set manual, but it does not include assembly syntax information. I tried to search in NXP doc web site, but could not find any useful info about assembly syntax. If you have something, like assembly user's manual, would you please share it with me?

0 Kudos
Reply
5,533 Views
yipingwang
NXP TechSupport
NXP TechSupport

The VSPA ISM pretty much covers the VSPA assembly instructions or opcodes. I found some definition of .text and .data in the CodeWarrior Development Studio for VSPA3 Architecture Application Binary Interface (ABI) Reference Manual. This document is provided as a part of CW for VSPA installation. So if customer has access to CW for VSPA, they can go to the installation folder like C:\Freescale\CW_VSPA_v10.3.2\VSPA\Help\PDF and find the document at this location on the machine where CW for VSPA is installed.

 

For your reference, I have also attached the document here. Please let me know if this is what you are looking for?

0 Kudos
Reply
5,528 Views
xuedongyang
Contributor II

Thank you very much for your guidance!

0 Kudos
Reply
5,546 Views
yipingwang
NXP TechSupport
NXP TechSupport

I consulted with VSPA assembly code expert and heres the response from SME:

 

There is no concept of an array allocation in assembly. Memory management is done by the user. If you use the C compiler to generate VSPA assembly, then the compiler/linker takes care of memory management. You can use regular assembly functions and call them from C, and can just do memory management and function calling etc from C. Assembly code only understands pointers, it doesn't understand sizes of arrays and boundaries thereof. For initializing an array in assembly, what customer did is also correct.

 

Hope this helps.

0 Kudos
Reply