Mercurial > hg > CbC > old > device
diff mc-code-ia32.c @ 436:d92786033042 loprtc-div
loprtc
author | kono |
---|---|
date | Sun, 14 Nov 2004 15:41:05 +0900 |
parents | d3e6359f8501 |
children | 626d705471d5 |
line wrap: on
line diff
--- a/mc-code-ia32.c Thu Nov 11 00:39:37 2004 +0900 +++ b/mc-code-ia32.c Sun Nov 14 15:41:05 2004 +0900 @@ -2923,6 +2923,11 @@ case LRSHIFT: case LURSHIFT: return (0<=l&&l<=63); + case LMUL: + case LUMUL: + case LUDIV: + /* case LDIV: */ + return -0x10000000LL<l&&l<0x10000000LL && ilog(l); case LADD: case LSUB: case LBAND: @@ -2952,6 +2957,8 @@ opl = 0; switch(op) { + case LMUL: case LUMUL: + vl=il=ilog(il); case LLSHIFT: case LULSHIFT: if (il==0) return; @@ -2983,6 +2990,8 @@ printf("\tshrdl $%d,%s,%s\n",(int)il,l_edx(reg),l_eax(reg)); printf("\tsarl $%d,%s\n",(int)il,l_edx(reg)); return; + case LUDIV: + il=ilog(il); case LURSHIFT: if (il==0) return; else if (il==32) {