I made some modifications to various functions within my kernel, and now there is an error in Bochs when I run it:
CMOV_GdEd: -enable-cpu-level=6 required
I think this means I had to compile Bochs to emulate an i686 processor in order to get some specific instruction to work. When I compile my kernel with TCC instead of GCC, everything works perfectly. So I think GCC is making i686 optimizations on my code, which I don't want. I have no other optimizations, except for -fomit-frame-pointer on all code; removing this flag does nothing to fix things. My current version of GCC is i686-pc-linux-gnu 4.3.2. How can I make GCC restrict it's instruction set to an i386/i486 instead of an i686?
Or am I misinterpreting this error?
making GCC generate <i686 code
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: making GCC generate <i686 code
Okay, I really needed to RTFM. I just recompiled with all -march=i386 and it works now.
However, should I really be using a cross compiler for any reason?
However, should I really be using a cross compiler for any reason?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: making GCC generate <i686 code
The advantages of a crosscompiler are mentioned in the article.