How can I store the value of a register directly to a memory address without the help of another register?

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

How can I store the value of a register directly to a memory address without the help of another register?

ソリューションへジャンプ
2,051件の閲覧回数
maojiu
Contributor I

How can I store the value of a register directly to an address without the help of another register  like "stw r1, 0x0000feee"? The statement  "stw r1, 0x0000feee" can't pass the compiling. I am using mpc8306.

0 件の賞賛
返信
1 解決策
1,881件の閲覧回数
scottwood
NXP Employee
NXP Employee

You can't, except for addresses that are within a signed 16-bit offset from zero (in which case you'd use r0 which is interpreted as zero rather than a register when forming an address).

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,881件の閲覧回数
lunminliang
NXP Employee
NXP Employee

See Section 4.1.3 Memory Addressing and 4.2.3.1 Integer Load and Store Address Generation of MPCGFPE32B.pdfhttp://cache.freescale.com/files/product/doc/MPCFPE32B.pdf

Load and store operations have three categories of effective address generation that depend on the

operands specified:

• Register indirect with immediate index mode

• Register indirect with index mode

• Register indirect mode

1,882件の閲覧回数
scottwood
NXP Employee
NXP Employee

You can't, except for addresses that are within a signed 16-bit offset from zero (in which case you'd use r0 which is interpreted as zero rather than a register when forming an address).

0 件の賞賛
返信