This is the mail archive of the gcc@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]

Re: gcs fix for internal error on Winnt/Alpha


Jeffrey A Law wrote:
> 
>   In message <19971113135153.06746@dot.cygnus.com>you write:
>   > Thu Nov 13 13:45:39 1997  Richard Henderson  <rth@cygnus.com>
>   >
>   >     * alpha.c (call_operand): Any reg is valid for WinNT.
>   >     * alpha.md (call_nt, call_value_nt): Don't force address into $27.
>   >     (anon nt calls): Add 'R' alternative.
>   >     * alpha/win-nt.h (TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE,
>   >     INITIALIZE_TRAMPOLINE): Handle lack of original $27 and 32-bit ptrs.
> Thanks.  Installed.
> 
> jeff
Hi,
Sorry for the delay getting back to the list but
I just built an new native alpha/nt compiler using
Richard's patch instead of the one originally submitted by me.

DON'T INSTALL THE PATCH AS WRITTEN BY RICHARD...
All the gcc.c-torture test's that test trampoline code fail..
Two of the test's fail by generating an address outside NT
address range (in the NT 4.0 the above result is NT will
switch cpu time away from such a thread so there is no
DR watson error or any message the app just stop's ...
did you mask bits 32 to 63 to zero ? Remember 64 bit machine
address range 32 bit OS)
and the third report's an access violation..

In the original patch by me all the trampoline test's do pass...

_________________________________________________________________
Enclosed is a test example and resulting assembler source
generated by Richard's patch

921215-1.c
main()
{
#ifndef NO_TRAMPOLINES
  void p(void ((*f) (void ())))
    {
      void r()
	{
	  foo ();
	}

      f(r);
    }

  void q(void ((*f)()))
    {
      f();
    }

  p(q);
#endif
  exit(0);
}

foo(){}

	.set noreorder
	.set volatile
	.set noat
	.globl	__fltused
	.file	1 "921215-1.c"
gcc2_compiled.:
__gnu_compiled_c:
.text
	.align 3
	.ent r.5
r.5:
	lda $30,-48($30)
	.frame $15,48,$26,0
	stq $26,0($30)
	stq $15,8($30)
	.mask 0x4008000,-48
	stt $f2,16($30)
	.fmask 0x4,-32
	bis $30,$30,$15
	.prologue 0
	stq $1,32($15)
	ldq $1,32($15)
	ldt $f2,0($1)
	jsr $26,foo
$35:
	bis $15,$15,$30
	ldq $26,0($30)
	ldt $f2,16($30)
	ldq $15,8($30)
	addq $30,48,$30
	ret $31,($26),1
	.end r.5
	.align 3
$TRAMP32:
	br $27,$LTRAMPP
$LTRAMPP:
	ldl $1,12($27)
	ldl $27,16($27)
	jmp $31,($27),0
	.long 0,0
	.align 3
	.ent p.2
p.2:
	lda $30,-80($30)
	.frame $15,80,$26,0
	stq $26,0($30)
	stq $9,8($30)
	stq $15,16($30)
	.mask 0x4008200,-80
	bis $30,$30,$15
	.prologue 0
	stq $1,32($15)
	bis $16,$16,$9
	stl $9,40($15)
	addq $15,48,$2
	addq $2,7,$1
	bic $1,7,$1
	lda $2,$TRAMP32
	ldt $f1,0($2)
	stt $f1,0($1)
	ldt $f1,8($2)
	stt $f1,8($1)
	ldt $f1,16($2)
	stt $f1,16($1)
	lda $2,r.5
	stl $2,16($1)
	addq $15,32,$3
	stl $3,20($1)
	call_pal 0x86
	addq $15,48,$2
	addq $2,7,$1
	bic $1,7,$1
	addl $1,$31,$2
	ldl $1,40($15)
	bis $2,$2,$16
	jsr $26,($1)
$34:
	bis $15,$15,$30
	ldq $26,0($30)
	ldq $9,8($30)
	ldq $15,16($30)
	addq $30,80,$30
	ret $31,($26),1
	.end p.2
	.align 3
	.ent q.8
q.8:
	lda $30,-48($30)
	.frame $15,48,$26,0
	stq $26,0($30)
	stq $9,8($30)
	stq $10,16($30)
	stq $15,24($30)
	.mask 0x4008600,-48
	bis $30,$30,$15
	.prologue 0
	stq $1,32($15)
	bis $16,$16,$9
	stl $9,40($15)
	ldl $10,40($15)
	jsr $26,($10)
$36:
	bis $15,$15,$30
	ldq $26,0($30)
	ldq $9,8($30)
	ldq $10,16($30)
	ldq $15,24($30)
	addq $30,48,$30
	ret $31,($26),1
	.end q.8
	.align 3
	.globl main
	.ent main
main:
	lda $30,-48($30)
	.frame $15,48,$26,0
	stq $26,0($30)
	stq $15,8($30)
	.mask 0x4008000,-48
	bis $30,$30,$15
	.prologue 0
	addq $15,23,$1
	bic $1,7,$1
	lda $2,$TRAMP32
	ldt $f1,0($2)
	stt $f1,0($1)
	ldt $f1,8($2)
	stt $f1,8($1)
	ldt $f1,16($2)
	stt $f1,16($1)
	lda $2,q.8
	stl $2,16($1)
	addq $15,16,$3
	stl $3,20($1)
	call_pal 0x86
	addq $15,23,$1
	bic $1,7,$1
	addl $1,$31,$2
	addq $15,16,$1
	bis $2,$2,$16
	bsr $26,p.2
	bis $31,$31,$1
	bis $1,$1,$16
	jsr $26,exit
$33:
	bis $15,$15,$30
	ldq $26,0($30)
	ldq $15,8($30)
	addq $30,48,$30
	ret $31,($26),1
	.end main
	.align 3
	.globl foo
	.ent foo
foo:
	lda $30,-16($30)
	.frame $15,16,$26,0
	stq $26,0($30)
	stq $15,8($30)
	.mask 0x4008000,-16
	bis $30,$30,$15
	.prologue 0
$37:
	bis $15,$15,$30
	ldq $26,0($30)
	ldq $15,8($30)
	addq $30,16,$30
	ret $31,($26),1
	.end foo


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