This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc 2.95.2 and checker: invalid asm constructs


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]