But the problem is that it does not want to compile under g++ / Cygwin. I get an error message from a file random.cpp, where gcc finds the offending code:
Code: Select all
#include ".\random.h"
__forceinline unsigned long long_mul_mod(unsigned long multiplier, unsigned long multiplicand, unsigned long divisor) {
unsigned long result;
__asm {
mov eax, multiplier;
mul multiplicand;
div divisor;
mov result, edx;
}
return result;
}
inline unsigned long long_rand(unsigned long &seed, unsigned long multiplier = 16807) {
seed = long_mul_mod(seed, multiplier, 0x7fffffff);
return seed;
}
Does this piece of code normally occur in Fruit, and is it called so often that it has to be coded in assembler? How would I include the assembler in gcc?