722761e8ba06b2c182caa45bef828584cd285aa3
[libfirm] / ir / be / TEMPLATE / bearch_TEMPLATE.c
1 /* The main TEMPLATE backend driver file. */
2 /* $Id$ */
3 #ifdef HAVE_CONFIG_H
4 #include <config.h>
5 #endif
6
7 #include "pseudo_irg.h"
8 #include "irgwalk.h"
9 #include "irprog.h"
10 #include "irprintf.h"
11 #include "ircons.h"
12 #include "irgmod.h"
13
14 #include "bitset.h"
15 #include "debug.h"
16
17 #include "../bearch.h"                /* the general register allocator interface */
18 #include "../benode_t.h"
19 #include "../belower.h"
20 #include "../besched_t.h"
21 #include "../be.h"
22 #include "../beabi.h"
23 #include "../bemodule.h"
24
25 #include "bearch_TEMPLATE_t.h"
26
27 #include "TEMPLATE_new_nodes.h"           /* TEMPLATE nodes interface */
28 #include "gen_TEMPLATE_regalloc_if.h"     /* the generated interface (register type and class defenitions) */
29 #include "TEMPLATE_gen_decls.h"           /* interface declaration emitter */
30 #include "TEMPLATE_transform.h"
31 #include "TEMPLATE_emitter.h"
32 #include "TEMPLATE_map_regs.h"
33
34 #define DEBUG_MODULE "firm.be.TEMPLATE.isa"
35
36 /* TODO: ugly, but we need it to get access to the registers assigned to Phi nodes */
37 static set *cur_reg_set = NULL;
38
39 /**************************************************
40  *                         _ _              _  __
41  *                        | | |            (_)/ _|
42  *  _ __ ___  __ _    __ _| | | ___   ___   _| |_
43  * | '__/ _ \/ _` |  / _` | | |/ _ \ / __| | |  _|
44  * | | |  __/ (_| | | (_| | | | (_) | (__  | | |
45  * |_|  \___|\__, |  \__,_|_|_|\___/ \___| |_|_|
46  *            __/ |
47  *           |___/
48  **************************************************/
49
50 static ir_node *my_skip_proj(const ir_node *n) {
51         while (is_Proj(n))
52                 n = get_Proj_pred(n);
53         return (ir_node *)n;
54 }
55
56 /**
57  * Return register requirements for a TEMPLATE node.
58  * If the node returns a tuple (mode_T) then the proj's
59  * will be asked for this information.
60  */
61 static const arch_register_req_t *TEMPLATE_get_irn_reg_req(const void *self, arch_register_req_t *req, const ir_node *irn, int pos) {
62         const TEMPLATE_register_req_t *irn_req;
63         long               node_pos = pos == -1 ? 0 : pos;
64         ir_mode           *mode     = get_irn_mode(irn);
65         FIRM_DBG_REGISTER(firm_dbg_module_t *mod, DEBUG_MODULE);
66
67         if (mode == mode_T || mode == mode_M) {
68                 DBG((mod, LEVEL_1, "ignoring mode_T, mode_M node %+F\n", irn));
69                 return NULL;
70         }
71
72         DBG((mod, LEVEL_1, "get requirements at pos %d for %+F ... ", pos, irn));
73
74         if (is_Proj(irn)) {
75                 /* in case of a proj, we need to get the correct OUT slot */
76                 /* of the node corresponding to the proj number */
77                 if (pos == -1) {
78                         node_pos = TEMPLATE_translate_proj_pos(irn);
79                 }
80                 else {
81                         node_pos = pos;
82                 }
83
84                 irn = my_skip_proj(irn);
85
86                 DB((mod, LEVEL_1, "skipping Proj, going to %+F at pos %d ... ", irn, node_pos));
87         }
88
89         /* get requirements for our own nodes */
90         if (is_TEMPLATE_irn(irn)) {
91                 if (pos >= 0) {
92                         irn_req = get_TEMPLATE_in_req(irn, pos);
93                 }
94                 else {
95                         irn_req = get_TEMPLATE_out_req(irn, node_pos);
96                 }
97
98                 DB((mod, LEVEL_1, "returning reqs for %+F at pos %d\n", irn, pos));
99
100                 memcpy(req, &(irn_req->req), sizeof(*req));
101
102                 if (arch_register_req_is(&(irn_req->req), should_be_same)) {
103                         assert(irn_req->same_pos >= 0 && "should be same constraint for in -> out NYI");
104                         req->other_same = get_irn_n(irn, irn_req->same_pos);
105                 }
106
107                 if (arch_register_req_is(&(irn_req->req), should_be_different)) {
108                         assert(irn_req->different_pos >= 0 && "should be different constraint for in -> out NYI");
109                         req->other_different = get_irn_n(irn, irn_req->different_pos);
110                 }
111         }
112         /* get requirements for FIRM nodes */
113         else {
114                 /* treat Phi like Const with default requirements */
115                 if (is_Phi(irn)) {
116                         DB((mod, LEVEL_1, "returning standard reqs for %+F\n", irn));
117
118                         if (mode_is_float(mode)) {
119                                 memcpy(req, &(TEMPLATE_default_req_TEMPLATE_floating_point.req), sizeof(*req));
120                         }
121                         else if (mode_is_int(mode) || mode_is_reference(mode)) {
122                                 memcpy(req, &(TEMPLATE_default_req_TEMPLATE_general_purpose.req), sizeof(*req));
123                         }
124                         else if (mode == mode_T || mode == mode_M) {
125                                 DBG((mod, LEVEL_1, "ignoring Phi node %+F\n", irn));
126                                 return NULL;
127                         }
128                         else {
129                                 assert(0 && "unsupported Phi-Mode");
130                         }
131                 }
132                 else {
133                         DB((mod, LEVEL_1, "returning NULL for %+F (node not supported)\n", irn));
134                         req = NULL;
135                 }
136         }
137
138         return req;
139 }
140
141 static void TEMPLATE_set_irn_reg(const void *self, ir_node *irn, const arch_register_t *reg) {
142         int pos = 0;
143
144         if (is_Proj(irn)) {
145                 pos = TEMPLATE_translate_proj_pos(irn);
146                 irn = my_skip_proj(irn);
147         }
148
149         if (is_TEMPLATE_irn(irn)) {
150                 const arch_register_t **slots;
151
152                 slots      = get_TEMPLATE_slots(irn);
153                 slots[pos] = reg;
154         }
155         else {
156                 /* here we set the registers for the Phi nodes */
157                 TEMPLATE_set_firm_reg(irn, reg, cur_reg_set);
158         }
159 }
160
161 static const arch_register_t *TEMPLATE_get_irn_reg(const void *self, const ir_node *irn) {
162         int pos = 0;
163         const arch_register_t *reg = NULL;
164
165         if (is_Proj(irn)) {
166                 pos = TEMPLATE_translate_proj_pos(irn);
167                 irn = my_skip_proj(irn);
168         }
169
170         if (is_TEMPLATE_irn(irn)) {
171                 const arch_register_t **slots;
172                 slots = get_TEMPLATE_slots(irn);
173                 reg   = slots[pos];
174         }
175         else {
176                 reg = TEMPLATE_get_firm_reg(irn, cur_reg_set);
177         }
178
179         return reg;
180 }
181
182 static arch_irn_class_t TEMPLATE_classify(const void *self, const ir_node *irn) {
183         irn = my_skip_proj(irn);
184
185         if (is_cfop(irn)) {
186                 return arch_irn_class_branch;
187         }
188         else if (is_TEMPLATE_irn(irn)) {
189                 return arch_irn_class_normal;
190         }
191
192         return 0;
193 }
194
195 static arch_irn_flags_t TEMPLATE_get_flags(const void *self, const ir_node *irn) {
196         irn = my_skip_proj(irn);
197
198         if (is_TEMPLATE_irn(irn)) {
199                 return get_TEMPLATE_flags(irn);
200         }
201         else if (is_Unknown(irn)) {
202                 return arch_irn_flags_ignore;
203         }
204
205         return 0;
206 }
207
208 static ir_entity *TEMPLATE_get_frame_entity(const void *self, const ir_node *irn) {
209         /* TODO: return the ir_entity assigned to the frame */
210         return NULL;
211 }
212
213 static void TEMPLATE_set_frame_entity(const void *self, const ir_node *irn, ir_entity *ent) {
214         /* TODO: set the ir_entity assigned to the frame */
215 }
216
217 /**
218  * This function is called by the generic backend to correct offsets for
219  * nodes accessing the stack.
220  */
221 static void TEMPLATE_set_frame_offset(const void *self, ir_node *irn, int offset) {
222         /* TODO: correct offset if irn accesses the stack */
223 }
224
225 static int TEMPLATE_get_sp_bias(const void *self, const ir_node *irn) {
226         return 0;
227 }
228
229 /* fill register allocator interface */
230
231 static const arch_irn_ops_if_t TEMPLATE_irn_ops_if = {
232         TEMPLATE_get_irn_reg_req,
233         TEMPLATE_set_irn_reg,
234         TEMPLATE_get_irn_reg,
235         TEMPLATE_classify,
236         TEMPLATE_get_flags,
237         TEMPLATE_get_frame_entity,
238         TEMPLATE_set_frame_entity,
239         TEMPLATE_set_frame_offset,
240         TEMPLATE_get_sp_bias,
241         NULL,    /* get_inverse             */
242         NULL,    /* get_op_estimated_cost   */
243         NULL,    /* possible_memory_operand */
244         NULL,    /* perform_memory_operand  */
245 };
246
247 TEMPLATE_irn_ops_t TEMPLATE_irn_ops = {
248         &TEMPLATE_irn_ops_if,
249         NULL
250 };
251
252
253
254 /**************************************************
255  *                _                         _  __
256  *               | |                       (_)/ _|
257  *   ___ ___   __| | ___  __ _  ___ _ __    _| |_
258  *  / __/ _ \ / _` |/ _ \/ _` |/ _ \ '_ \  | |  _|
259  * | (_| (_) | (_| |  __/ (_| |  __/ | | | | | |
260  *  \___\___/ \__,_|\___|\__, |\___|_| |_| |_|_|
261  *                        __/ |
262  *                       |___/
263  **************************************************/
264
265 /**
266  * Transforms the standard firm graph into
267  * a TEMLPATE firm graph
268  */
269 static void TEMPLATE_prepare_graph(void *self) {
270         TEMPLATE_code_gen_t *cg = self;
271
272         irg_walk_blkwise_graph(cg->irg, NULL, TEMPLATE_transform_node, cg);
273 }
274
275
276
277 /**
278  * Called immediatly before emit phase.
279  */
280 static void TEMPLATE_finish_irg(void *self) {
281         TEMPLATE_code_gen_t *cg = self;
282         ir_graph            *irg = cg->irg;
283
284         dump_ir_block_graph_sched(irg, "-TEMPLATE-finished");
285 }
286
287
288 /**
289  * These are some hooks which must be filled but are probably not needed.
290  */
291 static void TEMPLATE_before_sched(void *self) {
292         /* Some stuff you need to do after scheduling but before register allocation */
293 }
294
295 static void TEMPLATE_before_ra(void *self, be_irg_t *birg) {
296         /* Some stuff you need to do after scheduling but before register allocation */
297 }
298
299 static void TEMPLATE_after_ra(void *self) {
300         /* Some stuff you need to do immediatly after register allocation */
301 }
302
303
304
305 /**
306  * Emits the code, closes the output file and frees
307  * the code generator interface.
308  */
309 static void TEMPLATE_emit_and_done(void *self) {
310         TEMPLATE_code_gen_t *cg = self;
311         ir_graph           *irg = cg->irg;
312         FILE               *out = cg->isa->out;
313
314         if (cg->emit_decls) {
315                 TEMPLATE_gen_decls(out);
316                 cg->emit_decls = 0;
317         }
318
319         TEMPLATE_gen_routine(out, irg, cg);
320
321         cur_reg_set = NULL;
322
323         /* de-allocate code generator */
324         del_set(cg->reg_set);
325         free(self);
326 }
327
328 static void *TEMPLATE_cg_init(const be_irg_t *birg);
329
330 static const arch_code_generator_if_t TEMPLATE_code_gen_if = {
331         TEMPLATE_cg_init,
332         TEMPLATE_prepare_graph,
333         TEMPLATE_before_sched,   /* before scheduling hook */
334         TEMPLATE_before_ra,      /* before register allocation hook */
335         TEMPLATE_after_ra,       /* after register allocation hook */
336         TEMPLATE_finish_irg,
337         TEMPLATE_emit_and_done
338 };
339
340 /**
341  * Initializes the code generator.
342  */
343 static void *TEMPLATE_cg_init(const be_irg_t *birg) {
344         TEMPLATE_isa_t      *isa = (TEMPLATE_isa_t *)birg->main_env->arch_env->isa;
345         TEMPLATE_code_gen_t *cg  = xmalloc(sizeof(*cg));
346
347         cg->impl     = &TEMPLATE_code_gen_if;
348         cg->irg      = birg->irg;
349         cg->reg_set  = new_set(TEMPLATE_cmp_irn_reg_assoc, 1024);
350         cg->arch_env = birg->main_env->arch_env;
351         cg->isa      = isa;
352         cg->birg     = birg;
353         FIRM_DBG_REGISTER(cg->mod, "firm.be.TEMPLATE.cg");
354
355         isa->num_codegens++;
356
357         if (isa->num_codegens > 1)
358                 cg->emit_decls = 0;
359         else
360                 cg->emit_decls = 1;
361
362         cur_reg_set = cg->reg_set;
363
364         TEMPLATE_irn_ops.cg = cg;
365
366         return (arch_code_generator_t *)cg;
367 }
368
369
370
371 /*****************************************************************
372  *  ____             _                  _   _____  _____
373  * |  _ \           | |                | | |_   _|/ ____|  /\
374  * | |_) | __ _  ___| | _____ _ __   __| |   | | | (___   /  \
375  * |  _ < / _` |/ __| |/ / _ \ '_ \ / _` |   | |  \___ \ / /\ \
376  * | |_) | (_| | (__|   <  __/ | | | (_| |  _| |_ ____) / ____ \
377  * |____/ \__,_|\___|_|\_\___|_| |_|\__,_| |_____|_____/_/    \_\
378  *
379  *****************************************************************/
380
381 static TEMPLATE_isa_t TEMPLATE_isa_template = {
382         &TEMPLATE_isa_if,
383         &TEMPLATE_general_purpose_regs[REG_R6],
384         &TEMPLATE_general_purpose_regs[REG_R7],
385         -1,
386         0
387 };
388
389 /**
390  * Initializes the backend ISA and opens the output file.
391  */
392 static void *TEMPLATE_init(FILE *outfile) {
393         static int inited = 0;
394         TEMPLATE_isa_t *isa;
395
396         if(inited)
397                 return NULL;
398
399         isa = xcalloc(1, sizeof(*isa));
400         memcpy(isa, &TEMPLATE_isa_template, sizeof(*isa));
401
402         isa->out = outfile;
403
404         TEMPLATE_register_init(isa);
405         TEMPLATE_create_opcodes();
406
407         inited = 1;
408
409         return isa;
410 }
411
412
413
414 /**
415  * Closes the output file and frees the ISA structure.
416  */
417 static void TEMPLATE_done(void *self) {
418         free(self);
419 }
420
421
422
423 static int TEMPLATE_get_n_reg_class(const void *self) {
424         return N_CLASSES;
425 }
426
427 static const arch_register_class_t *TEMPLATE_get_reg_class(const void *self, int i) {
428         assert(i >= 0 && i < N_CLASSES && "Invalid TEMPLATE register class requested.");
429         return &TEMPLATE_reg_classes[i];
430 }
431
432
433
434 /**
435  * Get the register class which shall be used to store a value of a given mode.
436  * @param self The this pointer.
437  * @param mode The mode in question.
438  * @return A register class which can hold values of the given mode.
439  */
440 const arch_register_class_t *TEMPLATE_get_reg_class_for_mode(const void *self, const ir_mode *mode) {
441         if (mode_is_float(mode))
442                 return &TEMPLATE_reg_classes[CLASS_TEMPLATE_floating_point];
443         else
444                 return &TEMPLATE_reg_classes[CLASS_TEMPLATE_general_purpose];
445 }
446
447
448
449 typedef struct {
450         be_abi_call_flags_bits_t flags;
451         const arch_env_t *arch_env;
452         const arch_isa_t *isa;
453         ir_graph *irg;
454 } TEMPLATE_abi_env_t;
455
456 static void *TEMPLATE_abi_init(const be_abi_call_t *call, const arch_env_t *arch_env, ir_graph *irg)
457 {
458         TEMPLATE_abi_env_t *env = xmalloc(sizeof(env[0]));
459         be_abi_call_flags_t fl = be_abi_call_get_flags(call);
460         env->flags    = fl.bits;
461         env->irg      = irg;
462         env->arch_env = arch_env;
463         env->isa      = arch_env->isa;
464         return env;
465 }
466
467 /**
468  * Get the between type for that call.
469  * @param self The callback object.
470  * @return The between type of for that call.
471  */
472 static ir_type *TEMPLATE_get_between_type(void *self) {
473         TEMPLATE_abi_env_t *env = self;
474         static ir_type *between_type = NULL;
475         static ir_entity *old_bp_ent    = NULL;
476
477         if(!between_type) {
478                 ir_entity *ret_addr_ent;
479                 ir_type *ret_addr_type = new_type_primitive(new_id_from_str("return_addr"), mode_P);
480                 ir_type *old_bp_type   = new_type_primitive(new_id_from_str("bp"), mode_P);
481
482                 between_type           = new_type_class(new_id_from_str("TEMPLATE_between_type"));
483                 old_bp_ent             = new_entity(between_type, new_id_from_str("old_bp"), old_bp_type);
484                 ret_addr_ent           = new_entity(between_type, new_id_from_str("old_bp"), ret_addr_type);
485
486                 set_entity_offset(old_bp_ent, 0);
487                 set_entity_offset(ret_addr_ent, get_type_size_bytes(old_bp_type));
488                 set_type_size_bytes(between_type, get_type_size_bytes(old_bp_type) + get_type_size_bytes(ret_addr_type));
489         }
490
491         return between_type;
492 }
493
494 static void TEMPLATE_abi_dont_save_regs(void *self, pset *s)
495 {
496         TEMPLATE_abi_env_t *env = self;
497         if (env->flags.try_omit_fp) {
498                 /* insert the BP register into the ignore set */
499                 pset_insert_ptr(s, env->isa->bp);
500         }
501 }
502
503 /**
504  * Build the prolog, return the BASE POINTER register
505  */
506 static const arch_register_t *TEMPLATE_abi_prologue(void *self, ir_node **mem, pmap *reg_map) {
507         TEMPLATE_abi_env_t *env = self;
508
509         if(env->flags.try_omit_fp)
510                 return env->isa->sp;
511         return env->isa->bp;
512 }
513
514 /* Build the epilog */
515 static void arm_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_map) {
516         TEMPLATE_abi_env_t *env = self;
517 }
518
519 static const be_abi_callbacks_t TEMPLATE_abi_callbacks = {
520         TEMPLATE_abi_init,
521         free,
522         TEMPLATE_get_between_type,
523         TEMPLATE_abi_dont_save_regs,
524         TEMPLATE_abi_prologue,
525         arm_abi_epilogue,
526 };
527
528 /**
529  * Get the ABI restrictions for procedure calls.
530  * @param self        The this pointer.
531  * @param method_type The type of the method (procedure) in question.
532  * @param abi         The abi object to be modified
533  */
534 void TEMPLATE_get_call_abi(const void *self, ir_type *method_type, be_abi_call_t *abi) {
535         ir_type  *tp;
536         ir_mode  *mode;
537         int       i, n = get_method_n_params(method_type);
538         be_abi_call_flags_t call_flags;
539
540         /* set abi flags for calls */
541         call_flags.bits.left_to_right         = 0;
542         call_flags.bits.store_args_sequential = 1;
543         call_flags.bits.try_omit_fp           = 1;
544         call_flags.bits.fp_free               = 0;
545         call_flags.bits.call_has_imm          = 1;
546
547         /* set stack parameter passing style */
548         be_abi_call_set_flags(abi, call_flags, &TEMPLATE_abi_callbacks);
549
550         for (i = 0; i < n; i++) {
551                 /* TODO: implement register parameter: */
552                 /* reg = get reg for param i;          */
553                 /* be_abi_call_param_reg(abi, i, reg); */
554
555                 /* default: all parameters on stack */
556                 be_abi_call_param_stack(abi, i, 4, 0, 0);
557         }
558
559         /* TODO: set correct return register */
560         /* default: return value is in R0 resp. F0 */
561         if (get_method_n_ress(method_type) > 0) {
562                 tp   = get_method_res_type(method_type, 0);
563                 mode = get_type_mode(tp);
564
565                 be_abi_call_res_reg(abi, 0,
566                         mode_is_float(mode) ? &TEMPLATE_floating_point_regs[REG_F0] : &TEMPLATE_general_purpose_regs[REG_R0]);
567         }
568 }
569
570 static const void *TEMPLATE_get_irn_ops(const arch_irn_handler_t *self, const ir_node *irn) {
571         return &TEMPLATE_irn_ops;
572 }
573
574 const arch_irn_handler_t TEMPLATE_irn_handler = {
575         TEMPLATE_get_irn_ops
576 };
577
578 const arch_irn_handler_t *TEMPLATE_get_irn_handler(const void *self) {
579         return &TEMPLATE_irn_handler;
580 }
581
582 int TEMPLATE_to_appear_in_schedule(void *block_env, const ir_node *irn) {
583         return is_TEMPLATE_irn(irn);
584 }
585
586 /**
587  * Initializes the code generator interface.
588  */
589 static const arch_code_generator_if_t *TEMPLATE_get_code_generator_if(void *self) {
590         return &TEMPLATE_code_gen_if;
591 }
592
593 list_sched_selector_t TEMPLATE_sched_selector;
594
595 /**
596  * Returns the reg_pressure scheduler with to_appear_in_schedule() overloaded
597  */
598 static const list_sched_selector_t *TEMPLATE_get_list_sched_selector(const void *self, list_sched_selector_t *selector) {
599         memcpy(&TEMPLATE_sched_selector, trivial_selector, sizeof(list_sched_selector_t));
600         TEMPLATE_sched_selector.to_appear_in_schedule = TEMPLATE_to_appear_in_schedule;
601         return &TEMPLATE_sched_selector;
602 }
603
604 static const ilp_sched_selector_t *TEMPLATE_get_ilp_sched_selector(const void *self) {
605         return NULL;
606 }
607
608 /**
609  * Returns the necessary byte alignment for storing a register of given class.
610  */
611 static int TEMPLATE_get_reg_class_alignment(const void *self, const arch_register_class_t *cls) {
612         ir_mode *mode = arch_register_class_mode(cls);
613         return get_mode_size_bytes(mode);
614 }
615
616 /**
617  * Returns the libFirm configuration parameter for this backend.
618  */
619 static const backend_params *TEMPLATE_get_libfirm_params(void) {
620         static arch_dep_params_t ad = {
621                 1,  /* allow subs */
622                 0,  /* Muls are fast enough on Firm */
623                 31, /* shift would be ok */
624                 0,  /* no Mulhs */
625                 0,  /* no Mulhu */
626                 0,  /* no Mulh */
627         };
628         static backend_params p = {
629                 NULL,  /* no additional opcodes */
630                 NULL,  /* will be set later */
631                 0,     /* no dword lowering */
632                 NULL,  /* no creator function */
633                 NULL,  /* context for create_intrinsic_fkt */
634         };
635
636         p.dep_param = &ad;
637         return &p;
638 }
639
640 static const be_execution_unit_t ***TEMPLATE_get_allowed_execution_units(const void *self, const ir_node *irn) {
641         /* TODO */
642         assert(0);
643         return NULL;
644 }
645
646 static const be_machine_t *TEMPLATE_get_machine(const void *self) {
647         /* TODO */
648         assert(0);
649         return NULL;
650 }
651
652
653 const arch_isa_if_t TEMPLATE_isa_if = {
654         TEMPLATE_init,
655         TEMPLATE_done,
656         TEMPLATE_get_n_reg_class,
657         TEMPLATE_get_reg_class,
658         TEMPLATE_get_reg_class_for_mode,
659         TEMPLATE_get_call_abi,
660         TEMPLATE_get_irn_handler,
661         TEMPLATE_get_code_generator_if,
662         TEMPLATE_get_list_sched_selector,
663         TEMPLATE_get_ilp_sched_selector,
664         TEMPLATE_get_reg_class_alignment,
665     TEMPLATE_get_libfirm_params,
666         TEMPLATE_get_allowed_execution_units,
667         TEMPLATE_get_machine
668 };
669
670 void be_init_arch_TEMPLATE(void)
671 {
672         be_register_isa_if("TEMPLATE", &TEMPLATE_isa_if);
673 }
674
675 BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_TEMPLATE);