[PATCH] GAS: Add WORKING_DOT_WORD to tc-pdp11.h

Jan Beulich jbeulich@suse.com
Mon Sep 7 08:32:52 GMT 2026


On 07.09.2026 08:59, Jan Brittenson wrote:
> Without WORKING_DOT_WORD for pdp11 a .WORD with a forward reference
> will sometimes produce bogus 8-byte sequences.  Since it's strictly
> 16-bit, it should never need the workaround this #define turns off.

This is too little of an explanation for suddenly, after many years,
disabling a workaround. (It's not even clear to me whether
WORKING_DOT_WORD is purely a gas-internal thing, or providing some
level of "compatibility" with native assemblers. In the former case
I'm having a hard time seeing why it would still exist.)

> --- a/gas/config/tc-pdp11.h
> +++ b/gas/config/tc-pdp11.h
> @@ -24,6 +24,8 @@
>  #define TARGET_ARCH bfd_arch_pdp11
>  #define TARGET_BYTES_BIG_ENDIAN 0
>  
> +#define WORKING_DOT_WORD
> +
>  #define LEX_TILDE (LEX_BEGIN_NAME | LEX_NAME)
>  
>  #define md_operand(x)

There's more to this, I think: md_shortopts[] needs to have K added,
for the option to not suddenly getting rejected. And items related to
WORKING_DOT_WORD not being set (internals.texi has:
@itemx md_short_jump_size
@itemx md_long_jump_size
@itemx md_create_short_jump
@itemx md_create_long_jump
@itemx TC_CHECK_ADJUSTED_BROKEN_DOT_WORD
) also want pruning then, for the overall result not to be confusing.

Jan


More information about the Binutils mailing list