aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Lu2016-11-13 16:10:24 -0800
committerYifan Lu2016-11-13 16:10:24 -0800
commitdf0e3538180e9c69ba8f1e23af2da39bbedff2c9 (patch)
tree3db7fa725e4301392014477968b5ba177830a761
parentAdded ARM PUSH multi instruction assembly (diff)
downloadsubstitute-df0e3538180e9c69ba8f1e23af2da39bbedff2c9.tar.gz
Fixed proper encoding of PUSH (STMDB) as ARM manual was wrong...
-rw-r--r--lib/arm/assemble.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arm/assemble.h b/lib/arm/assemble.h
index bf1ad03..1baeb0f 100644
--- a/lib/arm/assemble.h
+++ b/lib/arm/assemble.h
@@ -17,7 +17,7 @@ static inline void PUSHone(struct assemble_ctx ctx, int Rt) {
static inline void PUSHmulti(struct assemble_ctx ctx, uint16_t mask) {
if (ctx.thumb)
- op32(ctx.codep, 0x0000e8ad | mask << 16);
+ op32(ctx.codep, 0x0000e92d | mask << 16);
else
op32(ctx.codep, 0x092d0000 | mask | ctx.cond << 28);
}