2006-04-13 20:47:06 +00:00
|
|
|
// Function-wrapped Watcom pragmas
|
2012-03-12 04:47:04 +00:00
|
|
|
// by Jonathon Fowler (jf@jonof.id.au)
|
2006-04-13 20:47:06 +00:00
|
|
|
//
|
|
|
|
// These functions represent some of the more longer-winded pragmas
|
|
|
|
// from the original pragmas.h wrapped into functions for easier
|
|
|
|
// use since many jumps and whatnot make it harder to write macro-
|
|
|
|
// inline versions. I'll eventually convert these to macro-inline
|
|
|
|
// equivalents. --Jonathon
|
|
|
|
|
|
|
|
#include "compat.h"
|
2014-10-25 03:29:21 +00:00
|
|
|
#include "pragmas.h"
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2019-06-25 11:29:50 +00:00
|
|
|
libdivide::libdivide_s64_t divtable64[DIVTABLESIZE];
|
|
|
|
libdivide::libdivide_s32_t divtable32[DIVTABLESIZE];
|
2012-05-01 12:37:32 +00:00
|
|
|
|
2015-09-27 21:18:12 +00:00
|
|
|
void initdivtables(void)
|
|
|
|
{
|
2018-10-25 23:33:52 +00:00
|
|
|
for (int i = 1; i < DIVTABLESIZE; ++i)
|
2015-09-27 21:18:12 +00:00
|
|
|
{
|
2019-06-25 11:29:50 +00:00
|
|
|
divtable64[i] = libdivide::libdivide_s64_gen(i);
|
|
|
|
divtable32[i] = libdivide::libdivide_s32_gen(i);
|
2015-09-27 21:18:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-25 03:29:21 +00:00
|
|
|
uint32_t divideu32_noinline(uint32_t n, uint32_t d) { return divideu32(n, d); }
|
|
|
|
int32_t tabledivide32_noinline(int32_t n, int32_t d) { return tabledivide32(n, d); }
|