]> Git Repo - qemu.git/commitdiff
acpi: add aml_decrement() and aml_subtract()
authorIgor Mammedov <[email protected]>
Wed, 9 Dec 2015 23:41:03 +0000 (00:41 +0100)
committerMichael S. Tsirkin <[email protected]>
Tue, 22 Dec 2015 16:39:21 +0000 (18:39 +0200)
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
hw/acpi/aml-build.c
include/hw/acpi/aml-build.h

index 15bb5bdafe9a3cde130cca97e8070f230ede9564..74316d111a6b4290edbae76bccab9d675c091a14 100644 (file)
@@ -502,6 +502,12 @@ Aml *aml_add(Aml *arg1, Aml *arg2, Aml *dst)
     return build_opcode_2arg_dst(0x72 /* AddOp */, arg1, arg2, dst);
 }
 
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefSubtract */
+Aml *aml_subtract(Aml *arg1, Aml *arg2, Aml *dst)
+{
+    return build_opcode_2arg_dst(0x74 /* SubtractOp */, arg1, arg2, dst);
+}
+
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefIncrement */
 Aml *aml_increment(Aml *arg)
 {
@@ -510,6 +516,14 @@ Aml *aml_increment(Aml *arg)
     return var;
 }
 
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefDecrement */
+Aml *aml_decrement(Aml *arg)
+{
+    Aml *var = aml_opcode(0x76 /* DecrementOp */);
+    aml_append(var, arg);
+    return var;
+}
+
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefIndex */
 Aml *aml_index(Aml *arg1, Aml *idx)
 {
index 0769b35d911ed260d11bcf9692da366955fc373c..40a95d8f0610319a15c7061ec97e257f15a2858b 100644 (file)
@@ -231,7 +231,9 @@ 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 *dst);
+Aml *aml_subtract(Aml *arg1, Aml *arg2, Aml *dst);
 Aml *aml_increment(Aml *arg);
+Aml *aml_decrement(Aml *arg);
 Aml *aml_index(Aml *arg1, Aml *idx);
 Aml *aml_notify(Aml *arg1, Aml *arg2);
 Aml *aml_call1(const char *method, Aml *arg1);
This page took 0.031439 seconds and 4 git commands to generate.