[LLVMbugs] [Bug 23998] New: ARM inline asm - cp10/cp11 rejected under armv7a

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 30 15:36:20 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23998

            Bug ID: 23998
           Summary: ARM inline asm - cp10/cp11 rejected under armv7a
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: shenhan at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

glibc macro FPU_GETCW, FPU_SETCP (see below) is rejected by clang because
ARMAsmParser thinks that cp10, cp11 is not accessible under armv7/armv8. That's
not correct for armv7a with neon/vfp feature.

According to ARMv7a Architecture Reference manual - A2.9
Any implementation that includes either or both of the Advanced SIMD extension
and the VFP extension must enable access to both CP10 and CP11.

Code reference - 
> sysdeps/arm/fpu__control.h
#define _FPU_GETCW(cw) \
  __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw))

#define _FPU_SETCW(cw) \
  __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))

> ARMAsmParser.cpp - 
ARMAsmParser::OperandMatchResultTy
  ... ...
  // ARMv7 and v8 don't allow cp10/cp11 due to VFP/NEON specific instructions
  if ((hasV7Ops() || hasV8Ops()) && (Num == 10 || Num == 11))
    return MatchOperand_NoMatch;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150630/7e7a2781/attachment.html>


More information about the llvm-bugs mailing list