Created
January 20, 2020 10:52
-
-
Save thomwiggers/1a9d25e7703cb36e391f77fa0995a5f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define int32_MINMAX(a,b) \ | |
do { \ | |
int32 temp1; \ | |
asm( \ | |
"cmpl %1,%0\n\t" \ | |
"mov %0,%2\n\t" \ | |
"cmovg %1,%0\n\t" \ | |
"cmovg %2,%1\n\t" \ | |
: "+r"(a), "+r"(b), "=r"(temp1) \ | |
: \ | |
: "cc" \ | |
); \ | |
} while(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment