Commit f371938d authored by Ben Avison's avatar Ben Avison
Browse files

Corrected SVC stack save code.

Detail:
  The bottom four words of the SVC stack were being preserved across calls
  to Wimp_Poll. This is a curious choice, since the bottom seven words are
  reserved to hold run-time data, and C libraries to date have only used
  two words (the library and client relocation offsets). Changed to save
  all seven reserved words across Wimp_Poll.
Admin:
  Tested briefly on an Iyonix, with no visible ill effects.

Version 0.71. Tagged as 'TaskWindow-0_71'
parent 4469b1ef
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.68.
; Last processed by srccommit version: 1.2.
;
GBLS Module_MajorVersion
GBLA Module_Version
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.70"
Module_Version SETA 70
Module_MajorVersion SETS "0.71"
Module_Version SETA 71
Module_MinorVersion SETS ""
Module_Date SETS "24 Oct 2002"
Module_ApplicationDate SETS "24-Oct-02"
Module_Date SETS "08 Oct 2004"
Module_ApplicationDate SETS "08-Oct-04"
Module_ComponentName SETS "TaskWindow"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/TaskWindow"
Module_FullVersion SETS "0.70"
Module_HelpVersion SETS "0.70 (24 Oct 2002)"
Module_FullVersion SETS "0.71"
Module_HelpVersion SETS "0.71 (08 Oct 2004)"
END
/* (0.70)
/* (0.71)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
* Last processed by srccommit version: 1.2.
*
*/
#define Module_MajorVersion_CMHG 0.70
#define Module_MajorVersion_CMHG 0.71
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 24 Oct 2002
#define Module_Date_CMHG 08 Oct 2004
#define Module_MajorVersion "0.70"
#define Module_Version 70
#define Module_MajorVersion "0.71"
#define Module_Version 71
#define Module_MinorVersion ""
#define Module_Date "24 Oct 2002"
#define Module_Date "08 Oct 2004"
#define Module_ApplicationDate "24-Oct-02"
#define Module_ApplicationDate "08-Oct-04"
#define Module_ComponentName "TaskWindow"
#define Module_ComponentPath "RiscOS/Sources/Desktop/TaskWindow"
#define Module_FullVersion "0.70"
#define Module_HelpVersion "0.70 (24 Oct 2002)"
#define Module_LibraryVersionInfo "0:70"
#define Module_FullVersion "0.71"
#define Module_HelpVersion "0.71 (08 Oct 2004)"
#define Module_LibraryVersionInfo "0:71"
......@@ -4044,16 +4044,18 @@ SaveSVCStack ROUT
CMP r1, r13
BHI %b10
;
; Now save the fours words at the very base where C modules
; Now save the seven words at the very base where C modules
; have stack chunk information stored.
;
LDR r0, =&000FFFFF ; Megabyte mask
BIC r1, r1, r0 ; Base of stack
LDMIA r1, {r2-r5} ; The four registers
LDR r6, =&000FFFFF ; Megabyte mask
BIC r1, r1, r6 ; Base of stack
LDMIA r1!, {r2-r5} ; The first four words
ADRL r0, MySVCStack ; To
LDR r1, MySVCStackSize ; Size thereof
ADD r0, r0, r1 ; Address of slot at end
STMDB r0, {r2-r5} ; Copy them
LDR r6, MySVCStackSize ; Size thereof
ADD r0, r0, r6 ; Address of slot at end
STMDB r0!, {r2-r5} ; Copy them
LDMIA r1!, {r2-r4} ; The other three words
STMDB r0!, {r2-r4} ; Copy them
RestPSR r7,,f
MOV pc, r14
......@@ -4077,16 +4079,18 @@ RestoreSVCStack ROUT
CMP r1, r13
BHI %b10
;
; Now restore the fours words at the very base where C modules
; Now restore the seven words at the very base where C modules
; have stack chunk information stored.
;
ADRL r0, MySVCStack ; From
LDR r2, MySVCStackSize ; Size thereof
ADD r0, r0, r2 ; Address of slot at end
LDMDB r0, {r2-r5} ; The four registers
LDR r0, =&000FFFFF ; Megabyte mask
BIC r1, r1, r0 ; Base of stack
STMIA r1, {r2-r5} ; Copy them
LDR r6, MySVCStackSize ; Size thereof
ADD r0, r0, r6 ; Address of slot at end
LDMDB r0!, {r2-r5} ; The first four words
LDR r6, =&000FFFFF ; Megabyte mask
BIC r1, r1, r6 ; Base of stack
STMIA r1!, {r2-r5} ; Copy them
LDMDB r0!, {r2-r4} ; The other three words
STMIA r1!, {r2-r4} ; Copy them
RestPSR r7,,f
MOV pc, r14
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment