unfold_mad.c

Unfolds multiply-and-accumulate instructions into two opcodes, allowing simplification of other algorithms that might otherwise need special handling of the MAD opcode.

Author

Marcel Sondaar

License

Public Domain

Summary
unfold_mad.cUnfolds multiply-and-accumulate instructions into two opcodes, allowing simplification of other algorithms that might otherwise need special handling of the MAD opcode.
Functions
LibGFX_UnfoldMadsubstitutes the MAD opcode with an ADD and a MUL, replacing the original node

Functions

LibGFX_UnfoldMad

int LibGFX_UnfoldMad(AST_Node *root)

substitutes the MAD opcode with an ADD and a MUL, replacing the original node

in

rootthe root of the tree

out

return0 on success, nonzero if an error occurred
int LibGFX_UnfoldMad(AST_Node *root)
substitutes the MAD opcode with an ADD and a MUL, replacing the original node