diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1993-07-16 20:26:05 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1993-07-16 20:26:05 +0000 |
commit | f853f4ca537eaa00f98caf6139229b7aff25c7a1 (patch) | |
tree | f44b891dc62fe80636ca2fc282c809242fcc4af5 | |
parent | 9d8c0ead6bc7854b0a635f97d546c7e02b394c2b (diff) | |
download | gdb-f853f4ca537eaa00f98caf6139229b7aff25c7a1.zip gdb-f853f4ca537eaa00f98caf6139229b7aff25c7a1.tar.gz gdb-f853f4ca537eaa00f98caf6139229b7aff25c7a1.tar.bz2 |
Fix bit instructions (was setting destination reg and not carry).
-rw-r--r-- | sim/h8300/compile.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index e98c25b..95264e9 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -1134,20 +1134,20 @@ case O(name, SL):{ int t;int hm = 0x80000000; rd = GET_L_REG(code->src.reg);how; op;\ if(s) store(&code->dst,ea); goto next;\ } - OBITOP(O_BNOT,1,1,ea ^= m); - OBITOP(O_BTST,1,0,nz = ea & m); + OBITOP(O_BNOT,1,1,ea ^= m); /*FIXME: m can come from reg*/ + OBITOP(O_BTST,1,0,nz = ea & m); /*FIXME: m can come from reg*/ OBITOP(O_BLD,1,0, c = ea & m); OBITOP(O_BILD,1,0, c = !(ea & m)); OBITOP(O_BST,1,1, ea &= ~m; if (C) ea |=m); OBITOP(O_BIST,1,1, ea &= ~m; if (!C) ea |=m); - OBITOP(O_BAND,1,1, b = (ea & m) && C; ea &= ~m; if (b) ea |=m); - OBITOP(O_BIAND,1,1, b = (ea & m) && C; ea &= ~m; if (!b) ea |=m); - OBITOP(O_BOR,1,1, b = (ea & m) || C; ea &= ~m; if (b) ea |=m); - OBITOP(O_BIOR,1,1, b = (ea & m) || C; ea &= ~m; if (!b) ea |=m); - OBITOP(O_BXOR,1,1, b = (ea & m) != C; ea &= ~m; if (b) ea |=m); - OBITOP(O_BIXOR,1,1, b = (ea & m) != C; ea &= ~m; if (!b) ea |=m); - OBITOP(O_BCLR,1,1, ea &= ~m; ); - OBITOP(O_BSET,1,1, ea |= m; ); + OBITOP(O_BAND,1,0, c = (ea & m) && C); + OBITOP(O_BIAND,1,0, c = !(ea & m) && C); + OBITOP(O_BOR,1,0, c = (ea & m) || C); + OBITOP(O_BIOR,1,0, c = !(ea & m) || C); + OBITOP(O_BXOR,1,0, c = (ea & m) != C); + OBITOP(O_BIXOR,1,0, c = !(ea & m) != C); + OBITOP(O_BCLR,1,1, ea &= ~m); /*FIXME: m can come from reg*/ + OBITOP(O_BSET,1,1, ea |= m); /*FIXME: m can come from reg*/ #define MOP(bsize, signed) \ |