diff mc-code-powerpc.c @ 345:2b3946ee4fc9 nametbl-before

*** empty log message ***
author kono
date Sun, 27 Jun 2004 20:31:46 +0900
parents ca34f02b2056
children e77b3a7002ad
line wrap: on
line diff
--- a/mc-code-powerpc.c	Sun Jun 27 14:56:21 2004 +0900
+++ b/mc-code-powerpc.c	Sun Jun 27 20:31:46 2004 +0900
@@ -817,6 +817,50 @@
     return;
 }
 
+extern int
+code_register_overlap(int s,int t)
+{
+    switch(car(s)) {
+    case REGISTER:
+	switch(car(t)) {
+	case DREGISTER: case FREGISTER: break;
+	case REGISTER:
+	    if(cadr(s)==cadr(t)) return 1;
+	    break;
+	case LREGISTER:
+	    if(cadr(s)==regv_l(cadr(t))) return 1;
+	    if(cadr(s)==regv_h(cadr(t))) return 1;
+	    break;
+	}   
+	break;
+    case DREGISTER:
+    case FREGISTER:
+	switch(car(t)) {
+	case REGISTER: case LREGISTER: break;
+	case DREGISTER: case FREGISTER:
+	    if(cadr(s)==cadr(t)) return 1;
+	    break;
+	}   
+	break;
+    case LREGISTER:
+	switch(car(t)) {
+	case DREGISTER: case FREGISTER: break;
+	case REGISTER:
+	    if(cadr(t)==regv_l(cadr(s))) return 1;
+	    if(cadr(t)==regv_h(cadr(s))) return 1;
+	    break;
+	case LREGISTER:
+	    if(regv_l(cadr(t))==regv_l(cadr(s))) return 1;
+	    if(regv_l(cadr(t))==regv_h(cadr(s))) return 1;
+	    if(regv_h(cadr(t))==regv_l(cadr(s))) return 1;
+	    if(regv_h(cadr(t))==regv_h(cadr(s))) return 1;
+	    break;
+	}   
+	break;
+    }   
+    return 0;
+}
+
 void
 register_usage(char *s)
 {