This is an archive of the discontinued LLVM Phabricator instance.

[mips] Fix sem_init_glibc test for MIPS.
ClosedPublic

Authored by sdardis on Sep 13 2017, 2:46 PM.

Details

Summary

glibc changed the implementation of semaphores for glibc 2.21 requiring
some target specific changes for this compiler-rt test. Modify the test
to cope with MIPS64 and do some future/correctness work by tying the
define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc.

Contributions from Nitesh Jain.

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis created this revision.Sep 13 2017, 2:46 PM

The line (defined(__mips64) || _MIPS_SIM == _ABI64) is due to the change[1] where Joseph Myers defined N32 (an IPL32 ABI for MIPS64) to not have 64 bit atomics to deal with the issues of alignment of semaphores.

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=df34134284b46cdd8ffd39551b858652d465ca08

sdardis retitled this revision from [mips] Fix sem_init_glibc test. to [mips] Fix sem_init_glibc test for MIPS..Sep 13 2017, 2:55 PM
sdardis added a subscriber: nitesh.jain.
eugenis accepted this revision.Sep 13 2017, 4:24 PM
This revision is now accepted and ready to land.Sep 13 2017, 4:24 PM
This revision was automatically updated to reflect the committed changes.