acpi: extend aml_shiftright() to accept target argument
it allows to express ShiftRight(A,B,C) syntax Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
parent
f411199de7
commit
c360639aee
@ -491,9 +491,9 @@ Aml *aml_shiftleft(Aml *arg1, Aml *count)
|
||||
}
|
||||
|
||||
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefShiftRight */
|
||||
Aml *aml_shiftright(Aml *arg1, Aml *count)
|
||||
Aml *aml_shiftright(Aml *arg1, Aml *count, Aml *dst)
|
||||
{
|
||||
return build_opcode_2arg_dst(0x7A /* ShiftRightOp */, arg1, count, NULL);
|
||||
return build_opcode_2arg_dst(0x7A /* ShiftRightOp */, arg1, count, dst);
|
||||
}
|
||||
|
||||
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLLess */
|
||||
|
@ -667,7 +667,7 @@ static Aml *build_prt(void)
|
||||
|
||||
/* slot = pin >> 2 */
|
||||
aml_append(while_ctx,
|
||||
aml_store(aml_shiftright(pin, aml_int(2)), slot));
|
||||
aml_store(aml_shiftright(pin, aml_int(2), NULL), slot));
|
||||
/* lnk_idx = (slot + pin) & 3 */
|
||||
aml_append(while_ctx,
|
||||
aml_store(aml_and(aml_add(pin, slot, NULL), aml_int(3)), lnk_idx));
|
||||
|
@ -229,7 +229,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_shiftright(Aml *arg1, Aml *count, Aml *dst);
|
||||
Aml *aml_lless(Aml *arg1, Aml *arg2);
|
||||
Aml *aml_add(Aml *arg1, Aml *arg2, Aml *dst);
|
||||
Aml *aml_subtract(Aml *arg1, Aml *arg2, Aml *dst);
|
||||
|
Loading…
Reference in New Issue
Block a user