+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[0]);
+ ir_snprintf(tmp, sizeof(tmp), " same to: %+F", same);
+ strncat(buf, tmp, len);
+ if (req->other_same[1] != -1) {
+ const ir_node *same2 = get_irn_n(skip_Proj_const(node), req->other_same[1]);
+ ir_snprintf(tmp, sizeof(tmp), "or %+F", same2);
+ strncat(buf, tmp, len);
+ }
+ }