[Patch] GETSP for MIPS
Jakub Jelinek
jakub@redhat.com
Wed Feb 2 22:56:00 GMT 2000
On Wed, Feb 02, 2000 at 11:15:55AM +0100, Andreas Schwab wrote:
> Andreas Jaeger <aj@suse.de> writes:
>
> |> I got on MIPS the following warning:
> |> memprof.c:146: warning: implicit declaration of function `GETSP'
> |>
> |> We should check if we really have a definition for GETSP. I'm
> |> appending a patch.
>
> The macro does not belong here, it should be moved to a sysdep header.
sparc/sparc32/sparcv9 GETTIME could be:
#define GETTIME(low,high) \
{ \
register unsigned int lowtick asm ("g1"); \
asm ("rd %%tick, %%g1; srlx %%g1, 32, %1" \
: "=r" (lowtick), "=r" (high)); \
low = lowtick; \
}
sparc/sparc64 GETTIME:
#define GETTIME(low,high) \
{ \
uint64_t tickreg; \
asm ("rd %%tick, %0" : "=r" (tickreg)); \
low = tickreg & 0xffffffff; \
high = tickreg >> 32; \
}
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.41 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________
More information about the Libc-hacker
mailing list