I'm receiving a SIGILL after running the following code. I can't really figure what's wrong with it.
The target platform is ARM, and I'm trying to port a known library (in which this code is contained)
void convertFloatToFixed(float nX, float nY, unsigned int &nFixed) {
short sx = (short) (nX * 32);
short sy = (short) (nY * 32);
unsigned short *ux = (unsigned short*) &sx;
unsigned short *uy = (unsigned short*) &sy;
nFixed = (*ux << 16) | *uy;
}
Any help on it would be greatly appreciated.
Thanks in advance