summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/ppc/unified.S
blob: d2b419f0b799cdd918e52462a3e9807c9c9e1a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <dietfeatures.h>

.text
.global __unified_syscall
__unified_syscall:
	sc
	mfcr	0
	andis.	9,0,4096
	mr	0,3
	beq	.L1
#ifdef WANT_THREAD_SAVE
	bl	__set_errno
#else
	lis	9,errno@ha
	stw	3,errno@l(9)
#endif
	li	0,-1
.L1:
	mr	3,0
	blr