Mercurial > hg > CbC > old > device
changeset 627:65eb070e731c
Intel Mac continue...
author | kono |
---|---|
date | Tue, 10 Oct 2006 02:16:05 +0900 |
parents | 5bd74f52df62 |
children | c9b67b1c42f5 |
files | Changes mc-code-ia32.c |
diffstat | 2 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Changes Tue Oct 10 01:57:12 2006 +0900 +++ b/Changes Tue Oct 10 02:16:05 2006 +0900 @@ -8905,3 +8905,8 @@ もしかすると、修正は以外に少ないかも。 +Tue Oct 10 02:15:24 JST 2006 + +む。先ながそ。 + +
--- a/mc-code-ia32.c Tue Oct 10 01:57:12 2006 +0900 +++ b/mc-code-ia32.c Tue Oct 10 02:16:05 2006 +0900 @@ -915,13 +915,13 @@ use_int(creg); #ifdef __APPLE__ if (cadr(e1)) { - printf("\tmovl L_%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label, register_name(creg,0)); printf("\taddl $%d,%s\n", cadr(e1), register_name(creg,0)); } else { - printf("\tmovl L_%s-_%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-_%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label,register_name(creg,0)); } #else @@ -940,14 +940,14 @@ use_int(creg); #ifdef __APPLE__ if (cadr(e1)) { - printf("\tmovl L_%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label, register_name(creg,0)); printf("\tmovl %d(%s),%s\n", cadr(e1), register_name(creg,0), register_name(creg,0)); } else { - printf("\tmovl L_%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label, register_name(creg,0)); printf("\tmovl %d(%s),%s\n", @@ -975,14 +975,14 @@ use_int(creg); #ifdef __APPLE__ if (cadr(e1)) { - printf("\tmovl L_%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label, register_name(creg,0)); printf("\t%s %d(%s),%s\n",cload(sign,sz), cadr(e1), register_name(creg,0), register_name(creg,0)); } else { - printf("\tmovl L_%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label, register_name(creg,0)); printf("\t%s %d(%s),%s\n",cload(sign,sz), @@ -1226,7 +1226,7 @@ code_cmp_crgvar(int e1,int reg,int sz,int label,int cond) { use_int(reg); #ifdef __APPLE__ - printf("\tmovl L_%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e1))->nm, goffset_label, register_name(reg,0)); if (cadr(e1)) { @@ -2097,7 +2097,7 @@ func_disp_label=fwdlabel(); printf("\tlea _%d(%%ebp),%%esp\n",func_disp_label); #ifdef __APPLE__ - printf("\tcalli\t___i686.get_pc_thunk.bx\n"); + printf("\tcall\t___i686.get_pc_thunk.bx\n"); printf("_%d:\n",labelno); goffset_label = labelno; labelno++; @@ -2469,6 +2469,14 @@ printf("\thlt ; hlt ; hlt ; hlt ; hlt\n"); } } + printf(" .subsections_via_symbols\n"); + printf(" .section __TEXT,__textcoal_nt,coalesced,pure_instructions\n"); + printf(".weak_definition ___i686.get_pc_thunk.bx\n"); + printf(".private_extern ___i686.get_pc_thunk.bx\n"); + printf("___i686.get_pc_thunk.bx:\n"); + printf(" movl (%%esp), %%ebx\n"); + printf(" ret\n"); + #endif } @@ -3177,7 +3185,7 @@ char *drn; dreg = get_register(); drn = register_name(dreg,0); - printf("\tmovl _%s-%d(%%ebx),%s\n",((NMTBL*)caddr(e2))->nm, + printf("\tmovl _%s-%d(%%ebx),%s\n",n, goffset_label, register_name(dreg,0)); if (cadr(e1)) {