quakeforge/libs
Bill Currie 3c67e8f020 Fix the vector/quaternion scaling instructions.
It was pointed out by Blub\w (gmqcc) that OP_MUL_FV and friends were buggy
when the operands overlapped (eg, x = x.x * x) as the result would become
'x.x*x.x x.y*x.x*x.x x.z*x.x*x.x' (note the x.x squared for y and z). On
testing, sure enough the bug was present (and is a nice demonstration that
QF's VM does NOT have strict-aliasing bugs). As a very nice benefit: the
code produced by the fixes is actually faster than the broken version :).

The ruamoko code used for testing:
void (string fmt, ...) printf = #0;

vector foo (vector x)
{
    x = x * x.x;
    return x;
}

vector bar (vector x)
{
    x = x.x * x;
    return x;
}

int main ()
{
    vector x = '2 3 4';
    vector y = foo (x);
    vector z = bar (x);
    printf ("x=%v y=%v z=%v 2*x=%v\n", x, y, z, 2*x);
    return 0;
}
2013-01-17 10:23:02 +09:00
..
audio Change pointer_t to unsigned and clean up the mess. 2012-12-21 21:53:13 +09:00
client Make nq and qw use the new entity state struct. 2012-07-05 09:39:16 +09:00
console Make key_dest private to keys.c 2013-01-16 19:48:54 +09:00
gamecode Fix the vector/quaternion scaling instructions. 2013-01-17 10:23:02 +09:00
gib Change pointer_t to unsigned and clean up the mess. 2012-12-21 21:53:13 +09:00
image Use pkg-config for zlib. 2012-08-18 21:41:33 +09:00
models Make key_dest private to keys.c 2013-01-16 19:48:54 +09:00
net Fix a couple of warnings found by the mxe gcc. 2012-12-14 17:07:53 +09:00
qw Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
ruamoko Change pointer_t to unsigned and clean up the mess. 2012-12-21 21:53:13 +09:00
util Fix incorrect parsing of comments. 2013-01-16 10:31:02 +09:00
video Implement dynamic IMTs. 2013-01-16 19:48:54 +09:00
Makefile.am Avoid building unneeded libs. 2012-08-20 14:12:20 +09:00