From mint-bounce@lists.fishpool.fi Mon Feb 1 17:33:48 2010 X-SourceIP: 77.249.76.7 Message-ID: <4B6755EF.20502@chello.nl> Date: Mon, 01 Feb 2010 23:30:07 +0100 From: Henk Robbers User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] how to compile stik/sting stuff with gcc4 References: <4B6607C7.6090309@freesbee.fr> <4B66183F.6060302@chello.nl> <4B674BBE.8040809@chello.nl> <4B674E4E.4050601@freesbee.fr> In-Reply-To: <4B674E4E.4050601@freesbee.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: h.robbers@chello.nl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Vincent Rivière wrote: > Henk Robbers wrote: > >> How does GCC behave? > > > GCC never pushes bytes on the stack. > char and shorts are extended to int before being pushed. > > So if a function takes a char as first argument, in the callee it is > located at 7(sp) by default (32-bit ints), or 5(sp) with -mshort (16-bit > ints). > Thanks. In that case I will not change AHCC in this respect. Note that AHCC and Pure C put the first 3 integral arguments in data registers. -- Groeten; Regards. Henk Robbers. http://members.chello.nl/h.robbers Interactive disassembler: TT-Digger; http://digger.atari.org A Home Cooked C compiler: AHCC; http://ahcc.atari.org