From mint-bounce@lists.fishpool.fi Wed Dec 9 12:10:15 2009 Message-ID: <4B1FD990.2070000@freesbee.fr> Date: Wed, 09 Dec 2009 18:08:32 +0100 From: =?UTF-8?B?VmluY2VudCBSaXZpw6hyZQ==?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mint Subject: Re: [MiNT] XaAES sources for FreeMiNT 1.16.3 References: <11a6f2b10911270646s6ceab50i915d71aeb27f6be9@mail.gmail.com> <11a6f2b10911281336q6ad74b7au657ac40469b28d8@mail.gmail.com> <11a6f2b10912081349x51b88c71p278c085ff9b77f2e@mail.gmail.com> <11a6f2b10912082333g5ede94a6t862ff00a111c970a@mail.gmail.com> <4B1FA77C.4090605@freesbee.fr> <4B1FB009.60609@freesbee.fr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed X-Antivirus: avast! (VPS 091209-0, 09/12/2009), Outbound message X-Antivirus-Status: Clean X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id nB9HAEVe030534 Andreas Schwab wrote: > unsigned int rotate (unsigned int a, int n) > { > return (a << n) | (a >> (sizeof (a) * 8 - n)); > } Correct ! $ m68k-atari-mint-gcc -S a.c -o - -O2 -fomit-frame-pointer #NO_APP .text .even .globl _rotate _rotate: move.l 4(%sp),%d0 move.l 8(%sp),%d1 rol.l %d1,%d0 rts $ m68k-atari-mint-gcc -S a.c -o - -O2 -fomit-frame-pointer -mshort #NO_APP .text .even .globl _rotate _rotate: move.w 4(%sp),%d0 move.w 6(%sp),%d1 rol.w %d1,%d0 rts And the function is even inlined when it is used in the same source. How wrong I was when saying this was a suboptimal case ! -- Vincent Rivière