FreeBSD/sys/contrib/dev/acpica/compiler/asltree.c
/*******************************************************************************
 *
 * FUNCTION:    TrPrintNodeCompileFlags
 *
 * PARAMETERS:  Flags               - Flags word to be decoded
 *
 * RETURN:      None
 *
 * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
 *
 ******************************************************************************/
TrPrintNodeCompileFlags
PARAMETERS:  Flags               - Flags word to be decoded

None

Decode a flags word to text. Displays all flags that are set.
TrPrintNodeCompileFlags PARAMETERS : Flags - Flags word to be decoded None Decode a flags word to text . Displays all flags that are set .
void
TrPrintNodeCompileFlags (
    UINT32                  Flags)
{
    UINT32                  i;
    UINT32                  FlagBit = 1;
    char                    *FlagName = NULL;
    for (i = 0; i < 32; i++)
    {
        switch (Flags & FlagBit)
        {
        case NODE_VISITED:
            FlagName = "NODE_VISITED";
            break;
        case NODE_AML_PACKAGE:
            FlagName = "NODE_AML_PACKAGE";
            break;
        case NODE_IS_TARGET:
            FlagName = "NODE_IS_TARGET";
            break;
        case NODE_IS_RESOURCE_DESC:
            FlagName = "NODE_IS_RESOURCE_DESC";
            break;
        case NODE_IS_RESOURCE_FIELD:
            FlagName = "NODE_IS_RESOURCE_FIELD";
            break;
        case NODE_HAS_NO_EXIT:
            FlagName = "NODE_HAS_NO_EXIT";
            break;
        case NODE_IF_HAS_NO_EXIT:
            FlagName = "NODE_IF_HAS_NO_EXIT";
            break;
        case NODE_NAME_INTERNALIZED:
            FlagName = "NODE_NAME_INTERNALIZED";
            break;
        case NODE_METHOD_NO_RETVAL:
            FlagName = "NODE_METHOD_NO_RETVAL";
            break;
        case NODE_METHOD_SOME_NO_RETVAL:
            FlagName = "NODE_METHOD_SOME_NO_RETVAL";
            break;
        case NODE_RESULT_NOT_USED:
            FlagName = "NODE_RESULT_NOT_USED";
            break;
        case NODE_METHOD_TYPED:
            FlagName = "NODE_METHOD_TYPED";
            break;
        case NODE_COULD_NOT_REDUCE:
            FlagName = "NODE_COULD_NOT_REDUCE";
            break;
        case NODE_COMPILE_TIME_CONST:
            FlagName = "NODE_COMPILE_TIME_CONST";
            break;
        case NODE_IS_TERM_ARG:
            FlagName = "NODE_IS_TERM_ARG";
            break;
        case NODE_WAS_ONES_OP:
            FlagName = "NODE_WAS_ONES_OP";
            break;
        case NODE_IS_NAME_DECLARATION:
            FlagName = "NODE_IS_NAME_DECLARATION";
            break;
        case NODE_COMPILER_EMITTED:
            FlagName = "NODE_COMPILER_EMITTED";
            break;
        case NODE_IS_DUPLICATE:
            FlagName = "NODE_IS_DUPLICATE";
            break;
        case NODE_IS_RESOURCE_DATA:
            FlagName = "NODE_IS_RESOURCE_DATA";
            break;
        case NODE_IS_NULL_RETURN:
            FlagName = "NODE_IS_NULL_RETURN";
            break;
        default:
            break;
        }
        if (FlagName)
        {
            DbgPrint (ASL_PARSE_OUTPUT, " %s", FlagName);
            FlagName = NULL;
        }
        FlagBit <<= 1;
    }
}
void TrPrintNodeCompileFlags ( UINT32 Flags ) { UINT32 i ; UINT32 FlagBit = 1 ; char * FlagName = NULL ; for ( i = 0 ; i < 32 ; i ++ ) { switch ( Flags & FlagBit ) { case NODE_VISITED : FlagName = " " ; break ; case NODE_AML_PACKAGE : FlagName = " " ; break ; case NODE_IS_TARGET : FlagName = " " ; break ; case NODE_IS_RESOURCE_DESC : FlagName = " " ; break ; case NODE_IS_RESOURCE_FIELD : FlagName = " " ; break ; case NODE_HAS_NO_EXIT : FlagName = " " ; break ; case NODE_IF_HAS_NO_EXIT : FlagName = " " ; break ; case NODE_NAME_INTERNALIZED : FlagName = " " ; break ; case NODE_METHOD_NO_RETVAL : FlagName = " " ; break ; case NODE_METHOD_SOME_NO_RETVAL : FlagName = " " ; break ; case NODE_RESULT_NOT_USED : FlagName = " " ; break ; case NODE_METHOD_TYPED : FlagName = " " ; break ; case NODE_COULD_NOT_REDUCE : FlagName = " " ; break ; case NODE_COMPILE_TIME_CONST : FlagName = " " ; break ; case NODE_IS_TERM_ARG : FlagName = " " ; break ; case NODE_WAS_ONES_OP : FlagName = " " ; break ; case NODE_IS_NAME_DECLARATION : FlagName = " " ; break ; case NODE_COMPILER_EMITTED : FlagName = " " ; break ; case NODE_IS_DUPLICATE : FlagName = " " ; break ; case NODE_IS_RESOURCE_DATA : FlagName = " " ; break ; case NODE_IS_NULL_RETURN : FlagName = " " ; break ; default : break ; } if ( FlagName ) { DbgPrint ( ASL_PARSE_OUTPUT , " " , FlagName ) ; FlagName = NULL ; } FlagBit <<= 1 ; } }
FUNCTION:    TrPrintNodeCompileFlags
 PARAMETERS:  Flags               - Flags word to be decoded
FUNCTION : TrPrintNodeCompileFlags PARAMETERS : Flags - Flags word to be decoded