Preserve register %a2.

If we don't preserver the %a2 register through MacOS traps, the content
of "emile_l2_header_t* info" in second/main:start() is lost.

It seems gcc supposes this register is not modified whereas it is.

This has been detected on a powermac 7100. I don't know if this appears
because of the powermac ROM or of the gcc version (4.3.2).

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Laurent Vivier 2009-06-11 22:02:04 +02:00
parent 2d8317cb92
commit c1b482e48a

View File

@ -34,7 +34,7 @@
/*
* Inside Macintosh Volume I, I-94: Register Saving Conventions */
#define UNPRESERVED_REGS "%%a0", "%%a1", "%%d1", "%%d2", "%%sp", "memory"
#define UNPRESERVED_REGS "%%a0", "%%a1", "%%a2", "%%d1", "%%d2", "%%sp", "memory"
#define _Trap(a) #a
#define Trap(a) " dc.w "_Trap(a)" /* "#a" */\n"