From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Sender: lost.goblin@gmail.com Received: by 10.236.153.68 with HTTP; Tue, 21 Jun 2011 04:14:25 -0700 (PDT) In-Reply-To: References: Date: Tue, 21 Jun 2011 13:14:25 +0200 X-Google-Sender-Auth: eVBFyehCouv4shBOC_X6J3obub4 Message-ID: Subject: Re: alternative compilers From: Uriel To: 9front@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Jun 20, 2011 at 11:39 PM, ron minnich wrote: > fyi, you can get nix, but you can't get a real 64-bit compiler for > AMD. Why am I saying this? Isn't amd64 64-bit? Just wondering, does this apply to the 6c in the Go distribution too? In any case, 6g does have real 64bit support, and we should be switching as much code as possible to Go anyway. uriel > Yes, but ... 6c/6l don't produce code that can use 64 bit pointers. > The pointers are always truncated to 32 bits, so you have to use > pointers that sign extend, i.e. > kernel mode pointers have to be ffffffff'80000000 or greater, and user > pointers have to be 7fffffff or less. Yes, I'm well aware that stack > is at 7fff ffffffff but that's actually a special case. > > So, question, anyone interested in making other compilers work on > 9front? If so, which ones? > > you may find this hard to =C2=A0believe. If you do, take this code: > #include > #include > char data =3D 5; > b(void){ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 char *c =3D &data ; > =C2=A0 =C2=A0 =C2=A0 =C2=A0return *c * 5; > } > main() > { > =C2=A0 =C2=A0 =C2=A0 =C2=A0int i; > =C2=A0 =C2=A0 =C2=A0 =C2=A0print("&i %#p\n", &i); > =C2=A0 =C2=A0 =C2=A0 =C2=A0print("Good morning\n"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0print("%d\n", b()); > } > /* 6c b.c; 6l -R0x20000000 b.6; nm -n 6.out */ > > and run this command: > 6l -a -R0x20000000 b.6 > > and looked at the code for b(). Then come back and talk :-) > > ron > p.s. Of course, another option is to modify 6l to do better. That > would be cool too. But at the same time, I'm not so sure how long this > should go on. Maybe we should use this one: http://bellard.org/tcc/ >