[LLVMdev] llvm-mc support for .cpu directive or AArch64

John Leidel (jleidel) jleidel at micron.com
Wed Dec 10 13:07:54 PST 2014


All, we’ve been running some internal tests with the various LLVM backend utilities.  In running some simply assembler tests for llvm-mc (3.5 release tree), we’ve found that the “.cpu” directive is not currently supported.  We generated an assembly file using the GNU-Linaro GCC 4.8.0 for AArch64 that contains this directive.  The assembly looks similar to the following: 

.cpu generic+fp+simd
        .file   "arm.c"
        .text
        .align  2
        .global __arm_function
        .type   __arm_function, %function
__arm_function:
        sub     sp, sp, #16

llvm-mc complains when we attempt to assemble it: 
arm.s:1:2: error: unknown directive
        .cpu generic+fp+simd

It seems somewhat logical that this directive wouldn’t be inherently necessary given the way that the backends (et.al. assembler, dissasmbler templates) are functionally organized in LLVM.  However, does anyone have any plans to implement this directive?  I would prefer not to parse+ignore it.  Are there any other known common directives from other codegens that don’t work?  

cheers
john  

—John D. Leidel




More information about the llvm-dev mailing list