Print this page
5606 support build with binutils 2.25
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Marcel Telka <marcel.telka@nexenta.com>
Reviewed by: Piotr Jasiukajtis <estibi@me.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 
  28 #include <sys/asm_linkage.h>
  29 #include <sys/asm_misc.h>
  30 #include <sys/regset.h>
  31 #include <sys/panic.h>
  32 #include <sys/ontrap.h>
  33 #include <sys/privregs.h>
  34 #include <sys/segments.h>
  35 #include <sys/trap.h>
  36 
  37 #if defined(__lint)
  38 #include <sys/types.h>
  39 #include <sys/systm.h>
  40 #include <sys/thread.h>
  41 #include <sys/archsystm.h>
  42 #include <sys/byteorder.h>
  43 #include <sys/dtrace.h>
  44 #include <sys/x86_archext.h>
  45 #else   /* __lint */
  46 #include "assym.h"
  47 #endif  /* __lint */


 181         pushq   $.newcs
 182         lretq
 183 .newcs:
 184         /*
 185          * zero %ds and %es - they're ignored anyway
 186          */
 187         xorl    %eax, %eax
 188         movw    %ax, %ds
 189         movw    %ax, %es
 190         movl    %esi, %eax
 191         movw    %ax, %fs
 192         movl    %edx, %eax
 193         movw    %ax, %gs
 194         movl    %ecx, %eax
 195         movw    %ax, %ss
 196         leave
 197         ret
 198         SET_SIZE(load_segment_registers)
 199 
 200         ENTRY_NP(get_cs_register)
 201         movq    $0, %rax
 202         movw    %cs, %rax
 203         ret
 204         SET_SIZE(get_cs_register)
 205 
 206 #endif  /* __lint */
 207 #elif defined(__i386)
 208 
 209 #if defined(__lint)
 210 
 211 /*ARGSUSED*/
 212 void
 213 load_segment_registers(
 214     selector_t cs, selector_t ds, selector_t es,
 215     selector_t fs, selector_t gs, selector_t ss)
 216 {}
 217 
 218 selector_t
 219 get_cs_register()
 220 { return ((selector_t) 0); }
 221 
 222 #else   /* __lint */




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 


  26 #include <sys/asm_linkage.h>
  27 #include <sys/asm_misc.h>
  28 #include <sys/regset.h>
  29 #include <sys/panic.h>
  30 #include <sys/ontrap.h>
  31 #include <sys/privregs.h>
  32 #include <sys/segments.h>
  33 #include <sys/trap.h>
  34 
  35 #if defined(__lint)
  36 #include <sys/types.h>
  37 #include <sys/systm.h>
  38 #include <sys/thread.h>
  39 #include <sys/archsystm.h>
  40 #include <sys/byteorder.h>
  41 #include <sys/dtrace.h>
  42 #include <sys/x86_archext.h>
  43 #else   /* __lint */
  44 #include "assym.h"
  45 #endif  /* __lint */


 179         pushq   $.newcs
 180         lretq
 181 .newcs:
 182         /*
 183          * zero %ds and %es - they're ignored anyway
 184          */
 185         xorl    %eax, %eax
 186         movw    %ax, %ds
 187         movw    %ax, %es
 188         movl    %esi, %eax
 189         movw    %ax, %fs
 190         movl    %edx, %eax
 191         movw    %ax, %gs
 192         movl    %ecx, %eax
 193         movw    %ax, %ss
 194         leave
 195         ret
 196         SET_SIZE(load_segment_registers)
 197 
 198         ENTRY_NP(get_cs_register)
 199         movq    %cs, %rax

 200         ret
 201         SET_SIZE(get_cs_register)
 202 
 203 #endif  /* __lint */
 204 #elif defined(__i386)
 205 
 206 #if defined(__lint)
 207 
 208 /*ARGSUSED*/
 209 void
 210 load_segment_registers(
 211     selector_t cs, selector_t ds, selector_t es,
 212     selector_t fs, selector_t gs, selector_t ss)
 213 {}
 214 
 215 selector_t
 216 get_cs_register()
 217 { return ((selector_t) 0); }
 218 
 219 #else   /* __lint */