From b41af2485acbc2c637bff1411b293124590a311c Mon Sep 17 00:00:00 2001
From: Stewart Brodie <sbrodie@gitlab.riscosopen.org>
Date: Tue, 9 May 2000 08:39:53 +0000
Subject: [PATCH] Fixed "SWI &6D656D not known" system collapse.

  Fixed multiple internationalisation of error message.
Detail:
  Somebody had decided to write a comment that R0-R2 needed to be
    unstacked before exiting the dynamic area remove routine, but
    then forgot to do so.  The crash is the same each time, as the
    address of MessageTrans error buffer it was trying to return
    is the value mistakenly loaded in R15.
  Kernel doesn't try to translate error messages multiple times.
    Not only does this give rise to errors about not being able
    to translate error messages, but causes MessageTrans to have to
    search repeatedly for non-existant tokens, slowing things down
    enormously.
Admin:
  Tested in Ursula build.
  Not a complete fix - FileCore now leaks map & buffer dynamic areas
    whenever the RAM disc size is altered, but that needs to be fixed
    in FileCore (it needs to accept that OS_ChangeDynamicArea is not
    re-entrant and delete the DAs on a callback)

Version 5.26. Tagged as 'Kernel-5_26'
---
 VersionASM  |  8 ++++----
 VersionNum  | 14 +++++++-------
 s/ChangeDyn | 11 +----------
 3 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/VersionASM b/VersionASM
index 3e721d9d..acc7c8f0 100644
--- a/VersionASM
+++ b/VersionASM
@@ -6,9 +6,9 @@
                         GBLS    Module_MinorVersion
                         GBLS    Module_Date
                         GBLS    Module_FullVersion
-Module_MajorVersion     SETS    "5.25"
-Module_Version          SETA    525
+Module_MajorVersion     SETS    "5.26"
+Module_Version          SETA    526
 Module_MinorVersion     SETS    ""
-Module_Date             SETS    "08 May 2000"
-Module_FullVersion      SETS    "5.25"
+Module_Date             SETS    "09 May 2000"
+Module_FullVersion      SETS    "5.26"
                         END
diff --git a/VersionNum b/VersionNum
index 6b02bde8..51e7d009 100644
--- a/VersionNum
+++ b/VersionNum
@@ -1,15 +1,15 @@
-/* (5.25)
+/* (5.26)
  *
  * This file is automatically maintained by srccommit, do not edit manually.
  *
  */
-#define Module_MajorVersion_CMHG        5.25
+#define Module_MajorVersion_CMHG        5.26
 #define Module_MinorVersion_CMHG        
-#define Module_Date_CMHG                08 May 2000
+#define Module_Date_CMHG                09 May 2000
 
-#define Module_MajorVersion             "5.25"
-#define Module_Version                  525
+#define Module_MajorVersion             "5.26"
+#define Module_Version                  526
 #define Module_MinorVersion             ""
-#define Module_Date                     "08 May 2000"
+#define Module_Date                     "09 May 2000"
 
-#define Module_FullVersion              "5.25"
+#define Module_FullVersion              "5.26"
diff --git a/s/ChangeDyn b/s/ChangeDyn
index 8ede1fee..963524bc 100644
--- a/s/ChangeDyn
+++ b/s/ChangeDyn
@@ -155,15 +155,7 @@ CDS_PostService
 
         MOV     r1, r10                ; amount moved
 
-     [ International
-        Pull    "r0"
-        LDR     lr, [sp, #9*4]
-        TST     lr, #V_bit
-        BLNE    TranslateError
-        Pull    "r2-r9, r10, lr"
-     |
         Pull    "r0, r2-r9, r10, lr"
-     ]
         ExitSWIHandler
 
         MakeErrorBlock ChDynamNotAllMoved
@@ -873,9 +865,7 @@ DynArea_Remove ENTRY
         RSB     r1, r2, #0              ; negate it
         SWI     XOS_ChangeDynamicArea
         BVS     %FT80
-        STRVS   r0, [sp]
         Pull    "r0-r2"
-        EXIT    VS
 
 ; Issue service to tell TaskManager
 
@@ -907,6 +897,7 @@ DynArea_Remove ENTRY
         LDR     r1, [r10, #DANode_Size] ; get size after failed shrink
         SUB     r1, r2, r1              ; change needed to restore original size
         SWI     XOS_ChangeDynamicArea   ; ignore any error from this
+        Pull    "r0-r2"
         SETV
         EXIT
 
-- 
GitLab