inline assembly and register state

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

inline assembly and register state

603件の閲覧回数
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 返信

343件の閲覧回数
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 件の賞賛
返信