Permit unaligned memory access on sparc.
authorEric Frias <efrias@syncad.com>
Sun, 21 Nov 2004 15:38:26 +0000 (15:38 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Sun, 21 Nov 2004 15:38:26 +0000 (15:38 +0000)
dlls/ntdll/signal_sparc.c

index cd4f6b001d5ee901255b7ed77b6d0cbf2452f5f9..36b42b9820f8f06c510042cb837ed910205fa144 100644 (file)
@@ -438,6 +438,12 @@ BOOL SIGNAL_Init(void)
     if (set_handler( SIGABRT, (void (*)())abrt_handler ) == -1) goto error;
     if (set_handler( SIGTERM, (void (*)())term_handler ) == -1) goto error;
     if (set_handler( SIGUSR1, (void (*)())usr1_handler ) == -1) goto error;
+    /* 'ta 6' tells the kernel to synthesize any unaligned accesses this 
+       process makes, instead of just signalling an error and terminating
+       the process.  wine-devel did not reach a conclusion on whether
+       this is correct, because that is what x86 does, or it is harmful 
+       because it could obscure problems in user code */
+    asm("ta 6"); /* 6 == ST_FIX_ALIGN defined in sys/trap.h */
    return TRUE;
 
  error: