assembly - Data alignment in store instruction -


in arm assembly, have data across registers r3 - r9. want store them memory using stm instruction starting address have in r0

instruction stm r0,{r3-r9} put data registers right next each other. want have 16-byte gap between stored values, e.g like:

str r3,[r0] str r4,[r0,#16] str r5,[r0,#32] str r6,[r0,#48]  ... 

is possible stm instruction or there shortcut trick?

the stm instruction lets specify whether destination address should grow downwards or upwards, not stride should (it'll size of register, i.e. 1 word). you'll have use alternative solution 1 suggested yourself.

for example:

str r3,[r0] str r4,[r0,#16] str r5,[r0,#32] .... 

or

; simpler since it's obvious stores spaced 16 bytes apart, ; altough doesn't preserve original value of r0 above version str r3,[r0],#16 str r4,[r0],#16 str r5,[r0],#16 .... 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -