delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/29/05:36:25

From: "Andrew Davidson" <andrew AT lemure DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Fixed or forbidden register spilled error (bloody inline asm cocking up again)
Date: Mon, 29 Mar 1999 11:31:33 +0100
Organization: Customer of Planet Online
Lines: 34
Message-ID: <7dnkt6$fis$1@news4.svr.pol.co.uk>
NNTP-Posting-Host: modem-13.praseodymium.dialup.pol.co.uk
X-Trace: news4.svr.pol.co.uk 922703590 15964 62.136.29.13 (29 Mar 1999 10:33:10 GMT)
NNTP-Posting-Date: 29 Mar 1999 10:33:10 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm having a neat little problem with a teeny little bit of inline
assembler. The line goes like this:

 asm (
 "call %%esi\n"
   : "=a" (regpcaf), "=b" (regiyhl), "=c" (regixbc), "=d" (regspde)
   : "a" (regpcaf),"b" (regiyhl), "c" (regixbc), "d" (regspde), "S"
(cpuid->scratchmem), "D" (cpuid->cpumem)
   : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"
   );

(all the reg...s are #defines but fear not, they all work perfectly).

Now that USED to compile... however, after a bit of code tweaking I get the
following error
message:

Error: fixed or forbidden register was spilled.
This may be due to a compiler bug or to impossible asm
statements or clauses.

Which is frankly crap. If I remove ANY of the arguments on the 'inputs' line
of the asm
statements it compiles (and executes) fine. So what am I doing wrong? Is
this really a bug in
DJGPP? I'm pretty sure it's all my fault as I really haven't got the hang of
the asm() function.

Thanks for any help,
Andrew




- Raw text -


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