This is the mail archive of the gcc@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: How to mark a builtin function volatile?


On Fri, Jul 18, 2003 at 05:49:56PM -0400, Andrew Pinski wrote:
> >I think the problem is gcc thinks __getReg (_IA64_REG_AR_ITC) will
> >never change. How can I mark a builtin function volatile?
> 
> Look at how the rs6000 backend implements __builtin_altivec_mtvscr 
> basically you mark the unspec volatile:
> 
> (define_insn "altivec_mtvscr"
>   [(set (reg:SI 110)
>         (unspec_volatile:SI
>          [(match_operand:V4SI 0 "register_operand" "v")] 186))]
>   "TARGET_ALTIVEC"
>   "mtvscr %0"
>   [(set_attr "type" "vecsimple")])
> 

Thanks. It works.


H.J.


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