Commit 2b278303 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

_kernel_unwind now understands SFMFD instructions in function entry.

It also copes with STFE now - it was totally broken.
32-bit stubs and corresponding LibInit SWIs created.
All rather untested.

Version 4.97, 4.12.2.3. Tagged as 'RISC_OSLib-4_97-4_12_2_3'
parent e6cf1730
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
GET Hdr:ListOpts
GET Hdr:Machine.<Machine>
GET Hdr:CPU.Generic26
GET Hdr:Macros
GET Hdr:SWIs
GET Hdr:RISCOS
GBLL StrongARM
GBLL SASTMhatbroken
StrongARM SETL :DEF: AMBKernel
SASTMhatbroken SETL {TRUE} :LAND: StrongARM
[ StrongARM
;macro to synchronise to $Ncodewords words of code on (FD) stack
MACRO
SyncStackCode $Ncodewords
STMFD sp!,{r0-r2,lr}
MOV r0,#1 ;means range specified in r1,r2
ADD r1,sp,#4*4 ;start address (allowing for stacked r0-r2,lr)
ADD r2,r1,#($Ncodewords-1)*4 ;end address (inclusive) for $Ncodewords words of code
SWI XOS_SynchroniseCodeAreas ;do the necessary
LDMFD sp!,{r0-r2,lr}
MEND
]
END
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