Skip to content

Commit 4eab90f

Browse files
authored
GH-140683: JIT: Improve machine code for loading smaller constants on AArch64. (GH-142511)
* Use movz and movk instructions for loading 16 and 32 bit operands and oparg. * Loading of 64 bit operands is unchanged.
1 parent 469f191 commit 4eab90f

10 files changed

Lines changed: 320 additions & 135 deletions

File tree

‎Python/bytecodes.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ dummy_func(
810810
assert(next_instr->op.code == STORE_FAST);
811811
next_oparg = next_instr->op.arg;
812812
#else
813-
next_oparg = (int)CURRENT_OPERAND0();
813+
next_oparg = (int)CURRENT_OPERAND0_16();
814814
#endif
815815
_PyStackRef *target_local = &GETLOCAL(next_oparg);
816816
assert(PyUnicode_CheckExact(left_o));

‎Python/ceval_macros.h‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,12 @@ do { \
450450
} while (0)