MCPcopy Create free account
hub / github.com/coreboot/coreboot / msr_shl

Function msr_shl

util/msrtool/msrutils.c:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122struct msr msr_shl(const struct msr a, const uint8_t bits) {
123 struct msr ret;
124
125 ret.hi = bits < 32 ? a.hi << bits : 0;
126 ret.lo = bits < 32 ? a.lo << bits : 0;
127
128 if (bits < 32)
129 ret.hi |= bits ? a.lo >> (32 - bits) : 0;
130 else
131 ret.hi |= a.lo << (bits - 32);
132
133 return ret;
134}
135
136struct msr msr_shr(const struct msr a, const uint8_t bits) {
137 struct msr ret;

Callers 1

print_bitvalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected