Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: lss/linux_syscall_support.h

Issue 13846002: [MIPS] Fix constraint modifier for syscall clone (Closed) Base URL: http://linux-syscall-support.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2005-2011, Google Inc. 1 /* Copyright (c) 2005-2011, Google Inc.
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2435 type5 arg5,type6 arg6) { \ 2435 type5 arg5,type6 arg6) { \
2436 LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ 2436 LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \
2437 LSS_REG(7, arg4); LSS_REG(8, arg5); LSS_REG(9, arg6); \ 2437 LSS_REG(7, arg4); LSS_REG(8, arg5); LSS_REG(9, arg6); \
2438 LSS_BODY(type, name, "+r", "r"(__r4), "r"(__r5), "r"(__r6), \ 2438 LSS_BODY(type, name, "+r", "r"(__r4), "r"(__r5), "r"(__r6), \
2439 "r"(__r8), "r"(__r9)); \ 2439 "r"(__r8), "r"(__r9)); \
2440 } 2440 }
2441 #endif 2441 #endif
2442 LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, 2442 LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
2443 int flags, void *arg, int *parent_tidptr, 2443 int flags, void *arg, int *parent_tidptr,
2444 void *newtls, int *child_tidptr) { 2444 void *newtls, int *child_tidptr) {
2445 register unsigned long __v0 __asm__("$2"); 2445 register unsigned long __v0 __asm__("$2");
Mark Seaborn 2013/04/09 00:29:55 Background question (since I'm not very familiar w
petarj 2013/04/09 12:17:40 Older binutils could not recognize symbolic regist
2446 register unsigned long __r7 __asm__("$7") = (unsigned long)newtls; 2446 register unsigned long __r7 __asm__("$7") = (unsigned long)newtls;
2447 { 2447 {
Mark Seaborn 2013/04/09 00:29:55 Background question: Why is there a block here?
petarj 2013/04/09 12:17:40 I do not know. It does not seem like it is needed.
2448 register int __flags __asm__("$4") = flags; 2448 register int __flags __asm__("$4") = flags;
2449 register void *__stack __asm__("$5") = child_stack; 2449 register void *__stack __asm__("$5") = child_stack;
2450 register void *__ptid __asm__("$6") = parent_tidptr; 2450 register void *__ptid __asm__("$6") = parent_tidptr;
2451 register int *__ctid __asm__("$8") = child_tidptr; 2451 register int *__ctid __asm__("$8") = child_tidptr;
2452 __asm__ __volatile__( 2452 __asm__ __volatile__(
2453 #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32 2453 #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32
2454 "subu $29,24\n" 2454 "subu $29,24\n"
2455 #elif _MIPS_SIM == _MIPS_SIM_NABI32 2455 #elif _MIPS_SIM == _MIPS_SIM_NABI32
2456 "sub $29,16\n" 2456 "sub $29,16\n"
2457 #else 2457 #else
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 "syscall\n" 2518 "syscall\n"
2519 2519
2520 "1:\n" 2520 "1:\n"
2521 #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32 2521 #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32
2522 "addu $29, 24\n" 2522 "addu $29, 24\n"
2523 #elif _MIPS_SIM == _MIPS_SIM_NABI32 2523 #elif _MIPS_SIM == _MIPS_SIM_NABI32
2524 "add $29, 16\n" 2524 "add $29, 16\n"
2525 #else 2525 #else
2526 "daddu $29,16\n" 2526 "daddu $29,16\n"
2527 #endif 2527 #endif
2528 : "=&r" (__v0), "+r" (__r7) 2528 : "+r" (__v0), "+r" (__r7)
2529 : "i"(-EINVAL), "i"(__NR_clone), "i"(__NR_exit), 2529 : "i"(-EINVAL), "i"(__NR_clone), "i"(__NR_exit),
2530 "r"(fn), "r"(__stack), "r"(__flags), "r"(arg), 2530 "r"(fn), "r"(__stack), "r"(__flags), "r"(arg),
2531 "r"(__ptid), "r"(__r7), "r"(__ctid) 2531 "r"(__ptid), "r"(__r7), "r"(__ctid)
2532 : "$9", "$10", "$11", "$12", "$13", "$14", "$15", 2532 : "$9", "$10", "$11", "$12", "$13", "$14", "$15",
2533 "$24", "$25", "memory"); 2533 "$24", "$25", "memory");
2534 } 2534 }
2535 LSS_RETURN(int, __v0, __r7); 2535 LSS_RETURN(int, __v0, __r7);
2536 } 2536 }
2537 #elif defined (__PPC__) 2537 #elif defined (__PPC__)
2538 #undef LSS_LOADARGS_0 2538 #undef LSS_LOADARGS_0
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3663 # pragma pop_macro("fstat64") 3663 # pragma pop_macro("fstat64")
3664 # pragma pop_macro("lstat64") 3664 # pragma pop_macro("lstat64")
3665 #endif 3665 #endif
3666 3666
3667 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) 3667 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS)
3668 } 3668 }
3669 #endif 3669 #endif
3670 3670
3671 #endif 3671 #endif
3672 #endif 3672 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698