9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: 9front@googlegroups.com
Subject: alternative compilers
Date: Mon, 20 Jun 2011 14:39:18 -0700	[thread overview]
Message-ID: <BANLkTinmoxBpnbSqYD5SY5mO4Y+do45O+g@mail.gmail.com> (raw)

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?

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  believe. If you do, take this code:
#include <u.h>
#include <libc.h>
char data = 5;
b(void){
	 char *c = &data ;
	return *c * 5;
}
main()
{
	int i;
	print("&i %#p\n", &i);
	print("Good morning\n");
	print("%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/

             reply	other threads:[~2011-06-20 21:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 21:39 ron minnich [this message]
2011-06-20 21:49 ` Julius Schmidt
2011-06-20 21:49   ` ron minnich
2011-06-20 21:52     ` Julius Schmidt
2011-06-21 10:01   ` suharik
2011-06-21 10:31     ` Noah Evans
2011-06-21 11:13       ` Uriel
2011-06-21 11:16         ` Noah Evans
2011-06-21 11:23           ` suharik
2011-06-21 13:56           ` Julius Schmidt
2011-06-21 14:36             ` Noah Evans
2011-06-21 14:47               ` Julius Schmidt
2011-06-21 14:50                 ` Noah Evans
2011-06-21 22:21                   ` Iruatã Souza
2011-06-22  8:50                     ` Noah Evans
2011-06-22 10:04                       ` Julius Schmidt
2011-06-22 10:49                         ` Noah Evans
2011-06-22 11:06                           ` Julius Schmidt
2011-06-22 11:10                             ` Uriel
2011-06-22 11:19                               ` Julius Schmidt
2011-06-22 11:15                             ` Noah Evans
2011-06-22 11:29                               ` Uriel
2011-06-22 11:06                           ` Uriel
2011-06-22 12:10                           ` Iruatã Souza
2011-06-22 12:24                             ` Uriel
2011-06-22 12:41                               ` Julius Schmidt
2011-06-22 12:52                                 ` Uriel
2011-06-22 14:54                                   ` Stanley Lieber
2011-06-22 14:56                                     ` John Floren
2011-06-22 14:57                                       ` Stanley Lieber
2011-06-22 15:24                           ` Kurt H Maier
2011-06-22 16:47                             ` Stanley Lieber
2011-06-27  0:34                             ` cinap_lenrek
2011-06-27  0:42                               ` Kurt H Maier
2011-06-22 11:01                         ` Uriel
2011-06-21 14:53                 ` Uriel
2011-06-21 11:12     ` Uriel
2011-06-21 14:05     ` Jacob Todd
2011-06-21  4:08 ` Jens Staal
2011-06-21 13:48   ` Iruatã Souza
2011-06-21 13:58     ` Jens Staal
2011-06-21 14:16   ` Uriel
2011-06-21 11:14 ` Uriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinmoxBpnbSqYD5SY5mO4Y+do45O+g@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=9front@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).