[Mips][msa] Add support for half

Add support for half (a.k.a. __fp16) in builtin descriptions. 
The second argument to BUILTIN() now accepts 'h' to represent half.

Patch by Daniel Sanders

llvm-svn: 188464
This commit is contained in:
Jack Carter 2013-08-15 15:16:57 +00:00
parent 51f358209f
commit 24bef98f96
2 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,7 @@
// c -> char
// s -> short
// i -> int
// h -> half
// f -> float
// d -> double
// z -> size_t

View File

@ -7552,6 +7552,11 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
"Bad modifiers used with 'v'!");
Type = Context.VoidTy;
break;
case 'h':
assert(HowLong == 0 && !Signed && !Unsigned &&
"Bad modifiers used with 'f'!");
Type = Context.HalfTy;
break;
case 'f':
assert(HowLong == 0 && !Signed && !Unsigned &&
"Bad modifiers used with 'f'!");