From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hpaZs-0000Vw-Ja for mharc-qemu-riscv@gnu.org; Mon, 22 Jul 2019 11:50:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52418) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpaTg-0005NB-24 for qemu-riscv@nongnu.org; Mon, 22 Jul 2019 11:43:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpaTe-0003vT-JV for qemu-riscv@nongnu.org; Mon, 22 Jul 2019 11:43:51 -0400 Received: from smtpe1.intersmtp.com ([213.121.35.80]:15138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpaTZ-0003rl-65; Mon, 22 Jul 2019 11:43:45 -0400 Received: from tpw09926dag18h.domain1.systemhost.net (10.9.212.42) by BWP09926085.bt.com (10.36.82.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1713.5; Mon, 22 Jul 2019 16:43:46 +0100 Received: from tpw09926dag18e.domain1.systemhost.net (10.9.212.18) by tpw09926dag18h.domain1.systemhost.net (10.9.212.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 22 Jul 2019 16:43:43 +0100 Received: from tpw09926dag18e.domain1.systemhost.net ([fe80::a946:6348:ccf4:fa6c]) by tpw09926dag18e.domain1.systemhost.net ([fe80::a946:6348:ccf4:fa6c%12]) with mapi id 15.00.1395.000; Mon, 22 Jul 2019 16:43:43 +0100 From: To: CC: , , , , , , , , , , , , , , , , , , , , , , , , Thread-Topic: [Qemu-devel] [PATCH v2 05/20] tcg: Move size+sign+endian from TCGMemOp to MemOp Thread-Index: AQHVQKQ9cEFsk0Sv/kSj8smbj0lJlQ== Date: Mon, 22 Jul 2019 15:43:43 +0000 Message-ID: <1563810222730.76414@bt.com> References: In-Reply-To: Accept-Language: en-AU, en-GB, en-US Content-Language: en-AU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.37] Content-Type: multipart/alternative; boundary="_000_156381022273076414btcom_" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 213.121.35.80 X-Mailman-Approved-At: Mon, 22 Jul 2019 11:50:10 -0400 Subject: [Qemu-riscv] [Qemu-devel] [PATCH v2 05/20] tcg: Move size+sign+endian from TCGMemOp to MemOp X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jul 2019 15:43:53 -0000 --_000_156381022273076414btcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Preparation for modifying the memory API to take size+sign+endianness instead of just size. Accelerator independent MemOp enum is extended by TCGMemOp enum. Signed-off-by: Tony Nguyen --- MAINTAINERS | 1 + include/exec/memop.h | 27 +++++++++++++++++++++++++++ tcg/tcg.h | 15 +++++---------- 3 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 include/exec/memop.h diff --git a/MAINTAINERS b/MAINTAINERS index cc9636b..3f148cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1890,6 +1890,7 @@ M: Paolo Bonzini S: Supported F: include/exec/ioport.h F: ioport.c +F: include/exec/memop.h F: include/exec/memory.h F: include/exec/ram_addr.h F: memory.c diff --git a/include/exec/memop.h b/include/exec/memop.h new file mode 100644 index 0000000..43e99d7 --- /dev/null +++ b/include/exec/memop.h @@ -0,0 +1,27 @@ +/* + * Constants for memory operations + * + * Authors: + * Richard Henderson + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef MEMOP_H +#define MEMOP_H + +typedef enum MemOp { + MO_8 =3D 0, + MO_16 =3D 1, + MO_32 =3D 2, + MO_64 =3D 3, + MO_SIZE =3D 3, /* Mask for the above. */ + + MO_SIGN =3D 4, /* Sign-extended, otherwise zero-extended. */ + + MO_BSWAP =3D 8, /* Host reverse endian. */ +} MemOp; + +#endif diff --git a/tcg/tcg.h b/tcg/tcg.h index 63e9897..18b91fe 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -26,6 +26,7 @@ #define TCG_H #include "cpu.h" +#include "exec/memop.h" #include "exec/tb-context.h" #include "qemu/bitops.h" #include "qemu/queue.h" @@ -309,17 +310,11 @@ typedef enum TCGType { #endif } TCGType; -/* Constants for qemu_ld and qemu_st for the Memory Operation field. */ +/* + * Extend MemOp with constants for qemu_ld and qemu_st for the Memory + * Operation field. + */ typedef enum TCGMemOp { - MO_8 =3D 0, - MO_16 =3D 1, - MO_32 =3D 2, - MO_64 =3D 3, - MO_SIZE =3D 3, /* Mask for the above. */ - - MO_SIGN =3D 4, /* Sign-extended, otherwise zero-extended. */ - - MO_BSWAP =3D 8, /* Host reverse endian. */ #ifdef HOST_WORDS_BIGENDIAN MO_LE =3D MO_BSWAP, MO_BE =3D 0, -- 1.8.3.1 --_000_156381022273076414btcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Preparation for modifying the memory = API to take size+sign+endianness
instead of just size.

Accelerator independent MemOp enum is extended by TCGMemOp enum.

Signed-off-by: Tony Nguyen <tony.nguyen@bt.com>
---
 MAINTAINERS          |  1 +
 include/exec/memop.h | 27 +++++++= 3;++++++++++++++= 3;++++
 tcg/tcg.h            | 15 += 3;+++----------
 3 files changed, 33 insertions(+), 10 deletions(-)
 create mode 100644 include/exec/memop.h

diff --git a/MAINTAINERS b/MAINTAINERS
index cc9636b..3f148cd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1890,6 +1890,7 @@ M: Paolo Bonzini <pbonzini@redhat.com>=
 S: Supported
 F: include/exec/ioport.h
 F: ioport.c
+F: include/exec/memop.h
 F: include/exec/memory.h
 F: include/exec/ram_addr.h
 F: memory.c
diff --git a/include/exec/memop.h b/include/exec/memop.h
new file mode 100644
index 0000000..43e99d7
--- /dev/null
+++ b/include/exec/memop.h
@@ -0,0 +1,27 @@
+/*
+ * Constants for memory operations
+ *
+ * Authors:
+ *  Richard Henderson <rth@twiddle.net>
+ *
+ * This work is licensed under the terms of the GNU GPL, version = 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef MEMOP_H
+#define MEMOP_H
+
+typedef enum MemOp {
+    MO_8     =3D 0,
+    MO_16    =3D 1,
+    MO_32    =3D 2,
+    MO_64    =3D 3,
+    MO_SIZE  =3D 3,   /* Mask for the above. =  */
+
+    MO_SIGN  =3D 4,   /* Sign-extended, other= wise zero-extended.  */
+
+    MO_BSWAP =3D 8,   /* Host reverse endian. &nbs= p;*/
+} MemOp;
+
+#endif
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 63e9897..18b91fe 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -26,6 +26,7 @@
 #define TCG_H
 
 #include "cpu.h"
+#include "exec/memop.h"
 #include "exec/tb-context.h"
 #include "qemu/bitops.h"
 #include "qemu/queue.h"
@@ -309,17 +310,11 @@ typedef enum TCGType {
 #endif
 } TCGType;
 
-/* Constants for qemu_ld and qemu_st for the Memory Operation field. =  */
+/*
+ * Extend MemOp with constants for qemu_ld and qemu_st for the Me= mory
+ * Operation field.
+ */
 typedef enum TCGMemOp {
-    MO_8     =3D 0,
-    MO_16    =3D 1,
-    MO_32    =3D 2,
-    MO_64    =3D 3,
-    MO_SIZE  =3D 3,   /* Mask for the above. &nbs= p;*/
-
-    MO_SIGN  =3D 4,   /* Sign-extended, otherwise= zero-extended.  */
-
-    MO_BSWAP =3D 8,   /* Host reverse endian.  */=
 #ifdef HOST_WORDS_BIGENDIAN
     MO_LE    =3D MO_BSWAP,
     MO_BE    =3D 0,
-- 
1.8.3.1



--_000_156381022273076414btcom_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a5d:51d0:0:0:0:0:0 with SMTP id n16csp7039348wrv; Mon, 22 Jul 2019 08:44:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4xmTDZeHQ8od7OcJH7Vm3gygGbYVFwwLXP/3WbXEm18q0HexPymUKo3IvaaYi8hZngVna X-Received: by 2002:a17:907:2091:: with SMTP id pv17mr53637861ejb.152.1563810260129; Mon, 22 Jul 2019 08:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563810260; cv=none; d=google.com; s=arc-20160816; b=0ib6VVSqTXHiiwku2Ji1Z7AzVLkJooTBWOthrCddyjfsE7Um5vLCgx9jHtMH+l6Brj R/q0rZaEigDK+wdhCTrUgdYeMKrcxlDtWIOFknT77urdCWbsdE3ZB/VoHSR42HJUkkUv jKFvfu9VEmNmrOw8OazNiqWGB5SivswBqK5u/MW9ggPUzzLRIsYYKbq8E/N8uKgFcsbs 4AEGGtWCyQENPOqKRQv3p9MieFHOFUjbLkap4PLMYsRFYk1FiYXw0XGJ6jl355CMs/4i IN10ukGoXsUnboB2keliTCayA/lXgXZGPbSGlbHMT3i93smCluLMrxlMBfpg2TekmxgK t8Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:to:from; bh=D74kE6pcqoD/tMAXadM0vE59NkP8DzUtGjLzkFSzNjs=; b=HbMrYeEYdP4xDdxe9W5oSZzodVm6TCQHkNTwLkTAqc2b/tdFfPEWHrTrgpbouriM+E KKn/I8QBC8qJfIVmAHq5QQmCz5zNCt1nSdiWtzlvuHo4qa6F1xa1W6luKS1vKmM+IAs0 Y32Qa3EhBU7toscBqIoLndF81yAeKDR6euJmGY4wqiJlw4Et/dqLwzbXKxoB4fnEEOmj qouGwQbUi2hn0FaSjd5Y3YxMlRr/qDww7vSK/JiCP0IUnxiZ2WvyAGHzWY5LCFX4qDDe pzdkR9P9cuQaBsML3AA14HCyUASDejqZzrlFs3PF4s88+QxT9mHMtNzze3KhK/lkWxNC dB3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bt.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e17si5076977ede.425.2019.07.22.08.44.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2019 08:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bt.com Received: from localhost ([::1]:34752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpaU7-0005nu-7K for alex.bennee@linaro.org; Mon, 22 Jul 2019 11:44:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52487) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpaTv-0005P7-A3 for qemu-devel@nongnu.org; Mon, 22 Jul 2019 11:44:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpaTt-00046T-CE for qemu-devel@nongnu.org; Mon, 22 Jul 2019 11:44:07 -0400 Received: from smtpe1.intersmtp.com ([213.121.35.80]:15138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpaTZ-0003rl-65; Mon, 22 Jul 2019 11:43:45 -0400 Received: from tpw09926dag18h.domain1.systemhost.net (10.9.212.42) by BWP09926085.bt.com (10.36.82.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1713.5; Mon, 22 Jul 2019 16:43:46 +0100 Received: from tpw09926dag18e.domain1.systemhost.net (10.9.212.18) by tpw09926dag18h.domain1.systemhost.net (10.9.212.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 22 Jul 2019 16:43:43 +0100 Received: from tpw09926dag18e.domain1.systemhost.net ([fe80::a946:6348:ccf4:fa6c]) by tpw09926dag18e.domain1.systemhost.net ([fe80::a946:6348:ccf4:fa6c%12]) with mapi id 15.00.1395.000; Mon, 22 Jul 2019 16:43:43 +0100 From: To: Thread-Topic: [Qemu-devel] [PATCH v2 05/20] tcg: Move size+sign+endian from TCGMemOp to MemOp Thread-Index: AQHVQKQ9cEFsk0Sv/kSj8smbj0lJlQ== Date: Mon, 22 Jul 2019 15:43:43 +0000 Message-ID: <1563810222730.76414@bt.com> References: In-Reply-To: Accept-Language: en-AU, en-GB, en-US Content-Language: en-AU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.37] MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 213.121.35.80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 Subject: [Qemu-devel] [PATCH v2 05/20] tcg: Move size+sign+endian from TCGMemOp to MemOp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, walling@linux.ibm.com, mst@redhat.com, palmer@sifive.com, mark.cave-ayland@ilande.co.uk, Alistair.Francis@wdc.com, arikalo@wavecomp.com, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, rth@twiddle.net, atar4qemu@gmail.com, ehabkost@redhat.com, sw@weilnetz.de, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, david@gibson.dropbear.id.au, qemu-riscv@nongnu.org, cohuck@redhat.com, claudio.fontana@huawei.com, alex.williamson@redhat.com, qemu-ppc@nongnu.org, amarkovic@wavecomp.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: oHn2JIOxdOUL Preparation for modifying the memory API to take size+sign+endianness instead of just size. Accelerator independent MemOp enum is extended by TCGMemOp enum. Signed-off-by: Tony Nguyen --- MAINTAINERS | 1 + include/exec/memop.h | 27 +++++++++++++++++++++++++++ tcg/tcg.h | 15 +++++---------- 3 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 include/exec/memop.h diff --git a/MAINTAINERS b/MAINTAINERS index cc9636b..3f148cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1890,6 +1890,7 @@ M: Paolo Bonzini S: Supported F: include/exec/ioport.h F: ioport.c +F: include/exec/memop.h F: include/exec/memory.h F: include/exec/ram_addr.h F: memory.c diff --git a/include/exec/memop.h b/include/exec/memop.h new file mode 100644 index 0000000..43e99d7 --- /dev/null +++ b/include/exec/memop.h @@ -0,0 +1,27 @@ +/* + * Constants for memory operations + * + * Authors: + * Richard Henderson + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef MEMOP_H +#define MEMOP_H + +typedef enum MemOp { + MO_8 =3D 0, + MO_16 =3D 1, + MO_32 =3D 2, + MO_64 =3D 3, + MO_SIZE =3D 3, /* Mask for the above. */ + + MO_SIGN =3D 4, /* Sign-extended, otherwise zero-extended. */ + + MO_BSWAP =3D 8, /* Host reverse endian. */ +} MemOp; + +#endif diff --git a/tcg/tcg.h b/tcg/tcg.h index 63e9897..18b91fe 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -26,6 +26,7 @@ #define TCG_H #include "cpu.h" +#include "exec/memop.h" #include "exec/tb-context.h" #include "qemu/bitops.h" #include "qemu/queue.h" @@ -309,17 +310,11 @@ typedef enum TCGType { #endif } TCGType; -/* Constants for qemu_ld and qemu_st for the Memory Operation field. */ +/* + * Extend MemOp with constants for qemu_ld and qemu_st for the Memory + * Operation field. + */ typedef enum TCGMemOp { - MO_8 =3D 0, - MO_16 =3D 1, - MO_32 =3D 2, - MO_64 =3D 3, - MO_SIZE =3D 3, /* Mask for the above. */ - - MO_SIGN =3D 4, /* Sign-extended, otherwise zero-extended. */ - - MO_BSWAP =3D 8, /* Host reverse endian. */ #ifdef HOST_WORDS_BIGENDIAN MO_LE =3D MO_BSWAP, MO_BE =3D 0, -- 1.8.3.1