summaryrefslogtreecommitdiff
path: root/tests/aslts/src/runtime/collections
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2015-03-11 11:36:42 -0700
committerRobert Moore <Robert.Moore@intel.com>2015-03-11 11:36:42 -0700
commit1d438e1493f0c065490a1787b2be314be351b6bd (patch)
tree1d5092c7429d119cfa9cbed089f0132ce02f94ea /tests/aslts/src/runtime/collections
parent40afaf134d7d82743e7b4dc6321e76452d113b3f (diff)
downloadacpica-1d438e1493f0c065490a1787b2be314be351b6bd.tar.gz
Tests: Update constants for iASL constant folding changes.
The iASL constant folding is has been updated. Update ASLTS to reflect this. We must force some operations to bypass the constant folding so that there are no compile-time errors, and the runtime error checking is tested instead. In other words, more errors are now caught during the compile.
Diffstat (limited to 'tests/aslts/src/runtime/collections')
-rw-r--r--tests/aslts/src/runtime/collections/bdemo/ACPICA/0063/File0.asl147
-rw-r--r--tests/aslts/src/runtime/collections/bdemo/ACPICA/0064/DECL.asl12
-rw-r--r--tests/aslts/src/runtime/collections/bdemo/ACPICA/0196/DECL.asl3
-rw-r--r--tests/aslts/src/runtime/collections/bdemo/ACPICA/0197/DECL.asl3
-rw-r--r--tests/aslts/src/runtime/collections/complex/misc/misc.asl3
-rw-r--r--tests/aslts/src/runtime/collections/complex/operand/tests/oconst/oconst.asl3
-rw-r--r--tests/aslts/src/runtime/collections/exceptions/exc/exc.asl15
7 files changed, 124 insertions, 62 deletions
diff --git a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0063/File0.asl b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0063/File0.asl
index 40227d1c5..6eca15a7b 100644
--- a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0063/File0.asl
+++ b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0063/File0.asl
@@ -62,12 +62,14 @@ Method(mf92) {
}
if (F64) {
- ToInteger("0x1234567890123456", Local0)
+ Store("0x1234567890123456", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x1234567890123456)) {
err("", zFFF, 0x106, 0, 0, Local0, 0x1234567890123456)
}
- ToInteger("0x123456789012345", Local0)
+ Store("0x123456789012345", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x123456789012345)) {
err("", zFFF, 0x107, 0, 0, Local0, 0x123456789012345)
}
@@ -86,12 +88,14 @@ Method(mf92) {
}
if (F64) {
- ToInteger("0xabcdefefadefbcdf", Local0)
+ Store("0xabcdefefadefbcdf", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0xabcdefefadefbcdf)) {
err("", zFFF, 0x10a, 0, 0, Local0, 0xabcdefefadefbcdf)
}
- ToInteger("0xabcdefefadefbcd", Local0)
+ Store("0xabcdefefadefbcd", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0xabcdefefadefbcd)) {
err("", zFFF, 0x10b, 0, 0, Local0, 0xabcdefefadefbcd)
}
@@ -105,12 +109,14 @@ Method(mf92) {
}
if (F64) {
- ToInteger("0x1ab2cd340fe05678", Local0)
+ Store("0x1ab2cd340fe05678", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x1ab2cd340fe05678)) {
err("", zFFF, 0x10d, 0, 0, Local0, 0x1ab2cd340fe05678)
}
- ToInteger("0x1ab2cd340fe0", Local0)
+ Store("0x1ab2cd340fe0", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x1ab2cd340fe0)) {
err("", zFFF, 0x10e, 0, 0, Local0, 0x1ab2cd340fe0)
}
@@ -167,7 +173,8 @@ Method(mf93) {
}
if (F64) {
- ToInteger("18446744073709551615", Local0)
+ Store("18446744073709551615", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 18446744073709551615)) {
err("", zFFF, 0x118, 0, 0, Local0, 18446744073709551615)
}
@@ -210,12 +217,14 @@ Method(mf94) {
}
if (F64) {
- ToInteger(" 0x1234567890123456", Local0)
+ Store(" 0x1234567890123456", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x1234567890123456)) {
err("", zFFF, 0x120, 0, 0, Local0, 0x1234567890123456)
}
- ToInteger(" 0x123456789012345", Local0)
+ Store(" 0x123456789012345", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x123456789012345)) {
err("", zFFF, 0x121, 0, 0, Local0, 0x123456789012345)
}
@@ -237,12 +246,14 @@ Method(mf94) {
}
if (F64) {
- ToInteger(" 0xabcdefefadefbcdf", Local0)
+ Store(" 0xabcdefefadefbcdf", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0xabcdefefadefbcdf)) {
err("", zFFF, 0x125, 0, 0, Local0, 0xabcdefefadefbcdf)
}
- ToInteger(" 0xabcdefefadefbcd", Local0)
+ Store(" 0xabcdefefadefbcd", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0xabcdefefadefbcd)) {
err("", zFFF, 0x126, 0, 0, Local0, 0xabcdefefadefbcd)
}
@@ -254,12 +265,14 @@ Method(mf94) {
}
if (F64) {
- ToInteger(" 0x1ab2cd340fe05678", Local0)
+ Store(" 0x1ab2cd340fe05678", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x1ab2cd340fe05678)) {
err("", zFFF, 0x128, 0, 0, Local0, 0x1ab2cd340fe05678)
}
- ToInteger(" 0x1ab2cd340fe0", Local0)
+ Store(" 0x1ab2cd340fe0", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0x1ab2cd340fe0)) {
err("", zFFF, 0x129, 0, 0, Local0, 0x1ab2cd340fe0)
}
@@ -316,7 +329,8 @@ Method(mf94) {
}
if (F64) {
- ToInteger(" 18446744073709551615", Local0)
+ Store(" 18446744073709551615", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 18446744073709551615)) {
err("", zFFF, 0x134, 0, 0, Local0, 18446744073709551615)
}
@@ -398,17 +412,20 @@ Method(mf95) {
}
if (F64) {
- ToInteger(" 018446744073709551615", Local0)
+ Store(" 018446744073709551615", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 18446744073709551615)) {
err("", zFFF, 0x144, 0, 0, Local0, 18446744073709551615)
}
- ToInteger("018446744073709551615", Local0)
+ Store("018446744073709551615", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 18446744073709551615)) {
err("", zFFF, 0x145, 0, 0, Local0, 18446744073709551615)
}
- ToInteger("000000000000000000000000000000000000000018446744073709551615", Local0)
+ Store("000000000000000000000000000000000000000018446744073709551615", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 18446744073709551615)) {
err("", zFFF, 0x146, 0, 0, Local0, 18446744073709551615)
}
@@ -424,148 +441,180 @@ Method(mf96) {
// 5. "1234cd" (non-decimal character in dec-image)
CH03("", 0, 0x147, 0, 0)
- ToInteger("1234cd", Local0)
+ Store("1234cd", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x148, 0, 0)
// 6. "000x1234" (non-decimal character in dec-image)
CH03("", 0, 0x149, 0, 0)
- ToInteger("000x1234", Local0)
+ Store("000x1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x14a, 0, 0)
// 7. "0x1234cdQ" (non-hex character in '0x'-image)
CH03("", 0, 0x14b, 0, 0)
- ToInteger("0x1234cdQ", Local0)
+ Store("0x1234cdQ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x14c, 0, 0)
CH03("", 0, 0x14d, 0, 0)
- ToInteger("0x0x12345", Local0)
+ Store("0x0x12345", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x14e, 0, 0)
// 8. "1234 " (white space in dec image)
CH03("", 0, 0x14f, 0, 0)
- ToInteger("1234 ", Local0)
+ Store("1234 ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x150, 0, 0)
// 9. "0x1234cd " (white space in '0x'-image)
CH03("", 0, 0x151, 0, 0)
- ToInteger("0x1234cd ", Local0)
+ Store("0x1234cd ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x152, 0, 0)
// 10. "0x 1234cdQ" (white space after '0x')
CH03("", 0, 0x153, 0, 0)
- ToInteger("0x 1234", Local0)
+ Store("0x 1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x154, 0, 0)
CH03("", 0, 0x155, 0, 0)
- ToInteger("0x0x 1234", Local0)
+ Store("0x0x 1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x156, 0, 0)
CH03("", 0, 0x157, 0, 0)
- ToInteger("0x0x 0x 1234", Local0)
+ Store("0x0x 0x 1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x158, 0, 0)
CH03("", 0, 0x159, 0, 0)
- ToInteger("0x 0x 1234", Local0)
+ Store("0x 0x 1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x15a, 0, 0)
// 11. (decimal image exceeding maximal)
// 32-bit mode – the value exceeding "4294967295"
if (LNot(F64)) {
CH03("", 0, 0x15b, 0, 0)
- ToInteger("4294967296", Local0)
+ Store("4294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x15c, 0, 0)
CH03("", 0, 0x15d, 0, 0)
- ToInteger("123456789012345678904294967296", Local0)
+ Store("123456789012345678904294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x15e, 0, 0)
CH03("", 0, 0x15f, 0, 0)
- ToInteger(" 00004294967296", Local0)
+ Store(" 00004294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x160, 0, 0)
CH03("", 0, 0x161, 0, 0)
- ToInteger(" 0123456789012345678904294967296", Local0)
+ Store(" 0123456789012345678904294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x162, 0, 0)
CH03("", 0, 0x163, 0, 0)
- ToInteger("0123456789012345678904294967296", Local0)
+ Store("0123456789012345678904294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x164, 0, 0)
CH03("", 0, 0x165, 0, 0)
- ToInteger(" 123456789012345678904294967296", Local0)
+ Store(" 123456789012345678904294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x166, 0, 0)
CH03("", 0, 0x167, 0, 0)
- ToInteger(" 123456789012345678904294967296", Local0)
+ Store(" 123456789012345678904294967296", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x168, 0, 0)
}
// 64-bit mode – the value exceeding "18446744073709551615"
CH03("", 0, 0x169, 0, 0)
- ToInteger("18446744073709551616", Local0)
+ Store("18446744073709551616", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x16a, 0, 0)
CH03("", 0, 0x16b, 0, 0)
- ToInteger(" 18446744073709551616", Local0)
+ Store(" 18446744073709551616", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x16c, 0, 0)
CH03("", 0, 0x16d, 0, 0)
- ToInteger(" 18446744073709551616", Local0)
+ Store(" 18446744073709551616", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x16e, 0, 0)
CH03("", 0, 0x16f, 0, 0)
- ToInteger("018446744073709551616", Local0)
+ Store("018446744073709551616", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x170, 0, 0)
CH03("", 0, 0x171, 0, 0)
- ToInteger(" 000000000018446744073709551616", Local0)
+ Store(" 000000000018446744073709551616", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x172, 0, 0)
// 12. "0x12345678901234567" (hex image exceeding maximal)
CH03("", 0, 0x173, 0, 0)
- ToInteger("0x12345678901234567", Local0)
+ Store("0x12345678901234567", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x174, 0, 0)
// 13. "0x00000000000001234" (hex image exceeding maximal; no matter that zeros)
CH03("", 0, 0x175, 0, 0)
- ToInteger("0x00000000000001234", Local0)
+ Store("0x00000000000001234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x176, 0, 0)
CH03("", 0, 0x178, 0, 0)
- ToInteger("0x0000000000000000000001234", Local0)
+ Store("0x0000000000000000000001234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x179, 0, 0)
// 14. "0x123456789" (hex image exceeding maximal; for 32-bit mode only)
if (LNot(F64)) {
CH03("", 0, 0x17a, 0, 0)
- ToInteger("0x123456789", Local0)
+ Store("0x123456789", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x17b, 0, 0)
}
// 15. "0x" (incomplete '0x' image)
CH03("", 0, 0x17c, 0, 0)
- ToInteger("0x", Local0)
+ Store("0x", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x17d, 0, 0)
CH03("", 0, 0x17e, 0, 0)
- ToInteger("0x ", Local0)
+ Store("0x ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x17f, 0, 0)
CH03("", 0, 0x180, 0, 0)
- ToInteger("0x ", Local0)
+ Store("0x ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x181, 0, 0)
CH03("", 0, 0x182, 0, 0)
- ToInteger("0x 1234", Local0)
+ Store("0x 1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x183, 0, 0)
CH03("", 0, 0x184, 0, 0)
- ToInteger("0x 1234", Local0)
+ Store("0x 1234", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x185, 0, 0)
// 16. Empty string
CH03("", 0, 0x186, 0, 0)
- ToInteger("", Local0)
+ Store("", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 0xff, 0, 0x187, 0, 0)
}
diff --git a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0064/DECL.asl b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0064/DECL.asl
index 88ad58ce5..a0e742f93 100644
--- a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0064/DECL.asl
+++ b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0064/DECL.asl
@@ -50,11 +50,13 @@
CH03("", 0, 0x005, 0, 0)
CH03("", 0, 0x006, 0, 0)
- ToInteger("", Local0)
+ Store("", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 36, 0, 0x007, 0, 0) // AE_BAD_DECIMAL_CONSTANT
CH03("", 0, 0x008, 0, 0)
- ToInteger(" ", Local0)
+ Store(" ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 36, 0, 0x009, 0, 0) // AE_BAD_DECIMAL_CONSTANT
CH03("", 0, 0x00a, 0, 0)
@@ -72,10 +74,12 @@
CH03("", 0, 0x00f, 0, 0)
CH03("", 0, 0x010, 0, 0)
- ToInteger("q", Local0)
+ Store("q", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 36, 0, 0x011, 0, 0) // AE_BAD_DECIMAL_CONSTANT
CH03("", 0, 0x012, 0, 0)
- ToInteger("q ", Local0)
+ Store("q ", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 36, 0, 0x013, 0, 0) // AE_BAD_DECIMAL_CONSTANT
}
diff --git a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0196/DECL.asl b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0196/DECL.asl
index 3e4e2fd2e..5bb103e24 100644
--- a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0196/DECL.asl
+++ b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0196/DECL.asl
@@ -35,6 +35,7 @@
Method(mfb0)
{
CH03("", 0, 0x000, 0, 0)
- ToInteger("0x0x12345678", Local0)
+ Store("0x0x12345678", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 34, 0, 0x001, 0, 0) // AE_BAD_HEX_CONSTANT
}
diff --git a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0197/DECL.asl b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0197/DECL.asl
index 4c598180d..6aeb7a122 100644
--- a/tests/aslts/src/runtime/collections/bdemo/ACPICA/0197/DECL.asl
+++ b/tests/aslts/src/runtime/collections/bdemo/ACPICA/0197/DECL.asl
@@ -35,6 +35,7 @@
Method(mfb1)
{
CH03("", 0, 0x000, 0, 0)
- ToInteger("0x 12345678", Local0)
+ Store("0x 12345678", Local1)
+ ToInteger(Local1, Local0)
CH04("", 0, 34, 0, 0x001, 0, 0) // AE_BAD_HEX_CONSTANT
}
diff --git a/tests/aslts/src/runtime/collections/complex/misc/misc.asl b/tests/aslts/src/runtime/collections/complex/misc/misc.asl
index 4bbcba57b..7dee78f2f 100644
--- a/tests/aslts/src/runtime/collections/complex/misc/misc.asl
+++ b/tests/aslts/src/runtime/collections/complex/misc/misc.asl
@@ -1030,7 +1030,8 @@ Method(mf86, 1)
{
CH03("mf86", z054, 74, 0, 0)
- ToInteger("0x0x12345678", Local0)
+ Store("0x0x12345678", Local1)
+ ToInteger(Local1, Local0)
if (LNotEqual(Local0, 0)) {
err(arg0, z054, 75, 0, 0, Local0, 0)
}
diff --git a/tests/aslts/src/runtime/collections/complex/operand/tests/oconst/oconst.asl b/tests/aslts/src/runtime/collections/complex/operand/tests/oconst/oconst.asl
index d838ef6fc..e1cc6ed77 100644
--- a/tests/aslts/src/runtime/collections/complex/operand/tests/oconst/oconst.asl
+++ b/tests/aslts/src/runtime/collections/complex/operand/tests/oconst/oconst.asl
@@ -2774,7 +2774,8 @@ Method(m610,, Serialized)
ToBCD("0321", Local0)
m600(arg0, 4, Local0, 0x801)
- ToBCD("D76162EE9EC35", Local0)
+ Store("D76162EE9EC35", Local1)
+ ToBCD(Local1, Local0)
m600(arg0, 5, Local0, 0x3789012345678901)
}
diff --git a/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl b/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl
index e54ed9469..8b7e642eb 100644
--- a/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl
+++ b/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl
@@ -513,7 +513,8 @@ Method(m14e,, Serialized)
CH03(ts, z058, 61, 0, 0)
if (LEqual(F64, 1)) {
- ToBCD(9999999999999999, Local5)
+ Store(9999999999999999, Local4)
+ ToBCD(Local4, Local5)
} else {
ToBCD(99999999, Local5)
}
@@ -521,9 +522,11 @@ Method(m14e,, Serialized)
CH03(ts, z058, 62, 0, 0)
if (LEqual(F64, 1)) {
- ToBCD(10000000000000000, Local5)
+ Store(10000000000000000, Local4)
+ ToBCD(Local4, Local5)
} else {
- ToBCD(100000000, Local5)
+ Store(100000000, Local4)
+ ToBCD(Local4, Local5)
}
CH04(ts, 0, 52, z058, 63, 0, 0) // AE_AML_NUMERIC_OVERFLOW
@@ -841,12 +844,14 @@ Method(m156,, Serialized)
CH03(ts, z058, 109, 0, 0)
// ToInteger, empty String
- ToInteger("", Local5)
+ Store("", Local4)
+ ToInteger(Local4, Local5)
CH04(ts, 0, 36, z058, 110, 0, 0) // AE_BAD_DECIMAL_CONSTANT
// ToInteger, String filled with blanks
- ToInteger(" ", Local5)
+ Store(" ", Local4)
+ ToInteger(Local4, Local5)
// CH04(ts, 0, 34, z058, 111, 0, 0) // AE_BAD_HEX_CONSTANT
CH04(ts, 0, 36, z058, 111, 0, 0) // AE_BAD_DECIMAL_CONSTANT