GH-115802: JIT "small" code for Windows (GH-115964)

This commit is contained in:
Brandt Bucher 2024-02-29 08:11:28 -08:00 • committed by GitHub
parent 45d8871dc4
commit f0df35eeca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 129 additions and 96 deletions

View file

@ -9,6 +9,7 @@
#include "pycore_long.h"
#include "pycore_opcode_metadata.h"
#include "pycore_opcode_utils.h"
#include "pycore_optimizer.h"
#include "pycore_range.h"
#include "pycore_setobject.h"
#include "pycore_sliceobject.h"
@ -58,11 +59,11 @@ do { \
} while (0)
#define PATCH_VALUE(TYPE, NAME, ALIAS) \
extern void ALIAS; \
PyAPI_DATA(void) ALIAS; \
TYPE NAME = (TYPE)(uint64_t)&ALIAS;
#define PATCH_JUMP(ALIAS) \
extern void ALIAS; \
PyAPI_DATA(void) ALIAS; \
__attribute__((musttail)) \
return ((jit_func)&ALIAS)(frame, stack_pointer, tstate);