Coldfire uC5282 Question
Eric Norum
WENorum at lbl.gov
Tue Mar 30 18:36:56 UTC 2010
On Mar 30, 2010, at 11:32 AM, Thomas Dörfler wrote:
> Eric, Joel,
>
> Joels listing really shows the opcode 0x51ca
>
> I have looked it up in an of M68k manual. The problem I see is bit 3,
> because this is even an illegal coding for 68k:
> Bit 5-3 in the opcode hold the "Adressing MODE" field, and the coding
> 001 in it is undefined (would select an adress register instead of data
> register as destination).
Nope. It's actually a completely different instruction (DBCC).
But in any case, that's illegal for a ColdFire.
>
> So -> compiler problem. The compiler should never generate this code.
> Even the assembler shouldn't.
>
> What does "objdump" say to that opcode?
>
> wkr,
> Thomas.
>
>
>
> On 30.03.2010 20:14, Eric Norum wrote:
>> That's the standard 'SCC' command (Set Condition Code) -- In everything from the 68000 on up.
>>
>>> From the programmer's guide:
>>
>> Attributes: Size = (Byte)
>>
>> Description: The specified condition code is tested. If the condition is true, the bits at the effective address are all set to one (i.e., $FF). Otherwise, the bits at the effective address are set to zeros (i.e., $00).
>>
>>
>>
>>
>> So, 'SF' would be 'Set On False' -- i.e. set never. Another way to 'clear byte' I guess.
>>
>> Kind of a corner case for the SCC instruction, but the emulator really should handle it!
>>
>> On Mar 30, 2010, at 10:48 AM, 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.
>>>
>>> --
>>> Joel Sherrill, Ph.D. Director of Research& Development
>>> joel.sherrill at OARcorp.com On-Line Applications Research
>>> Ask me about RTEMS: a free RTOS Huntsville AL 35805
>>> Support Available (256) 722-9985
>>>
>>>
>>> _______________________________________________
>>> rtems-users mailing list
>>> rtems-users at rtems.org
>>> http://www.rtems.org/mailman/listinfo/rtems-users
>>
>
>
> --
>
> --------------------------------------------
> 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
--
Eric Norum
wenorum at lbl.gov
More information about the users
mailing list