aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/MC/AsmParser/directive_values.s5
-rw-r--r--tools/llvm-mc/AsmParser.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/test/MC/AsmParser/directive_values.s b/test/MC/AsmParser/directive_values.s
index beac69a..900fb73 100644
--- a/test/MC/AsmParser/directive_values.s
+++ b/test/MC/AsmParser/directive_values.s
@@ -19,3 +19,8 @@ TEST2:
# CHECK: .quad 9
TEST3:
.quad 9
+
+# CHECK: TEST4:
+# CHECK: .short 3
+TEST4:
+ .word 3
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp
index b766830..eec4cc8 100644
--- a/tools/llvm-mc/AsmParser.cpp
+++ b/tools/llvm-mc/AsmParser.cpp
@@ -517,7 +517,7 @@ bool AsmParser::ParseStatement() {
// FIXME: Target hooks for size? Also for "word", "hword".
if (IDVal == ".byte")
return ParseDirectiveValue(1);
- if (IDVal == ".short")
+ if (IDVal == ".short" || IDVal == ".word")
return ParseDirectiveValue(2);
if (IDVal == ".long")
return ParseDirectiveValue(4);