+
+extern char *arch_register_req_format(char *buf, size_t len,
+ const arch_register_req_t *req,
+ const ir_node *node)
+{
+ char tmp[128];
+ snprintf(buf, len, "class: %s", req->cls->name);
+
+ if(arch_register_req_is(req, limited)) {
+ unsigned n_regs = req->cls->n_regs;
+ unsigned i;
+
+ strncat(buf, " limited:", len);
+ for(i = 0; i < n_regs; ++i) {
+ if(rbitset_is_set(req->limited, i)) {
+ const arch_register_t *reg = &req->cls->regs[i];
+ strncat(buf, " ", len);
+ strncat(buf, reg->name, len);
+ }
+ }
+ }
+
+ if(arch_register_req_is(req, should_be_same)) {
+ const ir_node *same = get_irn_n(skip_Proj_const(node), req->other_same);
+ ir_snprintf(tmp, sizeof(tmp), " same to: %+F", same);
+ strncat(buf, tmp, len);
+ }
+
+ if(arch_register_req_is(req, should_be_different)) {
+ const ir_node *different = get_irn_n(skip_Proj_const(node), req->other_different);
+ ir_snprintf(tmp, sizeof(tmp), " different to: %+F", different);
+ strncat(buf, tmp, len);
+ }
+
+ return buf;
+}
+
+static const arch_register_req_t no_requirement = {
+ arch_register_req_type_none,
+ NULL,
+ NULL,
+ -1,
+ -1
+};
+const arch_register_req_t *arch_no_register_req = &no_requirement;