This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Change si_int to int in some helper declarations
AbandonedPublic

Authored by atrosinenko on Jun 5 2020, 9:52 AM.

Details

Reviewers
howard.hinnant
Summary

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.

The compiler-rt/lib/builtins/README.txt has a link to the libgcc specification. 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 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.

Diff Detail

Event Timeline

atrosinenko created this revision.Jun 5 2020, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2020, 9:52 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
atrosinenko edited the summary of this revision. (Show Details)Jun 5 2020, 9:53 AM
atrosinenko abandoned this revision.Jun 5 2020, 10:41 AM

Sorry, forgot to add cfe-commits to CC. Will reopen soon.