]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/tdep] Refactor amd64_get_unused_input_int_reg, part 3
authorTom de Vries <tdevries@suse.de>
Fri, 7 Mar 2025 08:25:33 +0000 (09:25 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 7 Mar 2025 08:25:33 +0000 (09:25 +0100)
commitcdde99c6d5fdef336bfe3b5472c0db329eaa39a7
tree5d1a1086990b234069a6c1d34a60e1b675ab3d0f
parent08850487148d13d0250d863f897d1def380882a3
[gdb/tdep] Refactor amd64_get_unused_input_int_reg, part 3

While reading amd64_get_unused_input_int_reg, I noticed that it avoids picking
RSP, which has to do with how the result of the only call to it is going to be
used.

Likewise for picking a register in the RAX ... RDI range.

Fix this by:
- adding an allowed_regs_mask parameter to amd64_get_unused_input_int_reg, and
- properly documenting the value of the corresponding argument in fixup_riprel.

No functional changes.

Tested on x86_64-linux.
gdb/amd64-tdep.c