Skip to content

Commit

Permalink
Optimise MBOX reading code
Browse files Browse the repository at this point in the history
  • Loading branch information
IanSB committed Nov 16, 2021
1 parent 5115325 commit 7b1176d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/macros.S
Expand Up @@ -369,8 +369,8 @@ skip_psync_loop_simple_fast\@:
b got_sample\@
.ltorg
read_registers\@:
tst r3, #BIT_NO_SKIP_HSYNC
beq got_sample\@
// tst r3, #BIT_NO_SKIP_HSYNC
// beq got_sample\@
wait\@:
ldr r8, [r4, r9]
eor r8, r3
Expand All @@ -379,8 +379,7 @@ wait\@:
beq wait\@
eor r8, r3

tst r8, #0x80000000 //flags last double word of capture
addeq r9, r9, #4
add r9, r9, #4
cmp r9, #(GPU_SYNC_offset - GPU_DATA_0_offset)
addeq r9, r9, #4
cmp r9, #GPU_DATA_5_offset
Expand Down Expand Up @@ -1249,6 +1248,19 @@ skip_psync_loop_simple_fast_loop\@:
ldreq r12, [r12]
.endm

.macro WRITE_R5_R6
stmia r0, {r5, r6}
tst r3, #BIT_NO_SCANLINES | BIT_OSD | BIT_NO_LINE_DOUBLE | BIT_INTERLACED_VIDEO
ldreq r8, =0x80808080
orreq r5, r5, r8
orreq r6, r6, r8
tst r3, #BIT_NO_LINE_DOUBLE
subeq r0, r0, r2
stmeqia r0, {r5, r6}
addeq r0, r0, r2
add r0, r0, #8
.endm

.macro WRITE_R5_R6_IF_LAST_16BPP
cmp r1, #1
stmeqia r0, {r5, r6}
Expand Down

0 comments on commit 7b1176d

Please sign in to comment.