pro64-support
[Top] [All Lists]

Stack Frame allocation

To: "'pro64-support@xxxxxxxxxxx'" <pro64-support@xxxxxxxxxxx>
Subject: Stack Frame allocation
From: "Kakulavarapu, Prasad" <prasad.kakulavarapu@xxxxxxxxx>
Date: Mon, 25 Jun 2001 03:31:05 -0700
Sender: owner-pro64-support@xxxxxxxxxxx
Hello,

I am using sgicc to run an application with some hand-coded assembly
functions. SGIcc ver is 0.01.0-13, building the app on my Itanium system
running Linux kernel 2.4.1-010131-8.

Problem: segmentation Fault (Core dumped)
I use the alloc statement in the handcoded assembly to allocate a stack
frame;
     alloc      r36=ar.pfs,0,6,4,0
        
This alloc statement is from code generated by SGIcc at the start of a
function called with foo(void* a, void* b, void* c, void*d), which itself
calls another function with 3 args - foo2(void* a, int b, int c).

When run, there occurs a Seg fault at the alloc statement in the assembly
function. From the disassembly, this statement looks like this:
        alloc r36=ar.pfs,10,6,0

Question: Why does the disassembly have a different stack allocation pattern
than the source assembly. Secondly, any clues about the Seg fault at this
statement? (this is the first statement in the assembly for foo()

Apprecaite any help.

Thanks,
Prasad






<Prev in Thread] Current Thread [Next in Thread>