lai icon indicating copy to clipboard operation
lai copied to clipboard

Increment/Decrement are implemented incorrectly

Open d-tatianin opened this issue 1 year ago • 0 comments

I've already opened a similar issue in ACPICA: https://github.com/acpica/acpica/issues/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)

d-tatianin avatar Nov 10 '23 20:11 d-tatianin