From bbfc407fd6cb437c9cc720de1f4dfbb9050dccd4 Mon Sep 17 00:00:00 2001 From: Yifan Lu Date: Wed, 23 Nov 2016 17:25:19 -0600 Subject: Changes to reflect older changes in merge --- lib/arm/assemble.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/arm/assemble.h') diff --git a/lib/arm/assemble.h b/lib/arm/assemble.h index 3066802..91b273e 100644 --- a/lib/arm/assemble.h +++ b/lib/arm/assemble.h @@ -120,14 +120,15 @@ static inline void Bccrel(struct assemble_ctx ctx, int offset) { } static inline void LDR_PC(struct assemble_ctx ctx, uint32_t dpc) { - if (actx_pc(ctx) & 2) + int align = !!(actx_pc(ctx) & 2); + if (align) op16(ctx.codep, 0xbf00); if (ctx.thumb) op32(ctx.codep, 0xf000f8df); else op32(ctx.codep, 0x051ff004 | ctx.cond << 28); op32(ctx.codep, (uint32_t) dpc); - if (ctx.pc & 2) // for alignment + if (align) op16(ctx.codep, 0xbf00); } -- cgit v1.2.3