Work on magic numbers for aarch64

This commit is contained in:
Justine Tunney 2023-05-10 01:10:28 -07:00
parent 59766efd3e
commit 5a455eaa0b
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2070 changed files with 4567 additions and 4200 deletions

View file

@ -825,6 +825,9 @@ typedef struct {
#if !defined(__STRICT_ANSI__) && !defined(__APPLE__) && defined(__x86_64__)
#define YOINK(SYMBOL) \
asm(".section .yoink\n\tnopl\t%a0\n\t.previous" : : "X"(SYMBOL))
#elif defined(__aarch64__)
#define YOINK(SYMBOL) \
asm(".section .yoink\n\tb\t%a0\n\t.previous" : : "X"(SYMBOL))
#else
#define YOINK(SYMBOL) (void)0
#endif
@ -832,6 +835,9 @@ typedef struct {
#if !defined(__STRICT_ANSI__) && !defined(__APPLE__) && defined(__x86_64__)
#define STATIC_YOINK(SYMBOLSTR) \
asm(".section .yoink\n\tnopl\t\"" SYMBOLSTR "\"\n\t.previous")
#elif defined(__aarch64__)
#define STATIC_YOINK(SYMBOLSTR) \
asm(".section .yoink\n\tb\t\"" SYMBOLSTR "\"\n\t.previous")
#else
#define STATIC_YOINK(SYMBOLSTR)
#endif