[PATCH] D78662: [builtins] Support architectures with 16-bit int

Anatoly Trosinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 09:22:45 PDT 2020


atrosinenko added a comment.

> I changed the integer types used in many builtins (si_int, du_int, etc) to specific integer widths. My rationale is that even though the libgcc documentation uses types such as int / long / long long, I believe their bit width is actually much more strictly defined.

When porting compiler-rt builtins to MSP430 and wondering why my locally built clang_rt turns out to differ from libgcc in ABI, I finally read an introduction comment one level above <https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html> explicitly mentioning:

> These routines take arguments and return values of a specific machine mode, not a specific C type. See Machine Modes, for an explanation of this concept. For illustrative purposes, in this chapter the floating point type float is assumed to correspond to SFmode; double to DFmode; and long double to both TFmode and XFmode. Similarly, the integer types int and unsigned int correspond to SImode; long and unsigned long to DImode; and long long and unsigned long long to TImode.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78662/new/

https://reviews.llvm.org/D78662





More information about the llvm-commits mailing list