@@ -4204,7 +4204,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
4204
4204
4205
4205
arm_ldrx (code , ARMREG_IP1 , info_var -> inst_basereg , GTMREG_TO_INT (info_var -> inst_offset ));
4206
4206
/* Add the bp_tramp_offset */
4207
- val = (( bp_tramp_offset / 4 ) * sizeof (target_mgreg_t )) + MONO_STRUCT_OFFSET (SeqPointInfo , bp_addrs );
4207
+ val = (bp_tramp_offset * sizeof (target_mgreg_t )) + MONO_STRUCT_OFFSET (SeqPointInfo , bp_addrs );
4208
4208
/* Load the info->bp_addrs [bp_tramp_offset], which is either 0 or the address of the bp trampoline */
4209
4209
code = emit_ldrx (code , ARMREG_IP1 , ARMREG_IP1 , val );
4210
4210
/* Skip the load if its 0 */
@@ -6873,9 +6873,7 @@ mono_arch_set_breakpoint (MonoJitInfo *ji, guint8 *ip)
6873
6873
6874
6874
if (enable_ptrauth )
6875
6875
NOT_IMPLEMENTED ;
6876
- g_assert (native_offset % 4 == 0 );
6877
- g_assert (info -> bp_addrs [native_offset / 4 ] == 0 );
6878
- info -> bp_addrs [native_offset / 4 ] = (guint8 * )mini_get_breakpoint_trampoline ();
6876
+ info -> bp_addrs [native_offset ] = (guint8 * )mini_get_breakpoint_trampoline ();
6879
6877
} else {
6880
6878
/* ip points to an ldrx */
6881
6879
code += 4 ;
@@ -6898,8 +6896,7 @@ mono_arch_clear_breakpoint (MonoJitInfo *ji, guint8 *ip)
6898
6896
if (enable_ptrauth )
6899
6897
NOT_IMPLEMENTED ;
6900
6898
6901
- g_assert (native_offset % 4 == 0 );
6902
- info -> bp_addrs [native_offset / 4 ] = NULL ;
6899
+ info -> bp_addrs [native_offset ] = NULL ;
6903
6900
} else {
6904
6901
/* ip points to an ldrx */
6905
6902
code += 4 ;
@@ -6967,7 +6964,7 @@ mono_arch_get_seq_point_info (guint8 *code)
6967
6964
ji = mini_jit_info_table_find (code );
6968
6965
g_assert (ji );
6969
6966
6970
- info = g_malloc0 (sizeof (SeqPointInfo ) + (ji -> code_size / 4 ) * sizeof (guint8 * ));
6967
+ info = g_malloc0 (sizeof (SeqPointInfo ) + (ji -> code_size ) * sizeof (guint8 * ));
6971
6968
6972
6969
info -> ss_tramp_addr = & ss_trampoline ;
6973
6970
0 commit comments