Skip to content

Instantly share code, notes, and snippets.

@ztane
Created October 23, 2018 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztane/757c754e6e38a052502042d9604d32cb to your computer and use it in GitHub Desktop.
Save ztane/757c754e6e38a052502042d9604d32cb to your computer and use it in GitHub Desktop.
int foo(int a, int b) {
if ((a-b)==0) {
return 1;
}
return 0;
}
int bar(int a, int b) {
if (a==b) {
return 1;
}
return 0;
}
foo:
xorl %eax, %eax
cmpl %esi, %edi
sete %al
ret
bar:
xorl %eax, %eax
cmpl %esi, %edi
sete %al
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment