Index:
[thread]
[date]
[subject]
[author]
From: WolfWings ShadowFlight <wolfwings@lightspeed.net>
To : ggi-develop@eskimo.com
Date: Fri, 7 Aug 1998 02:07:09 -0700 (PDT)
Re: ggiGetPixelFormat and proposed new DirectBuffer scheme
On Fri, 7 Aug 1998, Marcus Sundberg wrote:
>> On 386, the fastest way is a trio of bit-shifts, I believe.
>> ror ax, 8
>> ror eax, 16
>> ror ax, 8
>
>Ah, that's somewhat shorter than the 14 instructions gcc -S compiled
>my GGI_BYTESWAP32 macro into. :-)
Well, if you use a union of appropriate structs that mimic the register
layout, gcc compiles out exactly the above, sometimes replacing the
ror ax, 8
with
xchg ah, al
which I could see being faster on a Pentium, as it avoids the nasty 16-bit
opcode-size override.
>With egcs you'll have to use
>#if defined(__i486__) || defined(__pentium__) || defined(__pentiumpro__)
>486 or higher
Wouldn't
#if !defines(__i386__)
do the same as the above? Or isn't there a symbol defined for -m386?
>> I'm _so_ tempted to point out VGA text mode, but I'll be nice today. ;-)
>
>I thought VGA textmode was 16 bit? 8 bit char and 8 bit attributes?
Hrm... my bad, keep forgetting how GGI decided to represent text mode.
*sheepish grin*
>Well, I suppose that'll be pretty much up to the person(s) that writes
>the extension... But I do agree with you there, provided that the P2C
>routines are well optimized. And this goes for the C2P rotines in the
>normal Get/Put functions too - there's not much point in including
>features noone will use because they're too slow.
>
>But IIRC we have some old Amiga coders (Emmanuel? ;) here with
>experience of such things, so it shouldn't be a problem, right?
UAE nut-case here! }:>
_
_ _|_ WolfWings ShadowFlight
| | | | | | | | wolfwings@lightspeed.net
| | | | | | | | "Love is a bird,
|_|_| |_|_| | | She needs to fly...
_ / Let all the hurt,
\-.______,-' Inside of you die..." - Madonna, Frozen
Index:
[thread]
[date]
[subject]
[author]