diff --git a/s/Exceptions b/s/Exceptions index b0cc9bb67b38522a060366a12668cc33cce89655..db1e1a809cc5583cf9bf5ac230bda08af112b090 100644 --- a/s/Exceptions +++ b/s/Exceptions @@ -18,11 +18,11 @@ ; ; Exception veneers - [ AMB_LazyMapIn -; Instruction fetch abort pre-veneer, just to field possible lazy AMB aborts +; Instruction fetch abort pre-veneer ; PAbPreVeneer ROUT Push "r0-r7, lr" ; wahey, we have an abort stack + [ AMB_LazyMapIn SUB r0, lr_abort, #4 ; aborting address MOV r2, #1 BL AMB_LazyFixUp ; can trash r0-r7, returns NE status if claimed and fixed up @@ -31,11 +31,18 @@ PAbPreVeneer ROUT SUBNES pc, lr_abort, #4 ; restart aborting instruction if fixed up BL AMB_MakeFullyHonest ; PAbHan might not support recursive aborts LDR lr, [sp, #8*4] ; (not a lazy abort) restore lr + ] + ; Remember the details of this abort, for OS_ReadSysInfo 7 + LDR r4, =ZeroPage+Abort32_dumparea + MSR SPSR_cxsf, r1 + STR lr, [r4] ; dump 32-bit PC + STR r1, [r4, #4] ; dump 32-bit PSR + STR lr, [r4, #2*4] ; fault address is PC (yes, PC, not PC-4) + LDR r0, =ZeroPage+PAbHan ; we want to jump to PAb handler, in abort mode LDR r0, [r0] STR r0, [sp, #8*4] Pull "r0-r7, pc" - ] DAbPreVeneer ROUT diff --git a/s/Kernel b/s/Kernel index 96bd5e0173d794f556f2d120695e9e637c2481df..1bbc2714ed25b7e042229b877e604c4eff33fd46 100644 --- a/s/Kernel +++ b/s/Kernel @@ -376,12 +376,7 @@ DefaultProcVecs DefaultPreVeneers UndPreVeneer * ZeroPage+ProcVecPreVeneers+(.-DefaultPreVeneers) LDR PC, DefaultPreVeneers-ProcVecPreVeneers+UndHan - [ AMB_LazyMapIn DCD 0 - | -PAbPreVeneer * ZeroPage+ProcVecPreVeneers+(.-DefaultPreVeneers) - LDR PC, DefaultPreVeneers-ProcVecPreVeneers+PAbHan - ] DCD 0 AdXPreVeneer * ZeroPage+ProcVecPreVeneers+(.-DefaultPreVeneers) LDR PC, DefaultPreVeneers-ProcVecPreVeneers+AdXHan