[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#221291: [ia64] `asm' operand requires impossible reload

Package: gcc-3.3
Version: 1:3.3.2ds4-3
Severity: normal

Hello GCC maintainers,

On ia64, gcc fails to compile the following file
(available at

merulo% gcc test2.c
test2.c: In function `muluu':
test2.c:20: error: `asm' operand requires impossible reload

Compiling with -O, -O1,-O2 or -Os avoid the problem,
as does removing the `register' keyword line 18.

Since the build fail before the assembler is called, the code
in the asm statement is irrelevant, only the constraint are

In fact a asm statement of
__asm__ ("": "=f" (hiremainder) );
or even
__asm__ ("": :"f" (hiremainder) );
would be sufficient to trigger the problem.

Bill. <ballombe@debian.org>

Imagine a large red swirl here. 

typedef unsigned long ulong;
typedef long *GEN;

#define mulll(a, b)                                                     \
({                                                                      \
  ulong __arg1 = (a), __arg2 = (b), __value;                            \
  __asm__ ("xma.hu %0 = %2, %3, f0\n\t;;\n\txma.l %1 = %2, %3, f0"      \
           : "=&f" (hiremainder), "=f" (__value)                        \
           : "f" (__arg1), "f" (__arg2));                               \
  __value;                                                              \

muluu(ulong x, ulong y)
  long p1;
  GEN z;
  register ulong hiremainder;

  p1 = mulll(x,y);
  if (hiremainder)
    z[2]=hiremainder; z[3]=p1; return z;
  z[2]=p1; return z;

Reply to: