sys/contrib/dev/acpica-unix/compiler/dtexpress.c
/******************************************************************************
 *
 * FUNCTION:    DtDetectAllLabels
 *
 * PARAMETERS:  FieldList           - Field object at start of generic list
 *
 * RETURN:      None
 *
 * DESCRIPTION: Detect all labels in a list of "generic" opcodes (such as
 *              a UEFI table.) and insert them into the global label list.
 *
 *****************************************************************************/
DtDetectAllLabels
PARAMETERS:  FieldList           - Field object at start of generic list

None

Detect all labels in a list of "generic" opcodes (such as
a UEFI table.) and insert them into the global label list.
DtDetectAllLabels PARAMETERS : FieldList - Field object at start of generic list None Detect all labels in a list of " generic " opcodes ( such as a UEFI table . ) and insert them into the global label list .
void
DtDetectAllLabels (
    DT_FIELD                *FieldList)
{
    ACPI_DMTABLE_INFO       *Info;
    DT_FIELD                *GenericField;
    UINT32                  TableOffset;
    TableOffset = Gbl_CurrentTableOffset;
    GenericField = FieldList;
    while (GenericField)
    {
        Info = DtGetGenericTableInfo (GenericField->Name);
        if (Info)
        {
            GenericField->TableOffset = TableOffset;
            TableOffset += DtGetFieldLength (GenericField, Info);
            if (Info->Opcode == ACPI_DMT_LABEL)
            {
                DtInsertLabelField (GenericField);
            }
        }
        GenericField = GenericField->Next;
    }
}
void DtDetectAllLabels ( DT_FIELD * FieldList ) { ACPI_DMTABLE_INFO * Info ; DT_FIELD * GenericField ; UINT32 TableOffset ; TableOffset = Gbl_CurrentTableOffset ; GenericField = FieldList ; while ( GenericField ) { Info = DtGetGenericTableInfo ( GenericField -> Name ) ; if ( Info ) { GenericField -> TableOffset = TableOffset ; TableOffset += DtGetFieldLength ( GenericField , Info ) ; if ( Info -> Opcode == ACPI_DMT_LABEL ) { DtInsertLabelField ( GenericField ) ; } } GenericField = GenericField -> Next ; } }
FUNCTION:    DtDetectAllLabels
 PARAMETERS:  FieldList           - Field object at start of generic list
FUNCTION : DtDetectAllLabels PARAMETERS : FieldList - Field object at start of generic list
/*
     * Process all "Label:" fields within the parse tree. We need
     * to know the offsets for all labels before we can compile
     * the parse tree in order to handle forward references. Traverse
     * tree and get/set all field lengths of all operators in order to
     * determine the label offsets.
     */ /* Maintain table offsets */ /* Insert all labels in the global label list */