Re: [AD] Patch for performance issues in i386 blitters |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Attached are diffs which fix a few minor performance issues in the x86
> blitters: stack misalignment and unnecessary operation size prefixes.
> Changes are not expected to negatively impact any target CPU, as overall
> code structure remains intact.
A consistent 0% change for me, both under DOS and Linux. I guess my gfx card
is the bottleneck on my system!
Nevertheless, as Bob said, the patch looks good: it does fix stack
misalignment and saves several bytes. The only minor problem might be the
move of the instructions that set %edi and %esi before WRITE_BANK() and
READ_BANK(), but I verified that neither %edi nor %esi are clobbered by the
platform-specific asm bank switching codes (hopefully I didn't overlook
anything).
An interesting thing: the following modification
- movw BMP_SEG(%edx), %es /* select segment */
+ movl BMP_SEG(%edx), %es /* select segment */
doesn't actually save any byte, because GAS is smart enough to automatically
convert the former into the latter.
Bob, if you're still ok with it, I think you can commit the patch.
--
Eric Botcazou
ebotcazou@xxxxxxxxxx