summaryrefslogtreecommitdiff
path: root/source/compiler/dtparser.y
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/dtparser.y')
-rw-r--r--source/compiler/dtparser.y17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/compiler/dtparser.y b/source/compiler/dtparser.y
index a2943cccec74..d5990fe45fe5 100644
--- a/source/compiler/dtparser.y
+++ b/source/compiler/dtparser.y
@@ -275,17 +275,24 @@ Expression
| EXPOP_LABEL { $$ = DtResolveLabel (DtParsertext);}
- /* Default base for a non-prefixed integer is 16 */
+ /*
+ * All constants for the data table compiler are in hex, whether a (optional) 0x
+ * prefix is present or not. For example, these two input strings are equivalent:
+ * 1234
+ * 0x1234
+ */
- | EXPOP_NUMBER { AcpiUtStrtoul64 (DtParsertext, (ACPI_STRTOUL_BASE16 | ACPI_STRTOUL_64BIT), &$$);}
+ /* Non-prefixed hex number */
+
+ | EXPOP_NUMBER { $$ = DtDoConstant (DtParsertext);}
/* Standard hex number (0x1234) */
- | EXPOP_HEX_NUMBER { AcpiUtStrtoul64 (DtParsertext, (ACPI_STRTOUL_BASE16 | ACPI_STRTOUL_64BIT), &$$);}
+ | EXPOP_HEX_NUMBER { $$ = DtDoConstant (DtParsertext);}
- /* TBD: Decimal number with prefix (0d1234) - Not supported by strtoul64 at this time */
+ /* Possible TBD: Decimal number with prefix (0d1234) - Not supported this time */
- | EXPOP_DECIMAL_NUMBER { AcpiUtStrtoul64 (DtParsertext, ACPI_STRTOUL_64BIT, &$$);}
+ | EXPOP_DECIMAL_NUMBER { $$ = DtDoConstant (DtParsertext);}
;
%%