llvm-mc: Accept .word as a synonym for .short

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-08-11 04:44:00 +00:00
parent bfc0f34e34
commit 1e840b2c61
2 changed files with 6 additions and 1 deletions

View File

@ -19,3 +19,8 @@ TEST2:
# CHECK: .quad 9 # CHECK: .quad 9
TEST3: TEST3:
.quad 9 .quad 9
# CHECK: TEST4:
# CHECK: .short 3
TEST4:
.word 3

View File

@ -517,7 +517,7 @@ bool AsmParser::ParseStatement() {
// FIXME: Target hooks for size? Also for "word", "hword". // FIXME: Target hooks for size? Also for "word", "hword".
if (IDVal == ".byte") if (IDVal == ".byte")
return ParseDirectiveValue(1); return ParseDirectiveValue(1);
if (IDVal == ".short") if (IDVal == ".short" || IDVal == ".word")
return ParseDirectiveValue(2); return ParseDirectiveValue(2);
if (IDVal == ".long") if (IDVal == ".long")
return ParseDirectiveValue(4); return ParseDirectiveValue(4);