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.
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).
See Section 4.1.3 Memory Addressing and 220.127.116.11 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
• Register indirect with immediate index mode
• Register indirect with index mode
• Register indirect mode
Retrieving data ...