From 36858208e6e06fdda2698e9a66a8e27f6d9acd24 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Tue, 6 Oct 2020 21:01:51 +0000 Subject: acpigen: Add ShiftLeft function helper Provide a helper function for the ACPI shift left operator that uses the same operator for the source and result. ShiftLeft (OP, count, OP) Signed-off-by: Duncan Laurie Change-Id: I66ee89bd1c4be583d0e892b02535bfa9514d488a Reviewed-on: https://review.coreboot.org/c/coreboot/+/46256 Reviewed-by: Furquan Shaikh Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/acpi/acpigen.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/acpi') diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index ee7c90cf01..0ed3708016 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -1381,6 +1381,14 @@ void acpigen_write_else(void) acpigen_write_len_f(); } +void acpigen_write_shiftleft_op_int(uint8_t src_result, uint64_t count) +{ + acpigen_emit_byte(SHIFT_LEFT_OP); + acpigen_emit_byte(src_result); + acpigen_write_integer(count); + acpigen_emit_byte(ZERO_OP); +} + void acpigen_write_to_buffer(uint8_t src, uint8_t dst) { acpigen_emit_byte(TO_BUFFER_OP); -- cgit v1.2.3