This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFC: Optimization to write_register_bytes()
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: RFC: Optimization to write_register_bytes()
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Thu, 04 May 2000 13:21:07 +0000
- Organization: Cygnus Solutions (a Red Hat company) - Toronto
We can save some time (and fix a problem I have) if we make a simple assumption in
write_register_bytes().
If we assume that the range of registers affected by a write operation
is contiguous, we can break out of the loop as soon as we wrote the
last byte.
Besides optimization, this also solves the problem of it trying to write registers that are actually
aliases, like the Pentium MMX registers (which are just aliases to floating point registers). The
other solution for this is to mark the alias registers as CANNOT_STORE_REGISTER (it works just
fine). But some optimization to write_register_bytes() would be a nice thing (if it is possible).
Is the above assumption (contiguousness) acceptable? Does anyone know of a crazy target where the
register numbers of registers that can be affected by a overlapped write are out of order with
regards to their position in the register file?
--
Fernando Nasser
Cygnus Solutions (a Red Hat company) E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299