[llvm-commits] [PATCH]: dont emit long nops on AMD Geode

Villmow, Micah Micah.Villmow at amd.com
Wed Sep 12 11:54:57 PDT 2012


The constructor of X86AsmBackend is passed in the Target, this needs to be stored so that it can be used to get the subtarget when needed. See X86AsmBackend().

Micah

> -----Original Message-----
> From: Roman Divacky [mailto:rdivacky at freebsd.org]
> Sent: Wednesday, September 12, 2012 11:53 AM
> To: Villmow, Micah
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] [PATCH]: dont emit long nops on AMD Geode
> 
> How do I get it from X86AsmBackend::writeNopData() ? I didnt find
> any way...
> 
> On Wed, Sep 12, 2012 at 05:34:04PM +0000, Villmow, Micah wrote:
> > This information stored in the subtarget already, can't you retrieve
> it from target.getSubtarget()?
> >
> > > -----Original Message-----
> > > From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> > > bounces at cs.uiuc.edu] On Behalf Of Roman Divacky
> > > Sent: Wednesday, September 12, 2012 10:09 AM
> > > To: llvm-commits at cs.uiuc.edu
> > > Subject: [llvm-commits] [PATCH]: dont emit long nops on AMD Geode
> > >
> > > Hi,
> > >
> > > it happens to be so that we unconditionaly emit long nops. Even on
> CPUs
> > > that dont support those. See PR11212 for details.
> > >
> > > The attached patch passes CPU option (StringRef) to MCAsmBackend so
> > > that X86AsmBackend can use it and not emit long nops when the cpu
> is
> > > "geode".
> > >
> > > Thus fixing it. The patch is a little messy because I have to pass
> the
> > > new argument everywhere.
> > >
> > > It needs trivial clang adjustment too.
> > >
> > > What do you think? Roman






More information about the llvm-commits mailing list