]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make MUL_VF and MUL_FV friendlier for compilers
authorWolfgang Bumiller <blub@speed.at>
Sun, 13 Jan 2013 19:36:54 +0000 (20:36 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sun, 13 Jan 2013 19:36:54 +0000 (20:36 +0100)
prvm_exec.c
prvm_execprogram.h

index f2ad83edf459fed77e436b8972c065e9a5195fdf..42eee2ec265a91c67551bce13292b28472b8e6d7 100644 (file)
@@ -672,6 +672,7 @@ void MVM_ExecuteProgram (prvm_prog_t *prog, func_t fnum, const char *errormessag
        int             restorevm_tempstringsbuf_cursize;
        double  calltime;
        double tm, starttm;
+       double tempfloat;
 
        calltime = Sys_DirtyTime();
 
index c787e6fec3583613439091b48c401baa3db67408..39f2cacb74d6b61edf99f490bc49e273c611715e 100644 (file)
                                OPC->_float = OPA->vector[0]*OPB->vector[0] + OPA->vector[1]*OPB->vector[1] + OPA->vector[2]*OPB->vector[2];
                                break;
                        case OP_MUL_FV:
-                               OPC->vector[0] = OPA->_float * OPB->vector[0];
-                               OPC->vector[1] = OPA->_float * OPB->vector[1];
-                               OPC->vector[2] = OPA->_float * OPB->vector[2];
+                               tempfloat = OPA->_float;
+                               OPC->vector[0] = tempfloat * OPB->vector[0];
+                               OPC->vector[1] = tempfloat * OPB->vector[1];
+                               OPC->vector[2] = tempfloat * OPB->vector[2];
                                break;
                        case OP_MUL_VF:
-                               OPC->vector[0] = OPB->_float * OPA->vector[0];
-                               OPC->vector[1] = OPB->_float * OPA->vector[1];
-                               OPC->vector[2] = OPB->_float * OPA->vector[2];
+                               tempfloat = OPB->_float;
+                               OPC->vector[0] = tempfloat * OPA->vector[0];
+                               OPC->vector[1] = tempfloat * OPA->vector[1];
+                               OPC->vector[2] = tempfloat * OPA->vector[2];
                                break;
                        case OP_DIV_F:
                                if( OPB->_float != 0.0f )