Page MenuHomePhabricator

Add a type_checked_load_relative to support relative function pointer tables
Needs ReviewPublic

Authored by aschwaighofer on Feb 2 2023, 11:09 AM.



This adds a type_checked_load_relative intrinsic whose semantics it is to
load a relative function pointer.

A relative function pointer is a pointer to a 32bit value that when
added to its address yields the address of the function.

Diff Detail

Event Timeline

aschwaighofer created this revision.Feb 2 2023, 11:09 AM
aschwaighofer requested review of this revision.Feb 2 2023, 11:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 11:09 AM

Can we also get a test with llvm.type.checked.load.relative where the call *doesn't* get devirtualized?

Include test case where the llvm.type.checked.load.relative intrinsic is
expanded to compute the pointer underlying the relative pointer value.