aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-05-25 18:33:43 +0300
committerMichael S. Tsirkin <mst@redhat.com>2015-06-01 14:18:54 +0200
commita57dddddd2f93b87852fac2ed41a31c45e6d192a (patch)
tree8f16e3c7eaaaefe5642e11e8241024a3db416bab /hw/acpi
parent928b8996576875f9364f77c5a41f12cd55c7b9f7 (diff)
acpi: add aml_shiftleft() term
Add encoding for ACPI DefShiftLeft Opcode. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Diffstat (limited to 'hw/acpi')
-rw-r--r--hw/acpi/aml-build.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index ea70f43d65..5c140e04c9 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -455,6 +455,16 @@ Aml *aml_or(Aml *arg1, Aml *arg2)
return var;
}
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefShiftLeft */
+Aml *aml_shiftleft(Aml *arg1, Aml *count)
+{
+ Aml *var = aml_opcode(0x79 /* ShiftLeftOp */);
+ 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)
{