| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #include "asm_i386.h" |
| #include "quakeasm.h" |
| #include "asm_draw.h" |
| #include "d_ifacea.h" |
|
|
| #if id386 |
|
|
| |
| |
| |
| |
| |
| |
|
|
| .text |
|
|
| |
| |
| LClampHigh0: |
| movl C(bbextents),%esi |
| jmp LClampReentry0 |
| LClampHighOrLow0: |
| jg LClampHigh0 |
| xorl %esi,%esi |
| jmp LClampReentry0 |
| |
| LClampHigh1: |
| movl C(bbextentt),%edx |
| jmp LClampReentry1 |
| LClampHighOrLow1: |
| jg LClampHigh1 |
| xorl %edx,%edx |
| jmp LClampReentry1 |
| |
| LClampLow2: |
| movl $2048,%ebp |
| jmp LClampReentry2 |
| LClampHigh2: |
| movl C(bbextents),%ebp |
| jmp LClampReentry2 |
| |
| LClampLow3: |
| movl $2048,%ecx |
| jmp LClampReentry3 |
| LClampHigh3: |
| movl C(bbextentt),%ecx |
| jmp LClampReentry3 |
| |
| LClampLow4: |
| movl $2048,%eax |
| jmp LClampReentry4 |
| LClampHigh4: |
| movl C(bbextents),%eax |
| jmp LClampReentry4 |
| |
| LClampLow5: |
| movl $2048,%ebx |
| jmp LClampReentry5 |
| LClampHigh5: |
| movl C(bbextentt),%ebx |
| jmp LClampReentry5 |
|
|
|
|
| #define pspans 4+16 |
|
|
| .align 4 |
| .globl C(D_DrawSpans8) |
| C(D_DrawSpans8): |
| pushl %ebp |
| pushl %edi |
| pushl %esi |
| pushl %ebx |
|
|
| |
| |
| |
| |
| |
| flds C(d_sdivzstepu) |
| fmuls fp_8 |
| movl C(cacheblock),%edx |
| flds C(d_tdivzstepu) |
| fmuls fp_8 |
| movl pspans(%esp),%ebx |
| flds C(d_zistepu) |
| fmuls fp_8 |
| movl %edx,pbase |
| fstps zi8stepu |
| fstps tdivz8stepu |
| fstps sdivz8stepu |
| |
| LSpanLoop: |
| |
| |
| |
| |
| |
| fildl espan_t_v(%ebx) |
| fildl espan_t_u(%ebx) |
|
|
| fld %st(1) |
| fmuls C(d_sdivzstepv) |
| fld %st(1) |
| fmuls C(d_sdivzstepu) |
| fld %st(2) |
| fmuls C(d_tdivzstepu) |
| |
| fxch %st(1) |
| |
| faddp %st(0),%st(2) |
| |
| fxch %st(1) |
| |
| fld %st(3) |
| |
| fmuls C(d_tdivzstepv) |
| |
| |
| fxch %st(1) |
| |
| fadds C(d_sdivzorigin) |
| |
| fxch %st(4) |
| |
| fmuls C(d_zistepv) |
| |
| fxch %st(1) |
| |
| faddp %st(0),%st(2) |
| |
| fxch %st(2) |
| |
| fmuls C(d_zistepu) |
| |
| |
| fxch %st(1) |
| |
| fadds C(d_tdivzorigin) |
| |
| fxch %st(2) |
| faddp %st(0),%st(1) |
|
|
| flds fp_64k |
| fxch %st(1) |
| fadds C(d_ziorigin) |
| |
| |
| |
| |
| |
| fdivr %st(0),%st(1) |
|
|
| |
| |
| |
| movl C(d_viewbuffer),%ecx |
| movl espan_t_v(%ebx),%eax |
| movl %ebx,pspantemp |
|
|
| movl C(tadjust),%edx |
| movl C(sadjust),%esi |
| movl C(d_scantable)(,%eax,4),%edi |
| addl %ecx,%edi |
| movl espan_t_u(%ebx),%ecx |
| addl %ecx,%edi |
| movl espan_t_count(%ebx),%ecx |
|
|
| |
| |
| |
| cmpl $8,%ecx |
| ja LSetupNotLast1 |
|
|
| decl %ecx |
| jz LCleanup1 |
| movl %ecx,spancountminus1 |
|
|
| |
| fxch %st(1) |
|
|
| fld %st(0) |
| fmul %st(4),%st(0) |
| fxch %st(1) |
| fmul %st(3),%st(0) |
| fxch %st(1) |
| fistpl s |
| fistpl t |
|
|
| fildl spancountminus1 |
|
|
| flds C(d_tdivzstepu) |
| flds C(d_zistepu) |
| fmul %st(2),%st(0) |
| fxch %st(1) |
| fmul %st(2),%st(0) |
| fxch %st(2) |
| fmuls C(d_sdivzstepu) |
| |
| fxch %st(1) |
| |
| faddp %st(0),%st(3) |
| fxch %st(1) |
| faddp %st(0),%st(3) |
| faddp %st(0),%st(3) |
|
|
| flds fp_64k |
| fdiv %st(1),%st(0) |
| |
| jmp LFDIVInFlight1 |
| |
| LCleanup1: |
| |
| fxch %st(1) |
|
|
| fld %st(0) |
| fmul %st(4),%st(0) |
| fxch %st(1) |
| fmul %st(3),%st(0) |
| fxch %st(1) |
| fistpl s |
| fistpl t |
| jmp LFDIVInFlight1 |
|
|
| .align 4 |
| LSetupNotLast1: |
| |
| fxch %st(1) |
|
|
| fld %st(0) |
| fmul %st(4),%st(0) |
| fxch %st(1) |
| fmul %st(3),%st(0) |
| fxch %st(1) |
| fistpl s |
| fistpl t |
|
|
| fadds zi8stepu |
| fxch %st(2) |
| fadds sdivz8stepu |
| fxch %st(2) |
| flds tdivz8stepu |
| faddp %st(0),%st(2) |
| flds fp_64k |
| fdiv %st(1),%st(0) |
| |
| |
| LFDIVInFlight1: |
|
|
| addl s,%esi |
| addl t,%edx |
| movl C(bbextents),%ebx |
| movl C(bbextentt),%ebp |
| cmpl %ebx,%esi |
| ja LClampHighOrLow0 |
| LClampReentry0: |
| movl %esi,s |
| movl pbase,%ebx |
| shll $16,%esi |
| cmpl %ebp,%edx |
| movl %esi,sfracf |
| ja LClampHighOrLow1 |
| LClampReentry1: |
| movl %edx,t |
| movl s,%esi |
| shll $16,%edx |
| movl t,%eax |
| sarl $16,%esi |
| movl %edx,tfracf |
|
|
| |
| |
| |
| sarl $16,%eax |
| movl C(cachewidth),%edx |
| imull %edx,%eax |
| addl %ebx,%esi |
| addl %eax,%esi |
| |
|
|
| |
| |
| |
| cmpl $8,%ecx |
| jna LLastSegment |
|
|
| |
| |
| |
| LNotLastSegment: |
|
|
| |
| |
| |
| |
|
|
| |
|
|
| fld %st(0) |
| fmul %st(4),%st(0) |
| fxch %st(1) |
| fmul %st(3),%st(0) |
| fxch %st(1) |
| fistpl snext |
| fistpl tnext |
| movl snext,%eax |
| movl tnext,%edx |
|
|
| movb (%esi),%bl |
| subl $8,%ecx |
| movl C(sadjust),%ebp |
| movl %ecx,counttemp |
|
|
| movl C(tadjust),%ecx |
| movb %bl,(%edi) |
|
|
| addl %eax,%ebp |
| addl %edx,%ecx |
|
|
| movl C(bbextents),%eax |
| movl C(bbextentt),%edx |
|
|
| cmpl $2048,%ebp |
| jl LClampLow2 |
| cmpl %eax,%ebp |
| ja LClampHigh2 |
| LClampReentry2: |
|
|
| cmpl $2048,%ecx |
| jl LClampLow3 |
| cmpl %edx,%ecx |
| ja LClampHigh3 |
| LClampReentry3: |
|
|
| movl %ebp,snext |
| movl %ecx,tnext |
|
|
| subl s,%ebp |
| subl t,%ecx |
| |
| |
| |
| |
| movl %ecx,%eax |
| movl %ebp,%edx |
| sarl $19,%eax |
| jz LZero |
| sarl $19,%edx |
| movl C(cachewidth),%ebx |
| imull %ebx,%eax |
| jmp LSetUp1 |
| |
| LZero: |
| sarl $19,%edx |
| movl C(cachewidth),%ebx |
| |
| LSetUp1: |
|
|
| addl %edx,%eax |
| |
| movl tfracf,%edx |
| movl %eax,advancetable+4 |
| addl %ebx,%eax |
| |
| shll $13,%ebp |
| movl sfracf,%ebx |
| shll $13,%ecx |
| movl %eax,advancetable |
|
|
| movl %ecx,tstep |
| addl %ecx,%edx |
|
|
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb (%esi),%al |
| addl %ebp,%ebx |
| movb %al,1(%edi) |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb %al,2(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb %al,3(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
|
|
| |
| |
| |
| movl counttemp,%ecx |
| cmpl $8,%ecx |
| ja LSetupNotLast2 |
|
|
| decl %ecx |
| jz LFDIVInFlight2 |
| movl %ecx,spancountminus1 |
| fildl spancountminus1 |
|
|
| flds C(d_zistepu) |
| fmul %st(1),%st(0) |
| flds C(d_tdivzstepu) |
| fmul %st(2),%st(0) |
| fxch %st(1) |
| faddp %st(0),%st(3) |
| fxch %st(1) |
| fmuls C(d_sdivzstepu) |
| fxch %st(1) |
| faddp %st(0),%st(3) |
| flds fp_64k |
| fxch %st(1) |
| faddp %st(0),%st(4) |
|
|
| fdiv %st(1),%st(0) |
| |
| jmp LFDIVInFlight2 |
|
|
| .align 4 |
| LSetupNotLast2: |
| fadds zi8stepu |
| fxch %st(2) |
| fadds sdivz8stepu |
| fxch %st(2) |
| flds tdivz8stepu |
| faddp %st(0),%st(2) |
| flds fp_64k |
| fdiv %st(1),%st(0) |
| |
| |
| LFDIVInFlight2: |
| movl %ecx,counttemp |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb %al,4(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb %al,5(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb %al,6(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl $8,%edi |
| movl %edx,tfracf |
| movl snext,%edx |
| movl %ebx,sfracf |
| movl tnext,%ebx |
| movl %edx,s |
| movl %ebx,t |
|
|
| movl counttemp,%ecx |
|
|
| |
| |
| |
| cmpl $8,%ecx |
| movb %al,-1(%edi) |
| ja LNotLastSegment |
|
|
| |
| |
| |
| LLastSegment: |
|
|
| |
| |
| |
| |
| |
| testl %ecx,%ecx |
| jz LNoSteps |
|
|
| |
|
|
|
|
| fld %st(0) |
| fmul %st(4),%st(0) |
| fxch %st(1) |
| fmul %st(3),%st(0) |
| fxch %st(1) |
| fistpl snext |
| fistpl tnext |
|
|
| movb (%esi),%al |
| movl C(tadjust),%ebx |
| movb %al,(%edi) |
| movl C(sadjust),%eax |
|
|
| addl snext,%eax |
| addl tnext,%ebx |
|
|
| movl C(bbextents),%ebp |
| movl C(bbextentt),%edx |
|
|
| cmpl $2048,%eax |
| jl LClampLow4 |
| cmpl %ebp,%eax |
| ja LClampHigh4 |
| LClampReentry4: |
| movl %eax,snext |
|
|
| cmpl $2048,%ebx |
| jl LClampLow5 |
| cmpl %edx,%ebx |
| ja LClampHigh5 |
| LClampReentry5: |
|
|
| cmpl $1,%ecx |
| je LOnlyOneStep |
| |
| subl s,%eax |
| subl t,%ebx |
|
|
| addl %eax,%eax |
| addl %ebx,%ebx |
|
|
| imull reciprocal_table-8(,%ecx,4) |
| movl %edx,%ebp |
|
|
| movl %ebx,%eax |
| imull reciprocal_table-8(,%ecx,4) |
| |
| LSetEntryvec: |
| |
| |
| |
| movl entryvec_table(,%ecx,4),%ebx |
| movl %edx,%eax |
| movl %ebx,jumptemp |
| movl %ebp,%ecx |
| sarl $16,%edx |
| movl C(cachewidth),%ebx |
| sarl $16,%ecx |
| imull %ebx,%edx |
|
|
| addl %ecx,%edx |
| |
| movl tfracf,%ecx |
| movl %edx,advancetable+4 |
| addl %ebx,%edx |
| |
| shll $16,%ebp |
| movl sfracf,%ebx |
| shll $16,%eax |
| movl %edx,advancetable |
|
|
| movl %eax,tstep |
| movl %ecx,%edx |
| addl %eax,%edx |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| jmp *jumptemp |
|
|
| |
| |
| LNoSteps: |
| movb (%esi),%al |
| subl $7,%edi |
| jmp LEndSpan |
| |
| |
| LOnlyOneStep: |
| subl s,%eax |
| subl t,%ebx |
| movl %eax,%ebp |
| movl %ebx,%edx |
| jmp LSetEntryvec |
|
|
| |
|
|
| .globl Entry2_8 |
| Entry2_8: |
| subl $6,%edi |
| movb (%esi),%al |
| jmp LLEntry2_8 |
|
|
| |
|
|
| .globl Entry3_8 |
| Entry3_8: |
| subl $5,%edi |
| addl %eax,%edx |
| movb (%esi),%al |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
| jmp LLEntry3_8 |
|
|
| |
|
|
| .globl Entry4_8 |
| Entry4_8: |
| subl $4,%edi |
| addl %eax,%edx |
| movb (%esi),%al |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| jmp LLEntry4_8 |
|
|
| |
|
|
| .globl Entry5_8 |
| Entry5_8: |
| subl $3,%edi |
| addl %eax,%edx |
| movb (%esi),%al |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| jmp LLEntry5_8 |
|
|
| |
|
|
| .globl Entry6_8 |
| Entry6_8: |
| subl $2,%edi |
| addl %eax,%edx |
| movb (%esi),%al |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| jmp LLEntry6_8 |
|
|
| |
|
|
| .globl Entry7_8 |
| Entry7_8: |
| decl %edi |
| addl %eax,%edx |
| movb (%esi),%al |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| jmp LLEntry7_8 |
|
|
| |
|
|
| .globl Entry8_8 |
| Entry8_8: |
| addl %eax,%edx |
| movb (%esi),%al |
| sbbl %ecx,%ecx |
| addl %ebp,%ebx |
| adcl advancetable+4(,%ecx,4),%esi |
|
|
| addl tstep,%edx |
| sbbl %ecx,%ecx |
| movb %al,1(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| LLEntry7_8: |
| sbbl %ecx,%ecx |
| movb %al,2(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| LLEntry6_8: |
| sbbl %ecx,%ecx |
| movb %al,3(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| LLEntry5_8: |
| sbbl %ecx,%ecx |
| movb %al,4(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
| addl tstep,%edx |
| LLEntry4_8: |
| sbbl %ecx,%ecx |
| movb %al,5(%edi) |
| addl %ebp,%ebx |
| movb (%esi),%al |
| adcl advancetable+4(,%ecx,4),%esi |
| LLEntry3_8: |
| movb %al,6(%edi) |
| movb (%esi),%al |
| LLEntry2_8: |
| |
| LEndSpan: |
|
|
| |
| |
| |
| fstp %st(0) |
| fstp %st(0) |
| fstp %st(0) |
|
|
| movl pspantemp,%ebx |
| movl espan_t_pnext(%ebx),%ebx |
| testl %ebx,%ebx |
| movb %al,7(%edi) |
| jnz LSpanLoop |
|
|
| popl %ebx |
| popl %esi |
| popl %edi |
| popl %ebp |
| ret |
|
|
| |
| |
| |
| |
| |
| |
|
|
| .text |
|
|
| |
| LClamp: |
| movl $0x40000000,%edx |
| xorl %ebx,%ebx |
| fstp %st(0) |
| jmp LZDraw |
|
|
| |
| LClampNeg: |
| movl $0x40000000,%edx |
| xorl %ebx,%ebx |
| fstp %st(0) |
| jmp LZDrawNeg |
|
|
|
|
| #define pzspans 4+16 |
|
|
| .globl C(D_DrawZSpans) |
| C(D_DrawZSpans): |
| pushl %ebp |
| pushl %edi |
| pushl %esi |
| pushl %ebx |
|
|
| flds C(d_zistepu) |
| movl C(d_zistepu),%eax |
| movl pzspans(%esp),%esi |
| testl %eax,%eax |
| jz LFNegSpan |
|
|
| fmuls Float2ToThe31nd |
| fistpl izistep |
| |
| movl izistep,%ebx |
| |
| LFSpanLoop: |
| |
| fildl espan_t_v(%esi) |
| fildl espan_t_u(%esi) |
| movl espan_t_v(%esi),%ecx |
| movl C(d_pzbuffer),%edi |
| fmuls C(d_zistepu) |
| fxch %st(1) |
| fmuls C(d_zistepv) |
| fxch %st(1) |
| fadds C(d_ziorigin) |
| imull C(d_zrowbytes),%ecx |
| faddp %st(0),%st(1) |
|
|
| |
| fcoms float_point5 |
| addl %ecx,%edi |
| movl espan_t_u(%esi),%edx |
| addl %edx,%edx |
| movl espan_t_count(%esi),%ecx |
| addl %edx,%edi |
| pushl %esi |
| fnstsw %ax |
| testb $0x45,%ah |
| jz LClamp |
|
|
| fmuls Float2ToThe31nd |
| fistpl izi |
| |
| |
| movl izi,%edx |
|
|
| |
| |
| |
| |
| |
| |
| LZDraw: |
|
|
| |
| testl $2,%edi |
| jz LFMiddle |
| movl %edx,%eax |
| addl %ebx,%edx |
| shrl $16,%eax |
| decl %ecx |
| movw %ax,(%edi) |
| addl $2,%edi |
|
|
| |
| LFMiddle: |
| pushl %ecx |
| shrl $1,%ecx |
| jz LFLast |
| shrl $1,%ecx |
| jnc LFMiddleLoop |
|
|
| movl %edx,%eax |
| addl %ebx,%edx |
| shrl $16,%eax |
| movl %edx,%esi |
| addl %ebx,%edx |
| andl $0xFFFF0000,%esi |
| orl %esi,%eax |
| movl %eax,(%edi) |
| addl $4,%edi |
| andl %ecx,%ecx |
| jz LFLast |
| |
| LFMiddleLoop: |
| movl %edx,%eax |
| addl %ebx,%edx |
| shrl $16,%eax |
| movl %edx,%esi |
| addl %ebx,%edx |
| andl $0xFFFF0000,%esi |
| orl %esi,%eax |
| movl %edx,%ebp |
| movl %eax,(%edi) |
| addl %ebx,%edx |
| shrl $16,%ebp |
| movl %edx,%esi |
| addl %ebx,%edx |
| andl $0xFFFF0000,%esi |
| orl %esi,%ebp |
| movl %ebp,4(%edi) |
| addl $8,%edi |
|
|
| decl %ecx |
| jnz LFMiddleLoop |
| |
| LFLast: |
| popl %ecx |
| popl %esi |
|
|
| |
| andl $1,%ecx |
| jz LFSpanDone |
| shrl $16,%edx |
| movw %dx,(%edi) |
| |
| LFSpanDone: |
| movl espan_t_pnext(%esi),%esi |
| testl %esi,%esi |
| jnz LFSpanLoop |
|
|
| jmp LFDone |
| |
| LFNegSpan: |
| fmuls FloatMinus2ToThe31nd |
| fistpl izistep |
| |
| movl izistep,%ebx |
| |
| LFNegSpanLoop: |
| |
| fildl espan_t_v(%esi) |
| fildl espan_t_u(%esi) |
| movl espan_t_v(%esi),%ecx |
| movl C(d_pzbuffer),%edi |
| fmuls C(d_zistepu) |
| fxch %st(1) |
| fmuls C(d_zistepv) |
| fxch %st(1) |
| fadds C(d_ziorigin) |
| imull C(d_zrowbytes),%ecx |
| faddp %st(0),%st(1) |
|
|
| |
| fcoms float_point5 |
| addl %ecx,%edi |
| movl espan_t_u(%esi),%edx |
| addl %edx,%edx |
| movl espan_t_count(%esi),%ecx |
| addl %edx,%edi |
| pushl %esi |
| fnstsw %ax |
| testb $0x45,%ah |
| jz LClampNeg |
|
|
| fmuls Float2ToThe31nd |
| fistpl izi |
| |
| |
| movl izi,%edx |
|
|
| |
| |
| |
| |
| |
| |
| LZDrawNeg: |
|
|
| |
| testl $2,%edi |
| jz LFNegMiddle |
| movl %edx,%eax |
| subl %ebx,%edx |
| shrl $16,%eax |
| decl %ecx |
| movw %ax,(%edi) |
| addl $2,%edi |
|
|
| |
| LFNegMiddle: |
| pushl %ecx |
| shrl $1,%ecx |
| jz LFNegLast |
| shrl $1,%ecx |
| jnc LFNegMiddleLoop |
|
|
| movl %edx,%eax |
| subl %ebx,%edx |
| shrl $16,%eax |
| movl %edx,%esi |
| subl %ebx,%edx |
| andl $0xFFFF0000,%esi |
| orl %esi,%eax |
| movl %eax,(%edi) |
| addl $4,%edi |
| andl %ecx,%ecx |
| jz LFNegLast |
| |
| LFNegMiddleLoop: |
| movl %edx,%eax |
| subl %ebx,%edx |
| shrl $16,%eax |
| movl %edx,%esi |
| subl %ebx,%edx |
| andl $0xFFFF0000,%esi |
| orl %esi,%eax |
| movl %edx,%ebp |
| movl %eax,(%edi) |
| subl %ebx,%edx |
| shrl $16,%ebp |
| movl %edx,%esi |
| subl %ebx,%edx |
| andl $0xFFFF0000,%esi |
| orl %esi,%ebp |
| movl %ebp,4(%edi) |
| addl $8,%edi |
|
|
| decl %ecx |
| jnz LFNegMiddleLoop |
| |
| LFNegLast: |
| popl %ecx |
| popl %esi |
|
|
| |
| andl $1,%ecx |
| jz LFNegSpanDone |
| shrl $16,%edx |
| movw %dx,(%edi) |
| |
| LFNegSpanDone: |
| movl espan_t_pnext(%esi),%esi |
| testl %esi,%esi |
| jnz LFNegSpanLoop |
| |
| LFDone: |
| popl %ebx |
| popl %esi |
| popl %edi |
| popl %ebp |
| ret |
|
|
| #endif |
|
|