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]

Re: [2.95.3] fix for arm-linux CLEAR_INSN_CACHE


On Sun, Dec 31, 2000 at 03:58:52PM +0000, Philip Blundell wrote:
>    register unsigned long _beg __asm ("a1") = (unsigned long) (BEG);	\
>    register unsigned long _end __asm ("a2") = (unsigned long) (END);	\
>    register unsigned long _flg __asm ("a3") = 0;			\
> -  __asm __volatile ("swi 0x9f0002");					\
> +  __asm __volatile ("swi 0x9f0002		@ sys_cacheflush"	\
> +		    : /* no outputs */					\
> +		    : "r" (_beg), "r" (_end), "r" (_flg)		\
> +		    : "a1");						\

This isn't correct.  You're clobbering an input.  This should
be written with _beg being an output instead.


r~

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