-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/30/11 10:38, Jakub Jelinek wrote: > Hi! > > As the following testcase shows, when the prologue computes > crtl->drap_reg (when stack_realign_drap) and something e.g. in the > first bb uses that register, we can incorrectly shrink-wrap it and > use uninitialized %ecx/%r10 etc. register. > > Fixed by making the drap regno also added to SET_UP_BY_PROLOGUE > regset. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2011-11-30 Jakub Jelinek <ja...@redhat.com> > > PR target/50725 * function.c (thread_prologue_and_epilogue_insns): > If stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE regset. > > * gcc.target/i386/pr50725.c: New test. drap_reg is always a hard reg, right? So presumably the test in dwarf2out:
> && REGNO (crtl->drap_reg) < FIRST_PSEUDO_REGISTER Really should be testing that it's != INVALID_REGNUM? OK for trunk. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJO1paVAAoJEBRtltQi2kC7M9YH/2mlHZnnboWRKFgSbKjKXhcw fAdUA41xn+NlWo5aywHH6q8z61hn14Fhwu3DcsL57/7506iFq65Bjkv6u+t0W/Iv 27lelr0twPaBGnPq6f3gYV6SETjFdFOHdh0ymFeoIQRS+S3XB3NUMVVrDG022CnO 7up6o3cIATVxmLXbm8xBSJOwHwLHHR3UMnYfPLrQ/pz43rLLdaCr3LjCFfM8vrRN 6XGvrC1Z5OIVzfdReOiCkLa37hjVBwlParIVM8GQjW+eFU7PXkSDY45OHx0jcujS stvjX69Xr7WLJKzdL5lvHexqsaIDYxrDeik5vIWhY0sWzHsKjJUw0BbYZKQtksE= =5Vqz -----END PGP SIGNATURE-----