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]

gcc 2.95.2 and checker: invalid asm constructs



Despite my workplace ;) I'm not knowledgeable in assembler
coding. I'm trying to compile Checker with gcc 2.95.2 when I
get the following messages about invalid asm's.

I know about the 'invalid asm' issue in general (it 'works'
with egcs-2.91.66) but I'm not an assembler guy.

I would be grateful if someone knowledgeable were willing
to tell me off-list how to fix these asm's.
There are probably only 2 or 3 different patterns altogether,
and I should be quite capable of acting as a somewhat enhanced
search-and-replace engine.

I'll try and mail the result to Tristan, the maintainer, finally.


Best regards,

Claus


*********************************************************


#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



-- 
claus.fischer@intel.com   Intel Corporation SC12-205 ... not speaking
phone   +1-408-765-6808   2200 Mission College Blvd.           for Intel
fax     +1-408-765-9322   Santa Clara, CA 95052-8119


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