Sign-bit instructions
A couple of one-instruction operations close out the chapter. Floating-point negation is fneg, which flips the sign bit. Absolute value is fabs, which clears it. Each costs one instruction:
# absval(f32 v):
fabs f1, f1 # clear sign bit
blr
# negate(f32 v):
fneg f1, f1 # flip sign bit
blr
Use the single-precision intrinsic __fabsf and it lowers straight to fabs.
The quirk: these two skip the s suffix, so even on f32 you'll read fabs and fneg, never an s-tagged form. That breaks the single/double naming rule, and for good reason. Toggling a sign bit gives identical bits at single or double width, so there's nothing to round and no second variant.
Spot the two instructions one after another and the order matters. They don't commute, so which runs first and which runs second changes the meaning. The C that lays them down follows from the disassembly.
Your task
Write func_802d7b9c to compile to the two sign-bit instructions above.