unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
Subject: Re: Problem with library images on Windows (again)
Date: Thu, 19 May 2005 00:44:46 +0200	[thread overview]
Message-ID: <f7ccd24b05051815447b68f1ee@mail.gmail.com> (raw)
In-Reply-To: <jey8ac1gee.fsf@sykes.suse.de>

> That's quite different from the Unix calling conventions on i386, where
> only EAX, ECX and EDX are call-clobbered.

I was wrong wrt the MSVC calling conventions. MSDN docs say:

   All arguments are widened to 32 bits when they are passed.
   Return values are also widened to 32 bits and returned in the
   EAX register, except for 8-byte structures, which are returned
   in the EDX:EAX register pair. Larger structures are returned
   in the EAX register as pointers to hidden return structures.
   Parameters are pushed onto the stack from right to left.

   The compiler generates prolog and epilog code to save and
   restore the ESI, EDI, EBX, and EBP registers, if they are used
   in the function.

so it seems it's the same calling convention than on i386 Unixes: EAX
and EDX can be clobbered to return the function's result, and ECX
because it is not saved.

> That appears like a blatant bug in the compiler if it cannot properly
> track call-clobbered registers.

There's a bug somewhere, that's pretty clear. Whether that's an error
of the MSVC compiler or the MinGW libraries, I'm not sure yet. I've
been tracing lookup_image, and the fact is, the lookup_image code is
using EBX to cache "spec", and rightly so. But the call to tiff_load
(via img->type->load()) clobbers EBX!

-- 
                    /L/e/k/t/u

  reply	other threads:[~2005-05-18 22:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 15:53 Problem with library images on Windows (again) Juanma Barranquero
2005-05-18 19:30 ` Andreas Schwab
2005-05-18 22:44   ` Juanma Barranquero [this message]
2005-05-19  6:58     ` Jason Rumney
2005-05-18 22:16 ` Jason Rumney
2005-05-18 22:52   ` Juanma Barranquero
2005-05-19  3:50     ` Eli Zaretskii
2005-05-19  8:13       ` Juanma Barranquero
2005-05-19 19:05         ` Eli Zaretskii
2005-05-19 19:31           ` Juanma Barranquero
2005-05-19 19:32             ` Juanma Barranquero
2005-05-20  7:20             ` Eli Zaretskii
2005-05-20  8:24               ` Kim F. Storm
2005-05-20 10:01                 ` Eli Zaretskii
2005-05-20 10:16                 ` Jason Rumney
2005-05-20 10:42                   ` Juanma Barranquero
2005-05-20 14:44                     ` Eli Zaretskii
2005-05-20 15:46                       ` Jason Rumney
2005-05-20 15:52                         ` Eli Zaretskii
2005-05-20 16:33                           ` Juanma Barranquero
2005-05-20 17:57                             ` Juanma Barranquero
2005-05-21 10:21                               ` Jason Rumney
2005-05-21 10:33                                 ` Juanma Barranquero
2005-05-21 21:13                                   ` Jason Rumney
2005-05-22 21:21                                     ` Juanma Barranquero
2005-06-03 12:08                                       ` Juanma Barranquero
2005-06-03 13:06                                         ` David Kastrup
2005-06-03 15:28                                           ` jasonr
2005-06-03 17:23                                             ` Stefan Monnier
2005-06-05  0:44                                           ` Juanma Barranquero
2005-06-06 11:26                                             ` Juanma Barranquero
2005-06-14  2:02                                               ` Juanma Barranquero
2005-06-14  7:32                                                 ` David Kastrup
2005-06-14  9:15                                                   ` Juanma Barranquero
2005-05-20 16:31                         ` Juanma Barranquero
2005-05-20 16:29                       ` Juanma Barranquero
2005-05-20 12:19                   ` Benjamin Riefenstahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b05051815447b68f1ee@mail.gmail.com \
    --to=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).