#[repr(u32)]pub enum Reg {
Show 323 variants
W0 = 1,
W1 = 2,
W2 = 3,
W3 = 4,
W4 = 5,
W5 = 6,
W6 = 7,
W7 = 8,
W8 = 9,
W9 = 10,
W10 = 11,
W11 = 12,
W12 = 13,
W13 = 14,
W14 = 15,
W15 = 16,
W16 = 17,
W17 = 18,
W18 = 19,
W19 = 20,
W20 = 21,
W21 = 22,
W22 = 23,
W23 = 24,
W24 = 25,
W25 = 26,
W26 = 27,
W27 = 28,
W28 = 29,
W29 = 30,
W30 = 31,
WZR = 32,
WSP = 33,
X0 = 34,
X1 = 35,
X2 = 36,
X3 = 37,
X4 = 38,
X5 = 39,
X6 = 40,
X7 = 41,
X8 = 42,
X9 = 43,
X10 = 44,
X11 = 45,
X12 = 46,
X13 = 47,
X14 = 48,
X15 = 49,
X16 = 50,
X17 = 51,
X18 = 52,
X19 = 53,
X20 = 54,
X21 = 55,
X22 = 56,
X23 = 57,
X24 = 58,
X25 = 59,
X26 = 60,
X27 = 61,
X28 = 62,
X29 = 63,
X30 = 64,
XZR = 65,
SP = 66,
V0 = 67,
V1 = 68,
V2 = 69,
V3 = 70,
V4 = 71,
V5 = 72,
V6 = 73,
V7 = 74,
V8 = 75,
V9 = 76,
V10 = 77,
V11 = 78,
V12 = 79,
V13 = 80,
V14 = 81,
V15 = 82,
V16 = 83,
V17 = 84,
V18 = 85,
V19 = 86,
V20 = 87,
V21 = 88,
V22 = 89,
V23 = 90,
V24 = 91,
V25 = 92,
V26 = 93,
V27 = 94,
V28 = 95,
V29 = 96,
V30 = 97,
V31 = 98,
B0 = 99,
B1 = 100,
B2 = 101,
B3 = 102,
B4 = 103,
B5 = 104,
B6 = 105,
B7 = 106,
B8 = 107,
B9 = 108,
B10 = 109,
B11 = 110,
B12 = 111,
B13 = 112,
B14 = 113,
B15 = 114,
B16 = 115,
B17 = 116,
B18 = 117,
B19 = 118,
B20 = 119,
B21 = 120,
B22 = 121,
B23 = 122,
B24 = 123,
B25 = 124,
B26 = 125,
B27 = 126,
B28 = 127,
B29 = 128,
B30 = 129,
B31 = 130,
H0 = 131,
H1 = 132,
H2 = 133,
H3 = 134,
H4 = 135,
H5 = 136,
H6 = 137,
H7 = 138,
H8 = 139,
H9 = 140,
H10 = 141,
H11 = 142,
H12 = 143,
H13 = 144,
H14 = 145,
H15 = 146,
H16 = 147,
H17 = 148,
H18 = 149,
H19 = 150,
H20 = 151,
H21 = 152,
H22 = 153,
H23 = 154,
H24 = 155,
H25 = 156,
H26 = 157,
H27 = 158,
H28 = 159,
H29 = 160,
H30 = 161,
H31 = 162,
S0 = 163,
S1 = 164,
S2 = 165,
S3 = 166,
S4 = 167,
S5 = 168,
S6 = 169,
S7 = 170,
S8 = 171,
S9 = 172,
S10 = 173,
S11 = 174,
S12 = 175,
S13 = 176,
S14 = 177,
S15 = 178,
S16 = 179,
S17 = 180,
S18 = 181,
S19 = 182,
S20 = 183,
S21 = 184,
S22 = 185,
S23 = 186,
S24 = 187,
S25 = 188,
S26 = 189,
S27 = 190,
S28 = 191,
S29 = 192,
S30 = 193,
S31 = 194,
D0 = 195,
D1 = 196,
D2 = 197,
D3 = 198,
D4 = 199,
D5 = 200,
D6 = 201,
D7 = 202,
D8 = 203,
D9 = 204,
D10 = 205,
D11 = 206,
D12 = 207,
D13 = 208,
D14 = 209,
D15 = 210,
D16 = 211,
D17 = 212,
D18 = 213,
D19 = 214,
D20 = 215,
D21 = 216,
D22 = 217,
D23 = 218,
D24 = 219,
D25 = 220,
D26 = 221,
D27 = 222,
D28 = 223,
D29 = 224,
D30 = 225,
D31 = 226,
Q0 = 227,
Q1 = 228,
Q2 = 229,
Q3 = 230,
Q4 = 231,
Q5 = 232,
Q6 = 233,
Q7 = 234,
Q8 = 235,
Q9 = 236,
Q10 = 237,
Q11 = 238,
Q12 = 239,
Q13 = 240,
Q14 = 241,
Q15 = 242,
Q16 = 243,
Q17 = 244,
Q18 = 245,
Q19 = 246,
Q20 = 247,
Q21 = 248,
Q22 = 249,
Q23 = 250,
Q24 = 251,
Q25 = 252,
Q26 = 253,
Q27 = 254,
Q28 = 255,
Q29 = 256,
Q30 = 257,
Q31 = 258,
Z0 = 1_219,
Z1 = 1_220,
Z2 = 1_221,
Z3 = 1_222,
Z4 = 1_223,
Z5 = 1_224,
Z6 = 1_225,
Z7 = 1_226,
Z8 = 1_227,
Z9 = 1_228,
Z10 = 1_229,
Z11 = 1_230,
Z12 = 1_231,
Z13 = 1_232,
Z14 = 1_233,
Z15 = 1_234,
Z16 = 1_235,
Z17 = 1_236,
Z18 = 1_237,
Z19 = 1_238,
Z20 = 1_239,
Z21 = 1_240,
Z22 = 1_241,
Z23 = 1_242,
Z24 = 1_243,
Z25 = 1_244,
Z26 = 1_245,
Z27 = 1_246,
Z28 = 1_247,
Z29 = 1_248,
Z30 = 1_249,
Z31 = 1_250,
P0 = 1_251,
P1 = 1_252,
P2 = 1_253,
P3 = 1_254,
P4 = 1_255,
P5 = 1_256,
P6 = 1_257,
P7 = 1_258,
P8 = 1_259,
P9 = 1_260,
P10 = 1_261,
P11 = 1_262,
P12 = 1_263,
P13 = 1_264,
P14 = 1_265,
P15 = 1_266,
P16 = 1_267,
P17 = 1_268,
P18 = 1_269,
P19 = 1_270,
P20 = 1_271,
P21 = 1_272,
P22 = 1_273,
P23 = 1_274,
P24 = 1_275,
P25 = 1_276,
P26 = 1_277,
P27 = 1_278,
P28 = 1_279,
P29 = 1_280,
P30 = 1_281,
P31 = 1_282,
ZT0 = 1_315,
}Expand description
A register
Variants§
W0 = 1
W1 = 2
W2 = 3
W3 = 4
W4 = 5
W5 = 6
W6 = 7
W7 = 8
W8 = 9
W9 = 10
W10 = 11
W11 = 12
W12 = 13
W13 = 14
W14 = 15
W15 = 16
W16 = 17
W17 = 18
W18 = 19
W19 = 20
W20 = 21
W21 = 22
W22 = 23
W23 = 24
W24 = 25
W25 = 26
W26 = 27
W27 = 28
W28 = 29
W29 = 30
W30 = 31
WZR = 32
WSP = 33
X0 = 34
X1 = 35
X2 = 36
X3 = 37
X4 = 38
X5 = 39
X6 = 40
X7 = 41
X8 = 42
X9 = 43
X10 = 44
X11 = 45
X12 = 46
X13 = 47
X14 = 48
X15 = 49
X16 = 50
X17 = 51
X18 = 52
X19 = 53
X20 = 54
X21 = 55
X22 = 56
X23 = 57
X24 = 58
X25 = 59
X26 = 60
X27 = 61
X28 = 62
X29 = 63
X30 = 64
XZR = 65
SP = 66
V0 = 67
V1 = 68
V2 = 69
V3 = 70
V4 = 71
V5 = 72
V6 = 73
V7 = 74
V8 = 75
V9 = 76
V10 = 77
V11 = 78
V12 = 79
V13 = 80
V14 = 81
V15 = 82
V16 = 83
V17 = 84
V18 = 85
V19 = 86
V20 = 87
V21 = 88
V22 = 89
V23 = 90
V24 = 91
V25 = 92
V26 = 93
V27 = 94
V28 = 95
V29 = 96
V30 = 97
V31 = 98
B0 = 99
B1 = 100
B2 = 101
B3 = 102
B4 = 103
B5 = 104
B6 = 105
B7 = 106
B8 = 107
B9 = 108
B10 = 109
B11 = 110
B12 = 111
B13 = 112
B14 = 113
B15 = 114
B16 = 115
B17 = 116
B18 = 117
B19 = 118
B20 = 119
B21 = 120
B22 = 121
B23 = 122
B24 = 123
B25 = 124
B26 = 125
B27 = 126
B28 = 127
B29 = 128
B30 = 129
B31 = 130
H0 = 131
H1 = 132
H2 = 133
H3 = 134
H4 = 135
H5 = 136
H6 = 137
H7 = 138
H8 = 139
H9 = 140
H10 = 141
H11 = 142
H12 = 143
H13 = 144
H14 = 145
H15 = 146
H16 = 147
H17 = 148
H18 = 149
H19 = 150
H20 = 151
H21 = 152
H22 = 153
H23 = 154
H24 = 155
H25 = 156
H26 = 157
H27 = 158
H28 = 159
H29 = 160
H30 = 161
H31 = 162
S0 = 163
S1 = 164
S2 = 165
S3 = 166
S4 = 167
S5 = 168
S6 = 169
S7 = 170
S8 = 171
S9 = 172
S10 = 173
S11 = 174
S12 = 175
S13 = 176
S14 = 177
S15 = 178
S16 = 179
S17 = 180
S18 = 181
S19 = 182
S20 = 183
S21 = 184
S22 = 185
S23 = 186
S24 = 187
S25 = 188
S26 = 189
S27 = 190
S28 = 191
S29 = 192
S30 = 193
S31 = 194
D0 = 195
D1 = 196
D2 = 197
D3 = 198
D4 = 199
D5 = 200
D6 = 201
D7 = 202
D8 = 203
D9 = 204
D10 = 205
D11 = 206
D12 = 207
D13 = 208
D14 = 209
D15 = 210
D16 = 211
D17 = 212
D18 = 213
D19 = 214
D20 = 215
D21 = 216
D22 = 217
D23 = 218
D24 = 219
D25 = 220
D26 = 221
D27 = 222
D28 = 223
D29 = 224
D30 = 225
D31 = 226
Q0 = 227
Q1 = 228
Q2 = 229
Q3 = 230
Q4 = 231
Q5 = 232
Q6 = 233
Q7 = 234
Q8 = 235
Q9 = 236
Q10 = 237
Q11 = 238
Q12 = 239
Q13 = 240
Q14 = 241
Q15 = 242
Q16 = 243
Q17 = 244
Q18 = 245
Q19 = 246
Q20 = 247
Q21 = 248
Q22 = 249
Q23 = 250
Q24 = 251
Q25 = 252
Q26 = 253
Q27 = 254
Q28 = 255
Q29 = 256
Q30 = 257
Q31 = 258
Z0 = 1_219
Z1 = 1_220
Z2 = 1_221
Z3 = 1_222
Z4 = 1_223
Z5 = 1_224
Z6 = 1_225
Z7 = 1_226
Z8 = 1_227
Z9 = 1_228
Z10 = 1_229
Z11 = 1_230
Z12 = 1_231
Z13 = 1_232
Z14 = 1_233
Z15 = 1_234
Z16 = 1_235
Z17 = 1_236
Z18 = 1_237
Z19 = 1_238
Z20 = 1_239
Z21 = 1_240
Z22 = 1_241
Z23 = 1_242
Z24 = 1_243
Z25 = 1_244
Z26 = 1_245
Z27 = 1_246
Z28 = 1_247
Z29 = 1_248
Z30 = 1_249
Z31 = 1_250
P0 = 1_251
P1 = 1_252
P2 = 1_253
P3 = 1_254
P4 = 1_255
P5 = 1_256
P6 = 1_257
P7 = 1_258
P8 = 1_259
P9 = 1_260
P10 = 1_261
P11 = 1_262
P12 = 1_263
P13 = 1_264
P14 = 1_265
P15 = 1_266
P16 = 1_267
P17 = 1_268
P18 = 1_269
P19 = 1_270
P20 = 1_271
P21 = 1_272
P22 = 1_273
P23 = 1_274
P24 = 1_275
P25 = 1_276
P26 = 1_277
P27 = 1_278
P28 = 1_279
P29 = 1_280
P30 = 1_281
P31 = 1_282
ZT0 = 1_315
Implementations§
Source§impl Reg
impl Reg
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Returns the register size
§Examples
use bad64::Reg;
assert_eq!(Reg::X0.size(), 8);
assert_eq!(Reg::V0.size(), 16);use bad64::{decode, Operand, Reg};
// add x0, x1, #0x41 - "\x20\x04\x01\x91"
let decoded = decode(0x91010420, 0x1000).unwrap();
let op = decoded.operands()[0];
assert_eq!(op, Operand::Reg { reg: Reg::X0, arrspec: None });
match op {
Operand::Reg { reg: r, .. } => assert_eq!(r.size(), 8),
_ => assert!(false),
};Sourcepub fn is_simd(&self) -> bool
pub fn is_simd(&self) -> bool
Returns register’s SIMD status
§Example
use bad64::Reg;
assert_eq!(Reg::V0.is_simd(), true);
assert_eq!(Reg::D0.is_simd(), false);
assert_eq!(Reg::X0.is_simd(), false);
assert_eq!(Reg::Z0.is_simd(), false);
assert_eq!(Reg::P0.is_simd(), false);Trait Implementations§
Source§impl FromPrimitive for Reg
impl FromPrimitive for Reg
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl ToPrimitive for Reg
impl ToPrimitive for Reg
Source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
Converts the value of
self to an i64. If the value cannot be
represented by an i64, then None is returned.Source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
Converts the value of
self to a u64. If the value cannot be
represented by a u64, then None is returned.Source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
Converts the value of
self to an isize. If the value cannot be
represented by an isize, then None is returned.Source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
Converts the value of
self to an i8. If the value cannot be
represented by an i8, then None is returned.Source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
Converts the value of
self to an i16. If the value cannot be
represented by an i16, then None is returned.Source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
Converts the value of
self to an i32. If the value cannot be
represented by an i32, then None is returned.Source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
Converts the value of
self to an i128. If the value cannot be
represented by an i128 (i64 under the default implementation), then
None is returned. Read moreSource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
Converts the value of
self to a usize. If the value cannot be
represented by a usize, then None is returned.Source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
Converts the value of
self to a u8. If the value cannot be
represented by a u8, then None is returned.Source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
Converts the value of
self to a u16. If the value cannot be
represented by a u16, then None is returned.Source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
Converts the value of
self to a u32. If the value cannot be
represented by a u32, then None is returned.Source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
Converts the value of
self to a u128. If the value cannot be
represented by a u128 (u64 under the default implementation), then
None is returned. Read moreimpl Copy for Reg
impl Eq for Reg
impl StructuralPartialEq for Reg
Auto Trait Implementations§
impl Freeze for Reg
impl RefUnwindSafe for Reg
impl Send for Reg
impl Sync for Reg
impl Unpin for Reg
impl UnwindSafe for Reg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more