> There is an interrupt enable overhead of 48 cycles that would be good to
Replace the push flags ; popf with test $IFMASK,flags ; jz 1f; sti ; 1:
That will likely make it much faster (but also bigger)
The only problem is that there might be some code who relies on
restore_flags() restoring other flags that IF, but at least for interrupts
and local_irq_save/restore it should be fine to change.
-Andi
-