About the use of assembly

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About the use of assembly

768 Views
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 Kudos
7 Replies

762 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you specify used device?

0 Kudos

758 Views
Jerrylh
Contributor I

MPC5644A,

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

0 Kudos

755 Views
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 Kudos

749 Views
Jerrylh
Contributor I

Thank you for your help.

I know the  gcc syntax.

but which kind of  codewarrior 10.6?

Why not universal?

0 Kudos

744 Views
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 Kudos

742 Views
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 Kudos

732 Views
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 Kudos