From 926f5aaefad164dabcdd771f4c15c9773383d9e9 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 18 Feb 2015 19:14:25 +0000 Subject: acpi: add aml_and() term Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hw/acpi') diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 57e3176c62..bb1fbbce44 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -417,6 +417,16 @@ Aml *aml_store(Aml *val, Aml *target) return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefAnd */ +Aml *aml_and(Aml *arg1, Aml *arg2) +{ + Aml *var = aml_opcode(0x7B /* AndOp */); + aml_append(var, arg1); + aml_append(var, arg2); + build_append_int(var->buf, 0x00 /* NullNameOp */); + return var; +} + /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ Aml *aml_if(Aml *predicate) { -- cgit v1.2.3