This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: RL78 gas: Fix encoding of addw/subw instructions
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Wed, 04 Feb 2015 12:00:37 +0000
- Subject: Commit: RL78 gas: Fix encoding of addw/subw instructions
- Authentication-results: sourceware.org; auth=none
Hi Guys,
I am checking in the patch below to fix a bug in the encoding of the
addw and subw instructions for the RL78, when HL-direct addressing was
used. The bug was that an extra zero byte was being encoded at the
end of the instruction.
Cheers
Nick
gas/ChangeLog
2015-02-04 Nick Clifton <nickc@redhat.com>
* config/rl78-parse.y (addsubw): Fix encoding of [HL] variant of
these instructions.
diff --git a/gas/config/rl78-parse.y b/gas/config/rl78-parse.y
index d1cf71c..a381973 100644
--- a/gas/config/rl78-parse.y
+++ b/gas/config/rl78-parse.y
@@ -259,7 +259,7 @@ statement :
{ B2 (0x61, 0x09|$1); O1 ($8); }
| addsubw AX ',' opt_es '[' HL ']'
- { B4 (0x61, 0x09|$1, 0, 0); }
+ { B3 (0x61, 0x09|$1, 0); }
| addsubw SP ',' '#' EXPR
{ B1 ($1 ? 0x20 : 0x10); O1 ($5);