diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 17fe1437cea..891930d9e7c 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -985,7 +985,7 @@ bool AsmParser::ParseStatement() { return ParseDirectiveValue(8); if (IDVal == ".8byte") return ParseDirectiveValue(8); - if (IDVal == ".single") + if (IDVal == ".single" || IDVal == ".float") return ParseDirectiveRealValue(APFloat::IEEEsingle); if (IDVal == ".double") return ParseDirectiveRealValue(APFloat::IEEEdouble); diff --git a/test/MC/AsmParser/floating-literals.s b/test/MC/AsmParser/floating-literals.s index b8e6e3cc800..bd122a8cf0e 100644 --- a/test/MC/AsmParser/floating-literals.s +++ b/test/MC/AsmParser/floating-literals.s @@ -5,6 +5,9 @@ # CHECK: .long 1077936128 # CHECK: .long 1082549862 .single 1.2455, +2.3, 3, + 4.2 + +# CHECK: .long 1067928519 +.float 1.307 # CHECK: .quad 4617315517961601024 # CHECK: .quad 4597526701198935065