All of lore.kernel.org
 help / color / mirror / Atom feed
* "fixed or forbidden register 0 (ax) was spilled for class AREG"
@ 2002-12-20 23:14 Andre Majorel
  0 siblings, 0 replies; only message in thread
From: Andre Majorel @ 2002-12-20 23:14 UTC (permalink / raw)
  To: linux-gcc

Greetings gentlemen. Trying to compile Linux-hexen 0.6.0 with
GCC 2.95.4, I got "Invalid `asm' statement" errors. The errors
occur in a routine that seems to multiply a 16.16 fixed point
number by a integer. Here's a fragment that triggers the error :

   1  typedef int fixed_t;
   2  
   3  int foo (void)
   4  {
   5    int f_w;
   6    fixed_t m_w;
   7    fixed_t scale_ftom;
   8  
   9    m_w =
  10    (
  11      {
  12        int __value, __fb = (scale_ftom);
  13        __asm__("imul %%ebx; shrd $16,%%edx,%%eax"
  14                : "=a" (__value)
  15                : "a" (f_w<<16), "b" (__fb)
  16                : "eax", "edx");
  17        __value;
  18      }
  19    );
  20  }

  $ gcc badasm.c
  badasm.c: In function `foo':
  badasm.c:16: Invalid `asm' statement:
  badasm.c:16: fixed or forbidden register 0 (ax) was spilled for class AREG.

This code used to compile before GCC was upgraded. I'd
appreciate any hints on how to fix it.

-- 
André Majorel <amajorel@teaser.fr>
http://www.teaser.fr/~amajorel/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-20 23:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-20 23:14 "fixed or forbidden register 0 (ax) was spilled for class AREG" Andre Majorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.