[Gmp-commit] /var/hg/gmp: Generate inversion table.

mercurial at gmplib.org mercurial at gmplib.org
Tue Apr 16 20:36:55 CEST 2013


details:   /var/hg/gmp/rev/e544ea10c574
changeset: 15725:e544ea10c574
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue Apr 16 20:36:40 2013 +0200
description:
Generate inversion table.

diffstat:

 ChangeLog                                |   8 ++++++
 mpn/alpha/invert_limb.asm                |  37 +++---------------------------
 mpn/powerpc64/mode64/invert_limb.asm     |  38 ++++--------------------------
 mpn/s390_64/invert_limb.asm              |  37 +++---------------------------
 mpn/sparc64/ultrasparct3/invert_limb.asm |  35 ++--------------------------
 mpn/x86_64/invert_limb_table.asm         |  39 ++++---------------------------
 6 files changed, 30 insertions(+), 164 deletions(-)

diffs (262 lines):

diff -r 4134409a5b31 -r e544ea10c574 ChangeLog
--- a/ChangeLog	Tue Apr 16 20:10:59 2013 +0200
+++ b/ChangeLog	Tue Apr 16 20:36:40 2013 +0200
@@ -1,3 +1,11 @@
+2013-04-16  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/alpha/invert_limb.asm: Generate table.
+	* mpn/powerpc64/mode64/invert_limb.asm: Likewise.
+	* mpn/s390_64/invert_limb.asm: Likewise.
+	* mpn/sparc64/ultrasparct3/invert_limb.asm: Likewise.
+	* mpn/x86_64/invert_limb_table.asm: Likewise.
+
 2013-04-15  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/sparc64/ultrasparct3/invert_limb.asm: Avoid addend for GOT entry,
diff -r 4134409a5b31 -r e544ea10c574 mpn/alpha/invert_limb.asm
--- a/mpn/alpha/invert_limb.asm	Tue Apr 16 20:10:59 2013 +0200
+++ b/mpn/alpha/invert_limb.asm	Tue Apr 16 20:36:40 2013 +0200
@@ -1,6 +1,6 @@
 dnl  Alpha mpn_invert_limb -- Invert a normalized limb.
 
-dnl  Copyright 1996, 2000, 2001, 2002, 2003, 2007, 2011 Free Software
+dnl  Copyright 1996, 2000, 2001, 2002, 2003, 2007, 2011, 2013 Free Software
 dnl  Foundation, Inc.
 dnl
 dnl  This file is part of the GNU MP Library.
@@ -77,37 +77,8 @@
 	ret	r31, (r26), 1
 EPILOGUE()
 DATASTART(approx_tab)
-	.word	0x7fd,0x7f5,0x7ed,0x7e5,0x7dd,0x7d5,0x7ce,0x7c6
-	.word	0x7bf,0x7b7,0x7b0,0x7a8,0x7a1,0x79a,0x792,0x78b
-	.word	0x784,0x77d,0x776,0x76f,0x768,0x761,0x75b,0x754
-	.word	0x74d,0x747,0x740,0x739,0x733,0x72c,0x726,0x720
-	.word	0x719,0x713,0x70d,0x707,0x700,0x6fa,0x6f4,0x6ee
-	.word	0x6e8,0x6e2,0x6dc,0x6d6,0x6d1,0x6cb,0x6c5,0x6bf
-	.word	0x6ba,0x6b4,0x6ae,0x6a9,0x6a3,0x69e,0x698,0x693
-	.word	0x68d,0x688,0x683,0x67d,0x678,0x673,0x66e,0x669
-	.word	0x664,0x65e,0x659,0x654,0x64f,0x64a,0x645,0x640
-	.word	0x63c,0x637,0x632,0x62d,0x628,0x624,0x61f,0x61a
-	.word	0x616,0x611,0x60c,0x608,0x603,0x5ff,0x5fa,0x5f6
-	.word	0x5f1,0x5ed,0x5e9,0x5e4,0x5e0,0x5dc,0x5d7,0x5d3
-	.word	0x5cf,0x5cb,0x5c6,0x5c2,0x5be,0x5ba,0x5b6,0x5b2
-	.word	0x5ae,0x5aa,0x5a6,0x5a2,0x59e,0x59a,0x596,0x592
-	.word	0x58e,0x58a,0x586,0x583,0x57f,0x57b,0x577,0x574
-	.word	0x570,0x56c,0x568,0x565,0x561,0x55e,0x55a,0x556
-	.word	0x553,0x54f,0x54c,0x548,0x545,0x541,0x53e,0x53a
-	.word	0x537,0x534,0x530,0x52d,0x52a,0x526,0x523,0x520
-	.word	0x51c,0x519,0x516,0x513,0x50f,0x50c,0x509,0x506
-	.word	0x503,0x500,0x4fc,0x4f9,0x4f6,0x4f3,0x4f0,0x4ed
-	.word	0x4ea,0x4e7,0x4e4,0x4e1,0x4de,0x4db,0x4d8,0x4d5
-	.word	0x4d2,0x4cf,0x4cc,0x4ca,0x4c7,0x4c4,0x4c1,0x4be
-	.word	0x4bb,0x4b9,0x4b6,0x4b3,0x4b0,0x4ad,0x4ab,0x4a8
-	.word	0x4a5,0x4a3,0x4a0,0x49d,0x49b,0x498,0x495,0x493
-	.word	0x490,0x48d,0x48b,0x488,0x486,0x483,0x481,0x47e
-	.word	0x47c,0x479,0x477,0x474,0x472,0x46f,0x46d,0x46a
-	.word	0x468,0x465,0x463,0x461,0x45e,0x45c,0x459,0x457
-	.word	0x455,0x452,0x450,0x44e,0x44b,0x449,0x447,0x444
-	.word	0x442,0x440,0x43e,0x43b,0x439,0x437,0x435,0x432
-	.word	0x430,0x42e,0x42c,0x42a,0x428,0x425,0x423,0x421
-	.word	0x41f,0x41d,0x41b,0x419,0x417,0x414,0x412,0x410
-	.word	0x40e,0x40c,0x40a,0x408,0x406,0x404,0x402,0x400
+forloop(i,256,512-1,dnl
+`	.word	eval(0x7fd00/i)
+')dnl
 DATAEND()
 ASM_END()
diff -r 4134409a5b31 -r e544ea10c574 mpn/powerpc64/mode64/invert_limb.asm
--- a/mpn/powerpc64/mode64/invert_limb.asm	Tue Apr 16 20:10:59 2013 +0200
+++ b/mpn/powerpc64/mode64/invert_limb.asm	Tue Apr 16 20:36:40 2013 +0200
@@ -71,37 +71,11 @@
 EPILOGUE()
 
 DEF_OBJECT(approx_tab)
-	.short	0x7fd,0x7f5,0x7ed,0x7e5,0x7dd,0x7d5,0x7ce,0x7c6
-	.short	0x7bf,0x7b7,0x7b0,0x7a8,0x7a1,0x79a,0x792,0x78b
-	.short	0x784,0x77d,0x776,0x76f,0x768,0x761,0x75b,0x754
-	.short	0x74d,0x747,0x740,0x739,0x733,0x72c,0x726,0x720
-	.short	0x719,0x713,0x70d,0x707,0x700,0x6fa,0x6f4,0x6ee
-	.short	0x6e8,0x6e2,0x6dc,0x6d6,0x6d1,0x6cb,0x6c5,0x6bf
-	.short	0x6ba,0x6b4,0x6ae,0x6a9,0x6a3,0x69e,0x698,0x693
-	.short	0x68d,0x688,0x683,0x67d,0x678,0x673,0x66e,0x669
-	.short	0x664,0x65e,0x659,0x654,0x64f,0x64a,0x645,0x640
-	.short	0x63c,0x637,0x632,0x62d,0x628,0x624,0x61f,0x61a
-	.short	0x616,0x611,0x60c,0x608,0x603,0x5ff,0x5fa,0x5f6
-	.short	0x5f1,0x5ed,0x5e9,0x5e4,0x5e0,0x5dc,0x5d7,0x5d3
-	.short	0x5cf,0x5cb,0x5c6,0x5c2,0x5be,0x5ba,0x5b6,0x5b2
-	.short	0x5ae,0x5aa,0x5a6,0x5a2,0x59e,0x59a,0x596,0x592
-	.short	0x58e,0x58a,0x586,0x583,0x57f,0x57b,0x577,0x574
-	.short	0x570,0x56c,0x568,0x565,0x561,0x55e,0x55a,0x556
-	.short	0x553,0x54f,0x54c,0x548,0x545,0x541,0x53e,0x53a
-	.short	0x537,0x534,0x530,0x52d,0x52a,0x526,0x523,0x520
-	.short	0x51c,0x519,0x516,0x513,0x50f,0x50c,0x509,0x506
-	.short	0x503,0x500,0x4fc,0x4f9,0x4f6,0x4f3,0x4f0,0x4ed
-	.short	0x4ea,0x4e7,0x4e4,0x4e1,0x4de,0x4db,0x4d8,0x4d5
-	.short	0x4d2,0x4cf,0x4cc,0x4ca,0x4c7,0x4c4,0x4c1,0x4be
-	.short	0x4bb,0x4b9,0x4b6,0x4b3,0x4b0,0x4ad,0x4ab,0x4a8
-	.short	0x4a5,0x4a3,0x4a0,0x49d,0x49b,0x498,0x495,0x493
-	.short	0x490,0x48d,0x48b,0x488,0x486,0x483,0x481,0x47e
-	.short	0x47c,0x479,0x477,0x474,0x472,0x46f,0x46d,0x46a
-	.short	0x468,0x465,0x463,0x461,0x45e,0x45c,0x459,0x457
-	.short	0x455,0x452,0x450,0x44e,0x44b,0x449,0x447,0x444
-	.short	0x442,0x440,0x43e,0x43b,0x439,0x437,0x435,0x432
-	.short	0x430,0x42e,0x42c,0x42a,0x428,0x425,0x423,0x421
-	.short	0x41f,0x41d,0x41b,0x419,0x417,0x414,0x412,0x410
-	.short	0x40e,0x40c,0x40a,0x408,0x406,0x404,0x402,0x400
+forloop(i,256,512-1,dnl
+`	.half	eval(0x7fd00/i)
+')dnl
+forloop(i,256,512-1,dnl
+`	.short	eval(0x7fd00/i)
+')dnl
 END_OBJECT(approx_tab)
 ASM_END()
diff -r 4134409a5b31 -r e544ea10c574 mpn/s390_64/invert_limb.asm
--- a/mpn/s390_64/invert_limb.asm	Tue Apr 16 20:10:59 2013 +0200
+++ b/mpn/s390_64/invert_limb.asm	Tue Apr 16 20:36:40 2013 +0200
@@ -2,7 +2,7 @@
 
 dnl  Contributed to the GNU project by Torbjorn Granlund.
 
-dnl  Copyright 2011 Free Software Foundation, Inc.
+dnl  Copyright 2011, 2013 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -77,36 +77,7 @@
 	RODATA
 	ALIGN(2)
 approx_tab:
-	.word	0x7fd,0x7f5,0x7ed,0x7e5,0x7dd,0x7d5,0x7ce,0x7c6
-	.word	0x7bf,0x7b7,0x7b0,0x7a8,0x7a1,0x79a,0x792,0x78b
-	.word	0x784,0x77d,0x776,0x76f,0x768,0x761,0x75b,0x754
-	.word	0x74d,0x747,0x740,0x739,0x733,0x72c,0x726,0x720
-	.word	0x719,0x713,0x70d,0x707,0x700,0x6fa,0x6f4,0x6ee
-	.word	0x6e8,0x6e2,0x6dc,0x6d6,0x6d1,0x6cb,0x6c5,0x6bf
-	.word	0x6ba,0x6b4,0x6ae,0x6a9,0x6a3,0x69e,0x698,0x693
-	.word	0x68d,0x688,0x683,0x67d,0x678,0x673,0x66e,0x669
-	.word	0x664,0x65e,0x659,0x654,0x64f,0x64a,0x645,0x640
-	.word	0x63c,0x637,0x632,0x62d,0x628,0x624,0x61f,0x61a
-	.word	0x616,0x611,0x60c,0x608,0x603,0x5ff,0x5fa,0x5f6
-	.word	0x5f1,0x5ed,0x5e9,0x5e4,0x5e0,0x5dc,0x5d7,0x5d3
-	.word	0x5cf,0x5cb,0x5c6,0x5c2,0x5be,0x5ba,0x5b6,0x5b2
-	.word	0x5ae,0x5aa,0x5a6,0x5a2,0x59e,0x59a,0x596,0x592
-	.word	0x58e,0x58a,0x586,0x583,0x57f,0x57b,0x577,0x574
-	.word	0x570,0x56c,0x568,0x565,0x561,0x55e,0x55a,0x556
-	.word	0x553,0x54f,0x54c,0x548,0x545,0x541,0x53e,0x53a
-	.word	0x537,0x534,0x530,0x52d,0x52a,0x526,0x523,0x520
-	.word	0x51c,0x519,0x516,0x513,0x50f,0x50c,0x509,0x506
-	.word	0x503,0x500,0x4fc,0x4f9,0x4f6,0x4f3,0x4f0,0x4ed
-	.word	0x4ea,0x4e7,0x4e4,0x4e1,0x4de,0x4db,0x4d8,0x4d5
-	.word	0x4d2,0x4cf,0x4cc,0x4ca,0x4c7,0x4c4,0x4c1,0x4be
-	.word	0x4bb,0x4b9,0x4b6,0x4b3,0x4b0,0x4ad,0x4ab,0x4a8
-	.word	0x4a5,0x4a3,0x4a0,0x49d,0x49b,0x498,0x495,0x493
-	.word	0x490,0x48d,0x48b,0x488,0x486,0x483,0x481,0x47e
-	.word	0x47c,0x479,0x477,0x474,0x472,0x46f,0x46d,0x46a
-	.word	0x468,0x465,0x463,0x461,0x45e,0x45c,0x459,0x457
-	.word	0x455,0x452,0x450,0x44e,0x44b,0x449,0x447,0x444
-	.word	0x442,0x440,0x43e,0x43b,0x439,0x437,0x435,0x432
-	.word	0x430,0x42e,0x42c,0x42a,0x428,0x425,0x423,0x421
-	.word	0x41f,0x41d,0x41b,0x419,0x417,0x414,0x412,0x410
-	.word	0x40e,0x40c,0x40a,0x408,0x406,0x404,0x402,0x400
+forloop(i,256,512-1,dnl
+`	.word	eval(0x7fd00/i)
+')dnl
 ASM_END()
diff -r 4134409a5b31 -r e544ea10c574 mpn/sparc64/ultrasparct3/invert_limb.asm
--- a/mpn/sparc64/ultrasparct3/invert_limb.asm	Tue Apr 16 20:10:59 2013 +0200
+++ b/mpn/sparc64/ultrasparct3/invert_limb.asm	Tue Apr 16 20:36:40 2013 +0200
@@ -76,35 +76,6 @@
 	TYPE(	approx_tab, object)
 	SIZE(	approx_tab, 512)
 approx_tab:
-	.half	2045,2037,2029,2021,2013,2005,1998,1990
-	.half	1983,1975,1968,1960,1953,1946,1938,1931
-	.half	1924,1917,1910,1903,1896,1889,1883,1876
-	.half	1869,1863,1856,1849,1843,1836,1830,1824
-	.half	1817,1811,1805,1799,1792,1786,1780,1774
-	.half	1768,1762,1756,1750,1745,1739,1733,1727
-	.half	1722,1716,1710,1705,1699,1694,1688,1683
-	.half	1677,1672,1667,1661,1656,1651,1646,1641
-	.half	1636,1630,1625,1620,1615,1610,1605,1600
-	.half	1596,1591,1586,1581,1576,1572,1567,1562
-	.half	1558,1553,1548,1544,1539,1535,1530,1526
-	.half	1521,1517,1513,1508,1504,1500,1495,1491
-	.half	1487,1483,1478,1474,1470,1466,1462,1458
-	.half	1454,1450,1446,1442,1438,1434,1430,1426
-	.half	1422,1418,1414,1411,1407,1403,1399,1396
-	.half	1392,1388,1384,1381,1377,1374,1370,1366
-	.half	1363,1359,1356,1352,1349,1345,1342,1338
-	.half	1335,1332,1328,1325,1322,1318,1315,1312
-	.half	1308,1305,1302,1299,1295,1292,1289,1286
-	.half	1283,1280,1276,1273,1270,1267,1264,1261
-	.half	1258,1255,1252,1249,1246,1243,1240,1237
-	.half	1234,1231,1228,1226,1223,1220,1217,1214
-	.half	1211,1209,1206,1203,1200,1197,1195,1192
-	.half	1189,1187,1184,1181,1179,1176,1173,1171
-	.half	1168,1165,1163,1160,1158,1155,1153,1150
-	.half	1148,1145,1143,1140,1138,1135,1133,1130
-	.half	1128,1125,1123,1121,1118,1116,1113,1111
-	.half	1109,1106,1104,1102,1099,1097,1095,1092
-	.half	1090,1088,1086,1083,1081,1079,1077,1074
-	.half	1072,1070,1068,1066,1064,1061,1059,1057
-	.half	1055,1053,1051,1049,1047,1044,1042,1040
-	.half	1038,1036,1034,1032,1030,1028,1026,1024
+forloop(i,256,512-1,dnl
+`	.half	eval(0x7fd00/i)
+')dnl
diff -r 4134409a5b31 -r e544ea10c574 mpn/x86_64/invert_limb_table.asm
--- a/mpn/x86_64/invert_limb_table.asm	Tue Apr 16 20:10:59 2013 +0200
+++ b/mpn/x86_64/invert_limb_table.asm	Tue Apr 16 20:36:40 2013 +0200
@@ -2,8 +2,8 @@
 
 dnl  Contributed to the GNU project by Torbjorn Granlund and Niels Möller.
 
-dnl  Copyright 2004, 2007, 2008, 2009, 2011, 2012 Free Software Foundation,
-dnl  Inc.
+dnl  Copyright 2004, 2007, 2008, 2009, 2011, 2012, 2013 Free Software
+dnl  Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -34,36 +34,7 @@
 	ALIGN(2)
 	GLOBL mpn_invert_limb_table
 mpn_invert_limb_table:
-	.value	0x7fd,0x7f5,0x7ed,0x7e5,0x7dd,0x7d5,0x7ce,0x7c6
-	.value	0x7bf,0x7b7,0x7b0,0x7a8,0x7a1,0x79a,0x792,0x78b
-	.value	0x784,0x77d,0x776,0x76f,0x768,0x761,0x75b,0x754
-	.value	0x74d,0x747,0x740,0x739,0x733,0x72c,0x726,0x720
-	.value	0x719,0x713,0x70d,0x707,0x700,0x6fa,0x6f4,0x6ee
-	.value	0x6e8,0x6e2,0x6dc,0x6d6,0x6d1,0x6cb,0x6c5,0x6bf
-	.value	0x6ba,0x6b4,0x6ae,0x6a9,0x6a3,0x69e,0x698,0x693
-	.value	0x68d,0x688,0x683,0x67d,0x678,0x673,0x66e,0x669
-	.value	0x664,0x65e,0x659,0x654,0x64f,0x64a,0x645,0x640
-	.value	0x63c,0x637,0x632,0x62d,0x628,0x624,0x61f,0x61a
-	.value	0x616,0x611,0x60c,0x608,0x603,0x5ff,0x5fa,0x5f6
-	.value	0x5f1,0x5ed,0x5e9,0x5e4,0x5e0,0x5dc,0x5d7,0x5d3
-	.value	0x5cf,0x5cb,0x5c6,0x5c2,0x5be,0x5ba,0x5b6,0x5b2
-	.value	0x5ae,0x5aa,0x5a6,0x5a2,0x59e,0x59a,0x596,0x592
-	.value	0x58e,0x58a,0x586,0x583,0x57f,0x57b,0x577,0x574
-	.value	0x570,0x56c,0x568,0x565,0x561,0x55e,0x55a,0x556
-	.value	0x553,0x54f,0x54c,0x548,0x545,0x541,0x53e,0x53a
-	.value	0x537,0x534,0x530,0x52d,0x52a,0x526,0x523,0x520
-	.value	0x51c,0x519,0x516,0x513,0x50f,0x50c,0x509,0x506
-	.value	0x503,0x500,0x4fc,0x4f9,0x4f6,0x4f3,0x4f0,0x4ed
-	.value	0x4ea,0x4e7,0x4e4,0x4e1,0x4de,0x4db,0x4d8,0x4d5
-	.value	0x4d2,0x4cf,0x4cc,0x4ca,0x4c7,0x4c4,0x4c1,0x4be
-	.value	0x4bb,0x4b9,0x4b6,0x4b3,0x4b0,0x4ad,0x4ab,0x4a8
-	.value	0x4a5,0x4a3,0x4a0,0x49d,0x49b,0x498,0x495,0x493
-	.value	0x490,0x48d,0x48b,0x488,0x486,0x483,0x481,0x47e
-	.value	0x47c,0x479,0x477,0x474,0x472,0x46f,0x46d,0x46a
-	.value	0x468,0x465,0x463,0x461,0x45e,0x45c,0x459,0x457
-	.value	0x455,0x452,0x450,0x44e,0x44b,0x449,0x447,0x444
-	.value	0x442,0x440,0x43e,0x43b,0x439,0x437,0x435,0x432
-	.value	0x430,0x42e,0x42c,0x42a,0x428,0x425,0x423,0x421
-	.value	0x41f,0x41d,0x41b,0x419,0x417,0x414,0x412,0x410
-	.value	0x40e,0x40c,0x40a,0x408,0x406,0x404,0x402,0x400
+forloop(i,256,512-1,dnl
+`	.value	eval(0x7fd00/i)
+')dnl
 ASM_END()


More information about the gmp-commit mailing list