From: Bernhard Urban Date: Tue, 18 May 2010 02:25:53 +0000 (+0200) Subject: codea: w00t... snafu_03 geht _ENDLICH_ *pardy* :))) X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=uebersetzerbau-ss10.git;a=commitdiff_plain;h=c5f1452ff4545695ac2524ae51dfbd8ff0e2ca4a codea: w00t... snafu_03 geht _ENDLICH_ *pardy* :))) --- diff --git a/codea/chelper.c b/codea/chelper.c index 37c03be..0be9cc3 100644 --- a/codea/chelper.c +++ b/codea/chelper.c @@ -8,9 +8,14 @@ #define DDCHELP #endif -#define REGLEN 9 +#define REGLEN 10 +#if 0 static char *regs64[] = {"rax", "r10", "r11", "r9", "r8", "rcx", "rdx", "rsi", "rdi"}; static char *regs8l[] = {"al", "r10b", "r11b", "r9b", "r8b", "cl", "dl", "sil", "dil"}; +#else +static char *regs64[] = {"rax", "r10", "r11", "r9", "rax", "r10", "r11", "rax", "r10", "r11"}; +static char *regs8l[] = {"al", "r10b", "r11b", "r9b", "al", "r10b", "r11b", "al", "r10b", "r11b"}; +#endif void func_header(char *s) { diff --git a/codea/code.bfe b/codea/code.bfe index 84d8db4..e5677b2 100644 --- a/codea/code.bfe +++ b/codea/code.bfe @@ -153,13 +153,15 @@ void gen_subspecial(struct treenode *bnode, short e) { /* tritt z.b. bei snafu_05.0 auf */ printf("\t//gen_subspecial(%i)\n", e); - if (!e) - KIDREG2ID(0); + KIDREG2ID(0); KIDKIDREG2PARM(1,0); - if(e) + + if(e) { printf("\tsubq $%d, %%%s\n", KIDKID_VAL(1,0), BN_REG); - else + } else { printf("\tsubq %%%s, %%%s\n", KIDKID_REG(1,0), BN_REG); + } + if(e) KIDKIDREG2PARM(1,1); printf("\taddq %%%s, %%%s\n", KIDKID_REG(1,1), BN_REG); }