bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Bitfields


From: Jim Segrave
Subject: Re: [Bug-gnubg] Bitfields
Date: Mon, 25 Nov 2002 13:23:25 +0100
User-agent: Mutt/1.4i

On Mon 25 Nov 2002 (12:30 +0100), W.Stroop wrote:
> 
> ----- Original Message ----- 
> From: "Jim Segrave" <address@hidden>
> To: "W.Stroop" <address@hidden>
> [snip]
>  You get
> >    sequences like:
> >    if ( ! prc->fCubeful )
> >     ...
> >    compiling to:
> >    testb  $0x1,0x78(%ebx)
> >    jne    0x80791ad <RolloutGeneral+809>
> 
> That's a nice compiler .Unfortunenatly my mingw gcc produces this : 
>        mov [ebp-10], 00401216
>        mov eax, dword ptr [ebp-0C]
>        mov dl, byte ptr [eax]
>        and dl, 01
>        test dl, dl
>        jne 00401253
> 
> Greetings Rob

Hmm - is this a gcc derivative? That's a very poor code
generator. Leaving out the advantage of doing a testb instruction,
there's no need to test dl after the 'and dl,01', as the z flag is
already set. 



-- 
Jim Segrave           address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]