summaryrefslogtreecommitdiff
path: root/sys/src/libmach
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-10-02 20:52:13 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-10-02 20:52:13 +0200
commitf163d0014a6ccd3417c45a05f831e73f2f9f6cf7 (patch)
tree2d9d65aff7f130998e9221d87019ae1ca69832fd /sys/src/libmach
parent6c758d94bf239b94072d635f28b53a976a515fd6 (diff)
libmach: fix wrong formating for arm LDRH/STRH/LDRSB/LDRSH (MOVHU/MOVBU) instructions
Diffstat (limited to 'sys/src/libmach')
-rw-r--r--sys/src/libmach/5db.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/libmach/5db.c b/sys/src/libmach/5db.c
index 37a99ebdd..411c057b4 100644
--- a/sys/src/libmach/5db.c
+++ b/sys/src/libmach/5db.c
@@ -499,7 +499,7 @@ static void
armhwby(Opcode *o, Instr *i)
{
i->store = ((i->w >> 23) & 0x2) | ((i->w >>21) & 0x1);
- i->imm = (i->w & 0xf) | ((i->w >> 8) & 0xf);
+ i->imm = (i->w & 0xf) | ((i->w >> 4) & 0xf0);
if (!(i->w & (1 << 23)))
i->imm = - i->imm;
i->rn = (i->w >> 16) & 0xf;
@@ -930,9 +930,9 @@ static Opcode opcodes[] =
"SWPB", armdpi, 0, "R%s,(R%n),R%d",
/* 48+16+4 */
- "MOV%u%C%p", armhwby, 0, "R%d,(R%n%UR%M)",
+ "MOV%u%C%p", armhwby, 0, "R%d,(R%n%UR%s)",
"MOV%u%C%p", armhwby, 0, "R%d,%I",
- "MOV%u%C%p", armhwby, armfmov, "(R%n%UR%M),R%d",
+ "MOV%u%C%p", armhwby, armfmov, "(R%n%UR%s),R%d",
"MOV%u%C%p", armhwby, armfmov, "%I,R%d",
/* 48+24 */