* a register into another register (e.g. for eviction).
*/
- r12 bytes4! int! volatile;
- r11 bytes4! int! volatile;
- r10 bytes4! int! volatile;
- r9 bytes4! int! volatile;
- r8 bytes4! int! volatile;
- r7 bytes4! int! volatile;
- r6 bytes4! int! volatile;
- r5 bytes4! int! volatile;
- r4 bytes4! int! volatile;
- r3 bytes4! int! ret volatile;
-
- r31 bytes4! int!;
- r30 bytes4! int!;
- r29 bytes4! int!;
- r28 bytes4! int!;
- r27 bytes4! int!;
- r26 bytes4! int!;
- r25 bytes4! int!;
- r24 bytes4! int!;
- r23 bytes4! int!;
- r22 bytes4! int!;
- r21 bytes4! int!;
- r20 bytes4! int!;
- r19 bytes4! int!;
- r18 bytes4! int!;
- r17 bytes4! int!;
- r16 bytes4! int!;
- r15 bytes4! int!;
- r14 bytes4! int!;
-
- f14 bytes4! float! volatile;
- f13 bytes4! float! volatile;
- f12 bytes4! float! volatile;
- f11 bytes4! float! volatile;
- f10 bytes4! float! volatile;
- f9 bytes4! float! volatile;
- f8 bytes4! float! volatile;
- f7 bytes4! float! volatile;
- f6 bytes4! float! volatile;
- f5 bytes4! float! volatile;
- f4 bytes4! float! volatile;
- f3 bytes4! float! volatile;
- f2 bytes4! float! volatile;
- f1 bytes4! float! volatile;
- f0 bytes4! float! volatile;
-
- f31 bytes4! float!;
- f30 bytes4! float!;
- f29 bytes4! float!;
- f28 bytes4! float!;
- f27 bytes4! float!;
- f26 bytes4! float!;
- f25 bytes4! float!;
- f24 bytes4! float!;
- f23 bytes4! float!;
- f22 bytes4! float!;
- f21 bytes4! float!;
- f20 bytes4! float!;
- f19 bytes4! float!;
- f18 bytes4! float!;
- f17 bytes4! float!;
- f16 bytes4! float!;
- f15 bytes4! float!;
-
- cr0 cr!;
+ r12 "12" bytes4! int! volatile;
+ r11 "11" bytes4! int! volatile;
+ r10 "10" bytes4! int! volatile;
+ r9 "9" bytes4! int! volatile;
+ r8 "8" bytes4! int! volatile;
+ r7 "7" bytes4! int! volatile;
+ r6 "6" bytes4! int! volatile;
+ r5 "5" bytes4! int! volatile;
+ r4 "4" bytes4! int! volatile;
+ r3 "3" bytes4! int! ret volatile;
+
+ r31 "31" bytes4! int!;
+ r30 "30" bytes4! int!;
+ r29 "29" bytes4! int!;
+ r28 "28" bytes4! int!;
+ r27 "27" bytes4! int!;
+ r26 "26" bytes4! int!;
+ r25 "25" bytes4! int!;
+ r24 "24" bytes4! int!;
+ r23 "23" bytes4! int!;
+ r22 "22" bytes4! int!;
+ r21 "21" bytes4! int!;
+ r20 "20" bytes4! int!;
+ r19 "19" bytes4! int!;
+ r18 "18" bytes4! int!;
+ r17 "17" bytes4! int!;
+ r16 "16" bytes4! int!;
+ r15 "15" bytes4! int!;
+ r14 "14" bytes4! int!;
+
+ f14 "14" bytes4! float! volatile;
+ f13 "13" bytes4! float! volatile;
+ f12 "12" bytes4! float! volatile;
+ f11 "11" bytes4! float! volatile;
+ f10 "10" bytes4! float! volatile;
+ f9 "9" bytes4! float! volatile;
+ f8 "8" bytes4! float! volatile;
+ f7 "7" bytes4! float! volatile;
+ f6 "6" bytes4! float! volatile;
+ f5 "5" bytes4! float! volatile;
+ f4 "4" bytes4! float! volatile;
+ f3 "3" bytes4! float! volatile;
+ f2 "2" bytes4! float! volatile;
+ f1 "1" bytes4! float! volatile;
+ f0 "0" bytes4! float! volatile;
+
+ f31 "31" bytes4! float!;
+ f30 "30" bytes4! float!;
+ f29 "29" bytes4! float!;
+ f28 "28" bytes4! float!;
+ f27 "27" bytes4! float!;
+ f26 "26" bytes4! float!;
+ f25 "25" bytes4! float!;
+ f24 "24" bytes4! float!;
+ f23 "23" bytes4! float!;
+ f22 "22" bytes4! float!;
+ f21 "21" bytes4! float!;
+ f20 "20" bytes4! float!;
+ f19 "19" bytes4! float!;
+ f18 "18" bytes4! float!;
+ f17 "17" bytes4! float!;
+ f16 "16" bytes4! float!;
+ f15 "15" bytes4! float!;
+
+ cr0 "cr0" cr!;
DECLARATIONS
return &p->sym;
}
-struct reg* makereg(const char* id)
+struct reg* makereg(const char* id, const char* realname)
{
struct reg* p = smap_get(®isters, id);
static int number = 0;
yyerror("redefinition of '%s'", id);
p = calloc(1, sizeof(*p));
p->name = id;
+ p->realname = realname;
p->number = number++;
smap_put(®isters, id, p);
struct reg* r = registers.item[i].right;
assert(r->number == i);
- print("%1{ \"%s\", 0x%x, 0x%x },\n", r->name, r->type, r->attrs);
+ print("%1{ \"%s\", \"%s\", 0x%x, 0x%x },\n",
+ r->name, r->realname, r->type, r->attrs);
}
print("%1{ NULL }\n");
print("};\n\n");
struct reg
{
- const char* name; /* register name */
+ const char* name; /* friendly register name */
+ const char* realname; /* name used in assembly output */
int number; /* identifying number */
uint32_t attrs; /* bitfield of register attributes */
uint32_t type; /* register type */
int number; /* identifying number */
};
-extern struct reg* makereg(const char* name);
+extern struct reg* makereg(const char* name, const char* realname);
extern void addregattr(struct reg* reg, const char* regattr, bool exact);
extern struct regattr* getregattr(const char* name);