]> Git Repo - qemu.git/commitdiff
acpi: extend aml_shiftright() to accept target argument
authorIgor Mammedov <[email protected]>
Wed, 9 Dec 2015 23:41:06 +0000 (00:41 +0100)
committerMichael S. Tsirkin <[email protected]>
Tue, 22 Dec 2015 16:39:21 +0000 (18:39 +0200)
it allows to express ShiftRight(A,B,C) syntax

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
hw/i386/acpi-build.c
include/hw/acpi/aml-build.h

index f58eb0123af5da12ff8f575068c34d5dd8da8904..9337b875287a2d7355812558ab7d4ad69eb76d02 100644 (file)
@@ -491,9 +491,9 @@ Aml *aml_shiftleft(Aml *arg1, Aml *count)
 }
 
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefShiftRight */
-Aml *aml_shiftright(Aml *arg1, Aml *count)
+Aml *aml_shiftright(Aml *arg1, Aml *count, Aml *dst)
 {
-    return build_opcode_2arg_dst(0x7A /* ShiftRightOp */, arg1, count, NULL);
+    return build_opcode_2arg_dst(0x7A /* ShiftRightOp */, arg1, count, dst);
 }
 
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLLess */
index 16fb16861134a0237e1f4028a9ad110fdf18ae81..35ea92d02214a34b6407c9bccca53ec041f2c9c4 100644 (file)
@@ -667,7 +667,7 @@ static Aml *build_prt(void)
 
         /* slot = pin >> 2 */
         aml_append(while_ctx,
-                   aml_store(aml_shiftright(pin, aml_int(2)), slot));
+                   aml_store(aml_shiftright(pin, aml_int(2), NULL), slot));
         /* lnk_idx = (slot + pin) & 3 */
         aml_append(while_ctx,
             aml_store(aml_and(aml_add(pin, slot, NULL), aml_int(3)), lnk_idx));
index c3d3fd5c8f518b05f0e72ca0e82c4f9b2bf79880..365e388fcbcf815e8bce82b46d6d78f2afcf4898 100644 (file)
@@ -229,7 +229,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_shiftright(Aml *arg1, Aml *count, Aml *dst);
 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);
This page took 0.033824 seconds and 4 git commands to generate.