This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] ARM sim: Fix for loading unaligned thumb instructions
- To: binutils at sources dot redhat dot com
- Subject: [PATCH] ARM sim: Fix for loading unaligned thumb instructions
- From: Nick Clifton <nickc at redhat dot com>
- Date: 20 Mar 2001 09:50:19 -0800
Hi Guys,
I have checked in the following patch to prevent an alignment trap
in the arm simulator when loading unaligned thumb instructions.
Cheers
Nick
2001-03-20 Nick Clifton <nickc@redhat.com>
* armvirt.c (ARMul_ReLoadInstr): Do not enable alignment checking
when loading unaligned thumb instructions.
Index: armvirt.c
===================================================================
RCS file: /cvs/src//src/sim/arm/armvirt.c,v
retrieving revision 1.5
diff -p -r1.5 armvirt.c
*** armvirt.c 2001/02/28 01:04:24 1.5
--- armvirt.c 2001/03/20 17:47:46
*************** ARMul_ReLoadInstr (ARMul_State * state,
*** 192,199 ****
if ((isize == 2) && (address & 0x2))
{
/* We return the next two halfwords: */
! ARMword lo = GetWord (state, address, TRUE);
! ARMword hi = GetWord (state, address + 4, TRUE);
if (state->bigendSig == HIGH)
return (lo << 16) | (hi >> 16);
--- 192,199 ----
if ((isize == 2) && (address & 0x2))
{
/* We return the next two halfwords: */
! ARMword lo = GetWord (state, address, FALSE);
! ARMword hi = GetWord (state, address + 4, FALSE);
if (state->bigendSig == HIGH)
return (lo << 16) | (hi >> 16);