This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

interrupt mask masking problem fix for hal/mips/arch/current/include/arch.inc


This fixes a mask that is one bit too large in arch.inc for mips.
The extra bit is undefined and reads as 0 on all mips I know of.


Index: arch/current/include/arch.inc
===================================================================
RCS file:
/cvs/ecos/ecos/packages/hal/mips/arch/current/include/arch.inc,v
retrieving revision 1.20
diff -U5 -p -r1.20 arch.inc
--- arch/current/include/arch.inc	23 May 2002 23:03:20 -0000
1.20
+++ arch/current/include/arch.inc	6 Aug 2003 00:40:52 -0000
@@ -345,11 +345,11 @@
 	nop				# delay slot
 	mfc0	v0,cause		# get cause register
 	nop				# delay slot
 	and	v0,v0,v1		# apply interrupt mask
 	srl	v0,v0,10		# shift interrupt bits down
-	andi	v0,v0,0x7f		# isolate 6 interrupt bits
+	andi	v0,v0,0x3f		# isolate 6 interrupt bits
 	la	v1,hal_intc_translation_table
 	add	v0,v0,v1		# index into table
 	lb	\vnum,0(v0)		# pick up vector number
 	.endm
 #endif



--
Andrew Dyer               |  adyer@righthandtech.com
Sr. Engineer              |  (630) 238-0789
RightHand Technologies    |  (630) 238-0469 (fax)
735 N. Edgewood Ave.      |
Suite D                   |
Wood Dale, IL 60191-1261  |
USA                       |


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]