w64 and call clobbered SSE regs

Jan Hubicka hubicka@ucw.cz
Mon Jan 5 03:05:00 GMT 2009


> Hello!
> 
> >    if (ix86_cfun_abi () == MS_ABI && function_call_abi == SYSV_ABI)
> >      {
> >        rtx clobber1 = gen_rtx_CLOBBER (DImode, gen_rtx_REG (DImode, 
> >        SI_REG));
> >        rtx clobber2 = gen_rtx_CLOBBER (DImode, gen_rtx_REG (DImode, 
> >        DI_REG));
> >+       rtx sseclobber1 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >27));
> >+       rtx sseclobber2 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >28));
> >+       rtx sseclobber3 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >45));
> >+       rtx sseclobber4 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >46));
> >+       rtx sseclobber5 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >47));
> >+       rtx sseclobber6 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >48));
> >+       rtx sseclobber7 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >49));
> >+       rtx sseclobber8 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >50));
> >+       rtx sseclobber9 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >51));
> >+       rtx sseclobber10 = gen_rtx_CLOBBER (TImode, gen_rtx_REG (TImode, 
> >52));
> >        rtx unspec = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, const0_rtx),
> >        				   UNSPEC_MS_TO_SYSV_CALL);
> >+ 
> >        call = gen_rtx_PARALLEL (VOIDmode,
> >!       			       gen_rtvec (14, call, unspec, 
> >sseclobber1,
> >! 			       		  sseclobber2, sseclobber3,
> >! 			       		  sseclobber4, sseclobber5,
> >! 			       		  sseclobber6, sseclobber7,
> >! 			       		  sseclobber8, sseclobber9,
> >! 					  sseclobber10, clobber1,
> >! 					  clobber2));
> >      }
> >  
> 
> Perhaps you should use rtvec_alloc and a loop to assign register 
> clobbers with regnums taken from some array to RTVEC_ELT here?

We can do that too, but there are three different intervals and
different modes and we have to verbatimly copy the registers in 
.md file so I am not sure it would be any more readable....

Honza
> 
> Uros.



More information about the Gcc-patches mailing list