diff --git a/erts/emulator/beam/jit/arm/32/beam_asm_module.cpp b/erts/emulator/beam/jit/arm/32/beam_asm_module.cpp index fccf68c03351..cf951a6d2e17 100644 --- a/erts/emulator/beam/jit/arm/32/beam_asm_module.cpp +++ b/erts/emulator/beam/jit/arm/32/beam_asm_module.cpp @@ -567,7 +567,10 @@ arm::Mem BeamModuleAssembler::embed_constant(const ArgVal &value, } auto it = _constants.emplace(value, - Constant{.latestOffset = maxOffset, + Constant{.latestOffset = std::max( + currOffset, + maxOffset - + STUB_CHECK_INTERVAL), .anchor = a.newLabel(), .value = value}); const Constant &constant = it->second;