X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fcompiler.c;h=cb35c52277f0364abae58e1b96cc7a286811b199;hb=9bb5d91c48b50da466aa553db65c9f9b2a0b1e8d;hp=f84aa3aeb326fd45f92a48847a641610bcaaf3b4;hpb=44e6452e0247e4a926eba8a233080aec5dd7b29b;p=picodrive.git diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index f84aa3a..cb35c52 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -4,7 +4,20 @@ * notes: * - tcache, block descriptor, link buffer overflows result in sh2_translate() * failure, followed by full tcache invalidation for that region - * - jumps between blocks are tracked for SMC handling (in block_links[]) + * - jumps between blocks are tracked for SMC handling (in block_links[]), + * except jumps between different tcaches + * + * implemented: + * - static register allocation + * - remaining register caching and tracking in temporaries + * - block-local branch linking + * - block linking (except between tcaches) + * + * TODO: + * - proper SMC handling + * - constant propagation + * - stack caching? + * - bug fixing */ #include #include @@ -2521,10 +2534,11 @@ void sh2_execute(SH2 *sh2c, int cycles) } #if (DRC_DEBUG & 1) -static void block_stats(void) +void block_stats(void) { int c, b, i, total = 0; + printf("block stats:\n"); for (b = 0; b < ARRAY_SIZE(block_tables); b++) for (i = 0; i < block_counts[b]; i++) if (block_tables[b][i].addr != 0)