Skip to content

Commit bbb3fa5

Browse files
committed
[MIPS] Expose FCSR
1 parent 91e0d38 commit bbb3fa5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

include/remill/Arch/MIPS/Runtime/State.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ struct alignas(8) COP0Registers final {
260260
Reg DESAVE;
261261
} __attribute__((packed));
262262

263+
struct alignas(8) COP1Registers final {
264+
volatile uint64_t _0;
265+
Reg FCSR;
266+
} __attribute__((packed));
267+
263268
struct alignas(8) MIPSState : public ArchState {
264269
GPR gpr; // 528 bytes.
265270

@@ -276,6 +281,10 @@ struct alignas(8) MIPSState : public ArchState {
276281
COP0Registers cop0;
277282

278283
uint64_t _3;
284+
285+
COP1Registers cop1;
286+
287+
uint64_t _4;
279288
} __attribute__((packed));
280289

281290
struct State : public MIPSState {};

lib/Arch/Sleigh/MIPSArch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ class SleighMIPSArch : public ArchBase {
309309
REG(TAGHI, cop0.TagHi.qword, u64);
310310
REG(ERRORPC, cop0.ErrorEPC.qword, u64);
311311
REG(DESAVE, cop0.DESAVE.qword, u64);
312+
313+
// COP1
314+
// TODO: Maybe move fpr here?
315+
REG(FCSR, cop1.FCSR.dword, u32);
312316
}
313317

314318
void

0 commit comments

Comments
 (0)