projects
/
uebersetzerbau-ss10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6583386
)
ppc: eq (codea_abgabe_ak.0)
author
Bernhard Urban
<lewurm@gmail.com>
Tue, 8 Jun 2010 14:02:15 +0000
(16:02 +0200)
committer
Bernhard Urban
<lewurm@gmail.com>
Wed, 9 Jun 2010 18:35:49 +0000
(20:35 +0200)
gesamt_ppc/code.bfe
patch
|
blob
|
history
diff --git
a/gesamt_ppc/code.bfe
b/gesamt_ppc/code.bfe
index bee2d8623b16d43a3914f9023d6ce7e477fef949..e62637603b1a20796398e77a4ada1d113851c545 100644
(file)
--- a/
gesamt_ppc/code.bfe
+++ b/
gesamt_ppc/code.bfe
@@
-161,11
+161,16
@@
void gen_eqless(struct treenode *bnode, char *op, short e0, short e1, short deep
printf("\tand $1, %%%s\n", BN_REG);
#else
if(e0) { KIDREG2PARM(0); } else { moveimm(KID_VAL(0), BN_REG); }
printf("\tand $1, %%%s\n", BN_REG);
#else
if(e0) { KIDREG2PARM(0); } else { moveimm(KID_VAL(0), BN_REG); }
- if(e1) { KIDREG2PARM(1); } else { moveimm(KID_VAL(1), KID_REG(1)); }
- if(strcmp(op,"e")==0 && KID_VAL(1) == 0) {
+ if(e1) { KIDREG2PARM(1); } else {
if(KID_VAL(1) != 0)
moveimm(KID_VAL(1), KID_REG(1)); }
+ if(strcmp(op,"e")==0 && KID_VAL(1) == 0
&& KID_VAL(0) == 0
) {
/* not */
printf("\tcntlzw %s,%s\n", KID_REG(0), KID_REG(0));
printf("\tsrwi %s,%s,5\n", BN_REG, KID_REG(0));
/* not */
printf("\tcntlzw %s,%s\n", KID_REG(0), KID_REG(0));
printf("\tsrwi %s,%s,5\n", BN_REG, KID_REG(0));
+ } else if(strcmp(op, "e")==0) {
+ /* eq */
+ printf("\txor %s,%s,%s\n", BN_REG, KID_REG(0), KID_REG(1));
+ printf("\tcntlzw %s,%s\n", BN_REG, BN_REG);
+ printf("\tsrwi %s,%s,5\n", BN_REG, BN_REG);
} else if(strcmp(op, "l")==0 || strcmp(op, "g")==0) {
/* less */
printf("\tcmpw 7,%s,%s\n", KID_REG(1), KID_REG(0));
} else if(strcmp(op, "l")==0 || strcmp(op, "g")==0) {
/* less */
printf("\tcmpw 7,%s,%s\n", KID_REG(1), KID_REG(0));