FreeBSD/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDmGetCompoundSymbol
 *
 * PARAMETERS:  AslOpcode
 *
 * RETURN:      String containing the compound assignment symbol
 *
 * DESCRIPTION: Detect opcodes that can be converted to compound assignment,
 *              return the appropriate operator string.
 *
 ******************************************************************************/


String containing the compound assignment symbol

Detect opcodes that can be converted to compound assignment,
return the appropriate operator string.
String containing the compound assignment symbol Detect opcodes that can be converted to compound assignment return the appropriate operator string .
static char *
AcpiDmGetCompoundSymbol (
   UINT16                   AmlOpcode)
{
    char                    *Symbol;
    switch (AmlOpcode)
    {
    case AML_ADD_OP:
        Symbol = " += ";
        break;
    case AML_SUBTRACT_OP:
        Symbol = " -= ";
        break;
    case AML_MULTIPLY_OP:
        Symbol = " *= ";
        break;
    case AML_DIVIDE_OP:
        Symbol = " /= ";
        break;
    case AML_MOD_OP:
        Symbol = " %= ";
        break;
    case AML_SHIFT_LEFT_OP:
        Symbol = " <<= ";
        break;
    case AML_SHIFT_RIGHT_OP:
        Symbol = " >>= ";
        break;
    case AML_BIT_AND_OP:
        Symbol = " &= ";
        break;
    case AML_BIT_OR_OP:
        Symbol = " |= ";
        break;
    case AML_BIT_XOR_OP:
        Symbol = " ^= ";
        break;
    default:
        return (NULL);
    }
    return (Symbol);
}
static char * AcpiDmGetCompoundSymbol ( UINT16 AmlOpcode ) { char * Symbol ; switch ( AmlOpcode ) { case AML_ADD_OP : Symbol = " " ; break ; case AML_SUBTRACT_OP : Symbol = " " ; break ; case AML_MULTIPLY_OP : Symbol = " " ; break ; case AML_DIVIDE_OP : Symbol = " " ; break ; case AML_MOD_OP : Symbol = " " ; break ; case AML_SHIFT_LEFT_OP : Symbol = " " ; break ; case AML_SHIFT_RIGHT_OP : Symbol = " " ; break ; case AML_BIT_AND_OP : Symbol = " " ; break ; case AML_BIT_OR_OP : Symbol = " " ; break ; case AML_BIT_XOR_OP : Symbol = " " ; break ; default : return ( NULL ) ; } return ( Symbol ) ; }
FUNCTION:    AcpiDmGetCompoundSymbol
 PARAMETERS:  AslOpcode
FUNCTION : AcpiDmGetCompoundSymbol PARAMETERS : AslOpcode
/* No operator string for all other opcodes */