[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2021-03-22 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added a comment. Hi! My users have found problems with miscompiles that seem to originate from this patch. As a background, my target has 16-bit int, and 32-bit long. And the calling convention is not that an i16 is passed as the low bits in a 32-bit register that would be used for an

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-30 Thread Anton Korobeynikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0ee439b705e8: [builtins] Change si_int to int in some helper declarations (authored by atrosinenko, committed by asl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Thank you! In D81285#2110102 , @MaskRay wrote: > > This patch changes types of some integer function arguments or return > > values from si_int to the default int type (typedefed to native_int to make > > it obvious this is

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. > This patch changes types of some integer function arguments or return values > from si_int to the default int type (typedefed to native_int to make it > obvious this is intentional) to make it more compatible with libgcc. Please drop

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM. (Please wait a few days before merging to see if anyone else has comments.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81285/new/

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-19 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. In D81285#2102948 , @atrosinenko wrote: > On renaming fixed width integer types to their traditional names: I would > prefer sending such patch afterwards, it would probably be as simple as just > running `sed --in-place` several

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271963. atrosinenko added a comment. Replaced `native_int` by plain `int`, as @aykevl suggested. On one hand, I have no specific preference for using some descriptive name such as `native_int`, `default_int`, etc. (that should suggest it was chosen

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-10 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I need to recompile LLVM to test this patch so it might take a while. In D81285#2082517 , @atrosinenko wrote: > In D81285#2082394 , @aykevl wrote: > > > Also note that the libgcc

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/int_lib.h:112 -uint32_t __inline __builtin_ctz(uint32_t value) { +int __inline __builtin_ctz(uint32_t value) { unsigned long trailing_zero = 0; aykevl wrote: > Why `int` and not

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. In D81285#2082394 , @aykevl wrote: > I'm not sure whether `native_int` is any clearer than just `int`. I'm afraid > it only introduces more complexity ("What's `native_int`? Oh, it's just > `int`"). I'm not particularly

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I'm not sure whether `native_int` is any clearer than just `int`. I'm afraid it only introduces more complexity ("What's `native_int`? Oh, it's just `int`"). Perhaps a controversial idea: what about changing to use stdint.h types? `si_int` -> `int32_t` `su_int` ->

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-05 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added a reviewer: howard.hinnant. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. This patch changes types of some integer function arguments or return values from `si_int` to the default `int` type (`typedef`ed to