drc: arm: use movw/movt
[picodrive.git] / cpu / sh2 / compiler.c
index 0e8b65b..a7c71c3 100644 (file)
@@ -29,6 +29,7 @@
 #include <assert.h>
 
 #include "../../pico/pico_int.h"
+#include "../../pico/arm_features.h"
 #include "sh2.h"
 #include "compiler.h"
 #include "../drc/cmn.h"
@@ -3121,9 +3122,9 @@ static void sh2_smc_rm_blocks(u32 a, u16 *drc_ram_blk, int tcache_id, u32 shift,
       if (to < end_addr)
         to = end_addr;
 
-      sh2_smc_rm_block(block, tcache_id, mask);
       if (a >= start_addr + block->size_nolit)
         literal_disabled_frames = 3;
+      sh2_smc_rm_block(block, tcache_id, mask);
 
       // entry lost, restart search
       entry = *blist;