This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in GNU-AS for H8/300 ?


Hi !

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 
error message.
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 ?

Hansjuergen

__________________________________________________________________________
Dr. Hansjuergen Dreuth
Simplify Technologies GmbH, Tulpenweg 2, D-35630 Ehringshausen, Germany
Tel.: (+49) (0)6443-811712, FAX: (+49) (0)6443-811716
Email: hansjuergen.dreuth@simplify-technologies.de
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]