Skip to content

Instantly share code, notes, and snippets.

Last active Oct 13, 2017
What would you like to do?
Esp32 ULP macro function
/* r0 = r0 xor r2, spills r1 */
.macro xor
int bitwise_XOR(int a, int b)
return (a + b) - (a & b) - (a & b);
and r1,r0,r2
add r0,r0,r2
sub r0,r0,r1
sub r0,r0,r1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment