About the use of assembly

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

About the use of assembly

2,285件の閲覧回数
Jerrylh
Contributor I

Codewarrior 10.6  can use this format.

__asm void WATCHDOG(void)
{
nofralloclis r4, 0
ori r4, r4, SR_WSC_1@l
lis r3, SWT_SR@ha
stw r4, SWT_SR@l(r3)
/* SR --> 0x0000d928 */
lis r4, 0
ori r4, r4, SR_WSC_2@l
stw r4, SWT_SR@l(r3)


lis r4, MCR_VALUE@h
ori r4, r4, MCR_VALUE@l
lis r3, SWT_MCR@ha
stw r4, SWT_MCR@l(r3)

blr
}

S32DS for power can not use.

why?

how  can  i use ?

0 件の賞賛
返信
7 返答(返信)

2,279件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you specify used device?

0 件の賞賛
返信

2,275件の閲覧回数
Jerrylh
Contributor I

MPC5644A,

It doesn't mean the actual function。I want to know the format of assembly language for different compilers。

0 件の賞賛
返信

2,272件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

I see. It is GCC syntax.

A description you may find here:

https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html

 

0 件の賞賛
返信

2,266件の閲覧回数
Jerrylh
Contributor I

Thank you for your help.

I know the  gcc syntax.

but which kind of  codewarrior 10.6?

Why not universal?

0 件の賞賛
返信

2,261件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Are you using S32 Design Studio or Codewarrior 10.6? It is not clear to me from your text.

S32DS is based on GCC compiler. MPC5644A is supported by both compilers.

Codewarrior uses its own compiler and its documentation you may find in the installation directory (Power Architecture Build Tools Reference.pdf, sections 13 and 21)

0 件の賞賛
返信

2,259件の閲覧回数
Jerrylh
Contributor I

I see.

thank you.

I 'm using both IDEs.  i want use this  format (the format can be used  on   the   codewarrior  10.6)

for example :

asm void interrupt_enable(int level)
{

mtmsr r3
blr
}

but the format  can not be used on  the S32DS for Power  Ar.

 

 

0 件の賞賛
返信

2,249件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Here you may see another description:

http://www.ethernut.de/en/documents/arm-inline-asm.html

 

I guess the issue is missing quotation marks.

 

0 件の賞賛
返信