From: Marcel Apfelbaum Date: Mon, 25 May 2015 15:33:44 +0000 (+0300) Subject: acpi: add aml_shiftright() term X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~171^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7bd7b8eb6573ed22bfc51e148455a1c0a1e36d0;p=sdk%2Femulator%2Fqemu.git acpi: add aml_shiftright() term Add encoding for ACPI DefShiftRight Opcode. Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Shannon Zhao --- diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 5c140e0..045a4e2 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -465,6 +465,16 @@ Aml *aml_shiftleft(Aml *arg1, Aml *count) return var; } +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefShiftRight */ +Aml *aml_shiftright(Aml *arg1, Aml *count) +{ + Aml *var = aml_opcode(0x7A /* ShiftRightOp */); + 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) { diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index f2100cb..9abb4c3 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -203,6 +203,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_lless(Aml *arg1, Aml *arg2); Aml *aml_add(Aml *arg1, Aml *arg2); Aml *aml_index(Aml *arg1, Aml *idx);