aboutsummaryrefslogtreecommitdiffstats
path: root/community/drawterm/fix-mips-build.patch
blob: 8efd8016262edaf8eb806f50d26708d4f99a12fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- a/posix-mips/Makefile
+++ b/posix-mips/Makefile
@@ -15,4 +15,4 @@
 
 tas.$O: tas.s
 	ln -sf tas.s tas.S
-	$(CC) -c -o tas.$O -mips3 tas.S
+	$(CC) -c -o tas.$O tas.S
--- a/posix-mips/tas.s
+++ b/posix-mips/tas.s
@@ -1,19 +1,17 @@
-#include <machine/regdef.h>
-
 .globl tas
 .ent tas 2
 
 tas:
 .set noreorder
 1:
-	ori	t1, zero, 12345	/* t1 = 12345 */
-	ll	t0, (a0)		/* t0 = *a0 */
-	sc	t1, (a0)		/* *a0 = t1 if *a0 hasn't changed; t1=success */
-	beq	t1, zero, 1b		/* repeat if *a0 did change */
-	nop
+	li	$t1, 12345	/* t1 = 12345 */
+	ll	$t0, ($a0)	/* t0 = *a0 */
+	sc	$t1, ($a0)	/* *a0 = t1 if *a0 hasn't changed; t1=success */
+	beqz	$t1, 1b		/* repeat if *a0 did change */
+	 nop
 
-	j $31				/* return */
-	or	v0, t0, zero		/* set return value on way out */
+	jr	$ra		/* return */
+	 move	$v0, $t0	/* set return value on way out */
 
 .set reorder
 .end tas