From 14e66553d57ebec1d8ca6619f6570c5342a7a764 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Fri, 28 Jan 2011 14:20:32 +0000 Subject: [PATCH] Add support for parsing .float git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124485 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCParser/AsmParser.cpp | 2 +- test/MC/AsmParser/floating-literals.s | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- 2.34.1