Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jun 2011 08:38:38 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        toolchain@freebsd.org
Subject:   Re: llvm-ia64 is off the ground...
Message-ID:  <5A6AC098-FB0D-474A-B92D-190121CA400F@xcllnt.net>
In-Reply-To: <20110610072512.GA35144@freebsd.org>
References:  <DE479A12-24B5-4947-90CF-702AA234BE39@xcllnt.net> <20110610072512.GA35144@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jun 10, 2011, at 12:25 AM, Roman Divacky wrote:

> On Thu, Jun 09, 2011 at 07:20:04PM -0700, Marcel Moolenaar wrote:
>> [CC toolchain@ -- more eyes is probably better]
>>=20
>> Hi Roman,
>>=20
>> I created the projects branch and committed a skeletal target
>> for ia64 that's based on MSP430. I also discovered that CLang
>> needs some target info, so I added that too.
>>=20
>> The branch is:
>> 	projects/llvm-ia64
>=20
> wow :) This is fantastic.
>=20
>> When you have time, feel free to go over it and critique what
>> I've done.
>=20
> I sure will do! How do you build that? Do I have to build whole
> freebsd world or is there some easier way? Will "make" in =
usr.bin/clang
> work?

On my FreeBSD 8 I first made lib/clang/libllvmsupport. After
that I could make usr.bin/clang/tblgen and install it. Then
it's easy: build lib/clang followed by usr.bin/clang. Install
from usr.bin/clang

Unfortunately, the FreeBSD build doesn't give me goodies like
llc or bugpoint so there may be value in adding that to the
FreeBSD build as optional or developer-only build targets...

Thoughts anyone?

>=20
>> My next steps are simple: Fix whatever blocks me from making
>> progress:
>>=20
>> ns1% cat ~/incr.c=20
>> int
>> incr(int x)
>> {
>>  return (x + 1);
>> }
>> ns1% clang -ccc-host-triple ia64 -S ~/incr.c=20
>> 'generic' is not a recognized processor for this target (ignoring =
processor)
>=20
> You can ignore this for now I think.

I'll probably implement something simple like the merced and
mckinley subtargets and default to mckinley. Later, when it's
time to look at optimizations, is when this becomes important.

>=20
>> error: unable to interface with target machine
>> 1 error generated.
>=20
> You have to create and register IA64InstPrinter. Check =
MSP430/InstPrinter/*
> and and MSP430AsmPrinter.cpp:createMSP430MCInstPrinter().

Ah, ok...

BTW: these little tips save me hours of debugging.

> I'll take some detailed looked in the evening!

Thanks. Anytime, no rush...

--=20
Marcel Moolenaar
marcel@xcllnt.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A6AC098-FB0D-474A-B92D-190121CA400F>