This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug target/13515] New: `asm' operand requires impossible reload


[forwarded from http://bugs.debian.org/221291]

currently unable to recheck due to lack of ia64 hardware ...


Hello GCC maintainers,

On ia64, gcc fails to compile the following file

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
important.

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

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 

---test2.c--------
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;                                                              \
})

GEN
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;
}

-- 
           Summary: `asm' operand requires impossible reload
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-linux
  GCC host triplet: ia64-linux
GCC target triplet: ia64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13515


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