pub(crate) enum InstructionFragment {
Arithmetic(ArithmeticExpression),
DeferredAddressing(SimpleSpan),
Config(ConfigValue),
PipeConstruct {
index: SpannedSymbolOrLiteral,
rc_word_span: SimpleSpan,
rc_word_value: RegisterContaining,
},
Null(SimpleSpan),
}
Expand description
Part of a TX-2 instruction.
In the M4 assembly language, each part is evaluated separately and then they are combined.
Variants§
Arithmetic(ArithmeticExpression)
Arithmetic expressions are permitted in normal case according to the Users Handbook, but currently this implementation allows them in subscript/superscript too.
DeferredAddressing(SimpleSpan)
Insicates that the current instruction should use the deferred addressing mode.
The programmer indicates this with *
. The
programmer can also make use of deferred addressing by using
the “pipe construct” (which is represented by
InstructionFragment::PipeConstruct
)
Config(ConfigValue)
A configuration syllable (specified either in superscript or with a ‖).
PipeConstruct
Described in section 6-2.8 “SPECIAL SYMBOLS” of the Users Handbook.
Null(SimpleSpan)
Purely an implementation artifact.
Used by the assembler when parsing a
CommaDelimitedFragment
to represent the commas at the
beginning or end of a part of the input program which gets
parsed as an UntaggedProgramInstruction
.
Implementations§
Source§impl InstructionFragment
impl InstructionFragment
fn symbol_uses( &self, block_id: BlockIdentifier, block_offset: Unsigned18Bit, ) -> impl Iterator<Item = Result<(SymbolName, SimpleSpan, SymbolUse), InconsistentSymbolUse>> + use<>
fn substitute_macro_parameters( &self, param_values: &MacroParameterBindings, on_missing: OnUnboundMacroParameter, macros: &BTreeMap<SymbolName, MacroDefinition>, ) -> Option<InstructionFragment>
fn allocate_rc_words<R: RcAllocator>( &mut self, explicit_symtab: &mut ExplicitSymbolTable, implicit_symtab: &mut ImplicitSymbolTable, rc_allocator: &mut R, ) -> Result<(), RcWordAllocationFailure>
Trait Implementations§
Source§impl Clone for InstructionFragment
impl Clone for InstructionFragment
Source§fn clone(&self) -> InstructionFragment
fn clone(&self) -> InstructionFragment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InstructionFragment
impl Debug for InstructionFragment
Source§impl Evaluate for InstructionFragment
impl Evaluate for InstructionFragment
fn evaluate<R: RcUpdater>( &self, ctx: &mut EvaluationContext<'_, R>, scope: ScopeIdentifier, ) -> Result<Unsigned36Bit, EvaluationFailure>
Source§impl From<(SimpleSpan, Script, Unsigned36Bit)> for InstructionFragment
impl From<(SimpleSpan, Script, Unsigned36Bit)> for InstructionFragment
Source§fn from(
(span, script, v): (SimpleSpan, Script, Unsigned36Bit),
) -> InstructionFragment
fn from( (span, script, v): (SimpleSpan, Script, Unsigned36Bit), ) -> InstructionFragment
Source§impl From<ArithmeticExpression> for InstructionFragment
impl From<ArithmeticExpression> for InstructionFragment
Source§fn from(expr: ArithmeticExpression) -> Self
fn from(expr: ArithmeticExpression) -> Self
Source§impl PartialEq for InstructionFragment
impl PartialEq for InstructionFragment
impl Eq for InstructionFragment
impl StructuralPartialEq for InstructionFragment
Auto Trait Implementations§
impl Freeze for InstructionFragment
impl RefUnwindSafe for InstructionFragment
impl Send for InstructionFragment
impl Sync for InstructionFragment
impl Unpin for InstructionFragment
impl UnwindSafe for InstructionFragment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef
].