Commit e6f4dbc1 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Fixed bug in _swi/_swix code.

Detail:
  This code would only work in 26-bit modes, since it stored the output
    flags using STR pc, [sp, #4*4]!.  When {CONFIG} is 32, it stores the
    CPSR instead.
Admin:
  Tested in 32-bit Lazarus build - this fixes the RCMMDriver stiffing
    (because it sits with interrupts off waiting for the C flag to be
    set on exit from an OS_Byte call it calls through _swix)

Version 5.19. Tagged as 'RISC_OSLib-5_19'
parent d1f38470
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
GBLS Module_HelpVersion
Module_MajorVersion SETS "5.18"
Module_Version SETA 518
Module_MajorVersion SETS "5.19"
Module_Version SETA 519
Module_MinorVersion SETS ""
Module_Date SETS "09 Oct 2000"
Module_ApplicationDate2 SETS "09-Oct-00"
Module_ApplicationDate4 SETS "09-Oct-2000"
Module_FullVersion SETS "5.18"
Module_HelpVersion SETS "5.18 (09 Oct 2000)"
Module_Date SETS "16 Oct 2000"
Module_ApplicationDate2 SETS "16-Oct-00"
Module_ApplicationDate4 SETS "16-Oct-2000"
Module_FullVersion SETS "5.19"
Module_HelpVersion SETS "5.19 (16 Oct 2000)"
END
/* (5.18)
/* (5.19)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 5.18
#define Module_MajorVersion_CMHG 5.19
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Oct 2000
#define Module_Date_CMHG 16 Oct 2000
#define Module_MajorVersion "5.18"
#define Module_Version 518
#define Module_MajorVersion "5.19"
#define Module_Version 519
#define Module_MinorVersion ""
#define Module_Date "09 Oct 2000"
#define Module_Date "16 Oct 2000"
#define Module_ApplicationDate2 "09-Oct-00"
#define Module_ApplicationDate4 "09-Oct-2000"
#define Module_ApplicationDate2 "16-Oct-00"
#define Module_ApplicationDate4 "16-Oct-2000"
#define Module_FullVersion "5.18"
#define Module_HelpVersion "5.18 (09 Oct 2000)"
#define Module_FullVersion "5.19"
#define Module_HelpVersion "5.19 (16 Oct 2000)"
......@@ -25,6 +25,16 @@ DDE SETL {TRUE}
GET s.h_Regs
GET s.h_Brazil
MACRO
$name StoreSWIXFlags
[ {CONFIG}=26
$name STR pc, [sp, #4*4]!
|
$name MRS lr, CPSR
STR lr, [sp, #4*4]!
]
MEND
AREA |C$$code|, CODE, READONLY
EXPORT |_swix|
......@@ -120,7 +130,7 @@ swi_beyond_a_joke
LDR lr, [sp, #48] ; SWI aborts or throws an error.
SWI XOS_CallASWIR12
LDR ip, [sp, #4] ; restore (ip -> args)
STR pc, [sp, #4*4]!
StoreSWIXFlags
LDR lr, [sp, #1*4]
;right, if R0 is also required as an output param, we'd better sort that first
TST lr,#&80000000
......@@ -241,7 +251,7 @@ swix0
MOV pc, sp ; Call routine on stack
SWIReturn
STR pc, [sp, #4*4]!
StoreSWIXFlags
] ; not StrongARM
SWIReturn2
LDR lr, [sp, #1*4]
......@@ -253,7 +263,7 @@ SWIReturn2
LDR lr, [sp, #1*4]
B ReturnTail
SWIXReturn
STR pc, [sp, #4*4]!
StoreSWIXFlags ; increments sp by 16
LDR lr, [sp, #1*4]
BVS VSetReturn
MOVS lr, lr, ASL #1 ; Shift out setting C if R0 to be written, N
......
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