[builtins] Change si_int to int in some helper declarations
authorAnatoly Trosinenko <atrosinenko@accesssoftek.com>
Tue, 30 Jun 2020 08:06:52 +0000 (11:06 +0300)
committerAnton Korobeynikov <anton@korobeynikov.info>
Tue, 30 Jun 2020 08:07:02 +0000 (11:07 +0300)
commit0ee439b705e82a4fe20e266bc8fea96d0e60e1ec
tree1dee43e6e8a4bbd1ec8346876554c5f2ab686938
parent19e75717eff2c22e6643addcc44caa8dc2f0125f
[builtins] Change si_int to int in some helper declarations

This patch changes types of some integer function arguments or return values from `si_int` to the default `int` type to make it more compatible with `libgcc`.

The compiler-rt/lib/builtins/README.txt has a link to the [libgcc specification](http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc). This specification has an explicit note on `int`, `float` and other such types being just illustrations in some cases while the actual types are expressed with machine modes.

Such usage of always-32-bit-wide integer type may lead to issues on 16-bit platforms such as MSP430. Provided [libgcc2.h](https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=libgcc/libgcc2.h;hb=HEAD) can be used as a reference for all targets supported by the libgcc, this patch fixes some existing differences in helper declarations.

This patch is expected to not change behavior at all for targets with 32-bit `int` type.

Differential Revision: https://reviews.llvm.org/D81285
33 files changed:
compiler-rt/lib/builtins/README.txt
compiler-rt/lib/builtins/clzdi2.c
compiler-rt/lib/builtins/clzsi2.c
compiler-rt/lib/builtins/clzti2.c
compiler-rt/lib/builtins/ctzdi2.c
compiler-rt/lib/builtins/ctzsi2.c
compiler-rt/lib/builtins/ctzti2.c
compiler-rt/lib/builtins/ffsti2.c
compiler-rt/lib/builtins/int_lib.h
compiler-rt/lib/builtins/paritydi2.c
compiler-rt/lib/builtins/paritysi2.c
compiler-rt/lib/builtins/parityti2.c
compiler-rt/lib/builtins/popcountsi2.c
compiler-rt/lib/builtins/popcountti2.c
compiler-rt/lib/builtins/powidf2.c
compiler-rt/lib/builtins/powisf2.c
compiler-rt/lib/builtins/powitf2.c
compiler-rt/lib/builtins/powixf2.c
compiler-rt/test/builtins/Unit/clzdi2_test.c
compiler-rt/test/builtins/Unit/clzsi2_test.c
compiler-rt/test/builtins/Unit/clzti2_test.c
compiler-rt/test/builtins/Unit/ctzsi2_test.c
compiler-rt/test/builtins/Unit/ctzti2_test.c
compiler-rt/test/builtins/Unit/ffsti2_test.c
compiler-rt/test/builtins/Unit/paritydi2_test.c
compiler-rt/test/builtins/Unit/paritysi2_test.c
compiler-rt/test/builtins/Unit/parityti2_test.c
compiler-rt/test/builtins/Unit/popcountsi2_test.c
compiler-rt/test/builtins/Unit/popcountti2_test.c
compiler-rt/test/builtins/Unit/powidf2_test.c
compiler-rt/test/builtins/Unit/powisf2_test.c
compiler-rt/test/builtins/Unit/powitf2_test.c
compiler-rt/test/builtins/Unit/powixf2_test.c