diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 99d213c1827f399874fe966cb193dd99ea2b2c4d..57e3176c62419ab572975b030bb29a858e0c6610 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -408,6 +408,15 @@ Aml *aml_arg(int pos) return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefStore */ +Aml *aml_store(Aml *val, Aml *target) +{ + Aml *var = aml_opcode(0x70 /* StoreOp */); + aml_append(var, val); + aml_append(var, target); + return var; +} + /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ Aml *aml_if(Aml *predicate) { diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 63e9754ad6bcad46454e3c386f56a4bfc9dfe9e3..6ad76ddc62b90a2c86a237601ae859c5f133253b 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -65,6 +65,7 @@ Aml *aml_name_decl(const char *name, Aml *val); Aml *aml_return(Aml *val); Aml *aml_int(const uint64_t val); Aml *aml_arg(int pos); +Aml *aml_store(Aml *val, Aml *target); /* Block AML object primitives */ Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);