X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0c530ab8987f0ae6a1a3d9284f40182b88852816..7e4a7d3939db04e70062ae6c7bf24b8c8b2f5a7c:/bsd/dev/i386/munge.s diff --git a/bsd/dev/i386/munge.s b/bsd/dev/i386/munge.s index 5a4dc52b2..d174c06e3 100644 --- a/bsd/dev/i386/munge.s +++ b/bsd/dev/i386/munge.s @@ -1,29 +1,35 @@ /* * Coyright (c) 2005-2006 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * Syscall argument mungers. * - * The data to be munged has been explicitly copied in to the arguement area, + * The data to be munged has been explicitly copied in to the argument area, * and will be munged in place in the uu_arg[] array. Because of this, the * functions all take the same arguments as their PPC equivalents, but the * first argument is ignored. These mungers are for 32-bit app's syscalls, @@ -144,18 +150,36 @@ ENTRY(munge_wlw) 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 @@ -171,6 +195,32 @@ ENTRY(munge_wwwwwl) 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 @@ -203,3 +253,8 @@ ENTRY(munge_wwwsw) 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