Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2014 21:50:52 +0000 (GMT)
From:      Craig Butler <craig001@lerwick.hopto.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        Kurt Lidl <lidl@pix.net>, sparc64@freebsd.org
Subject:   Re: Call for help: clang/llvm for sparc64
Message-ID:  <3051948.261.1390859647458.JavaMail.craig@w520>
In-Reply-To: <20140127200331.GA80131@freebsd.org>
References:  <k1w7uhh383gn36hdmmwmq8f3.1389964362925@email.android.com> <20140117221330.GA2788@freebsd.org> <1390175474.8376.3.camel@atlas.lerwick.hopto.org> <3866560.132.1390324121556.JavaMail.craig@w520> <20140121170801.GA56661@freebsd.org> <52E553E6.6020902@pix.net> <20140126190349.GA89295@freebsd.org> <20140127200331.GA80131@freebsd.org>

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


> Btw, can someone test this patch? ie. compile (with gcc) sparc64
> kernel
> with it and boot it?
> 
> > Yes, I had to fix that but forgot to upstream it.
> > 
> > Index: sparc64/include/pcpu.h
> > ===================================================================
> > --- sparc64/include/pcpu.h      (revision 259767)
> > +++ sparc64/include/pcpu.h      (working copy)
> > @@ -70,9 +70,26 @@
> >  struct pcb;
> >  struct pcpu;
> >  
> > -register struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
> > -register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
> > +static __inline __pure2 struct pcb *
> > +__curpcb(void)
> > +{
> > +       struct pcb *pcb;
> >  
> > +       __asm("ldx [%" __XSTRING(PCB_REG) "], %0" : "=r" (pcb));
> > +       return (pcb);
> > +}
> > +#define curpcb (__curpcb())
> > +
> > +static __inline __pure2 struct pcpu *
> > +__curpcpu(void)
> > +{
> > +       struct pcpu *pcpu;
> > +
> > +       __asm("ldx [%" __XSTRING(PCPU_REG) "], %0" : "=r" (pcpu));
> > +       return (pcpu);
> > +}
> > +#define pcpup  (__curpcpu())
> > +
> >  #define        PCPU_GET(member)        (pcpup->pc_ ## member)
> >  
> >  static __inline __pure2 struct thread *
> > 
> > 
> > the llvm sparc64 is not yet ready for wide consumption. Once llvm
> > 3.4 is imported
> > (days now) the sparc64 backend will be enabled as well. Then I plan
> > to backport
> > all the fixes from llvm trunk to enable it to selfhost. So that we
> > can build
> > llvm 3.5 with llvm itself. This is necesary as llvm is becoming
> > c++11 only.
> > 

Do you want us to apply that patch to /usr/src/sys/sparc64/include/pcpu.h then make with gcc ??
Do we have to pull down HEAD or can this be applied over a 9.2|10-RELEASE ?
Which gcc ??

Kind Regards

Craig Butler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3051948.261.1390859647458.JavaMail.craig>