From e4a605049ae7066004acbdce65d6e87ced84a398 Mon Sep 17 00:00:00 2001 From: Yunsup Lee Date: Sun, 2 Mar 2014 00:49:32 -0800 Subject: [PATCH] add hwacha vfmsv instructions --- hwacha/encodings_hwacha.h | 8 +++++--- hwacha/hwacha_disasm.cc | 3 ++- hwacha/insns/{vfmsv.h => vfmsv_d.h} | 0 hwacha/insns/vfmsv_s.h | 3 +++ hwacha/opcodes_hwacha.h | 3 ++- 5 files changed, 12 insertions(+), 5 deletions(-) rename hwacha/insns/{vfmsv.h => vfmsv_d.h} (100%) create mode 100644 hwacha/insns/vfmsv_s.h diff --git a/hwacha/encodings_hwacha.h b/hwacha/encodings_hwacha.h index 2be35eb..11fa889 100644 --- a/hwacha/encodings_hwacha.h +++ b/hwacha/encodings_hwacha.h @@ -73,8 +73,9 @@ #define MASK_VFLSEGSTD 0x1e00707f #define MASK_VFLSEGSTW 0x1e00707f #define MASK_VFLSEGW 0x1ff0707f -#define MASK_VFMSV 0xfff0707f #define MASK_VFMVV 0xfff0707f +#define MASK_VFMSV_S 0xfff0707f +#define MASK_VFMSV_D 0xfff0707f #define MASK_VFSSEGD 0x1ff0707f #define MASK_VFSSEGSTD 0x1e00707f #define MASK_VFSSEGSTW 0x1e00707f @@ -120,8 +121,9 @@ #define MATCH_VFLSEGSTD 0x1600305b #define MATCH_VFLSEGSTW 0x1400305b #define MATCH_VFLSEGW 0x1400205b -#define MATCH_VFMSV 0x1200202b -#define MATCH_VFMVV 0x1200002b +#define MATCH_VFMVV 0x1000002b +#define MATCH_VFMSV_S 0x1000202b +#define MATCH_VFMSV_D 0x1200202b #define MATCH_VFSSEGD 0x1600207b #define MATCH_VFSSEGSTD 0x1600307b #define MATCH_VFSSEGSTW 0x1400307b diff --git a/hwacha/hwacha_disasm.cc b/hwacha/hwacha_disasm.cc index 6d3f13f..02e3d57 100644 --- a/hwacha/hwacha_disasm.cc +++ b/hwacha/hwacha_disasm.cc @@ -133,7 +133,8 @@ std::vector hwacha_t::get_disasms() DISASM_INSN("vmvv", vmvv, 0, {&vxrd, &vxrs1}); DISASM_INSN("vmsv", vmsv, 0, {&vxrd, &xrs1}); DISASM_INSN("vfmvv", vfmvv, 0, {&vfrd, &vfrs1}); - DISASM_INSN("vfmsv", vfmsv, 0, {&vfrd, &xrs1}); + DISASM_INSN("vfmsv.s", vfmsv_s, 0, {&vfrd, &xrs1}); + DISASM_INSN("vfmsv.d", vfmsv_d, 0, {&vfrd, &xrs1}); DISASM_INSN("vf", vf, 0, {&vf_addr}); DISASM_INSN("vxcptcause", vxcptcause, 0, {&xrd}); diff --git a/hwacha/insns/vfmsv.h b/hwacha/insns/vfmsv_d.h similarity index 100% rename from hwacha/insns/vfmsv.h rename to hwacha/insns/vfmsv_d.h diff --git a/hwacha/insns/vfmsv_s.h b/hwacha/insns/vfmsv_s.h new file mode 100644 index 0000000..d1df3a1 --- /dev/null +++ b/hwacha/insns/vfmsv_s.h @@ -0,0 +1,3 @@ +for (uint32_t i=0; i