LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2004, 11:01 PM   #1
Annie0716
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Rep: Reputation: 0
Unhappy What does it mean "parse error" using EMAC


I am learning the assembler instruction of M68K, MCF 5249C3.
And I want to use the EMAC instructions in my C codes. Althought I learned the program manual many times, I can' t use it correctly,

Is there anyone could help me to have a look on my code?

Thank you very much!

/*error*/
/*#1*/
mac.l %%a3,%%d3,>>,%%d1,%%acc1;

/tmp/ccw96619.s: Assembler messages:
/tmp/ccw96619.s:581: Error: Bad expression
/tmp/ccw96619.s:581: Warning: missing operand; zero assumed
/tmp/ccw96619.s:581: Error: Bad expression
/tmp/ccw96619.s:581: Error: parse error -- statement `mac.l %a3,%d3,>>,%d1,%acc1' ignored

/*#2*/
mac.l %a3,%d3,#0x3,%acc1

/tmp/ccab5Oxf.s: Assembler messages:
/tmp/ccab5Oxf.s:581: Error: Bad expression
/tmp/ccab5Oxf.s:581: Error: parse error -- statement `mac.l %a3,%d3,#0x3,%acc1' i

/*#3*/
mac.l %a3,%d3,>>,%acc1

/tmp/ccSzz1g9.s: Assembler messages:
/tmp/ccSzz1g9.s:581: Error: Bad expression
/tmp/ccSzz1g9.s:581: Warning: missing operand; zero assumed
/tmp/ccSzz1g9.s:581: Error: Bad expression
/tmp/ccSzz1g9.s:581: Error: parse error -- statement `mac.l %a3,%d3,>>,%acc1' ignored
 
Old 08-06-2004, 04:46 AM   #2
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
Hi Annie,

this probably means the version of gcc/as you're using doesn't know
the mac instruction. BTW I don't think mac is an original 68000 instruc-
tion, maybe it's 68040 or coldfire (sadly I threw away my Motorola instruction
set manuals a few years ago).

As a workaround: Try to find out what mac does and recode it with 68k only
instructions.

Quick google lookup reveals: mac=multiply and accumulate, but no
real reference (probably hidden between all the links to Apple stuff :-)).


HTH
 
Old 08-07-2004, 08:41 AM   #3
Annie0716
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you so much!

I can' t use the EMAC instruction till now, though I have the instruction manual. I am trying to find the problem.

Anyway, I can use the normal mac instruction, not the EMAC, but only a operation of multiply and accumulation one times without the 1 bit shift.

I will try to change my source code to use it, and find the reason that I cannot use the EMAC.

Thanks again!!!!

Annie
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"mythtv-setup" giving "Session management error: Authentication Rejected" Mitchua Ubuntu 0 10-09-2005 04:32 PM
error: parse error before "uint32_t" paicolman Linux - Newbie 5 09-27-2004 09:28 AM
stdio.h parse error before "__gnuc_va_list" Warnken Red Hat 1 02-10-2004 11:24 AM
kernel 2.6.0 compliation problems: "parse error before 'va_list'" sohmc Linux - General 6 12-21-2003 04:45 AM
Newbie: "Parse Error" when adding wireless usb network adapter tommer Red Hat 7 10-16-2003 04:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration