[A89] Re: more questions (return value)


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

[A89] Re: more questions (return value)




   /* 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.

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



Follow-Ups: References: