Skip to content
Snippets Groups Projects
Commit ea2792b4 authored by gback's avatar gback
Browse files

implement llabs in case the compiler doesn't inline it

parent d00936ea
No related branches found
No related tags found
No related merge requests found
#include <stdint.h>
#include <stdlib.h>
/* On x86, division of one 64-bit integer by another cannot be
done with a single instruction or a short sequence. Thus, GCC
......@@ -152,6 +153,12 @@ smod64 (int64_t n, int64_t d)
{
return n - d * sdiv64 (n, d);
}
long long
llabs(long long j)
{
return j >= 0 ? j : -j;
}
/* These are the routines that GCC calls. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment