Coldfire uC5282 Question
Joel Sherrill
joel.sherrill at OARcorp.com
Tue Mar 30 22:26:21 UTC 2010
On 03/30/2010 02:39 PM, Thomas Dörfler wrote:
> Ups,
>
> On 30.03.2010 20:35, Eric Norum wrote:
>
>> Ooops
>> My mistake.
>> I read what I wanted to, not what I actually saw. An opcode of 0x51ca is not an SCC instruction, it's a DBCC.
>> Which is not legal for a ColdFire......
>>
> So you got me there :-) Never trust the output of a tool. You are right,
> DBcc is a NONO on Coldfire, and quite likely to get emitted from GCC...
>
> So Joel, if this is NOT coming from assembly code, GCC has a problem here
>
Thanks for all the help. I have tracked it down to memset()
which is definitely in assembly in newlib 1.18.0. Hmmm...
This output from the -v on the link doesn't look like it used
the right multilib:
/users/joel/test-gcc/b-gcc1-m68k/gcc/testsuite/gcc/' '-v'
/users/joel/test-gcc/b-gcc1-m68k/gcc/collect-ld -dc -dp -N -o
/users/joel/test-gcc/b-gcc1-m68k/gcc/testsuite/gcc/zero-struct-2.x7
/users/joel/test-gcc/install-svn/m68k-rtems4.10/uC5282/lib/start.o
/users/joel/test-gcc/b-gcc1-m68k/gcc/m5208/crti.o
/users/joel/test-gcc/b-gcc1-m68k/gcc/m5208/crtbegin.o -e start
-L/users/joel/test-gcc/b-gcc1-m68k/m68k-rtems4.10/./newlib
-L/users/joel/test-gcc/b-gcc1-m68k/gcc/m5208
-L/users/joel/test-gcc/b-gcc1-m68k/gcc
-L/users/joel/test-gcc/install-svn/m68k-rtems4.10/uC5282/lib
-L/users/joel/test-gcc/b-gcc1-m68k/m68k-rtems4.10/./newlib
/tmp/ccBTk1gL.wpa.ltrans.o gcc_tg.o
/users/joel/test-gcc/b-gcc1-m68k/rtems_gcc_main.o -wrap exit -wrap _exit
-wrap main -wrap abort -lm -lgcc --start-group -lrtemsbsp -lrtemscpu -lc
-lgcc --end-group -T
/users/joel/test-gcc/install-svn/m68k-rtems4.10/uC5282/lib/linkcmds
-lgcc /users/joel/test-gcc/b-gcc1-m68k/gcc/m5208/crtend.o
/users/joel/test-gcc/b-gcc1-m68k/gcc/m5208/crtn.o
-mcpu=5282
I don't see any explicit matches on 5282 in t-mlibs. Suggestions
on how to fix this appreciated. This is an ugly file. :(
--joel
> CU,
>
> Thomas.
>
>
>>
>>
>>
>> What compiler flags produced this?
>>
>>
>> On Mar 30, 2010, at 11:19 AM, Eric Norum wrote:
>>
>>
>>> ????
>>> Instruction opcode is: 0x51c2
>>>
>>> From the Programmer's Reference Manual -- hope this attaches in-line for non-Mac mail viewers...
>>>
>>>
>>> <PastedGraphic-1.tiff>
>>>
>>> So the Condition is 1 (F -- never true)
>>> The Mode is 0 (data register)
>>> The register is 2.
>>>
>>>
>>> What's illegal about that?
>>>
>>>
>>>
>>> On Mar 30, 2010, at 11:00 AM, Thomas Dörfler wrote:
>>>
>>>
>>>> Joel,
>>>>
>>>> according to the ColdFire Family Programmer's Reference Manual Rev3,
>>>> page 4-74, this bit coding is not legal.
>>>>
>>>> The Coldfire supports the Scc instruction only for Byte Operands (e.g.
>>>> sf.b %d2) This would generate an opcode of 51c2, not 51ca
>>>>
>>>> Either you fed GCC with wrong input, or it produces wrong output. :-(
>>>>
>>>> Good luck,
>>>>
>>>> Thomas.
>>>>
>>>>
>>>> On 30.03.2010 19:48, Joel Sherrill wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am running gcc testsuite on the qemu uC5282
>>>>> simulator. I am getting a number of failures
>>>>> where qemu says an illegal instruction was
>>>>> encountered. Can a coldfire person out there
>>>>> tell me whether this is qemu not supporting
>>>>> a valid coldfire instruction or this instruction
>>>>> should not be generated by gcc with the -mcpu=5282
>>>>> option
>>>>>
>>>>> [joel at rtbf64b gcc]$ m68k-rtems4.10-objdump -da zero-struct-2.x7 | grep
>>>>> -i "51 ca"
>>>>> [joel at rtbf64b gcc]$ m68k-rtems4.10-objdump -da zero-struct-2.x7 | grep
>>>>> -i "5186c"
>>>>> 5186c: 51ca sf %d2
>>>>>
>>>>>
>>>>> $ uC5282 -i zero-struct-2.x7
>>>>> /users/joel/qemu-coverage/install/bin/qemu-system-m68k is
>>>>> /users/joel/qemu-coverage/install/bin/qemu-system-m68k
>>>>> qemu: fatal: Illegal instruction: 51ca @ 0005186c
>>>>> D0 = 00000000 A0 = 00063b98 F0 = 0000000000000000 ( 0)
>>>>> D1 = 00000034 A1 = 00063186 F1 = 0000000000000000 ( 0)
>>>>> D2 = 00000000 A2 = 00063b98 F2 = 0000000000000000 ( 0)
>>>>> D3 = 000615e6 A3 = 00000000 F3 = 0000000000000000 ( 0)
>>>>> D4 = 00000034 A4 = 00000000 F4 = 0000000000000000 ( 0)
>>>>> D5 = 00000000 A5 = 00000000 F5 = 0000000000000000 ( 0)
>>>>> D6 = 00000000 A6 = 2000ffcc F6 = 0000000000000000 ( 0)
>>>>> D7 = 00000000 A7 = 2000ffa0 F7 = 0000000000000000 ( 0)
>>>>> PC = 00051864 SR = 2700 ----- FPRESULT = 0
>>>>> [joel at rtbf64b gcc]$ uC5282 zero-struct-2.x7^C
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>
>>>> --
>>>>
>>>> --------------------------------------------
>>>> Embedded Brains GmbH
>>>> Thomas Doerfler Obere Lagerstrasse 30
>>>> D-82178 Puchheim Germany
>>>> email: Thomas.Doerfler at embedded-brains.de
>>>> Phone: +49-89-18908079-2
>>>> Fax: +49-89-18908079-9
>>>> _______________________________________________
>>>> rtems-users mailing list
>>>> rtems-users at rtems.org
>>>> http://www.rtems.org/mailman/listinfo/rtems-users
>>>>
>>> --
>>> Eric Norum
>>> wenorum at lbl.gov
>>>
>>>
>>>
>>> _______________________________________________
>>> rtems-users mailing list
>>> rtems-users at rtems.org
>>> http://www.rtems.org/mailman/listinfo/rtems-users
>>>
>>
>
>
More information about the users
mailing list