emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display word wrapping


From: Juanma Barranquero
Subject: Re: display word wrapping
Date: Mon, 31 May 2004 21:03:17 +0200

On Mon, 31 May 2004 19:55:53 +0200, "Eli Zaretskii" <address@hidden> wrote:

[Warning: big listing ahead]

There are the two full listings of the function, with the very same
compiler settings.  If you look at line 1599 on both listings, you'll
see one of them uses

  struct image * img;

while the other has

  struct image * volatile img;

But the resulting code is the same.

However, I've done tests with small programs, and definitely "volatile"
is not ignored on these. So it looks more and more like the optimizer is
making a mess of itself when dealing with lookup_image and it's not
"sure" what to do with img.


                                                           /L/e/k/t/u





---------------------------------------------------------------------------
non-volatile version:
---------------------------------------------------------------------------


_TEXT   SEGMENT
_now$ = -8                                              ; size = 8
_f$ = 8                                                 ; size = 4
_spec$ = 12                                             ; size = 4
_lookup_image PROC NEAR

; 1597 : {

  04e1d 55               push    ebp
  04e1e 8b ec            mov     ebp, esp
  04e20 51               push    ecx
  04e21 51               push    ecx
  04e22 53               push    ebx
  04e23 56               push    esi

; 1598 :   struct image_cache *c = FRAME_X_IMAGE_CACHE (f);
; 1599 :   struct image *img;
; 1600 :   int i;
; 1601 :   unsigned hash;
; 1602 :   struct gcpro gcpro1;
; 1603 :   EMACS_TIME now;
; 1604 : 
; 1605 :   /* F must be a window-system frame, and SPEC must be a valid image
; 1606 :      specification.  */
; 1607 :   xassert (FRAME_WINDOW_P (f));
; 1608 :   xassert (valid_image_p (spec));
; 1609 : 
; 1610 :   GCPRO1 (spec);
; 1611 : 
; 1612 :   /* Look up SPEC in the hash table of the image cache.  */
; 1613 :   hash = sxhash (spec, 0);

  04e24 8b 75 0c         mov     esi, DWORD PTR _spec$[ebp]
  04e27 57               push    edi
  04e28 8b 3d e4 00 00
        00               mov     edi, DWORD PTR _one_w32_display_info+228
  04e2e 6a 00            push    0
  04e30 56               push    esi
  04e31 e8 00 00 00 00   call    _sxhash
  04e36 59               pop     ecx
  04e37 59               pop     ecx

; 1614 :   i = hash % IMAGE_CACHE_BUCKETS_SIZE;

  04e38 33 d2            xor     edx, edx
  04e3a 8b d8            mov     ebx, eax
  04e3c b9 e9 03 00 00   mov     ecx, 1001              ; 000003e9H
  04e41 f7 f1            div     ecx

; 1615 : 
; 1616 :   for (img = c->buckets[i]; img; img = img->next)

  04e43 8b 07            mov     eax, DWORD PTR [edi]
  04e45 8b 3c 90         mov     edi, DWORD PTR [eax+edx*4]
  04e48 85 ff            test    edi, edi
  04e4a 74 27            je      SHORT $L34653
$L27272:

; 1617 :     if (img->hash == hash && !NILP (Fequal (img->spec, spec)))

  04e4c 39 5f 4c         cmp     DWORD PTR [edi+76], ebx
  04e4f 75 13            jne     SHORT $L27273
  04e51 56               push    esi
  04e52 ff 77 28         push    DWORD PTR [edi+40]
  04e55 e8 00 00 00 00   call    _Fequal
  04e5a 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qnil
  04e60 59               pop     ecx
  04e61 59               pop     ecx
  04e62 75 07            jne     SHORT $L34654
$L27273:

; 1615 : 
; 1616 :   for (img = c->buckets[i]; img; img = img->next)

  04e64 8b 7f 54         mov     edi, DWORD PTR [edi+84]
  04e67 85 ff            test    edi, edi
  04e69 75 e1            jne     SHORT $L27272
$L34654:

; 1618 :       break;
; 1619 : 
; 1620 :   /* If not found, create a new image and cache it.  */
; 1621 :   if (img == NULL)

  04e6b 85 ff            test    edi, edi
  04e6d 0f 85 8a 01 00
        00               jne     $L27350
$L34653:

; 1622 :     {
; 1623 :       extern Lisp_Object Qpostscript;
; 1624 : 
; 1625 :       BLOCK_INPUT;

  04e73 ff 05 00 00 00
        00               inc     DWORD PTR _interrupt_input_blocked

; 1626 :       img = make_image (spec, hash);

  04e79 53               push    ebx
  04e7a 8b de            mov     ebx, esi
  04e7c e8 00 00 00 00   call    _make_image
  04e81 8b f8            mov     edi, eax

; 1627 :       cache_image (f, img);

  04e83 e8 00 00 00 00   call    _cache_image

; 1628 :       //__asm push img
; 1629 :       img->load_failed_p = img->type->load (f, img) == 0;

  04e88 8b 47 38         mov     eax, DWORD PTR [edi+56]
  04e8b 57               push    edi
  04e8c ff 75 08         push    DWORD PTR _f$[ebp]
  04e8f ff 50 08         call    DWORD PTR [eax+8]
  04e92 83 c4 0c         add     esp, 12                        ; 0000000cH
  04e95 f7 d8            neg     eax
  04e97 1b c0            sbb     eax, eax
  04e99 40               inc     eax
  04e9a 89 47 3c         mov     DWORD PTR [edi+60], eax

; 1630 :       //__asm pop img
; 1631 : 
; 1632 :       /* If we can't load the image, and we don't have a width and
; 1633 :         height, use some arbitrary width and height so that we can
; 1634 :         draw a rectangle for it.  */
; 1635 :       if (img->load_failed_p)
; 1636 :        {
; 1637 :          Lisp_Object value;
; 1638 : 
; 1639 :          value = image_spec_value (spec, QCwidth, NULL);

  04e9d 8b ce            mov     ecx, esi
  04e9f 6a 00            push    0
  04ea1 74 3c            je      SHORT $L27279
  04ea3 ff 35 00 00 00
        00               push    DWORD PTR _QCwidth
  04ea9 e8 00 00 00 00   call    _image_spec_value

; 1640 :          img->width = (INTEGERP (value)
; 1641 :                        ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH);

  04eae bb 00 00 00 e0   mov     ebx, -536870912                ; e0000000H
  04eb3 85 c3            test    eax, ebx
  04eb5 59               pop     ecx
  04eb6 59               pop     ecx
  04eb7 74 03            je      SHORT $L34647
  04eb9 6a 1e            push    30                     ; 0000001eH
  04ebb 58               pop     eax
$L34647:
  04ebc 89 47 1c         mov     DWORD PTR [edi+28], eax

; 1642 :          value = image_spec_value (spec, QCheight, NULL);

  04ebf 6a 00            push    0
  04ec1 ff 35 00 00 00
        00               push    DWORD PTR _QCheight
  04ec7 8b ce            mov     ecx, esi
  04ec9 e8 00 00 00 00   call    _image_spec_value

; 1643 :          img->height = (INTEGERP (value)
; 1644 :                         ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT);

  04ece 85 c3            test    eax, ebx
  04ed0 59               pop     ecx
  04ed1 59               pop     ecx
  04ed2 74 03            je      SHORT $L34649
  04ed4 6a 1e            push    30                     ; 0000001eH
  04ed6 58               pop     eax
$L34649:
  04ed7 89 47 20         mov     DWORD PTR [edi+32], eax

; 1645 :        }
; 1646 :       else

  04eda e9 fa 00 00 00   jmp     $L27348
$L27279:

; 1647 :        {
; 1648 :          /* Handle image type independent image attributes
; 1649 :             `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF',
; 1650 :             `:background COLOR'.  */
; 1651 :          Lisp_Object ascent, margin, relief, bg;
; 1652 : 
; 1653 :          ascent = image_spec_value (spec, QCascent, NULL);

  04edf ff 35 00 00 00
        00               push    DWORD PTR _QCascent
  04ee5 e8 00 00 00 00   call    _image_spec_value

; 1654 :          if (INTEGERP (ascent))

  04eea bb 00 00 00 e0   mov     ebx, -536870912                ; e0000000H
  04eef 85 c3            test    eax, ebx
  04ef1 59               pop     ecx
  04ef2 59               pop     ecx
  04ef3 75 05            jne     SHORT $L27295

; 1655 :            img->ascent = XFASTINT (ascent);

  04ef5 89 47 24         mov     DWORD PTR [edi+36], eax

; 1656 :          else if (EQ (ascent, Qcenter))

  04ef8 eb 0c            jmp     SHORT $L27297
$L27295:
  04efa 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qcenter
  04f00 75 04            jne     SHORT $L27297

; 1657 :            img->ascent = CENTERED_IMAGE_ASCENT;

  04f02 83 4f 24 ff      or      DWORD PTR [edi+36], -1
$L27297:

; 1658 : 
; 1659 :          margin = image_spec_value (spec, QCmargin, NULL);

  04f06 6a 00            push    0
  04f08 ff 35 00 00 00
        00               push    DWORD PTR _QCmargin
  04f0e 8b ce            mov     ecx, esi
  04f10 e8 00 00 00 00   call    _image_spec_value
  04f15 59               pop     ecx
  04f16 59               pop     ecx

; 1660 :          if (INTEGERP (margin) && XINT (margin) >= 0)

  04f17 8b c8            mov     ecx, eax
  04f19 c1 e9 1d         shr     ecx, 29                        ; 0000001dH
  04f1c 75 0c            jne     SHORT $L27302
  04f1e 8b d0            mov     edx, eax
  04f20 c1 e2 03         shl     edx, 3
  04f23 78 05            js      SHORT $L27302

; 1661 :            img->vmargin = img->hmargin = XFASTINT (margin);

  04f25 89 47 30         mov     DWORD PTR [edi+48], eax

; 1662 :          else if (CONSP (margin) && INTEGERP (XCAR (margin))

  04f28 eb 2d            jmp     SHORT $L34658
$L27302:

; 1663 :                   && INTEGERP (XCDR (margin)))

  04f2a 83 f9 05         cmp     ecx, 5
  04f2d 75 2b            jne     SHORT $L27334
  04f2f 25 ff ff ff 1f   and     eax, 536870911         ; 1fffffffH
  04f34 8b 08            mov     ecx, DWORD PTR [eax]
  04f36 85 cb            test    ecx, ebx
  04f38 75 20            jne     SHORT $L27334
  04f3a 85 58 04         test    DWORD PTR [eax+4], ebx
  04f3d 75 1b            jne     SHORT $L27334

; 1664 :            {
; 1665 :              if (XINT (XCAR (margin)) > 0)

  04f3f 8b d1            mov     edx, ecx
  04f41 c1 e2 03         shl     edx, 3
  04f44 85 d2            test    edx, edx
  04f46 7e 03            jle     SHORT $L27324

; 1666 :                img->hmargin = XFASTINT (XCAR (margin));

  04f48 89 4f 30         mov     DWORD PTR [edi+48], ecx
$L27324:

; 1667 :              if (XINT (XCDR (margin)) > 0)

  04f4b 8b 40 04         mov     eax, DWORD PTR [eax+4]
  04f4e 8b c8            mov     ecx, eax
  04f50 c1 e1 03         shl     ecx, 3
  04f53 85 c9            test    ecx, ecx
  04f55 7e 03            jle     SHORT $L27334
$L34658:

; 1668 :                img->vmargin = XFASTINT (XCDR (margin));

  04f57 89 47 34         mov     DWORD PTR [edi+52], eax
$L27334:

; 1669 :            }
; 1670 : 
; 1671 :          relief = image_spec_value (spec, QCrelief, NULL);

  04f5a 6a 00            push    0
  04f5c ff 35 00 00 00
        00               push    DWORD PTR _QCrelief
  04f62 8b ce            mov     ecx, esi
  04f64 e8 00 00 00 00   call    _image_spec_value

; 1672 :          if (INTEGERP (relief))

  04f69 85 c3            test    eax, ebx
  04f6b 59               pop     ecx
  04f6c 59               pop     ecx
  04f6d 75 14            jne     SHORT $L27342

; 1673 :            {
; 1674 :              img->relief = XINT (relief);

  04f6f c1 e0 03         shl     eax, 3
  04f72 c1 f8 03         sar     eax, 3
  04f75 89 47 2c         mov     DWORD PTR [edi+44], eax

; 1675 :              img->hmargin += abs (img->relief);

  04f78 99               cdq
  04f79 33 c2            xor     eax, edx
  04f7b 2b c2            sub     eax, edx
  04f7d 01 47 30         add     DWORD PTR [edi+48], eax

; 1676 :              img->vmargin += abs (img->relief);

  04f80 01 47 34         add     DWORD PTR [edi+52], eax
$L27342:

; 1677 :            }
; 1678 : 
; 1679 :          if (! img->background_valid)

  04f83 f6 47 18 02      test    BYTE PTR [edi+24], 2
  04f87 75 36            jne     SHORT $L34655

; 1680 :            {
; 1681 :              bg = image_spec_value (img->spec, QCbackground, NULL);

  04f89 8b 4f 28         mov     ecx, DWORD PTR [edi+40]
  04f8c 6a 00            push    0
  04f8e ff 35 00 00 00
        00               push    DWORD PTR _QCbackground
  04f94 e8 00 00 00 00   call    _image_spec_value

; 1682 :              if (!NILP (bg))

  04f99 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qnil
  04f9f 59               pop     ecx
  04fa0 59               pop     ecx
  04fa1 74 1c            je      SHORT $L34655

; 1683 :                {
; 1684 :                  img->background
; 1685 :                    = x_alloc_image_color (f, img, bg,
; 1686 :                                           FRAME_BACKGROUND_PIXEL (f));

  04fa3 8b 4d 08         mov     ecx, DWORD PTR _f$[ebp]
  04fa6 8b 91 e0 00 00
        00               mov     edx, DWORD PTR [ecx+224]
  04fac ff 32            push    DWORD PTR [edx]
  04fae 8b f7            mov     esi, edi
  04fb0 51               push    ecx
  04fb1 e8 00 00 00 00   call    _x_alloc_image_color

; 1687 :                  img->background_valid = 1;

  04fb6 83 4f 18 02      or      DWORD PTR [edi+24], 2
  04fba 59               pop     ecx
  04fbb 59               pop     ecx
  04fbc 89 47 14         mov     DWORD PTR [edi+20], eax
$L34655:

; 1688 :                }
; 1689 :            }
; 1690 : 
; 1691 :          /* Do image transformations and compute masks, unless we
; 1692 :             don't have the image yet.  */
; 1693 :          if (!EQ (*img->type->type, Qpostscript))

  04fbf 8b 47 38         mov     eax, DWORD PTR [edi+56]
  04fc2 8b 00            mov     eax, DWORD PTR [eax]
  04fc4 8b 00            mov     eax, DWORD PTR [eax]
  04fc6 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qpostscript
  04fcc 74 0b            je      SHORT $L27348

; 1694 :            postprocess_image (f, img);

  04fce ff 75 08         push    DWORD PTR _f$[ebp]
  04fd1 8b f7            mov     esi, edi
  04fd3 e8 00 00 00 00   call    _postprocess_image
  04fd8 59               pop     ecx
$L27348:

; 1695 :        }
; 1696 : 
; 1697 :       UNBLOCK_INPUT;

  04fd9 ff 0d 00 00 00
        00               dec     DWORD PTR _interrupt_input_blocked
  04fdf 75 36            jne     SHORT $L27351
  04fe1 83 3d 00 00 00
        00 00            cmp     DWORD PTR _interrupt_input_pending, 0
  04fe8 74 05            je      SHORT $L27352
  04fea e8 00 00 00 00   call    _reinvoke_input_signal
$L27352:
  04fef 83 3d 00 00 00
        00 00            cmp     DWORD PTR _pending_atimers, 0
  04ff6 74 05            je      SHORT $L27350
  04ff8 e8 00 00 00 00   call    _do_pending_atimers
$L27350:

; 1698 :     }
; 1699 : 
; 1700 :   /* We're using IMG, so set its timestamp to `now'.  */
; 1701 :   EMACS_GET_TIME (now);

  04ffd 8d 45 f8         lea     eax, DWORD PTR _now$[ebp]
  05000 6a 00            push    0
  05002 50               push    eax
  05003 e8 00 00 00 00   call    _gettimeofday

; 1702 :   img->timestamp = EMACS_SECS (now);

  05008 8b 45 f8         mov     eax, DWORD PTR _now$[ebp]
  0500b 59               pop     ecx
  0500c 59               pop     ecx
  0500d 89 07            mov     DWORD PTR [edi], eax

; 1703 : 
; 1704 :   UNGCPRO;
; 1705 : 
; 1706 :   /* Value is the image id.  */
; 1707 :   return img->id;

  0500f 8b 47 50         mov     eax, DWORD PTR [edi+80]
  05012 5f               pop     edi
  05013 5e               pop     esi
  05014 5b               pop     ebx

; 1708 : }

  05015 c9               leave
  05016 c3               ret     0
$L27351:

; 1695 :        }
; 1696 : 
; 1697 :       UNBLOCK_INPUT;

  05017 83 3d 00 00 00
        00 00            cmp     DWORD PTR _interrupt_input_blocked, 0
  0501e 7d dd            jge     SHORT $L27350
  05020 e9 00 00 00 00   jmp     _w32_abort
_lookup_image ENDP
_TEXT   ENDS



---------------------------------------------------------------------------
volatile version:
---------------------------------------------------------------------------

_TEXT   SEGMENT
_now$ = -8                                              ; size = 8
_f$ = 8                                                 ; size = 4
_spec$ = 12                                             ; size = 4
_lookup_image PROC NEAR

; 1597 : {

  04e1d 55               push    ebp
  04e1e 8b ec            mov     ebp, esp
  04e20 51               push    ecx
  04e21 51               push    ecx
  04e22 53               push    ebx
  04e23 56               push    esi

; 1598 :   struct image_cache *c = FRAME_X_IMAGE_CACHE (f);
; 1599 :   struct image * volatile img;
; 1600 :   int i;
; 1601 :   unsigned hash;
; 1602 :   struct gcpro gcpro1;
; 1603 :   EMACS_TIME now;
; 1604 : 
; 1605 :   /* F must be a window-system frame, and SPEC must be a valid image
; 1606 :      specification.  */
; 1607 :   xassert (FRAME_WINDOW_P (f));
; 1608 :   xassert (valid_image_p (spec));
; 1609 : 
; 1610 :   GCPRO1 (spec);
; 1611 : 
; 1612 :   /* Look up SPEC in the hash table of the image cache.  */
; 1613 :   hash = sxhash (spec, 0);

  04e24 8b 75 0c         mov     esi, DWORD PTR _spec$[ebp]
  04e27 57               push    edi
  04e28 8b 3d e4 00 00
        00               mov     edi, DWORD PTR _one_w32_display_info+228
  04e2e 6a 00            push    0
  04e30 56               push    esi
  04e31 e8 00 00 00 00   call    _sxhash
  04e36 59               pop     ecx
  04e37 59               pop     ecx

; 1614 :   i = hash % IMAGE_CACHE_BUCKETS_SIZE;

  04e38 33 d2            xor     edx, edx
  04e3a 8b d8            mov     ebx, eax
  04e3c b9 e9 03 00 00   mov     ecx, 1001              ; 000003e9H
  04e41 f7 f1            div     ecx

; 1615 : 
; 1616 :   for (img = c->buckets[i]; img; img = img->next)

  04e43 8b 07            mov     eax, DWORD PTR [edi]
  04e45 8b 3c 90         mov     edi, DWORD PTR [eax+edx*4]
  04e48 85 ff            test    edi, edi
  04e4a 74 27            je      SHORT $L34653
$L27272:

; 1617 :     if (img->hash == hash && !NILP (Fequal (img->spec, spec)))

  04e4c 39 5f 4c         cmp     DWORD PTR [edi+76], ebx
  04e4f 75 13            jne     SHORT $L27273
  04e51 56               push    esi
  04e52 ff 77 28         push    DWORD PTR [edi+40]
  04e55 e8 00 00 00 00   call    _Fequal
  04e5a 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qnil
  04e60 59               pop     ecx
  04e61 59               pop     ecx
  04e62 75 07            jne     SHORT $L34654
$L27273:

; 1615 : 
; 1616 :   for (img = c->buckets[i]; img; img = img->next)

  04e64 8b 7f 54         mov     edi, DWORD PTR [edi+84]
  04e67 85 ff            test    edi, edi
  04e69 75 e1            jne     SHORT $L27272
$L34654:

; 1618 :       break;
; 1619 : 
; 1620 :   /* If not found, create a new image and cache it.  */
; 1621 :   if (img == NULL)

  04e6b 85 ff            test    edi, edi
  04e6d 0f 85 8a 01 00
        00               jne     $L27350
$L34653:

; 1622 :     {
; 1623 :       extern Lisp_Object Qpostscript;
; 1624 : 
; 1625 :       BLOCK_INPUT;

  04e73 ff 05 00 00 00
        00               inc     DWORD PTR _interrupt_input_blocked

; 1626 :       img = make_image (spec, hash);

  04e79 53               push    ebx
  04e7a 8b de            mov     ebx, esi
  04e7c e8 00 00 00 00   call    _make_image
  04e81 8b f8            mov     edi, eax

; 1627 :       cache_image (f, img);

  04e83 e8 00 00 00 00   call    _cache_image

; 1628 :       //__asm push img
; 1629 :       img->load_failed_p = img->type->load (f, img) == 0;

  04e88 8b 47 38         mov     eax, DWORD PTR [edi+56]
  04e8b 57               push    edi
  04e8c ff 75 08         push    DWORD PTR _f$[ebp]
  04e8f ff 50 08         call    DWORD PTR [eax+8]
  04e92 83 c4 0c         add     esp, 12                        ; 0000000cH
  04e95 f7 d8            neg     eax
  04e97 1b c0            sbb     eax, eax
  04e99 40               inc     eax
  04e9a 89 47 3c         mov     DWORD PTR [edi+60], eax

; 1630 :       //__asm pop img
; 1631 : 
; 1632 :       /* If we can't load the image, and we don't have a width and
; 1633 :         height, use some arbitrary width and height so that we can
; 1634 :         draw a rectangle for it.  */
; 1635 :       if (img->load_failed_p)
; 1636 :        {
; 1637 :          Lisp_Object value;
; 1638 : 
; 1639 :          value = image_spec_value (spec, QCwidth, NULL);

  04e9d 8b ce            mov     ecx, esi
  04e9f 6a 00            push    0
  04ea1 74 3c            je      SHORT $L27279
  04ea3 ff 35 00 00 00
        00               push    DWORD PTR _QCwidth
  04ea9 e8 00 00 00 00   call    _image_spec_value

; 1640 :          img->width = (INTEGERP (value)
; 1641 :                        ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH);

  04eae bb 00 00 00 e0   mov     ebx, -536870912                ; e0000000H
  04eb3 85 c3            test    eax, ebx
  04eb5 59               pop     ecx
  04eb6 59               pop     ecx
  04eb7 74 03            je      SHORT $L34647
  04eb9 6a 1e            push    30                     ; 0000001eH
  04ebb 58               pop     eax
$L34647:
  04ebc 89 47 1c         mov     DWORD PTR [edi+28], eax

; 1642 :          value = image_spec_value (spec, QCheight, NULL);

  04ebf 6a 00            push    0
  04ec1 ff 35 00 00 00
        00               push    DWORD PTR _QCheight
  04ec7 8b ce            mov     ecx, esi
  04ec9 e8 00 00 00 00   call    _image_spec_value

; 1643 :          img->height = (INTEGERP (value)
; 1644 :                         ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT);

  04ece 85 c3            test    eax, ebx
  04ed0 59               pop     ecx
  04ed1 59               pop     ecx
  04ed2 74 03            je      SHORT $L34649
  04ed4 6a 1e            push    30                     ; 0000001eH
  04ed6 58               pop     eax
$L34649:
  04ed7 89 47 20         mov     DWORD PTR [edi+32], eax

; 1645 :        }
; 1646 :       else

  04eda e9 fa 00 00 00   jmp     $L27348
$L27279:

; 1647 :        {
; 1648 :          /* Handle image type independent image attributes
; 1649 :             `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF',
; 1650 :             `:background COLOR'.  */
; 1651 :          Lisp_Object ascent, margin, relief, bg;
; 1652 : 
; 1653 :          ascent = image_spec_value (spec, QCascent, NULL);

  04edf ff 35 00 00 00
        00               push    DWORD PTR _QCascent
  04ee5 e8 00 00 00 00   call    _image_spec_value

; 1654 :          if (INTEGERP (ascent))

  04eea bb 00 00 00 e0   mov     ebx, -536870912                ; e0000000H
  04eef 85 c3            test    eax, ebx
  04ef1 59               pop     ecx
  04ef2 59               pop     ecx
  04ef3 75 05            jne     SHORT $L27295

; 1655 :            img->ascent = XFASTINT (ascent);

  04ef5 89 47 24         mov     DWORD PTR [edi+36], eax

; 1656 :          else if (EQ (ascent, Qcenter))

  04ef8 eb 0c            jmp     SHORT $L27297
$L27295:
  04efa 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qcenter
  04f00 75 04            jne     SHORT $L27297

; 1657 :            img->ascent = CENTERED_IMAGE_ASCENT;

  04f02 83 4f 24 ff      or      DWORD PTR [edi+36], -1
$L27297:

; 1658 : 
; 1659 :          margin = image_spec_value (spec, QCmargin, NULL);

  04f06 6a 00            push    0
  04f08 ff 35 00 00 00
        00               push    DWORD PTR _QCmargin
  04f0e 8b ce            mov     ecx, esi
  04f10 e8 00 00 00 00   call    _image_spec_value
  04f15 59               pop     ecx
  04f16 59               pop     ecx

; 1660 :          if (INTEGERP (margin) && XINT (margin) >= 0)

  04f17 8b c8            mov     ecx, eax
  04f19 c1 e9 1d         shr     ecx, 29                        ; 0000001dH
  04f1c 75 0c            jne     SHORT $L27302
  04f1e 8b d0            mov     edx, eax
  04f20 c1 e2 03         shl     edx, 3
  04f23 78 05            js      SHORT $L27302

; 1661 :            img->vmargin = img->hmargin = XFASTINT (margin);

  04f25 89 47 30         mov     DWORD PTR [edi+48], eax

; 1662 :          else if (CONSP (margin) && INTEGERP (XCAR (margin))

  04f28 eb 2d            jmp     SHORT $L34658
$L27302:

; 1663 :                   && INTEGERP (XCDR (margin)))

  04f2a 83 f9 05         cmp     ecx, 5
  04f2d 75 2b            jne     SHORT $L27334
  04f2f 25 ff ff ff 1f   and     eax, 536870911         ; 1fffffffH
  04f34 8b 08            mov     ecx, DWORD PTR [eax]
  04f36 85 cb            test    ecx, ebx
  04f38 75 20            jne     SHORT $L27334
  04f3a 85 58 04         test    DWORD PTR [eax+4], ebx
  04f3d 75 1b            jne     SHORT $L27334

; 1664 :            {
; 1665 :              if (XINT (XCAR (margin)) > 0)

  04f3f 8b d1            mov     edx, ecx
  04f41 c1 e2 03         shl     edx, 3
  04f44 85 d2            test    edx, edx
  04f46 7e 03            jle     SHORT $L27324

; 1666 :                img->hmargin = XFASTINT (XCAR (margin));

  04f48 89 4f 30         mov     DWORD PTR [edi+48], ecx
$L27324:

; 1667 :              if (XINT (XCDR (margin)) > 0)

  04f4b 8b 40 04         mov     eax, DWORD PTR [eax+4]
  04f4e 8b c8            mov     ecx, eax
  04f50 c1 e1 03         shl     ecx, 3
  04f53 85 c9            test    ecx, ecx
  04f55 7e 03            jle     SHORT $L27334
$L34658:

; 1668 :                img->vmargin = XFASTINT (XCDR (margin));

  04f57 89 47 34         mov     DWORD PTR [edi+52], eax
$L27334:

; 1669 :            }
; 1670 : 
; 1671 :          relief = image_spec_value (spec, QCrelief, NULL);

  04f5a 6a 00            push    0
  04f5c ff 35 00 00 00
        00               push    DWORD PTR _QCrelief
  04f62 8b ce            mov     ecx, esi
  04f64 e8 00 00 00 00   call    _image_spec_value

; 1672 :          if (INTEGERP (relief))

  04f69 85 c3            test    eax, ebx
  04f6b 59               pop     ecx
  04f6c 59               pop     ecx
  04f6d 75 14            jne     SHORT $L27342

; 1673 :            {
; 1674 :              img->relief = XINT (relief);

  04f6f c1 e0 03         shl     eax, 3
  04f72 c1 f8 03         sar     eax, 3
  04f75 89 47 2c         mov     DWORD PTR [edi+44], eax

; 1675 :              img->hmargin += abs (img->relief);

  04f78 99               cdq
  04f79 33 c2            xor     eax, edx
  04f7b 2b c2            sub     eax, edx
  04f7d 01 47 30         add     DWORD PTR [edi+48], eax

; 1676 :              img->vmargin += abs (img->relief);

  04f80 01 47 34         add     DWORD PTR [edi+52], eax
$L27342:

; 1677 :            }
; 1678 : 
; 1679 :          if (! img->background_valid)

  04f83 f6 47 18 02      test    BYTE PTR [edi+24], 2
  04f87 75 36            jne     SHORT $L34655

; 1680 :            {
; 1681 :              bg = image_spec_value (img->spec, QCbackground, NULL);

  04f89 8b 4f 28         mov     ecx, DWORD PTR [edi+40]
  04f8c 6a 00            push    0
  04f8e ff 35 00 00 00
        00               push    DWORD PTR _QCbackground
  04f94 e8 00 00 00 00   call    _image_spec_value

; 1682 :              if (!NILP (bg))

  04f99 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qnil
  04f9f 59               pop     ecx
  04fa0 59               pop     ecx
  04fa1 74 1c            je      SHORT $L34655

; 1683 :                {
; 1684 :                  img->background
; 1685 :                    = x_alloc_image_color (f, img, bg,
; 1686 :                                           FRAME_BACKGROUND_PIXEL (f));

  04fa3 8b 4d 08         mov     ecx, DWORD PTR _f$[ebp]
  04fa6 8b 91 e0 00 00
        00               mov     edx, DWORD PTR [ecx+224]
  04fac ff 32            push    DWORD PTR [edx]
  04fae 8b f7            mov     esi, edi
  04fb0 51               push    ecx
  04fb1 e8 00 00 00 00   call    _x_alloc_image_color

; 1687 :                  img->background_valid = 1;

  04fb6 83 4f 18 02      or      DWORD PTR [edi+24], 2
  04fba 59               pop     ecx
  04fbb 59               pop     ecx
  04fbc 89 47 14         mov     DWORD PTR [edi+20], eax
$L34655:

; 1688 :                }
; 1689 :            }
; 1690 : 
; 1691 :          /* Do image transformations and compute masks, unless we
; 1692 :             don't have the image yet.  */
; 1693 :          if (!EQ (*img->type->type, Qpostscript))

  04fbf 8b 47 38         mov     eax, DWORD PTR [edi+56]
  04fc2 8b 00            mov     eax, DWORD PTR [eax]
  04fc4 8b 00            mov     eax, DWORD PTR [eax]
  04fc6 3b 05 00 00 00
        00               cmp     eax, DWORD PTR _Qpostscript
  04fcc 74 0b            je      SHORT $L27348

; 1694 :            postprocess_image (f, img);

  04fce ff 75 08         push    DWORD PTR _f$[ebp]
  04fd1 8b f7            mov     esi, edi
  04fd3 e8 00 00 00 00   call    _postprocess_image
  04fd8 59               pop     ecx
$L27348:

; 1695 :        }
; 1696 : 
; 1697 :       UNBLOCK_INPUT;

  04fd9 ff 0d 00 00 00
        00               dec     DWORD PTR _interrupt_input_blocked
  04fdf 75 36            jne     SHORT $L27351
  04fe1 83 3d 00 00 00
        00 00            cmp     DWORD PTR _interrupt_input_pending, 0
  04fe8 74 05            je      SHORT $L27352
  04fea e8 00 00 00 00   call    _reinvoke_input_signal
$L27352:
  04fef 83 3d 00 00 00
        00 00            cmp     DWORD PTR _pending_atimers, 0
  04ff6 74 05            je      SHORT $L27350
  04ff8 e8 00 00 00 00   call    _do_pending_atimers
$L27350:

; 1698 :     }
; 1699 : 
; 1700 :   /* We're using IMG, so set its timestamp to `now'.  */
; 1701 :   EMACS_GET_TIME (now);

  04ffd 8d 45 f8         lea     eax, DWORD PTR _now$[ebp]
  05000 6a 00            push    0
  05002 50               push    eax
  05003 e8 00 00 00 00   call    _gettimeofday

; 1702 :   img->timestamp = EMACS_SECS (now);

  05008 8b 45 f8         mov     eax, DWORD PTR _now$[ebp]
  0500b 59               pop     ecx
  0500c 59               pop     ecx
  0500d 89 07            mov     DWORD PTR [edi], eax

; 1703 : 
; 1704 :   UNGCPRO;
; 1705 : 
; 1706 :   /* Value is the image id.  */
; 1707 :   return img->id;

  0500f 8b 47 50         mov     eax, DWORD PTR [edi+80]
  05012 5f               pop     edi
  05013 5e               pop     esi
  05014 5b               pop     ebx

; 1708 : }

  05015 c9               leave
  05016 c3               ret     0
$L27351:

; 1695 :        }
; 1696 : 
; 1697 :       UNBLOCK_INPUT;

  05017 83 3d 00 00 00
        00 00            cmp     DWORD PTR _interrupt_input_blocked, 0
  0501e 7d dd            jge     SHORT $L27350
  05020 e9 00 00 00 00   jmp     _w32_abort
_lookup_image ENDP
_TEXT   ENDS





reply via email to

[Prev in Thread] Current Thread [Next in Thread]