PCarroll wrote:
...Was an ABI and EABI ever produced for Coldfire, to somewhat match the PPC EABI? I know there are references from some sources about producing EABI-compliant GNU output for Coldfire. That would seem to indicate that such a document was produced. Maybe I'm just reading it wrong. In any event, if such a document was produced, could someone point me in the right direction? Thanks.
Google finds Paul asked the same question back in 2003 on comp.sys.m68k and didn't get an answer there (or then) either. Maybe I'll have more luck 7 and 3 years later. ?
I've got the same question. There are lots of EABI documents for the ARM and PPC, but I can't find anything on the Coldfire.
We're using GCC, and it seems to be producing ever worse code as time goes on [1], so it looks like I'm going to have to write some of the more critical code in assembler.
So I need to know what ABI/EABI is being followed, and from that which registers need to be saved on function entry. I've seen some very nasty bugs where programmers didn't read the EABI (and didn't save the right registers), and I don't want to be one of them.
The GNU/GCC manual just says "the compiler follows appropriate ABIs" without apparently documenting the ABI anywhere I can find.
Googling for "coldfire abi" finds Paul's post, and nothing else!
Note 1:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36134
for (; size32; size32--) {
*dest++ = *src++;
*dest++ = *src++;
*dest++ = *src++;
*dest++ = *src++;
GCC 2.9 turned the above into 6 instuctions taking 12 bytes, of exactly the sort the M68K and Coldfire are famous for (like "movel %a1@+,%a0@+").
GCC 4.2 generates 9 instructions and 38(!) bytes, with no post-increments in sight.
GCC 4.4 generates 13 instructions and 46(!!) bytes.