Index: llvm/lib/MC/MCParser/AsmParser.cpp =================================================================== --- llvm/lib/MC/MCParser/AsmParser.cpp +++ llvm/lib/MC/MCParser/AsmParser.cpp @@ -3076,6 +3076,12 @@ // Convert to an APFloat. APFloat Value(Semantics); StringRef IDVal = getTok().getString(); + + // We do not currently handle ASCII literals e.g. 't' = 116 + if(getLexer().is(AsmToken::Integer) && IDVal.startswith("'")){ + return TokError("ASCII literal not supported"); + } + if (getLexer().is(AsmToken::Identifier)) { if (!IDVal.compare_lower("infinity") || !IDVal.compare_lower("inf")) Value = APFloat::getInf(Semantics); Index: llvm/test/MC/AsmParser/floating-literals.s =================================================================== --- llvm/test/MC/AsmParser/floating-literals.s +++ llvm/test/MC/AsmParser/floating-literals.s @@ -90,6 +90,8 @@ .double 1e1e # CHECK-ERROR: Invalid sign in float literal .double 2.+1 +#CHECK-ERROR: error: ASCII literal not supported in '.double' directive +.double 't' # CHECK: .long 1310177520 .float 0x12f7.1ep+17