summaryrefslogtreecommitdiff
path: root/source/compiler/asloptions.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2018-09-27 16:43:02 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2018-09-27 16:43:02 +0000
commit73d55968743da26d1ff63e9939f191d217aea206 (patch)
treeffb27de4d7c207dd7aeebd04b24e04f85d23b8dc /source/compiler/asloptions.c
parentc6014c64fcfd099d0087da3509e8a623d2c30209 (diff)
Notes
Diffstat (limited to 'source/compiler/asloptions.c')
-rw-r--r--source/compiler/asloptions.c182
1 files changed, 91 insertions, 91 deletions
diff --git a/source/compiler/asloptions.c b/source/compiler/asloptions.c
index 0f575c8ab6f1..15519634ae92 100644
--- a/source/compiler/asloptions.c
+++ b/source/compiler/asloptions.c
@@ -212,7 +212,7 @@ AslCommandLine (
BadCommandLine = AslDoOptions (argc, argv, FALSE);
- if (Gbl_DoTemplates)
+ if (AslGbl_DoTemplates)
{
Status = DtCreateTemplates (argv);
if (ACPI_FAILURE (Status))
@@ -231,10 +231,10 @@ AslCommandLine (
BadCommandLine = TRUE;
}
- if (Gbl_DoSignon)
+ if (AslGbl_DoSignon)
{
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
- if (Gbl_IgnoreErrors)
+ if (AslGbl_IgnoreErrors)
{
printf ("Ignoring all errors, forcing AML file generation\n\n");
}
@@ -297,7 +297,7 @@ AslDoOptions (
{
case 'r':
- Gbl_EnableReferenceTypechecking = TRUE;
+ AslGbl_EnableReferenceTypechecking = TRUE;
break;
default:
@@ -318,16 +318,16 @@ AslDoOptions (
printf ("Debug ASL to ASL+ conversion\n");
- Gbl_DoAslConversion = TRUE;
- Gbl_FoldConstants = FALSE;
- Gbl_IntegerOptimizationFlag = FALSE;
- Gbl_ReferenceOptimizationFlag = FALSE;
- Gbl_OptimizeTrivialParseNodes = FALSE;
+ AslGbl_DoAslConversion = TRUE;
+ AslGbl_FoldConstants = FALSE;
+ AslGbl_IntegerOptimizationFlag = FALSE;
+ AslGbl_ReferenceOptimizationFlag = FALSE;
+ AslGbl_OptimizeTrivialParseNodes = FALSE;
AcpiGbl_CaptureComments = TRUE;
AcpiGbl_DoDisassemblerOptimizations = FALSE;
AcpiGbl_DebugAslConversion = TRUE;
AcpiGbl_DmEmitExternalOpcodes = TRUE;
- Gbl_DoExternalsInPlace = TRUE;
+ AslGbl_DoExternalsInPlace = TRUE;
return (0);
@@ -336,8 +336,8 @@ AslDoOptions (
AslCompilerdebug = 1; /* same as yydebug */
DtParserdebug = 1;
PrParserdebug = 1;
- Gbl_DebugFlag = TRUE;
- Gbl_KeepPreprocessorTempFile = TRUE;
+ AslGbl_DebugFlag = TRUE;
+ AslGbl_KeepPreprocessorTempFile = TRUE;
break;
case 'p': /* Prune ASL parse tree */
@@ -349,13 +349,13 @@ AslDoOptions (
return (-1);
}
- Gbl_PruneParseTree = TRUE;
- Gbl_PruneDepth = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
+ AslGbl_PruneParseTree = TRUE;
+ AslGbl_PruneDepth = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
case 's':
- Gbl_DebugFlag = TRUE;
+ AslGbl_DebugFlag = TRUE;
break;
case 't':
@@ -367,7 +367,7 @@ AslDoOptions (
return (-1);
}
- Gbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
+ AslGbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
default:
@@ -386,21 +386,21 @@ AslDoOptions (
case 'a':
printf ("Convert ASL to ASL+ with comments\n");
- Gbl_DoAslConversion = TRUE;
- Gbl_FoldConstants = FALSE;
- Gbl_IntegerOptimizationFlag = FALSE;
- Gbl_ReferenceOptimizationFlag = FALSE;
- Gbl_OptimizeTrivialParseNodes = FALSE;
+ AslGbl_DoAslConversion = TRUE;
+ AslGbl_FoldConstants = FALSE;
+ AslGbl_IntegerOptimizationFlag = FALSE;
+ AslGbl_ReferenceOptimizationFlag = FALSE;
+ AslGbl_OptimizeTrivialParseNodes = FALSE;
AcpiGbl_CaptureComments = TRUE;
AcpiGbl_DoDisassemblerOptimizations = FALSE;
AcpiGbl_DmEmitExternalOpcodes = TRUE;
- Gbl_DoExternalsInPlace = TRUE;
+ AslGbl_DoExternalsInPlace = TRUE;
return (0);
case 'r':
- Gbl_NoResourceChecking = TRUE;
+ AslGbl_NoResourceChecking = TRUE;
break;
default:
@@ -416,13 +416,13 @@ AslDoOptions (
{
case '^':
- Gbl_DoCompile = FALSE;
+ AslGbl_DoCompile = FALSE;
break;
case 'a':
- Gbl_DoCompile = FALSE;
- Gbl_DisassembleAll = TRUE;
+ AslGbl_DoCompile = FALSE;
+ AslGbl_DisassembleAll = TRUE;
break;
case 'b': /* Do not convert buffers to resource descriptors */
@@ -441,7 +441,7 @@ AslDoOptions (
case 'l': /* Use legacy ASL code (not ASL+) for disassembly */
- Gbl_DoCompile = FALSE;
+ AslGbl_DoCompile = FALSE;
AcpiGbl_CstyleDisassembly = FALSE;
break;
@@ -487,7 +487,7 @@ AslDoOptions (
{
case '^': /* Ignore errors and force creation of aml file */
- Gbl_IgnoreErrors = TRUE;
+ AslGbl_IgnoreErrors = TRUE;
break;
case 'e': /* Disassembler: Get external declaration file */
@@ -497,7 +497,7 @@ AslDoOptions (
return (-1);
}
- Gbl_ExternalRefFilename = AcpiGbl_Optarg;
+ AslGbl_ExternalRefFilename = AcpiGbl_Optarg;
break;
default:
@@ -509,7 +509,7 @@ AslDoOptions (
case 'G':
- Gbl_CompileGeneric = TRUE;
+ AslGbl_CompileGeneric = TRUE;
break;
case 'g': /* Get all ACPI tables */
@@ -572,14 +572,14 @@ AslDoOptions (
/* Produce assembly code include file */
- Gbl_AsmIncludeOutputFlag = TRUE;
+ AslGbl_AsmIncludeOutputFlag = TRUE;
break;
case 'c':
/* Produce C include file */
- Gbl_C_IncludeOutputFlag = TRUE;
+ AslGbl_C_IncludeOutputFlag = TRUE;
break;
case 'n':
@@ -604,7 +604,7 @@ AslDoOptions (
/* Produce listing file (Mixed source/aml) */
- Gbl_ListingFlag = TRUE;
+ AslGbl_ListingFlag = TRUE;
AcpiGbl_DmOpt_Listing = TRUE;
break;
@@ -612,35 +612,35 @@ AslDoOptions (
/* Produce preprocessor output file */
- Gbl_PreprocessorOutputFlag = TRUE;
+ AslGbl_PreprocessorOutputFlag = TRUE;
break;
case 'm':
/* Produce hardware map summary file */
- Gbl_MapfileFlag = TRUE;
+ AslGbl_MapfileFlag = TRUE;
break;
case 'n':
/* Produce namespace file */
- Gbl_NsOutputFlag = TRUE;
+ AslGbl_NsOutputFlag = TRUE;
break;
case 's':
/* Produce combined source file */
- Gbl_SourceOutputFlag = TRUE;
+ AslGbl_SourceOutputFlag = TRUE;
break;
case 'x':
/* Produce cross-reference file */
- Gbl_CrossReferenceOutput = TRUE;
+ AslGbl_CrossReferenceOutput = TRUE;
break;
default:
@@ -652,17 +652,17 @@ AslDoOptions (
case 'm': /* Set line buffer size */
- Gbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
- if (Gbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
+ AslGbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
+ if (AslGbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
{
- Gbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
+ AslGbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
}
- printf ("Line Buffer Size: %u\n", Gbl_LineBufferSize);
+ printf ("Line Buffer Size: %u\n", AslGbl_LineBufferSize);
break;
case 'n': /* Parse only */
- Gbl_ParseOnlyFlag = TRUE;
+ AslGbl_ParseOnlyFlag = TRUE;
break;
case 'o': /* Control compiler AML optimizations */
@@ -673,10 +673,10 @@ AslDoOptions (
/* Disable all optimizations */
- Gbl_FoldConstants = FALSE;
- Gbl_IntegerOptimizationFlag = FALSE;
- Gbl_ReferenceOptimizationFlag = FALSE;
- Gbl_OptimizeTrivialParseNodes = FALSE;
+ AslGbl_FoldConstants = FALSE;
+ AslGbl_IntegerOptimizationFlag = FALSE;
+ AslGbl_ReferenceOptimizationFlag = FALSE;
+ AslGbl_OptimizeTrivialParseNodes = FALSE;
break;
@@ -684,7 +684,7 @@ AslDoOptions (
/* Display compile time(s) */
- Gbl_CompileTimesFlag = TRUE;
+ AslGbl_CompileTimesFlag = TRUE;
break;
case 'd':
@@ -708,35 +708,35 @@ AslDoOptions (
* No affect if Gbl_DoExternals is false.
*/
- Gbl_DoExternalsInPlace = TRUE;
+ AslGbl_DoExternalsInPlace = TRUE;
break;
case 'f':
/* Disable folding on "normal" expressions */
- Gbl_FoldConstants = FALSE;
+ AslGbl_FoldConstants = FALSE;
break;
case 'i':
/* Disable integer optimization to constants */
- Gbl_IntegerOptimizationFlag = FALSE;
+ AslGbl_IntegerOptimizationFlag = FALSE;
break;
case 'n':
/* Disable named reference optimization */
- Gbl_ReferenceOptimizationFlag = FALSE;
+ AslGbl_ReferenceOptimizationFlag = FALSE;
break;
case 't':
/* Disable heavy typechecking */
- Gbl_DoTypechecking = FALSE;
+ AslGbl_DoTypechecking = FALSE;
break;
default:
@@ -752,13 +752,13 @@ AslDoOptions (
{
case '^': /* Proprocess only, emit (.i) file */
- Gbl_PreprocessOnly = TRUE;
- Gbl_PreprocessorOutputFlag = TRUE;
+ AslGbl_PreprocessOnly = TRUE;
+ AslGbl_PreprocessorOutputFlag = TRUE;
break;
case 'n': /* Disable preprocessor */
- Gbl_PreprocessFlag = FALSE;
+ AslGbl_PreprocessFlag = FALSE;
break;
default:
@@ -770,25 +770,25 @@ AslDoOptions (
case 'p': /* Override default AML output filename */
- Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
- UtConvertBackslashes (Gbl_OutputFilenamePrefix);
- Gbl_UseDefaultAmlFilename = FALSE;
+ AslGbl_OutputFilenamePrefix = AcpiGbl_Optarg;
+ UtConvertBackslashes (AslGbl_OutputFilenamePrefix);
+ AslGbl_UseDefaultAmlFilename = FALSE;
break;
case 'q': /* ASL/ASl+ converter: compile only and leave badaml. */
printf ("Convert ASL to ASL+ with comments\n");
- Gbl_FoldConstants = FALSE;
- Gbl_IntegerOptimizationFlag = FALSE;
- Gbl_ReferenceOptimizationFlag = FALSE;
- Gbl_OptimizeTrivialParseNodes = FALSE;
- Gbl_DoExternalsInPlace = TRUE;
+ AslGbl_FoldConstants = FALSE;
+ AslGbl_IntegerOptimizationFlag = FALSE;
+ AslGbl_ReferenceOptimizationFlag = FALSE;
+ AslGbl_OptimizeTrivialParseNodes = FALSE;
+ AslGbl_DoExternalsInPlace = TRUE;
AcpiGbl_CaptureComments = TRUE;
return (0);
case 'r': /* Override revision found in table header */
- Gbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
+ AslGbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
case 's': /* Create AML in a source code file */
@@ -799,21 +799,21 @@ AslDoOptions (
/* Produce assembly code output file */
- Gbl_AsmOutputFlag = TRUE;
+ AslGbl_AsmOutputFlag = TRUE;
break;
case 'c':
/* Produce C hex output file */
- Gbl_C_OutputFlag = TRUE;
+ AslGbl_C_OutputFlag = TRUE;
break;
case 'o':
/* Produce AML offset table in C */
- Gbl_C_OffsetTableFlag = TRUE;
+ AslGbl_C_OffsetTableFlag = TRUE;
break;
default:
@@ -829,17 +829,17 @@ AslDoOptions (
{
case 'a':
- Gbl_HexOutputFlag = HEX_OUTPUT_ASM;
+ AslGbl_HexOutputFlag = HEX_OUTPUT_ASM;
break;
case 'c':
- Gbl_HexOutputFlag = HEX_OUTPUT_C;
+ AslGbl_HexOutputFlag = HEX_OUTPUT_C;
break;
case 's':
- Gbl_HexOutputFlag = HEX_OUTPUT_ASL;
+ AslGbl_HexOutputFlag = HEX_OUTPUT_ASL;
break;
default:
@@ -851,7 +851,7 @@ AslDoOptions (
case 'T': /* Create a ACPI table template file */
- Gbl_DoTemplates = TRUE;
+ AslGbl_DoTemplates = TRUE;
break;
case 'v': /* Version and verbosity settings */
@@ -867,7 +867,7 @@ AslDoOptions (
/* Disable all error/warning/remark messages */
- Gbl_NoErrors = TRUE;
+ AslGbl_NoErrors = TRUE;
break;
case 'd':
@@ -880,8 +880,8 @@ AslDoOptions (
/* Disable all warning/remark messages (errors only) */
- Gbl_DisplayRemarks = FALSE;
- Gbl_DisplayWarnings = FALSE;
+ AslGbl_DisplayRemarks = FALSE;
+ AslGbl_DisplayWarnings = FALSE;
break;
case 'i':
@@ -894,29 +894,29 @@ AslDoOptions (
* 4) Error/warning messages are formatted appropriately to
* be recognized by MS Visual Studio
*/
- Gbl_VerboseErrors = FALSE;
- Gbl_DoSignon = FALSE;
- Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
+ AslGbl_VerboseErrors = FALSE;
+ AslGbl_DoSignon = FALSE;
+ AslGbl_Files[ASL_FILE_STDERR].Handle = stdout;
break;
case 'o':
- Gbl_DisplayOptimizations = TRUE;
+ AslGbl_DisplayOptimizations = TRUE;
break;
case 'r':
- Gbl_DisplayRemarks = FALSE;
+ AslGbl_DisplayRemarks = FALSE;
break;
case 's':
- Gbl_DoSignon = FALSE;
+ AslGbl_DoSignon = FALSE;
break;
case 't':
- Gbl_VerboseTemplates = TRUE;
+ AslGbl_VerboseTemplates = TRUE;
break;
case 'w':
@@ -964,22 +964,22 @@ AslDoOptions (
{
case '1':
- Gbl_WarningLevel = ASL_WARNING;
+ AslGbl_WarningLevel = ASL_WARNING;
break;
case '2':
- Gbl_WarningLevel = ASL_WARNING2;
+ AslGbl_WarningLevel = ASL_WARNING2;
break;
case '3':
- Gbl_WarningLevel = ASL_WARNING3;
+ AslGbl_WarningLevel = ASL_WARNING3;
break;
case 'e':
- Gbl_WarningsAsErrors = TRUE;
+ AslGbl_WarningsAsErrors = TRUE;
break;
default:
@@ -996,7 +996,7 @@ AslDoOptions (
case 'z':
- Gbl_UseOriginalCompilerId = TRUE;
+ AslGbl_UseOriginalCompilerId = TRUE;
break;
default:
@@ -1056,7 +1056,7 @@ static int
AslDoResponseFile (
char *Filename)
{
- char *argv = StringBuffer2;
+ char *argv = AslGbl_StringBuffer2;
FILE *ResponseFile;
int OptStatus = 0;
int Opterr;
@@ -1080,11 +1080,11 @@ AslDoResponseFile (
* Process all lines in the response file. There must be one complete
* option per line
*/
- while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile))
+ while (fgets (AslGbl_StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile))
{
/* Compress all tokens, allowing us to use a single argv entry */
- AslMergeOptionTokens (StringBuffer, StringBuffer2);
+ AslMergeOptionTokens (AslGbl_StringBuffer, AslGbl_StringBuffer2);
/* Process the option */
@@ -1095,7 +1095,7 @@ AslDoResponseFile (
if (OptStatus)
{
printf ("Invalid option in command file %s: %s\n",
- Filename, StringBuffer);
+ Filename, AslGbl_StringBuffer);
break;
}
}