This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: sim/1282: Thumb add pc,rn should not word align pc
- From: David McQUillan <dmcq2002 at yahoo dot co dot uk>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 14 Jul 2003 14:08:00 -0000
- Subject: Re: sim/1282: Thumb add pc,rn should not word align pc
- Reply-to: David McQUillan <dmcq2002 at yahoo dot co dot uk>
The following reply was made to PR sim/1282; it has been noted by GNATS.
From: =?iso-8859-1?q?David=20McQUillan?= <dmcq2002@yahoo.co.uk>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: sim/1282: Thumb add pc,rn should not word align pc
Date: Mon, 14 Jul 2003 15:04:25 +0100 (BST)
--0-1719933879-1058191465=:27518
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id:
Content-Disposition: inline
Sorry, here is that?diff file I mentioned in my
report.
I'm also just myself at this yahoo mailbox, please
discount that company mailbox I used as any
communication using that should have some enormous
legal disclaimer.
David McQuillan
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
--0-1719933879-1058191465=:27518
Content-Type: text/plain; name="diff.txt"
Content-Description: diff.txt
Content-Disposition: inline; filename="diff.txt"
diff -pcw arm/armemu.c arm2/armemu.c
*** arm/armemu.c Mon Jul 14 12:09:42 2003
--- arm2/armemu.c Mon Jul 14 14:30:38 2003
*************** check_PMUintr:
*** 2015,2021 ****
break;
case 0x28: /* ADD immed */
! dest = LHS + DPImmRHS;
WRITEDEST (dest);
break;
--- 2015,2022 ----
break;
case 0x28: /* ADD immed */
! /* Word align pc for Thumb equivalent. */
! dest = LHSTW + DPImmRHS;
WRITEDEST (dest);
break;
*************** check_PMUintr:
*** 2473,2479 ****
break;
case 0x59: /* Load Word, No WriteBack, Pre Inc, Immed. */
! (void) LoadWord (state, instr, LHS + LSImmRHS);
break;
case 0x5a: /* Store Word, WriteBack, Pre Inc, Immed. */
--- 2474,2481 ----
break;
case 0x59: /* Load Word, No WriteBack, Pre Inc, Immed. */
! /* Word align pc for Thumb equivalent. */
! (void) LoadWord (state, instr, LHSTW + LSImmRHS);
break;
case 0x5a: /* Store Word, WriteBack, Pre Inc, Immed. */
diff -pcw arm/armemu.h arm2/armemu.h
*** arm/armemu.h Mon Jul 14 12:10:04 2003
--- arm2/armemu.h Mon Jul 14 14:28:16 2003
*************** extern ARMword isize;
*** 312,324 ****
#define DEST (state->Reg[DESTReg])
#ifdef MODE32
#ifdef MODET
! #define LHS ((LHSReg == 15) ? (state->Reg[15] & 0xFFFFFFFC): (state->Reg[LHSReg]))
#else
! #define LHS (state->Reg[LHSReg])
#endif
#else
! #define LHS ((LHSReg == 15) ? R15PC : (state->Reg[LHSReg]))
#endif
#define MULDESTReg (BITS (16, 19))
--- 312,330 ----
#define DEST (state->Reg[DESTReg])
#ifdef MODE32
+ #define LHS (state->Reg[LHSReg])
+ #else
+ #define LHS ((LHSReg == 15) ? R15PC : (state->Reg[LHSReg]) )
+ #endif
+
+ #ifdef MODE32
#ifdef MODET
! #define LHSTW ((LHSReg == 15) ? (state->Reg[15] & 0xFFFFFFFC): (state->Reg[LHSReg]))
#else
! #define LHSTW (state->Reg[LHSReg])
#endif
#else
! #define LHSTW ((LHSReg == 15) ? R15PC : (state->Reg[LHSReg]) )
#endif
#define MULDESTReg (BITS (16, 19))
--0-1719933879-1058191465=:27518--