delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/06/13:15:12

From: Jason Stratos Papadopoulos <jasonp AT z DOT glue DOT umd DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: what does this assembler error mean?
Date: 6 Aug 2000 17:00:24 GMT
Organization: University of Maryland College Park
Lines: 30
Message-ID: <8mk5j8$493$1@hecate.umd.edu>
NNTP-Posting-Host: z.glue.umd.edu
X-Trace: hecate.umd.edu 965581224 4387 128.8.10.71 (6 Aug 2000 17:00:24 GMT)
X-Complaints-To: abuse AT wam DOT umd DOT edu
NNTP-Posting-Date: 6 Aug 2000 17:00:24 GMT
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (SunOS/5.6 (sun4u))
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello. I recently upgraded my copy of DJGPP 2.7.2.1 to 2.95.2 and was
very impressed by the improvement in code quality. However, it looks like
the assembler expects different syntax now. For this compile:

gcc -O3 -march=i586 -malign-functions=4 -malign-loops=4 -malign-jumps=3
-fomit-frame-pointer -funroll-loops -fno-inline-functions  -MMD -o
helper.o -c helper.c

what does this error:

helper.c: In function `trace_putc':
helper.c:47: Invalid `asm' statement:
helper.c:47: fixed or forbidden register 0 (ax) was spilled for class AREG

mean when applied to this code?

void trace_putc(char c)
{
   asm (
      " int $0x21 "
   : 
   : "a" (0x200),"d" (c)
   : "%eax","%ebx","%ecx","%edx","%esi","%edi"  );
}

From what I understand of DJGPP inline assembly the syntax above is fine,
yet this assembler error has cropped up in two separate packages. 

Any help appreciated,
jasonp

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019