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

Function strprint

util/msrtool/msrutils.c:99–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void strprint(FILE *f, const struct msr val, const uint8_t bits) {
100 if (bits > 56)
101 fputc(val.hi, f);
102 if (bits > 48)
103 fputc(val.hi >> 8, f);
104 if (bits > 40)
105 fputc(val.hi >> 16, f);
106 if (bits > 32)
107 fputc(val.hi >> 24, f);
108 if (bits > 24)
109 fputc(val.lo, f);
110 if (bits > 16)
111 fputc(val.lo >> 8, f);
112 if (bits > 8)
113 fputc(val.lo >> 16, f);
114 if (bits > 0)
115 fputc(val.lo >> 24, f);
116}
117
118int msr_eq(const struct msr a, const struct msr b) {
119 return a.hi == b.hi && a.lo == b.lo;

Callers 1

print_bitvalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected