triton_isa

Macro triton_instr

Source
macro_rules! triton_instr {
    (pop $arg:literal) => { ... };
    (push $arg:expr) => { ... };
    (divine $arg:literal) => { ... };
    (pick $arg:literal) => { ... };
    (place $arg:literal) => { ... };
    (dup $arg:literal) => { ... };
    (swap $arg:literal) => { ... };
    (call $arg:ident) => { ... };
    (read_mem $arg:literal) => { ... };
    (write_mem $arg:literal) => { ... };
    (addi $arg:expr) => { ... };
    (read_io $arg:literal) => { ... };
    (write_io $arg:literal) => { ... };
    ($instr:ident) => { ... };
}
Expand description

Compile a single Triton assembly instruction into a LabelledInstruction.

ยงExamples

let instruction = triton_instr!(call my_label);
assert_eq!(LabelledInstruction::Instruction(Call("my_label".to_string())), instruction);