-static const be_execution_unit_t ***ia32_get_allowed_execution_units(
- const ir_node *irn)
-{
- static const be_execution_unit_t *_allowed_units_BRANCH[] = {
- &ia32_execution_units_BRANCH[IA32_EXECUNIT_TP_BRANCH_BRANCH1],
- &ia32_execution_units_BRANCH[IA32_EXECUNIT_TP_BRANCH_BRANCH2],
- NULL,
- };
- static const be_execution_unit_t *_allowed_units_GP[] = {
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_EAX],
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_EBX],
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_ECX],
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_EDX],
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_ESI],
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_EDI],
- &ia32_execution_units_GP[IA32_EXECUNIT_TP_GP_GP_EBP],
- NULL,
- };
- static const be_execution_unit_t *_allowed_units_DUMMY[] = {
- &be_machine_execution_units_DUMMY[0],
- NULL,
- };
- static const be_execution_unit_t **_units_callret[] = {
- _allowed_units_BRANCH,
- NULL
- };
- static const be_execution_unit_t **_units_other[] = {
- _allowed_units_GP,
- NULL
- };
- static const be_execution_unit_t **_units_dummy[] = {
- _allowed_units_DUMMY,
- NULL
- };
- const be_execution_unit_t ***ret;
-
- if (is_ia32_irn(irn)) {
- ret = get_ia32_exec_units(irn);
- } else if (is_be_node(irn)) {
- if (be_is_Return(irn)) {
- ret = _units_callret;
- } else if (be_is_Barrier(irn)) {
- ret = _units_dummy;
- } else {
- ret = _units_other;
- }
- }
- else {
- ret = _units_dummy;
- }
-
- return ret;
-}
-
-/**
- * Return the abstract ia32 machine.
- */
-static const be_machine_t *ia32_get_machine(const void *self)
-{
- const ia32_isa_t *isa = self;
- return isa->cpu;
-}
-