diff options
-rw-r--r-- | hints/unicos.sh | 9 | ||||
-rw-r--r-- | pp.c | 8 | ||||
-rw-r--r-- | pp_ctl.c | 12 | ||||
-rw-r--r-- | t/op/64bitint.t | 2 |
4 files changed, 26 insertions, 5 deletions
diff --git a/hints/unicos.sh b/hints/unicos.sh index 7ffd73fbcc..ddbdee4ca0 100644 --- a/hints/unicos.sh +++ b/hints/unicos.sh @@ -2,13 +2,16 @@ case `uname -r` in 6.1*) shellflags="-m+65536" ;; esac case "$optimize" in -'') optimize="-O1" ;; +'') optimize="-O1 -h nofastmd" ;; +esac +case `uname -r` in +10.*) pp_ctl_cflags='ccflags="$ccflags -DUNICOS_BROKEN_VOLATILE' ;; esac d_setregid='undef' d_setreuid='undef' case "$usemymalloc" in -'') # The perl malloc.c SHOULD work says Ilya. - # But for the time being (5.004_68), alas, it doesn't. +'') # The perl malloc.c SHOULD work in Unicos (ILP64) says Ilya. + # But for the time being (5.004_68), alas, it doesn't. --jhi # usemymalloc='y' # ccflags="$ccflags -DNO_RCHECK" usemymalloc='n' @@ -4743,10 +4743,14 @@ PP(pp_pack) DIE(aTHX_ "Cannot compress negative numbers"); if ( -#ifdef CXUX_BROKEN_CONSTANT_CONVERT - adouble <= UV_MAX_cxux +#if UVSIZE > 4 && UVSIZE >= NVSIZE + adouble <= 0xffffffff #else +# ifdef CXUX_BROKEN_CONSTANT_CONVERT + adouble <= UV_MAX_cxux +# else adouble <= UV_MAX +# endif #endif ) { @@ -2561,14 +2561,26 @@ S_docatch_body(pTHX) return NULL; } +/* In Unicos 10.0.0.6 (T90) the cc seems to botch optimization so that + * if cursi is an auto variable inside S_docatch() cursi doesn't get + * properly saved/restored across longjmps. &/ +#ifdef UNICOS_BROKEN_VOLATILE +volatile PERL_SI *cursi; +#endif + STATIC OP * S_docatch(pTHX_ OP *o) { dTHR; int ret; OP *oldop = PL_op; +#ifdef UNICOS_BROKEN_VOLATILE + dJMPENV; + cursi = PL_curstackinfo; +#else volatile PERL_SI *cursi = PL_curstackinfo; dJMPENV; +#endif #ifdef DEBUGGING assert(CATCH_GET == TRUE); diff --git a/t/op/64bitint.t b/t/op/64bitint.t index f59c953825..6d33e8ab8d 100644 --- a/t/op/64bitint.t +++ b/t/op/64bitint.t @@ -1,5 +1,7 @@ #./perl +use integer; + BEGIN { eval { my $q = pack "q", 0 }; if ($@) { |