This is the mail archive of the gcc-bugs@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]

FW: I need help




-----Original Message-----
From: Michael L Benson [mailto:mbenson@magideas.com]
Sent: Tuesday, August 08, 2000 10:48 AM
To: bug-checker@gnu.org
Cc: bugs@gcc.gnu.org
Subject: I need help
Importance: High


I am using gcc version 2.95.2 19991024 (release).

I am trying to compile and use Checker to find a memory leak / segmenation
fault in our program which is causing all types of problems.  For this
application a later compiler is needed than the 2.8.1 you suggest.  The
error I am getting compiling checker is:

gcc -c -DGCCCHECKER   -I. -I./l-malloc -I. -I./lib -I./config/obj-formats -I
./co
nfig/i386/Linux -O2 -g -Wall -Wstrict-prototypes
./config/i386/Linux/munmap.c -
o munmap.o
./config/i386/Linux/munmap.c: In function `chkr_munmap':
./config/i386/Linux/munmap.c:31: Invalid `asm' statement:
./config/i386/Linux/munmap.c:31: fixed or forbidden register 3 (bx) was
spilled
for class BREG.

Any help would be greatly appreciated.


The code for it is below:

#include <syscall.h>
#include <sys/types.h>
#include <sys/mman.h>

extern int chkr_errno;
int chkr_munmap(caddr_t addr, size_t len);

#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;
}

}
#else
int
chkr_munmap(caddr_t addr, size_t len)
{
  long __res;
  __asm__ __volatile__ ("int $0x80"
    : "=a" (__res)
    : "0" (SYS_munmap),"b" ((long)(addr)),"c" ((long)(len)):"bx");
  if (__res >= 0)
    return (int) __res;
  chkr_errno = -__res;
  return -1;
}
#endif

~
~
~


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