M68K updates

Andreas Schwab schwab at linux-m68k.org
Fri May 28 20:36:34 UTC 2010


I've pushed these two patches to update the M68K port.

Andreas.

>From ffca9e30d6228532e84adc2cfe18f0ea72d199c5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab at linux-m68k.org>
Date: Fri, 28 May 2010 20:53:14 +0200
Subject: [PATCH 1/2] Fix warning when compiling for m68k

* syscall.c (d0): Define as long.
---
 syscall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/syscall.c b/syscall.c
index b7bb733..40eee3a 100644
--- a/syscall.c
+++ b/syscall.c
@@ -727,7 +727,7 @@ internal_syscall(struct tcb *tcp)
 #elif defined (POWERPC)
 	static long result,flags;
 #elif defined (M68K)
-	static int d0;
+	static long d0;
 #elif defined(BFIN)
 	static long r0;
 #elif defined (ARM)
-- 
1.7.1


>From 587432273982c136809a6e9182e8ecf674648706 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab at linux-m68k.org>
Date: Fri, 28 May 2010 22:28:51 +0200
Subject: [PATCH 2/2] Decode TLS syscalls on m68k

* linux/m68k/syscallent.h: Add entries for get_thread_area,
set_thread_area, atomic_comxchg_32, atomic_barrier.
* linux/dummy.h (sys_get_thread_area, sys_set_thread_area) [M68K]:
Don't redefine.
* mem.c (sys_get_thread_area, sys_set_thread_area) [LINUX && M68K]: New.
---
 linux/dummy.h           |    2 ++
 linux/m68k/syscallent.h |    8 ++++----
 mem.c                   |   20 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/linux/dummy.h b/linux/dummy.h
index 92e6886..ce81649 100644
--- a/linux/dummy.h
+++ b/linux/dummy.h
@@ -41,9 +41,11 @@
 /* machine-specific */
 #ifndef I386
 #define	sys_modify_ldt		printargs
+#ifndef M68K
 #define sys_get_thread_area	printargs
 #define sys_set_thread_area	printargs
 #endif
+#endif
 
 #define sys_sched_yield		printargs
 #define sys_sched_get_priority_max sys_sched_get_priority_min
diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h
index eba2f7f..ab11be3 100644
--- a/linux/m68k/syscallent.h
+++ b/linux/m68k/syscallent.h
@@ -361,10 +361,10 @@
 	{ 5,	TD,	printargs,		"pwritev"	}, /* 330 */
 	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"}, /* 331 */
 	{ 5,	TD,	printargs,		"perf_event_open"}, /* 332 */
-	{ 5,	0,	printargs,		"SYS_333"	}, /* 333 */
-	{ 5,	0,	printargs,		"SYS_334"	}, /* 334 */
-	{ 5,	0,	printargs,		"SYS_335"	}, /* 335 */
-	{ 5,	0,	printargs,		"SYS_336"	}, /* 336 */
+	{ 0,	0,	sys_get_thread_area,	"get_thread_area"}, /* 333 */
+	{ 1,	0,	sys_set_thread_area,	"set_thread_area"}, /* 334 */
+	{ 6,	0,	printargs,		"atomic_comxchg_32"}, /* 335 */
+	{ 0,	0,	printargs,		"atomic_barrier"}, /* 336 */
 	{ 5,	0,	printargs,		"SYS_337"	}, /* 337 */
 	{ 5,	0,	printargs,		"SYS_338"	}, /* 338 */
 	{ 5,	0,	printargs,		"SYS_339"	}, /* 339 */
diff --git a/mem.c b/mem.c
index d55cd69..ec5707a 100644
--- a/mem.c
+++ b/mem.c
@@ -710,6 +710,26 @@ struct tcb *tcp;
 }
 #endif /* LINUX && __i386__ */
 
+#if defined(LINUX) && defined(M68K)
+
+int
+sys_set_thread_area(tcp)
+struct tcb *tcp;
+{
+	if (entering(tcp))
+		tprintf("%#lx", tcp->u_arg[0]);
+	return 0;
+
+}
+
+int
+sys_get_thread_area(tcp)
+struct tcb *tcp;
+{
+	return RVAL_HEX;
+}
+#endif
+
 #if defined(LINUX)
 int
 sys_remap_file_pages(tcp)
-- 
1.7.1


-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




More information about the Strace-devel mailing list