Subversion Repositories HelenOS

Rev

Rev 4276 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4276 Rev 4314
Line 339... Line 339...
339
    112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,\
339
    112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,\
340
    127
340
    127
341
.org trap_table + (TT_TRAP_INSTRUCTION_0+\cur)*ENTRY_SIZE
341
.org trap_table + (TT_TRAP_INSTRUCTION_0+\cur)*ENTRY_SIZE
342
.global trap_instruction_\cur\()_tl0
342
.global trap_instruction_\cur\()_tl0
343
trap_instruction_\cur\()_tl0:
343
trap_instruction_\cur\()_tl0:
344
	ba trap_instruction_handler
344
	ba %xcc, trap_instruction_handler
345
	mov \cur, %g2
345
	mov \cur, %g2
346
.endr
346
.endr
347
 
347
 
348
/*
348
/*
349
 * Handlers for TL>0.
349
 * Handlers for TL>0.
Line 478... Line 478...
478
	 */
478
	 */
479
	rdpr %tl, %g3
479
	rdpr %tl, %g3
480
	cmp %g3, 1
480
	cmp %g3, 1
481
	be %xcc, 1f
481
	be %xcc, 1f
482
	nop
482
	nop
483
0:	ba 0b					! this is for debugging, if we ever get here
483
0:	ba %xcc, 0b				! this is for debugging, if we ever get here
484
	nop					! it will be easy to find
484
	nop					! it will be easy to find
485
 
485
 
486
1:
486
1:
487
.if NOT(\is_syscall)
487
.if NOT(\is_syscall)
488
	rdpr %tstate, %g3
488
	rdpr %tstate, %g3
Line 543... Line 543...
543
	stxa %g0, [%l0] ASI_DMMU
543
	stxa %g0, [%l0] ASI_DMMU
544
	rd %pc, %l0
544
	rd %pc, %l0
545
	flush %l0
545
	flush %l0
546
 
546
 
547
.if NOT(\is_syscall)
547
.if NOT(\is_syscall)
548
	ba 1f
548
	ba %xcc, 1f
549
	nop
549
	nop
550
0:
550
0:
551
	save %sp, -PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE, %sp
551
	save %sp, -PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE, %sp
552
 
552
 
553
	/*
553
	/*
Line 772... Line 772...
772
 
772
 
773
	dec %g3
773
	dec %g3
774
	and %g3, NWINDOWS - 1, %g3
774
	and %g3, NWINDOWS - 1, %g3
775
	wrpr %g3, 0, %cwp			! switch to the preceeding window
775
	wrpr %g3, 0, %cwp			! switch to the preceeding window
776
 
776
 
777
	ba 0b
777
	ba %xcc, 0b
778
	inc %g4
778
	inc %g4
779
 
779
 
780
0:
780
0:
781
	/*
781
	/*
782
	 * Switch back to the proper current window and adjust
782
	 * Switch back to the proper current window and adjust