On Wed, 2011-05-18 at 17:08 +0200, Samuel Thibault wrote:
> Svante Signell, le Wed 18 May 2011 16:54:24 +0200, a écrit :
..
> > Is this OK? There is also a similar case in the glibc code.
> 
> Where?

See below: Changing "1" and "2" to "m" made the warnings disappear. But
you say that this is not the correct solution. Care to explain what that
code is doing and what the changes mean?

File: sysdeps/mach/hurd/i386/intr_msg.h.

/* Note that we must mark OPTION and TIMEOUT as outputs of this
operation, to indicate that the signal thread might mutate them as part
of sending us to a signal handler.  */

#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name,
timeout, notify)                                                       \
(                                                                      \
error_t err;                                                           \
  asm (".globl _hurd_intr_rpc_msg_do_trap\n"                           \
       ".globl _hurd_intr_rpc_msg_in_trap\n"                           \
       ".globl _hurd_intr_rpc_msg_cx_sp \n"                            \
       ".globl _hurd_intr_rpc_msg_sp_restored\n"                       \
       "                                movl %%esp, %%ecx              \
       "                                leal %3, %%esp\n"              \
       "_hurd_intr_rpc_msg_cx_sp:       movl $-25, %%eax\n"            \
       "_hurd_intr_rpc_msg_do_trap:     lcall $7, $0 # status in %0\n" \
       "_hurd_intr_rpc_msg_in_trap:     movl %%ecx, %%esp\n"           \
       "_hurd_intr_rpc_msg_sp_restored:"                               \
       : "=a" (err), "=m" (option), "=m" (timeout)                     \
       : "m" ((&msg)[-1]), "1" (option), "2" (timeout)                 \
       : "%ecx");                                                      \
  err;                                                                 \
})



Reply via email to