pro64-support
[Top] [All Lists]

RE: Stack Frame allocation

To: "Kakulavarapu, Prasad" <prasad.kakulavarapu@xxxxxxxxx>, "'pro64-support@xxxxxxxxxxx'" <pro64-support@xxxxxxxxxxx>, "Kakulavarapu, Prasad" <prasad.kakulavarapu@xxxxxxxxx>
Subject: RE: Stack Frame allocation
From: lesniak@xxxxxxxxxxxxxxxxxxxxx (Ken Lesniak)
Date: Mon, 25 Jun 2001 14:08:55 -0400 (EDT)
Reply-to: lesniak@xxxxxxxxxxxxxxxxxxxxx
Sender: owner-pro64-support@xxxxxxxxxxx
>I checked that the assembler does not accept three parameters (instead of
>four) for the alloc statement. we still need the distinct i,l,o,r fields.
>
>But surprisingly, the size of the local frame (i+l) from the disassembler is
>10, while the assembler alloc statement specifies only 6. Also, I don;t
>understand the o field in the disassembler - 6, when I have just 4 o/p in
>the assembler. Compare the following:
>
>       Assembler:                              alloc   r36=ar.pfs,0,6,4,0
>       Disassembler:                   alloc r36=ar.pfs,10,6,0
>
>Thanks,
>Prasad

The assembler use this format:

        alloc   r1=ar.pfs,i,l,o,r

The actual machine instruction encodes 3 parameters for the frame
specification: sor, sol and sof. They are determined as follows:

        sof = i+l+o
        sol = i+l
        sor = r>>3

>From your source:

        sof = 0+6+4 = 10
        sol = 0+6 = 6
        sor = 0>>3 = 0

That matches what the disassembler is doing, so we have just derived
that it prints the machine instruction as:

        alloc   r1=ar.pfs,sof,sol,sor

All looks well to me.

Ken

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