diff options
author | Steve Chamberlain <sac@cygnus> | 1995-05-24 21:14:40 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1995-05-24 21:14:40 +0000 |
commit | a43b22b5774d090edbc94a27a8305d4b8306508c (patch) | |
tree | c7883198aef818c2db6ec969aa0b59b0f9646612 | |
parent | 28d0c3ce1963ba684d0492524c1cba6454e1d401 (diff) | |
download | fsf-binutils-gdb-a43b22b5774d090edbc94a27a8305d4b8306508c.zip fsf-binutils-gdb-a43b22b5774d090edbc94a27a8305d4b8306508c.tar.gz fsf-binutils-gdb-a43b22b5774d090edbc94a27a8305d4b8306508c.tar.bz2 |
Wed May 24 14:07:11 1995 Steve Chamberlain <sac@slash.cygnus.com>
* gencode.c (tab): Add bsrf and braf.
-rw-r--r-- | sim/sh/ChangeLog | 22 | ||||
-rw-r--r-- | sim/sh/gencode.c | 26 |
2 files changed, 33 insertions, 15 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 39bc83f..6859d5a 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,25 @@ +Wed May 24 14:07:11 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * gencode.c (tab): Add bsrf and braf. + +Mon Apr 24 15:09:49 1995 Jason Molenda (crash@cygnus.com) + + * configure.in: use ../../bfd/hosts/std-host.h, not + ../bfd/hosts/std-host.h (which doesn't exist). + +Mon Mar 27 10:32:34 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * run.c: parse arguments with getopt(). + +Sun Feb 26 15:27:24 1995 Steve Chamberlain <sac@cygnus.com> + + * configure.in: Use ../../bfd/hosts/std-host.h if specific + host unavailable. + +Mon Jan 23 16:10:58 1995 Torbjorn Granlund <tege@rtl.cygnus.com> + + * interp.c (macw): Sign extend MACH at bit 10 for non-saturating case. + Sun Jan 22 13:55:36 1995 Torbjorn Granlund <tege@rtl.cygnus.com> * gencode.c (op_tab): Make MAC.W call macw, not abort. diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c index e171848..476acc1 100644 --- a/sim/sh/gencode.c +++ b/sim/sh/gencode.c @@ -49,13 +49,10 @@ op tab[] = {"n","","add #<imm>,<REG_N>", "0111nnnni8*1....", "R[n] += SEXT(i);if (i == 0) { UNDEF(n); break; } "}, {"n","mn","add <REG_M>,<REG_N>", "0011nnnnmmmm1100", "R[n] += R[m];"}, - {"n","mn","addc <REG_M>,<REG_N>", "0011nnnnmmmm1110", "ult=R[n]+T;T=ult<T;ult=ult+R[m];T=T|(ult<R[m]);R[n]=ult;"}, + {"n","mn","addc <REG_M>,<REG_N>", "0011nnnnmmmm1110", + "ult=R[n]+T;T=ult<R[n];R[n]=ult+R[m];T|=R[n]<ult;"}, {"n","mn","addv <REG_M>,<REG_N>", "0011nnnnmmmm1111", - "{long ans;", - " ans = R[n] + R[m];", - "T = ((~R[n] & R[m] & ans) | (R[n] & R[m] & ~ans)) >>31;", - "R[n] = ans;}"}, - + "ult = R[n] + R[m]; T = ((~(R[n] ^ R[m]) & (ult ^ R[n])) >> 31); R[n] = ult;"}, {"0","","and #<imm>,R0", "11001001i8*1....", ";R0&=i;"}, {"n","nm","and <REG_M>,<REG_N>", "0010nnnnmmmm1001", " R[n]&=R[m];"}, {"","0","and.b #<imm>,@(R0,GBR)", "11001101i8*1....", ";WBAT(GBR+R0, RBAT(GBR+R0) & i);"}, @@ -99,7 +96,7 @@ op tab[] = {"","n","lds.l @<REG_N>+,MACH", "0100nnnn00000110", "MACH = SEXT(RLAT(R[n]));R[n]+=4;"}, {"","n","lds.l @<REG_N>+,MACL", "0100nnnn00010110", "MACL = RLAT(R[n]);R[n]+=4;"}, {"","n","lds.l @<REG_N>+,PR", "0100nnnn00100110", "PR = RLAT(R[n]);R[n]+=4;;"}, - {"","n","mac.w @<REG_M>+,@<REG_N>+", "0100nnnnmmmm1111", "abort();"}, + {"","n","mac.w @<REG_M>+,@<REG_N>+", "0100nnnnmmmm1111", "macw(R0,memory,n,m);"}, {"n","","mov #<imm>,<REG_N>", "1110nnnni8*1....", "R[n] = SEXT(i);"}, {"n","m","mov <REG_M>,<REG_N>", "0110nnnnmmmm0011", "R[n] = R[m];"}, {"","mn0","mov.b <REG_M>,@(R0,<REG_N>)", "0000nnnnmmmm0100", "WBAT(R[n]+R0, R[m]);"}, @@ -140,8 +137,7 @@ op tab[] = {"","mn","mul.l <REG_M>,<REG_N>","0000nnnnmmmm0111","MACL=((int)R[n])*((int)R[m]);"}, {"","mn","mulu <REG_M>,<REG_N>", "0010nnnnmmmm1110","MACL=((unsigned int)(unsigned short)R[n])*((unsigned int)(unsigned short)R[m]);"}, {"n","m","neg <REG_M>,<REG_N>", "0110nnnnmmmm1011", "R[n] = - R[m];"}, - {"n","m","negc <REG_M>,<REG_N>", "0110nnnnmmmm1010", - "ult=R[m]; R[n]=0-R[m]-T;T=SBIT(R[n])!=SBIT(ult); "}, + {"n","m","negc <REG_M>,<REG_N>", "0110nnnnmmmm1010", "ult=-T;T=ult>0;R[n]=ult-R[m];T|=R[n]>ult;"}, {"","","nop", "0000000000001001", ""}, {"n","m","not <REG_M>,<REG_N>", "0110nnnnmmmm0111", "R[n]=~R[m];"}, {"0","","or #<imm>,R0", "11001011i8*1....", "R0|=i;"}, @@ -187,8 +183,9 @@ op tab[] = {"n","n","sts.l MACL,@-<REG_N>", "0100nnnn00010010", "R[n]-=4;WLAT(R[n],MACL);"}, {"n","n","sts.l PR,@-<REG_N>", "0100nnnn00100010", "R[n]-=4;WLAT(R[n],PR);"}, {"n","nm","sub <REG_M>,<REG_N>", "0011nnnnmmmm1000", "R[n]-=R[m];"}, - {"n","nm","subc <REG_M>,<REG_N>", "0011nnnnmmmm1010", "ult=R[n]-T;T=ult>T;ult=ult-R[m];T=T|(ult>R[m]);R[n]=ult;"}, - {"n","nm","subv <REG_M>,<REG_N>", "0011nnnnmmmm1011", "abort();"}, +{"n","nm","subc <REG_M>,<REG_N>", "0011nnnnmmmm1010", "ult=R[n]-T;T=ult>R[n];R[n]=ult-R[m];T|=R[n]>ult;"}, + {"n","nm","subv <REG_M>,<REG_N>", "0011nnnnmmmm1011", + "ult = R[n] - R[m]; T = (((R[n] ^ R[m]) & (ult ^ R[n])) >> 31); R[n] = ult;"}, {"n","nm","swap.b <REG_M>,<REG_N>", "0110nnnnmmmm1000", "R[n]=((R[m]<<8)&0xff00)|((R[m]>>8)&0x00ff);"}, {"n","nm","swap.w <REG_M>,<REG_N>", "0110nnnnmmmm1001", "R[n]=((R[m]<<16)&0xffff0000)|((R[m]>>16)&0x00ffff);"}, {"","n","tas.b @<REG_N>", "0100nnnn00011011", "ult=RBAT(R[n]);T=ult==0;WBAT(R[n],ult|0x80);"}, @@ -205,11 +202,10 @@ op tab[] = {"n","n","dt <REG_N>", "0100nnnn00010000", "R[n]--; T=R[n] == 0;"}, {"","nm","dmuls.l <REG_M>,<REG_N>", "0011nnnnmmmm1101", "dmul(1,R[n],R[m]);"}, {"","nm","dmulu.l <REG_M>,<REG_N>", "0011nnnnmmmm0101", "dmul(0,R[n],R[m]);"}, - {"","nm","mac.l @<REG_M>+,@<REG_N>+", "0000nnnnmmmm1111", ""}, - + {"","nm","mac.l @<REG_M>+,@<REG_N>+", "0000nnnnmmmm1111", "abort();"}, + {"","n","braf <REG_N>", "0000nnnn00100011", "ult = PC; PC+=R[n]-2;SL(ult+2);"}, + {"","n","bsrf <REG_N>", "0000nnnn00000011", "PR = PC; PC+=R[n]-2;SL(PR+2);"}, #if 0 - {"braf @<REG_N>", "0000nnnn00100011", ""}, - {"bsrf @<REG_N>", "0000nnnn00000011", ""}, {"divs.l <REG_M>,<REG_N>", "0100nnnnmmmm1110", "divl(0,R[n],R[m]);"}, {"divu.l <REG_M>,<REG_N>", "0100nnnnmmmm1101", "divl(0,R[n],R[m]);"}, #endif |