This is the mail archive of the gcc-bugs@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: gcc using clobbered register as input with inline assembly


** Reply to message from "Zack Weinberg" <zackw@stanford.edu> on Mon, 26 Mar
2001 10:20:21 -0800


> inline void
> BeginCpuTick(u64 *const pTime)
> {
>    register u64 xtime;
>    asm volatile ("rdtsc" : "=A" (xtime));
>    *pTime = xtime;
> }

Could I replace the above with:

inline void
BeginCpuTick(u64 *const pTime)
{
   register u64 xtime;
   asm volatile ("rdtsc" : "=A" (*ptime));
}


-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please direct the reply to the mailing list only.  Don't send another copy to me.


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