This is the mail archive of the
mailing list for the crossgcc project.
Bug in GNU-AS for H8/300 ?
- To: firstname.lastname@example.org
- Subject: Bug in GNU-AS for H8/300 ?
- From: "Hansjuergen Dreuth" <email@example.com>
- Date: Sun, 8 Aug 1999 15:35:32 +0200
- Reply-To: firstname.lastname@example.org
I encountered the following problem when using the GNU assembler
configured for the Hitachi H8/300H directly without GCC so:
Bit manipulation instructions which were supposed to work on the
internal registers (at the upper 8-bit adressable part of the memory)
produced incorrect binary code:
An assembler line "bset #0x1,@0xffffec" produced:
6a 38 00 ff ff ec 70 10 bset #0x1,@0xffffec:32, which is not correct.
The assembler appearently expected the assembler code line to be
"bset #0x1,@0xffffec:8" which correctly produced:
7f ec 70 10 bset #0x1,@0xec:8
So the functionality was available, but instead of complaining about
the format of the assembler line (which is ok for an IAR assembler)
wrong code was produced.
When using conditional branches, both distances 8 and 16 bit
relative to the program counter are available. If the distance is not
given explicitly 8 bit are assumed.
If a 8 bit distance is not enough the assembler correctly issues an
To mine opinion this should also happen in the case of the bit
manipulation instructions to avoid strange surprises.
Did anybody else have problems with adressing modes of the
H8/300H instructions ?
Dr. Hansjuergen Dreuth
Simplify Technologies GmbH, Tulpenweg 2, D-35630 Ehringshausen, Germany
Tel.: (+49) (0)6443-811712, FAX: (+49) (0)6443-811716
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.