Hi Rich, Thanks for the comments. Please refer to https://github.com/JaydeepIMG/musl-1 for MIPS64 N64 port. I have created mips64port_v2 branch (patch attached) to address the review comments. Thanks, Jaydeep -----Original Message----- From: Rich Felker [mailto:dalias@aerifal.cx] On Behalf Of Rich Felker (dalias@libc.org) Sent: 01 March 2016 AM 08:05 To: Jaydeep Patil Cc: Mahesh Bodapati; musl@lists.openwall.com; nsz@port70.net Subject: Re: [musl] MUSL MIPS64 N64 port Found functional bugs while building: On Fri, Feb 26, 2016 at 07:13:44AM +0000, Jaydeep Patil wrote: > +#define a_ll_p a_ll_p > +static inline int a_ll_p(volatile long *p) { > + int v; > + __asm__ __volatile__ ( > + "lld %0, %1" > + : "=r"(v) : "m"(*p)); > + return v; > +} This is wrong and not working: ./src/internal/atomic.h:93:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion] a_ll_p must return the loaded value which has pointer type, not int. Also got: src/thread/pthread_create.c:212:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] stack = (void *)(attr._a_stackaddr & -16); This is because your pthread types are wrong; you're using the 32-bit arch ones: > +TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned > +__s[9]; } __u; } pthread_attr_t; TYPEDEF struct { union { int __i[6]; > +volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } > +pthread_mutex_t; TYPEDEF struct { union { int __i[6]; volatile int > +__vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; TYPEDEF > +struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } > +__u; } pthread_cond_t; TYPEDEF struct { union { int __i[12]; volatile > +int __vi[12]; void *__p[12]; } __u; } cnd_t; TYPEDEF struct { union { > +int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } > +pthread_rwlock_t; TYPEDEF struct { union { int __i[5]; volatile int > +__vi[5]; void *__p[5]; } __u; } pthread_barrier_t; These should be copied from aarch64 or x86_64 (should be same) instead. Nothing else showed up just from warnings but I'll take a second look at the source and see if anything else related looks wrong. Rich