From a21db4db6af4987ad4ec81e1fb6d6ee4f9fc2695 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 27 Nov 2021 23:43:51 +0100 Subject: armv7: update notes on addressing --- src/arch/armv7.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/arch/armv7.md b/src/arch/armv7.md index f6c3a96..2618938 100644 --- a/src/arch/armv7.md +++ b/src/arch/armv7.md @@ -71,10 +71,13 @@ blx // absolute branch to address in register Rm & ### Load/Store Different addressing modes. ```armasm -str r1, [r0] // [r0]=r1 -str r1, [r0, #4] // [r0+4]=r1 -str r1, [r0, #4]! // r0+=4; [r0]=r1 -str r1, [r0], 4 // [r0]=r1; r0+=4 +ldr r1, [r0] // r1 = [r0] +ldr r1, [r0, #4] // r1 = [r0+4] + +ldr r1, [r0, #4]! // pre-inc : r0+=4; r1 = [r0] +ldr r1, [r0], #4 // post-inc: [r0] = r1; r0+=4 + +ldr r0, [r1, r2, lsl #3] // r0 = [r1 + (r2<<3)] ``` Load/store multiple registers full-descending. -- cgit v1.2.3