[A89] Re: more questions (return value)
[Prev][Next][Index][Thread]
[A89] Re: more questions (return value)
At 20:35 -0700 22/8/02, Joel Thompson wrote:
> /* Support for RETURN_VALUE */
> move.l (%sp)+,%a0
> cmpi.w #0x21EE,(%a0)
> bne.s __A2
> addq.l #2,%a0
>__A2:
> jmp (%a0,4)
>
>OK, this is a VERY, VERY, VERY, VERY dirty hack in the
>TIGCC lib code. OK, the move.l (%sp)+,%a0 pops the
>return address off the stack. Then, it compares it
>with 0x21EE. If it is, then it adds 6 bytes to the
>return address, otherwise it just adds 4 and jumps to
>the address. What it does is is bypass the AMS code to
>restore the estack to its value before running the program.
thanks for the info, it was a really good answer. BTW, why 0x21EE?,
is there any reason for this?
regards,
ra.-
Follow-Ups:
References: