Files
reverse-engineering-anything/tests/conformance/c/ppc.c
T
morlutoandCursor Agent 9ef70696dd fix(ghidra): expose bit-field base type identity (#8602)
* fix(ghidra): expose bit-field base type identity

* test(ghidra): verify bit-field type handoff

* test(ghidra): verify big-endian bit-field handoff

* fix(ghidra): bind bit-field facts to snapshot profile

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-05 04:03:43 +08:00

17 lines
646 B
C

/* Freestanding, source-owned static-analysis fixture. Never executed by REA. */
volatile unsigned int rea_ppc_global = 7;
const char rea_ppc_marker[] = "rea-ppc-source-owned-fixture";
struct ReaPpcBits { unsigned int first : 3; unsigned int second : 5; };
volatile struct ReaPpcBits rea_ppc_bits = {1, 2};
__attribute__((noinline)) unsigned int rea_ppc_leaf(unsigned int value)
{
return value * 3u + rea_ppc_global;
}
__attribute__((noinline)) unsigned int rea_ppc_entry(unsigned int selector)
{
unsigned int adjusted = selector > 10u ? selector : selector + 1u;
return rea_ppc_leaf(adjusted) + (unsigned char)rea_ppc_marker[0];
}