|
|
1.1 root 1: /* These are optimized x86 assembly versions of pfield_linetoscr.
2: * Feel free to send me Sparc/PPC/Alpha versions of this... :)
3: */
4:
1.1.1.2 ! root 5: #ifdef X86_PPRO_OPT
! 6: #define BYTE_REG(a,b) a
! 7: #define BYTE_MOVE movzbl
1.1 root 8: #else
1.1.1.2 ! root 9: #define BYTE_REG(a,b) b
! 10: #define BYTE_MOVE movb
1.1 root 11: #endif
12:
1.1.1.2 ! root 13: #ifndef USE_UNDERSCORE
! 14: #define SYM(NAME) NAME
! 15: #define FUNCTION_ALIGN .align 16
! 16: /* Urgl... */
! 17: #else
! 18: #define SYM(NAME) _##NAME
1.1 root 19: /* Urgl... */
1.1.1.2 ! root 20: #define FUNCTION_ALIGN .align 4
! 21: #endif
1.1 root 22:
1.1.1.2 ! root 23: #ifndef USE_UNDERSCORE
1.1 root 24: .local lastcolor
25: .comm lastcolor,2
26: #else
27: .comm lastcolor,2
28: #endif
29:
1.1.1.2 ! root 30: .globl pfield_linetoscr_asm8
! 31: .type pfield_linetoscr_asm8,@function
! 32: FUNCTION_ALIGN
! 33: pfield_linetoscr_asm8:
1.1 root 34: pushl %ebp
35: pushl %edi
36: pushl %esi
37: pushl %ebx
1.1.1.2 ! root 38: movl 24(%esp),%esi /* start */
! 39: movl 28(%esp),%edi /* lframe_end */
1.1 root 40:
1.1.1.2 ! root 41: movl SYM(colors_for_drawing),%edx
1.1 root 42: movb %dl,%dh
43: movw %dx,%ax
1.1.1.2 ! root 44: sall $16,%eax
1.1 root 45: movw %dx,%ax
46:
1.1.1.2 ! root 47: movl 20(%esp),%ebx
1.1 root 48: movl SYM(xlinebuffer),%ecx
1.1.1.2 ! root 49: jmp .La_do_start_line
1.1 root 50: .La_start_line:
1.1.1.2 ! root 51: movl %eax,(%ecx,%esi)
! 52: addl $4,%esi
! 53: .La_do_start_line:
! 54: cmpl %esi,%edi
! 55: jnbe .La_start_line
! 56:
! 57: call %ebx
! 58:
! 59: /* Finish off the line */
! 60:
! 61: movl SYM(xlinebuffer),%ecx
! 62: movl 36(%esp),%edi /* stoppos */
! 63: movl SYM(colors_for_drawing),%edx
! 64: movb %dl,%dh
! 65: movw %dx,%ax
! 66: sall $16,%eax
! 67: movw %dx,%ax
! 68: jmp .La_do_end_line
! 69: .La_end_line:
! 70: movl %eax,(%ecx,%esi)
! 71: addl $4,%esi
! 72: .La_do_end_line:
! 73: cmpl %esi,%edi
! 74: jnbe .La_end_line
! 75:
! 76: popl %ebx
! 77: popl %esi
! 78: popl %edi
! 79: popl %ebp
! 80: ret
! 81:
! 82: .globl pfield_linetoscr_ham6_asm8
! 83: .type pfield_linetoscr_ham6_asm8,@function
! 84: FUNCTION_ALIGN
! 85: pfield_linetoscr_ham6_asm8:
! 86: movl 36(%esp),%edi /* diw_end */
! 87: .Laa_hamloop:
! 88: cmpl %esi,%edi
! 89: jbe .Laa_hamend
! 90:
1.1 root 91: movl SYM(ham_linebuf)+12(,%esi,4),%eax
92: movb SYM(xcolors)(,%eax,4),%bh
1.1.1.2 ! root 93: movl SYM(ham_linebuf)+8(,%esi,4),%eax
! 94: movb SYM(xcolors)(,%eax,4),%bl
! 95: sall $16,%ebx
1.1 root 96: movl SYM(ham_linebuf)+4(,%esi,4),%eax
97: movb SYM(xcolors)(,%eax,4),%bh
98: movl SYM(ham_linebuf)(,%esi,4),%eax
99: movb SYM(xcolors)(,%eax,4),%bl
1.1.1.2 ! root 100: movl %ebx,(%ecx,%esi)
1.1 root 101: addl $4,%esi
1.1.1.2 ! root 102: jmp .Laa_hamloop
1.1 root 103:
1.1.1.2 ! root 104: .Laa_hamend:
! 105: ret
1.1 root 106:
1.1.1.2 ! root 107: .globl pfield_linetoscr_dualpf_asm8
! 108: .type pfield_linetoscr_dualpf_asm8,@function
! 109: FUNCTION_ALIGN
! 110: pfield_linetoscr_dualpf_asm8:
! 111: xorl %edx,%edx
! 112: movl 44(%esp),%ebp /* lookup_no */
! 113: .Lab_dp_loop:
! 114: movl 36(%esp),%eax /* diw_end */
1.1 root 115: xorl %edx,%edx
1.1.1.2 ! root 116: cmpl %esi,%eax
! 117: jbe .La_dp_done
! 118:
1.1 root 119: movl SYM(pixdata)(%esi),%eax
120: movl SYM(spixstate)(%esi),%ebx
121: testl %ebx,%ebx
1.1.1.2 ! root 122: jne .Lab_dp_sprites
1.1 root 123:
124: /* no sprites */
1.1.1.2 ! root 125:
! 126: BYTE_MOVE %al,BYTE_REG(%edx,%dl)
! 127: BYTE_MOVE (%ebp,%edx,4),BYTE_REG(%edx,%dl)
! 128: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 129: BYTE_MOVE %ah,BYTE_REG(%edx,%dl)
! 130: BYTE_MOVE (%ebp,%edx,4),BYTE_REG(%edx,%dl)
! 131: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 132: bswapl %eax
133: bswapl %ecx
1.1.1.2 ! root 134: BYTE_MOVE %al,BYTE_REG(%edx,%dl)
! 135: BYTE_MOVE (%ebp,%edx,4),BYTE_REG(%edx,%dl)
! 136: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 137: BYTE_MOVE %ah,BYTE_REG(%edx,%dl)
! 138: BYTE_MOVE (%ebp,%edx,4),BYTE_REG(%edx,%dl)
! 139: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 140: bswapl %ecx
141:
142: movl SYM(xlinebuffer),%eax
1.1.1.2 ! root 143: movl %ecx,(%eax,%esi)
1.1 root 144: addl $4,%esi
1.1.1.2 ! root 145: jmp .Lab_dp_loop
1.1 root 146:
1.1.1.2 ! root 147: .Lab_dp_sprites:
1.1 root 148: /* dual playfield with sprites */
149:
150: movb %al,%dl
151: testb %bl,%bl
152: je .La3
1.1.1.2 ! root 153: movb SYM(colors_for_drawing)(,%edx,4),%cl
1.1 root 154: jmp .La1
155: .La3:
156: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 157: movb SYM(colors_for_drawing)(,%edx,4),%cl
1.1 root 158: .La1:
159: movb %ah,%dl
160: testb %bh,%bh
161: je .La6
1.1.1.2 ! root 162: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 163: jmp .La4
164: .La6:
165: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 166: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 167: .La4:
168: bswapl %ecx
169: bswapl %eax
170: bswapl %ebx
171:
172: movb %al,%dl
173: testb %bl,%bl
174: je .La9
1.1.1.2 ! root 175: movb SYM(colors_for_drawing)(,%edx,4),%cl
1.1 root 176: jmp .La7
177: .La9:
178: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 179: movb SYM(colors_for_drawing)(,%edx,4),%cl
1.1 root 180: .La7:
181:
182: movb %ah,%dl
183: testb %bh,%bh
184: je .La12
1.1.1.2 ! root 185: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 186: jmp .La10
187: .La12:
188: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 189: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 190: .La10:
191: bswapl %ecx
192: movl SYM(xlinebuffer),%eax
1.1.1.2 ! root 193: movl %ecx,(%eax,%esi)
! 194: addl $4,%esi
! 195: jmp .Lab_dp_loop
! 196:
! 197: .La_dp_done:
! 198: ret
! 199:
! 200: .globl pfield_linetoscr_ehb_asm8
! 201: .type pfield_linetoscr_ehb_asm8,@function
! 202: FUNCTION_ALIGN
! 203: pfield_linetoscr_ehb_asm8:
1.1 root 204: xorl %edx,%edx
205: movl SYM(xlinebuffer),%ebx
1.1.1.2 ! root 206: .La_ehb_loop:
! 207: movl 36(%esp),%edi /* diw_end */
! 208: cmpl %esi,%edi
! 209: jbe .La_ehb_end
1.1 root 210:
211: movl SYM(pixdata)(%esi),%eax
1.1.1.2 ! root 212: BYTE_MOVE %al,BYTE_REG(%edx,%dl)
! 213: cmpb $32,%al
! 214: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 215: jc .La_ehb1
! 216: movw SYM(colors_for_drawing)+32*4-32*2(,%edx,2),%di
! 217: shrl $1,%edi
! 218: andl $0x777,%edi
! 219: movb SYM(xcolors)(,%edi,4),%cl
! 220: .La_ehb1:
! 221: BYTE_MOVE %ah,BYTE_REG(%edx,%dl)
! 222: cmpb $32,%ah
! 223: movb SYM(colors_for_drawing)(,%edx,4),%ch
! 224: jc .La_ehb2
! 225: movw SYM(colors_for_drawing)+32*4-32*2(,%edx,2),%di
! 226: shrl $1,%edi
! 227: andl $0x777,%edi
! 228: movb SYM(xcolors)(,%edi,4),%ch
! 229: .La_ehb2:
! 230: sarl $16,%eax
! 231: sall $16,%ecx
! 232: BYTE_MOVE %al,BYTE_REG(%edx,%dl)
! 233: cmpb $32,%al
! 234: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 235: jc .La_ehb3
! 236: movw SYM(colors_for_drawing)+32*4-32*2(,%edx,2),%di
! 237: shrl $1,%edi
! 238: andl $0x777,%edi
! 239: movb SYM(xcolors)(,%edi,4),%cl
! 240: .La_ehb3:
! 241: BYTE_MOVE %ah,BYTE_REG(%edx,%dl)
! 242: cmpb $32,%ah
! 243: movb SYM(colors_for_drawing)(,%edx,4),%ch
! 244: jc .La_ehb4
! 245: movw SYM(colors_for_drawing)+32*4-32*2(,%edx,2),%di
! 246: shrl $1,%edi
! 247: andl $0x777,%edi
! 248: movb SYM(xcolors)(,%edi,4),%ch
! 249: .La_ehb4:
! 250: roll $16,%ecx
! 251:
! 252: movl %ecx,(%ebx,%esi)
1.1 root 253: addl $4,%esi
1.1.1.2 ! root 254: jmp .La_ehb_loop
1.1 root 255:
1.1.1.2 ! root 256: .La_ehb_end:
! 257: ret
1.1 root 258:
1.1.1.2 ! root 259: .globl pfield_linetoscr_normal_asm8
! 260: .type pfield_linetoscr_normal_asm8,@function
! 261: FUNCTION_ALIGN
! 262: pfield_linetoscr_normal_asm8:
! 263: xorl %edx,%edx
! 264: xorl %ebx,%ebx
! 265: movl 36(%esp),%edi /* diw_end */
! 266: movl SYM(xlinebuffer),%ebp
! 267: jmp .La_normal_doloop
! 268: FUNCTION_ALIGN
! 269: .La_normal_loop:
! 270: BYTE_MOVE SYM(pixdata)(%esi),BYTE_REG(%edx,%dl)
! 271: BYTE_MOVE SYM(pixdata)+4(%esi),BYTE_REG(%ebx,%bl)
! 272: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 273: movb SYM(colors_for_drawing)(,%ebx,4),%al
! 274: BYTE_MOVE SYM(pixdata)+1(%esi),BYTE_REG(%edx,%dl)
! 275: BYTE_MOVE SYM(pixdata)+5(%esi),BYTE_REG(%ebx,%bl)
! 276: movb SYM(colors_for_drawing)(,%edx,4),%ch
! 277: movb SYM(colors_for_drawing)(,%ebx,4),%ah
! 278:
! 279: sall $16,%ecx
! 280: BYTE_MOVE SYM(pixdata)+2(%esi),BYTE_REG(%edx,%dl)
! 281: sall $16,%eax
! 282:
! 283: BYTE_MOVE SYM(pixdata)+6(%esi),BYTE_REG(%ebx,%bl)
! 284: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 285: movb SYM(colors_for_drawing)(,%ebx,4),%al
! 286: BYTE_MOVE SYM(pixdata)+3(%esi),BYTE_REG(%edx,%dl)
! 287: BYTE_MOVE SYM(pixdata)+7(%esi),BYTE_REG(%ebx,%bl)
! 288: movb SYM(colors_for_drawing)(,%edx,4),%ch
1.1 root 289: addl $4,%esi
1.1.1.2 ! root 290: roll $16,%ecx
! 291: movb SYM(colors_for_drawing)(,%ebx,4),%ah
! 292: roll $16,%eax
! 293:
! 294: movl %ecx,-4(%ebp,%esi)
! 295: cmpl %esi,%edi
! 296: jbe .La_normal_end
! 297: movl %eax,(%ebp,%esi)
! 298: addl $4,%esi
! 299: .La_normal_doloop:
! 300: cmpl %esi,%edi
! 301: jnbe .La_normal_loop
1.1 root 302:
1.1.1.2 ! root 303: .La_normal_end:
! 304: ret
1.1 root 305:
1.1.1.2 ! root 306: .globl pfield_linetoscr_hdouble_asm8
! 307: .type pfield_linetoscr_hdouble_asm8,@function
! 308: FUNCTION_ALIGN
! 309: pfield_linetoscr_hdouble_asm8:
! 310: shrl $1,%esi
! 311: xorl %edx,%edx
! 312: xorl %ebx,%ebx
! 313: movl 36(%esp),%edi /* diw_end */
! 314: shrl $1,%edi
! 315: movl SYM(xlinebuffer),%ebp
! 316: jmp .La_hdouble_doloop
! 317: FUNCTION_ALIGN
! 318: .La_hdouble_loop:
! 319: BYTE_MOVE SYM(pixdata)+1(%esi),BYTE_REG(%edx,%dl)
! 320: BYTE_MOVE SYM(pixdata)+3(%esi),BYTE_REG(%ebx,%bl)
! 321: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 322: movb SYM(colors_for_drawing)(,%ebx,4),%al
! 323: BYTE_MOVE SYM(pixdata)+0(%esi),BYTE_REG(%edx,%dl)
! 324: movb %cl,%ch
! 325: BYTE_MOVE SYM(pixdata)+2(%esi),BYTE_REG(%ebx,%bl)
! 326: movb %al,%ah
! 327: sall $16,%ecx
! 328: movb SYM(colors_for_drawing)(,%edx,4),%cl
! 329: sall $16,%eax
! 330: movb SYM(colors_for_drawing)(,%ebx,4),%al
! 331: addl $2,%esi
! 332: movb %cl,%ch
! 333: movb %al,%ah
! 334:
! 335: movl %ecx,-4(%ebp,%esi,2)
! 336: cmpl %esi,%edi
! 337: jbe .La_hdouble_end
! 338: movl %eax,(%ebp,%esi,2)
! 339: addl $2,%esi
! 340: .La_hdouble_doloop:
! 341: cmpl %esi,%edi
! 342: jnbe .La_hdouble_loop
! 343:
! 344: .La_hdouble_end:
! 345: addl %esi,%esi
! 346: ret
! 347:
! 348: /* 16 bit functions */
! 349:
! 350: .globl pfield_linetoscr_asm16
! 351: .type pfield_linetoscr_asm16,@function
! 352: FUNCTION_ALIGN
! 353: pfield_linetoscr_asm16:
1.1 root 354: pushl %ebp
355: pushl %edi
356: pushl %esi
357: pushl %ebx
1.1.1.2 ! root 358: movl 24(%esp),%esi /* start */
! 359: movl 28(%esp),%edi /* lframe_end */
1.1 root 360:
1.1.1.2 ! root 361: movl SYM(colors_for_drawing),%eax
! 362: movl %eax,%edx
1.1 root 363: sall $16,%eax
364: movw %dx,%ax
365:
1.1.1.2 ! root 366: movl 20(%esp),%ebx
1.1 root 367: movl SYM(xlinebuffer),%ecx
1.1.1.2 ! root 368: jmp .Lb_do_start_line
1.1 root 369: .Lb_start_line:
1.1.1.2 ! root 370: movl %eax,(%ecx,%esi,2)
! 371: movl %eax,4(%ecx,%esi,2)
! 372: addl $4,%esi
! 373: .Lb_do_start_line:
! 374: cmpl %esi,%edi
! 375: jnbe .Lb_start_line
! 376:
! 377: call %ebx
! 378:
! 379: /* Finish off the line */
! 380:
! 381: movl SYM(xlinebuffer),%ecx
! 382: movl 36(%esp),%edi /* stoppos */
! 383: movl SYM(colors_for_drawing),%eax
! 384: movl %eax,%edx
! 385: sall $16,%eax
! 386: movw %dx,%ax
! 387: jmp .Lb_do_end_line
! 388: .Lb_end_line:
! 389: movl %eax,(%ecx,%esi,2)
! 390: movl %eax,4(%ecx,%esi,2)
! 391: addl $4,%esi
! 392: .Lb_do_end_line:
! 393: cmpl %esi,%edi
! 394: jnbe .Lb_end_line
! 395:
! 396: popl %ebx
! 397: popl %esi
! 398: popl %edi
! 399: popl %ebp
! 400: ret
! 401:
! 402: .globl pfield_linetoscr_ham6_asm16
! 403: .type pfield_linetoscr_ham6_asm16,@function
! 404: FUNCTION_ALIGN
! 405: pfield_linetoscr_ham6_asm16:
! 406: movl 36(%esp),%edi /* diw_end */
1.1 root 407: .Lb_hamloop:
1.1.1.2 ! root 408: cmpl %esi,%edi
! 409: jbe .Lb_hamend
1.1 root 410:
411: movl SYM(ham_linebuf)+4(,%esi,4),%eax
1.1.1.2 ! root 412: movl SYM(xcolors)(,%eax,4),%ebx
1.1 root 413: sall $16,%ebx
414: movl SYM(ham_linebuf)(,%esi,4),%eax
415: movw SYM(xcolors)(,%eax,4),%bx
1.1.1.2 ! root 416: movl %ebx,(%ecx,%esi,2)
1.1 root 417:
418: movl SYM(ham_linebuf)+12(,%esi,4),%eax
1.1.1.2 ! root 419: movl SYM(xcolors)(,%eax,4),%ebx
1.1 root 420: sall $16,%ebx
421: movl SYM(ham_linebuf)+8(,%esi,4),%eax
422: movw SYM(xcolors)(,%eax,4),%bx
1.1.1.2 ! root 423: movl %ebx,4(%ecx,%esi,2)
! 424:
1.1 root 425: addl $4,%esi
426: jmp .Lb_hamloop
427: .Lb_hamend:
1.1.1.2 ! root 428: ret
1.1 root 429:
1.1.1.2 ! root 430: .globl pfield_linetoscr_dualpf_asm16
! 431: .type pfield_linetoscr_dualpf_asm16,@function
! 432: FUNCTION_ALIGN
! 433: pfield_linetoscr_dualpf_asm16:
! 434: movl 44(%esp),%ebp /* lookup_no */
! 435: .Lb_dp_loop:
! 436: movl 36(%esp),%eax /* diw_end */
1.1 root 437: xorl %edx,%edx
1.1.1.2 ! root 438: cmpl %esi,%eax
! 439: jbe .Lb_dp_done
! 440:
1.1 root 441: movl SYM(pixdata)(%esi),%eax
442: movl SYM(spixstate)(%esi),%ebx
443: testl %ebx,%ebx
444: jne .Lb_dp_sprites
445:
446: /* no sprites */
1.1.1.2 ! root 447:
! 448: movl SYM(xlinebuffer),%ebx
1.1 root 449:
450: movb %ah,%dl
451: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 452: movl SYM(colors_for_drawing)(,%edx,4),%ecx
1.1 root 453: sall $16,%ecx
454: movb %al,%dl
455: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 456: movw SYM(colors_for_drawing)(,%edx,4),%cx
! 457: sarl $16,%eax
! 458: movl %ecx,(%ebx,%esi,2)
! 459: movb %ah,%dl
1.1 root 460: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 461: movl SYM(colors_for_drawing)(,%edx,4),%ecx
! 462: movb %al,%dl
1.1 root 463: sall $16,%ecx
464: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 465: movw SYM(colors_for_drawing)(,%edx,4),%cx
! 466: movl %ecx,4(%ebx,%esi,2)
! 467:
1.1 root 468: addl $4,%esi
469: jmp .Lb_dp_loop
470:
471: .Lb_dp_sprites:
472: /* dual playfield with sprites */
473:
474: movb %ah,%dl
475: testb %bh,%bh
476: je .Lb3
1.1.1.2 ! root 477: movl SYM(colors_for_drawing)(,%edx,4),%ecx
1.1 root 478: jmp .Lb1
479: .Lb3:
480: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 481: movl SYM(colors_for_drawing)(,%edx,4),%ecx
1.1 root 482: .Lb1:
483: sall $16,%ecx
484: movb %al,%dl
1.1.1.2 ! root 485: sarl $16,%eax
1.1 root 486: testb %bl,%bl
487: je .Lb6
1.1.1.2 ! root 488: movw SYM(colors_for_drawing)(,%edx,4),%cx
1.1 root 489: jmp .Lb4
490: .Lb6:
491: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 492: movw SYM(colors_for_drawing)(,%edx,4),%cx
1.1 root 493: .Lb4:
1.1.1.2 ! root 494: movl SYM(xlinebuffer),%edi
! 495: sarl $16,%ebx
! 496: movl %ecx,(%edi,%esi,2)
1.1 root 497:
1.1.1.2 ! root 498: movb %ah,%dl
! 499: testb %bh,%bh
1.1 root 500: je .Lb9
1.1.1.2 ! root 501: movl SYM(colors_for_drawing)(,%edx,4),%ecx
1.1 root 502: jmp .Lb7
503: .Lb9:
504: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 505: movl SYM(colors_for_drawing)(,%edx,4),%ecx
1.1 root 506: .Lb7:
507: sall $16,%ecx
1.1.1.2 ! root 508: movb %al,%dl
! 509: testb %bl,%bl
1.1 root 510: je .Lb12
1.1.1.2 ! root 511: movw SYM(colors_for_drawing)(,%edx,4),%cx
1.1 root 512: jmp .Lb10
513: .Lb12:
514: movb (%ebp,%edx,4),%dl
1.1.1.2 ! root 515: movw SYM(colors_for_drawing)(,%edx,4),%cx
1.1 root 516: .Lb10:
517: movl SYM(xlinebuffer),%eax
1.1.1.2 ! root 518: movl %ecx,4(%eax,%esi,2)
! 519: addl $4,%esi
1.1 root 520: jmp .Lb_dp_loop
1.1.1.2 ! root 521:
! 522: .Lb_dp_done:
! 523: ret
! 524:
! 525: .globl pfield_linetoscr_ehb_asm16
! 526: .type pfield_linetoscr_ehb_asm16,@function
! 527: FUNCTION_ALIGN
! 528: pfield_linetoscr_ehb_asm16:
1.1 root 529: xorl %edx,%edx
1.1.1.2 ! root 530: xorl %ebx,%ebx
! 531: .Lb_ehb_loop:
! 532: movl 36(%esp),%edi /* diw_end */
! 533: cmpl %esi,%edi
! 534: jbe .Lb_ehb_end
1.1 root 535:
536: movl SYM(pixdata)(%esi),%eax
1.1.1.2 ! root 537: movb %ah,%bl
! 538: cmpb $32,%ah
! 539: movl SYM(colors_for_drawing)(,%ebx,4),%ecx
! 540: jc .Lb_ehb2
! 541: movw SYM(colors_for_drawing)+32*4-32*2(,%ebx,2),%di
! 542: shrl $1,%edi
! 543: andl $0x777,%edi
! 544: movl SYM(xcolors)(,%edi,4),%ecx
! 545: .Lb_ehb2:
1.1 root 546: sall $16,%ecx
547: movb %al,%dl
1.1.1.2 ! root 548: movw SYM(colors_for_drawing)(,%edx,4),%cx
! 549: cmpb $32,%al
! 550: jc .Lb_ehb1
! 551:
! 552: movw SYM(colors_for_drawing)+32*4-32*2(,%edx,2),%di
! 553: shrl $1,%edi
! 554: andl $0x777,%edi
! 555: movw SYM(xcolors)(,%edi,4),%cx
! 556: .Lb_ehb1:
! 557: movl SYM(xlinebuffer),%edi
! 558: sarl $16,%eax
! 559: movl %ecx,(%edi,%esi,2)
! 560: movb %ah,%bl
! 561: movl SYM(colors_for_drawing)(,%ebx,4),%ecx
! 562: cmpb $32,%ah
! 563: jc .Lb_ehb4
! 564:
! 565: movw SYM(colors_for_drawing)+32*4-32*2(,%ebx,2),%di
! 566: shrl $1,%edi
! 567: andl $0x777,%edi
! 568: movl SYM(xcolors)(,%edi,4),%ecx
! 569: .Lb_ehb4:
1.1 root 570: sall $16,%ecx
1.1.1.2 ! root 571: movb %al,%dl
! 572: movw SYM(colors_for_drawing)(,%edx,4),%cx
! 573: cmpb $32,%al
! 574: jc .Lb_ehb3
! 575:
! 576: movw SYM(colors_for_drawing)+32*4-32*2(,%edx,2),%di
! 577: shrl $1,%edi
! 578: andl $0x777,%edi
! 579: movw SYM(xcolors)(,%edi,4),%cx
! 580: .Lb_ehb3:
! 581:
! 582: movl SYM(xlinebuffer),%edi
! 583: movl %ecx,4(%edi,%esi,2)
1.1 root 584: addl $4,%esi
1.1.1.2 ! root 585: jmp .Lb_ehb_loop
1.1 root 586:
1.1.1.2 ! root 587: .Lb_ehb_end:
! 588: ret
1.1 root 589:
1.1.1.2 ! root 590: .globl pfield_linetoscr_normal_asm16
! 591: .type pfield_linetoscr_normal_asm16,@function
! 592: FUNCTION_ALIGN
! 593: pfield_linetoscr_normal_asm16:
! 594: movl 36(%esp),%edi /* diw_end */
! 595: jmp .Lb_normal_doloop
! 596:
! 597: FUNCTION_ALIGN
! 598: .Lb_normal_loop:
! 599: xorl %edx,%edx
! 600: BYTE_MOVE SYM(pixdata)+1(%esi),BYTE_REG(%edx,%dl)
! 601: xorl %ebx,%ebx
! 602: BYTE_MOVE SYM(pixdata)+5(%esi),BYTE_REG(%ebx,%bl)
! 603:
! 604: movl SYM(colors_for_drawing)(,%edx,4),%edi
! 605: movl SYM(colors_for_drawing)(,%ebx,4),%ecx
! 606: sall $16,%edi
! 607: BYTE_MOVE SYM(pixdata)+0(%esi),BYTE_REG(%edx,%dl)
! 608: sall $16,%ecx
! 609: BYTE_MOVE SYM(pixdata)+4(%esi),BYTE_REG(%ebx,%bl)
! 610: movw SYM(colors_for_drawing)(,%edx,4),%di
! 611: movw SYM(colors_for_drawing)(,%ebx,4),%cx
! 612: BYTE_MOVE SYM(pixdata)+3(%esi),BYTE_REG(%edx,%dl)
! 613: BYTE_MOVE SYM(pixdata)+7(%esi),BYTE_REG(%ebx,%bl)
! 614: movl SYM(colors_for_drawing)(,%edx,4),%eax
! 615: movl SYM(colors_for_drawing)(,%ebx,4),%ebp
1.1 root 616: sall $16,%eax
1.1.1.2 ! root 617: BYTE_MOVE SYM(pixdata)+2(%esi),BYTE_REG(%edx,%dl)
! 618: sall $16,%ebp
! 619: BYTE_MOVE SYM(pixdata)+6(%esi),BYTE_REG(%ebx,%bl)
! 620: movw SYM(colors_for_drawing)(,%edx,4),%ax
1.1 root 621: addl $4,%esi
1.1.1.2 ! root 622: movw SYM(colors_for_drawing)(,%ebx,4),%bp
1.1 root 623:
1.1.1.2 ! root 624: movl SYM(xlinebuffer),%ebx
! 625: movl %edi,-8(%ebx,%esi,2)
! 626: movl 36(%esp),%edi
! 627: movl %eax,-4(%ebx,%esi,2)
! 628:
! 629: cmpl %esi,%edi
! 630: jbe .Lb_normal_done
! 631:
! 632: movl %ecx,(%ebx,%esi,2)
! 633: movl %ebp,4(%ebx,%esi,2)
! 634:
! 635: addl $4,%esi
! 636: .Lb_normal_doloop:
! 637: cmpl %esi,%edi
! 638: jnbe .Lb_normal_loop
! 639:
! 640: .Lb_normal_done:
! 641: ret
! 642:
! 643: .globl pfield_linetoscr_hdouble_asm16
! 644: .type pfield_linetoscr_hdouble_asm16,@function
! 645: FUNCTION_ALIGN
! 646: pfield_linetoscr_hdouble_asm16:
! 647: shrl $1,%esi
! 648: movl 36(%esp),%eax /* diw_end */
! 649: shrl $1,%eax
! 650: movl SYM(xlinebuffer),%ebp
! 651: jmp .Lb_hdouble_doloop
! 652:
! 653: FUNCTION_ALIGN
! 654: .Lb_hdouble_loop:
! 655: xorl %edx,%edx
! 656: BYTE_MOVE SYM(pixdata)(%esi),BYTE_REG(%edx,%dl)
! 657: xorl %ebx,%ebx
! 658: BYTE_MOVE SYM(pixdata)+1(%esi),BYTE_REG(%ebx,%bl)
1.1 root 659:
1.1.1.2 ! root 660: movl SYM(colors_for_drawing)(,%edx,4),%edi
! 661: movl SYM(colors_for_drawing)(,%ebx,4),%ecx
! 662: movl %edi,%edx
! 663: movl %ecx,%ebx
! 664: sall $16,%edi
! 665: andl $0xFFFF,%edx
! 666: sall $16,%ecx
! 667: andl $0xFFFF,%ebx
! 668: addl $2,%esi
! 669: orl %edx,%edi
! 670: orl %ebx,%ecx
! 671: movl %edi,-8(%ebp,%esi,4)
! 672: movl %ecx,-4(%ebp,%esi,4)
! 673:
! 674: .Lb_hdouble_doloop:
! 675: cmpl %esi,%eax
! 676: jnbe .Lb_hdouble_loop
! 677:
! 678: .Lb_hdouble_done:
! 679: addl %esi,%esi
! 680: ret
1.1 root 681:
1.1.1.2 ! root 682: .globl DitherLine
! 683: #ifndef USE_UNDERSCORE
1.1 root 684: .type DitherLine,@function
685: #endif
1.1.1.2 ! root 686: FUNCTION_ALIGN
1.1 root 687: DitherLine:
688: pushl %ebp
689: pushl %edi
690: pushl %esi
691: pushl %ebx
692: movl 20(%esp),%edi
693: xorl %ebx,%ebx
694: movw 36(%esp),%bx
695: movl 32(%esp),%edx
696: andl $3,%edx
697: sall $15,%edx
698: movl 28(%esp),%eax
699: andl $3,%eax
700: sall $12,%eax
701: leal SYM(cidx)(%edx,%eax),%ebp
702: xorb %dl,%dl
703: movl $8,%ecx
704: testl %ebx,%ebx
705: je .Li_end
706: cmpl $8,40(%esp)
707: je .Li_fast
708:
709: movl 24(%esp),%esi
710: .Li_loop:
711: movzwl (%esi),%eax
712: movzbl (%eax,%ebp),%eax
713: subl 40(%esp),%ecx
714: sall %cl,%eax
715: orb %al,%dl
716: testl %ecx,%ecx
717: jne .Li_1
718: movb %dl,(%edi)
719: incl %edi
720: movl $8,%ecx
721: xorb %dl,%dl
722: .Li_1:
723: movzwl 2(%esi),%eax
724: movzbl 4096(%ebp,%eax),%eax
725: subl 40(%esp),%ecx
726: sall %cl,%eax
727: orb %al,%dl
728: testl %ecx,%ecx
729: jne .Li_2
730: movb %dl,(%edi)
731: incl %edi
732: movl $8,%ecx
733: xorb %dl,%dl
734: .Li_2:
735: movzwl 4(%esi),%eax
736: movzbl 8192(%ebp,%eax),%eax
737: subl 40(%esp),%ecx
738: sall %cl,%eax
739: orb %al,%dl
740: testl %ecx,%ecx
741: jne .Li_3
742: movb %dl,(%edi)
743: incl %edi
744: movl $8,%ecx
745: xorb %dl,%dl
746: .Li_3:
747: movzwl 6(%esi),%eax
748: movzbl 12288(%ebp,%eax),%eax
749: addl $8,%esi
750: subl 40(%esp),%ecx
751: sall %cl,%eax
752: orb %al,%dl
753: testl %ecx,%ecx
754: jne .Li_4
755: movb %dl,(%edi)
756: incl %edi
757: movl $8,%ecx
758: xorb %dl,%dl
759: .Li_4:
760: subl $4,%ebx
761: jne .Li_loop
762: jmp .Li_end
763:
764: /* Fast 8-bit version */
765: .Li_fast:
766: movl 24(%esp),%esi
767: xorl %edx,%edx
1.1.1.2 ! root 768: xorl %ecx,%ecx
! 769: FUNCTION_ALIGN
1.1 root 770: .Li_fast_loop:
1.1.1.2 ! root 771: movw (%esi),%edx
! 772: movw 2(%esi),%cx
! 773: movb (%edx,%ebp),%al
! 774: movw 4(%esi),%dx
! 775: movb 4096(%ebp,%ecx),%ah
! 776:
! 777: movw 6(%esi),%cx
! 778: sall $16,%eax
! 779: movb 8192(%ebp,%edx),%al
1.1 root 780:
1.1.1.2 ! root 781: movb 12288(%ebp,%ecx),%ah
1.1 root 782:
1.1.1.2 ! root 783: roll $16,%eax
1.1 root 784: movl %eax,(%edi)
785: addl $4,%edi
786: addl $8,%esi
787:
788: subl $4,%ebx
789: jne .Li_fast_loop
790:
791: .Li_end:
792: popl %ebx
793: popl %esi
794: popl %edi
795: popl %ebp
796: ret
1.1.1.2 ! root 797: #if 0
! 798: .globl compiler_do_rts
! 799: /* Entry: EDX == regs.regs + 15 */
! 800: compiler_do_rts:
! 801: movl (%edx),%esi
! 802: addl address_space,%esi
! 803: movl jsr_num,%ecx
! 804: movl (%esi),%esi
! 805: orl %ecx,%ecx
! 806: bswapl %esi
! 807: jz cdrts_noway
! 808: decl %ecx
! 809: cmpl jsr_rets(,%ecx,4),%esi
! 810: jne cdrts_noway
! 811: movl jsr_hash(,%ecx,4),%ebx
! 812: movl (%ebx),%ebx
! 813: orl %ebx,%ebx
! 814: jz cdrts_noway
! 815: addl $4,(%edx)
! 816: movl %ecx,jsr_num
! 817: jmp %ebx
! 818: cdrts_noway:
! 819: ret
! 820: #endif
! 821: #if 0
! 822: .globl longget_stub
! 823: longget_stub:
! 824: pushl %ecx
! 825: pushl %eax
! 826: pushl %edx
! 827: call SYM(longget)
! 828: popl %ecx
! 829: movl %eax,%ecx
! 830: popl %eax
! 831: ret
! 832:
! 833: .globl wordget_stub
! 834: wordget_stub:
! 835: pushl %ecx
! 836: pushl %eax
! 837: pushl %edx
! 838: call SYM(wordget)
! 839: popl %ecx
! 840: movl %eax,%ecx
! 841: popl %eax
! 842: ret
! 843:
! 844: .globl byteget_stub
! 845: byteget_stub:
! 846: pushl %ecx
! 847: pushl %eax
! 848: pushl %edx
! 849: call SYM(byteget)
! 850: popl %ecx
! 851: movl %eax,%ecx
! 852: popl %eax
! 853: ret
! 854:
! 855: .globl longput_stub
! 856: longput_stub:
! 857: pushl %ecx
! 858: pushl %eax
! 859: pushl %ebx
! 860: pushl %edx
! 861: call SYM(longput)
! 862: movl %eax,%ecx
! 863: addl $8,%esp
! 864: popl %eax
! 865: ret
! 866:
! 867: .globl wordput_stub
! 868: wordput_stub:
! 869: pushl %ecx
! 870: pushl %eax
! 871: pushl %ebx
! 872: pushl %edx
! 873: call SYM(wordput)
! 874: movl %eax,%ecx
! 875: addl $8,%esp
! 876: popl %eax
! 877: ret
! 878:
! 879: .globl byteput_stub
! 880: byteput_stub:
! 881: pushl %ecx
! 882: pushl %eax
! 883: pushl %ebx
! 884: pushl %edx
! 885: call SYM(byteput)
! 886: movl %eax,%ecx
! 887: addl $8,%esp
! 888: popl %eax
! 889: ret
! 890: #endif
! 891: .ident "Crux CC 3.14.15"
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.