This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

ia64 patch for libobjc build failure


This fixes the libobjc build failure that shows up with a make bootstrap.
No guarantees that it works though, I haven't gotten that far yet.

Wed Mar 15 11:34:27 2000  Jim Wilson  <wilson@cygnus.com>

	* config/ia64/ia64.md (restore_stack_nonlocal): New.
	* config/ia64/lib1funcs.asm (__ia64_nonlocal_goto): Delete padding nop.
	(__ia64_restore_stack_nonlocal): New.
	* config/ia64/t-ia64 (LIB1ASMFUNCS): Add __restore_stack_nonlocal.

Index: ia64.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.md,v
retrieving revision 1.2
diff -p -r1.2 ia64.md
*** ia64.md	2000/03/12 00:20:06	1.2
--- ia64.md	2000/03/15 19:34:05
***************
*** 3173,3178 ****
--- 3173,3196 ----
    ""
    "fc %0\;;;\;adds %0=31,%0\;;;\;fc %0\;;;\;sync.i\;srlz.i"
    [(set_attr "type" "unknown")])
+ 
+ ;; Builtin apply support.
+ 
+ (define_expand "restore_stack_nonlocal"
+   [(use (match_operand:DI 0 "register_operand" ""))
+    (use (match_operand:OI 1 "memory_operand" ""))]
+   ""
+   "
+ {
+   emit_library_call (gen_rtx_SYMBOL_REF (Pmode,
+ 					 \"__ia64_restore_stack_nonlocal\"),
+ 		     0, VOIDmode, 1,
+ 		     copy_to_reg (XEXP (operands[1], 0)), Pmode);
+   DONE;
+ }")
+ 
+ 
+ ;;; Intrinsics support.
  
  (define_insn "ccv_restore_si"
    [(unspec [(const_int 0)] 11)
Index: lib1funcs.asm
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/lib1funcs.asm,v
retrieving revision 1.1
diff -p -r1.1 lib1funcs.asm
*** lib1funcs.asm	2000/03/09 00:26:04	1.1
--- lib1funcs.asm	2000/03/15 19:34:05
*************** __ia64_nonlocal_goto:
*** 602,612 ****
  	adds r2=8,in2
  	ld8 r12=[in2],16
  	mov.ret.sptk.few.dc.dc rp = r33, .L0
- // ??? flushrs must be first instruction of a group.  Gas is unfortunately
- // putting the stop bit before the padding nop instead of after it, making
- // flushrs the first instruction of its bundle, but the second instruction
- // of its group.  We explicitly add the nop to avoid this problem.
- 	nop.i 0
  	;;
  	flushrs
  	ld8 r16=[r2],16
--- 602,607 ----
*************** __ia64_nonlocal_goto:
*** 632,635 ****
--- 627,670 ----
  	}
  	;;
  	.endp __ia64_nonlocal_goto
+ #endif
+ 
+ #ifdef L__restore_stack_nonlocal
+ // This is mostly the same as nonlocal_goto above.
+ // ??? This has not been tested yet.
+ 
+ // void __ia64_restore_stack_nonlocal(void *save_area)
+ 
+ 	.text
+ 	.align 16
+ 	.global __ia64_restore_stack_nonlocal
+ 	.proc __ia64_restore_stack_nonlocal
+ __ia64_restore_stack_nonlocal:
+ 	alloc r20=ar.pfs,4,0,0,0
+ 	mov r19=ar.rsc
+ 	adds r2=8,in0
+ 	ld8 r12=[in0],16
+ 	;;
+ 	flushrs
+ 	ld8 r16=[r2],16
+ 	and r19=0x1c,r19
+ 	ld8 r17=[in0]
+ 	;;
+ 	ld8 r18=[r2]
+ 	mov ar.rsc=r19
+ 	;;
+ 	mov ar.bspstore=r16
+ 	;;
+ 	mov ar.rnat=r17
+ 	mov ar.pfs=r18
+ 	or r19=0x3,r19
+ 	;;
+ 	loadrs
+ 	invala
+ .L0:	{
+ 	mov ar.rsc=r19
+ 	br.ret.sptk.few rp
+ 	}
+ 	;;
+ 	.endp __ia64_restore_stack_nonlocal
  #endif
Index: t-ia64
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/t-ia64,v
retrieving revision 1.1
diff -p -r1.1 t-ia64
*** t-ia64	2000/03/09 00:26:04	1.1
--- t-ia64	2000/03/15 19:34:05
*************** LIB1ASMSRC    = ia64/lib1funcs.asm
*** 11,17 ****
  LIB1ASMFUNCS  = __divdf3 __divsf3 \
  	__divdi3 __moddi3 __udivdi3 __umoddi3 \
  	__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
! 	__nonlocal_goto
  
  # ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
  # assembler does not accept # line number as a comment.
--- 11,17 ----
  LIB1ASMFUNCS  = __divdf3 __divsf3 \
  	__divdi3 __moddi3 __udivdi3 __umoddi3 \
  	__divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
! 	__nonlocal_goto __restore_stack_nonlocal
  
  # ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
  # assembler does not accept # line number as a comment.

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