[Clfs-support] i586 target with cmov

Chris Fowler linxdev at gmail.com
Tue May 17 12:06:45 PDT 2016


Yea, I've compiled Linus' code and ran on the RDC3308 itself.  I've not
compiled the code in this environment.  I'm not sure if I should see cmov
instructions in the binary or not.  I am using uname hack.  If I rebuilt
gmp and coreutils would cmov be included?


On Tue, May 17, 2016 at 2:11 PM, William Harrington <kb0iic at berzerkula.org>
wrote:

> On Tue, May 17, 2016 15:32, Chris Fowler wrote:
> > I've just finished chapter 6 of Sysvinit 3.0.0.  My goal is to target an
> > i586 processor that lacks features of i686. such as cmov.
> >
> > I think I may have made a mistake during the initial builds.
> >
> > Maybe I have not, I just want to validate before I move on.  Host is
> >  Ubuntu 15.10 x86_64.
> > Target is a RDC3308 RISC, but it prefers to be x86.
> >
> >  have no name!:/# objdump /tools/bin/ls -D | grep cmov
> >     180d: 0f 44 1e             cmove  (%esi),%ebx
> >     31af: da cc                 fcmove %st(4),%st
> >     4e18: 0f 4e 00             cmovle (%eax),%eax
> >     59e6: 0f 4f 00             cmovg  (%eax),%eax
> >     5ddc: 0f 4f 00             cmovg  (%eax),%eax
> >     a836: db c5                 fcmovnb %st(5),%st
> >     e50a: 0f 4c 2a             cmovl  (%edx),%ebp
> >    1120f: 0f 4e 32             cmovle (%edx),%esi
> >    12e19: 0f 48 00             cmovs  (%eax),%eax
> >    1376b: 0f 4e 32             cmovle (%edx),%esi
> >    14068: db cc                 fcmovne %st(4),%st
> >    1cd7d: 0f 43 26             cmovae (%esi),%esp
> >    1fadd: da db                 fcmovu %st(3),%st
> >     25ef: 0f 4a 03             cmovp  (%ebx),%eax
> >       c7: da cc                 fcmove %st(4),%st
> >       d0: da cc                 fcmove %st(4),%st
> >      305: db cf                 fcmovne %st(7),%st
> >      30d: db cf                 fcmovne %st(7),%st
> >     6fb7: da c5                 fcmovb %st(5),%st
> >     799a: db c4                 fcmovnb %st(4),%st
> >     7a27: db c4                 fcmovnb %st(4),%st
> >     7a68: db c2                 fcmovnb %st(2),%st
> >      244: db da                 fcmovnu %st(2),%st
> >      450: db dc                 fcmovnu %st(4),%st
> >      478: db dc                 fcmovnu %st(4),%st
> >      4a0: db dc                 fcmovnu %st(4),%st
> >      4c0: db dc                 fcmovnu %st(4),%st
> >     22c4: db c4                 fcmovnb %st(4),%st
> >     2434: db c4                 fcmovnb %st(4),%st
> > I have no name!:/#
> >
> > Chris
>
> Hello Chris,
>
> i586 historically did not have cmov. The major change between i586 and
> i686 (pentium pro and later) was cmov.
>
> https://en.wikipedia.org/wiki/X86_instruction_listings#Added_with_Pentium_Pro
>
> If you use a target of i586-unknown-linux-gnu and a build cross-tools
> targeting i586 then you'll end up with i586. The notable change will be to
> make sure GMP builds for the target rather than detecting the host's cpu
> and building for it. There are some GEODE cpu's, like the GX1 that use the
> i586 machine type and include cmov. Check your cpu flags if unsure if your
> target CPU has cmov or not. I do not know if the current toolchain
> versions add cmov into the i586 architecture.
>
> Some more info about cmov, as well:
> http://yarchive.net/comp/linux/cmov.html
>
> Sincerely,
>
> William Harrington
>
> _______________________________________________
> Clfs-support mailing list
> Clfs-support at lists.clfs.org
> http://lists.clfs.org/listinfo.cgi/clfs-support-clfs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20160517/b2b758db/attachment-0001.htm>


More information about the Clfs-support mailing list