diff --git a/perl.c b/perl.c index 9dc670aa22..6d1fff3a25 100644 --- a/perl.c +++ b/perl.c @@ -216,26 +216,6 @@ Initializes a new Perl interpreter. See L. =cut */ -static void -S_fixup_platform_bugs(void) -{ -#if defined(__GLIBC__) && IVSIZE == 8 \ - && ( __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)) - { - IV l = 3; - IV r = -10; - /* Cannot do this check with inlined IV constants since - * that seems to work correctly even with the buggy glibc. */ - if (l % r == -3) { - dTHX; - /* Yikes, we have the bug. - * Patch in the workaround version. */ - PL_ppaddr[OP_I_MODULO] = &Perl_pp_i_modulo_glibc_bugfix; - } - } -#endif -} - void perl_construct(pTHXx) { @@ -296,8 +276,6 @@ perl_construct(pTHXx) init_ids(); - S_fixup_platform_bugs(); - JMPENV_BOOTSTRAP; STATUS_ALL_SUCCESS; diff --git a/pp.c b/pp.c index 9099f64c4c..980a4c3579 100644 --- a/pp.c +++ b/pp.c @@ -2654,7 +2654,6 @@ PP(pp_i_divide) PP(pp_i_modulo) { - /* This is the vanilla old i_modulo. */ dSP; dATARGET; tryAMAGICbin_MG(modulo_amg, AMGf_assign); { @@ -2670,30 +2669,6 @@ PP(pp_i_modulo) } } -#if defined(__GLIBC__) && IVSIZE == 8 \ - && ( __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)) - -PP(pp_i_modulo_glibc_bugfix) -{ - /* This is the i_modulo with the workaround for the _moddi3 bug - * in (at least) glibc 2.2.5 (the PERL_ABS() the workaround). - * See below for pp_i_modulo. */ - dSP; dATARGET; - tryAMAGICbin_MG(modulo_amg, AMGf_assign); - { - dPOPTOPiirl_nomg; - if (!right) - DIE(aTHX_ "Illegal modulus zero"); - /* avoid FPE_INTOVF on some platforms when left is IV_MIN */ - if (right == -1) - SETi( 0 ); - else - SETi( left % PERL_ABS(right) ); - RETURN; - } -} -#endif - PP(pp_i_add) { dSP; dATARGET; diff --git a/pp_proto.h b/pp_proto.h index 580ce937ec..25b8dd52fa 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -298,9 +298,4 @@ PERL_CALLCONV OP *Perl_pp_warn(pTHX); PERL_CALLCONV OP *Perl_pp_xor(pTHX); PERL_CALLCONV OP *Perl_unimplemented_op(pTHX); -/* alternative functions */ -#if defined(__GLIBC__) && IVSIZE == 8 && ( __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)) -PERL_CALLCONV OP *Perl_pp_i_modulo_glibc_bugfix(pTHX); -#endif - /* ex: set ro: */ diff --git a/regen/opcode.pl b/regen/opcode.pl index 672f55c368..593dd61e72 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -139,13 +139,6 @@ my @raw_alias = ( Perl_pp_shostent => [qw(snetent sprotoent sservent)], Perl_pp_aelemfast => ['aelemfast_lex'], Perl_pp_grepstart => ['mapstart'], - - # 2 i_modulo mappings: 2nd is alt, needs 1st (explicit default) to not override the default - Perl_pp_i_modulo => ['i_modulo'], - Perl_pp_i_modulo_glibc_bugfix => { - 'i_modulo' => - '#if defined(__GLIBC__) && IVSIZE == 8 '. - ' && ( __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8))' }, ); while (my ($func, $names) = splice @raw_alias, 0, 2) {