Scalar register cleanup

This commit is contained in:
Sauraen
2024-12-29 21:29:58 -08:00
parent 13cd4cc070
commit db28ec8fd5
3 changed files with 428 additions and 283 deletions

View File

@@ -126,6 +126,9 @@ In the true codepath of Sched_TaskComplete:
OS_YIELD_DATA_SIZE - sizeof(F3DEX3YieldDataFooter));
osInvalDCache(footer, sizeof(F3DEX3YieldDataFooter));
bcopy(footer, &gRSPProfilingResults, sizeof(F3DEX3YieldDataFooter));
/* The second invalidate is to get the footer out of the CPU cache,
because it could get written back and overwrite newer data in RAM */
osInvalDCache(footer, sizeof(F3DEX3YieldDataFooter));
}
#endif
```

679
f3dex3.s

File diff suppressed because it is too large Load Diff

29
notes.s
View File

@@ -57,3 +57,32 @@ suv $v27[4], ( 0)($11) // U4 U5 U6 U7 P0 P1 P2 P3
suv $v27[5], ( 0)($11) // U5 U6 U7 P0 P1 P2 P3 P4
suv $v27[6], ( 0)($11) // U6 U7 P0 P1 P2 P3 P4 P5
suv $v27[7], ( 0)($11) // U7 P0 P1 P2 P3 P4 P5 P6
// ltv patterns: all 8 instr below produce (values are address loaded to each element)
ltv $v0[ 0], (0x00)($11) // $v0 = 00 10 20 30 40 50 60 70 // $v0 always gets bytes 0-1
ltv $v0[14], (0x10)($11) // $v1 = 72 02 12 22 32 42 52 62 // $v1 always gets bytes 2-3
ltv $v0[12], (0x20)($11) // $v2 = 64 74 04 14 24 34 44 54
ltv $v0[10], (0x30)($11) // $v3 = 56 66 76 06 16 26 36 46
ltv $v0[ 8], (0x40)($11) // $v4 = 48 58 68 78 08 18 28 38
ltv $v0[ 6], (0x50)($11) // $v5 = 3A 4A 5A 6A 7A 0A 1A 2A
ltv $v0[ 4], (0x60)($11) // $v6 = 2C 3C 4C 5C 6C 7C 0C 1C
ltv $v0[ 2], (0x70)($11) // $v7 = 1E 2E 3E 4E 5E 6E 7E 0E
// Or this pattern
ltv $v0[ 0], (0x00)($11) // $v0 = 00 70 60 50 40 30 20 10
ltv $v0[ 2], (0x10)($11) // $v1 = 12 02 72 62 52 42 32 22
ltv $v0[ 4], (0x20)($11) // $v2 = 24 14 04 74 64 54 44 34
ltv $v0[ 6], (0x30)($11) // $v3 = 36 26 16 06 76 66 56 46
ltv $v0[ 8], (0x40)($11) // $v4 = 48 38 28 18 08 78 68 58
ltv $v0[10], (0x50)($11) // $v5 = 5A 4A 3A 2A 1A 0A 7A 6A
ltv $v0[12], (0x60)($11) // $v6 = 6C 5C 4C 3C 2C 1C 0C 7C
ltv $v0[14], (0x70)($11) // $v7 = 7E 6E 5E 4E 3E 2E 1E 0E
// stv patterns: values are 16 bit reg/elem stored, e.g. 45 = $v4[e5]
stv $v0[ 0], (0x00)($11) // mem[0x00] = 00 11 22 33 44 55 66 77
stv $v0[ 2], (0x10)($11) // mem[0x10] = 10 21 32 43 54 65 76 07
stv $v0[ 4], (0x20)($11) // mem[0x20] = 20 31 42 53 64 75 06 17
stv $v0[ 6], (0x30)($11) // mem[0x30] = 30 41 52 63 74 05 16 27
stv $v0[ 8], (0x40)($11) // mem[0x40] = 40 51 62 73 04 15 26 37
stv $v0[10], (0x50)($11) // mem[0x50] = 50 61 72 03 14 25 36 47
stv $v0[12], (0x60)($11) // mem[0x60] = 60 71 02 13 24 35 46 57
stv $v0[14], (0x70)($11) // mem[0x70] = 70 01 12 23 34 45 56 67