Port-sparc64 archive

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

re: CC64FSZ



Palle Lyckegaard writes:
> Hello fellow SPARC friends.
>
> Looking at the comments in sys/arch/sparc/include/frame.h it seem to be 
> incorrect:
> ...
> /*
>   * CC64FSZ (C Compiler 64-bit Frame SiZe) is the size of a stack frame 
> used
>   * by the compiler in 64-bit mode.  It is (16)*8; space for 8 ins, 8 outs.
>   */
> #define CC64FSZ		176
> ...
>
>
> But 16 * 8 = 128.
>
> Can anyone share some knowledge on why CF64FSZ is 176 bytes and not 128 
> bytes as the comment says?

my memory tells me it was to store other registers and you
can find them in locore.s it seems.  176-128 is 48, which is
6x 8 byte registers, and look here:

   2485 Ldatafault_internal:
...
   2499         stx     %g1, [%sp + CC64FSZ + STKB + TF_G + (1*8)]      ! save g1
...
   2513         sth     %o1, [%sp + CC64FSZ + STKB + TF_TT]
   2514         stx     %g1, [%sp + CC64FSZ + STKB + TF_TSTATE]         ! set tf.tf_psr, tf.tf_pc
   2515         stx     %g2, [%sp + CC64FSZ + STKB + TF_PC]             ! set tf.tf_npc
   2516         stx     %g3, [%sp + CC64FSZ + STKB + TF_NPC]
...
   2519         stb     %g4, [%sp + CC64FSZ + STKB + TF_PIL]
   2520         stb     %g4, [%sp + CC64FSZ + STKB + TF_OLDPIL]


i'm pretty sure this is the answer.  hopefully someone else
will correct me if i'm missing this one :)


.mrg.


Home | Main Index | Thread Index | Old Index