From: Bernhard Urban Date: Sun, 30 May 2010 12:57:22 +0000 (+0200) Subject: codeb: (opt) ein befehl gespart X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=uebersetzerbau-ss10.git;a=commitdiff_plain;h=48eb805b0b496095994fd6cc90ba91296f79f115 codeb: (opt) ein befehl gespart --- diff --git a/codeb/code.bfe b/codeb/code.bfe index 81ff400..e36c0d2 100644 --- a/codeb/code.bfe +++ b/codeb/code.bfe @@ -195,7 +195,7 @@ ret: O_RET(retexpr) # 2 # printf("\t//o_ret(expr)\n"); move(BN_REG, "rax"); func retexpr: O_ID # 1 # printf("\t//retexpr\n"); if(bnode->param_index > -1) move(param_reg(bnode->param_index), BN_REG); retexpr: expr -ifstat: O_IF(O_ID) # 1 # KIDREG2PARM(0); printf("\tmovq %%%s, %%rax\n", KID_REG(0)); /* fuer faelle wie "if bla then" noetig */ printf("\ttest $-1, %%rax\n"); +ifstat: O_IF(O_ID) # 1 # /* fuer faelle wie "if bla then" noetig */ KIDREG2PARM(0); printf("\ttest $-1, %%%s\n", KID_REG(0)); ifstat: O_IF(expr) # 2 # /* iburg beschummeln :/ */ printf("\ttest $-1, %%rax\n"); expr: O_ID # 0 #