diff mc-code-powerpc.c @ 363:f3f2b7906d50

label extension
author kono
date Tue, 06 Jul 2004 17:04:31 +0900
parents 6188f66c0c0b
children 5ac17fa9d7e0
line wrap: on
line diff
--- a/mc-code-powerpc.c	Mon Jul 05 14:40:20 2004 +0900
+++ b/mc-code-powerpc.c	Tue Jul 06 17:04:31 2004 +0900
@@ -1199,6 +1199,15 @@
     return;
 }
 
+void
+code_label_value(int label,int reg) {
+    char *crn;
+    use_int(reg);
+    crn = register_name(reg);
+    printf("\taddis %s,r31,ha16(L_%d-L_%d)\n",crn,label,code_base);
+    printf("\tla %s,lo16(L_%d-L_%d)(%s)\n",crn,label,code_base,crn);
+    return;
+}
 
 void
 code_const(int e2,int reg) {