sparc: split Mulh node into SMulh and UMulh
[libfirm] / ir / be / scripts / generate_regalloc_if.pl
index 60ec71f..284ca6b 100755 (executable)
@@ -61,26 +61,18 @@ sub translate_reg_type {
                my @types;
 
                if ($t & 1) {
-                       push(@types, "arch_register_type_caller_save");
-               }
-
-               if ($t & 2) {
-                       push(@types, "arch_register_type_callee_save");
-               }
-
-               if ($t & 4) {
                        push(@types, "arch_register_type_ignore");
                }
 
-               if ($t & 8) {
+               if ($t & 2) {
                        push(@types, "arch_register_type_joker");
                }
 
-               if ($t & 16) {
+               if ($t & 4) {
                        push(@types, "arch_register_type_virtual");
                }
 
-               if ($t & 32) {
+               if ($t & 8) {
                        push(@types, "arch_register_type_state");
                }
 
@@ -273,14 +265,17 @@ print OUT<<EOF;
 #include "../bearch.h"
 #include "${arch}_nodes_attr.h"
 
+/** global register indices for ${arch} registers */
 enum reg_indices {
 ${regdef}
        N_${archuc}_REGISTERS
 };
+/** local register indices for ${arch} registers */
 enum {
 ${regdef2}
 };
 
+/** number of registers in ${arch} register classes. */
 enum {
 ${regcounts}
 };
@@ -291,7 +286,6 @@ extern const arch_register_t ${arch}_registers[N_${archuc}_REGISTERS];
 extern arch_register_class_t ${arch}_reg_classes[N_${archuc}_CLASSES];
 
 void ${arch}_register_init(void);
-unsigned ${arch}_get_n_regs(void);
 
 #endif
 EOF
@@ -328,10 +322,14 @@ print OUT "arch_register_class_t ${arch}_reg_classes[] = {\n\t".join(",\n\t", @r
 
 print OUT<<EOF;
 
+/** The array of all registers in the ${arch} architecture, sorted by its global index.*/
 const arch_register_t ${arch}_registers[] = {
 ${regtypes_def}
 };
 
+/**
+ * Initializes ${arch} register classes.
+ */
 void ${arch}_register_init(void)
 {
 ${reginit}