aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-h8300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-06-25 16:49:47 +0000
committerNick Clifton <nickc@redhat.com>2000-06-25 16:49:47 +0000
commitf0c56b9036179bdebcb651e2ca11dcdb4210ca18 (patch)
treea413e28c37257b46de0db4d46462eb94f117e2a5 /gas/config/tc-h8300.c
parent05c58a7cfb691ea58be9232ac3ccda1d74415d5d (diff)
downloadbinutils-f0c56b9036179bdebcb651e2ca11dcdb4210ca18.zip
binutils-f0c56b9036179bdebcb651e2ca11dcdb4210ca18.tar.gz
binutils-f0c56b9036179bdebcb651e2ca11dcdb4210ca18.tar.bz2
Assemble ldmac correctly.
Diffstat (limited to 'gas/config/tc-h8300.c')
-rw-r--r--gas/config/tc-h8300.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index ab9f733..399cd0e 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -1026,7 +1026,12 @@ build_bytes (this_try, operand)
if (c & MACREG)
{
- nib = 2 + operand[d].reg;
+ if (operand[0].mode == MACREG)
+ /* stmac has mac[hl] as the first operand. */
+ nib = 2 + operand[0].reg;
+ else
+ /* ldmac has mac[hl] as the second operand. */
+ nib = 2 + operand[1].reg;
}
}
nibble_count++;