use super::{CheckRegId, GMArgs, GTFArgs, Imm12, Imm18, Instruction, RegId};
#[doc(inline)]
pub use super::_op::*;
impl GM {
pub fn from_args(ra: RegId, args: GMArgs) -> Self {
Self::new(ra, Imm18::new(args as _))
}
}
impl GTF {
pub fn from_args(ra: RegId, rb: RegId, args: GTFArgs) -> Self {
Self::new(ra, rb, Imm12::new(args as _))
}
}
pub fn gm_args<A: CheckRegId>(ra: A, args: GMArgs) -> Instruction {
Instruction::GM(GM::from_args(ra.check(), args))
}
pub fn gtf_args<A: CheckRegId, B: CheckRegId>(ra: A, rb: B, args: GTFArgs) -> Instruction {
Instruction::GTF(GTF::from_args(ra.check(), rb.check(), args))
}