The C compiler from the SNES-SDK uses the following convention:
Function arguments are pushed on the stack right-to-left. Pointers take 4 bytes; the bank is pushed first, then the offset. Byte- and word-sized arguments are both pushed as words.
Long addressing is used for the jump/return (JSL/RTL). So the first (leftmost) argument will be at S+4 when entering a function. You could read it using LDA 4,S.
Return values are passed through the directpage variable tcc__r0 (which is 16-bit). There are a bunch of other variables declared by the standard library, named tcc__r0h, tcc__r1, tcc__r1h etc. They are used as temporaries, indirect pointers and whatnot.
A, X and Y are all most likely 16-bit upon entering a function, but it might still be a good idea to make sure using a REP. It might also be a good idea to save/restore all registers (including B and P) that you modify in your function.
This is what a memcpy function could look like (untested):
Code:
; void memcpy(char *dest, char *src, int length)
memcpy:
php
rep #$30
phx
phy
phb
stz tcc__r0 ; use as an indirect pointer
lda 12,s ; dest bank
sta tcc__r0h
lda 10,s ; dest offset
tay
lda 14,s ; src offset
tax
lda 18,s ; length
sta tcc__r1
lda 16,s ; src bank
sep #$20
pha
plb
-:
lda.w $0000,x
sta [tcc__r0],y
inx
iny
rep #$20
dec tcc__r1
sep #$20
bne -
plb
ply
plx
plp
rtl