Files
CydandClaude Fable 5 db7745fcd0 sda4: commit the Glaze developer hard-drive dump
Un-ignored: the dev drive is the ground truth the restoration and
emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer
source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio
content). Kept in-repo for the pod-owner community.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 19:41:15 -05:00

261 lines
6.1 KiB
ArmAsm

.file "i860sem.c"
// PGC Rel 2.0a -opt 2
.text
.globl _SemWait
.align 8
_SemWait:
.a1 = 80
.f1 = 64
addu -(.a1+.f1), sp, sp
st.l fp,(.f1-16)(sp)
addu (.f1-16), sp, fp
st.l r1, 4(fp)
st.l r4, -40(fp)
st.l r5, -36(fp)
st.l r6, -32(fp)
st.l r7, -28(fp)
st.l r8, -24(fp)
st.l r9, -20(fp)
st.l r10, -16(fp)
st.l r11, -12(fp)
st.l r12, -8(fp)
st.l r16, 48(fp)
mov r17, r12
// lineno: 0
adds 1, r0, r5
// lineno: 0
.B158: //.B0000
shl 4, r12, r28
.DB.B158158:
adds 80, r28, r6
shl 2, r12, r29
ld.l 48(fp), r8
adds r29, r8, r7
addu 12, r8, r9
addu 8, r8, r10
addu 4, r8, r11
// lineno: 22
.B200: //.M0000
st.l r5, 0(r7)
.DB.B200200:
ld.l r0(r8), r28
ld.l r0(r11), r29
ld.l r0(r10), r16
adds r29, r28, r30
adds r16, r30, r17
ld.l r0(r9), r18
adds r18, r17, r4
bte r5, r4, .B201
mov r6, r16
st.l r0, 0(r7)
orh h%.B200, r0, r1
br _bla
or l%.B200, r1, r1
// lineno: 0
.B201: //.N0000
// lineno: 0
.B190: //.R0000
// lineno: 41
ld.l -40(fp), r4
ld.l -36(fp), r5
ld.l -32(fp), r6
ld.l -28(fp), r7
ld.l -24(fp), r8
ld.l -20(fp), r9
ld.l -16(fp), r10
ld.l -12(fp), r11
ld.l -8(fp), r12
adds .a1+16, fp, r31
ld.l 4(fp), r1
ld.l 0(fp), fp
bri r1
mov r31, sp
.globl _SemSignal
.align 8
_SemSignal:
// lineno: 45
shl 2, r17, r29
adds r29, r16, r31
bri r1
st.l r0, 0(r31)
// lineno: 46
bri r1
nop
.globl _InitSem
.align 8
_InitSem:
// lineno: 0
adds -1, r0, r17
// lineno: 0
.B171: //.B0003
adds 3, r0, r18
.DB.B171171:
addu -4, r16, r19
bla r17, r18,.B218
pfmul.dd f0, f0, f0
// lineno: 53
.B218: //.M0001
mov r19, r29
.DB.B218218:
addu 4, r19, r19
bla r17, r18, .B218
st.l r0, 4(r29)
// lineno: 0
.B172: //.B0004
// lineno: 53
bri r1
nop
.globl _nextSem
.align 8
_nextSem:
.a4 = 0
.f4 = 48
addu -(.a4+.f4), sp, sp
st.l fp,(.f4-16)(sp)
addu (.f4-16), sp, fp
st.l r1, 4(fp)
st.l r4, -16(fp)
st.l r5, -12(fp)
st.l r6, -8(fp)
// lineno: 0
orh h%___freeSem, r0, r31
or l%___freeSem, r31, r4
orh h%___sems_free, r0, r31
or l%___sems_free, r31, r5
// lineno: 62
ld.l r0(r4), r6
ld.l r0(r5), r28
btne 0x0000, r28, .B176
call _newBytes
adds 4096, r0, r16
st.l r16, 0(r4)
btne 0x0000, r16, .B179
orh h%.S00180, r0, r31
call _printf
or l%.S00180, r31, r16
br .B225
mov r0, r16
// lineno: 70
.B179: //.B0006
adds 256, r0, r28
.DB.B179179:
st.l r28, 0(r5)
ld.l r0(r4), r6
// lineno: 75
.B176: //.B0005
ld.l r0(r5), r28
.DB.B176176:
ld.l r0(r4), r30
adds -1, r28, r29
st.l r29, 0(r5)
addu 16, r30, r30
st.l r30, 0(r4)
mov r6, r16
// lineno: 0
.B225: //.R0001
// lineno: 79
ld.l -16(fp), r4
ld.l -12(fp), r5
ld.l -8(fp), r6
adds .a4+16, fp, r31
ld.l 4(fp), r1
ld.l 0(fp), fp
bri r1
mov r31, sp
.data
.align 1
.S00180: //
// "Failed to allocate semaphore\n"
.byte 0x46,0x61,0x69,0x6c,0x65,0x64,0x20,0x74,0x6f,0x20,0x61
.byte 0x6c,0x6c,0x6f,0x63,0x61,0x74,0x65,0x20,0x73,0x65,0x6d
.byte 0x61,0x70,0x68,0x6f,0x72,0x65,0x0a,0x00
.data
.align 4
___freeSem: //__freeSem
.long 0
___sems_free: //__sems_free
.long 0
.extern _printf
.extern _newBytes
.extern _bla