From 55f92e24119ddaea5b89c47b656ef51d8d81c6bf Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 23 Mar 2024 20:31:25 -0400 Subject: [PATCH] Adjust data abort address. --- InstructionSets/ARM/Registers.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/InstructionSets/ARM/Registers.hpp b/InstructionSets/ARM/Registers.hpp index 9e0121567..b08567272 100644 --- a/InstructionSets/ARM/Registers.hpp +++ b/InstructionSets/ARM/Registers.hpp @@ -166,10 +166,12 @@ struct Registers { case Exception::Address: return 4; // "A Data Abort requires [work before a return], the return being - // done by SUBS PC, R14_svc, #8". - case Exception::DataAbort: return 8; + // done by SUBS PC, R14_svc, #8" (and returning to the instruction + // that aborted). + case Exception::DataAbort: return 4; - // "To continue after a Prefetch Abort use SUBS PC, R14_svc #4". + // "To continue after a Prefetch Abort use SUBS PC, R14_svc #4. + // This will attempt to re-execute the aborting instruction." case Exception::PrefetchAbort: return 4; // "To return from a SWI, use MOVS PC, R14_svc. This returns to the instruction