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
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/// Flags common to multiplication operations
///
/// **Note:** Not all flags apply to all multiplication operations.
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MultiplyFlags {
    /// Unsigned flag
    ///
    /// Signal that the processor should treat the operands and result
    /// as unsigned integers.
    ///
    /// **Note:** This flag is only applicable to the `Multiply Long`
    /// operation.
    pub unsigned: bool,
    /// Accumulate flag
    ///
    /// Signal that the processor should add the multiplication result
    /// into another register.
    pub accumulate: bool,
    /// Condition code flag
    ///
    /// Signal that the processor should set condition codes based on
    /// the multiplication result.
    pub flags: bool,
}

/// Flags common to data transfer operations
///
/// **Note:** Not all flags apply to all transfer operations.
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct TransferFlags {
    /// Byte flag
    ///
    /// Signal that the processor should transfer a byte value instead
    /// of the default word value.
    ///
    /// __Note:__ This flag is only applicable to the following
    /// operations:
    ///
    ///  - `SingleDataTransfer`
    ///  - `SingleDataSwap`
    pub byte: bool,
    /// Halfword flag
    ///
    /// Signal that the processor should transfer a halfword value
    /// instead of the default byte value.
    ///
    /// __Note:__ This flag is only applicable to the
    /// `HalfwordDataTransfer` operations.
    pub halfword: bool,
    /// Load flag
    ///
    /// Signal that the processor should transfer a value _from_ memory
    /// (load) instead of the default transfer _to_ memory (store).
    ///
    /// __Note:__ This flag is only applicable to the following
    /// operations:
    ///
    ///  - `HalfwordDataTransfer`
    ///  - `SingleDataTransfer`
    ///  - `BlockDataTransfer`
    ///  - `CoprocessorDataTransfer`
    ///  - `CoprocessorRegisterTransfer`
    pub load: bool,
    /// Pre indexing flag
    ///
    /// Signal that the processor should add offsets to the base address
    /// before transfers instead of the default of after.
    ///
    /// __Note:__ This flag is only applicable to the following
    /// operations:
    ///
    ///  - `HalfwordDataTransfer`
    ///  - `SingleDataTransfer`
    ///  - `BlockDataTransfer`
    ///  - `CoprocessorDataTransfer`
    pub pre: bool,
    /// PSR flag
    ///
    /// Signal that the processor should transfer the current mode's
    /// `SPSR` to the `CPSR` at the same time that `r15` is loaded from
    /// memory during a block transfer.
    ///
    /// __Note:__ This flag is only applicable to the
    /// `BlockDataTransfer` operation during a load operation.
    pub psr: bool,
    /// Saved flag
    ///
    /// Signal that a PSR transfer should use the saved PSR instead of
    /// the current PSR.
    ///
    /// __Note:__ This flag if only applicable to the `StatusTransfer`
    /// operation.
    pub saved: bool,
    /// Signed flag
    ///
    /// Signal that the processor should sign extend the byte or
    /// halfword value transferred from memory
    ///
    /// __Note:__ This flag is only applicable to the
    /// `HalfwordDataTransfer` operation.
    pub signed: bool,
    /// Transfer flag
    ///
    /// Signal to the coprocessor that may cause different behavior
    /// during transfer.
    ///
    /// __Note:__ This flag is only applicable to the
    /// `CoprocessorDataTransfer` operation.
    pub transfer: bool,
    /// Up flag
    ///
    /// Signal that the processor should add the offset to the base
    /// address instead of the default of subtracting.
    ///
    /// __Note:__ This flag is only applicable to the  following
    /// operations:
    ///
    ///  - `HalfwordDataTransfer`
    ///  - `SingleDataTransfer`
    ///  - `BlockDataTransfer`
    ///  - `CoprocessorDataTransfer`
    pub up: bool,
    /// User flag
    ///
    /// Signal that the processor should transfer User-mode registers
    /// instead of the registers from the current mode.
    ///
    /// __Note:__ This flag is only applicable to the
    /// `BlockDataTransfer` operation when `r15` isn't transferred (or
    /// any store operation).
    pub user: bool,
    /// Writeback flag
    ///
    /// Signal that the processor should writeback the calculated
    /// address into the base register after the transfer.
    ///
    /// __Note:__ This flag is only applicable to the following
    /// operations:
    ///
    ///  - `HalfwordDataTransfer`
    ///  - `SingleDataTransfer`
    ///  - `BlockDataTransfer`
    ///  - `CoprocessorDataTransfer`
    pub writeback: bool,
}