Assembly function argument pass

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

Assembly function argument pass

1,172件の閲覧回数
frank涛李
Contributor II

Hi NXP,

I'm coding assembly language on MK66FN2M0VMF18 processor.When I code a function in C format named uint8_t(uint8_t Address,uint32_t Data,uint8_t *p),and then the function will be called in the C source file.I want to know where the three arguments 'Address' 'Data' 'p' would be passed to in MK66FN2M0VMF18's registers.The store registers decide my assembly language.Can you give me some related docs or links?

Best regards,

Frank 

ラベル(1)
0 件の賞賛
返信
1 返信

1,074件の閲覧回数
carlos_neri
NXP Employee
NXP Employee

ARM parameter passing rules states that you should use R0 - R3 for paramenters. If you need to pass more than 4, then, use the stack:

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042f/IHI0042F_aapcs.pdf 

For parameter returns, you should use R0.

0 件の賞賛
返信