You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, sancus-cc is implemented as an LLVM pass that prepares SMs for sancus-ld by:
Placing SM_ENTRY/SM_FUNC code and SM_DATA data in respectively .text.sm.name.text and .sm.name.data ELF sections
Replacing inter-protection domain function calls with custom asm stubs that call to the corresponding sm_entry/exit/verify stubs.
Creating an entry function table with (adrs, args_len, ret_len) for use by sm_entry.
Since the MSP430 LLVM back-end generates inferior code, we should investigate the feasibility of doing the above in a GCC plugin. We then could benefit from the clean, stable, and fast code generated by MSP430GCC.
Note that sancus-cc is our only dependency on LLVM/Clang, for sancus-ld already uses MSP430GCC.
The text was updated successfully, but these errors were encountered:
Another quick note: we might also want to consider using the ROSE source-to-source compiler infrastructure to implement a dedicated precompiler that can take care of some of the stuff above.
Currently,
sancus-cc
is implemented as an LLVM pass that prepares SMs forsancus-ld
by:Placing
SM_ENTRY/SM_FUNC
code andSM_DATA
data in respectively.text.sm.name.text
and.sm.name.data
ELF sectionsReplacing inter-protection domain function calls with custom asm stubs that call to the corresponding
sm_entry/exit/verify
stubs.Creating an entry function table with (adrs, args_len, ret_len) for use by
sm_entry
.Since the MSP430 LLVM back-end generates inferior code, we should investigate the feasibility of doing the above in a GCC plugin. We then could benefit from the clean, stable, and fast code generated by MSP430GCC.
Note that
sancus-cc
is our only dependency on LLVM/Clang, forsancus-ld
already uses MSP430GCC.The text was updated successfully, but these errors were encountered: