qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v2 53/60] acpi: add aml_shiftright() term


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PULL v2 53/60] acpi: add aml_shiftright() term
Date: Mon, 1 Jun 2015 14:25:35 +0200

From: Marcel Apfelbaum <address@hidden>

Add encoding for ACPI DefShiftRight Opcode.

Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Shannon Zhao <address@hidden>
---
 include/hw/acpi/aml-build.h |  1 +
 hw/acpi/aml-build.c         | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index f2100cb..9abb4c3 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -203,6 +203,7 @@ Aml *aml_store(Aml *val, Aml *target);
 Aml *aml_and(Aml *arg1, Aml *arg2);
 Aml *aml_or(Aml *arg1, Aml *arg2);
 Aml *aml_shiftleft(Aml *arg1, Aml *count);
+Aml *aml_shiftright(Aml *arg1, Aml *count);
 Aml *aml_lless(Aml *arg1, Aml *arg2);
 Aml *aml_add(Aml *arg1, Aml *arg2);
 Aml *aml_index(Aml *arg1, Aml *idx);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 5c140e0..045a4e2 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -465,6 +465,16 @@ Aml *aml_shiftleft(Aml *arg1, Aml *count)
     return var;
 }
 
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefShiftRight */
+Aml *aml_shiftright(Aml *arg1, Aml *count)
+{
+    Aml *var = aml_opcode(0x7A /* ShiftRightOp */);
+    aml_append(var, arg1);
+    aml_append(var, count);
+    build_append_byte(var->buf, 0x00); /* NullNameOp */
+    return var;
+}
+
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLLess */
 Aml *aml_lless(Aml *arg1, Aml *arg2)
 {
-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]