rabbitizer/rust/src/instr_suffix_enum.tablers.template
Anghelo Carvajal fb8c1edbd7
Rust bindings (#17)
* Generate bindings for enums

* Add .gitignore Cargo didn't automatically made

* Actually build the files into the library

* `pub` in `mod` to fix warning

* instruction struct

* Instruction rust binding

* Add InstrId::ALL_MAX

* link C library to rust

* Publish crate CI

* test

* config bindings

* add getters for registers

* add names methods for register enums

* get_operand_type

* feedback from simon

* Forgot to add new file to python setup.py

* get_operands_slice

* add stuff to cargo.toml
2022-12-18 15:15:39 -03:00

22 lines
559 B
Plaintext

/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
/* SPDX-License-Identifier: MIT */
#define HASH #
#define HASH_EXPANSION(x) x
#define SPECIAL_RS_TAG(...) HASH_EXPANSION(HASH)[__VA_ARGS__]
#define RAB_DEF_INSTRSUFFIX(prefix, name) prefix##_##name,
SPECIAL_RS_TAG(repr(u32))
SPECIAL_RS_TAG(derive(Debug, Copy, Clone, Hash, PartialEq, Eq))
SPECIAL_RS_TAG(allow(non_camel_case_types))
pub enum InstrSuffix {
RAB_DEF_INSTRSUFFIX(ALL, NONE)
#include "instructions/InstrSuffix.inc"
RAB_DEF_INSTRSUFFIX(ALL, MAX)
}
#undef RAB_DEF_INSTRSUFFIX