mirror of
https://github.com/N64Recomp/N64Recomp.git
synced 2025-05-24 12:24:59 +00:00
Added some missing float comparison instructions and fixed functions incorrectly getting detected as the entrypoint
This commit is contained in:
parent
9a4f650c9b
commit
72fe4ed79c
2 changed files with 56 additions and 4 deletions
|
@ -684,7 +684,11 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::C
|
|||
case InstrId::cpu_c_olt_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
//print_line("*(volatile int*)0 = 0;");
|
||||
print_line("c1cs = ctx->f{}.fl < ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ult_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.fl < ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_lt_d:
|
||||
|
@ -692,6 +696,16 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::C
|
|||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d < ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_olt_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d < ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ult_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d < ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_le_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
|
@ -700,13 +714,11 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::C
|
|||
case InstrId::cpu_c_ole_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
//print_line("*(volatile int*)0 = 0;");
|
||||
print_line("c1cs = ctx->f{}.fl <= ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ule_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
//print_line("*(volatile int*)0 = 0;");
|
||||
print_line("c1cs = ctx->f{}.fl <= ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_le_d:
|
||||
|
@ -714,16 +726,56 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::C
|
|||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d <= ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ole_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d <= ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ule_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d <= ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_eq_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.fl == ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ueq_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.fl == ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ngl_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.fl == ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_seq_s:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.fl == ctx->f{}.fl", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_eq_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d == ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ueq_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d == ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_ngl_d:
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d == ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
case InstrId::cpu_c_deq_d: // TODO rename to c_seq_d when fixed in rabbitizer
|
||||
print_line("CHECK_FR(ctx, {})", fs);
|
||||
print_line("CHECK_FR(ctx, {})", ft);
|
||||
print_line("c1cs = ctx->f{}.d == ctx->f{}.d", fs, ft);
|
||||
break;
|
||||
|
||||
// Cop1 branches
|
||||
case InstrId::cpu_bc1tl:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue