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.
Thanks,
Xuedong Yang
Solved! Go to Solution.
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?
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?
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?
Thank you very much for your guidance!
I consulted with VSPA assembly code expert and here’s 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.