[Freemint-list] osbind.h registers

Miro Kropáček miro.kropacek at gmail.com
Mon Sep 4 14:48:05 MSD 2017


Thank you Vincent for you usual quality reply.

> *All* of them are additional moves and register allocations.
>
> This is because of "r" constraint in asm inputs. It forces the parameter
> to be stored in a register before the asm call.
>
You're right, this seems to be the most wasteful part. gcc then reserves
requested number of registers and considers them destroyed even if most of
them could be used as they are, without additional moves or register
allocations.

A trap call is rarely used in time critical code so it's hard to find an
argument for changing proven and working bindings apart from the cosmetic
aspect but it makes me personally sad when I see such code. :-)

-- 
MiKRO / Mystic Bytes
http://mikro.atari.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.atariforge.org/pipermail/freemint-list/attachments/20170904/4bac31bd/attachment.html 


More information about the Freemint-list mailing list