Mercurial > hg > CbC > old > device
comparison mc-code-powerpc.c @ 363:f3f2b7906d50
label extension
author | kono |
---|---|
date | Tue, 06 Jul 2004 17:04:31 +0900 |
parents | 6188f66c0c0b |
children | 5ac17fa9d7e0 |
comparison
equal
deleted
inserted
replaced
362:5cf12c7a3274 | 363:f3f2b7906d50 |
---|---|
1197 if(r!=reg) | 1197 if(r!=reg) |
1198 printf("\tmr %s,%s\n",register_name(reg),register_name(r)); | 1198 printf("\tmr %s,%s\n",register_name(reg),register_name(r)); |
1199 return; | 1199 return; |
1200 } | 1200 } |
1201 | 1201 |
1202 void | |
1203 code_label_value(int label,int reg) { | |
1204 char *crn; | |
1205 use_int(reg); | |
1206 crn = register_name(reg); | |
1207 printf("\taddis %s,r31,ha16(L_%d-L_%d)\n",crn,label,code_base); | |
1208 printf("\tla %s,lo16(L_%d-L_%d)(%s)\n",crn,label,code_base,crn); | |
1209 return; | |
1210 } | |
1202 | 1211 |
1203 void | 1212 void |
1204 code_const(int e2,int reg) { | 1213 code_const(int e2,int reg) { |
1205 char *crn; | 1214 char *crn; |
1206 use_int(reg); | 1215 use_int(reg); |