X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbemachine.h;h=75ddc2860ee32de65650c306f50a26ca571bb28b;hb=dd4cd761ab637d4488c7e29f49843b1b02366acf;hp=64e5833233d813b31a9eaf7b2ca5e968c4b9db42;hpb=101dfcddae2b9cc9b1724faa34fecb14472f46c9;p=libfirm diff --git a/ir/be/bemachine.h b/ir/be/bemachine.h index 64e583323..75ddc2860 100644 --- a/ir/be/bemachine.h +++ b/ir/be/bemachine.h @@ -1,12 +1,31 @@ -#ifndef _BE_MACHINE_H_ -#define _BE_MACHINE_H_ +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ /** - * Abstract machine interface. - * @author Christian Wuerdig - * @date 23.10.2006 - * @cvs-id $Id$ + * @file + * @brief Abstract machine interface. + * @author Christian Wuerdig + * @date 23.10.2006 + * @version $Id$ */ +#ifndef FIRM_BE_BEMACHINE_H +#define FIRM_BE_BEMACHINE_H typedef struct _be_execution_unit_type_t be_execution_unit_type_t; typedef struct _be_execution_unit_t be_execution_unit_t; @@ -31,6 +50,28 @@ struct _be_machine_t { be_execution_unit_type_t *unit_types; }; +extern be_execution_unit_t be_machine_execution_units_DUMMY[1]; + +/** + * Initialize generic dummy unit. + */ +void be_machine_init_dummy_unit(void); + +/** + * Returns the generic dummy unit. + */ +be_execution_unit_t *be_machine_get_dummy_unit(void); + +/** + * Check if given unit is the generic dummy unit. + */ +int be_machine_is_dummy_unit(const be_execution_unit_t *unit); + +/** + * Check if given unit is the generic dummy unit type. + */ +int be_machine_is_dummy_unit_type(const be_execution_unit_type_t *tp); + /** * Get the number of available unit types in the given machine. */ @@ -66,4 +107,4 @@ struct _be_machine_t { */ #define be_machine_get_execunit_type(unit) ((unit)->tp) -#endif /* _BE_MACHINE_H_ */ +#endif /* FIRM_BE_BEMACHINE_H */