MCPcopy Create free account
hub / github.com/GJDuck/e9patch / check_flags

Function check_flags

test/regtest/patch.cpp:1105–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103}
1104
1105void check_flags(const char *_asm, uint64_t flags, uint64_t rflags)
1106{
1107 if (((flags & FLAGS_OF) != 0) != (((rflags & RFLAGS_OF) != 0)) ||
1108 ((flags & FLAGS_CF) != 0) != (((rflags & RFLAGS_CF) != 0)) ||
1109 ((flags & FLAGS_PF) != 0) != (((rflags & RFLAGS_PF) != 0)) ||
1110 ((flags & FLAGS_AF) != 0) != (((rflags & RFLAGS_AF) != 0)) ||
1111 ((flags & FLAGS_ZF) != 0) != (((rflags & RFLAGS_ZF) != 0)) ||
1112 ((flags & FLAGS_SF) != 0) != (((rflags & RFLAGS_SF) != 0)))
1113 {
1114 fprintf(stderr, "%s: flag mismatch\n", _asm);
1115 abort();
1116 }
1117}
1118

Callers

nothing calls this directly

Calls 2

abortFunction · 0.85
fprintfFunction · 0.50

Tested by

no test coverage detected