@@ -306,27 +306,16 @@ struct libc_do_syscall_args
306306 (int) (arg1), \
307307 (int) (arg5), \
308308 (int) (arg6) \
309- }; \
310- asm volatile ( \
311- "movl %1, %%eax\n\t" \
312- "call " I386_DO_SYSCALL_STRING \
313- : "=a" (resultvar) \
314- : "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
315- : "memory", "cc")
309+ };
310+
316311#define INTERNAL_SYSCALL_MAIN_NCS_6 (name , arg1 , arg2 , arg3 , \
317312 arg4 , arg5 , arg6 ) \
318313 struct libc_do_syscall_args _xv = \
319314 { \
320315 (int) (arg1), \
321316 (int) (arg5), \
322317 (int) (arg6) \
323- }; \
324- asm volatile ( \
325- "movl %1, %%eax\n\t" \
326- "call " I386_DO_SYSCALL_STRING \
327- : "=a" (resultvar) \
328- : "a" (name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
329- : "memory", "cc")
318+ };
330319
331320#define INTERNAL_SYSCALL (name , nr , args ...) \
332321 ({ \
@@ -342,46 +331,26 @@ struct libc_do_syscall_args
342331#if I386_USE_SYSENTER
343332# ifdef PIC
344333# define INTERNAL_SYSCALL_MAIN_INLINE (name , nr , args ...) \
345- LOADREGS_##nr(args) \
346- asm volatile ( \
347- "call *%%gs:%P2" \
348- : "=a" (resultvar) \
349- : "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \
350- ASMARGS_##nr(args) : "memory", "cc")
334+ LOADREGS_##nr(args)
335+
351336# define INTERNAL_SYSCALL_MAIN_NCS (name , nr , args ...) \
352- LOADREGS_##nr(args) \
353- asm volatile ( \
354- "call *%%gs:%P2" \
355- : "=a" (resultvar) \
356- : "a" (name), "i" (offsetof (tcbhead_t, sysinfo)) \
357- ASMARGS_##nr(args) : "memory", "cc")
337+ LOADREGS_##nr(args)
338+
358339# else /* I386_USE_SYSENTER && !PIC */
359340# define INTERNAL_SYSCALL_MAIN_INLINE (name , nr , args ...) \
360- LOADREGS_##nr(args) \
361- asm volatile ( \
362- "call *_dl_sysinfo" \
363- : "=a" (resultvar) \
364- : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc")
341+ LOADREGS_##nr(args)
342+
365343# define INTERNAL_SYSCALL_MAIN_NCS (name , nr , args ...) \
366- LOADREGS_##nr(args) \
367- asm volatile ( \
368- "call *_dl_sysinfo" \
369- : "=a" (resultvar) \
370- : "a" (name) ASMARGS_##nr(args) : "memory", "cc")
344+ LOADREGS_##nr(args)
345+
371346# endif /* I386_USE_SYSENTER && !PIC */
372347#else /* !I386_USE_SYSENTER */
373348# define INTERNAL_SYSCALL_MAIN_INLINE (name , nr , args ...) \
374- LOADREGS_##nr(args) \
375- asm volatile ( \
376- "int $0x80" \
377- : "=a" (resultvar) \
378- : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc")
349+ LOADREGS_##nr(args)
350+
379351# define INTERNAL_SYSCALL_MAIN_NCS (name , nr , args ...) \
380- LOADREGS_##nr(args) \
381- asm volatile ( \
382- "int $0x80" \
383- : "=a" (resultvar) \
384- : "a" (name) ASMARGS_##nr(args) : "memory", "cc")
352+ LOADREGS_##nr(args)
353+
385354#endif /* !I386_USE_SYSENTER */
386355
387356#define LOADREGS_0 ()
0 commit comments