This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH for H8300 : Assembler bug in bit manipulation instructions
- From: "Anil Paranjape" <AnilP1 at KPITCummins dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Thu, 8 Jan 2004 16:26:55 +0530
- Subject: PATCH for H8300 : Assembler bug in bit manipulation instructions
Hi all,
I have found a bug in assembler for h8300h, h8300hn and h8300 targets.
Assembler should give error for bit manipulation insns like band, bclr, biand,
bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor with @aa:16 and @aa:32.
Example,
bset #xx:3,@aa:32 or bset #xx:3,@aa:16
band #xx:3,@aa:32 or band #xx:3,@aa:16
Above type of insns are only valid in case of H8S.
Please find following patch for binutils-031228 which fixes this bug.
Assembler will give error for above insns in case of h8300h, h8300hn and h8300
after patch.
ChangeLog: /include/opcode
2004-01-08 Anil Paranjpe <anilp1@KPITCummins.com>
* h8300.h : Bit manipulation instruction with @aa:16 and @aa:32 are valid only
in case of H8S.
--- binutils-031228/include/opcode/h8300.h.old Thu Jan 8 14:03:18 2004
+++ binutils-031228/include/opcode/h8300.h Thu Jan 8 13:12:22 2004
@@ -900,8 +900,8 @@ struct h8_opcode
{code, AV_H8, 2, name, {{imm, RD8, E}}, {{op00, op01, imm, RD8, E}}}, \
{code, AV_H8, 6, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, 0, E}}}, \
{code, AV_H8, 6, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, 0, E}}}, \
- {code, AV_H8H, 6, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | MEMRELAX | ABS16LIST , op00, op01, imm, op4, E}}}, \
- {code, AV_H8H, 6, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | MEMRELAX | ABS32LIST , op00, op01, imm, op4, E}}}
+ {code, AV_H8S, 6, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | MEMRELAX | ABS16LIST , op00, op01, imm, op4, E}}}, \
+ {code, AV_H8S, 6, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | MEMRELAX | ABS32LIST , op00, op01, imm, op4, E}}}
#define BITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
{code, AV_H8SX, 0, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, op4, E}}}, \
Regards,
Anil Paranjpe