Module Name:    src
Committed By:   mhitch
Date:           Wed May  6 21:37:40 UTC 2009

Modified Files:
        src/sys/arch/m68k/include: psl.h

Log Message:
Add memory clobber to the instructions that change the IPL in the status
register.  See also kern/38637.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/psl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/m68k/include/psl.h
diff -u src/sys/arch/m68k/include/psl.h:1.13 src/sys/arch/m68k/include/psl.h:1.14
--- src/sys/arch/m68k/include/psl.h:1.13	Thu Feb 16 20:17:13 2006
+++ src/sys/arch/m68k/include/psl.h	Wed May  6 21:37:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.13 2006/02/16 20:17:13 perry Exp $	*/
+/*	$NetBSD: psl.h,v 1.14 2009/05/06 21:37:40 mhitch Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -79,7 +79,7 @@
 	int sr;
 
 	__asm volatile ("movew %%sr,%0; movew %1,%%sr" :
-	    "=&d" (sr) : "di" (s));
+	    "=&d" (sr) : "di" (s) : "memory");
 
 	return sr;
 }
@@ -92,7 +92,7 @@
 	__asm volatile("movw %%sr,%0" : "=d" (sr));
 
 	if ((u_int16_t)level >= PSL_HIGHIPL || (u_int16_t)level > (u_int16_t)sr)
-		__asm volatile("movw %0,%%sr" :: "di" (level));
+		__asm volatile("movw %0,%%sr" :: "di" (level) : "memory");
 
 	return sr;
 }

Reply via email to