From patchwork Fri May 8 01:12:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 469861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5719014028F for ; Fri, 8 May 2015 11:12:47 +1000 (AEST) Received: from localhost ([::1]:53337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqWqL-00081e-6U for incoming@patchwork.ozlabs.org; Thu, 07 May 2015 21:12:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqWpq-0007HD-4g for qemu-devel@nongnu.org; Thu, 07 May 2015 21:12:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqWpm-00087P-44 for qemu-devel@nongnu.org; Thu, 07 May 2015 21:12:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56016 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqWpl-00086p-Ug for qemu-devel@nongnu.org; Thu, 07 May 2015 21:12:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2CC69AAC7; Fri, 8 May 2015 01:12:09 +0000 (UTC) From: Alexander Graf To: qemu-devel@nongnu.org Date: Fri, 8 May 2015 03:12:07 +0200 Message-Id: <1431047528-81504-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.12.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 Cc: rth@twiddle.net Subject: [Qemu-devel] [PATCH 1/2] s390x: Add some documentation in opcode list X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Richard Henderson --- target-s390x/insn-data.def | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 8d8e47e..48e979e 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)