Commit b9d1312a authored by Lin Ming's avatar Lin Ming Committed by Len Brown

ACPICA: Fix for implicit return compatibility

Predicate can be used for an implicit return value.
This change improves the implicit return mechanism to be more
compatible with the MS interpreter.

http://www.acpica.org/bugzilla/show_bug.cgi?id=349

Below AML code from http://bugzilla.kernel.org/show_bug.cgi?id=10686

	Store(0x07D6, OSYS)
	Method (_CRT, 0, Serialized)
	{
	    If (LLess (OSYS, 0x07D6))
	    {
		If (LEqual (\_SB.TJ85, Zero))
		{
		    Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
		}
		Else
		{
		    Return (Add (0x0AAC, Multiply (TP85, 0x0A)))
		}
	    }
	}

Previously _CRT returns 0x07D6, now it returns 0 (predicate value of LLess)
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent d8a0ec91
...@@ -166,6 +166,10 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, ...@@ -166,6 +166,10 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
status = AE_CTRL_FALSE; status = AE_CTRL_FALSE;
} }
/* Predicate can be used for an implicit return value */
(void)acpi_ds_do_implicit_return(local_obj_desc, walk_state, TRUE);
cleanup: cleanup:
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%p\n", ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%p\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment