sumedh jambekar via llvm-dev
2018-Aug-16 13:24 UTC
[llvm-dev] LLVM does not recognize .dword directive.
Hello All, I am trying to compile the assembly language file using clang compiler. The assembly language file has many directives, and *".dword" *is one of the directives among those. When I try to compile, I am hitting the following error: *unknown directive .dword* If any one of you have seen this error before and solved it, can you please help me in solving this? Thanks, Sumedh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180816/609f2040/attachment.html>
Alex Bradbury via llvm-dev
2018-Aug-16 13:55 UTC
[llvm-dev] LLVM does not recognize .dword directive.
On 16 August 2018 at 14:24, sumedh jambekar via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Hello All, > > I am trying to compile the assembly language file using clang compiler. The > assembly language file has many directives, and ".dword" is one of the > directives among those. > > When I try to compile, I am hitting the following error: > unknown directive .dword > > If any one of you have seen this error before and solved it, can you please > help me in solving this?What architecture are you targeting? If gas for your architecture accepts .dword but LLVM's assembler doesn't then it is worth filing a bug <https://bugs.llvm.org/>. dword isn't one of the directives that is supported by the default AsmParser logic. The best way to enable it for a specific targetis to edit lib/Target/FooTarget/AsmParser/FooTargetAsmParser.cpp and add `Parser.addAliasForDirective(".dword", ".8byte");` or simlar to the FooTargetAsmParser constructor. Best, Alex