Commit 34ca22f5 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix objasm 4 warnings. Allow math code to make use of CLZ. Fix potential crash.

Detail:
  s/Font_BasFP - Uses Hdr:CPU.Arch to decide whether to use CLZ in IFLT routine. Also fixed nasty crash on 32bit systems where FNRMB tail-calls IFLTA; 32bit versions of IFLT stack the LR, but FNRMB wasn't stacking it before jumping into the middle of the code.
  s/Fonts01 - Split up an LDM to avoid deprecated LDM {LR,PC} warning
Admin:
  Tested on rev A2 BB-xM


Version 3.69. Tagged as 'Manager-3_69'
parent 21614008
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.68"
Module_Version SETA 368
Module_MajorVersion SETS "3.69"
Module_Version SETA 369
Module_MinorVersion SETS ""
Module_Date SETS "24 Sep 2011"
Module_ApplicationDate SETS "24-Sep-11"
Module_ComponentName SETS "Manager"
Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
Module_FullVersion SETS "3.68"
Module_HelpVersion SETS "3.68 (24 Sep 2011)"
Module_FullVersion SETS "3.69"
Module_HelpVersion SETS "3.69 (24 Sep 2011)"
END
/* (3.68)
/* (3.69)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.68
#define Module_MajorVersion_CMHG 3.69
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 24 Sep 2011
#define Module_MajorVersion "3.68"
#define Module_Version 368
#define Module_MajorVersion "3.69"
#define Module_Version 369
#define Module_MinorVersion ""
#define Module_Date "24 Sep 2011"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "Manager"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
#define Module_FullVersion "3.68"
#define Module_HelpVersion "3.68 (24 Sep 2011)"
#define Module_LibraryVersionInfo "3:68"
#define Module_FullVersion "3.69"
#define Module_HelpVersion "3.69 (24 Sep 2011)"
#define Module_LibraryVersionInfo "3:69"
......@@ -17,6 +17,10 @@
;..................................................................................
; float integer in FACC
; Note: Exits EQ if FACC==0, else flags preserved
GBLL UseCLZ
UseCLZ SETL :LNOT: (NoARMv5 :LOR: NoARMT)
IFLT
Debug fp,"IFLT in : FACC =",FACC
......@@ -29,8 +33,14 @@ IFLT
BEQ IFLTZ ;exit if number 0
AND FSIGN,FSIGN,#&80000000
RSBMI FACC,FACC,#0 ;complement number if rqd
[ UseCLZ
CLZ FACCX,FACC
MOV FACC,FACC,LSL FACCX
RSB FACCX,FACCX,#&A0
|
MOV FACCX,#&A0 ;initial exponent
IFLTA CMP FACC,#&10000
IFLTA
CMP FACC,#&10000
MOVCC FACC,FACC,LSL #16
SUBCC FACCX,FACCX,#16
CMP FACC,#&1000000
......@@ -45,6 +55,7 @@ IFLTA CMP FACC,#&10000
CMP FACC,#&80000000
MOVCC FACC,FACC,LSL #1
SUBCC FACCX,FACCX,#1
]
Debug fp,"IFLT out: FACC,FACCX,FSIGN =",FACC,FACCX,FSIGN
[ No32bitCode
MOVS PC,LR
......@@ -361,11 +372,27 @@ FSWTOA MOV FSIGN,FWSIGN
FNRMB MOVS FACC,FGRD ; if facc zero then facc:=fgrd
BEQ FCLR
SUBS FACCX,FACCX,#32 ; exponent dec by word
[ UseCLZ
BMI FCLR
CLZ FGRD,FACC
MOV FACC,FACC,LSL FGRD
SUB FACCX,FACCX,FGRD
MOV PC,LR
|
[ :LNOT:No32bitCode
BMI FCLR
Push LR
SavePSR LR
B IFLTA
|
BPL IFLTA
]
]
;..................................................................................
; clear facc
; Note: Can fall through from above
FCLR MOV FACCX,#0
MOV FACC,#0
......
......@@ -3891,7 +3891,8 @@ TryPrinterDriver Entry "R8"
MOV R8,R11 ; SWI offset (Font SWI)
SWI XPDriver_FontSWI
Pull "$Proc_RegList,LR,PC" ; ignore rest of font code
PullEnv
Pull "PC" ; ignore rest of font code
;;----------------------------------------------------------------------------
;; SWI decoding entry point
......
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