summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-19 02:47:30 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-19 02:47:30 +0000
commit235c8d2d94022a0bcff5b0888abb12a407210154 (patch)
tree96c4cfaa0d625262d4ad28136ebffd691df68b43 /llvm
parenta9bc0656072b957725d2eea7bd34b176f9a8670e (diff)
downloadbcm5719-llvm-235c8d2d94022a0bcff5b0888abb12a407210154.tar.gz
bcm5719-llvm-235c8d2d94022a0bcff5b0888abb12a407210154.zip
ARM assembly diagnostic caret in better position for FPImm.
llvm-svn: 148459
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 29a02f69590..c8e733df2d2 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -4277,6 +4277,7 @@ parseFPImm(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
Parser.Lex();
}
const AsmToken &Tok = Parser.getTok();
+ SMLoc Loc = Tok.getLoc();
if (Tok.is(AsmToken::Real)) {
APFloat RealVal(APFloat::IEEEdouble, Tok.getString());
uint64_t IntVal = RealVal.bitcastToAPInt().getZExtValue();
@@ -4285,7 +4286,7 @@ parseFPImm(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
int Val = ARM_AM::getFP64Imm(APInt(64, IntVal));
Parser.Lex(); // Eat the token.
if (Val == -1) {
- TokError("floating point value out of range");
+ Error(Loc, "floating point value out of range");
return MatchOperand_ParseFail;
}
Operands.push_back(ARMOperand::CreateFPImm(Val, S, getContext()));
@@ -4295,14 +4296,14 @@ parseFPImm(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
int64_t Val = Tok.getIntVal();
Parser.Lex(); // Eat the token.
if (Val > 255 || Val < 0) {
- TokError("encoded floating point value out of range");
+ Error(Loc, "encoded floating point value out of range");
return MatchOperand_ParseFail;
}
Operands.push_back(ARMOperand::CreateFPImm(Val, S, getContext()));
return MatchOperand_Success;
}
- TokError("invalid floating point immediate");
+ Error(Loc, "invalid floating point immediate");
return MatchOperand_ParseFail;
}
/// Parse a arm instruction operand. For now this parses the operand regardless
OpenPOWER on IntegriCloud