From 23303f4ab477a508b2375139d74d0434297d13e8 Mon Sep 17 00:00:00 2001 From: mrg Date: Sat, 2 Jul 2011 14:04:14 +0000 Subject: [PATCH] make this mostly appear to work by using the C versions for now. --- .../gmp/lib/libgmp/arch/vax/Makefile.inc | 313 ++++++++++-------- .../lgpl3/gmp/lib/libgmp/arch/vax/config.m4 | 1 - 2 files changed, 172 insertions(+), 142 deletions(-) diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc index d7e972e9bc8c..44a3bdfa9ab7 100644 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc +++ b/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc @@ -1,145 +1,168 @@ -# $NetBSD: Makefile.inc,v 1.1 2011/07/02 13:36:57 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.2 2011/07/02 14:04:14 mrg Exp $ + +SRCS+= \ + random.c \ + divrem_2.c \ + toom_interpolate_7pts.c \ + sbpi1_divappr_q.c \ + random2.c \ + mu_bdiv_q.c \ + toom32_mul.c \ + toom44_mul.c \ + toom8h_mul.c \ + toom2_sqr.c \ + zero.c \ + mod_1_4.c \ + gcdext.c \ + binvert.c \ + mu_div_q.c \ + invertappr.c \ + dump.c \ + mu_divappr_q.c \ + dcpi1_div_qr.c \ + redc_1_sec.c \ + toom6_sqr.c \ + divrem_1.c \ + mod_1.c \ + divexact.c \ + powlo.c \ + mul.c \ + set_str.c \ + toom42_mul.c \ + toom_interpolate_6pts.c \ + dcpi1_divappr_q.c \ + copyd.c \ + toom_eval_dgr3_pm2.c \ + mod_1_3.c \ + com.c \ + copyi.c \ + toom_couple_handling.c \ + add.c \ + toom_interpolate_12pts.c \ + perfsqr.c \ + toom53_mul.c \ + toom_eval_pm2exp.c \ + mu_div_qr.c \ + toom_interpolate_16pts.c \ + mod_34lsub1.c \ + bdiv_q.c \ + toom22_mul.c \ + toom4_sqr.c \ + div_q.c \ + jacbase.c \ + gcdext_subdiv_step.c \ + mullo_n.c \ + toom33_mul.c \ + toom_eval_dgr3_pm1.c \ + mod_1_2.c \ + sub_1.c \ + trialdiv.c \ + add_1.c \ + sqr_basecase.c \ + toom_interpolate_5pts.c \ + sbpi1_bdiv_q.c \ + pre_mod_1.c \ + hgcd.c \ + bdiv_dbm1c.c \ + sqrtrem.c \ + bdiv_q_1.c \ + gcdext_1.c \ + toom63_mul.c \ + mul_basecase.c \ + toom8_sqr.c \ + neg.c \ + udiv_w_sdiv.c \ + gcdext_lehmer.c \ + divis.c \ + dcpi1_div_q.c \ + subcnd_n.c \ + toom_eval_pm2.c \ + hgcd2.c \ + toom62_mul.c \ + sbpi1_bdiv_qr.c \ + scan1.c \ + pre_divrem_1.c \ + perfpow.c \ + get_str.c \ + mullo_basecase.c \ + mulmod_bnm1.c \ + tdiv_qr.c \ + toom43_mul.c \ + mod_1_1.c \ + matrix22_mul.c \ + powm_sec.c \ + divrem.c \ + gcd_1.c \ + dcpi1_bdiv_qr.c \ + mul_n.c \ + redc_2.c \ + toom6h_mul.c \ + mul_fft.c \ + sqrmod_bnm1.c \ + powm.c \ + rootrem.c \ + mode1o.c \ + toom_interpolate_8pts.c \ + remove.c \ + lshiftc.c \ + dive_1.c \ + cmp.c \ + toom_eval_pm1.c \ + scan0.c \ + gcd_subdiv_step.c \ + sbpi1_div_qr.c \ + invert.c \ + sub.c \ + toom_eval_pm2rexp.c \ + dcpi1_bdiv_q.c \ + redc_1.c \ + sqr.c \ + nussbaumer_mul.c \ + mu_bdiv_qr.c \ + pow_1.c \ + gcd_lehmer.c \ + get_d.c \ + toom52_mul.c \ + sbpi1_div_q.c \ + diveby3.c \ + fib2_ui.c \ + bdiv_qr.c \ + toom3_sqr.c \ + gcd.c \ + redc_n.c \ C_SRCS_LIST= \ - toom6h_mul.c mpn/generic/toom6h_mul.c \ - toom3_sqr.c mpn/generic/toom3_sqr.c \ - copyi.c mpn/generic/copyi.c \ - sqrtrem.c mpn/generic/sqrtrem.c \ - iorn_n.c mpn/generic/logops_n.c \ - bdiv_qr.c mpn/generic/bdiv_qr.c \ - matrix22_mul.c mpn/generic/matrix22_mul.c \ - powlo.c mpn/generic/powlo.c \ - tdiv_qr.c mpn/generic/tdiv_qr.c \ - gcd_1.c mpn/generic/gcd_1.c \ - sqrmod_bnm1.c mpn/generic/sqrmod_bnm1.c \ - zero.c mpn/generic/zero.c \ - cmp.c mpn/generic/cmp.c \ - toom_couple_handling.c mpn/generic/toom_couple_handling.c \ - toom32_mul.c mpn/generic/toom32_mul.c \ - dump.c mpn/generic/dump.c \ - toom62_mul.c mpn/generic/toom62_mul.c \ - dive_1.c mpn/generic/dive_1.c \ - toom44_mul.c mpn/generic/toom44_mul.c \ - nand_n.c mpn/generic/logops_n.c \ - hgcd.c mpn/generic/hgcd.c \ - ior_n.c mpn/generic/logops_n.c \ - get_d.c mpn/generic/get_d.c \ - bdiv_dbm1c.c mpn/generic/bdiv_dbm1c.c \ - nussbaumer_mul.c mpn/generic/nussbaumer_mul.c \ - pre_divrem_1.c mpn/generic/pre_divrem_1.c \ - andn_n.c mpn/generic/logops_n.c \ - dcpi1_div_q.c mpn/generic/dcpi1_div_q.c \ - sbpi1_div_qr.c mpn/generic/sbpi1_div_qr.c \ - dcpi1_bdiv_qr.c mpn/generic/dcpi1_bdiv_qr.c \ - bdiv_q_1.c mpn/generic/bdiv_q_1.c \ - gcdext_1.c mpn/generic/gcdext_1.c \ - copyd.c mpn/generic/copyd.c \ - toom42_mul.c mpn/generic/toom42_mul.c \ - xnor_n.c mpn/generic/logops_n.c \ - dcpi1_div_qr.c mpn/generic/dcpi1_div_qr.c \ - sqr_basecase.c mpn/generic/sqr_basecase.c \ - toom_interpolate_7pts.c mpn/generic/toom_interpolate_7pts.c \ - toom63_mul.c mpn/generic/toom63_mul.c \ - gcdext.c mpn/generic/gcdext.c \ - mu_divappr_q.c mpn/generic/mu_divappr_q.c \ - mul_n.c mpn/generic/mul_n.c \ - gcd_subdiv_step.c mpn/generic/gcd_subdiv_step.c \ - udiv_w_sdiv.c mpn/generic/udiv_w_sdiv.c \ - pre_mod_1.c mpn/generic/pre_mod_1.c \ - toom8h_mul.c mpn/generic/toom8h_mul.c \ - toom_interpolate_6pts.c mpn/generic/toom_interpolate_6pts.c \ - mu_div_q.c mpn/generic/mu_div_q.c \ - add_1.c mpn/generic/add_1.c \ - hamdist.c mpn/generic/popham.c \ - powm_sec.c mpn/generic/powm_sec.c \ - toom22_mul.c mpn/generic/toom22_mul.c \ - invert.c mpn/generic/invert.c \ - toom8_sqr.c mpn/generic/toom8_sqr.c \ - xor_n.c mpn/generic/logops_n.c \ - mu_bdiv_qr.c mpn/generic/mu_bdiv_qr.c \ - com.c mpn/generic/com.c \ - redc_2.c mpn/generic/redc_2.c \ - toom43_mul.c mpn/generic/toom43_mul.c \ - subcnd_n.c mpn/generic/subcnd_n.c \ - invertappr.c mpn/generic/invertappr.c \ - redc_1.c mpn/generic/redc_1.c \ - sqr.c mpn/generic/sqr.c \ - trialdiv.c mpn/generic/trialdiv.c \ - mod_1_4.c mpn/generic/mod_1_4.c \ - fib2_ui.c mpn/generic/fib2_ui.c \ - mu_div_qr.c mpn/generic/mu_div_qr.c \ - sbpi1_divappr_q.c mpn/generic/sbpi1_divappr_q.c \ - toom_eval_pm2exp.c mpn/generic/toom_eval_pm2exp.c \ - perfsqr.c mpn/generic/perfsqr.c \ - toom6_sqr.c mpn/generic/toom6_sqr.c \ - mod_1_3.c mpn/generic/mod_1_3.c \ - dcpi1_divappr_q.c mpn/generic/dcpi1_divappr_q.c \ - popcount.c mpn/generic/popham.c \ - mullo_n.c mpn/generic/mullo_n.c \ - mod_1.c mpn/generic/mod_1.c \ - scan1.c mpn/generic/scan1.c \ - random.c mpn/generic/random.c \ - get_str.c mpn/generic/get_str.c \ - gcd.c mpn/generic/gcd.c \ - toom_eval_pm2.c mpn/generic/toom_eval_pm2.c \ - mod_1_2.c mpn/generic/mod_1_2.c \ - nior_n.c mpn/generic/logops_n.c \ - toom53_mul.c mpn/generic/toom53_mul.c \ - scan0.c mpn/generic/scan0.c \ - sub_1.c mpn/generic/sub_1.c \ - hgcd2.c mpn/generic/hgcd2.c \ - toom_interpolate_12pts.c mpn/generic/toom_interpolate_12pts.c \ - mulmod_bnm1.c mpn/generic/mulmod_bnm1.c \ - sub.c mpn/generic/sub.c \ - rootrem.c mpn/generic/rootrem.c \ - sbpi1_bdiv_q.c mpn/generic/sbpi1_bdiv_q.c \ - toom_eval_pm1.c mpn/generic/toom_eval_pm1.c \ - redc_1_sec.c mpn/generic/redc_1_sec.c \ - mod_1_1.c mpn/generic/mod_1_1.c \ - powm.c mpn/generic/powm.c \ - mul.c mpn/generic/mul.c \ - divis.c mpn/generic/divis.c \ - add.c mpn/generic/add.c \ - toom4_sqr.c mpn/generic/toom4_sqr.c \ - random2.c mpn/generic/random2.c \ - lshiftc.c mpn/generic/lshiftc.c \ - mul_basecase.c mpn/generic/mul_basecase.c \ - div_q.c mpn/generic/div_q.c \ - toom_interpolate_8pts.c mpn/generic/toom_interpolate_8pts.c \ - diveby3.c mpn/generic/diveby3.c \ - dcpi1_bdiv_q.c mpn/generic/dcpi1_bdiv_q.c \ - and_n.c mpn/generic/logops_n.c \ - divexact.c mpn/generic/divexact.c \ - gcd_lehmer.c mpn/generic/gcd_lehmer.c \ - redc_n.c mpn/generic/redc_n.c \ - toom33_mul.c mpn/generic/toom33_mul.c \ - toom_interpolate_16pts.c mpn/generic/toom_interpolate_16pts.c \ - set_str.c mpn/generic/set_str.c \ - toom2_sqr.c mpn/generic/toom2_sqr.c \ - jacbase.c mpn/generic/jacbase.c \ - remove.c mpn/generic/remove.c \ - mode1o.c mpn/generic/mode1o.c \ - perfpow.c mpn/generic/perfpow.c \ - toom_eval_dgr3_pm2.c mpn/generic/toom_eval_dgr3_pm2.c \ - sbpi1_div_q.c mpn/generic/sbpi1_div_q.c \ - gcdext_subdiv_step.c mpn/generic/gcdext_subdiv_step.c \ - sbpi1_bdiv_qr.c mpn/generic/sbpi1_bdiv_qr.c \ - toom_eval_pm2rexp.c mpn/generic/toom_eval_pm2rexp.c \ - divrem.c mpn/generic/divrem.c \ - binvert.c mpn/generic/binvert.c \ - mod_34lsub1.c mpn/generic/mod_34lsub1.c \ - toom_eval_dgr3_pm1.c mpn/generic/toom_eval_dgr3_pm1.c \ - mul_fft.c mpn/generic/mul_fft.c \ - mullo_basecase.c mpn/generic/mullo_basecase.c \ - divrem_2.c mpn/generic/divrem_2.c \ - toom52_mul.c mpn/generic/toom52_mul.c \ - mu_bdiv_q.c mpn/generic/mu_bdiv_q.c \ - neg.c mpn/generic/neg.c \ - toom_interpolate_5pts.c mpn/generic/toom_interpolate_5pts.c \ - divrem_1.c mpn/generic/divrem_1.c \ - pow_1.c mpn/generic/pow_1.c \ - bdiv_q.c mpn/generic/bdiv_q.c \ - gcdext_lehmer.c mpn/generic/gcdext_lehmer.c \ + xor_n.c mpn/generic/logops_n.c \ + nand_n.c mpn/generic/logops_n.c \ + nior_n.c mpn/generic/logops_n.c \ + hamdist.c mpn/generic/popham.c \ + popcount.c mpn/generic/popham.c \ + and_n.c mpn/generic/logops_n.c \ + ior_n.c mpn/generic/logops_n.c \ + xnor_n.c mpn/generic/logops_n.c \ + iorn_n.c mpn/generic/logops_n.c \ + andn_n.c mpn/generic/logops_n.c \ + +ASM_SRCS_LIST= \ + submul_1.s mpn/vax/submul_1.s \ + addmul_1.s mpn/vax/addmul_1.s \ + lshift.s mpn/vax/lshift.s \ + mul_1.s mpn/vax/mul_1.s \ + sub_n.s mpn/vax/sub_n.s \ + add_n.s mpn/vax/add_n.s \ + rshift.s mpn/vax/rshift.s \ + +# XXX can't build these asm sources yet +ASM_SRCS_LIST= + +C_SRCS_LIST+= \ + add_n.c mpn/generic/add_n.c \ + addmul_1.c mpn/generic/addmul_1.c \ + lshift.c mpn/generic/lshift.c \ + mul_1.c mpn/generic/mul_1.c \ + rshift.c mpn/generic/rshift.c \ + sub_n.c mpn/generic/sub_n.c \ + submul_1.c mpn/generic/submul_1.c \ gen-trialdivtab: gen-trialdivtab.c ${HOST_CC} -o ${.OBJDIR}/gen-trialdivtab ${.ALLSRC} -lm @@ -152,6 +175,14 @@ trialdivtab.h: gen-trialdivtab CLEANFILES+= trialdivtab.h +.for _build _src in ${ASM_SRCS_LIST} +${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4 ${_src} + ${TOOL_M4} -DCONFIG_TOP_SRCDIR=${DIST} -I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn -DOPERATION_${.TARGET:R} ${DIST}/${_src} > ${.TARGET} + +SRCS+= ${_build:R}.s + +.endfor + # XXX stuff looks for "../config.m4" dummy: mkdir dummy @@ -159,7 +190,7 @@ ${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.TARGET} .for _build _src in ${C_SRCS_LIST} -mpn_${_build}: Makefile +mpn_${_build}: Makefile ${_src} echo '#include "${_src}"' > ${.TARGET} CPPFLAGS.mpn_${_build}+= -DOPERATION_${_build:R} diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 index ffa172911458..4ef14abebfd5 100644 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 +++ b/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 @@ -1,7 +1,6 @@ dnl config.m4. Generated automatically by configure. changequote(<,>) ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,<`/u1/netbsd-HEAD/src/external/lgpl3/gmp/dist'>) define(,0) define(,<`no'>) define(,<42>)