mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
py/emitnative: Fix x86-64 emitter to generate correct 8/16-bit stores.
Fixes issue #6643. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -1769,7 +1769,7 @@ STATIC void emit_native_store_subscr(emit_t *emit) {
|
||||
int reg_index = REG_ARG_2;
|
||||
int reg_value = REG_ARG_3;
|
||||
emit_pre_pop_reg_flexible(emit, &vtype_base, ®_base, reg_index, reg_value);
|
||||
#if N_X86
|
||||
#if N_X64 || N_X86
|
||||
// special case: x86 needs byte stores to be from lower 4 regs (REG_ARG_3 is EDX)
|
||||
emit_pre_pop_reg(emit, &vtype_value, reg_value);
|
||||
#else
|
||||
@@ -1856,7 +1856,7 @@ STATIC void emit_native_store_subscr(emit_t *emit) {
|
||||
EMIT_NATIVE_VIPER_TYPE_ERROR(emit,
|
||||
MP_ERROR_TEXT("can't store with '%q' index"), vtype_to_qstr(vtype_index));
|
||||
}
|
||||
#if N_X86
|
||||
#if N_X64 || N_X86
|
||||
// special case: x86 needs byte stores to be from lower 4 regs (REG_ARG_3 is EDX)
|
||||
emit_pre_pop_reg(emit, &vtype_value, reg_value);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user