From 518b5e5b1c71259ce0badc29f98db46a73c59442 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 1 Oct 2010 16:02:46 -0500 Subject: Debug: Implement getArgument() and function skipping for ARM. In the process make add skipFuction() to handle isa specific function skipping instead of ifdefs and other ugliness. For almost all ABIs, 64 bit arguments can only start in even registers. Size is now passed to getArgument() so that 32 bit systems can make decisions about register selection for 64 bit arguments. The number argument is now passed by reference because getArgument() will need to change it based on the size of the argument and the current argument number. For ARM, if the argument number is odd and a 64-bit register is requested the number must first be incremented to because all 64 bit arguments are passed in an even argument register. Then the number will be incremented again to access both halves of the argument. --- src/arch/arm/system.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/arch/arm/system.hh') diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh index adf6d4f7b..fe5ba6447 100644 --- a/src/arch/arm/system.hh +++ b/src/arch/arm/system.hh @@ -67,7 +67,10 @@ class ArmSystem : public System virtual Addr fixFuncEventAddr(Addr addr) { - //XXX This may eventually have to do something useful. + // Remove the low bit that thumb symbols have set + // but that aren't actually odd aligned + if (addr & 0x1) + return (addr & ~1) | PcTBit; return addr; } }; -- cgit v1.2.3