Permalink
Browse files

blah

  • Loading branch information...
1 parent 8584544 commit da231338b76d46a40b3b5ec9b1739f9ab9d6070b @comex committed Oct 19, 2010
Showing with 20 additions and 9,812 deletions.
  1. +0 −1,208 bsd/crypto/aes/i386/aes_x86_v2.s
  2. +0 −2 bsd/dev/i386/dtrace_isa.c
  3. +0 −157 bsd/dev/i386/munge.s
  4. +1 −1 bsd/dev/random/fips_sha1.c
  5. +1 −1 bsd/kern/kdebug.c
  6. +4 −4 bsd/kern/makesyscalls.sh
  7. +2 −0 bsd/kern/pthread_support.c
  8. +1 −1 bsd/kern/syscalls.master
  9. +1 −1 libkern/crypto/sha1.c
  10. +1 −120 libkern/gen/OSDebug.cpp
  11. +0 −29 osfmk/conf/files.i386
  12. +1 −1 osfmk/i386/AT386/model_dep.c
  13. +0 −396 osfmk/i386/commpage/atomic.s
  14. +0 −136 osfmk/i386/commpage/bcopy_scalar.s
  15. +0 −473 osfmk/i386/commpage/bcopy_sse2.s
  16. +0 −823 osfmk/i386/commpage/bcopy_sse3x.s
  17. +0 −820 osfmk/i386/commpage/bcopy_sse3x_64.s
  18. +0 −311 osfmk/i386/commpage/bcopy_sse42.s
  19. +0 −301 osfmk/i386/commpage/bcopy_sse42_64.s
  20. +0 −115 osfmk/i386/commpage/bzero_scalar.s
  21. +0 −162 osfmk/i386/commpage/bzero_sse2.s
  22. +0 −161 osfmk/i386/commpage/bzero_sse2_64.s
  23. +0 −151 osfmk/i386/commpage/bzero_sse42.s
  24. +0 −148 osfmk/i386/commpage/bzero_sse42_64.s
  25. +0 −79 osfmk/i386/commpage/cacheflush.s
  26. +0 −655 osfmk/i386/commpage/commpage.c
  27. +0 −169 osfmk/i386/commpage/commpage.h
  28. +0 −203 osfmk/i386/commpage/commpage_asm.s
  29. +0 −122 osfmk/i386/commpage/commpage_gettimeofday.s
  30. +0 −173 osfmk/i386/commpage/commpage_mach_absolute_time.s
  31. +0 −189 osfmk/i386/commpage/commpage_sigs.c
  32. +0 −77 osfmk/i386/commpage/cpu_number.s
  33. +0 −418 osfmk/i386/commpage/fifo_queues.s
  34. +0 −221 osfmk/i386/commpage/longcopy_sse3x.s
  35. +0 −210 osfmk/i386/commpage/longcopy_sse3x_64.s
  36. +0 −183 osfmk/i386/commpage/memset_pattern_sse2.s
  37. +0 −184 osfmk/i386/commpage/memset_pattern_sse2_64.s
  38. +0 −337 osfmk/i386/commpage/pthreads.s
  39. +0 −189 osfmk/i386/commpage/spinlocks.s
  40. +0 −10 osfmk/i386/cpuid.c
  41. +0 −15 osfmk/i386/cpuid.h
  42. +2 −2 osfmk/i386/fpu.h
  43. +0 −411 osfmk/i386/idt.s
  44. +0 −82 osfmk/i386/start.s
  45. +0 −40 osfmk/i386/start64.s
  46. +0 −38 osfmk/i386/vmx/vmx_asm.h
  47. +0 −3 osfmk/kdp/ml/i386/kdp_machdep.c
  48. +2 −2 osfmk/kern/bsd_kern.c
  49. +0 −6 osfmk/kern/clock.c
  50. +2 −2 osfmk/kern/thread.c
  51. +2 −257 osfmk/mach/i386/sdt_isa.h
  52. +0 −3 osfmk/vm/vm_shared_region.c
  53. +0 −10 pexpert/pexpert/i386/protos.h

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -99,13 +99,11 @@ dtrace_probe_error(dtrace_state_t *state, dtrace_epid_t epid, int which,
void
dtrace_membar_producer(void)
{
- __asm__ volatile("sfence");
}
void
dtrace_membar_consumer(void)
{
- __asm__ volatile("lfence");
}
/*
View
@@ -74,187 +74,30 @@
#include <i386/asm.h>
ENTRY(munge_w)
- movl 8(%esp),%ecx // get &uu_args
- movl $0,4(%ecx)
- ret
ENTRY(munge_ww)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- jmp Lw2
ENTRY(munge_www)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- jmp Lw3
ENTRY(munge_wwww)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- jmp Lw4
ENTRY(munge_wwwww)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- jmp Lw5
ENTRY(munge_wwwwww)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- jmp Lw6
ENTRY(munge_wwwwwww)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- jmp Lw7
ENTRY(munge_wwwwwwww)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 28(%ecx),%eax
- movl %eax,56(%ecx)
- movl %edx,60(%ecx)
-Lw7:
- movl 24(%ecx),%eax
- movl %eax,48(%ecx)
- movl %edx,52(%ecx)
-Lw6:
- movl 20(%ecx),%eax
- movl %eax,40(%ecx)
- movl %edx,44(%ecx)
-Lw5:
- movl 16(%ecx),%eax
- movl %eax,32(%ecx)
- movl %edx,36(%ecx)
-Lw4:
- movl 12(%ecx),%eax
- movl %eax,24(%ecx)
- movl %edx,28(%ecx)
-Lw3:
- movl 8(%ecx),%eax
- movl %eax,16(%ecx)
- movl %edx,20(%ecx)
-Lw2:
- movl 4(%ecx),%eax
- movl %eax,8(%ecx)
- movl %edx,12(%ecx)
- movl %edx,4(%ecx)
- ret
-
Entry(munge_wl) /* Costs an extra w move to do this */
ENTRY(munge_wlw)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 12(%ecx),%eax
- movl %eax,16(%ecx)
- movl %edx,20(%ecx)
- movl 8(%ecx),%eax
- movl %eax,12(%ecx)
- movl 4(%ecx),%eax
- movl %eax,8(%ecx)
- movl %edx,4(%ecx)
- ret
Entry(munge_wwwlw)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 20(%ecx),%eax
- movl %eax,32(%ecx)
- movl %edx,36(%ecx)
- jmp Lwwwl
-
ENTRY(munge_wwwl)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
-Lwwwl:
- movl 12(%ecx),%eax
- movl %eax,24(%ecx)
- movl 16(%ecx),%eax
- movl %eax,28(%ecx)
- jmp Lw3
-
ENTRY(munge_wwwwlw)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 24(%ecx),%eax
- movl %eax,40(%ecx)
- movl %edx,44(%ecx)
- jmp Lwwwwl
-
ENTRY(munge_wwwwl)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
-Lwwwwl:
- movl 16(%ecx),%eax
- movl %eax,32(%ecx)
- movl 20(%ecx),%eax
- movl %eax,36(%ecx)
- jmp Lw4
-
ENTRY(munge_wwwwwl)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 20(%ecx),%eax
- movl %eax,40(%ecx)
- movl 24(%ecx),%eax
- movl %eax,44(%ecx)
- jmp Lw5
-
ENTRY(munge_wwwwwwlw)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 32(%ecx),%eax
- movl %eax,56(%ecx)
- movl %edx,60(%ecx)
- movl 24(%ecx),%eax
- movl %eax,48(%ecx)
- movl 28(%ecx),%eax
- movl %eax,52(%ecx)
- jmp Lw6
-
ENTRY(munge_wwwwwwll)
- movl 8(%esp),%ecx // get &uu_args
- xorl %edx,%edx
- movl 32(%ecx),%eax
- movl %eax,56(%ecx)
- movl 36(%ecx),%eax
- movl %eax,60(%ecx)
- movl 24(%ecx),%eax
- movl %eax,48(%ecx)
- movl 28(%ecx),%eax
- movl %eax,52(%ecx)
- jmp Lw6
-
ENTRY(munge_wsw)
- movl 8(%esp),%ecx // get &uu_args
- movl 8(%ecx),%eax
- movl %eax,16(%ecx)
- movl $0,20(%ecx)
- movl 4(%ecx),%eax
- cltd
- movl %eax,8(%ecx)
- movl %edx,12(%ecx)
- movl $0,4(%ecx)
- ret
ENTRY(munge_wws)
- movl 8(%esp),%ecx // get &uu_args
- movl 8(%ecx),%eax
- cltd
- movl %eax,16(%ecx)
- movl %edx,20(%ecx)
- xorl %edx,%edx
- jmp Lw2
ENTRY(munge_wwwsw)
- movl 8(%esp),%ecx // get &uu_args
- movl 16(%ecx),%eax
- movl %eax,32(%ecx)
- movl $0,36(%ecx)
- movl 12(%ecx),%eax
- cltd
- movl %eax,24(%ecx)
- movl %edx,28(%ecx)
- xorl %edx,%edx
- jmp Lw3
ENTRY(munge_llllll)
- ret // actually, this method has nothing to do - all
- // arguments are already 64-bits, with no mixing of
- // args that need sign/zero extension
@@ -88,7 +88,7 @@ typedef int Boolean;
#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
#define FETCH_32(p) ({ \
register u_int32_t l = (u_int32_t)*((const u_int32_t *)(p)); \
- __asm__ __volatile__("bswap %0" : "=r" (l) : "0" (l)); \
+ __asm__ __volatile__("rev %0, %0" : "=r" (l) : "0" (l)); \
l; \
})
#else
View
@@ -1653,7 +1653,7 @@ unsigned char *getProcName(struct proc *proc) {
#define STACKSHOT_SUBSYS_LOCK() lck_mtx_lock(&stackshot_subsys_mutex)
#define STACKSHOT_SUBSYS_UNLOCK() lck_mtx_unlock(&stackshot_subsys_mutex)
#if defined(__i386__) || defined (__x86_64__)
-#define TRAP_DEBUGGER __asm__ volatile("int3");
+#define TRAP_DEBUGGER __asm__ volatile("bkpt");
#endif
#ifdef __ppc__
#define TRAP_DEBUGGER __asm__ volatile("tw 4,r3,r3");
View
@@ -190,7 +190,7 @@ s/\$//g
printf "#include <mach/shared_region.h>\n" > sysarg
printf "\n#ifdef KERNEL\n" > sysarg
printf "#ifdef __APPLE_API_PRIVATE\n" > sysarg
- printf "#ifndef __arm__\n" > sysarg
+ printf "#ifndef __farm__\n" > sysarg
printf "#define\tPAD_(t)\t(sizeof(uint64_t) <= sizeof(t) \\\n " > sysarg
printf "\t\t? 0 : sizeof(uint64_t) - sizeof(t))\n" > sysarg
printf "#else\n" > sysarg
@@ -207,7 +207,7 @@ s/\$//g
printf "\n__BEGIN_DECLS\n" > sysarg
printf "#ifndef __MUNGE_ONCE\n" > sysarg
printf "#define __MUNGE_ONCE\n" > sysarg
- printf "#ifndef __arm__\n" > sysarg
+ printf "#ifndef __farm__\n" > sysarg
printf "void munge_w(const void *, void *); \n" > sysarg
printf "void munge_ww(const void *, void *); \n" > sysarg
printf "void munge_www(const void *, void *); \n" > sysarg
@@ -254,7 +254,7 @@ s/\$//g
printf "#define munge_wws NULL \n" > sysarg
printf "#define munge_wwwsw NULL \n" > sysarg
printf "#define munge_llllll NULL \n" > sysarg
- printf "#endif // ! __arm__\n" > sysarg
+ printf "#endif // ! __farm__\n" > sysarg
printf "#ifdef __ppc__\n" > sysarg
printf "void munge_d(const void *, void *); \n" > sysarg
printf "void munge_dd(const void *, void *); \n" > sysarg
@@ -764,7 +764,7 @@ s/\$//g
printf("};\n") > sysent
printf("int nsysent = sizeof(sysent) / sizeof(sysent[0]);\n") > sysent
printf("/* Verify that NUM_SYSENT reflects the latest syscall count */\n") > sysent
- printf("int nsysent_size_check[((sizeof(sysent) / sizeof(sysent[0])) == NUM_SYSENT) ? 1 : -1] __unused;\n") > sysent
+ printf("int nsysent_size_check[((sizeof(sysent) / sizeof(sysent[0])) == NUM_SYSENT) ? 1 : 1] __unused;\n") > sysent
printf("};\n") > syscallnamestempfile
printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall_num) \
@@ -1059,6 +1059,7 @@ psynch_cvsignal(__unused proc_t p, struct psynch_cvsignal_args * uap, int * retv
int
psynch_cvwait(__unused proc_t p, struct psynch_cvwait_args * uap, uint32_t * retval)
{
+#if 0
user_addr_t cond = uap->cv;
uint32_t cgen = uap->cvgen;
uint32_t cugen = uap->cvugen;
@@ -1166,6 +1167,7 @@ psynch_cvwait(__unused proc_t p, struct psynch_cvwait_args * uap, uint32_t * ret
#endif /* _PSYNCH_TRACE_ */
ksyn_wqrelease(ckwq, NULL);
return(error);
+#endif
}
/* ***************** pthread_rwlock ************************ */
View
@@ -455,7 +455,7 @@
302 AUE_NULL ALL { uint32_t psynch_mutexdrop(user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags) NO_SYSCALL_STUB; }
303 AUE_NULL ALL { int psynch_cvbroad(user_addr_t cv, uint32_t cvgen, uint32_t diffgen, user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags) NO_SYSCALL_STUB; }
304 AUE_NULL ALL { int psynch_cvsignal(user_addr_t cv, uint32_t cvgen, uint32_t cvugen, user_addr_t mutex, uint32_t mgen, uint32_t ugen, int thread_port, uint32_t flags) NO_SYSCALL_STUB; }
-305 AUE_NULL ALL { uint32_t psynch_cvwait(user_addr_t cv, uint32_t cvgen, uint32_t cvugen, user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t sec, uint64_t usec) NO_SYSCALL_STUB; }
+305 AUE_NULL ALL { int nosys(void); }
306 AUE_NULL ALL { uint32_t psynch_rw_rdlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
307 AUE_NULL ALL { uint32_t psynch_rw_wrlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
308 AUE_NULL ALL { uint32_t psynch_rw_unlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
View
@@ -78,7 +78,7 @@
#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
#define FETCH_32(p) ({ \
register u_int32_t l = (u_int32_t)*((const u_int32_t *)(p)); \
- __asm__ __volatile__("bswap %0" : "=r" (l) : "0" (l)); \
+ __asm__ __volatile__("rev %0, %0" : "=r" (l) : "0" (l)); \
l; \
})
#else
Oops, something went wrong.

0 comments on commit da23133

Please sign in to comment.