jumps weren't actually being pushed to the vector
This commit is contained in:
@@ -37,7 +37,7 @@ Fn JIT::Recompile() {
|
|||||||
//prologue();
|
//prologue();
|
||||||
//mov(rbp, u64(this));
|
//mov(rbp, u64(this));
|
||||||
//mov(rdi, u64(this) + THIS_OFFSET(regs));
|
//mov(rdi, u64(this) + THIS_OFFSET(regs));
|
||||||
u64 pc = regs.pc + 0x3D0;
|
u64 pc = regs.pc;
|
||||||
while(old_stable) {
|
while(old_stable) {
|
||||||
old_stable = stable;
|
old_stable = stable;
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,12 @@ template <> struct fmt::formatter<Entry> : formatter<string_view> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e.bOffs.index_or_imm.has_value()) {
|
if (e.bOffs.index_or_imm.has_value()) {
|
||||||
std::string dst = fmt::format("0x{:0X}", e.bOffs.index_or_imm.value());
|
std::string dst;
|
||||||
|
if (e.bOffs.isReg()) {
|
||||||
|
dst = fmt::format("R{}", e.bOffs.index_or_imm.value());
|
||||||
|
} else if (e.bOffs.isImm()) {
|
||||||
|
dst = fmt::format("0x{:0X}", e.bOffs.index_or_imm.value());
|
||||||
|
}
|
||||||
op += dst;
|
op += dst;
|
||||||
put_comma = true;
|
put_comma = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -453,6 +453,7 @@ void JIT::j(u32 instr) {
|
|||||||
Entry or_(Entry::OR, dst, dst, op2);
|
Entry or_(Entry::OR, dst, dst, op2);
|
||||||
ir.push(or_);
|
ir.push(or_);
|
||||||
Entry e(Entry::BRANCH, or_.GetDst());
|
Entry e(Entry::BRANCH, or_.GetDst());
|
||||||
|
ir.push(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JIT::jal(u32 instr) {
|
void JIT::jal(u32 instr) {
|
||||||
@@ -470,6 +471,7 @@ void JIT::jalr(u32 instr) {
|
|||||||
Entry::Operand{Entry::Operand::REG_S64, RD(instr)},
|
Entry::Operand{Entry::Operand::REG_S64, RD(instr)},
|
||||||
Entry::Operand{Entry::Operand::PC64});
|
Entry::Operand{Entry::Operand::PC64});
|
||||||
ir.push(link);
|
ir.push(link);
|
||||||
|
j(instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JIT::slti(u32 instr) {
|
void JIT::slti(u32 instr) {
|
||||||
@@ -732,6 +734,7 @@ void JIT::dsra32(u32 instr) {
|
|||||||
void JIT::jr(u32 instr) {
|
void JIT::jr(u32 instr) {
|
||||||
auto addr = Entry::Operand{Entry::Operand::REG_U64, RS(instr)};
|
auto addr = Entry::Operand{Entry::Operand::REG_U64, RS(instr)};
|
||||||
Entry e(Entry::BRANCH, addr);
|
Entry e(Entry::BRANCH, addr);
|
||||||
|
ir.push(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JIT::dsub(u32 instr) {
|
void JIT::dsub(u32 instr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user