changeset 752:a38f18a08b30

i64 continue... struct
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 14 Nov 2010 05:16:14 +0900
parents c921670e2ce8
children 944aa2967d15
files .gdbinit mc-codegen.c
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.gdbinit	Sun Nov 14 04:56:02 2010 +0900
+++ b/.gdbinit	Sun Nov 14 05:16:14 2010 +0900
@@ -1,16 +1,16 @@
 tb main
 define regs 
-call (void)printf("eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx\nesi=%08lx edi=%08lx ebp=%08lx esp=%08lx eip=%08lx\n",$eax,$ebx,$ecx,$edx,$esi,$edi,$ebp,$esp,$eip)
+call (void)printf("rax=%08lx rbx=%08lx rcx=%08lx rdx=%08lx\nrsi=%08lx rdi=%08lx rbp=%08lx rsp=%08lx rip=%08lx\n",$rax,$rbx,$rcx,$rdx,$rsi,$rdi,$rbp,$rsp,$rip)
 end
 define si
 stepi
 regs
-x/1i $eip
+x/1i $rip
 end
 define ni
 nexti
 regs
-x/1i $eip
+x/1i $rip
 end
 b errmsg
 # r -s test/tmp7.c
--- a/mc-codegen.c	Sun Nov 14 04:56:02 2010 +0900
+++ b/mc-codegen.c	Sun Nov 14 05:16:14 2010 +0900
@@ -2083,7 +2083,7 @@
 {
     int reg;
     /*    e2=e4 */
-    if (e5==LREGISTER) {
+    if (e5==LREGISTER||e5==REGISTER) {
 	reg = cadr(e4);
 	switch(car(e2)) {
 	case GVAR:      /*   i=3 */
@@ -2093,6 +2093,7 @@
 		code_lassign_lvar(cadr(e2),reg);
 		return;
 	case LREGISTER:
+	case REGISTER:
 		if (reg!=cadr(e2))
 		    code_lassign_lregister(cadr(e2),reg);
 		return;
@@ -2101,7 +2102,7 @@
 	}
     }
     /* e2 is register now */
-    if (car(e2)!=LREGISTER) error(-1);
+    if (!(car(e2)==LREGISTER||car(e2)==REGISTER)) error(-1);
     reg = cadr(e2);
     switch(e5) {
     case LRGVAR: case LURGVAR: code_lrgvar(e4,reg); return;
@@ -2126,8 +2127,8 @@
 	return;
     }
     if (!use && (
-	(e5==LREGISTER &&(car(e2)==GVAR||car(e2)==LVAR||car(e2)==LREGISTER)) ||
-	    (car(e2)==LREGISTER&&
+	((e5==LREGISTER||e5==REGISTER) &&(car(e2)==GVAR||car(e2)==LVAR||car(e2)==LREGISTER || car(e2)==REGISTER)) ||
+	    ((car(e2)==LREGISTER||car(e2)==REGISTER)&&
 		(e5==LRGVAR||e5==LRLVAR||e5==LURLVAR||e5==LURGVAR||e5==LCONST))
 	)) {
 	lassign_opt(e5,e2,e4);
@@ -2143,6 +2144,7 @@
 	    code_lassign_lvar(cadr(e2),USE_CREG);
             return;
     case LREGISTER:
+    case REGISTER:
 	    g_expr(e4);
 	    code_lassign_lregister(cadr(e2),USE_CREG);
 	    return;