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

Renato Golin renato.golin at linaro.org
Thu Dec 11 02:15:04 PST 2014


To whomever plan to implement that, please be wary of this bug:

http://llvm.org/bugs/show_bug.cgi?id=20757

and add a FIXME to that effect, as we did on ARM.

Also, we're planning on implementing a push/pop mechanism to make it
sane to use cpu/fpu directives.

cheers,
--renato

On 10 December 2014 at 21:07, John Leidel (jleidel) <jleidel at micron.com> wrote:
> 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
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list