This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][builtins][RISCV] Port __clear_cache to RISC-V Linux
ClosedPublic

Authored by luismarques on Mar 3 2020, 7:11 AM.

Details

Reviewers
asb
lenary
Summary

Implements __clear_cache for RISC-V Linux.

We can't just use fence.i on Linux, because the Linux thread might be scheduled on another hart, and the fence.i instruction only flushes the icache of the current hart.

Fixes the failures of the compiler-rt tests clear_cache_test.c and enable_execute_stack_test.c for RISC-V.

Diff Detail

Event Timeline

luismarques created this revision.Mar 3 2020, 7:11 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 3 2020, 7:11 AM
Herald added subscribers: llvm-commits, Restricted Project, evandro and 14 others. · View Herald Transcript
asb accepted this revision.Mar 5 2020, 7:53 AM

LGTM, thanks!

This revision is now accepted and ready to land.Mar 5 2020, 7:53 AM
luismarques closed this revision.Mar 5 2020, 11:19 AM

Closing revision.
(My commit message clean-up went overboard and accidentally deleted the Differential Revision line).