This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: [Patch] GETSP for MIPS


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)
___________________________________________________________________

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