From 284a4d9dd70e3c29042c65efe06921657c7d3f03 Mon Sep 17 00:00:00 2001 From: Jeppe Johansen Date: Thu, 11 Dec 2014 11:20:25 +0000 Subject: [PATCH] Encoding of preindexed LDRH/STRH opcodes was missing. git-svn-id: branches/laksen/armiw@29254 - --- compiler/arm/aasmcpu.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/arm/aasmcpu.pas b/compiler/arm/aasmcpu.pas index ef1613f23e..c85de4c2a8 100644 --- a/compiler/arm/aasmcpu.pas +++ b/compiler/arm/aasmcpu.pas @@ -2762,6 +2762,9 @@ implementation bytes:=bytes or (1 shl 23); bytes:=bytes or getsupreg(oper[1]^.ref^.index); end; + { set W bit } + if oper[1]^.ref^.addressmode=AM_PREINDEXED then + bytes:=bytes or (1 shl 21); { set P bit if necessary } if oper[1]^.ref^.addressmode<>AM_POSTINDEXED then bytes:=bytes or (1 shl 24);