123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- #include "asm_i386.h"
- #include "quakeasm.h"
- #if id386
- .data
- Ltemp: .long 0
- .text
- #define hull 4+8
- #define num 8+4
- #define p 12+12
- .align 4
- .globl C(SV_HullPointContents)
- C(SV_HullPointContents):
- pushl %edi
- movl num(%esp),%eax
- testl %eax,%eax
- js Lhquickout
- pushl %ebx
- movl hull(%esp),%ebx
- pushl %ebp
- movl p(%esp),%edx
- movl hu_clipnodes(%ebx),%edi
- movl hu_planes(%ebx),%ebp
- subl %ebx,%ebx
- pushl %esi
- Lhloop:
- movl nd_planenum(%edi,%eax,8),%ecx
- movl nd_children(%edi,%eax,8),%eax
- movl %eax,%esi
- rorl $16,%eax
- leal (%ecx,%ecx,4),%ecx
- movl pl_type(%ebp,%ecx,4),%bl
- cmpb $3,%bl
- jb Lnodot
- flds pl_normal(%ebp,%ecx,4)
- fmuls 0(%edx)
- flds pl_normal+4(%ebp,%ecx,4)
- fmuls 4(%edx)
- flds pl_normal+8(%ebp,%ecx,4)
- fmuls 8(%edx)
- fxch %st(1)
- faddp %st(0),%st(2)
- faddp %st(0),%st(1)
- fsubs pl_dist(%ebp,%ecx,4)
- jmp Lsub
- Lnodot:
- flds pl_dist(%ebp,%ecx,4)
- fsubrs (%edx,%ebx,4)
- Lsub:
- sarl $16,%eax
- sarl $16,%esi
- fstps Ltemp
- movl Ltemp,%ecx
- sarl $31,%ecx
- andl %ecx,%esi
- xorl $0xFFFFFFFF,%ecx
- andl %ecx,%eax
- orl %esi,%eax
- jns Lhloop
- Lhdone:
- popl %esi
- popl %ebp
- popl %ebx
- Lhquickout:
- popl %edi
- ret
- #endif
|