Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 1 Mar 2016 07:52:33 +0000
From: Jaydeep Patil <Jaydeep.Patil@...tec.com>
To: "Rich Felker (dalias@...c.org)" <dalias@...c.org>
CC: Mahesh Bodapati <Mahesh.Bodapati@...tec.com>, "musl@...ts.openwall.com"
	<musl@...ts.openwall.com>, "nsz@...t70.net" <nsz@...t70.net>
Subject: RE: MUSL MIPS64 N64 port

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@...ifal.cx] On Behalf Of Rich Felker (dalias@...c.org)
Sent: 01 March 2016 AM 08:05
To: Jaydeep Patil
Cc: Mahesh Bodapati; musl@...ts.openwall.com; nsz@...t70.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

Download attachment "mipsn64port_v2.patch" of type "application/octet-stream" (72768 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.