[PATCH 3/3] arm: smh: Allow semihosting trap calls to be inlined
Tom Rini
trini at konsulko.com
Thu Nov 3 17:57:21 CET 2022
On Wed, Oct 05, 2022 at 05:38:49PM +0100, Andre Przywara wrote:
> Currently our semihosting trap function is somewhat fragile: we rely
> on the current compiler behaviour to assign the second inline assembly
> argument to the next free register (r1/x1), which happens to be the
> "addr" argument to the smh_trap() function (per the calling convention).
> I guess this is also the reason for the noinline attribute.
>
> Make it explicit what we want: the "addr" argument needs to go into r1,
> so we add another register variable. This allows to drop the "noinline"
> attribute, so now the compiler beautifully inlines just the trap
> instruction directly into the calling function.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221103/0707d349/attachment.sig>
More information about the U-Boot
mailing list