Unable to get assembly inline with C++ to compile

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unable to get assembly inline with C++ to compile

1,636件の閲覧回数
SCase
Contributor I
I am having an issue getting CodeWarrior accept inline assembly in C++ files.

In a header file, the first line containing asm fails with a parse error:

asm int _getSP(void);

Gives "parse error before `int'

Similarly, in a .cpp file, code like the following:

asm int _getLR(void)
{
mflr r3
blr
}

... also results in "parse error before `int'"

I am targeting the MPC852T processor with CodeWarrior 5.7.0, build 1917, hosted on RedHat Linux 9 using the 2.95 toolchain and C++ building a Linux application. This is part of CodeWarrior Development Studio for PowerPC ISA, Linux Application and Platform Editions.

This code compiles without issue when targeting the MPC852T processor with CodeWarrior 5.7.0 build 1962 hosted on Windows for a bareboard application.

I have compared the setups and found nothing that indicates what the problem is, although I noticed that the Windows version of 5.7.0 has many, many more options than the Linux hosted version.

Assistance would be very much appreciated.
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

844件の閲覧回数
trytohelp
NXP Employee
NXP Employee
Dear Customer,
 
If you will not receive feedback on the forum I suggest you to contact the CodeWarrior Support Team.
You can log your request via the web.
 - Go to following URL:
http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=054670&tid=FSH
  - Click on Submit a Service Request. You will come to a login page.
 - If you are already registered with Freescale (using the Forum, subscribed to newsletter, ...)  use your Freescale login and password.
   Otherwise, Click on "Register Now" to get registered.
 - You can submit your request through the web from there.
 
Regards
Pascal
0 件の賞賛
返信