r225600 - Basic: The asm constraint '+#r' isn't valid, reject it

Hal Finkel hfinkel at anl.gov
Tue Jan 13 19:48:02 PST 2015


David, Saleem,

Perhaps you (or anyone reading this) can provide some insight. trunk recently stopped being able to compile tramp3d-v4 on my PPC64/Linux box, with this error:

test-suite/MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.cpp:51974:3: error: invalid input constraint
      'i#*X' in asm
  feclearexcept((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID));
  ^
/usr/include/bits/fenvinline.h:56:11: note: expanded from macro 'feclearexcept'
                           : : "i#*X"(__builtin_ffs (__excepts)));            \
                               ^

The full macro definition is:

/* Inline definition for feclearexcept.  */
# define feclearexcept(__excepts) \
  ((__builtin_constant_p (__excepts)                                          \
    && ((__excepts) & ((__excepts)-1)) == 0                                   \
    && (__excepts) != FE_INVALID)                                             \
   ? ((__excepts) != 0                                                        \
      ? (__extension__ ({ __asm__ __volatile__                                \
                          ("mtfsb0 %s0"                                       \
                           : : "i#*X"(__builtin_ffs (__excepts)));            \
                          0; }))                                              \
      : 0)                                                                    \
   : (feclearexcept) (__excepts))


Any idea why?

Thanks in advance,
Hal

----- Original Message -----
> From: "David Majnemer" <david.majnemer at gmail.com>
> To: cfe-commits at cs.uiuc.edu
> Sent: Sunday, January 11, 2015 2:52:38 AM
> Subject: r225600 - Basic: The asm constraint '+#r' isn't valid, reject it
> 
> Author: majnemer
> Date: Sun Jan 11 02:52:38 2015
> New Revision: 225600
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=225600&view=rev
> Log:
> Basic: The asm constraint '+#r' isn't valid, reject it
> 
> Modified:
>     cfe/trunk/lib/Basic/TargetInfo.cpp
>     cfe/trunk/test/Sema/asm.c
> 
> Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=225600&r1=225599&r2=225600&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
> +++ cfe/trunk/lib/Basic/TargetInfo.cpp Sun Jan 11 02:52:38 2015
> @@ -486,9 +486,13 @@ bool TargetInfo::validateOutputConstrain
>        if (Name[1] == '=' || Name[1] == '+')
>          Name++;
>        break;
> +    case '#': // Ignore as constraint.
> +      while (Name[1] && Name[1] != ',')
> +        Name++;
> +      if (Name[1] != ',')
> +        return false;
>      case '?': // Disparage slightly code.
>      case '!': // Disparage severely.
> -    case '#': // Ignore as constraint.
>      case '*': // Ignore for choosing register preferences.
>        break;  // Pass them.
>      }
> 
> Modified: cfe/trunk/test/Sema/asm.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/asm.c?rev=225600&r1=225599&r2=225600&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/asm.c (original)
> +++ cfe/trunk/test/Sema/asm.c Sun Jan 11 02:52:38 2015
> @@ -177,3 +177,9 @@ void fn2() {
>   __asm__(""
>            : "+&m"(l)); // expected-error {{invalid output constraint
>            '+&m' in asm}}
>  }
> +
> +void fn3() {
> +  int l;
> + __asm__(""
> +          : "+#r"(l)); // expected-error {{invalid output constraint
> '+#r' in asm}}
> +}
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the cfe-commits mailing list