This is an archive of the discontinued LLVM Phabricator instance.

[builtins][LoongArch] Port __clear_cache to LoongArch Linux
ClosedPublic

Authored by tangyouling on Oct 28 2022, 12:32 AM.

Details

Summary

There are two failures in the current builtins,
Failed Tests (2):

Builtins-loongarch64-linux :: clear_cache_test.c
Builtins-loongarch64-linux :: enable_execute_stack_test.c

It is caused by __clear_cache not being implemented and triggering abort.

"__clear_cache" is implemented in the same way as "clear_cache" in gcc (
in gcc/config/loongarch/loongarch.md)

Depends on D136338

Diff Detail

Event Timeline

tangyouling created this revision.Oct 28 2022, 12:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2022, 12:32 AM
tangyouling requested review of this revision.Oct 28 2022, 12:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2022, 12:32 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
#elif defined(__loongarch__)

should be fine if other ELF operating systems decide to add a loongson port.

MaskRay accepted this revision.Oct 28 2022, 10:16 AM
This revision is now accepted and ready to land.Oct 28 2022, 10:16 AM
SixWeining accepted this revision.Oct 28 2022, 6:20 PM

LGTM. Let's target to Linux firstly and support other systems when necessary. :)

This revision was automatically updated to reflect the committed changes.