[PATCH] D46911: Addition of the remaining fixed point types and their saturated equivalents

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 15 16:03:33 PDT 2018


leonardchan created this revision.
leonardchan added a project: clang.

This diff includes changes for the remaining _Fract and _Sat fixed point types.

  signed short _Fract s_short_fract;
  signed _Fract s_fract;
  signed long _Fract s_long_fract;
  unsigned short _Fract u_short_fract;
  unsigned _Fract u_fract;
  unsigned long _Fract u_long_fract;
  
  // Aliased fixed point types
  short _Accum short_accum;
  _Accum accum;
  long _Accum long_accum;
  short _Fract short_fract;
  _Fract fract;
  long _Fract long_fract;
  
  // Saturated fixed point types
  _Sat signed short _Accum sat_s_short_accum;
  _Sat signed _Accum sat_s_accum;
  _Sat signed long _Accum sat_s_long_accum;
  _Sat unsigned short _Accum sat_u_short_accum;
  _Sat unsigned _Accum sat_u_accum;
  _Sat unsigned long _Accum sat_u_long_accum;
  _Sat signed short _Fract sat_s_short_fract;
  _Sat signed _Fract sat_s_fract;
  _Sat signed long _Fract sat_s_long_fract;
  _Sat unsigned short _Fract sat_u_short_fract;
  _Sat unsigned _Fract sat_u_fract;
  _Sat unsigned long _Fract sat_u_long_fract;
  
  // Aliased saturated fixed point types
  _Sat short _Accum sat_short_accum;
  _Sat _Accum sat_accum;
  _Sat long _Accum sat_long_accum;
  _Sat short _Fract sat_short_fract;
  _Sat _Fract sat_fract;
  _Sat long _Fract sat_long_fract;

This diff only allows for declaration of these fixed point types. Assignment and other operations done on fixed point types according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in future patches.

This is a parent of https://reviews.llvm.org/D46084


Repository:
  rC Clang

https://reviews.llvm.org/D46911

Files:
  include/clang/AST/ASTContext.h
  include/clang/AST/BuiltinTypes.def
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/Specifiers.h
  include/clang/Basic/TokenKinds.def
  include/clang/Sema/DeclSpec.h
  include/clang/Serialization/ASTBitCodes.h
  lib/AST/ASTContext.cpp
  lib/AST/ExprConstant.cpp
  lib/AST/ItaniumMangle.cpp
  lib/AST/MicrosoftMangle.cpp
  lib/AST/NSAPI.cpp
  lib/AST/Type.cpp
  lib/AST/TypeLoc.cpp
  lib/Analysis/PrintfFormatString.cpp
  lib/CodeGen/CGDebugInfo.cpp
  lib/CodeGen/CodeGenTypes.cpp
  lib/CodeGen/ItaniumCXXABI.cpp
  lib/Index/USRGeneration.cpp
  lib/Parse/ParseDecl.cpp
  lib/Sema/DeclSpec.cpp
  lib/Sema/SemaTemplateVariadic.cpp
  lib/Sema/SemaType.cpp
  lib/Serialization/ASTCommon.cpp
  lib/Serialization/ASTReader.cpp
  test/Frontend/accum.c
  test/Frontend/accum_errors.c
  test/Frontend/accum_errors.cpp
  test/Frontend/fixed_point.c
  test/Frontend/fixed_point_errors.c
  test/Frontend/fixed_point_errors.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46911.146950.patch
Type: text/x-patch
Size: 45296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180515/240b9096/attachment-0001.bin>


More information about the cfe-commits mailing list