Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: src/ppc/constants-ppc.h

Issue 2619763003: PPC: Implement VSX instructions (Closed)
Patch Set: Fixed native assembler code Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/disasm-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/constants-ppc.h
diff --git a/src/ppc/constants-ppc.h b/src/ppc/constants-ppc.h
index 393f039e270b6ad71b7f91ac24e5840d14a0d9c7..1079723881f0b44056434cc4b093fd2205820727 100644
--- a/src/ppc/constants-ppc.h
+++ b/src/ppc/constants-ppc.h
@@ -145,6 +145,7 @@ enum Opcode {
STFDU = 55 << 26, // Store Floating-Point Double with Update
LD = 58 << 26, // Load Double Word
EXT3 = 59 << 26, // Extended code set 3
+ EXT6 = 60 << 26, // Extended code set 6
STD = 62 << 26, // Store Double Word (optionally with Update)
EXT4 = 63 << 26 // Extended code set 4
};
@@ -314,10 +315,37 @@ enum OpcodeExt5 {
RLDCR = 9 << 1 // Rotate Left Double Word then Clear Right
};
+// Bits 10-3
+#define XX3_OPCODE_LIST(V) \
+ V(xsaddsp, XSADDSP, 0 << 3) /* VSX Scalar Add SP */ \
+ V(xssubsp, XSSUBSP, 8 << 3) /* VSX Scalar Subtract SP */ \
+ V(xsmulsp, XSMULSP, 16 << 3) /* VSX Scalar Multiply SP */ \
+ V(xsdivsp, XSDIVSP, 24 << 3) /* VSX Scalar Divide SP */ \
+ V(xsadddp, XSADDDP, 32 << 3) /* VSX Scalar Add DP */ \
+ V(xssubdp, XSSUBDP, 40 << 3) /* VSX Scalar Subtract DP */ \
+ V(xsmuldp, XSMULDP, 48 << 3) /* VSX Scalar Multiply DP */ \
+ V(xsdivdp, XSDIVDP, 56 << 3) /* VSX Scalar Divide DP */ \
+ V(xsmaxdp, XSMAXDP, 160 << 3) /* VSX Scalar Maximum DP */ \
+ V(xsmindp, XSMINDP, 168 << 3) /* VSX Scalar Minimum DP */
+
+// Bits 10-2
+#define XX2_OPCODE_LIST(V) \
+ V(XSCVDPSP, XSCVDPSP, 265 << 2) /* VSX Scalar Convert DP to SP */ \
+ V(XSCVSPDP, XSCVSPDP, 329 << 2) /* VSX Scalar Convert SP to DP */
+
+enum OpcodeExt6 {
+#define DECLARE_OPCODES(name, opcode_name, opcode_value) \
+ opcode_name = opcode_value,
+ XX3_OPCODE_LIST(DECLARE_OPCODES) XX2_OPCODE_LIST(DECLARE_OPCODES)
+#undef DECLARE_OPCODES
+};
+
// Instruction encoding bits and masks.
enum {
// Instruction encoding bit
B1 = 1 << 1,
+ B2 = 1 << 2,
+ B3 = 1 << 3,
B4 = 1 << 4,
B5 = 1 << 5,
B7 = 1 << 7,
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/disasm-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698