##
## ppc.library emulation
## (c)1998-99 Frank Wille <frank@phoenix.owl.de>
##
## Not implemented PowerUp kernel emulation functions
##
## V0.5c (20.03.1999) phx
##       Removed PPCAlert(), PPCPutMessage() and PSYSCALL_xxx(),
##       which are not accessible in the original kernel.
## V0.4b (05.01.1999) phx
##       Function names use Amiga68k/WarpOS C notation (leading '_').
## V0.4  (26.11.1998) phx
##       Offset for PowerPCBase changed from 48 to 60.
##       Included all kernel symbols of ppc.library V46.19,
##       except _KERNEL_xxxxx.
##       DUMFUNC gets PowerPCBase via r12. TOC-ptr r2 is already initialized.
## V0.1  (15.11.1998) phx
##       First partially working ppc.library emulation. Synchronous PPC
##       tasks, started by runelf, which only use the basic PowerUp kernel
##       functions for I/O, memory and context-switch seem to work fine.
## V0.0  (13.11.1998) phx
##       created
##
        .file   "nappc.s"
	.include "warpos_lvo.i"


.macro	DUMFUNC
	.text
	.globl	_kern\1
	.align	4
_kern\1:
.ifdef	SHOW_UNIMPLEMENTED
	mflr	r0
	stw	r0,8(r1)
	stwu	r1,-32(r1)
	lwz	r4,@_dumfmt(r2)
	la	r5,@_\1nam(r2)
	CALLWOS	SPrintF,r12
	lwz	r0,8+32(r1)
	addi	r1,r1,32
	mtlr	r0
.endif
	li	r3,0
	blr

	.type	_kern\1,@function
	.size	_kern\1,$-_kern\1

.ifdef	SHOW_UNIMPLEMENTED
	.data
\1nam:
	.string	"\1"
	.align	2

	.tocd
@_\1nam:
	.long	\1nam
.endif
.endm


	.text

#161198	DUMFUNC	PPCAdd64
#161198	DUMFUNC	PPCAdd64p
#201198	DUMFUNC	PPCAddHead
#201198	DUMFUNC	PPCAddHeadSync
	DUMFUNC	PPCAddPortList
#201198	DUMFUNC	PPCAddTail
#201198	DUMFUNC	PPCAddTailSync
#141198	DUMFUNC	PPCAllocMem
#151198	DUMFUNC	PPCAllocPooled
#050199	DUMFUNC	PPCAllocSignal
#141198	DUMFUNC	PPCAllocVec
#151198	DUMFUNC	PPCAllocVecPooled
#261198	DUMFUNC	PPCAnd64
#261198	DUMFUNC	PPCAnd64p
#261198	DUMFUNC	PPCAsl64
#261198	DUMFUNC	PPCAsl64p
#261198	DUMFUNC	PPCAsr64
#261198	DUMFUNC	PPCAsr64p
#110499	DUMFUNC	PPCAttemptSemaphore
#110499	DUMFUNC	PPCAttemptSemaphoreByName
#110499	DUMFUNC	PPCAttemptSemaphoreShared
#110499	DUMFUNC	PPCCacheFlush
#110499	DUMFUNC	PPCCacheFlushAll
#110499	DUMFUNC	PPCCacheInvalid
#151198	DUMFUNC	PPCCallM68k
#151198	DUMFUNC	PPCCallOS
#151198	DUMFUNC	PPCClose
#200199	DUMFUNC	PPCCloseLibrary
#161198	DUMFUNC	PPCCmp64
#161198	DUMFUNC	PPCCmp64p
	DUMFUNC	PPCCoerceMethodA
#270399	DUMFUNC	PPCCreateMessage
#151198	DUMFUNC	PPCCreatePool
#270399	DUMFUNC	PPCCreatePort
	DUMFUNC	PPCCreatePortList
#110499	DUMFUNC	PPCCreateSemaphore
#051299	DUMFUNC	PPCCreateTask
#050199	DUMFUNC	PPCCreateTimerObject
#270399	DUMFUNC	PPCDeleteMessage
#151198	DUMFUNC	PPCDeletePool
#270399	DUMFUNC	PPCDeletePort
	DUMFUNC	PPCDeletePortList
#110499	DUMFUNC	PPCDeleteSemaphore
#050199	DUMFUNC	PPCDeleteTimerObject
#261198	DUMFUNC	PPCDivRem64
#261198	DUMFUNC	PPCDivRem64p
#161198	DUMFUNC	PPCDivs64
#161198	DUMFUNC	PPCDivs64p
#161198	DUMFUNC	PPCDivu64
#161198	DUMFUNC	PPCDivu64p
	DUMFUNC	PPCDoMethodA
	DUMFUNC	PPCDoSuperMethodA
#201198	DUMFUNC	PPCEnqueue
#201198	DUMFUNC	PPCEnqueueSync
#110499	DUMFUNC	PPCFindName
#110499	DUMFUNC	PPCFindNameSync
#050199	DUMFUNC	PPCFindTagItem
#220199	DUMFUNC	PPCFindTask
#220199	DUMFUNC	PPCFinishTask
	DUMFUNC	PPCfprintf
#141198	DUMFUNC	PPCFreeMem
#151198	DUMFUNC	PPCFreePooled
#050199	DUMFUNC	PPCFreeSignal
#141198	DUMFUNC	PPCFreeVec
#151198	DUMFUNC	PPCFreeVecPooled
#220199	DUMFUNC	PPCGetAttr
#200199	DUMFUNC	PPCGetLibSymbol
#270399	DUMFUNC	PPCGetMessage
#270399	DUMFUNC	PPCGetMessageAttr
	DUMFUNC	PPCGetObjectAttrs
	DUMFUNC	PPCGetPortListAttr
#050199	DUMFUNC	PPCGetTagData
#220199	DUMFUNC	PPCGetTaskAttr
#050199	DUMFUNC	PPCGetTimerObject
	DUMFUNC	PPCHandleTimerJobs
#050199	DUMFUNC	PPCInput
#201198	DUMFUNC	PPCInsert
#201198	DUMFUNC	PPCInsertSync
	DUMFUNC	PPCkprintf
#041299	DUMFUNC	PPCLoadObject
#041299	DUMFUNC	PPCLoadObjectTagList
	DUMFUNC	PPCLockBus
#261198	DUMFUNC	PPCLsl64
#261198	DUMFUNC	PPCLsl64p
#261198	DUMFUNC	PPCLsr64
#261198	DUMFUNC	PPCLsr64p
#161198	DUMFUNC	PPCMods64
#161198	DUMFUNC	PPCMods64p
#161198	DUMFUNC	PPCModu64
#161198	DUMFUNC	PPCModu64p
#161198	DUMFUNC	PPCMuls64
#161198	DUMFUNC	PPCMuls64p
#161198	DUMFUNC	PPCMulu64
#161198	DUMFUNC	PPCMulu64p
#161198	DUMFUNC	PPCNeg64
#161198	DUMFUNC	PPCNeg64p
#201198	DUMFUNC	PPCNewList
#050199	DUMFUNC	PPCNextTagItem
#270399	DUMFUNC	PPCObtainPort
#110499	DUMFUNC	PPCObtainSemaphore
#110499	DUMFUNC	PPCObtainSemaphoreByName
#110499	DUMFUNC	PPCObtainSemaphoreShared
#151198	DUMFUNC	PPCOpen
#200199	DUMFUNC	PPCOpenLibrary
#261198	DUMFUNC	PPCOr64
#261198	DUMFUNC	PPCOr64p
#050199	DUMFUNC	PPCOutput
#061299	DUMFUNC	PPCprintf
#110499	DUMFUNC	PPCRawDoFmt
#151198	DUMFUNC	PPCRead
#110599	DUMFUNC	PPCReadByte
#110599	DUMFUNC	PPCReadLong
#110599	DUMFUNC	PPCReadWord
#270399	DUMFUNC	PPCReleasePort
#110499	DUMFUNC	PPCReleaseSemaphore
#201198	DUMFUNC	PPCRemHead
#201198	DUMFUNC	PPCRemHeadSync
#201198	DUMFUNC	PPCRemove
#201198	DUMFUNC	PPCRemoveSync
	DUMFUNC	PPCRemPortList
#201198	DUMFUNC	PPCRemTail
#201198	DUMFUNC	PPCRemTailSync
#270399	DUMFUNC	PPCReplyMessage
#050199	DUMFUNC	PPCRevision
#151198	DUMFUNC	PPCSeek
#270399	DUMFUNC	PPCSendMessage
	DUMFUNC	PPCSetPortListAttr
#050199	DUMFUNC	PPCSetSignal
#260199	DUMFUNC	PPCSetTaskAttr
#050199	DUMFUNC	PPCSetTimerObject
#050199	DUMFUNC	PPCSignal
	DUMFUNC	PPCsprintf
#161198	DUMFUNC	PPCSub64
#161198	DUMFUNC	PPCSub64p
#041299	DUMFUNC	PPCUnLoadObject
	DUMFUNC	PPCUnLockBus
#050199	DUMFUNC	PPCVersion
	DUMFUNC	PPCvfprintf
	DUMFUNC	PPCvkprintf
	DUMFUNC	PPCvprintf
	DUMFUNC	PPCvsprintf
#050199	DUMFUNC	PPCWait
#270399	DUMFUNC	PPCWaitPort
	DUMFUNC	PPCWaitPortList
#151198	DUMFUNC	PPCWrite
#110599	DUMFUNC	PPCWriteByte
#110599	DUMFUNC	PPCWriteLong
#110599	DUMFUNC	PPCWriteWord
#261198	DUMFUNC	PPCXor64
#261198	DUMFUNC	PPCXor64p
#261198	DUMFUNC	memcpy
#261198	DUMFUNC	strcmp
#261198	DUMFUNC	strcpy
#261198	DUMFUNC	strlen
#261198	DUMFUNC	__adddi3
#261198	DUMFUNC	__anddi3
#261198	DUMFUNC	__ashldi3
#261198	DUMFUNC	__ashrdi3
#261198	DUMFUNC	__cmpdi2
#261198	DUMFUNC	__divdi3
#261198	DUMFUNC	__fixdfdi
#261198	DUMFUNC	__fixsfdi
#261198	DUMFUNC	__fixunsdfdi
#261198	DUMFUNC	__fixunssfdi
#261198	DUMFUNC	__floatdidf
#261198	DUMFUNC	__floatdisf
#261198	DUMFUNC	__floatunsdidf
#261198	DUMFUNC	__iordi3
#261198	DUMFUNC	__lmulq
#261198	DUMFUNC	__lshldi3
#261198	DUMFUNC	__lshrdi3
#261198	DUMFUNC	__moddi3
#261198	DUMFUNC	__muldi3
#261198	DUMFUNC	__negdi2
#261198	DUMFUNC	__qdivrem
#261198	DUMFUNC	__subdi3
#261198	DUMFUNC	__ucmpdi2
#261198	DUMFUNC	__udivdi3
#261198	DUMFUNC	__umoddi3
#261198	DUMFUNC	__xordi3


.ifdef	SHOW_UNIMPLEMENTED
	.data
dumfmt:
	.byte	"Unimplemented PowerUpKernel function %s() called."
	.byte	10,0
	.align	2

	.tocd
@_dumfmt:
	.long	dumfmt
.endif
