|
|
1.1 ! root 1: // ! 2: // mathnext.s ! 3: // NextSTEP x86 assembly-language math routines. ! 4: ! 5: #include "asm_i386.h" ! 6: #include "quakeasm.h" ! 7: ! 8: #if id386 ! 9: ! 10: .data ! 11: ! 12: .align 4 ! 13: ! 14: .globl ceil_cw, single_cw, full_cw, cw ! 15: ceil_cw: .long 0 ! 16: single_cw: .long 0 ! 17: full_cw: .long 0 ! 18: cw: .long 0 ! 19: ! 20: .text ! 21: ! 22: .globl C(Sys_DoSetFPCW) ! 23: C(Sys_DoSetFPCW): ! 24: fnstcw cw ! 25: movl cw,%eax ! 26: movl %eax,full_cw ! 27: ! 28: andb $0xF3,%ah ! 29: orb $0x0C,%ah // chop mode ! 30: movl %eax,single_cw ! 31: ! 32: andb $0xF3,%ah ! 33: orb $0x08,%ah // ceil mode ! 34: movl %eax,ceil_cw ! 35: ! 36: ret ! 37: ! 38: .globl C(Sys_LowFPPrecision) ! 39: C(Sys_LowFPPrecision): ! 40: fldcw single_cw ! 41: ! 42: ret ! 43: ! 44: .globl C(Sys_HighFPPrecision) ! 45: C(Sys_HighFPPrecision): ! 46: fldcw full_cw ! 47: ! 48: ret ! 49: ! 50: #endif // id386 ! 51:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.