Added ARM32 support

This commit is contained in:
alejo committed 2026-11-03 15:22:24 -03:00
1 parent df792729ef
commit 1212cb9dbe
36 files changed
+2381 -783

No files matched your search

@@ -67,6 +67,19 @@ extern "C"
* and the library can only estimate one from the distance to the next
* export. MSVC has no equivalent per-function override this demo could
* apply, so this one only exists on GCC/Clang.
*
* ARM32 needs a different implementation underneath this same
* declaration (see PluginV1/src/Plugin.cpp): an ordinary empty C++
* body there, even with patchable-function-entry overridden to zero,
* still picks up an unoptimized build's full frame-pointer prologue
* and epilogue -- confirmed directly, 8 bytes on this architecture at
* `-O0`, tying this library's own ARM-state jump size exactly rather
* than falling safely under it. A single hand-written `bx lr`, at file
* scope rather than inside a C++ function body (sidestepping a
* separate GCC quirk: an asm statement inside a naked function body
* is followed by an unconditional extra NOP, confirmed directly),
* reliably stays under every ARM32 jump size this library ever
* writes, in both instruction sets, at every optimization level.
*/
__attribute__((patchable_function_entry(0))) void plugin_tiny_function(void);
#endif