diff options
author | Dale Johannesen <dalej@apple.com> | 2007-09-12 03:30:33 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-09-12 03:30:33 +0000 |
commit | fbd9cdafa9a1e124a0866470dc1d8f514d5db30e (patch) | |
tree | da064f263b6242adf84ced2a98439707a6114ddd /lib/AsmParser | |
parent | f5febb9ef86c5f67872301153137d3cf7db1c62f (diff) | |
download | external_llvm-fbd9cdafa9a1e124a0866470dc1d8f514d5db30e.zip external_llvm-fbd9cdafa9a1e124a0866470dc1d8f514d5db30e.tar.gz external_llvm-fbd9cdafa9a1e124a0866470dc1d8f514d5db30e.tar.bz2 |
Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/Lexer.l | 12 | ||||
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index 5acbbac..73e9c54 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -284,8 +284,8 @@ void { RET_TY(Type::VoidTy, VOID); } float { RET_TY(Type::FloatTy, FLOAT); } double { RET_TY(Type::DoubleTy,DOUBLE);} x86_fp80 { RET_TY(Type::X86_FP80Ty, X86_FP80);} -fp128 { RET_TY(Type::FP128Ty, FP128);} -ppc_fp128 { RET_TY(Type::PPC_FP128Ty, PPC_FP128);} +fp128 { RET_TY(Type::FP128Ty, FP128);} +ppc_fp128 { RET_TY(Type::PPC_FP128Ty, PPC_FP128);} label { RET_TY(Type::LabelTy, LABEL); } type { return TYPE; } opaque { return OPAQUE; } @@ -477,21 +477,21 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } } {FPConstant} { llvmAsmlval.FPVal = new APFloat(atof(yytext)); return FPVAL; } -{HexFPConstant} { llvmAsmlval.FPVal = new APFloat(HexToFP(yytext)); +{HexFPConstant} { llvmAsmlval.FPVal = new APFloat(HexToFP(yytext+2)); return FPVAL; } {HexFP80Constant} { uint64_t Pair[2]; - HexToIntPair(yytext, Pair); + HexToIntPair(yytext+3, Pair); llvmAsmlval.FPVal = new APFloat(APInt(80, 2, Pair)); return FPVAL; } {HexFP128Constant} { uint64_t Pair[2]; - HexToIntPair(yytext, Pair); + HexToIntPair(yytext+3, Pair); llvmAsmlval.FPVal = new APFloat(APInt(128, 2, Pair)); return FPVAL; } {HexPPC128Constant} { uint64_t Pair[2]; - HexToIntPair(yytext, Pair); + HexToIntPair(yytext+3, Pair); llvmAsmlval.FPVal = new APFloat(APInt(128, 2, Pair)); return FPVAL; } diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index c0374da..d2e5256 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1866,7 +1866,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr $$ = ConstantInt::getFalse(); CHECK_FOR_ERROR } - | FPType FPVAL { // Float & Double constants + | FPType FPVAL { // Floating point constants if (!ConstantFP::isValueValidForType($1, *$2)) GEN_ERROR("Floating point constant invalid for type"); // Lexer has no type info, so builds all float and double FP constants |