mirror of
https://github.com/acpica/acpica/
synced 2025-01-18 15:39:18 +03:00
Added "const" qualifier to the read-only lookup tables
date 2001.08.24.16.23.00; author rmoore1; state Exp;
This commit is contained in:
parent
85e132a519
commit
40cda29a6f
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psopcode - Parser opcode information table
|
||||
* $Revision: 1.38 $
|
||||
* $Revision: 1.39 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -686,7 +686,7 @@ static const ACPI_OPCODE_INFO AmlOpInfo[] =
|
||||
* index into the table above
|
||||
*/
|
||||
|
||||
static UINT8 AmlShortOpInfoIndex[256] =
|
||||
static const UINT8 AmlShortOpInfoIndex[256] =
|
||||
{
|
||||
/* 0 1 2 3 4 5 6 7 */
|
||||
/* 8 9 A B C D E F */
|
||||
@ -725,7 +725,7 @@ static UINT8 AmlShortOpInfoIndex[256] =
|
||||
};
|
||||
|
||||
|
||||
static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
|
||||
static const UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
|
||||
{
|
||||
/* 0 1 2 3 4 5 6 7 */
|
||||
/* 8 9 A B C D E F */
|
||||
@ -764,11 +764,11 @@ static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_OPCODE_INFO *
|
||||
const ACPI_OPCODE_INFO *
|
||||
AcpiPsGetOpcodeInfo (
|
||||
UINT16 Opcode)
|
||||
{
|
||||
ACPI_OPCODE_INFO *OpInfo;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
UINT8 UpperOpcode;
|
||||
UINT8 LowerOpcode;
|
||||
|
||||
@ -783,7 +783,7 @@ AcpiPsGetOpcodeInfo (
|
||||
|
||||
/* Default is "unknown opcode" */
|
||||
|
||||
OpInfo = (ACPI_OPCODE_INFO *) &AmlOpInfo [_UNK];
|
||||
OpInfo = &AmlOpInfo [_UNK];
|
||||
|
||||
|
||||
/*
|
||||
@ -796,7 +796,7 @@ AcpiPsGetOpcodeInfo (
|
||||
|
||||
/* Simple (8-bit) opcode: 0-255, can't index beyond table */
|
||||
|
||||
OpInfo = (ACPI_OPCODE_INFO *) &AmlOpInfo [AmlShortOpInfoIndex [LowerOpcode]];
|
||||
OpInfo = &AmlOpInfo [AmlShortOpInfoIndex [LowerOpcode]];
|
||||
break;
|
||||
|
||||
|
||||
@ -806,7 +806,7 @@ AcpiPsGetOpcodeInfo (
|
||||
|
||||
if (LowerOpcode <= MAX_EXTENDED_OPCODE)
|
||||
{
|
||||
OpInfo = (ACPI_OPCODE_INFO *) &AmlOpInfo [AmlLongOpInfoIndex [LowerOpcode]];
|
||||
OpInfo = &AmlOpInfo [AmlLongOpInfoIndex [LowerOpcode]];
|
||||
}
|
||||
break;
|
||||
|
||||
@ -850,7 +850,7 @@ NATIVE_CHAR *
|
||||
AcpiPsGetOpcodeName (
|
||||
UINT16 Opcode)
|
||||
{
|
||||
ACPI_OPCODE_INFO *Op;
|
||||
const ACPI_OPCODE_INFO *Op;
|
||||
|
||||
|
||||
Op = AcpiPsGetOpcodeInfo (Opcode);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psparse - Parser top level AML parse routines
|
||||
* $Revision: 1.90 $
|
||||
* $Revision: 1.93 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -293,11 +293,13 @@ AcpiPsFindObject (
|
||||
ACPI_PARSE_OBJECT **OutOp)
|
||||
{
|
||||
NATIVE_CHAR *Path;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
|
||||
|
||||
/* We are only interested in opcodes that have an associated name */
|
||||
|
||||
if (!AcpiPsIsNamedOp (Opcode))
|
||||
OpInfo = AcpiPsGetOpcodeInfo (Opcode);
|
||||
if (!(OpInfo->Flags & AML_NAMED))
|
||||
{
|
||||
*OutOp = Op;
|
||||
return (AE_OK);
|
||||
@ -342,8 +344,8 @@ AcpiPsCompleteThisOp (
|
||||
#ifndef PARSER_ONLY
|
||||
ACPI_PARSE_OBJECT *Prev;
|
||||
ACPI_PARSE_OBJECT *Next;
|
||||
ACPI_OPCODE_INFO *OpInfo;
|
||||
ACPI_OPCODE_INFO *ParentInfo;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
const ACPI_OPCODE_INFO *ParentInfo;
|
||||
UINT32 OpcodeClass;
|
||||
ACPI_PARSE_OBJECT *ReplacementOp = NULL;
|
||||
|
||||
@ -617,7 +619,7 @@ AcpiPsParseLoop (
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_PARSE_OBJECT *Op = NULL; /* current op */
|
||||
ACPI_OPCODE_INFO *OpInfo;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
ACPI_PARSE_OBJECT *Arg = NULL;
|
||||
ACPI_PARSE2_OBJECT *DeferredOp;
|
||||
UINT32 ArgCount; /* push for fixed or var args */
|
||||
@ -834,13 +836,8 @@ AcpiPsParseLoop (
|
||||
}
|
||||
|
||||
|
||||
if ((Op->Opcode == AML_CREATE_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_BIT_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_BYTE_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_WORD_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_DWORD_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_QWORD_FIELD_OP))
|
||||
{
|
||||
if (OpInfo->Flags & AML_CREATE)
|
||||
{
|
||||
/*
|
||||
* Backup to beginning of CreateXXXfield declaration
|
||||
* BodyLength is unknown until we parse the body
|
||||
@ -997,12 +994,7 @@ AcpiPsParseLoop (
|
||||
}
|
||||
}
|
||||
|
||||
if ((Op->Opcode == AML_CREATE_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_BIT_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_BYTE_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_WORD_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_DWORD_FIELD_OP) ||
|
||||
(Op->Opcode == AML_CREATE_QWORD_FIELD_OP))
|
||||
if (OpInfo->Flags & AML_CREATE)
|
||||
{
|
||||
/*
|
||||
* Backup to beginning of CreateXXXfield declaration (1 for
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: pstree - Parser op tree manipulation/traversal/search
|
||||
* $Revision: 1.29 $
|
||||
* $Revision: 1.31 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -144,7 +144,7 @@ AcpiPsGetArg (
|
||||
UINT32 Argn)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Arg = NULL;
|
||||
ACPI_OPCODE_INFO *OpInfo;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
|
||||
|
||||
/* Get the info structure for this opcode */
|
||||
@ -198,7 +198,7 @@ AcpiPsAppendArg (
|
||||
ACPI_PARSE_OBJECT *Arg)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *PrevArg;
|
||||
ACPI_OPCODE_INFO *OpInfo;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
|
||||
|
||||
if (!Op)
|
||||
@ -283,7 +283,7 @@ AcpiPsGetChild (
|
||||
case AML_ELSE_OP:
|
||||
case AML_DEVICE_OP:
|
||||
case AML_THERMAL_ZONE_OP:
|
||||
case AML_METHODCALL_OP:
|
||||
case AML_INT_METHODCALL_OP:
|
||||
|
||||
Child = AcpiPsGetArg (Op, 0);
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
|
||||
* $Revision: 1.41 $
|
||||
* $Revision: 1.42 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -149,7 +149,7 @@ AcpiPsInitOp (
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT16 Opcode)
|
||||
{
|
||||
ACPI_OPCODE_INFO *AmlOp;
|
||||
const ACPI_OPCODE_INFO *AmlOp;
|
||||
|
||||
|
||||
Op->DataType = ACPI_DESC_TYPE_PARSER;
|
||||
@ -183,7 +183,7 @@ AcpiPsAllocOp (
|
||||
ACPI_PARSE_OBJECT *Op = NULL;
|
||||
UINT32 Size;
|
||||
UINT8 Flags;
|
||||
ACPI_OPCODE_INFO *OpInfo;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
|
||||
|
||||
OpInfo = AcpiPsGetOpcodeInfo (Opcode);
|
||||
|
Loading…
Reference in New Issue
Block a user