aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/insn-data.def
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2015-05-08 03:06:41 +0200
committerAlexander Graf <agraf@suse.de>2015-05-13 14:48:54 +0200
commit13f67dd5825a7dfd7a4904a5fb0cf0a3f95d2d45 (patch)
tree846a633da07cd8dbb49d00397eb5317ccc7a587a /target-s390x/insn-data.def
parentc095ed731ce4fecf166e4ac02ddc606b408f5e1f (diff)
s390x: Add some documentation in opcode list
I find it really hard to grasp what each field in the opcode list means. Slowly walking through its semantics myself, I figured I'd write a small summary at the top of the file to make life easier for me and whoever looks at the file next. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-s390x/insn-data.def')
-rw-r--r--target-s390x/insn-data.def21
1 files changed, 21 insertions, 0 deletions
diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def
index 8d8e47e0bf..48e979e881 100644
--- a/target-s390x/insn-data.def
+++ b/target-s390x/insn-data.def
@@ -1,3 +1,24 @@
+/*
+ * Arguments to the opcode prototypes
+ *
+ * C(OPC, NAME, FMT, FAC, I1, I2, P, W, OP, CC)
+ * D(OPC, NAME, FMT, FAC, I1, I2, P, W, OP, CC, DATA)
+ *
+ * OPC = (op << 8) | op2 where op is the major, op2 the minor opcode
+ * NAME = name of the opcode, used internally
+ * FMT = format of the opcode (defined in insn-format.def)
+ * FAC = facility the opcode is available in (defined in DisasFacility)
+ * I1 = func in1_xx fills o->in1
+ * I2 = func in2_xx fills o->in2
+ * P = func prep_xx initializes o->*out*
+ * W = func wout_xx writes o->*out* somewhere
+ * OP = func op_xx does the bulk of the operation
+ * CC = func cout_xx defines how cc should get set
+ * DATA = immediate argument to op_xx function
+ *
+ * The helpers get called in order: I1, I2, P, OP, W, CC
+ */
+
/* ADD */
C(0x1a00, AR, RR_a, Z, r1, r2, new, r1_32, add, adds32)
C(0xb9f8, ARK, RRF_a, DO, r2, r3, new, r1_32, add, adds32)