Commit 02ca29e9 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Collapse old switches.

Removed braces selecting code from 0.47 0.50 and 0.55, this is over 80
versions ago and just confusing.
Binary the same, not tagged.
parent 8ef703da
No related merge requests found
...@@ -32,7 +32,7 @@ SpriteExtend_SWIDecode ...@@ -32,7 +32,7 @@ SpriteExtend_SWIDecode
Debug gs,"R12 = ",R12 Debug gs,"R12 = ",R12
Debug gs,"R11 = ",R11 Debug gs,"R11 = ",R11
CMP r11, #2 ; JPEG_PlotScaled ? CMP r11, #2 ; JPEG_PlotScaled ?
CMPNE r11, #3 ; JPEG_plotFileScaled ? CMPNE r11, #3 ; JPEG_PlotFileScaled ?
CMPNE r11, #4 ; JPEG_PlotTransformed ? CMPNE r11, #4 ; JPEG_PlotTransformed ?
CMPNE r11, #5 ; JPEG_PlotFileTransformed ? CMPNE r11, #5 ; JPEG_PlotFileTransformed ?
BNE NonPrinterSWI BNE NonPrinterSWI
......
...@@ -826,9 +826,7 @@ stack_masko # 4 ; copy ...@@ -826,9 +826,7 @@ stack_masko # 4 ; copy
stack_calladdr # 4 ; copy stack_calladdr # 4 ; copy
stack_calladdr2 # 4 ; copy stack_calladdr2 # 4 ; copy
stack_returnaddr # 4 stack_returnaddr # 4
[ Module_Version >= 047
stack_maskword # 4 ; = (2^outlog2bpp)-1 ROR outlog2bpp stack_maskword # 4 ; = (2^outlog2bpp)-1 ROR outlog2bpp
]
stack_maskinptr # 4 ; destroyable copy for inside loop stack_maskinptr # 4 ; destroyable copy for inside loop
stack_maskinshift # 4 ; destroyable copy for inside loop stack_maskinshift # 4 ; destroyable copy for inside loop
stack_temp1 # 4 ; for temp saving of registers inside loop stack_temp1 # 4 ; for temp saving of registers inside loop
...@@ -876,9 +874,7 @@ save_xftimesyf # 4 ...@@ -876,9 +874,7 @@ save_xftimesyf # 4
save_xmag # 4 save_xmag # 4
save_ymag # 4 save_ymag # 4
[ Module_Version >= 047
save_inflags # 4 save_inflags # 4
]
save_inlog2bpp # 4 save_inlog2bpp # 4
save_inlog2bpc # 4 save_inlog2bpc # 4
save_inbpp # 4 save_inbpp # 4
...@@ -3021,8 +3017,6 @@ cantdoinOS ...@@ -3021,8 +3017,6 @@ cantdoinOS
LDR R6,save_calladdr2 LDR R6,save_calladdr2
LDR R9,save_maskinptr LDR R9,save_maskinptr
LDR R10,save_maskinshift LDR R10,save_maskinshift
;
[ Module_Version >=047
; ;
MVN R8,#0 ;fixes for 32bpp, amg MVN R8,#0 ;fixes for 32bpp, amg
CMP R0,#32 CMP R0,#32
...@@ -3031,9 +3025,6 @@ cantdoinOS ...@@ -3031,9 +3025,6 @@ cantdoinOS
Debug cn,"maskword ",R8 Debug cn,"maskword ",R8
; ;
Push "R0-R12" ; R7 = space for stack_returnaddr Push "R0-R12" ; R7 = space for stack_returnaddr
|
Push "R0-R11" ; R7 = space for stack_returnaddr
]
; ;
ADR R14,save_block ADR R14,save_block
LDMIA R14,{R0-R9} ; R10 irrelevant, R12 set up already LDMIA R14,{R0-R9} ; R10 irrelevant, R12 set up already
...@@ -3283,8 +3274,6 @@ checktrans Entry ...@@ -3283,8 +3274,6 @@ checktrans Entry
LDR R9,BPP ; R9 = output depth LDR R9,BPP ; R9 = output depth
MOV R10,#0 ; R10 = index / counter MOV R10,#0 ; R10 = index / counter
[ Module_Version >= 047
CMP LR,#16 CMP LR,#16
BCC checktrans1 ; branch if input is 8bpp or below BCC checktrans1 ; branch if input is 8bpp or below
...@@ -3463,7 +3452,6 @@ mungeGCOL8to16 ...@@ -3463,7 +3452,6 @@ mungeGCOL8to16
EOR R0,R0,R1,LSL #4 EOR R0,R0,R1,LSL #4
MOV PC,LR MOV PC,LR
] ]
]
checktrans_old checktrans_old
SUBS R8,R8,#1 ; loop until -ve value SUBS R8,R8,#1 ; loop until -ve value
...@@ -4017,23 +4005,6 @@ do_fillins ...@@ -4017,23 +4005,6 @@ do_fillins
Debug mb,"composite word to store",R14 Debug mb,"composite word to store",R14
] ]
; ;
[ Module_Version >= 055
; no longer needed here - outoffset is pulled from the stack
|
ADR R14,pc_outoffset0
LDR R11,thisslot
LDR R11,[R14,R11]
LDR R0,save_outoffset
Debug mb,"Save offset = ",R0
LDR R14,pmt_outoffset
Debug mb,"pmt_outoffset = ",R14
SetImm R14,R0 ; don't convert_ROR it!!!
Debug mb,"Modified instruction = ",R14
Debug mb,"pc_outoffset for this routine ",R11
STR R14,[R11]
]
| |
LDR R11,pc_ecflimit LDR R11,pc_ecflimit
CMP R11,#0 CMP R11,#0
...@@ -4043,15 +4014,6 @@ do_fillins ...@@ -4043,15 +4014,6 @@ do_fillins
SetImm R14,R0,NE SetImm R14,R0,NE
STRNE R14,[R11] STRNE R14,[R11]
; ;
[ Module_Version >= 055
; no longer needed here - outoffset is pulled from the stack
|
LDR R11,pc_outoffset
LDR R0,save_outoffset
LDR R14,pmt_outoffset
SetImm R14,R0 ; don't convert_ROR it!!!
STR R14,[R11]
]
] ]
; ;
[ multibuffer [ multibuffer
...@@ -4094,8 +4056,6 @@ convert_ROR ...@@ -4094,8 +4056,6 @@ convert_ROR
; ############################## code fragments for newword ; ############################## code fragments for newword
[ Module_Version >= 047
pm_newword_ext LDR im1,[inptr,masko] pm_newword_ext LDR im1,[inptr,masko]
MOVS im1,im1,LSR #xxx ; inbpp MOVS im1,im1,LSR #xxx ; inbpp
MOVCS im2,#0 MOVCS im2,#0
...@@ -4127,7 +4087,6 @@ tm_newword_ext LDR im1,stack_masko ...@@ -4127,7 +4087,6 @@ tm_newword_ext LDR im1,stack_masko
MOVCS im2,#0 MOVCS im2,#0
tm_newword_extend LDRCC im2,stack_maskword ; (2^outbpp-1) ROR outbpp tm_newword_extend LDRCC im2,stack_maskword ; (2^outbpp-1) ROR outbpp
ASSERT (tm_newword_extend -tm_newword_ext) = (tm_newwordend -tm_newword) ASSERT (tm_newword_extend -tm_newword_ext) = (tm_newwordend -tm_newword)
]
; ### plot mask, old format mask ; ### plot mask, old format mask
...@@ -4289,7 +4248,6 @@ asm_newword ...@@ -4289,7 +4248,6 @@ asm_newword
BNE %FT01 BNE %FT01
; ;
TST R11,#mc_hasmask TST R11,#mc_hasmask
[ Module_Version >= 047
BEQ %FT47 BEQ %FT47
; ;
MOVS R2,R11,LSR #mcb_sprtype MOVS R2,R11,LSR #mcb_sprtype
...@@ -4319,13 +4277,6 @@ asm_newword ...@@ -4319,13 +4277,6 @@ asm_newword
PutAsm pm_newword, LT PutAsm pm_newword, LT
PutAsm pm_newword_ext, GE PutAsm pm_newword_ext, GE
47 47
|
GetAsm pm_newword,NE
SetLsr R2,vv_inbpp,NE
SetImm R4,vv_outbpptop,NE
PutAsm pm_newword,NE
]
;
TST R11,#mc_hasmask TST R11,#mc_hasmask
BEQ %FT61 BEQ %FT61
...@@ -4364,7 +4315,6 @@ asm_newword ...@@ -4364,7 +4315,6 @@ asm_newword
MOV PC,LR MOV PC,LR
01 01
TST R11,#mc_hasmask TST R11,#mc_hasmask
[ Module_Version >= 047
BEQ %FT47 BEQ %FT47
; ;
MOVS R1,R11,LSR #mcb_sprtype MOVS R1,R11,LSR #mcb_sprtype
...@@ -4390,13 +4340,6 @@ asm_newword ...@@ -4390,13 +4340,6 @@ asm_newword
PutAsm tm_newword,LT ; always modify based on input bpp and write instructions PutAsm tm_newword,LT ; always modify based on input bpp and write instructions
PutAsm tm_newword_ext,GE PutAsm tm_newword_ext,GE
47 47
|
GetAsm tm_newword,NE
SetLsr R3,vv_inbpp,NE
SetImm R5,vv_outbpptop,NE
PutAsm tm_newword,NE
]
;
TST R11,#mc_hasmask TST R11,#mc_hasmask
MOVNES R1,R11,LSR #mcb_sprtype MOVNES R1,R11,LSR #mcb_sprtype
...@@ -4740,8 +4683,6 @@ t_newpixel3end MOV in2,in2,LSR #8 ...@@ -4740,8 +4683,6 @@ t_newpixel3end MOV in2,in2,LSR #8
; adjustment needed ; adjustment needed
] ]
[ Module_Version >= 047
pt_newpixel_ext MOVS im1,im1,LSR #xxx ; inbpp pt_newpixel_ext MOVS im1,im1,LSR #xxx ; inbpp
MOVCS im2,#0 MOVCS im2,#0
pt_newpixel_extend LDRCC im2,stack_maskword ; (2^outbpp-1) ROR outbpp pt_newpixel_extend LDRCC im2,stack_maskword ; (2^outbpp-1) ROR outbpp
...@@ -4790,8 +4731,6 @@ t_newpixel232end NOP ...@@ -4790,8 +4731,6 @@ t_newpixel232end NOP
m_newpixel2_ext MOVCC in2,#0 m_newpixel2_ext MOVCC in2,#0
m_newpixel2_extend LDRCS in2,stack_maskword ; (2^outbpp-1) ROR outbpp m_newpixel2_extend LDRCS in2,stack_maskword ; (2^outbpp-1) ROR outbpp
ASSERT (m_newpixel2_extend -m_newpixel2_ext) = (m_newpixel2end -m_newpixel2) ASSERT (m_newpixel2_extend -m_newpixel2_ext) = (m_newpixel2end -m_newpixel2)
]
asm_newpixel asm_newpixel
Label l_newpixel Label l_newpixel
...@@ -4822,7 +4761,6 @@ asm_newpixel ...@@ -4822,7 +4761,6 @@ asm_newpixel
B %FT02 B %FT02
01 01
TST R11,#mc_hasmask TST R11,#mc_hasmask
[ Module_Version >= 047
BEQ %FT47 BEQ %FT47
MOVS R1,R11,LSR #mcb_sprtype MOVS R1,R11,LSR #mcb_sprtype
...@@ -4846,13 +4784,6 @@ asm_newpixel ...@@ -4846,13 +4784,6 @@ asm_newpixel
PutAsm pt_newpixel,LT PutAsm pt_newpixel,LT
PutAsm pt_newpixel_ext,GE PutAsm pt_newpixel_ext,GE
47 47
|
GetAsm pt_newpixel,NE
SetLsr R1,vv_inbpp,NE
SetImm R3,vv_outbpptop,NE
PutAsm pt_newpixel,NE
]
;
Debug cn,"adding two words for ttr" Debug cn,"adding two words for ttr"
;if doing 16->32 or 32->16 ;if doing 16->32 or 32->16
...@@ -4884,7 +4815,6 @@ asm_newpixel ...@@ -4884,7 +4815,6 @@ asm_newpixel
Branch BLEQ,l_newword Branch BLEQ,l_newword
TST R11,#mc_plotmask TST R11,#mc_plotmask
[ Module_Version >= 047
BEQ %FT47 BEQ %FT47
; ;
Debug cn,"newpixel2" Debug cn,"newpixel2"
...@@ -4894,14 +4824,6 @@ asm_newpixel ...@@ -4894,14 +4824,6 @@ asm_newpixel
PutAsm m_newpixel2,LT PutAsm m_newpixel2,LT
Asm m_newpixel2_ext,GE Asm m_newpixel2_ext,GE
47 47
|
GetAsm m_newpixel2,NE
SetImm R2,vv_outbpptop,NE
PutAsm m_newpixel2,NE
BNE %FT03
]
;
[ Module_Version >= 047
; ;
TST R11,#mc_ttr ; is there a translation table? TST R11,#mc_ttr ; is there a translation table?
BNE %FT53 BNE %FT53
...@@ -4976,12 +4898,6 @@ asm_newpixel ...@@ -4976,12 +4898,6 @@ asm_newpixel
SetLsr R2,vv_outbpp,LE SetLsr R2,vv_outbpp,LE
PutAsm t_newpixel2,LT PutAsm t_newpixel2,LT
PutAsm t_newpixel216,EQ PutAsm t_newpixel216,EQ
|
TST R11,#mc_ttr
GetAsm t_newpixel2,NE
SetLsr R2,vv_outbpp,NE
PutAsm t_newpixel2,NE
]
03 03
MOV PC,LR MOV PC,LR
...@@ -5065,16 +4981,10 @@ m_ecflimit CMP ecfptr,#xxx ; ecflimit ...@@ -5065,16 +4981,10 @@ m_ecflimit CMP ecfptr,#xxx ; ecflimit
AND ecfora,ecfora,outword AND ecfora,ecfora,outword
m_putmanyend AND ecfeor,ecfeor,outword m_putmanyend AND ecfeor,ecfeor,outword
[ Module_Version >= 55 ; Merged from 0.62 (GPS)
pmt_putmany22 STR R14,[outptr] ; " pmt_putmany22 STR R14,[outptr] ; "
LDR R14,stack_outoffset ; " LDR R14,stack_outoffset ; "
SUB outptr, outptr, R14 ; " SUB outptr, outptr, R14 ; "
pmt_putmany22end SUBS vcount,vcount,#1 ; " pmt_putmany22end SUBS vcount,vcount,#1 ; "
| ; "
pmt_putmany2 STR R14,[outptr],#-xxx ; outoffset
pmt_putmany2end SUBS vcount,vcount,#1
pmt_outoffset * pmt_putmany2
] ; Merged from 0.62 (GPS)
m_putmany2 LDR ecfptr,stack_ecfptr m_putmany2 LDR ecfptr,stack_ecfptr
m_putmany2end * m_putmany2 m_putmany2end * m_putmany2
...@@ -5119,13 +5029,8 @@ asm_putmany ...@@ -5119,13 +5029,8 @@ asm_putmany
STR R10,pc_outoffset ; remember for later STR R10,pc_outoffset ; remember for later
] ]
[ Module_Version >= 55 ; Merged from 0.62 (GPS)
; new version to get over implicit limit in old code ; new version to get over implicit limit in old code
Asm pmt_putmany22 ; Merged from 0.62 (GPS) Asm pmt_putmany22 ; Merged from 0.62 (GPS)
| ; Merged from 0.62 (GPS)
Debug cp,"pmt_putmany2"
Asm pmt_putmany2
] ; Merged from 0.62 (GPS)
Debug cp,"branch on NE to l_vloop+4" Debug cp,"branch on NE to l_vloop+4"
Branch BNE,l_vloop+4 ; allow for R14 on stack Branch BNE,l_vloop+4 ; allow for R14 on stack
......
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