Commit 0f599593 authored by Ben Avison's avatar Ben Avison
Browse files

Architecture-specific speedups

Detail:
  Various new architecture features used to read signed and unsigned
  halfwords and 3-byte values from arbitrary alignments - used for parsing
  UTF-16 strings and embedded control sequences.
  * when targetting only ARMv4 or later, uses LDRSB, LDRH, LDRSH
  * when targetting only ARMv6 or later, uses unaligned LDR (unless the
    NoUaligned switch is set in Hdr:Machine.Machine)
  * when targetting only ARMv6T2 or later, uses SBFX (not currently
    supported by objasm, so uses DCI instead)
  Added ENTRY directive to permit building of GPA debug listing.
Admin:
  Builds, but not tested.

Version 3.63. Tagged as 'Manager-3_63'
parent 85b3d7f5
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.62"
Module_Version SETA 362
Module_MajorVersion SETS "3.63"
Module_Version SETA 363
Module_MinorVersion SETS ""
Module_Date SETS "11 Jun 2009"
Module_ApplicationDate SETS "11-Jun-09"
Module_Date SETS "16 Jun 2009"
Module_ApplicationDate SETS "16-Jun-09"
Module_ComponentName SETS "Manager"
Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
Module_FullVersion SETS "3.62"
Module_HelpVersion SETS "3.62 (11 Jun 2009)"
Module_FullVersion SETS "3.63"
Module_HelpVersion SETS "3.63 (16 Jun 2009)"
END
/* (3.62)
/* (3.63)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.62
#define Module_MajorVersion_CMHG 3.63
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 11 Jun 2009
#define Module_Date_CMHG 16 Jun 2009
#define Module_MajorVersion "3.62"
#define Module_Version 362
#define Module_MajorVersion "3.63"
#define Module_Version 363
#define Module_MinorVersion ""
#define Module_Date "11 Jun 2009"
#define Module_Date "16 Jun 2009"
#define Module_ApplicationDate "11-Jun-09"
#define Module_ApplicationDate "16-Jun-09"
#define Module_ComponentName "Manager"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
#define Module_FullVersion "3.62"
#define Module_HelpVersion "3.62 (11 Jun 2009)"
#define Module_LibraryVersionInfo "3:62"
#define Module_FullVersion "3.63"
#define Module_HelpVersion "3.63 (16 Jun 2009)"
#define Module_LibraryVersionInfo "3:63"
......@@ -29,6 +29,7 @@ origin
GET hdr:Macros
GET hdr:System
GET hdr:Machine.<Machine>
GET hdr:CPU.Arch
GET hdr:CMOS
GET hdr:ModHand
GET hdr:Proc
......
......@@ -1906,6 +1906,7 @@ lfff_baseencoding * 1 :SHL: 4 ; set => this refers to a base e
;;----------------------------------------------------------------------------
ASSERT (.=origin) ; check that no code precedes this
ENTRY
MySWIBase * Module_SWISystemBase + (FontSWI * Module_SWIChunkSize)
......
......@@ -2798,9 +2798,13 @@ readnextchar Entry "R1-R4,R7"
CMP R0,#&DC00
BHS %FT95
[ NoARMv4
LDR R2,[R1],#2
MOV R2,R2,LSL #16
MOV R2,R2,LSR #16
|
LDRH R2,[R1],#2
]
SUB R2,R2,#&DC00
CMP R2,#&400
BHS %FT96 ; wasn't a continuation code - step back
......@@ -2844,9 +2848,13 @@ readuint1_R1
CMP R0,#paint_16bit
LDRLOB R0,[R1],#1
LDRHI R0,[R1],#4 ; assume word-aligned
[ NoARMv4
LDREQ R0,[R1],#2 ; assume bottom 16 bits are OK for half-word access
MOVEQ R0,R0,LSL #16
MOVEQ R0,R0,LSR #16
|
LDREQH R0,[R1],#2
]
MOV PC,LR
......@@ -2871,6 +2879,7 @@ readint1_R1
AND R0,R0,#paint_16bit:OR:paint_32bit
CMP R0,#paint_16bit
[ NoARMv4
LDRLOB R0,[R1],#1
MOVLO R0,R0,LSL #24 ; sign-extend
MOVLO R0,R0,ASR #24
......@@ -2878,6 +2887,11 @@ readint1_R1
LDREQ R0,[R1],#2 ; assume bottom 16 bits are OK for half-word access
MOVEQ R0,R0,LSL #16
MOVEQ R0,R0,ASR #16
|
LDRLOSB R0,[R1],#1
LDRHI R0,[R1],#4 ; assume word-aligned
LDREQSH R0,[R1],#2
]
MOV PC,LR
......@@ -2902,21 +2916,42 @@ readint3_R1 Entry
AND R14,R14,#paint_16bit:OR:paint_32bit
CMP R14,#paint_16bit
[ NoARMv6 :LOR: NoUnaligned
LDRLOB R0,[R1],#1 ; byte 0
LDRLOB R14,[R1],#1
ORRLO R0,R0,R14,ASL #8 ; byte 1
[ NoARMv4
LDRLOB R14,[R1],#1 ; byte 2
ORRLO R0,R0,R14,ASL #16
MOVLO R0,R0,ASL #8 ; sign-extend
MOVLO R0,R0,ASR #8
|
LDRLOSB R14,[R1],#1 ; byte 2
ORRLO R0,R0,R14,ASL #16
]
[ NoARMv4
LDREQ R0,[R1],#2 ; note that this could span a word boundary
LDREQ R14,[R1],#2
MOVEQ R0,R0,LSL #16
MOVEQ R0,R0,LSR #16
|
LDREQH R0,[R1],#2 ; note that this could span a word boundary
LDREQH R14,[R1],#2
]
ORREQ R0,R0,R14,LSL #16
LDRHI R0,[R1],#4
|
LDR R0,[R1],#4 ; unaligned load
SUBLO R1,R1,#1
[ NoARMT2
MOVLO R0,R0,ASL #8 ; sign-extend
MOVLO R0,R0,ASR #8
|
DCI &37B70050 ; SBFXLO R0,R0,#0,#24
]
]
EXIT
......@@ -2941,6 +2976,7 @@ readRGB_R1 Entry
AND R14,R14,#paint_16bit:OR:paint_32bit
CMP R14,#paint_16bit
[ NoARMv6 :LOR: NoUnaligned
LDRLOB R0,[R1],#1 ; R1 = background RGB (later)
LDRLOB R14,[R1],#1
ORRLO R0,R0,R14,LSL #8
......@@ -2948,13 +2984,23 @@ readRGB_R1 Entry
ORRLO R0,R0,R14,LSL #16
MOVLO R0,R0,LSL #8 ; &BBGGRR00
[ NoARMv4
LDREQ R0,[R1],#2 ; note that this could span a word boundary
LDREQ R14,[R1],#2
MOVEQ R0,R0,LSL #16
MOVEQ R0,R0,LSR #16 ; &0000RR00
|
LDREQH R0,[R1],#2 ; note that this could span a word boundary
LDREQH R14,[R1],#2
]
ORREQ R0,R0,R14,LSL #16 ; &BBGGRR00
LDRHI R0,[R1],#4 ; easy in 32-bit mode
|
LDR R0,[R1],#4 ; unaligned load
SUBLO R1,R1,#1
MOVLO R0,R0,LSL #8 ; &BBGGRR00
]
EXIT
......
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