diff options
author | Hirokazu Takata <takata@linux-m32r.org> | 2006-01-06 03:18:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:43 -0500 |
commit | 1b5b776aa5730cbda9cba84ba0f8ccd53a775797 (patch) | |
tree | 60b661ac7cceba108dd07062a54e7fb724a19e72 /include/asm-m32r/unistd.h | |
parent | 9287d95ea194abf32fab24c6909f8ea55ab0292f (diff) |
[PATCH] m32r: Update syscall macros for MMU-less targets
This patch is for updating m32r's MMU-less support.
Some legacy MMU-less m32r chips cannot return from a trap handler to the
right-hand side 16-bit halfword code of a 32-bit instrucion code pair, because
a "trap" instruction specification was expanded in M32R-II ISA.
This modification forces "trap" instructions to be placed in word alignment
location with a parallel "nop" code.
Signed-off-by: Kazuhiro Inaoka <inaoka@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-m32r/unistd.h')
-rw-r--r-- | include/asm-m32r/unistd.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index ac399e1f7bc0..39be87ca2a5a 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -319,7 +319,7 @@ type name(void) \ | |||
319 | register long __scno __asm__ ("r7") = __NR_##name; \ | 319 | register long __scno __asm__ ("r7") = __NR_##name; \ |
320 | register long __res __asm__("r0"); \ | 320 | register long __res __asm__("r0"); \ |
321 | __asm__ __volatile__ (\ | 321 | __asm__ __volatile__ (\ |
322 | "trap #" SYSCALL_VECTOR \ | 322 | "trap #" SYSCALL_VECTOR "|| nop"\ |
323 | : "=r" (__res) \ | 323 | : "=r" (__res) \ |
324 | : "r" (__scno) \ | 324 | : "r" (__scno) \ |
325 | : "memory"); \ | 325 | : "memory"); \ |
@@ -332,7 +332,7 @@ type name(type1 arg1) \ | |||
332 | register long __scno __asm__ ("r7") = __NR_##name; \ | 332 | register long __scno __asm__ ("r7") = __NR_##name; \ |
333 | register long __res __asm__ ("r0") = (long)(arg1); \ | 333 | register long __res __asm__ ("r0") = (long)(arg1); \ |
334 | __asm__ __volatile__ (\ | 334 | __asm__ __volatile__ (\ |
335 | "trap #" SYSCALL_VECTOR \ | 335 | "trap #" SYSCALL_VECTOR "|| nop"\ |
336 | : "=r" (__res) \ | 336 | : "=r" (__res) \ |
337 | : "r" (__scno), "0" (__res) \ | 337 | : "r" (__scno), "0" (__res) \ |
338 | : "memory"); \ | 338 | : "memory"); \ |
@@ -346,7 +346,7 @@ register long __scno __asm__ ("r7") = __NR_##name; \ | |||
346 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | 346 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ |
347 | register long __res __asm__ ("r0") = (long)(arg1); \ | 347 | register long __res __asm__ ("r0") = (long)(arg1); \ |
348 | __asm__ __volatile__ (\ | 348 | __asm__ __volatile__ (\ |
349 | "trap #" SYSCALL_VECTOR \ | 349 | "trap #" SYSCALL_VECTOR "|| nop"\ |
350 | : "=r" (__res) \ | 350 | : "=r" (__res) \ |
351 | : "r" (__scno), "0" (__res), "r" (__arg2) \ | 351 | : "r" (__scno), "0" (__res), "r" (__arg2) \ |
352 | : "memory"); \ | 352 | : "memory"); \ |
@@ -361,7 +361,7 @@ register long __arg3 __asm__ ("r2") = (long)(arg3); \ | |||
361 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | 361 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ |
362 | register long __res __asm__ ("r0") = (long)(arg1); \ | 362 | register long __res __asm__ ("r0") = (long)(arg1); \ |
363 | __asm__ __volatile__ (\ | 363 | __asm__ __volatile__ (\ |
364 | "trap #" SYSCALL_VECTOR \ | 364 | "trap #" SYSCALL_VECTOR "|| nop"\ |
365 | : "=r" (__res) \ | 365 | : "=r" (__res) \ |
366 | : "r" (__scno), "0" (__res), "r" (__arg2), \ | 366 | : "r" (__scno), "0" (__res), "r" (__arg2), \ |
367 | "r" (__arg3) \ | 367 | "r" (__arg3) \ |
@@ -378,7 +378,7 @@ register long __arg3 __asm__ ("r2") = (long)(arg3); \ | |||
378 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | 378 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ |
379 | register long __res __asm__ ("r0") = (long)(arg1); \ | 379 | register long __res __asm__ ("r0") = (long)(arg1); \ |
380 | __asm__ __volatile__ (\ | 380 | __asm__ __volatile__ (\ |
381 | "trap #" SYSCALL_VECTOR \ | 381 | "trap #" SYSCALL_VECTOR "|| nop"\ |
382 | : "=r" (__res) \ | 382 | : "=r" (__res) \ |
383 | : "r" (__scno), "0" (__res), "r" (__arg2), \ | 383 | : "r" (__scno), "0" (__res), "r" (__arg2), \ |
384 | "r" (__arg3), "r" (__arg4) \ | 384 | "r" (__arg3), "r" (__arg4) \ |
@@ -397,7 +397,7 @@ register long __arg3 __asm__ ("r2") = (long)(arg3); \ | |||
397 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | 397 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ |
398 | register long __res __asm__ ("r0") = (long)(arg1); \ | 398 | register long __res __asm__ ("r0") = (long)(arg1); \ |
399 | __asm__ __volatile__ (\ | 399 | __asm__ __volatile__ (\ |
400 | "trap #" SYSCALL_VECTOR \ | 400 | "trap #" SYSCALL_VECTOR "|| nop"\ |
401 | : "=r" (__res) \ | 401 | : "=r" (__res) \ |
402 | : "r" (__scno), "0" (__res), "r" (__arg2), \ | 402 | : "r" (__scno), "0" (__res), "r" (__arg2), \ |
403 | "r" (__arg3), "r" (__arg4), "r" (__arg5) \ | 403 | "r" (__arg3), "r" (__arg4), "r" (__arg5) \ |