Re: [PATCH v3] Reduce assembly code size of exception entry points

2024-02-19 Thread Jan Beulich
On 16.02.2024 11:50, Frediano Ziglio wrote: > --- a/xen/arch/x86/x86_64/entry.S > +++ b/xen/arch/x86/x86_64/entry.S > @@ -22,6 +22,14 @@ > #endif > .endm > > +.macro BUILD_BUG_ON condstr cond:vararg > +.if \cond > +.error "Condition \condstr not satisfied" Maybe

[PATCH v3] Reduce assembly code size of exception entry points

2024-02-16 Thread Frediano Ziglio
On many entries we push 8-bytes zero and exception constants are small so we can just write a single byte saving 3 bytes for instruction. With ENDBR64 this reduces the size of many entry points from 32 to 16 bytes (due to alignment). The push and the mov are overlapping stores either way.