### -*-Midas-*-
###
-### $Id: i386.m4,v 1.55 2001/12/17 22:05:33 cph Exp $
+### $Id: i386.m4,v 1.56 2001/12/19 19:53:35 cph Exp $
###
### Copyright (c) 1992-2001 Massachusetts Institute of Technology
###
leave
ret
-### Conditionally run the CPUID instruction for serialization.
+### Run the CPUID instruction for serialization.
-define_hook_label(conditionally_serialize)
- OP(cmp,l) TW(IMM(0),ABS(EVR(ia32_cpuid_needed)))
- je asm_conditionally_serialize_done
+define_hook_label(serialize_cache)
pusha
OP(xor,l) TW(REG(eax),REG(eax))
cpuid
popa
-asm_conditionally_serialize_done:
+ ret
+
+### Stub to be used in place of above on machines that don't need it.
+
+define_hook_label(dont_serialize_cache)
ret
\f
### Assembly language hooks used to reduce code size.
/* -*-C-*-
-$Id: i386.h,v 1.33 2001/12/16 06:01:33 cph Exp $
+$Id: i386.h,v 1.34 2001/12/19 19:53:46 cph Exp $
Copyright (c) 1992-2001 Massachusetts Institute of Technology
{
extern int EXFUN (ASM_ENTRY_POINT(i386_interface_initialize), (void));
extern void EXFUN (declare_builtin, (unsigned long, char *));
+ extern int ia32_cpuid_needed;
int offset = (COMPILER_REGBLOCK_N_FIXED * (sizeof (SCHEME_OBJECT)));
unsigned char * esi_value = ((unsigned char *) (&Registers[0]));
int fp_support_present = (i386_interface_initialize ());
SETUP_REGISTER (asm_sc_apply_size_7); /* -10 */
SETUP_REGISTER (asm_sc_apply_size_8); /* -9 */
SETUP_REGISTER (asm_interrupt_continuation_2); /* -8 */
- SETUP_REGISTER (asm_conditionally_serialize); /* -7 */
+ if (ia32_cpuid_needed)
+ {
+ SETUP_REGISTER (asm_serialize_cache); /* -7 */
+ }
+ else
+ {
+ SETUP_REGISTER (asm_dont_serialize_cache); /* -7 */
+ }
\f
#ifdef _MACH_UNIX
{