Index: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp =================================================================== --- llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -244,10 +244,11 @@ // Alias .hword/.word/xword to the target-independent .2byte/.4byte/.8byte // directives as they have the same form and semantics: - /// ::= (.hword | .word | .xword ) [ expression (, expression)* ] + /// ::= (.hword | .word | .xword | .dword ) [ expression (, expression)* ] Parser.addAliasForDirective(".hword", ".2byte"); Parser.addAliasForDirective(".word", ".4byte"); Parser.addAliasForDirective(".xword", ".8byte"); + Parser.addAliasForDirective(".dword", ".8byte"); // Initialize the set of available features. setAvailableFeatures(ComputeAvailableFeatures(getSTI().getFeatureBits())); Index: llvm/test/MC/AArch64/data-directives-invalid.s =================================================================== --- /dev/null +++ llvm/test/MC/AArch64/data-directives-invalid.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple aarch64 < %s 2>&1 | FileCheck %s + +# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.hword' directive +.hword 0xffffa +# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.2byte' directive +.2byte 0xffffa +# CHECK: [[@LINE+1]]:7: error: out of range literal value in '.word' directive +.word 0xffffffffa +# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.4byte' directive +.4byte 0xffffffffa +# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.dword' directive +.dword 0xffffffffffffffffa +# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.xword' directive +.xword 0xffffffffffffffffa +# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.8byte' directive +.8byte 0xffffffffffffffffa