$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s.orig	Tue Feb 26 18:50:51 2008
+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s	Tue Feb 26 18:50:54 2008
@@ -21,6 +21,7 @@
 # have any questions.
 # 
 
+	.globl fixcw
 	
         # NOTE WELL!  The _Copy functions are called directly
 	# from server-compiler-generated code via CallLeafNoFP,
@@ -41,6 +42,17 @@
 
 	.text
 
+# Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp
+# Set fpu to 53 bit precision.  This happens too early to use a stub.
+# ported from solaris_x86_32.s
+	.align   16
+fixcw:
+	pushl    $0x27f
+	fldcw    0(%esp)
+	popl     %eax
+	ret
+
+       .align  16
         .globl  SafeFetch32, Fetch32PFI, Fetch32Resume
         .globl  SafeFetchN
         ## TODO: avoid exposing Fetch32PFI and Fetch32Resume.
