Removed fvi_a.h and added the asm code from it as comment to fvi.c in case we need it again some day
This commit is contained in:
parent
37f59aa896
commit
4e3eeee326
|
@ -6,6 +6,7 @@ main/console.c, main/game.c, main/gamerend.c, main/gauges.c: Added timer_update(
|
|||
main/multi.c: Fixed small issue parsing killreactor command in Multiplayer
|
||||
include/byteswap.h: Added swapping for 64Bit sized integers in case we want to store/read them some day (i.e. new Savegame version storing object instead of object_rw)
|
||||
main/gamerend.c: in show_framerate do not use gr_get_string_size at all but rather use hardcoded coordinates - less CPU-intense
|
||||
main/fvi.c: Removed fvi_a.h and added the asm code from it as comment to fvi.c in case we need it again some day
|
||||
|
||||
20110121
|
||||
--------
|
||||
|
|
25
main/fvi.c
25
main/fvi.c
|
@ -39,7 +39,30 @@ extern int Physics_cheat_flag;
|
|||
|
||||
#define face_type_num(nfaces,face_num,tri_edge) ((nfaces==1)?0:(tri_edge*2 + face_num))
|
||||
|
||||
#include "fvi_a.h"
|
||||
// keep the original ASM code here in case we need it again one day...
|
||||
// static inline int oflow_check(fix a,fix b) {
|
||||
// register int __ret;
|
||||
// int dummy;
|
||||
// __asm__ (
|
||||
// " cdq;"
|
||||
// " xorl %%edx,%%eax;"
|
||||
// " subl %%edx,%%eax;"
|
||||
// " xchgl %%ebx,%%eax;"
|
||||
// " cdq;"
|
||||
// " xorl %%edx,%%eax;"
|
||||
// " subl %%edx,%%eax;"
|
||||
// " imull %%ebx;"
|
||||
// " sarl $15,%%edx;"
|
||||
// " orw %%dx,%%dx;"
|
||||
// " setnz %%al;"
|
||||
// " movzbl %%al,%%eax"
|
||||
// : "=a" (__ret), "=b" (dummy) : "a" (a), "1" (b) : "%edx");
|
||||
// return __ret;
|
||||
// }
|
||||
|
||||
static int oflow_check(fix a,fix b) {
|
||||
return 0; /* hoping the floating point fix-math is used */
|
||||
}
|
||||
|
||||
//find the point on the specified plane where the line intersects
|
||||
//returns true if point found, false if line parallel to plane
|
||||
|
|
30
main/fvi_a.h
30
main/fvi_a.h
|
@ -1,30 +0,0 @@
|
|||
#ifndef _FVI_A_H
|
||||
#define _FVI_A_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
static inline int oflow_check(fix a,fix b) {
|
||||
register int __ret;
|
||||
int dummy;
|
||||
__asm__ (
|
||||
" cdq;"
|
||||
" xorl %%edx,%%eax;"
|
||||
" subl %%edx,%%eax;"
|
||||
" xchgl %%ebx,%%eax;"
|
||||
" cdq;"
|
||||
" xorl %%edx,%%eax;"
|
||||
" subl %%edx,%%eax;"
|
||||
" imull %%ebx;"
|
||||
" sarl $15,%%edx;"
|
||||
" orw %%dx,%%dx;"
|
||||
" setnz %%al;"
|
||||
" movzbl %%al,%%eax"
|
||||
: "=a" (__ret), "=b" (dummy) : "a" (a), "1" (b) : "%edx");
|
||||
return __ret;
|
||||
}
|
||||
#else
|
||||
static int oflow_check(fix a,fix b) {
|
||||
return 0; /* hoping the floating point fix-math is used */
|
||||
}
|
||||
/*#error unknown compiler*/
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in a new issue