aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/disassemble.h
diff options
context:
space:
mode:
authorGravatar Bin Lu <lblulb@linux.vnet.ibm.com> 2017-02-21 21:12:36 +0800
committerGravatar Paul Mackerras <paulus@ozlabs.org> 2017-04-20 11:36:41 +1000
commit6f63e81bda98cbb549b01faf978884692ded438d (patch)
treeed26d38aacc94c14990ebf6ee2979530bc96e7b3 /arch/powerpc/include/asm/disassemble.h
parentKVM: PPC: Provide functions for queueing up FP/VEC/VSX unavailable interrupts (diff)
downloadlinux-6f63e81bda98cbb549b01faf978884692ded438d.tar.gz
linux-6f63e81bda98cbb549b01faf978884692ded438d.tar.bz2
linux-6f63e81bda98cbb549b01faf978884692ded438d.zip
KVM: PPC: Book3S: Add MMIO emulation for FP and VSX instructions
This patch provides the MMIO load/store emulation for instructions of 'double & vector unsigned char & vector signed char & vector unsigned short & vector signed short & vector unsigned int & vector signed int & vector double '. The instructions that this adds emulation for are: - ldx, ldux, lwax, - lfs, lfsx, lfsu, lfsux, lfd, lfdx, lfdu, lfdux, - stfs, stfsx, stfsu, stfsux, stfd, stfdx, stfdu, stfdux, stfiwx, - lxsdx, lxsspx, lxsiwax, lxsiwzx, lxvd2x, lxvw4x, lxvdsx, - stxsdx, stxsspx, stxsiwx, stxvd2x, stxvw4x [paulus@ozlabs.org - some cleanups, fixes and rework, make it compile for Book E, fix build when PR KVM is built in] Signed-off-by: Bin Lu <lblulb@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/include/asm/disassemble.h')
-rw-r--r--arch/powerpc/include/asm/disassemble.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/disassemble.h b/arch/powerpc/include/asm/disassemble.h
index 4852e849128b..c0a55050f70f 100644
--- a/arch/powerpc/include/asm/disassemble.h
+++ b/arch/powerpc/include/asm/disassemble.h
@@ -87,6 +87,11 @@ static inline unsigned int get_oc(u32 inst)
return (inst >> 11) & 0x7fff;
}
+static inline unsigned int get_tx_or_sx(u32 inst)
+{
+ return (inst) & 0x1;
+}
+
#define IS_XFORM(inst) (get_op(inst) == 31)
#define IS_DSFORM(inst) (get_op(inst) >= 56)