This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] ARM sim: Fix for loading unaligned thumb instructions


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]