This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: increase call_saved_regs[] in caller-save.c


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/02/11 21:21, DJ Delorie wrote:
> I found this with the rl78-elf port...  can't guarantee it's not
> the rl78 port itself, but the code does have two loops that fill
> the array.
> 
> * caller-save.c (setup_save_areas): Increase call_saved_regs[] size
> to avoid writing beyond the end of the array.  There are two loops
> that iterate over hard regs and potentially add to this array, so
> it must hold a max of 2x the hard regs.
But doesn't that imply that a hard register is getting inserted into
the array more than once.  While I don't see explicit code to prevent
this, I'm having a hard time seeing how that can actually happen.

Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOsgtaAAoJEBRtltQi2kC7WkMH/219vPDA8LeuVS5AQe3auR4N
OAI2Ect4yVVVJEUdeW2IfxzE8AnOiLrEAEWuEfUp0YY9/eTqKDorXis70obdyX3Z
9Jdsap06CAGBYuoRaVDYbBt08Lp9RXVOzHhzx8nmhD13Kco9P+IYaqkCS+l+faKJ
pb/lNXCj+85NdnhpEUraBXY54n1RG8JIFNIhN/grtQDIKd1N25aDra3uGouEuqF7
52+sHTrWGdSreBz21xaAkQEw8Pfn2qUVNxkH1M54/m3tBdLDTiHYAzzxC+DDZWqY
q/22Y002Mq5+jyDNt8drDbwOz+g6HLC2Dw3fbX1LOhIb7rpFMH4jDA+ae3KqC/M=
=aLcP
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]