[meta] Rename Operand::is_pure_immediate into is_immediate;
This commit is contained in:
@@ -86,12 +86,11 @@ impl EncodingBuilder {
|
||||
}
|
||||
|
||||
// Add immediate value predicates
|
||||
for (immediate_value, immediate_operand) in inst.immediate_values.iter().zip(
|
||||
inst.inst
|
||||
.operands_in
|
||||
.iter()
|
||||
.filter(|o| o.is_pure_immediate()),
|
||||
) {
|
||||
for (immediate_value, immediate_operand) in inst
|
||||
.immediate_values
|
||||
.iter()
|
||||
.zip(inst.inst.operands_in.iter().filter(|o| o.is_immediate()))
|
||||
{
|
||||
let immediate_predicate = InstructionPredicate::new_is_field_equal(
|
||||
&inst.inst.format,
|
||||
immediate_operand
|
||||
|
||||
@@ -56,7 +56,7 @@ impl Operand {
|
||||
}
|
||||
|
||||
/// Returns true if the operand has an immediate kind.
|
||||
pub fn is_pure_immediate(&self) -> bool {
|
||||
pub fn is_immediate(&self) -> bool {
|
||||
match self.kind.fields {
|
||||
OperandKindFields::ImmEnum(_) | OperandKindFields::ImmValue => true,
|
||||
_ => false,
|
||||
|
||||
@@ -910,7 +910,7 @@ fn gen_inst_builder(inst: &Instruction, format: &InstructionFormat, fmt: &mut Fo
|
||||
let mut tmpl_types = Vec::new();
|
||||
let mut into_args = Vec::new();
|
||||
for op in &inst.operands_in {
|
||||
let t = if op.is_pure_immediate() {
|
||||
let t = if op.is_immediate() {
|
||||
let t = format!("T{}{}", tmpl_types.len() + 1, op.kind.name);
|
||||
tmpl_types.push(format!("{}: Into<{}>", t, op.kind.rust_type));
|
||||
into_args.push(op.name);
|
||||
|
||||
Reference in New Issue
Block a user