Searched refs:Operand (Results 1 – 2 of 2) sorted by relevance
/DragonOS/kernel/crates/rbpf/src/ |
H A D | asm_parser.rs | 26 pub enum Operand { enum 43 pub operands: Vec<Operand>, 80 fn operand<I>() -> impl Parser<I, Output = Operand> in operand() 85 let register_operand = register().map(Operand::Register); in operand() 86 let immediate = integer().map(Operand::Integer); in operand() 88 .map(|t| Operand::Memory(t.0, t.1.unwrap_or(0))); in operand() 132 use super::{ident, instruction, integer, operand, parse, register, Instruction, Operand}; 165 assert_eq!(operand().parse("r0"), Ok((Operand::Register(0), ""))); in test_operand() 166 assert_eq!(operand().parse("r15"), Ok((Operand::Register(15), ""))); in test_operand() 167 assert_eq!(operand().parse("0"), Ok((Operand::Integer(0), ""))); in test_operand() [all …]
|
H A D | assembler.rs | 20 parse, Instruction, Operand, 21 Operand::{Integer, Memory, Nil, Register}, 177 fn operands_tuple(operands: &[Operand]) -> Result<(Operand, Operand, Operand), String> { in operands_tuple() argument 187 fn encode(inst_type: InstructionType, opc: u8, operands: &[Operand]) -> Result<Insn, String> { in encode()
|