mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -574,6 +574,7 @@ lltok::Kind LLLexer::LexIdentifier() {
|
||||
if (Len == strlen(STR) && !memcmp(StartChar, STR, strlen(STR))) { \
|
||||
TyVal = LLVMTY; return lltok::Type; }
|
||||
TYPEKEYWORD("void", Type::getVoidTy(Context));
|
||||
TYPEKEYWORD("half", Type::getHalfTy(Context));
|
||||
TYPEKEYWORD("float", Type::getFloatTy(Context));
|
||||
TYPEKEYWORD("double", Type::getDoubleTy(Context));
|
||||
TYPEKEYWORD("x86_fp80", Type::getX86_FP80Ty(Context));
|
||||
@@ -693,7 +694,7 @@ lltok::Kind LLLexer::Lex0x() {
|
||||
if (Kind == 'J') {
|
||||
// HexFPConstant - Floating point constant represented in IEEE format as a
|
||||
// hexadecimal number for when exponential notation is not precise enough.
|
||||
// Float and double only.
|
||||
// Half, Float, and double only.
|
||||
APFloatVal = APFloat(BitsToDouble(HexIntToVal(TokStart+2, CurPtr)));
|
||||
return lltok::APFloat;
|
||||
}
|
||||
|
Reference in New Issue
Block a user