Core SPR registers only can be accesses by special instructions. wrteei 1/0 is simplified mnemonic of SPR access.
I have sometimes been using header file as attached to simplify SPR/MSR access in C but using of assembly instruction is necessary, it cannot be done directly in C.