public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* FW: I need help
@ 2000-08-08 7:51 Michael L Benson
2000-08-08 18:08 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Michael L Benson @ 2000-08-08 7:51 UTC (permalink / raw)
To: bug-gcc
-----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
~
~
~
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: FW: I need help
2000-08-08 7:51 FW: I need help Michael L Benson
@ 2000-08-08 18:08 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2000-08-08 18:08 UTC (permalink / raw)
To: Michael L Benson; +Cc: bug-gcc
On Aug 8, 2000, "Michael L Benson" <mbenson@magideas.com> wrote:
> ./config/i386/Linux/munmap.c:31: fixed or forbidden register 3 (bx) was spilled for class BREG.
> : "0" (SYS_munmap),"d" ((long)(addr)),"c" ((long)(len)):"bx");
This is wrong. `ebx' is a fixed register when generating PIC.
Moreover, the asm code preserves it, so it's not true that it is
clobbered.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-08-08 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-08 7:51 FW: I need help Michael L Benson
2000-08-08 18:08 ` Alexandre Oliva
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).