From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBQCm-0008FJ-Bg for qemu-devel@nongnu.org; Tue, 22 Dec 2015 11:54:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBQCk-0000xE-1a for qemu-devel@nongnu.org; Tue, 22 Dec 2015 11:54:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBQCj-0000xA-Sl for qemu-devel@nongnu.org; Tue, 22 Dec 2015 11:54:29 -0500 Date: Tue, 22 Dec 2015 18:54:26 +0200 From: "Michael S. Tsirkin" Message-ID: <1450803119-4223-38-git-send-email-mst@redhat.com> References: <1450803119-4223-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450803119-4223-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 37/55] acpi: add aml_lgreater_equal() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Peter Maydell , Shannon Zhao , Igor Mammedov From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum Reviewed-by: Shannon Zhao --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index b8a0ad2..fba8f25 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -262,6 +262,7 @@ Aml *aml_local(int num); Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2); Aml *aml_lnot(Aml *arg); Aml *aml_equal(Aml *arg1, Aml *arg2); +Aml *aml_lgreater_equal(Aml *arg1, Aml *arg2); Aml *aml_processor(uint8_t proc_id, uint32_t pblk_addr, uint8_t pblk_len, const char *name_format, ...) GCC_FMT_ATTR(4, 5); Aml *aml_eisaid(const char *str); diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 867afbe..60246eb 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -764,6 +764,17 @@ Aml *aml_equal(Aml *arg1, Aml *arg2) return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLGreaterEqual */ +Aml *aml_lgreater_equal(Aml *arg1, Aml *arg2) +{ + /* LGreaterEqualOp := LNotOp LLessOp */ + Aml *var = aml_opcode(0x92 /* LNotOp */); + build_append_byte(var->buf, 0x95 /* LLessOp */); + aml_append(var, arg1); + aml_append(var, arg2); + return var; +} + /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ Aml *aml_if(Aml *predicate) { -- MST