This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 2.95.2 and checker: invalid asm constructs
- To: Claus Fischer <claus dot fischer at intel dot com>
- Subject: Re: gcc 2.95.2 and checker: invalid asm constructs
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 28 Oct 1999 15:51:11 -0700
- Cc: gcc at gcc dot gnu dot org, bug-checker at gnu dot org
- References: <Pine.LNX.4.10.9910281442470.24917-100000@tcadi02.sc.intel.com>
On Thu, Oct 28, 1999 at 02:56:39PM -0700, Claus Fischer wrote:
> #if defined(__PIC__) || defined (__pic__)
> int
> chkr_munmap(caddr_t addr, size_t len)
> {
> long __res;
> __asm__ __volatile__ ("pushl %%ebx\n\t"
> "movl %%edx,%%ebx\n\t"
> "int $0x80\n\t"
> "popl %%ebx"
> : "=a" (__res)
> : "0" (SYS_munmap),"d" ((long)(addr)),"c" ((long)(len)):"bx");
> if (__res >= 0)
> return (int) __res;
> chkr_errno = -__res;
> return -1;
> }
I suggest replacing this whole sequence with
syscall(SYS_munmap, addr, len);
r~