About the use of assembly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

About the use of assembly

2,239 次查看
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,233 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you specify used device?

0 项奖励
回复

2,229 次查看
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,226 次查看
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,220 次查看
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,215 次查看
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,213 次查看
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,203 次查看
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 项奖励
回复