1114 Commits

Author SHA1 Message Date
Robert Moore
ff56b2ded9 Disassembler: Add option (-vt) to also dump binary table data in hex.
Optionally dump the binary table data of an AML table (DSDT/SSDT)
after the normal disassembly of the table.
2012-10-11 15:00:00 -07:00
Robert Moore
9f0a65f188 iASL: For -f option (force), allow non-ASCII characters in input.
If -f is specified, allow an input file with non-ASCII characters.
2012-10-11 14:27:14 -07:00
Robert Moore
8d96522dda Update readme files for ACPICA and iASL generation.
Miscellaneous updates for these help files.
2012-10-05 09:09:40 -07:00
Robert Moore
2406636978 Small fix for standard Intel legal header.
Remove an extraneous space after a comma, for consistency.
2012-09-27 09:36:49 -07:00
Robert Moore
a28a14bc42 Remove extra spaces after periods in the Intel license.
For consistency with the rest of the source code.
2012-09-26 13:17:19 -07:00
Robert Moore
d91aaaf0ae Remove extra spaces after periods within comments.
This makes all comments consistent.
2012-09-26 13:14:58 -07:00
Robert Moore
5cf391810f Fix some typos in comments. No functional changes.
Some small fixes within commments. Colin Ian King.
2012-09-25 12:28:13 -07:00
Robert Moore
d57cfb09bc iASL/table_compiler: Some additional return statement fixes.
Add parens around the returned expression.
2012-09-21 14:10:51 -07:00
Robert Moore
c0b396e9a2 iASL/Tools: Cleanup empty lines at file start and end.
Maintenance for source code consistency.
2012-09-21 13:45:48 -07:00
Robert Moore
087f252d98 iASL/Tools: return statement audit.
Ensure that all normal return statements surround the return
expression (value) with parens, for consistency.
2012-09-21 09:50:35 -07:00
Robert Moore
0ee9c13eee iASL: Cleanup intermediate file deletion.
Add local delete file function.
Add Control-C handler that deletes any dangling files.
2012-09-05 13:17:33 -07:00
Robert Moore
1fb836c002 iASL: Fix problem with constant folding in method declarations.
This change fixes an issue with method declarations where the SyncLevel
term is a ByteConstExpr, but if a Type3 opcode was used, it would not
be evaluated properly.

This is an interim fix for this single case, specifically to allow the
ASLTS test to run properly.

However, it does not address the general case where parse tree transforms
are applied before the constant folding is performed. In this case, the
SyncLevel is merged with the NumArgs and SerializedFlag to generate a
raw data byte before the constant folding is performed. After this
parse tree transform, no constant folding can be performed on the
Method() parameters.

Two solutions:
1) The general case could possibly be solved by performing parse tree
transforms only after the constant folding has been completed
2) Continue to special-case each of these issues in the various
ASL operators that have similar issues.
2012-08-31 12:35:48 -07:00
Robert Moore
fca5fa50a2 iASL: Fix namepath optimization problem.
An error can occur if the parse node that contains the namepath to be optimized
does not have a parent node that is a named object. This change fixes the
problem.

Problem detected by ASLTS test suite.
2012-08-31 12:15:09 -07:00
Robert Moore
05bcf4ad3e iASL: Fix regression where AML file is not deleted on errors.
The AML output file should be deleted if there are any errors
during the compiler. The only exception is if the -f (force output)
option is used.
2012-08-30 13:49:06 -07:00
Robert Moore
54e0432053 iASL: Automatically increase internal line buffer sizes.
Via realloc(), automatically increase the internal line buffer sizes
as necessary to support very long source code lines.

The current version of the preprocessor requires a buffer long enough
to contain full source code lines. This change increases the line
buffer(s) if the input lines go beyond the current buffer size.
This eliminates errors that occurred when a source code line was
longer than the buffer.
2012-08-17 13:21:41 -07:00
Robert Moore
c24949b628 iASL: Improve error messages for very long source lines.
Limit the source line output for error messages (256).
For these long lines, do not attempt to have the error message
point to the offending text. Emit the error column number
instead.
2012-08-17 12:48:01 -07:00
Robert Moore
9fcaec20d0 iASL: Update help info for supported ACPI tables.
This change updates the help info that displays data about the
supported ACPI tables (-ht option.) Also removes duplicate
FADT entry.
2012-08-09 12:22:11 -07:00
Robert Moore
ffefc5e308 iASL: Fix constant folding for fixed-length constants.
This change fixes a problem where the constant folding code was not
invoked for arguments that compile to fixed-length constants (either
Byte, Word, DWord, or QWord.) ACPICA BZ 970.
2012-08-03 14:24:58 -07:00
Robert Moore
5e3ebfccb5 iASL: Fix non-ANSI // comments in main parser file.
convert to /* */ comments.
2012-07-19 14:18:07 -07:00
Robert Moore
6be40b75c6 iASL: Add -v option (display version information)
Displays the standard signon, with version number.
2012-07-03 14:40:01 -07:00
Robert Moore
8ad21472b2 iASL: Parser fix for hosts where EOF is defined as -1.
Change the type of the character returned from input() from a UINT8
to an int. Jung-uk Kim.
2012-06-21 12:39:15 -07:00
Robert Moore
a231a84063 Update comments to simplify source translation, no functional changes.
Change some comments that cause problems for the AcpiSrc conversion
utility.
2012-06-15 12:46:02 -07:00
Robert Moore
6759985074 iASL: Fix NULLs emitted in listing files.
Also, explicitly open all output files as either binary or
text, do not make any assumptions about the default type.
2012-06-06 09:45:21 -07:00
Robert Moore
8274bb02a7 iASL: Update error message for ResourceTag size mismatch.
Mention "size mismatch" in the error message(s).
2012-06-06 09:43:20 -07:00
Robert Moore
0d7ca2f1bc iASL/aslutils.c: update/reformat function headers.
No functional changes.
2012-05-30 14:12:52 -07:00
Robert Moore
2bb2b5d75a iASL: Fix -ot option (display compile times/statistics).
Was not working properly for standard output; only worked for the
debug file case.
2012-05-23 13:50:37 -07:00
Robert Moore
1e39cde26c iASL: Add debug options to standard help message.
Previously, the compiler debug options were only displayed if
the -h switch was used. Now, there is only one help message.
ACPICA BZ 957.
2012-05-23 13:15:47 -07:00
Robert Moore
59d78f2a9e iASL: Improved pathname support.
For include files, merge the prefix pathname with the file pathname.
Convert backslashes in all pathnames to forward slashes, for
readability.
Include file pathname changes affect both #include and Include()
type operators.
2012-05-11 13:47:17 -07:00
Robert Moore
20a068edcc iASL: Additional fixes to enhance IDE support (-vi).
Changes allow IDE to count the number of warnings and errors.
Output everything to stdout to prevent interleaved output.
2012-05-11 12:43:57 -07:00
Robert Moore
70e176edb5 ACPI 5.0/iASL: Add support for PCC keyword.
Adds support for the PCC keyword for the Register() resource descriptor
macro.
2012-05-03 10:31:24 -07:00
Robert Moore
efe0ca11c5 iASL: Fix IDE output mode (-vi) error messages.
Fixes the format of the error/warning message output to be compatible
with MS Visual Studio (using the -vi option.)
2012-05-03 09:14:15 -07:00
Robert Moore
c852ab572f iASL/Disassembler: Enhance bad input file error message.
Emit additional error message if the file is 100% ASCII instead
of the required binary file.
2012-04-27 09:56:16 -07:00
Robert Moore
18cf9f9498 iASL/DTC/Preprocessor: Gracefully handle early EOF.
Handle an EOF at the end of a valid line by inserting a newline
and then returning the EOF during the next call to GetNextLine.
Prevents the line from being ignored due to EOF condition.
2012-04-23 15:07:46 -07:00
Robert Moore
51377948d9 iASL: Expand allowable byte constants for addres space IDs.
Expanded range from 0x80-0xFF to 0x0A-0xFF.
2012-04-20 09:30:46 -07:00
Robert Moore
1779fe9ec9 iASL/DTC/Preprocessor: Add support to skip escape sequences in strings.
In shared code for DTC/Preprocessor, just skip over any escape
sequences found within double-quoted string literals.
DTC may later implement full support for escape sequences.
2012-04-20 09:28:41 -07:00
Robert Moore
05833ed9d8 iASL: Print all error/warning messages to stderr by default.
Most were sent to stdout.
2012-04-04 14:13:15 -07:00
Robert Moore
0adca1bedd iASL: Split out C support functions from main lex file.
Split out C functions from aslcompiler.l to aslsupport.l for
improved readability and maintainablity.
2012-04-02 14:49:38 -07:00
Robert Moore
4817fab2d8 iASL: Remove extraneous error message if no parse tree created.
If early errors happen during the parsing stage, a parse tree
may not be created. An "internal" error was emitted. Add a check
for actual errors so that the internal error is only emitted
if no other errors were generated during the parse.
2012-03-30 10:14:26 -07:00
Robert Moore
e18caf1881 iASL: Add option to treat warnings as errors.
Adds the -we option to return non-zero status on any warnings,
as well as errors. ACPICA BZ 948.
2012-03-30 09:53:15 -07:00
Robert Moore
ebd7f0820d iASL: Cleanup/standardize main lex file.
Standardize function names, general cleanup.
2012-03-29 13:47:04 -07:00
Robert Moore
e97fd500e5 iASL: Cleanup #line handling code.
Miscellaneous cleanup; Remove debug output code.
2012-03-29 13:11:15 -07:00
Robert Moore
1522d69221 iASL: De-tabify main parser file for consistency.
ACPICA source does not use tabs, since they are not consistent
across systems.
2012-03-28 14:53:12 -07:00
Robert Moore
73a001b948 iASL: Remove #line and #include from main parser. 2012-03-28 14:42:41 -07:00
Robert Moore
35f1292815 iASL: Implement #line directive in compiler lexer.
Move main compiler support for #line from the parser to the lexer.
This simplifies the implementation, and allows #line to appear
within any ASL statement (the entire line where #line appears
is simply removed from the input after the new line number is set.)
2012-03-28 14:18:42 -07:00
Robert Moore
5734623671 iASL: Abort on currently unsupported macro definitions.
Macros are not yet implemented, just abort the compiler if one
is detected, since it will cause serious cascading syntax errors.
2012-03-23 14:06:44 -07:00
Robert Moore
e48bee4081 iASL: Fix use of StartDependent descriptor with resource tags.
Fixes a problem where resource tags that refer to descriptors within
the scope of a StartDependent or StartDependendentNoPri descriptor
had an incorrect offset. The length of the StartDependent descriptor
must be taken into account when calculating the tag offset.
Reported by Petr Vandrovec. ACPICA BZ 949.
2012-03-23 13:49:46 -07:00
Robert Moore
3243ed7087 iASL: Add pass-thru #line support for correct line numbers.
Preprocessor now adds #line directives so that the compiler will
emit error messages with the proper line number in the original
source file.
2012-03-23 13:05:05 -07:00
Robert Moore
0c5aa752d8 iASL: Add option to disable preprocessor.
The -Pn will disable/bypass the preprocessor completely.
2012-03-21 12:16:55 -07:00
Robert Moore
a219c8e17f iASL: Remove unused variable.
Remove unused variable in DoCompile.
2012-03-15 14:01:16 -07:00
Robert Moore
7fd09d9935 iASL: Add preprocessor infrastructure and initial implementation.
Adds a standard c-like preprocessor to iASL. Most standard directives
are supported. #define() macros not supported yet.
2012-03-15 13:45:55 -07:00