Searched refs:operand (Results 1 – 1 of 1) sorted by relevance
/DragonOS/kernel/crates/rbpf/src/ |
H A D | asm_parser.rs | 80 fn operand<I>() -> impl Parser<I, Output = Operand> in operand() function 97 let operands = sep_by(operand(), char(',').skip(spaces())); in instruction() 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() 168 assert_eq!(operand().parse("42"), Ok((Operand::Integer(42), ""))); in test_operand() 169 assert_eq!(operand().parse("[r1]"), Ok((Operand::Memory(1, 0), ""))); in test_operand() 170 assert_eq!(operand().parse("[r3+5]"), Ok((Operand::Memory(3, 5), ""))); in test_operand() 172 operand().parse("[r3+0x1f]"), in test_operand() [all …]
|