Coldfire 5282 TAS instruction code

View: New views
2 Messages — Rating Filter:   Alert me  

Coldfire 5282 TAS instruction code

by Phil Roets :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

X-SpamDetect-Info: ------------- Start ASpam results ---------------
X-SpamDetect-Info: This message may be spam. This message BODY has been altered to show you the spam information
X-SpamDetect: *******: 7.000000 spf adsl=3.0, GreyPassed=1.0, DodgySource=2.0, SPF Default Fail=1.0
X-SpamDetect-Info: ------------- End ASpam results -----------------

hi

I am developing a multitask application on a MFC5282 board and intended
to create a semaphore type method to control access to some of the
common variables.  Replacing the 'tst.b' with 'tas.b' in the snippet :
        move.l   4(%sp),%a0
        move.l   #128,%d0
        tas.b     (%a0)
        jbne     .L4
        move.b #-128,(%a0)
        clr.b      %d0
..L4:
        rts
causes a 'invalid instruction for the architecture ... ' during
compilation with the m68k-uclinux-tools-20061214 tool set.

Can anybody suggest a way around the problem ?

Thanks

Phil Roets
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Re: Coldfire 5282 TAS instruction code

by Greg Ungerer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Phil,

Phil Roets wrote:

> I am developing a multitask application on a MFC5282 board and intended
> to create a semaphore type method to control access to some of the
> common variables.  Replacing the 'tst.b' with 'tas.b' in the snippet :
>        move.l   4(%sp),%a0
>        move.l   #128,%d0
>        tas.b     (%a0)
>        jbne     .L4
>        move.b #-128,(%a0)
>        clr.b      %d0
> ..L4:
>        rts
> causes a 'invalid instruction for the architecture ... ' during
> compilation with the m68k-uclinux-tools-20061214 tool set.
>
> Can anybody suggest a way around the problem ?

What CPU specifier option did you pass to gcc?

 From memory you need a -m528x with that compiler.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@...
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.