| 134 | } |
| 135 | |
| 136 | struct msr msr_shr(const struct msr a, const uint8_t bits) { |
| 137 | struct msr ret; |
| 138 | |
| 139 | ret.hi = bits < 32 ? a.hi >> bits : 0; |
| 140 | ret.lo = bits < 32 ? a.lo >> bits : 0; |
| 141 | |
| 142 | if (bits < 32) |
| 143 | ret.lo |= bits ? a.hi << (32 - bits) : 0; |
| 144 | else |
| 145 | ret.lo |= a.hi >> (bits - 32); |
| 146 | |
| 147 | return ret; |
| 148 | } |
| 149 | |
| 150 | void msr_and(struct msr *a, const struct msr b) { |
| 151 | a->hi &= b.hi; |
no outgoing calls
no test coverage detected