inline assembly and register state

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

inline assembly and register state

1,066 次查看
RoyAtRce
Contributor II

I am not sure if I need to preserve the contents of the CCR and A registers when I write inline assembly marcos.  Is there any documentation out there on this?

 

Thanks,

Roy

标签 (1)
0 项奖励
回复
1 回复

806 次查看
bigmac
Specialist III

Hello Roy,

 

As far as I am aware, there should not be a need to preserve the contents of the registers prior to inline code.  Various registers can be used to pass parameters to a function, but by the time the assembly code block is reached these parameter values should then reside on the stack.  As a general rule, if any values need to be preserved, the compiler should already do this.

 

Regards,

Mac

 

0 项奖励
回复