1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
/* SPDX-License-Identifier: MIT */

#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[allow(non_camel_case_types)]
pub struct RegisterDescriptor {
    is_clobbered_by_func_call: bool,
    is_reserved: bool,
    is_kernel: bool,
    is_zero: bool,
    is_at: bool,
    is_return_reg: bool,
    is_ra: bool,
    is_stack_pointer: bool,
    is_gp: bool,
    is_temp: bool,
    is_arg: bool,
    is_saved: bool,
}

impl RegisterDescriptor {
    pub fn is_clobbered_by_func_call(&self) -> bool {
        self.is_clobbered_by_func_call
    }
    pub fn is_reserved(&self) -> bool {
        self.is_reserved
    }
    pub fn is_kernel(&self) -> bool {
        self.is_kernel
    }
    pub fn is_zero(&self) -> bool {
        self.is_zero
    }
    pub fn is_at(&self) -> bool {
        self.is_at
    }
    pub fn is_return_reg(&self) -> bool {
        self.is_return_reg
    }
    pub fn is_ra(&self) -> bool {
        self.is_ra
    }
    pub fn is_stack_pointer(&self) -> bool {
        self.is_stack_pointer
    }
    pub fn is_gp(&self) -> bool {
        self.is_gp
    }
    pub fn is_temp(&self) -> bool {
        self.is_temp
    }
    pub fn is_arg(&self) -> bool {
        self.is_arg
    }
    pub fn is_saved(&self) -> bool {
        self.is_saved
    }
}