some more optimizations

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@179 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-07-01 14:59:15 +00:00
parent b637c56aad
commit 3a5e6cf847
6 changed files with 66 additions and 52 deletions

View file

@ -113,15 +113,17 @@ int OpAddq(int op)
{
int lsr=9-shift;
if (lsr>=0) ot(" mov r2,r8,lsr #%d ;@ Get quick value\n", lsr);
else ot(" mov r2,r8,lsl #%d ;@ Get quick value\n",-lsr);
ot(" and r2,r8,#0x0e00 ;@ Get quick value\n");
if (lsr>=0) sprintf(count,"r2,lsr #%d", lsr);
else sprintf(count,"r2,lsl #%d", -lsr);
ot(" and r2,r2,#0x%.4x\n",7<<shift);
ot("\n");
strcpy(count,"r2");
}
if (num==8) sprintf(count,"#0x%.4x",8<<shift);
else
{
sprintf(count,"#0x%.4x",8<<shift);
}
if (type==0) ot(" adds r1,r0,%s\n",count);
if (type==1) ot(" subs r1,r0,%s\n",count);