Skip to content

Increment/Decrement are implemented incorrectly #140

Description

@d-tatianin

I've already opened a similar issue in ACPICA: acpica/acpica#908
I think LAI is mimicking ACPICA here, but that is not correct behavior.
The operand of IncrementOp is a SuperName therefore it can be a result of RefOf.

Simple reproducer code:

DefinitionBlock ("", "SSDT", 1, "uTTEST", "TESTTABL", 0xF0F0F0F0)
{
    Scope (_SB) {
        Method (TEST, 1) {
            Arg0++
        }

        Method (_INI, 0, NotSerialized)
        {
            Local0 = 1
            TEST(RefOf(Local0))
        }
    }
}

This dies on LAI_ENSURE(result.type == LAI_INTEGER)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions