-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
compilation timeenhancementNew feature or requestNew feature or requestharmThe `harm` dynamic assemblerThe `harm` dynamic assembleridea
Description
Many instructions have very similar structure of possible arguments (for example, ldr and str). Right now they define MakeLdr/Ldr<...> and MakeStr/Str<...> with macros and ldr/str functions.
Instead, we should define with macros common trait and type MakeLdrLikeArgs/LdrLikeArgs<...>, and define
pub struct<D, A> Ldr(LdrLikeArgs<D,A>);
pub fn ldr<D, A, RD, RA>(dst: D, addr: A) -> Ldr<RD, RA>
where LdrLikeArgs<RD, RA>: MakeLdrLikeArgs<D, A>
{
Ldr(LdrLikeArgs::make(dst, addr))
// or, perhaps, LdrLikeArgs::make(dst, addr, Ldr) to work with both fallible and unfallible variants
}Failing variants of Make*-traits should be handled, though.
It should make the codebase smaller and reduce compilation time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
compilation timeenhancementNew feature or requestNew feature or requestharmThe `harm` dynamic assemblerThe `harm` dynamic assembleridea