sign extension break sleb128 tests on m68k

Nick Clifton nickc@redhat.com
Tue Mar 1 11:41:00 GMT 2005


Hi Alan,

> Does anyone know
> why this patch was applied?
> 
> Thu Apr 13 14:34:36 1995  Torbjorn Granlund  <tege@adder.cygnus.com>
> 
> 	* config/tc-m68k.c (m68k_init_after_args): Test for m68360.
> 	(md_parse_option): Likewise.
> 	(md_show_usage): Mention m68360.
> 	* config/tc-m68k.h (TARGET_WORD_SIZE): Define.
> 	(TARGET_ARCH): Define.
> 
> 	* expr.c (integer_constant): If TARGET_WORD_SIZE is defined,
> 	sign-extend appropriately.
> 
> Presumably it too was concerned with building 32-bit m68k binutils with
> a 64-bit bfd, but unfortunately no testcase was added.  So I don't know
> whether the hack is still needed.  Failing any good reason being found,
> I propose the following:
> 
> 	* expr.c (integer_constant): Remove TARGET_WORD_SIZE hack.
> 	* config/tc-m68k.h (TARGET_WORD_SIZE): Delete.

Agreed.  I suspect that Torbjorn's patch was an attempt at handling 
sign-extension in a target specific way when in fact it should have been 
generic.  With the current code handling this sort of thing quite well I 
doubt very much if his patch is still needed.

Cheers
   Nick




More information about the Binutils mailing list