On Mon, Sep 14, 2020 at 10:05 AM Jakub Jelinek <ja...@redhat.com> wrote: > > On Mon, Sep 14, 2020 at 08:57:18AM -0700, H.J. Lu via Gcc-patches wrote: > > Something like this for GCC 8 and 9. > > Guess my preference would be to do this everywhere and then let's discuss if
The same patch also works on master branch. > we change the warning into error there or keep it being deprecated. > > Though, let's see what others want to say about this. > > > Add sp_is_clobbered_by_asm to rtl_data to inform backends that the stack > > pointer is clobbered by asm statement. > > > > gcc/ > > > > PR target/97032 > > * cfgexpand.c (asm_clobber_reg_kind): Set sp_is_clobbered_by_asm > > to true if the stack pointer is clobbered by asm statement. > > * emit-rtl.h (rtl_data): Add sp_is_clobbered_by_asm. > > * config/i386/i386.c (ix86_get_drap_rtx): Set need_drap to true > > if the stack pointer is clobbered by asm statement. > > > > gcc/testsuite/ > > > > PR target/97032 > > * gcc.target/i386/pr97032.c: New test. > > Jakub > -- H.J.