The following is an updated/fixed version of the patch(es), put forward
by Ard Biesheuvel on August 9 (, ), and re-submitted for formal
inclusion, so that the EDK2 can provide EBC functionality for all of
IA32, IA64, X64, AARCH64 and ARM at last.
This updated patch now includes the necessary corollary dsc/fdf updates
as well as fixes to the assembly's EbcLLCALLEXNative, as I found the
following issues there:
- At least gcc5 didn't seem to like the manually optimized branching for
all register args ("sub r1, r1, r3, lsr #1"), and one can never be sure
of the actual size instructions will be assembled into, in case of
assembler internal alignment/optimization, so I broke it down into
actual labelled branches. There are only 4 of those anyway.
- For register + stack calls, while 8 x 64 bit registers on AARCH64 do
equate to #64 bytes that need to be taken off the stack, on ARM the 4 x
32 bit registers equate to #16 bytes, not #32
- Even after fixing the above, I found some issues with the manual stack
duplication assembly code, so I switched to using a call to CopyMem(),
like IA32 does.
With these changes, I believe that the ARM/EBC feature should be fully
functional, especially as I have heavily tested multiparameter calls
from EBC into native, using an fasmg-based EBC assembler , to confirm
that they performed just as well with ARM as with AARCH64, IA32 or X64.
edk2-devel mailing list