From f7bd7b8eb6573ed22bfc51e148455a1c0a1e36d0 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Mon, 25 May 2015 18:33:44 +0300 Subject: 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 --- hw/acpi/aml-build.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hw/acpi/aml-build.c') diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 5c140e04c9..045a4e2ee3 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) { -- cgit v1.2.3