]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
rs_fill_nop and md_generate_nops
authorAlan Modra <amodra@gmail.com>
Mon, 19 May 2025 06:37:20 +0000 (16:07 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 22 May 2025 22:56:08 +0000 (08:26 +0930)
commit689f3edfb8fb7fbe5432bfdba9f79347a6649dbf
treeb6cd920e7dd050f6992a1c6d295f38f0011a7e22
parent0c951ab895a5b3977dad6718e6571774db1237c6
rs_fill_nop and md_generate_nops

Make rs_fill_nop behave like rs_fill in using a repeat count
(fr_offset) to emit fr_var length repeated nop patterns.  Besides
being more elegant, this reduces memory required for large .nops
directives.

* as.h (rs_fill_nop): Update comment.
* config/tc-i386.c (i386_generate_nops): Handle rs_fill_nop as
for rs_align_code.
* config/tc-i386.h (MAX_MEM_FOR_RS_SPACE_NOP): Define.
* listing.c (calc_hex): Handle rs_fill_nop as for rs_fill.
* read.c (MAX_MEM_FOR_RS_SPACE_NOP): Define.
(s_nops): Use MAX_MEM_FOR_RS_SPACE_NOP setting up frag.
* write.c (write_contents): Call md_generate_nops for rs_fill_nop
before the fr_fix part is written, so that rs_fill_nop can be
handled as for rs_fill.
gas/as.h
gas/config/tc-i386.c
gas/config/tc-i386.h
gas/listing.c
gas/read.c
gas/write.c