Issue with allocating stack space to local variables (frame pointer)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

We are trying to port gnu gcc for our custom processor. But it is giving problem for allocating stack to local (auto) variables.
for example:
    I declared  local variable in  following order.
                    int a, b, c;
                    char d;
                    short e, f, g;
                     char  h;
while allocating stack to these local variable it is leaving space which is equal to the size of that data type.
In above case before allocation of stack to
                   a, b, c it is leaving 4 bytes space in stack
                    d it is leaving 1byte of space in stack
                   e, f, g it is leaving 2 bytes of space in stack
h it is leaving 1 byte of space in stack (or overlapping with g)
Note:
According to our architecture integer is 32 bit size. all parameters, arguments, stack boundary are 32 bit aligned.

I have tried to adjust by defining "STARTING_FRAME_OFFSET" macro.But I am unable to get required results.
Could you please help me in this regard.

Thanks,
Siva Prasad


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux