We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am currently using ARMv8 DS-5 for development and am unable to find how to define and initialize the variable in arm asm. Specifically, I want to define the following constant variable in asm file:
const Word16 tbl[4][8] =
{
{ 0, 0, 0, 64, 0, 0, 0, 0},
{ -1, 4, -10, 58, 17, -5, 1, 0},
{ -1, 4, -11, 40, 40, -11, 4, -1},
{ 0, 1, -5, 17, 58, -10, 4, -1},
};
I am aware of defining it in gcc version of tools which is as follows:
.global tbl
tbl:
.HWORD 0, 0, 0, 64, 0, 0, 0, 0
.HWORD -1, 4, -10, 58, 17, -5, 1, 0
.HWORD -1, 4, -11, 40, 40, -11, 4, -1
.HWORD 0, 1, -5, 17, 58, -10, 4, -1
But do not know how it I can convert it into arm asm. Thanks in advance for the help.
Cross compiled the C-code and found the table being defined as:
AREA ||area_number.5||, DATA, READONLY, ALIGN=1
EXPORTAS ||area_number.5||, ||.constdata||
tbl
DCW 0x0000,0x0040
DCW 0x0000,0x0000
DCW 0xfffe,0x003a
DCW 0x000a,0xfffe
DCW 0xfffc,0x0036
DCW 0x0010,0xfffe
DCW 0xfffa,0x002e
DCW 0x001c,0xfffc
DCW 0xfffc,0x0024
DCW 0x0024,0xfffc
DCW 0xfffc,0x001c
DCW 0x002e,0xfffa
DCW 0xfffe,0x0010
DCW 0x0036,0xfffc
DCW 0xfffe,0x000a
DCW 0x003a,0xfffe
EXPORT tbl[DATA,SIZE=64]