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

Re: [MiNT] Possible bug in cflib's font selector



Hello,

> I found some documentation here:
> http://toshyp.atari.org/00d00e.htm#Pure-C_20and_20_27cdecl_27
> It says that the API is "Pure C cdecl".
> Does this mean that the clobbered registers are d0/d1/a0/a1, like GCC
> ? 
> Do you agree, Henk ?
> 
> It this is right, d2 should not be present in the clobber lists, and
> a1 
> is missing. Even worse for xfsl_exit().
> 
> Am I right ?

for cdecl functions, list of clobbered registers depends on the compiler.

IIRC:
- for gcc, it is D0/D1/A0/A1.
- for purec, D2 should be added on this list (D0/D1/D2/A0/A1)
- for sozobonc, A2 is in the list too.

A "stdcall" layer has been added in LDG to allow branchement between code compiled by various compilers.

see the comment in the source code :
http://ldg.svn.sourceforge.net/viewvc/ldg/trunk/ldg/src/devel/stdcall.s?view=markup

Arnaud.