[all-commits] [llvm/llvm-project] 0ee439: [builtins] Change si_int to int in some helper dec...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Tue Jun 30 01:07:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ee439b705e82a4fe20e266bc8fea96d0e60e1ec
      https://github.com/llvm/llvm-project/commit/0ee439b705e82a4fe20e266bc8fea96d0e60e1ec
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M compiler-rt/lib/builtins/README.txt
    M compiler-rt/lib/builtins/clzdi2.c
    M compiler-rt/lib/builtins/clzsi2.c
    M compiler-rt/lib/builtins/clzti2.c
    M compiler-rt/lib/builtins/ctzdi2.c
    M compiler-rt/lib/builtins/ctzsi2.c
    M compiler-rt/lib/builtins/ctzti2.c
    M compiler-rt/lib/builtins/ffsti2.c
    M compiler-rt/lib/builtins/int_lib.h
    M compiler-rt/lib/builtins/paritydi2.c
    M compiler-rt/lib/builtins/paritysi2.c
    M compiler-rt/lib/builtins/parityti2.c
    M compiler-rt/lib/builtins/popcountsi2.c
    M compiler-rt/lib/builtins/popcountti2.c
    M compiler-rt/lib/builtins/powidf2.c
    M compiler-rt/lib/builtins/powisf2.c
    M compiler-rt/lib/builtins/powitf2.c
    M compiler-rt/lib/builtins/powixf2.c
    M compiler-rt/test/builtins/Unit/clzdi2_test.c
    M compiler-rt/test/builtins/Unit/clzsi2_test.c
    M compiler-rt/test/builtins/Unit/clzti2_test.c
    M compiler-rt/test/builtins/Unit/ctzsi2_test.c
    M compiler-rt/test/builtins/Unit/ctzti2_test.c
    M compiler-rt/test/builtins/Unit/ffsti2_test.c
    M compiler-rt/test/builtins/Unit/paritydi2_test.c
    M compiler-rt/test/builtins/Unit/paritysi2_test.c
    M compiler-rt/test/builtins/Unit/parityti2_test.c
    M compiler-rt/test/builtins/Unit/popcountsi2_test.c
    M compiler-rt/test/builtins/Unit/popcountti2_test.c
    M compiler-rt/test/builtins/Unit/powidf2_test.c
    M compiler-rt/test/builtins/Unit/powisf2_test.c
    M compiler-rt/test/builtins/Unit/powitf2_test.c
    M compiler-rt/test/builtins/Unit/powixf2_test.c

  Log Message:
  -----------
  [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




More information about the All-commits mailing list