This is an archive of the discontinued LLVM Phabricator instance.

[libc] Remove test RPC opcodes from the exported header
ClosedPublic

Authored by jhuber6 on Jul 10 2023, 7:41 AM.

Details

Summary

This patch does the noisy work of removing the test opcodes from the
exported interface to an interface that is only visible in libc. The
benefit of this is that we both test the exported RPC registration more
directly, and we do not need to give this interface to users.

I have decided to export any opcode that is not a "core" libc feature as
having its MSB set in the opcode. We can think of these as non-libc
"extensions".

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 10 2023, 7:41 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 10 2023, 7:41 AM
jhuber6 requested review of this revision.Jul 10 2023, 7:41 AM
jdoerfert added inline comments.Jul 10 2023, 10:43 AM
libc/include/llvm-libc-types/test_rpc_opcodes_t.h
13–16

Make an extension constant 1<<15 and then it becomes much clearer what's going on. Still, add documentation.

jhuber6 updated this revision to Diff 539561.Jul 12 2023, 7:57 AM

Address comments

JonChesterfield accepted this revision.Jul 21 2023, 1:14 PM
This revision is now accepted and ready to land.Jul 21 2023, 1:14 PM
This revision was automatically updated to reflect the committed changes.