Compare commits

..

724 Commits

Author SHA1 Message Date
jdunn%netscape.com
73d77b33b5 creating OEM branch for Netscape 7
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_OEM_MINI_BRANCH@125708 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 15:40:40 +00:00
(no author)
782fdbd630 This commit was manufactured by cvs2svn to create branch
'NETSCAPE_7_0_OEM_MINI_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_OEM_MINI_BRANCH@122273 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 19:21:19 +00:00
leaf%mozilla.org
2c9614fb10 update pull scripts to pull the better named MOZILLA_1_0_BRANCH symbolic tag,
a=bunch-o-drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122271 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 19:21:17 +00:00
sspitzer%netscape.com
6afd739cf1 fix for #147916. tinderbox sidebar panels should not be there by default.
if a bunch of people get mozilla 1.0, they'll overload tbox.
r=callion,sr=bienvenu,a=leaf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122267 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 18:20:19 +00:00
jst%netscape.com
2457823369 Fixing bug 147754. Do a same-origin check on serialized data. r=mstoltz@netscape.com, sr=jband@netscape.com, a=dbaron,shaver,scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122251 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 03:52:58 +00:00
dbragg%netscape.com
aeaefb716d Regular update of localeVersion value to 1.0.0final. r=leaf, sr=scc, a=drivers, ADT approved. Bug #147714
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122238 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 23:24:30 +00:00
dveditz%netscape.com
d4beef1773 fix crash installing language packs bug 147672. r=dbaron,sr=shaver,a=valeski/scc/wjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122235 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 22:15:56 +00:00
blizzard%redhat.com
928f583b71 Bug #134204. Use pkg-config files. r=cls,hp a=lots-o-drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122227 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 20:30:12 +00:00
leaf%mozilla.org
0282fc286e updating the MOZILLA_VERSION in configure{.in}
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122201 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 19:29:12 +00:00
leaf%mozilla.org
04cc039c07 updating user agent.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122200 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 19:07:21 +00:00
leaf%mozilla.org
7f1f83e834 updating about page in prep for upcoming release
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122199 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 19:04:34 +00:00
brendan%mozilla.org
b423f4baff Don't emit JSOP_DEF{VAR,CONST} unless at top-level or in a heavyweight function (146596, r=jband, sr=shaver, a=chofmann).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122191 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 01:21:53 +00:00
shaver%mozilla.org
4a96596e09 146401: add pref for XSLT. r=peterv, sr=jst, a=drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122186 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 16:37:18 +00:00
jfrancis%netscape.com
ad33f31373 fixing 136165: crash after deleting styled text. r=cmanske sr=dveditz; a=shaver,scc,tor
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122151 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 00:53:58 +00:00
seawood%netscape.com
080e80a637 Add 'make install' target to build. It's "MRE-friendly". (See http://www.mozilla.o
rg/projects/embedding/MRE.html for details.)
Changes:
* Added EXTRA_COMPONENTS variable to build.  Use it to automagically install files
into the components dir.
* Added SYSINSTALL variable.  Use it install files onto the system.
* Move mozilla-config generation from configure to makefiles
* mozilla-config will now generate paths based upon the MRE-based directory layout.
* Generate mozilla script from template

The installation heirarchy currently looks like:
$prefix -> /bin/mozilla
           /bin/mozilla-config
           /include/mozilla-ver/*
           /lib/mozilla-ver  (mozappdir)
                            /components
                            /res
                            /defaults
                            /chrome

There is preliminary build support for MRE dirs as well though the component manage
r hasn't had MRE support added yet.

$prefix -> /lib/mre/mre-ver  (mredir)
                            /components

Bug #56601 r=leaf a=scc,shaver,tor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122149 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 00:07:27 +00:00
seawood%netscape.com
53d656a9a1 Add 'make install' target to build. It's "MRE-friendly". (See http://www.mozilla.o
rg/projects/embedding/MRE.html for details.)
Changes:
* Added EXTRA_COMPONENTS variable to build.  Use it to automagically install files
into the components dir.
* Added SYSINSTALL variable.  Use it install files onto the system.
* Move mozilla-config generation from configure to makefiles
* mozilla-config will now generate paths based upon the MRE-based directory layout.
* Generate mozilla script from template

The installation heirarchy currently looks like:
$prefix -> /bin/mozilla
           /bin/mozilla-config
           /include/mozilla-ver/*
           /lib/mozilla-ver  (mozappdir)
                            /components
                            /res
                            /defaults
                            /chrome

There is preliminary build support for MRE dirs as well though the component manage
r hasn't had MRE support added yet.

$prefix -> /lib/mre/mre-ver  (mredir)
                            /components

Bug #56601 r=leaf a=scc,shaver,tor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122148 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 23:52:27 +00:00
seawood%netscape.com
89b0d7af2c Add 'make install' target to build. It's "MRE-friendly". (See http://www.mozilla.o
rg/projects/embedding/MRE.html for details.)
Changes:
* Added EXTRA_COMPONENTS variable to build.  Use it to automagically install files
into the components dir.
* Added SYSINSTALL variable.  Use it install files onto the system.
* Move mozilla-config generation from configure to makefiles
* mozilla-config will now generate paths based upon the MRE-based directory layout.
* Generate mozilla script from template

The installation heirarchy currently looks like:
$prefix -> /bin/mozilla
           /bin/mozilla-config
           /include/mozilla-ver/*
           /lib/mozilla-ver  (mozappdir)
                            /components
                            /res
                            /defaults
                            /chrome

There is preliminary build support for MRE dirs as well though the component manage
r hasn't had MRE support added yet.

$prefix -> /lib/mre/mre-ver  (mredir)
                            /components

Bug #56601 r=leaf a=scc,shaver,tor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122145 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 23:46:27 +00:00
pavlov%netscape.com
1c4cdfade6 checking in fix for bug 145147 r=bienvenu sr=mscott a=roc,scc,shaver,jaimejr,etc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122142 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 22:53:03 +00:00
seawood%netscape.com
63f6028c4e Add 'make install' target to build. It's "MRE-friendly". (See http://www.mozilla.org/projects/embedding/MRE.html for details.)
Changes:
* Added EXTRA_COMPONENTS variable to build.  Use it to automagically install files into the components dir.
* Added SYSINSTALL variable.  Use it install files onto the system.
* Move mozilla-config generation from configure to makefiles
* mozilla-config will now generate paths based upon the MRE-based directory layout.
* Generate mozilla script from template

The installation heirarchy currently looks like:
$prefix -> /bin/mozilla
           /bin/mozilla-config
           /include/mozilla-ver/*
           /lib/mozilla-ver  (mozappdir)
                            /components
                            /res
                            /defaults
                            /chrome

There is preliminary build support for MRE dirs as well though the component manager hasn't had MRE support added yet.

$prefix -> /lib/mre/mre-ver  (mredir)
                            /components

Bug #56601 r=leaf a=scc,shaver,tor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122141 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 22:47:55 +00:00
seawood%netscape.com
246b3f7e9f Add 'make install' target to build. It's "MRE-friendly". (See http://www.mozilla.org/projects/embedding/MRE.html for details.)
Changes:
* Added EXTRA_COMPONENTS variable to build.  Use it to automagically install files into the components dir.
* Added SYSINSTALL variable.  Use it install files onto the system.
* Move mozilla-config generation from configure to makefiles
* mozilla-config will now generate paths based upon the MRE-based directory layout.
* Generate mozilla script from template

The installation heirarchy currently looks like:
$prefix -> /bin/mozilla
           /bin/mozilla-config
           /include/mozilla-ver/*
           /lib/mozilla-ver  (mozappdir)
                            /components
                            /res
                            /defaults
                            /chrome

There is preliminary build support for MRE dirs as well though the component manager hasn't had MRE support added yet.

$prefix -> /lib/mre/mre-ver  (mredir)
                            /components

Bug #56601 r=leaf,a=scc,shaver,tor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122140 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 22:43:38 +00:00
jst%netscape.com
e45a686be7 Fixing bug 113351. Original patch by peterv, tweaks by me and mstoltz. Add same-origin checks to XSLT includes. r=mstolts@netscape.com, sr=rpotts@netscape.com, a=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122062 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 07:23:48 +00:00
racham%netscape.com
1dce744290 Fixing bug 15562. Fixing duplicate entries problem in pageInfo.dtd file. r=ftang, sr=sspitzer, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122060 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 07:10:40 +00:00
jst%netscape.com
5df1afe6e6 Backing out part of the fix for bug 143369 as a fix for bug 146333. Don't make ChromeWindow's prototype immutable.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122059 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 05:39:27 +00:00
jst%netscape.com
da482534b3 Backing out part of the fix for bug 143369 as a fix for bug 146333. Don't make ChromeWindow's prototype immutable.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122058 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 05:35:41 +00:00
cotter%netscape.com
be64be1dfd ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; mostly privacy updates per Steve Morse's review
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122051 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 04:24:44 +00:00
morse%netscape.com
afe8df3d75 bug 146094, leaking cookies, r=waterson/mstoltz, sr=darin, a=chofmann/brendan/scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122049 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 01:30:15 +00:00
harishd%netscape.com
3ee011d02b Preserve comment declaration for textarea and viewsource. b=133044, r=heikki, sr=jst, a=brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122048 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 01:28:28 +00:00
harishd%netscape.com
bd5ddb70ea Ensuring complete consumption of DOCTYPE content. b=142625, r=heikki, sr=js, a=chofmann, brendan, shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122041 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:18:58 +00:00
dbragg%netscape.com
d6c39cca3a Regular update for mozilla milestone rc3. Changing 1.0.0rc2 to 1.0.0rc3. r=leaf, sr=scc, a=blizzard, adt approved. Note: leaf@mozilla.org will be watching the tree for me.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122036 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 23:25:01 +00:00
dbragg%netscape.com
2fe6680b3f Regular update for mozilla milestone rc3. Changing 1.0.0rc2 to 1.0.0rc3. r=leaf, sr=scc, a=blizzard, adt approved. Note: leaf@mozilla.org will be watching the tree for me.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122034 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 23:19:10 +00:00
anatoliya%netscape.com
1347bd1e96 bug 144556 on behalf of rbs, it is mozilla part for bugscape bug 13906 r=brade sr=jst
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122030 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 20:50:37 +00:00
rods%netscape.com
b9c5c653e6 The patch removes the n-order search for the length and reuses a funciton
"BinarySearchForPosition" code from the nsTextFrame for finding cursor
position. Instead of cursor position, it is just uses the available width.
Bug 139384 r=dcone sr=attinasi a=chofmann,rjesup adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122019 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 11:11:00 +00:00
mhammond%skippinet.com.au
d6b4715e32 Bring up to date WRT "char *" -> nsString API changes.
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122010 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 05:31:25 +00:00
dveditz%netscape.com
ecbe515d79 bug 144704 make sure view image menu item doesn't inherit the wrong context, r=bryner, sr=brendan, a=chofmann, adt1.0.0+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122009 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 05:05:38 +00:00
dveditz%netscape.com
44cab4adea bug 143420 make sure showOnlyThisFrame menu item doesn't inherit the wrong context, r=bryner,sr=scc,a=brendan,adt1.0.0+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122008 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 05:02:43 +00:00
jst%netscape.com
a2dc91d683 Fixing security bug 143369. Don't allow web content to shadow their origin. r=brendan@mozilla.org, mstoltz@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122005 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 04:36:53 +00:00
shanjian%netscape.com
9607a311ed #132006 Traditional Chinese is detected as Simplified Chinese
correct state machine of gb18030, and eliminate gb18030 as option
when only 2 candidates left.
r=ftang, sr=scc, a=chofman, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122004 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 04:07:51 +00:00
darin%netscape.com
804ae553c3 fixes bug 146074 "Proxy-authorization not on all requests after authentication"
r=rjesup sr=rpotts a=chofmann,rjesup,shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122003 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 03:44:45 +00:00
mkaply%us.ibm.com
be7d4fdde0 #145764
a=brendan
OS/2 only - fix broken icon


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@122001 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 02:30:48 +00:00
dbaron%fas.harvard.edu
6aed6f697f Fix Mac bustage from brendan's checkin.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121999 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 02:08:05 +00:00
timeless%mac.com
624fe1566b Bug 133666 Skin switch on restart not completely performed
patch by blake r=ben sr=hyatt a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121998 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 02:00:00 +00:00
timeless%mac.com
ec1577308a Bug 133601 DND in a folder in personal toolbar: multiple folders can be open at once
patch by pierrechanial@netscape.net r=bryner a=scc [sr waved by endico]


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121997 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 01:58:10 +00:00
kaie%netscape.com
e3aa3a71cb b=144823 Localized certificate name is garbled, unable to send out signed/encrypted mail on a localized build
r=javi sr=mscott adt=putterman a=endico


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121996 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 01:13:30 +00:00
kmcclusk%netscape.com
90dcf11081 Destroy sub document frames within the nsHTMLInnerFrames Destroy method instead of its destructor so nsIWidgets instances are destroyed in the proper order. bug 66748; r=jkeiser sr=attinasi a=scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121990 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 00:39:15 +00:00
ducarroz%netscape.com
132e190048 Fix for bug 141051 (patch v1). Need to reset the window title before recycling the compose window. R=varada, SR=mscott, A=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121985 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 00:12:53 +00:00
brendan%mozilla.org
dc9928eb7c Don't fail to call OBJ_CHECK_ACCESS for o.__proto__ = x, with enough mode bits to say what's happening (143369, r=shaver, sr=jst, a=chofmann).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121984 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 00:07:58 +00:00
akkana%netscape.com
428ff1c549 71726: Pass http url into validation tool. r=brade sr=alecf a=chofmann,scc,brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121983 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 00:07:38 +00:00
yokoyama%netscape.com
c61baaa999 bug 118179
FTP site is broken for Japanese server
Impact for only displaying ftp directory listing.
/r=bbaetz,/sr=darin,/a=chofmann,/adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121979 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 00:00:39 +00:00
yokoyama%netscape.com
edee1b6680 Bug 140983
Retrieve IMEProperty by calling ImmGetProperty() and
determine if the IME supports W API.
Impact only in Win2k and WinXP Simplified Chinese platforms
/r=shanjian,/sr=kin@netscape.com
/adt=putterman,/a=permission call from driver@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121978 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 23:38:42 +00:00
alecf%netscape.com
885c533ef0 fix bustage - missing ) (didn't make it over from my last linux patch..grr)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121976 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 23:28:07 +00:00
rpotts%netscape.com
de0519cd67 bug #145994 (r=chak,sr=alec, a=drivers) Crash due to a null pointer when Stop() is called within an nsIWebProgressListener notification.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121975 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 23:21:14 +00:00
bryner%netscape.com
c5ac50d5e2 Add a null check to fix a crash that can happen if you context-click while autocomplete is active in mail compose (Bug 137864). r=danm, sr=jag, a=brendan.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121974 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 23:13:47 +00:00
bryner%netscape.com
4cb5382fca Fix a problem where the beforeselected/afterselected attributes on tabs weren't getting cleaned up when a tab is closed. This was causing drawing issues in the classic skin. Bug 137836, r=pinkerton, sr=blake, a=scc.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121972 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 23:10:55 +00:00
morse%netscape.com
0bc0799597 bug 140625, wallet dialog refers to old menu structure, c=neil@parkwaycc.co.uk, r=morse, sr=dveditz, a=valeski, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121968 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 23:00:02 +00:00
morse%netscape.com
9e0f7ffb8a bug 140464, cookies expire at end of session if date header is missing, c=mloiselle@yahoo.com, r=morse, sr=darin, a=valeski, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121965 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 22:52:44 +00:00
morse%netscape.com
cfa280641e bug 138918, understanding-privacy button is broken, r=sgehani, sr=jag, a=valeski, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121963 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 22:39:32 +00:00
bienvenu%netscape.com
a911b0b748 check in bug 62084 from trunk, problem importing long mailings lists
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121962 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 22:16:55 +00:00
alecf%netscape.com
be9c8fa239 fix for bug 139633 - move Left/Right/Mid out of nsAString so we can freeze strings
r/sr=dmose, darin, jag, mozbot, lumpy, callion, jst, akkana (various parts of various patches, after baking on the trunk for a while)
a=chofmann
adt=jaimejr


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121959 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 21:41:28 +00:00
leaf%mozilla.org
0d32d05921 bug 144488, r,a=endico on behalf of drivers (update theme location to something
that can handle the bandwidth)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121948 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 21:07:17 +00:00
sicking%bigfoot.com
bf7b44d54f Bug 119317: remove support for old non-namespaced "inherits" xbl-attribute. Also move the last few occurences to the new syntax.
r=fabian sr=hyatt a=brendan


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121945 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 20:28:50 +00:00
ducarroz%netscape.com
a2b5d31397 Fix for bug 144257. We should skip out-commented html when looking for entities. R=varada, SR=mscott, A=scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121943 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 20:17:42 +00:00
mscott%netscape.com
6d0476c328 Since it wasn't the cause of the mail smoketests going orange, but 106479 back onto
the branch (i backed it out late last night to see).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121940 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 20:06:12 +00:00
rpotts%netscape.com
2cd31bb596 bug #46856 (r=valeski,sr=jst,a=valeski) nsIWebProgress/nsIWebProgressListener API changes.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121921 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 07:59:04 +00:00
rpotts%netscape.com
637548fb10 bug #46856 (r=valeski, sr=jst, a=valeski) nsIWebProgress/nsIWebProgressListener API changes.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121919 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 05:59:14 +00:00
mscott%netscape.com
26949a54c9 For kicks, back out Bug 106479 to see if it fixes the orange mail smoketest.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121918 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 05:34:43 +00:00
mscott%netscape.com
3c7053730f Landing Bug #127702 onto the branch. Fix security problem with imap
r=cavin
sr=bienvenu
a=chofmann


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121917 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 05:31:30 +00:00
peterlubczynski%netscape.com
ee3c3f96d7 Fixing keyboard events for full page plugins on Mac bug 143316 r=av sr=attinasi
a=chofmann,brendan,etc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121912 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 03:09:38 +00:00
rginda%netscape.com
9039f3c7b0 - venkman only -
bug 145466, "Can't save the profile data"
patch=smaug@jippii.fi,r=me,a=chofmann
add missing parameter nsIOutputStream::init callsite


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121910 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 02:41:47 +00:00
morse%netscape.com
a000b7234a bug 143328, Hiding form-manager panels stopped working, r=sgehani, sr=jag, a=brendan, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121906 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-21 00:38:57 +00:00
heikki%netscape.com
218651a65b Bug 142788, malformed comment end was not detected in quirks mode which caused the rest of the document to be treated as a comment. r=harishd, sr=jst, a=ADT,scc.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121898 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 22:58:48 +00:00
darin%netscape.com
423460521b fixes bug 141779 "Trunk, M1RC1 Crashes related to DNS caching [@ nsDNSRequest::FireStop]"
r=gordon sr=rpotts a=brendan


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121897 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 22:57:05 +00:00
oeschger%netscape.com
732eb22602 update to search rdf, dispensation for content updates for 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121896 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 22:54:37 +00:00
mscott%netscape.com
28a1c909e4 Landing 106479 onto the branch. Don't freeze an imap account with out a trash folder
when emptying trash on exit.
r=timeless
sr=mscott
a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121893 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 22:43:53 +00:00
bryner%netscape.com
da24b92c2a Check in Michiel van Leeuwen's patch for bug 135076 that fixes the problem where you get scroll arrows in submenus when the submenus are initially opened so close to the bottom of the screen that their position is adjusted to make them fit on screen. r=bryner, sr=ben, a=brendan.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121886 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 20:33:24 +00:00
morse%netscape.com
204f826da0 backing out last checkin which was made in error.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121882 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 19:59:54 +00:00
morse%netscape.com
4516f9102e bug 143204, crash when selecting user and no user is selected, r=sgehani, sr=dveditz, a=choffman, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121881 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 19:54:14 +00:00
rods%netscape.com
ab56848021 Simple name change to correct properties file name
Bug 145460 r=dcone a=chofmann,shaver adt=jaime (no sr yet)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121872 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 13:48:19 +00:00
ben%netscape.com
69d2a48ff1 Fixing 130614 on the 1.0 branch, RC2 crashes on startup on Windows 95
due to nonexistent favorites folder (Windows 95 without IE4+ does not have
a favorites folder, so null check before using it)
r=ftang, sr=hyatt, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121869 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 11:24:31 +00:00
peterlubczynski%netscape.com
c5b72f03a1 Correctly set visibility of view on DidReflow for cases when our CSS visibility style has changed from visible (windows part) bug 129306 r=av sr=attinasi, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121863 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 03:28:04 +00:00
andreww%netscape.com
d455161f02 bugzilla bug 141029 - Need to update editorTasksOverlay due to menu changes - r=cmanske, sr=sspitzer, drivers=rjesup, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121862 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 03:15:44 +00:00
pavlov%netscape.com
764bd4bf65 fix for bug 130876 from lorenzo@colitti.com. r=pavlov sr=tor a=chofmann,shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121861 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 03:11:49 +00:00
bryner%netscape.com
5a4cd2828d Use insertafter instead of absolute position numbers for the composer and addressbook icons (bug 137468). r=ben, sr=blake, a=chofmann/shaver.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121859 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-20 01:54:36 +00:00
shaver%mozilla.org
303b3fe0e3 Bug 142846: Save doesn't store all subframes. Patch=adamlock, r=brade,
sr=rpotts@netscape.com, a=rjesup for 1.0 branch.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121849 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 23:43:22 +00:00
shaver%mozilla.org
cb4a0b5b63 Bug 142592: color attributes on MathML elements can't be updated sometimes.
Patch=rbs, r=roc+moz, sr=attinasi, a=brendan,shaver,chofmann for 1.0.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121848 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 23:39:25 +00:00
shaver%mozilla.org
80b989b275 Bug 137079: originating-server cookie test preventing some sites from working
correctly.  Patch by morse, r=pinkerton, sr=alecf, a=drivers for the branch.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121847 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 23:35:14 +00:00
morse%netscape.com
5dbd73bf67 bug 143204, crash in password manager when selecting user from list, r=sgehani, sr=dveditz, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121842 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 07:20:20 +00:00
heikki%netscape.com
0481dc4c6e Bug 137628, depending on network speed the contents of comments could appear on a page in strict mode. Treat unclosed comment in strict mode as text. Fix line numbers in case we need to wait for more content before parsing. r=harishd, sr=jst, a=ADT,chofmann,brendan.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121840 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 05:45:50 +00:00
bryner%netscape.com
d525363520 Fix Copy Link Location. The tooltip timer was causing the document's popupNode to get nulled out. We don't actually need to set popupNode at all for tooltips, we have tooltipNode for that. Modified the menu popup code to use tooltipNode for tooltips. Bug 143607. r=hewitt, sr=jst, a=shaver.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121839 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:31:56 +00:00
jst%netscape.com
748665aa52 Fixing bug 132609. Make sure termination functions are called after JS event handlers are executed. r=heikki@netscape.com, sr=jband@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121838 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:24:40 +00:00
jst%netscape.com
c4da75c128 Fixing one more part of performance bug 118933. Speed up access to global properties window and document. r=peterv@netscape.com, sr=vidur@netscape.com. a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121837 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:21:08 +00:00
jst%netscape.com
2795a668d6 Fixing bug 80083. Don't let a modified window.navigator object be collected by the GC too early. r=fabian@bluishgecko.net, sr=vidur@netscape.com, a=choffmann,brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121836 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:18:18 +00:00
jst%netscape.com
1b6ec3d818 Fixing bug 145064. Stop link.pathname (n' frieds) accessors from throwing exceptions on non-URL URI's. r=bzbarsky@mit.edu, sr=heikki@netscape.com, a=choffmann,brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121835 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:15:38 +00:00
jst%netscape.com
83d6027167 Fixing bug 141442. Make window.openDialog() overridable from scripts on webpages. r=mstoltz@netscape.com, sr=jband@netscape.com, a=brendan,choffmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121834 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:13:23 +00:00
jst%netscape.com
5c6d280101 Fixing topcrash bug 131841. Don't let presshells die while we're making calls on them. r=sicking@bigfoot.com, sr=vidur@netscape.com/brendan@mozilla.org, a=choffmann,brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121833 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:10:37 +00:00
jst%netscape.com
3528882472 Checking in jband's fix for bug 143853. Clear the cached proto JSObject when transitioning from page to page. r=dbradley@netscape.com, sr=jst@netscape.com, a=choffmann,brendan,shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121832 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 04:02:26 +00:00
jst%netscape.com
d630028f35 Checking in peterv's fix for bug 129006. Don't crash when reloading invalid XML. r=axel@pike.org, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121830 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 03:57:34 +00:00
mkaply%us.ibm.com
3b629c5fe4 #109464
r=gerv, sr=alecf, a=chofmann,brendan
OS/2 only if statement - Os/2 has different default DPI values


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121828 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 03:51:50 +00:00
bryner%netscape.com
21346b8835 Fix shift-tab from the document into the urlbar; this also fixes some other tabbing results that were a result of odd interactions with the selection code. Bug 136495, r=aaronl, sr=jst, a=valeski.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121827 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 03:41:17 +00:00
darin%netscape.com
cdca1f405a fixes bug 91795 "large downloads causes mozilla to consume too much memory
(results possibly in an kill because of out of memory)"
patch1: author=gordon r=dougt sr=darin
patch2: author=darin r=gordon,dougt sr=rpotts
a=brendan


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121822 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 02:20:56 +00:00
rods%netscape.com
ce1fd5d84c Change uI to use the combobox instead of textfield and arrow btns
Bug 127857 r=dcone,sgehani sr=alecf,attinasi adt=putterman a=chofmann,dbaron,valeski


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121819 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 01:32:45 +00:00
bzbarsky%mit.edu
5f87a200ec Fix off-by-one-char error that caused hang. Bug 142290, r=caillon,
sr=jst, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121815 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 00:59:14 +00:00
bzbarsky%mit.edu
66d54a8b6d Restrict the fix for bug 116938 to Windows-only to preserve OS/2 and
Linux users' sanity. Bug 144923, r=law, sr=mscott, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121812 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 00:50:19 +00:00
cotter%netscape.com
5f02b8269b ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. privacy & security
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121807 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 00:38:01 +00:00
heikki%netscape.com
b4fff11fed Bug 141765, fix crash in decoding structures inside arrays. Patch from rayw, r=heikki, sr=jst, a=ADT,chofmann,brendan.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121806 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 00:35:25 +00:00
heikki%netscape.com
3243c72cb2 Bug 81546, workaround to make XHTML documents with forms to display. r=harishd, sr=jst, a=ADT,chofmann,brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121804 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 00:03:39 +00:00
harishd%netscape.com
0c5d530ffc Making sure that mCountRemaining also gets updated when data gets inserted into the scanner buffer. b=117441, r=heikki, sr=jst, a=chofmann,brendan,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121801 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-18 00:01:59 +00:00
ducarroz%netscape.com
2fcaf0e746 Fix for bug 139362. In order to avoid to be hit by bug 70083, we need to do a copy of the string we are passing to NewURI to be sure it's in one segment. Patch proposed by jag. R=ducarroz, SR=sspitzer, A=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121796 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 23:16:04 +00:00
dbaron%fas.harvard.edu
2f87640ce4 Rename a variable so that we can build on gcc 3.1. r=cls sr=jst a=rjesup b=139089
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121783 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 21:46:03 +00:00
oeschger%netscape.com
be372b62a6 fix for 138763: duplicate paragraph in help, check-in dispensation per bug 122806, plus removing references to IM. Bad!
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121775 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 21:11:18 +00:00
ccarlen%netscape.com
76c08bd2ed Bug 76431 - protect profiles from running multiple instances. r=brendan@mozilla.org/sr=darin@netscape.com/a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121774 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 21:07:44 +00:00
kaie%netscape.com
da5d212dfc b=141317 CopyToLowerCase produces strings with random content
r=jag sr=alecf a=scc/rjesup adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121770 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 20:05:33 +00:00
bzbarsky%mit.edu
5c41eb1716 Um, back that out; tree is closed... (coulda sworn it said "open"....)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121759 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 14:41:32 +00:00
bzbarsky%mit.edu
91b9b7e794 Restrict the fix for bug 116938 to Windows-only to preserve OS/2 and
Linux users' sanity. Bug 144923, r=law, sr=mscott, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121758 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 14:40:09 +00:00
dmose%netscape.com
4da30258e7 Only define PERL if it has not already been defined so that when autoconf finds perl in non-standard places, that works properly. r=cls, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121753 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 07:02:53 +00:00
dmose%netscape.com
295058cc41 Fix clobber to remove libraries (bug 136651); fixes AIX tinderbox lossage. Patch from Philip K. Warren <pkw@austin.ibm.com>; r=dmose@netscape.com, sr=sspitzer@netscape.com, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121752 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 06:54:00 +00:00
dmose%netscape.com
7774ce5dcf NetBSD portability fix (bug 99068). Patch from taya@netbsd.org; r=dmose@netscape.com; sr=sspitzer@netscape.com, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121751 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 06:45:18 +00:00
rjesup%wgate.com
5f60368f08 Bug 139380: clean up font substition code to avoid mistaken changes in
the future. r=bstell, sr=attinasi, a=rjesup, checkin for gisburn


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121750 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 06:26:52 +00:00
rjesup%wgate.com
ca60e23706 Bug 143413: missing entry in Xlib for symbol-fontspecific. r=pete.zha,
sr=attinasi, a=rjesup (checking in for gisburn)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121748 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 06:17:38 +00:00
pavlov%netscape.com
bf883ac38d checking in fix for bug 14113. r=varga sr=brendan a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121746 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 05:46:42 +00:00
kaie%netscape.com
cfa1d71b55 b=112384 Unable to download some CRLs.
r=javi sr=darin adt=putterman a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121735 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 03:22:56 +00:00
dbaron%fas.harvard.edu
3a72186992 Make GetImplementationFlags more useful/extensible by changing the default implementation to return zero rather than returning the flags from the shared buffer handle, and add a constant for one expected future use. b=109571 r=jag sr=scc a=chofmann,valeski,scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121734 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 03:03:41 +00:00
dbaron%fas.harvard.edu
af6aa2ea05 Null-check mBindingTable to avoid crash with some themes. b=143835 r=brendan sr=waterson a=chofmann, scc, valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121730 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 02:40:24 +00:00
seawood%netscape.com
114aae699d Because js uses static data structures and is linked into other shared libraries, js must be built as a shared library.
Thanks to Colin Blake <colin@theblakes.com> for the original patch.
Bug #127442 r=bryner a=chofmann


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121726 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 02:10:08 +00:00
seawood%netscape.com
f9848fb7b1 Reinstate real_install target so that it will be possible to have an install tar
get for Mozilla that works as expected
Bug #138442 r=dmose@netscape.com, mcs@netscape.com a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121725 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 02:03:41 +00:00
karnaze%netscape.com
856aebbbd6 bug 113235 - avoid reframing if possible when content is inserted inside an inline containing a block. a=rjesup, adt=putterman, sr=waterson, r=attinasi.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121721 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 01:42:24 +00:00
seawood%netscape.com
526ec82985 Increase Shared Memory Transport size to 512k for solaris builds.
Note: "512 is a good compromise between the transport speed and the system memor
y resources consumed."
Thanks to Jeff Wasilko <jw-mozilla@smoe.org> for the patch.
Bug #118846 r=cls a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121717 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 01:12:18 +00:00
seawood%netscape.com
67a384bafa chdir out of temp directory before invoking mozilla process.
Bug #101016 r=syd sr=sspitzer a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121716 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 00:59:25 +00:00
cotter%netscape.com
d7a3ed9aa3 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; index tags & some content updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121709 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 00:47:39 +00:00
oeschger%netscape.com
77a9c7a763 adding some entries to search db for help, dispensation per 122806, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121708 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 00:44:53 +00:00
oeschger%netscape.com
9065957d3d removing an unused html file from the build, dispensation per 122806, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121707 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 00:43:08 +00:00
pinkerton%netscape.com
9188b6c365 explicitly set locale in installed-chrome.txt for embedding packaging. r=ccarlen/sr=beard/a=valeski bug 144866.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121701 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 00:20:38 +00:00
jaggernaut%netscape.com
fe32f8706e Bug 132583: deal more cleanly with passing non-UTF8 strings to NS_ConvertUTF8toUCS2. r=scc, sr=darin, a=drivers, a=adt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121699 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-17 00:03:35 +00:00
dougt%netscape.com
e79695d563 Removing string nsCRT depend. patch by scc, r=dougt, sr=jag, b=36756, a=chofmann,dbaron,valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121698 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 23:57:51 +00:00
brendan%mozilla.org
ed20e5e6fd Checking in khanson@netscape.com's patch fixing GMT offset day-overflow (65671, r=mccabe, sr=jband, a=rjesup).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121693 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 23:16:37 +00:00
pinkerton%netscape.com
612499e4d0 make NS_ConvertUTF8toUCS2(ptr, length) work correctly. r=jag/sr=scc/a=rjesup bug#141866
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121692 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 23:15:57 +00:00
jst%netscape.com
d41a137af5 Fixing bug 140944. Map document.body.scroll* to the scroll info about the root scrolling view for compatibility with IE. r=bzbarsky@mit.edu, sr=shaver@mozilla.org, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121691 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 23:13:55 +00:00
kaie%netscape.com
6692771666 b=104502 Updated icons for S/Mime security
icons=marlon  r=kaie  sr=mscott  a=valeski  adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121680 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 21:20:56 +00:00
attinasi%netscape.com
5f0ca989b0 Check for null to prevent crash when a native scrollbar is requested on a platform that does nto support it. b=138720 r=kmcclusk sr=kin a=chofmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121677 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 21:15:27 +00:00
sspitzer%netscape.com
cbc76df7dc supplimental fix for #119360. it's mozillaHomeState, not mozillaHomeStreet.
r=dmose,sr=bienvenu,shaver, a=rjesup,putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121636 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:51:00 +00:00
rods%netscape.com
68df67103c allows for progress dialog to be turned off
Bug 140183 adt=syd a=chofmann,dbaron,valeski


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121635 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:42:19 +00:00
mkaply%us.ibm.com
5980efcab5 #141528
r=bzbarsky, sr=blizzard, a=chofmann
OS/2 only - new helper app code - more like unix - new protoocl handler code


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121634 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:32:19 +00:00
mkaply%us.ibm.com
7452c85b9c #141820
r=wtc, a=chofmann
OS/2 only - don't quote parameters when calling DosStartSession


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121633 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:28:08 +00:00
mkaply%us.ibm.com
1e1f13f227 #143674
r=me,sr=blizzard, a=chofmann
OS/2 only - change splash from Warpzila to Mozilla


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121632 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:25:11 +00:00
mkaply%us.ibm.com
1bfdcafcb0 #97861
r=cls, a=chofmann
OS/2 only - add OS/2 specific nsTransform2D so Os/2 builds don't suck


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121627 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:21:41 +00:00
rods%netscape.com
b78558faa1 Allows for printed more than one copy for the postscript print module
Bug 139566 r=roland sr=attinasi adt=petterman a=chofmann,dbaron,valeski


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121626 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 14:20:04 +00:00
rods%netscape.com
9861f30e1d 1) They currently share the same style context resolution
2) It can be difficult to determine whether you are creating/reflowing a UI or

   doc scrollbar (SB)
3) They share the same PresContext which has a single scale value that UI SBs
   need to ignore, but the doc SBs need to use.

This patch does the following:
1) Enables the PrintPreviewContext to turn on and of the scaling of twips
2) When creating a new scrollbar, it checks to see if the frame parent is
   is a viewportframe that way it knows if it is in the UI or in the document
   then for UI scrollbars it turns off the saling, and for doc scrollbars it
   turns it on. This needs to be done at creation time as well as, reflow
   because it GetScaledPixelsToTwips get called during both.
3) The nsSimpleSequenceFrame turns on scaling during its children reflow
   then turns it off.
4) When PrintPreview "setup" is done it turns off the scaling in the
   PrintPreviewContext because any reflowing other usages for
   GetScaledPixelsToTwips will be for UI scrollbars
5) A copy of all the style rules for scrollbars is made and placed inside of
   a media type "print" This way the style resultion for the scaled scrollbars
   in the document are not shared with the UI.
Bug 120616 r=dcone sr=attinasi adt=putterman a=chofmann


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121622 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 13:59:05 +00:00
(no author)
ed501b059e This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121615 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 13:12:34 +00:00
av%netscape.com
5204f1360e Fixing 106411 -- 'Starting plugin...' message is stuck in the status bar, r=serge, sr=beard, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121612 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 12:34:31 +00:00
peterlubczynski%netscape.com
b07b40ca0e Fix for Viewpoint: Adding extra event call (WM_WINDOWPOSCHANGED) for windowless plugins on Windows so that they are updated with their position and bounds. Bug 135737, r=av, sr=attinasi, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121609 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 06:02:43 +00:00
jaggernaut%netscape.com
4ad7f1e776 Bug 139649: Fix IsDependentOn, I forgot to make the ptr and ptr, length based Assign, Append and Insert go through the dependency checks. r=alecf, sr=scc, a=drivers, a=adt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121605 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 04:36:23 +00:00
timeless%mac.com
f2459da232 fixing build bustage for qnx photon embedding this is from the nsI*File freeze
a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121588 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 02:44:51 +00:00
serge%netscape.com
55b08dd44e fix #119494 Acrobat fails to load document from this site [200 expecting 206] r=peterl,sr=darin,a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121586 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 01:09:22 +00:00
rginda%netscape.com
ffbc7660a6 - chatzilla only -
bug 143503, "long channel topic isn't wrapped properly"
r=samuel@sieb.net, sr=shaver@mozilla.org, a=leaf@mozilla.org
insert spaces in long topic words so things can wrap.

bug 140088, "Chatzilla is crashing when switching tabs."
r=samuel@sieb.net, sr=shaver, a=rjesup@wgate.com
don't touch the tree selection while the tree is hidden.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121577 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 23:34:38 +00:00
darin%netscape.com
cf51d1ad90 fixes bug 134793 "browser hangs when [ is put in the URL bar"
r=gagan sr=rpotts a=jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121576 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 23:34:23 +00:00
mkaply%us.ibm.com
fe7fca9da1 #144554
r=pedemont, sr=blizzard, a=rjesup
OS/2 - remove stupid code that broke mail migration


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121569 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 22:24:05 +00:00
serge%netscape.com
cd24c92cb2 fix #130080 Signing Acrobat doesn't work r=peterl,sr=darin,a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121566 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 22:18:48 +00:00
leaf%mozilla.org
be65bb26c2 update to RC3 text, r=lpham bug 134264
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121565 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 21:52:48 +00:00
serge%netscape.com
90ddac64b6 fix #139572 Payroll W2 form fails to render in Acrobat ( pdf on secure site), r=peterl,sr=beard,a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121564 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 21:41:54 +00:00
waterson%netscape.com
e6f6feeecc Bug 132905. Panic and bail if we can't find a node in the content map. Wallpaper for a topcrash. r=rjc, sr=alecf, a=chofmann,shaver,dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121549 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 20:27:35 +00:00
darin%netscape.com
b4e1ea9f95 fixes bug 143821 "Trunk M1RC2 crashes with bad connection
[@ nsHttpHandler::ReclaimConnection]" r=kaie sr=jag,rpotts a=shaver+scc+jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121536 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 18:58:25 +00:00
darin%netscape.com
2c7a49f756 fixes bug 141796 "Mozilla crashed in http-pipelining code Trunk M1RC2
[@ nsHttpPipeline::GetRequestSize_Locked]" r=jag sr=rpotts a=shaver+scc+jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121535 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 18:57:11 +00:00
rods%netscape.com
f6370ccef4 when we are already in PP it ned to get the mOrigDCScale value
from the previous PP data object instead of fetching it from the DC, the DC
contains the current value and it may not represent what is actually the
Original value.
Bug 139459 r=dcone sr=attinasi a=asa,rjesup adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121526 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 11:53:53 +00:00
jkeiser%netscape.com
8fb0709493 Bustage fix.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121523 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 08:38:24 +00:00
darin%netscape.com
07160b3d82 fixing likely mac bustage (removing references to nsAPromiseString.h since
that file no longer exists).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121519 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 05:01:19 +00:00
jkeiser%netscape.com
dda6dbadfe Make forms close file after submitting. bug 126829, r=dougt@netscape.com, sr=darin@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121517 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 04:56:55 +00:00
jaggernaut%netscape.com
26aaabc693 Bug 139649: Fix string code to use IsDependentOn instead of depending on nsAPromiseString type. r=scc, sr=darin, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121514 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 03:34:52 +00:00
karnaze%netscape.com
52844744bf bug 138725 process out-of-flow frames when first encountered in DoCleanupFrameReferences. Avoid reframing when an inline is appended to an inline that contains a block. a=chofmann, adt=putterman, sr=waterson, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121511 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 02:15:33 +00:00
dcone%netscape.com
006631235e b=143363 r=rods sr=kin a=choffman use deleteDC instead of DeleteObject to delete the DC's
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121508 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 01:25:43 +00:00
rbs%maths.uq.edu.au
678f5fafba Added yet another layer to make Mozilla very robust when font resources run out, the patch makes font metrics to be fail safe or at least very hard to break -- to the point that failure means that the system is barely working (testing showed that Mozilla stayed alive while other applications were dying). This patch differs from the one checked in the trunk in that it doesn't remove wallpaper null-checks added in the past for the problem (these were removed on the trunk), b=136248, r=shanjian, sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121506 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 00:38:43 +00:00
leaf%mozilla.org
e20087bf71 remove reference to a commented-out debug menu, part of bug 139335,
r=bengoodger, sr=hewitt, a=chofmann on behalf of drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121505 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 00:37:53 +00:00
leaf%mozilla.org
7d4fc36816 removing debug menus from preferences and the navigator toolbar,
bug 139335, r=bengoodger sr=hewitt a=chofmann on behalf of drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121504 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 00:36:17 +00:00
bzbarsky%mit.edu
8a4bb68747 Fix crash on "moz-bitmap:" urls with no bitmap name. Bug 143912,
r=timeless, sr=hewitt/shaver, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121503 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 00:32:40 +00:00
cltbld%netscape.com
4e211fa8a0 updating user agent for rc3. bug 133797. r=lpham sr=leaf a=asa blanket
version approval.  asasaki checking in as cltbld.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121500 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 00:17:20 +00:00
oeschger%netscape.com
4618d9b438 adding an image to help content, r=cotter, dispensation per 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121496 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 23:38:00 +00:00
(no author)
c0a5bc3dda This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121495 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 23:37:59 +00:00
oeschger%netscape.com
a02f3f6976 adding an image to help content, r=cotter, dispensation per 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121494 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 23:37:58 +00:00
cotter%netscape.com
6cd2d41b36 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; updated content to match mozilla UI
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121489 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 23:15:40 +00:00
cotter%netscape.com
93608b2018 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; page info updates for toc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121488 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 22:50:47 +00:00
nhotta%netscape.com
fab25ee31b Set a correct accesskey value for "more",
bug 138028, r=naving, sr=bienvenu, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121485 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 22:45:47 +00:00
smontagu%netscape.com
d8ef8c6365 Perform Bidi reordering on page headers when printing. Bug 139297, r=Roland.Mainz@informatik.med.uni-giessen.de, sr=attinasi
a=chofmann


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121478 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 20:36:14 +00:00
shanjian%netscape.com
cb972e1f0e #141887 file:// protocol does not display non ASCII folder name under cjk window system
On CJK system, we have to use mbsrchr to identify the last "\" of a string.
r=dougt, sr=alecf, a=asa, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121455 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 04:57:06 +00:00
mkaply%us.ibm.com
af14ded3fc #114891
r=nhotta, sr=blizzard, a=rjesup
New enum for specifying charset of 4.x prefs.js


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121454 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 04:19:29 +00:00
mkaply%us.ibm.com
6aa16322cb #114891
r=nhotta, sr=blizzard, a=rjesup
New enum for specifying charset of 4.x prefs.js


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121453 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 04:13:02 +00:00
mkaply%us.ibm.com
5a0d585550 #144275
r=pedemonte, sr=blizzard, a=rjesup
OS/2 only - use button 2 for drag


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121449 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 04:03:04 +00:00
bryner%netscape.com
447d10c73f Make Return/Enter on Mac always activate the default accept button (bug 132720). r=hewitt, sr=ben, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121448 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 03:28:07 +00:00
dougt%netscape.com
a514b9a490 Attempting to fix bustage on OS/2.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121441 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 01:44:04 +00:00
locka%iol.ie
2dac4a584c Stop image control frame changing the event status on events after they have been handled. Prevents context menu events propogating up through parents. b=143033 r=saari@netscape.com sr=jst@netscape.com a=asa@mozilla.org a=jaimejr@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121430 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 00:48:16 +00:00
ducarroz%netscape.com
2d65aaeb5c Fix for bugscape 15399/bugzila 139251. Fix Body of Multipart/alternative message with attachment not included when forwarded. R=cavin, SR=mscott, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121429 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 00:47:24 +00:00
locka%iol.ie
81cfb6b041 Fix for crash in mousewheel message handler when wheeling over other gecko apps. b=137213 r=bryner@netscape.com sr=alecf@netscape.com a=asa@mozilla.org a=putterman@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121428 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 00:45:20 +00:00
darin%netscape.com
658d17a08a fixing mac bustage
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121417 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-14 00:01:13 +00:00
darin%netscape.com
7ed400413d fixes OS/2 bustage
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121415 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 23:56:24 +00:00
darin%netscape.com
8f84341661 fixing mac bustage (bug=129279)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121414 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 23:31:14 +00:00
darin%netscape.com
f4b6547ce1 fixing OS/2 bustage
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121413 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 23:18:49 +00:00
darin%netscape.com
fba63e7c60 fixes mac bustage (b=129279)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121412 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 23:17:33 +00:00
darin%netscape.com
8514da82d2 landing nsIFile API changes (b=129279)
r=dougt sr=alecf a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121404 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 22:09:29 +00:00
danm%netscape.com
2e5b4e7927 null guard gLastFocusedContent in PreHandleEvent. bug 142918 r=jst,saari a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121398 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 21:24:09 +00:00
varga%utcru.sk
47d9eca542 Fix for bug 133351 - Bookmarks cannot be moved by drag in sidebar.
r=pink, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121395 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 21:00:49 +00:00
seawood%netscape.com
eaeb0298a2 Use debug() instead of dump() so that js component registration output only show
s up in debug builds.
Bug #138726 r=rginda sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121365 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 03:37:33 +00:00
alecf%netscape.com
327ecc2f83 fix for bug 142568 - license (Comment) only change - fix unicharutil library to be triple licensed, so that it can be used in galeon
r=tao, sr=jag, a=asa
(no adt because this is a licensing-only change, no code is changed here)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121359 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 01:36:04 +00:00
rpotts%netscape.com
63384d1830 bug #99627 (r=chak, sr=mscott, a=asa) Mark nsIURIContentListener as frozen
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121332 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-11 05:16:22 +00:00
oeschger%netscape.com
9349315a9a small updates to the search db, dispensation per 122806, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121325 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-11 01:50:49 +00:00
tingley%sundell.net
6927396daf Fix for bug 89065 to make text-decoration: blink work again.
r=dbaron sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121318 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-11 00:42:34 +00:00
rjesup%wgate.com
072579ba85 Bug 143031: bookmarks in toolbar always becomes a drag when opened. r=jag,
sr=blizzard, a=rjesup/asa/etc (checking in for Blake at Asa's request).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121252 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 07:08:07 +00:00
sspitzer%netscape.com
a76e8d6662 fix for #119360.
addressbook export to ldif, re-import is lossy.
fix two issue, multi line attributes need to be base64 encoded
and there are several attributes that are not being exported / imported.
r=dmose, sr=bienvenu.  a=putterman,asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121251 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 06:41:06 +00:00
pete.zha%sun.com
0810edec5f bug 139877:right-click context menu access keys require "enter" to perform action
r=pete.zha@sun.com sr=jag a=asa
Check in for Kyle Yuan(kyle.yuan@sun.com)'s fix


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121250 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 05:44:59 +00:00
dmose%netscape.com
e952bcd424 Set maximum LDAP I/O timeout to 10 seconds (bug 143172). This significantly mitigates the pain of the connection hang bug (bug 79509). r=mcs@netscape.com, sr=sspitzer@netscape.com, a=asa@mozilla.org, adt=putterman@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121249 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 05:35:45 +00:00
mkaply%us.ibm.com
6884165424 #142695
r=mkaply, sr=blizzard, a=rjesup
OS/2 only - code from Jessica Blanco - don't use CRLF in printer names


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121246 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 03:29:19 +00:00
oeschger%netscape.com
a521a1b0e2 adding some new content to help, r=cotter, dispensation per bug 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121245 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 03:19:56 +00:00
mkaply%us.ibm.com
72a95558c8 #137782
r=pinkerton, sr=jst, a=asa
Change for OS/2 only - use right mouse button for drag


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121244 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 03:08:37 +00:00
mkaply%us.ibm.com
050a707758 #141833
r=tartak, sr=blizzard, a=rjesup
OS/2 only - better error checking for icon decoder


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121242 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 02:57:06 +00:00
blizzard%redhat.com
052d83d570 Bug #22337. Make it possible to install private colormap on 8 bit displays. r=pavlov,s=brendan,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121241 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 02:07:00 +00:00
timeless%mac.com
682e0c7c38 Bug 87965 Can't expand chrome/*.jar files on ARM
patch by jeroen.dobbelaere@acunia.com
r=dveditz sr=brendan a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121240 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 02:00:12 +00:00
blizzard%redhat.com
c399a0d6b1 Bug #140767. Menus don't open when hovered while another menu is open. Don't drop motion events when there's a rollup listener and the event isn't over a popup window. r=rjesup,sr=shaver,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121238 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 01:53:10 +00:00
katakai%japan.sun.com
213e72aaf3 bug 142873
Can't turn on IM after a popup window opens
Call SetFocus() of XIC again to the current focused widget
r=blizzard,sr=shaver,a=asa(for1.0branch)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121232 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 01:19:50 +00:00
bryner%netscape.com
919dac4da6 Fix undefined entities in hiddenWindow.xul, the cause of missing menus on Mac when no windows are open (bug 143141). r=jag, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121228 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 00:36:07 +00:00
rginda%netscape.com
022fbb7508 - chatzilla only -
Bug 140088 Chatzilla is crashing when switching tabs.
rs=blizzard, a=asa
spackle to avoid crasher.  don't tweak the tree root if the tree isn't visible.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121223 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 00:03:48 +00:00
cotter%netscape.com
5e3510d4b1 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; correction to previous update.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121214 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 23:16:12 +00:00
brendan%mozilla.org
ae1a1cd55d Fix old bogus static dollarStr thread-safety bug (142651, r=jband, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121206 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 22:51:44 +00:00
cotter%netscape.com
d44e782fba ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. privacy & security updates, corrections
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121199 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 22:25:24 +00:00
shanjian%netscape.com
21b640baee #143132 Installation failed when installing under some locales
removed dependency on charset conversion modules.
r=syd, sr=mscott a=asa, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121158 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 06:51:33 +00:00
darin%netscape.com
aa9bee63fc fixes bug 139817 "M1RC1 topcrash [@ nsHttpChannel::OnStartRequest]"
r=gordon sr=jst a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121157 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 06:43:49 +00:00
bryner%netscape.com
35b56c75c2 Don't crash if the view manager has gone away before a menu popup is dismissed. Bug 126277, r=ben, sr=hyatt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121156 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 05:21:48 +00:00
bryner%netscape.com
6991439448 Fix positioning of XUL popups inside an iframe. Bug 129782, r=pavlov, sr=ben, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121153 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 05:19:23 +00:00
jst%netscape.com
7bee723d56 Fixing bug 143088. Freezing the interfaces nsIDOMWindow, nsIDOMWindowCollection, and nsIDOMBarProp. Comment changes only, no real code changes. r=fabian@bluishgecko.net, sr=vidur@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121151 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 04:47:15 +00:00
jst%netscape.com
df2a5275d4 Fixing bug 140462. String manipulation problems in the fragment getters for nsIURI that caused problems when accessing href.pathname n' friends. r=bbaetz@student.usyd.edu.au, sr=darin@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121149 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 03:24:46 +00:00
bzbarsky%mit.edu
aff4e0bb2f Bug 139624 (minor fixes to view-source menus). Patch by
gregvalure@yahoo.com (Greg Valure), r=bzbarsky, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121144 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 02:55:53 +00:00
dougt%netscape.com
b81d803390 Fix for 117628. DNS reset on failure. r=brendan, sr=darin, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121141 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 02:24:12 +00:00
darin%netscape.com
ab6ac0a31d fixes bug 142843 "mozilla ignores 'Expires: 0' and 'Pragma: no-cache' when
sent with a 'Last-Modified' header"
r=bbaetz sr=rpotts a=valeski,chofmann ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121128 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 00:01:12 +00:00
cotter%netscape.com
472d6e0cfb ongoing s help content updates per bugzilla 122806 & ADT, r=oeschger; misc. privacy & security content & formatting updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121125 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 23:29:29 +00:00
(no author)
d0c0a6a921 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121123 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 23:25:41 +00:00
seawood%netscape.com
72900e0edb BeOS needs unistd.h for read() and friends.
Fixing tinderbox bustage.
Bug #109913 a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121120 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 23:20:48 +00:00
ben%netscape.com
cbe2249b39 bug 129980 - crash right clicking while loading victoria's secret page.
A must fix!
Patch by hewitt@netscape.com, r=peterl, sr=ben@netscape.com, contact selmer@netscape.com for any questions ;-)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121056 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 09:25:35 +00:00
ssu%netscape.com
ab0aa7118c fixing bug 142805 - Installation failed when installing 1.0 build on JA RH 7.1. r=dprice sr=jag a=leaf, adt1.0.0
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121051 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 07:33:44 +00:00
mstoltz%netscape.com
a4c3785f50 Bug 133170 - Do a same-origin security check after redirects on XMLHttpRequest
and document.load calls. Also enable HTTP basic-auth dialog for both functions.
r=heikki, jst sr=jband, a=chofmann, putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121049 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 06:30:55 +00:00
leaf%mozilla.org
28fea7fe7d allow pulling by using MOZ_DATE in addition to the usual branch tag.
bug 142906, a=asa, r=cls


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121043 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 05:53:09 +00:00
dbragg%netscape.com
ba98c54594 localeVersion update for RC2. Using string 1.0.0rc2. Fixes bug 142823 r=tao, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121029 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 01:19:10 +00:00
jaggernaut%netscape.com
2250ff40dc Bug 142871: Need way to override navigator window title, r=bryner, sr=alecf, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121019 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 23:43:59 +00:00
jkeiser%netscape.com
e2b8fd356a Allow javascript URI form submits to call .submit(). bug 139798, r=alexsavulov@netscape.com, sr=attinasi@netscape.com, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121001 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 22:47:13 +00:00
caillon%returnzero.com
a33ccabd1e 142711, add a trailing slash to the default homepage to avoid an extra connection for the user and save some load on the server. r=timeless, sr=shaver, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120997 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 22:16:13 +00:00
brendan%mozilla.org
3c96562702 Avoid toSource bloat in e.stack; fix related crash due to unrooted errObject in js_ErrorToException (139316, r=rginda, sr=shaver).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120991 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 21:59:56 +00:00
jaggernaut%netscape.com
80bafa48f9 Bug 129428: Paste doesn't work in bookmark manager. Patch by ben@netscape.com, r=pierrechanial@netscape.net, sr=jag, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120988 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 21:55:49 +00:00
bienvenu%netscape.com
ef779b7b11 checking in fix for 141028 from trunk, shutdown crash in nsMsgDatabase a=drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120947 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 14:53:11 +00:00
kaie%netscape.com
b1ac5dd228 b=139329 Crashes trying to send signed mail.
r=javi sr=alecf a=asa adt=jaimejr


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120933 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 09:39:13 +00:00
brendan%mozilla.org
db876e378d Fix script attribute handling so type trumps language (135493, r=heikki, sr=jst, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120927 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 09:08:29 +00:00
racham%netscape.com
ea4c27d979 Fixing bug 142627. Making copies and folders settings to hold. Landing for Navin. r=bhuvan, sr=bienvenu, a=asa,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120922 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 07:30:17 +00:00
rginda%netscape.com
9bed9c8290 bug 140088, "Chatzilla is crashing when switching tabs."
patch=jst, r=rginda, sr=hyatt, a=asa
clear element box object when the element is removed from the document.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120918 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 03:24:13 +00:00
dprice%netscape.com
6d752f5d9b 142170 r=ssu sr=jag adt=jaime a=asa
add message= flag to RunApp sections of .ini files

142282 r=ssu,syd,dprice sr=mscott adt=jaime a=chofmann
add supercede attribute to Components sections of .ini files


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120914 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 02:44:12 +00:00
dougt%netscape.com
8fc073e52b Relanding dveditz's xpinstall/unicode patch. bugs 142107/125107 r=dougt, sr=alecf, a=asa/chofmann, adt=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120886 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-06 22:10:05 +00:00
saari%netscape.com
5a31496eb0 fix form bugzilla 142138, adding null checks to prevent embedding layer from exploding when processing an activate event during window teardown. sr=jag, r=chak, adt and driver approved, kid tested
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120852 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-06 19:36:22 +00:00
bzbarsky%mit.edu
3519bd22cf 140262 - context menu for input type=password should include
paste. r=biesi sr=blake, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120804 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 22:43:59 +00:00
blakeross%telocity.com
cb38baf4c8 137815 - crash hitting enter key before panel content finishes loading [@nsTreeSelection::FireOnSelectHandler]. r=bryner sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120801 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 20:34:35 +00:00
sgehani%netscape.com
dd53284abb Disable dropping onto toolbar folders on unices.
b=96504; r=law; sr=blizzard; a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120800 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 18:30:12 +00:00
darin%netscape.com
0b3df0b317 cleaning up documentation, marking some interfaces frozen, and splitting
up some interfaces into separate IDL files (b=124465)
reviewed by dougt and bbaetz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120799 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 17:55:27 +00:00
bryner%netscape.com
fd5e4b32c1 Checking mkaply's OS/2 bustage fix into the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120795 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 03:34:22 +00:00
bryner%netscape.com
b8ed7d5184 Make the XUL cache lock gc'ing of script objects while they are in the cache, to prevent pulling out a bogus JSObject. Bug 132216, r=waterson, sr=brendan, a=asa (and hopefully no OS/2 bustage this time).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120791 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 19:06:54 +00:00
bryner%netscape.com
6c88206d50 Adding the functions JS_LockGCThingRT and JS_UnlockGCThingRT, which are variants that only require a JSRuntime, not a JSContext. Converted some internal callers to use the new interface. Bug 141356, patch from shaver, r=bryner, sr=brendan, a=asa (via bug 132216).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120784 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 07:54:59 +00:00
ducarroz%netscape.com
6300150636 Fix for bug 137627. Need to check for null pointer to avoid to crash in some specific cases.
R=kaie, SR=sspitzer, A=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120775 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 01:29:31 +00:00
oeschger%netscape.com
fa48dfcca2 updating help content, dispensation per 122806: adding entries to search database, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120774 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 01:28:49 +00:00
mscott%netscape.com
8ae38475b0 Bug #121583 --> work around the infinite reflow loop in various windows that use tree widgets by
forcing a min height and min width on the the tree. This fixes the famous 100 % CPU hang.

Patch from kin@netscape.com
r=mscott
sr=hyatt
a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120763 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:35:18 +00:00
ssu%netscape.com
d8b7e7f848 fixing bug 141858 - unexpected setup\setup.exe error message after installing browser, r=dprice, sr=mscott, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120760 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:20:03 +00:00
yokoyama%netscape.com
89fbc40586 Bug 139842
Mail/News only.  Freeze when user scroll the msg header.
- infinite loop caused by creating an invalid UTF-8 string.
- invalid UTF-8 string was created when Unicode Decoder failed.
/r=nhotta, /sr=bienvenu, /a=asa, /adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120757 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:13:56 +00:00
brendan%mozilla.org
3fca8a4975 Fix js_SetProtoOrParent to handle non-native and native-but-incompatible-class-change proto-setting scenarios (140164, r=khanson, sr=jband, a=rjesup).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120756 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:11:05 +00:00
rginda%netscape.com
e9031b6800 - venkman only -
bug 137327, r=caillon@returnzero.com,a=shaver
translate null to -1 in getParentIndex return, to avoid infinite loop


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120754 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:04:07 +00:00
rginda%netscape.com
efbd75a0b3 - cview only -
bug 137327, r=caillon@returnzero.com,a=shaver
translate null to -1 in getParentIndex return, to avoid infinite loop


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120753 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:03:28 +00:00
rginda%netscape.com
cb74781241 - chatzilla only -
correct the command name for the View->Open At Startup option


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120752 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 23:59:49 +00:00
(no author)
62ca5a2c59 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120746 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 23:27:34 +00:00
dougt%netscape.com
bb399b0937 Fixes 138254 and 138157. Both are related to ftp uploading and publishing. r=bbaetz sr=darin, a=scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120741 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 22:53:58 +00:00
leaf%mozilla.org
1bff3d0f84 missed some of dveditz's files
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120737 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 22:31:21 +00:00
timeless%mac.com
a672bca9fe 3.46 <wtc@netscape.com> 11 Apr 2002 11:34
Deleted a printf statement in the Neutrino builds. Bug 135692.
a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120735 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 22:05:12 +00:00
leaf%mozilla.org
8b85480c73 backing out dveditz's unapproved checkin (and pink's subsequent mac
build-bustage fix).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120730 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 21:41:44 +00:00
pinkerton%netscape.com
c22abfef1a fix bustage, cast required for wchar_t.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120698 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 15:31:23 +00:00
dveditz%netscape.com
a65215f7d3 bug 125106,126276 make Installer (particularly Windows) work on localized OS's. Also fixes 84492 and bugscape 14315. r=dougt/sr=alecf.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120689 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 11:32:32 +00:00
rods%netscape.com
4c2e366f9b Add strnig for can't print xul docs error
Bug 136185 r=dcone sr=attinasi a=scc adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120688 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 11:07:43 +00:00
hyatt%netscape.com
fcc1b296a8 Fix for 121583. r=ben, sr=kin, adt=selmer
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120679 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 07:03:27 +00:00
mhammond%skippinet.com.au
954a04b866 Merge from trunk.
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120670 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 05:16:44 +00:00
smontagu%netscape.com
2b62bd490c Fix hang and crash when pressing ENTER in Hebrew text fields. Bug 95228, r=lkemmel@il.ibm.com, jkeiser; sr=waterson, attinasi; a=shaver,asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120668 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 05:02:29 +00:00
law%netscape.com
969733934b Bug 141330 (for branch); a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120661 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 04:10:47 +00:00
timeless%mac.com
92504d633b Bug 137171 XML-RPC bug handling dates with months 10 and over
patch by samuel@sieb.net r=rginda sr=sspitzer a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120659 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 04:09:59 +00:00
law%netscape.com
6345f05f54 Bug 141647 (for branch); ensure profile is selected when opening window; this is needed to handle command line options that include -turbo and some other option that causes a window to open; r=jelwell@netscape.com, sr=jaggernaut@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120650 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 03:15:36 +00:00
sspitzer%netscape.com
aaef08a0d4 fix for #140094. typo in attribute name leads to LDIF dataloss.
thanks to dp for the fix.  r=blizzard,sr=bienvenu,a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120642 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 02:52:33 +00:00
sspitzer%netscape.com
bc513f36aa fix for bugzilla bug #137886. add support for re-migration of defunct
profiles.  r=ccarlen, sr=bievenu, a=chofmann.  thanks to ccarlen for the
initial patch.  by default, no re-migration for mozilla builds.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120637 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 02:33:39 +00:00
mhammond%skippinet.com.au
344a2a950f Merge from trunk.
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120628 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 01:32:51 +00:00
cotter%netscape.com
afd9deff38 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; minor updates for certs help.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120626 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 01:22:20 +00:00
mhammond%skippinet.com.au
21c1975abf Only support dynamic linking - finally works for both Windows and Linux :)
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120621 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 00:59:23 +00:00
pavlov%netscape.com
f01bb5c354 part of earlier checkin for timers. r=rjesup sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120600 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 23:00:10 +00:00
mkaply%us.ibm.com
5738f2de70 #141676
r=pedemonte, sr=blizzard, a=rjesup
OS/2 only - don't add the hidden window to the task list


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120598 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 22:58:01 +00:00
khanson%netscape.com
b1bcc03db3 Patch for Bug #138666, memory leak in jsdtoa.c, sr=brendan, r=khanson, a=chofmann, has adt approval
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120596 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 22:56:50 +00:00
pavlov%netscape.com
f57bfe8089 checking in bug 129953 into the 1.0 branch. part 2 of 2. r=rjesup sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120586 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:52:30 +00:00
pavlov%netscape.com
9696b2257b checking in bug 129953 into the 1.0 branch. part 1 of 2. r=rjesup sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120584 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:46:09 +00:00
blizzard%redhat.com
6308211d36 Use an nsFixedSizeAllocator to legalize the bit-packing's assumption that
all nsXULAttributes pointers will be 8-byte aligned. Bug 124335, r=brendan,
sr=waterson, a=rjesup (shaver's bug.)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120583 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:37:37 +00:00
pinkerton%netscape.com
087b513af8 remove portions of smfr's last scrolling optimization. the OffsetRgn calls seem un-necessary and caused problems with redrawing outliners and scrolling while windows overlapped the scrolled widget. r=sdagley/sr=beard/a=asa. bug# 141249
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120572 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:03:32 +00:00
rjesup%wgate.com
55781765c2 Bug 125489: mkdir issues causing problems with Privacy/Security & Tasks
menus. r=dougt  sr=brendan a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120571 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:59:43 +00:00
tor%cs.brown.edu
0b880c3f33 Bug 53597 - make gamma correction (or lack thereof) consistent.
r=dbaron, sr=brendan, a=roc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120568 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:40:35 +00:00
peterlubczynski%netscape.com
07c3528f53 Implementing plugin scanning in their installation folders and fixing Real Player in the components folder, bug 133282 r=av, sr=attinasi,waterson a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120567 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:40:10 +00:00
tor%cs.brown.edu
433f63c85f Bug 137694 - only create the 1-bit GC once we've created a 1-bit pixmap.
r=pavlov, sr=blizzard, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120566 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:37:48 +00:00
sicking%bigfoot.com
2c9d5ffb80 Bug 140687: Make substring() work for all startindexes.
r=Pike sr=jst a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120546 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 14:59:41 +00:00
rjesup%wgate.com
57359a5752 Bug 141718: 1.0 needs to have it's own start page. r=gerv, sr=shaver, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120545 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 14:53:14 +00:00
kaie%netscape.com
dd0a7ce7ea b=139948 SSL Tooltip not updated when going from one ssl site to another
r=javi sr=jag a=rjesup adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120532 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 07:58:59 +00:00
timeless%mac.com
0d02bd205a bug 139989, Fieldset needs prettier default border
patch by mabus@runbox.no, r=axel@pike.org, sr=ben, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120531 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 07:15:43 +00:00
mkaply%us.ibm.com
8cf733bbc1 #140574
r=mkaply, sr=blizzard, a=rjesup@wgate.com
OS/2 only - Remove unnecessary pixelscale - fix print preview scaling


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120520 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 03:22:50 +00:00
bryner%netscape.com
b5cb98b819 Fixing mach-o build bustage on MOZILLA_1_0_0_BRANCH. a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120516 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 03:17:58 +00:00
rbs%maths.uq.edu.au
90402b9a8c bug 121748 - stretch fences at a size that fully covers non-fences. Also improve the height of token elements such as <mi> when they involve symbol fonts with weird metrics, r=roc+moz, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120489 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:37:40 +00:00
brendan%mozilla.org
6423619c8f Followup fix for 138791, neil@parkwaycc.co.uk's superior bit-fu (r=rjesup, sr=waterson, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120488 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:35:46 +00:00
rginda%netscape.com
9209ff62fe bug 135455, Missing chatzilla icon in Window dropdown menu
patch=mailto:andreas.premstaller@uibk.ac.at, r=rginda,sr=ben,a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120482 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:06:19 +00:00
(no author)
a0d1145f8e This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120481 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:06:13 +00:00
rginda%netscape.com
74e73e10f3 bug 135455, Missing chatzilla icon in Window dropdown menu
patch=mailto:andreas.premstaller@uibk.ac.at, r=rginda,sr=ben,a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120480 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:06:12 +00:00
cavin%netscape.com
238feddbd6 Fix for 123804 and 138804. Put child folders in the pending list when parent folders are missing and process these child folders when parent folders show up. r=ducarroz, sr=sspitzer, a=rjesup@wgate.com, adt=jaimejr.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120477 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:04:10 +00:00
brendan%mozilla.org
a978be0193 Avoid opening and trying to reopen in CopyTo, so we work on FAT32 filesystems mounted on Linux (e.g.; 134163, r=dougt, sr=waterson, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120472 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:50:20 +00:00
naving%netscape.com
cb5b4b1b01 138297 r=bienvenu sr=mscott a=rjesup Fix problems with single profile filter for imap accts when using quick
launch. Don't null the filter list on server unless we are unloading it.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120471 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:47:23 +00:00
brendan%mozilla.org
3ec439a1fd Don't 'constant-fold' if(false)var foo=42 into nothing (140974, r=khanson, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120469 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:40:14 +00:00
jkeiser%netscape.com
c16ff0faf0 Fix Mac radio button click / general event crasher. bug 134934, r=saari@netscape.com, sr=attinasi@netscape.com, a=chofmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120463 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:03:28 +00:00
ssu%netscape.com
506b99572b fixing bug 100822 - Shut down running browsers after download. r=curt sr=dveditz a=drivers,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120460 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 21:51:09 +00:00
av%netscape.com
4679a340c1 Backing out changes from fixing bug 104611 as it may have caused a regression in page load time, see bug 141518
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120446 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 18:09:45 +00:00
bzbarsky%mit.edu
9bc7ddddf4 Landing Neil's fix for bug 132682 - Twisties aren't clickable in History
Sidebar, r=varga, sr=alecf, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120442 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 15:00:58 +00:00
mhammond%skippinet.com.au
a9d5b91669 Oops - screwed up last checking - windows tries to init/finalize twice!
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120434 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 14:03:24 +00:00
mhammond%skippinet.com.au
64a4b4e041 s/false/0/ - must have been in js mode :)
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120433 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 14:02:24 +00:00
rods%netscape.com
bb57de0d36 This line got backed out of the trunk, but not the branch and should have
Discovered by Bug 140116
Bug 64165 r=jkeiser sr=attinasi a=asa adt=jamime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120430 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 13:03:22 +00:00
rods%netscape.com
ade3fc802f safety check to keep it from crashing
The safety checks in finalize_translation is the key to stopping the crash, but
the added ones in end_document are important also.
Bug 139369 r=dcone,roland sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120427 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 11:36:07 +00:00
blizzard%redhat.com
c478573816 Bug #129591. nsWindow::Enabled is a no-op on GTK. Also fixes bug #65521 ([linux] modal dialogs should only freeze parent window (not all windows)) and bug #130855 (clicking on menuitem with submenu often activates an item on the submenu). Rewrite events to be much more sane. r=bryner, sr=jst, a=rjesup,shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120418 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 04:05:29 +00:00
dbaron%fas.harvard.edu
6d80075884 Rename Mozilla-extension values for real CSS properties to begin with -moz-. Remove some unused code. b=3935 r=hixie sr=waterson a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120417 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 03:55:40 +00:00
hewitt%netscape.com
3eb34b884b 134195 - trees don't work in builds installed over old builds, r=dbaron, sr=jag, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120415 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 03:15:50 +00:00
hewitt%netscape.com
4353adcf44 123834 - no text in wizard buttons on mac, r=andreww, sr=ben, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120409 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 03:02:56 +00:00
dbaron%fas.harvard.edu
8ce8efd86e Add command-line tool for parsing CSS files. b=139943 sr=waterson r=attinasi a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120407 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 02:54:11 +00:00
cotter%netscape.com
22af3d19b0 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. SDX & interface updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120399 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 02:34:47 +00:00
chak%netscape.com
3e667aeba3 Fix for #141247 - Enable HTML dir listings
r=dougt, sr=darin, a=adt, a=drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120391 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 02:01:11 +00:00
chak%netscape.com
9717ee655a Fixes #141235. Indexed-html converter doesn't handle parent directories for file protocol.
[Checking in for dougt]
r=chak@netscape.com, sr=darin@netscape.com, a=adt, a=drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120390 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 01:59:33 +00:00
darin%netscape.com
8bf0331753 fixes bug 141061 "XMLHttpRequest allows reading of local files"
r=mstoltz sr=heikki a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120379 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 01:20:13 +00:00
darin%netscape.com
131bb3f6bb fixes bug 138877 "Browser crashes if HREF contains entity #9619; M1RC1
topcrash [@ MSVCRT.DLL - PR_Free] [@ libc.so.6 - PR_Free]"
r=nhotta sr=rpotts a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120378 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 01:15:12 +00:00
bzbarsky%mit.edu
b0533dc7a4 Disable Link Toolbar on the branch only. Bug 138496, patch by
sballard@netreach.net (Stuart Ballard), r=bzbarsky, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120374 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 00:39:47 +00:00
dprice%netscape.com
2464767a0e 139641 r=ssu sr=dveditz a=rjesup adt=putterman
add flexable directory lookup to the install wizard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120371 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 00:22:38 +00:00
(no author)
b3ff479e57 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120366 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 00:03:58 +00:00
danm%netscape.com
8edc1bfe80 two new makefiles in xpfe/components/autocomplete/resources. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120350 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:37:55 +00:00
danm%netscape.com
9151441b62 process resources directory, Windows-only. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120349 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:36:45 +00:00
danm%netscape.com
e90f36f1ba process content directory. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120348 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:35:38 +00:00
danm%netscape.com
b085bafb64 force popup widget to be invisible when the menu is not explicitly open. bug 120155 r=bryner,hyatt a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120346 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:34:27 +00:00
danm%netscape.com
ab66163d40 new empty makefile to process jar.mn. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120345 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:33:16 +00:00
danm%netscape.com
f72164b69a windows-only override for autocomplete.css bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120343 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:32:05 +00:00
danm%netscape.com
0a3fb441b8 windows-only version with visibility:hidden rule. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120342 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:31:31 +00:00
karnaze%netscape.com
ace6774c42 bug 138292 - add a non table related frame to its parent frame's child list when the parent frame is an anonymous table cell frame, a=rjesup, adt=putterman, sr=waterson, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120341 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:21:58 +00:00
(no author)
90cc2ae2ad This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120339 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:10:23 +00:00
varada%netscape.com
486c6118e2 fix for 141314;associate the right smtp server with each account;r=racham;sr=sspitzer
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120337 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:08:39 +00:00
naving%netscape.com
84438fad56 139833 r=racham sr=sspitzer a=rjesup default sent/templates/drafts folder uri's should use internal names,
do not use localized names.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120332 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 21:37:57 +00:00
av%netscape.com
c9db4ed2fd Fixing 106411 -- 'Starting plugin...' message is stuck in the status bar, r=serge, sr=beard, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120321 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 20:54:11 +00:00
darin%netscape.com
0dd4d12051 fix assertion in nsHttpPipeline due to missing NS_INIT_ISUPPORTS... this
patch was meant to land along with yesterday's pipelining landing.
r=gagan sr=rpotts a=chofmann ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120315 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 20:08:30 +00:00
jkeiser%netscape.com
584cad73f4 Fix form restoration for pages with multiple forms. bug 138892, r=rods@netscape.com, sr=attinasi@netscape.com, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120314 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 19:52:45 +00:00
varga%utcru.sk
e851fcf629 Fix for bug 135002 - timing issues in the outliner content model.
r=bryner, sr=hewitt, adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120304 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 16:22:31 +00:00
rods%netscape.com
c8cd4c0142 forgot about this additional change
Bug 136185 r=dcone sr=attinasi a=asa adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120294 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 10:57:46 +00:00
rods%netscape.com
eed8ea112d temp fix so XUL document won't print
Bug 136185 r=dcone sr=attinasi a=asa adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120293 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 10:46:26 +00:00
law%netscape.com
0cdefef72b Bug 136188 (for branch); add support for WWW_GetWindowInfo DDE topic; r=John Weilander (support@kaylon.com); sr=roc+moz@cs.cmu.edu, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120290 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 07:57:42 +00:00
sspitzer%netscape.com
7bc93da4c9 fix build issue. thanks to jefft for the patch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120289 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 06:33:18 +00:00
mstoltz%netscape.com
6505f6ae3f Bug 140133 - Changing dangerous strcpy call to strncpy, and null-terminating
the result. r=nhotta, sr=heikki, a=asa, putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120286 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 04:18:32 +00:00
av%netscape.com
327e48530d Fixing 132430 -- Real JukeBox breaks the Plugin Finder Service, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120278 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 02:16:40 +00:00
av%netscape.com
ecc5bf01f7 Fixing 132430 -- Real JukeBox breaks the Plugin Finder Service, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120277 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 02:08:01 +00:00
av%netscape.com
56e1aee489 Fix 132430 -- Real JukeBox breaks the Plugin Finder Service, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120276 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 02:06:14 +00:00
law%netscape.com
01f4d66b6b Bug 141068; turn on the pref that will cause exit when last window closes in turbo mode, if the user has multiple profiles, r=sgehani@netscape.com, sr=jaggernaut@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120275 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:55:45 +00:00
darin%netscape.com
e5e4f0b26c fixes bug 93054 "implement HTTP/1.1 pipelining" (disabled by default)
r=gagan sr=rpotts a=chofmann ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120268 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:11:16 +00:00
mhammond%skippinet.com.au
a792c0ba44 s/wchar_t/PRUnicode/ for Linux.
Not part of the build.  Global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120267 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:05:19 +00:00
mhammond%skippinet.com.au
9f7c157dc0 Add some standard header files.
Not part of the build.  Global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120266 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:04:01 +00:00
bzbarsky%mit.edu
a1c5d620cf Make selecting parts of a line in align:justify work right on
Mac/Linux.  Bug 58704, r=akkana, sr=kin, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120255 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:54:43 +00:00
mhammond%skippinet.com.au
647489f91d Remove signed/unsigned mismatch warning.
Not part of the build; global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120251 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:23:37 +00:00
mhammond%skippinet.com.au
79017aee7c Ensure result code always initialized, even when we don't go around the loop
Not part of the build; global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120250 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:22:52 +00:00
mhammond%skippinet.com.au
7093aeefa2 Yet another attempt at portable library init and finalize. Thanks to
Christof Meerwald.

Not part of the build; global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120249 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:22:16 +00:00
mkaply%us.ibm.com
9187ea31c1 #140538
r=pedemont, sr=blizzard, a=asa
OS/2 only - fix some edge cases where file dialog didn't appear, general cleanup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120245 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:50:50 +00:00
serge%netscape.com
959b0bd890 fix #131153 [PDF plugin doesn't work, it expects file extension for stream type == StreamType_AsFile] r=peterl,sr=darin,a=asa,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120244 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:48:32 +00:00
varga%utcru.sk
e9b4d1c37e Fix for bug 135294 - Click on splitter causes semi-hang.
r=hwaara, sr=ben, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120240 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:37:13 +00:00
leaf%mozilla.org
4de9db38fa update to release candidate 2 in case we do one ;) r=aki, bug 134264
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120237 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:06:33 +00:00
jj%netscape.com
95537ada6b bugscape 13170: updating 'vers' 2 again (in fact restoring rev 1.9.44.2)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120234 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:03:26 +00:00
jfrancis%netscape.com
c7287e9c01 branch landing of 100855: getting correct ui feedback in composer's paragraph format menu. r=brade, sr=kin, adt=jaime, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120225 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 21:19:12 +00:00
locka%iol.ie
d096ea5ef8 Add missing scrollbar graphic. b=138692 r=adamlock@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org a=jaimejr@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120224 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 21:14:48 +00:00
radha%netscape.com
5cff0b49e8 Fix for bug # 138134. General anchor traversal broken by ScrollIfAnchor(). r=adamlock sr=alecf a=rjesup. Approved by ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120223 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:58:23 +00:00
law%netscape.com
1986167e81 Bug 133120; re-applying this fix on the branch, it was previously applied weeks ago but I screwed up CVS and it got backed out
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120222 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:42:08 +00:00
cbiesinger%web.de
16c69a134c bug 140146 patch by ere@atp.fi r=bienvenu sr=mscott a=asa
crash in nsMsgFolder during shutdown; M1RC1 topcrash [@ nsMsgFolder::SetBiffState]


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120221 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:33:36 +00:00
mkaply%us.ibm.com
1baf46f180 #67749
r=cls, a=dbaron
OS/2 only - add OS/2 specific forms.css


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120219 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:29:07 +00:00
jaggernaut%netscape.com
9e403beae8 Bug 37638: URL bar is given focus by default in new window [via accel+N or File > New Navigator Window]
Bug 89835: Window opened up with JavaScript has focus in the URL bar while NN4 and IE put focus on the content area

Focus will now always go to the content area unless we're opening for a blank page.

r=sgehani, sr=hewitt, a=drivers, a=adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120186 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 09:40:03 +00:00
glazman%netscape.com
888df6e957 Add ability to remove named anchors from Composer's Format menu and contextual menu; b=80742, r=jfrancis, sr=kin, a=rjesup@wgate.com, adt=jaime
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120184 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 09:31:03 +00:00
ben%netscape.com
05920ee992 127476 - adt1.0.0+ non-ASCII characters in imported IE bookmarks are displayed
as garbage. r=ftang, sr=hyatt, a=dbaron.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120183 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 09:22:04 +00:00
badami%netscape.com
0194225d8b bug 122877 r=bratell sr=jst a=asa patch=t_mutreja@yahoo.com
case insensitive matching for attributes (HREF != href)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120177 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 06:25:55 +00:00
mhammond%skippinet.com.au
97c9c1ece8 New file needed by last checkin. Not part of the build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120174 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 05:54:52 +00:00
mhammond%skippinet.com.au
50d2799bf8 Add support for nsIVariant, and fix a number of other bugs. Replace
nsAllocator with nsMemory.

Not part of the build; using global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120173 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 05:32:45 +00:00
karnaze%netscape.com
509866e746 bug 138436 - remove redundant style change reflows. a=asa, adt=putterman, sr=attinasi, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120171 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 03:37:51 +00:00
dbaron%fas.harvard.edu
11f00a6636 Better simulate the automated update to configure that would have happened on the trunk (fixes line numbers for error reports during build). See bug 91305.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120160 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 23:36:58 +00:00
blakeross%telocity.com
00c4fb82f8 134039 - theme switching should shut down QL. r=law sr=hyatt a=dbaron adt1.0.0+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120157 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 22:48:50 +00:00
shanjian%netscape.com
b73ef7a9df update configure base on configure.in.
(configure.in change was made for :
#91305 add universal chardet into unix default extensions list.
That was checked in a week ago, but configure file is not updated yet.
)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120154 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 22:22:27 +00:00
darin%netscape.com
484eac2e03 fixes bug 138780 "Redirect with non-ASCII in URL fails"
r=andreas.otte@debitel.net sr=rpotts a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120145 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 19:40:00 +00:00
alecf%netscape.com
edc01d68be fix comments to actually describe the interface for bug 136235
r=chak, sr=dveditz, a=dbaron
no ADT because this is simply a comment/doc change - there is no code involved.
trying to do the right thing here and just land this puppy.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120083 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 04:32:23 +00:00
wtc%netscape.com
c863d44ace Bugzilla bug 129080: Unroll the collect_data code. Pin the required buffers.
Allow the cache to grow if necessary to hold large objects. r=nelsonb,wtc.
a=asa (on behalf of drivers) for checkin to the 1.0 branch
Modified Files: h_bigkey.c hash_buf.c
Tag: MOZILLA_1_0_0_BRANCH


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120076 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 03:43:49 +00:00
wtc%netscape.com
e418971eda Cause tinderbox to rebuild. (Tag: MOZILLA_1_0_0_BRANCH)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120073 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 03:05:59 +00:00
wtc%netscape.com
dd7b6b45f5 Backed out the fix for bug 121975 on the MOZILLA_1_0_0_BRANCH. It doesn't
work on Windows 95.
Modified files: configure configure.in WIN32.mk _win95.h w95dllmain.c
w95thred.c


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120072 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 03:02:01 +00:00
sspitzer%netscape.com
a1721de603 fix for #134743. mailing list entries get duplicated when you use turbo.
r=racham,sr=mscott,a=dbaron,a=adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120071 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 02:54:53 +00:00
law%netscape.com
a696f04d4d Bug 136940; check new pref browser.turbo.singleProfileOnly, and if set, exit when last window closes. This code provides a stop-gap in case multi-profile bugs can't be fixed; r=morse, sr=blake, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120065 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:57:01 +00:00
(no author)
c3af0047a7 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120062 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:47:19 +00:00
law%netscape.com
f4637ef0de Bug 116938; ensure temp file has extension matching content type, and, prevent ShellExecute on executable files; r=sgehani, sr=mscott, a=shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120060 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:40:17 +00:00
morse%netscape.com
cb3a2e0996 bug 132641, -killAll to close all windows, r=law, sr=jag, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120055 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:15:44 +00:00
cltbld%netscape.com
a5212f8062 fixing previous checkin: to rc2 for the moment.
asasaki checking in as cltbld, still bug 133797.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120054 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:13:48 +00:00
jst%netscape.com
9c851a6d41 Fixing OS/2 bustage.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120052 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:07:40 +00:00
leaf%mozilla.org
9ff0d77979 force empty commit to branch to allow checking out with branch and date
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120049 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 00:39:10 +00:00
cltbld%netscape.com
72108100e8 Updating user agent string for 1.0, bug 133797.
r=lpham, sr=leaf, a=asa for blanket version approval.
asasaki checking in as cltbld.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120045 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 00:04:43 +00:00
curt%netscape.com
e3a4480ddc Fixes infinite loop in windows installer
(r=leaf, sr=dveditz, r=leaf)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120035 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 23:27:40 +00:00
kmcclusk%netscape.com
4a76d52d77 Abort paint if destroying the PresShell and check for null PresShell in nsImageLoader. bug 102585. r=waterson sr=attinasi a=dbaron adt_a=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120028 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 23:05:09 +00:00
jst%netscape.com
256c0c9094 Fixing bug 98654. Making document.write() after setting window.location from within a script that comes from document.write() not cancel the load that was intiated by setting window.location. r=bzbarsky@mit.edu, sr=vidur@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120024 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 22:53:10 +00:00
brendan%mozilla.org
02d880cb36 Fix for 131348 (a=asa, r=shaver, sr=brendan, checking in for khanson).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120013 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 22:10:25 +00:00
peterv%netscape.com
1b3fa859b9 Fix for bug 135825 (No scrollbars in P3P summary window). r=Pike, sr=heikki, a=dbaron, adt1.0.0+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120009 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 21:45:19 +00:00
mscott%netscape.com
a6bb24d4c8 Bug #121299 --> fix the cookie icon to use an icon with a transparent background
r=morse
sr=sspitzer
a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120007 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 21:42:29 +00:00
peterv%netscape.com
7c9a240e91 Fix for bug 56087 (XSLTProcessor::TransformDocument can't work on existing document). r=harishd, sr=heikki, a=scc, adt1.0.0+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120006 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 21:17:45 +00:00
rginda%netscape.com
5cee5838bf - venkman only -
bug 139883, "ErrorHookProc can be tricked into thinking it never finished running", r=peterv, a=scc
fixes bad early return in jsds_ErrorHookProc
test for correct max params (12, not 8) in CreatePPLineMap
use nsnull instead of 0 for null pointer return value


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120001 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:59:02 +00:00
cbiesinger%web.de
0726835c64 last checkin had a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119997 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:42:31 +00:00
cbiesinger%web.de
320ca6ca28 bug 104825 r=caillon sr=attinasi
ABBR and ACRONYM should not have arrow/question cursor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119996 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:41:04 +00:00
andreas.otte%debitel.net
4072445f12 fix bug 132254 [Invalid URL confuses mozilla], while resolving a
possible relative url do not return an error when the urlparser
identifies an invalid scheme, instead take the string as relative url
instead, r=morse, sr=darin, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119995 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:39:31 +00:00
pinkerton%netscape.com
3f8bb42c7e delay mediator hookup to later in reflow to catch some other outliners. r=sdagley/sr=ben/a=roc. bug# 139263
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119994 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:27:10 +00:00
chak%netscape.com
44eccf3e99 Backing out fix for #106253 - Plugins aren't adding themselves to load groups
a=adt, a=drivers, r=peterl, sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119990 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:19:44 +00:00
oeschger%netscape.com
bca9d10196 help content update: search database additions, dispensation per 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119989 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:19:05 +00:00
dougt%netscape.com
5d265597f7 Reduces the chance of losing a known race condition. 139556. r=rpotts@netscape.com, sr=darin@netscape.com, a=asa, *dt=jamiejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119988 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:16:47 +00:00
rjesup%wgate.com
533e58886e Bug 135361: Print properties margin callouts mislabeled.
r=bzbarsky, sr=attinasi, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119966 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 15:07:30 +00:00
karnaze%netscape.com
afd1e054ec bug 136746 - null pointer check if line is empty. a=asa, adt=jaimejr, sr=waterson/attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119964 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 14:55:25 +00:00
morse%netscape.com
42f8892aeb bug 132641 implement -killAll, r=law, sr=sgehani, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119952 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:51:57 +00:00
jaggernaut%netscape.com
c6b05ab2a7 Bug 139522: SSL Pages are incorrectly displayed as being not encrypted. r=kaie, sr=alecf, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119951 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:50:33 +00:00
jaggernaut%netscape.com
8d79ab9138 Backing myself out. This was an accidental checkin, but it'll come for real soon, I promise :-)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119950 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:47:17 +00:00
jaggernaut%netscape.com
8a331877f7 *** empty log message ***
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119948 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:44:20 +00:00
morse%netscape.com
bf5f91136e bug 132641 implement -killAll, r=law, sr=sgehani, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119947 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:26:07 +00:00
morse%netscape.com
92dc132e55 bug 132641 implement -killAll, r=law, sr=sgehani, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119946 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:19:53 +00:00
curt%netscape.com
6320031aac Differentiate between a product name we show the user and an internal product
name we use for regisry and path names
  (Bug 140178, r=ssu, sr=dveditz, a=asa)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119941 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 04:49:56 +00:00
jkeiser%netscape.com
324d0ddc3b Fix crash with keyboard access to comboboxes (bug 136606), r=rods@netscape.com, sr=attinasi@netscape.com, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119939 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 04:16:57 +00:00
bienvenu%netscape.com
95cb3a686d fix bug 127707 from trunk crash adding news server after removing news server r=navin, sr=sspitzer a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119936 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 02:09:16 +00:00
ducarroz%netscape.com
51fa48e028 Fix for bug 138619. We must initialize rv before using it!. R=srilatha, SR=bienvenu, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119920 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 00:48:29 +00:00
nhotta%netscape.com
030dc46ba9 Adding a localization comment to a property file not to translate the strings,
bug 139615, r=rchen, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119919 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 00:47:23 +00:00
sspitzer%netscape.com
a3ae03ad37 fix for #101527
moveTo() [of directories with subdirectories] on windows doesn't behave the same as it does on linux and mac.  r=dougt, sr=bienvenu, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119916 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 00:39:53 +00:00
brendan%mozilla.org
514f134015 Purge the deflated string cache entry, if any, before finalizing external strings (140070, r=jband, sr=shaver, a=rjesup).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119913 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:54:34 +00:00
darin%netscape.com
8a410b6fe1 fixes bug 137965 "document contains no data on disconnect"
r=bbaetz sr=rpotts a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119912 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:54:31 +00:00
cotter%netscape.com
509d393ae1 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; content & formatting fixes for certs help
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119910 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:45:04 +00:00
sspitzer%netscape.com
1f51267cb5 new string for bug #137886. r=ccarlen,sr=bienvenu,a=putterman,mcarlson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119906 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:31:59 +00:00
darin%netscape.com
2e507a2491 fixes bug 139202 "should not send extra FTP commands"
patch=brade, r=mstoltz, sr=alecf,darin


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119905 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:30:25 +00:00
peterlubczynski%netscape.com
17d4973104 Fixing last checkin so it matches what's in the trunk (and doesn't crash on startup)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119891 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 22:36:58 +00:00
morse%netscape.com
8da15e1c80 bug 123633, prefs not written on shutdown, r=sgehani, sr=jag, a=rjesup@wgate.com, adt=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119888 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 22:34:32 +00:00
brendan%mozilla.org
19e0851b35 Handle wraparound of PRIntervalTime, plus crucial fixes thanks to Ere Maijala <ere@atp.fi> (138791, r=rjesup, sr=waterson, a=blizzard).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119882 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:59:36 +00:00
heikki%netscape.com
3106d5e24d Bug 129607, do not try to parse when data in not XML. This improves performance and also fixes a hang if the data is HTML that has inline style elements. r=harishd, sr=vidur, a=rjesup@wgate.com,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119881 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:41:26 +00:00
pinkerton%netscape.com
ff9eb3391c oops, missing a {
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119879 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:35:14 +00:00
pinkerton%netscape.com
ee124649b2 package download progress on mac for embedding. fix jar manifest to not pull en-unix on every platform. r=bryner/sr=ben/a=rjesup. bug#134523
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119867 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:09:37 +00:00
mkaply%us.ibm.com
902cd5e269 #125076
r=mkaply, sr=blizzard, a=roc+moz
OS/2 only - from Jessica Blanco - different way to allocate printer data to fix crash/hang on some drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119864 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:04:59 +00:00
mkaply%us.ibm.com
40e5a9d113 #139852
r=mkaply, sr=blizzard, a=roc+moz
OS/2 only - from Javier Pedemonte - implement ConstrainPosition


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119862 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:03:12 +00:00
mkaply%us.ibm.com
8df34cd68e #139219
r=pedemont, sr=blizzard, a=roc+moz
OS/2 only - handle zorder event


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119861 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:00:24 +00:00
dbragg%netscape.com
8e808c44ee Missed checking in these files when I fixed bug 126785. Opened as bug 138740. r=tao, sr=scc, a=rjesup@wgate.com
adt approved.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119860 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 20:58:57 +00:00
mkaply%us.ibm.com
cfcaa9c909 #138728
r=pedemont, sr=blizzard, a=roc+moz
OS/2 only - convert filtername to platform specific charset


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119859 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 20:57:48 +00:00
peterlubczynski%netscape.com
4023b25ccc adding missed file
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119828 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 15:11:45 +00:00
peterlubczynski%netscape.com
168b044abc Fixing crash with default plugin, r=av, sr=waterson, bug 139529 a=chofmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119827 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 14:25:24 +00:00
peterlubczynski%netscape.com
01a5f01e3f Implementing BP_GetSupportedMIMETypes and NP_GetMIMEDescription on Mac to get MPEGs to work with Quicktime, bug 113464 r=bnesse sr=beard a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119826 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 14:23:26 +00:00
pinkerton%netscape.com
93cb40a1c2 Second attempt to fix bug 137295; gaps appearing in images on Mac OS X. Changed to not pass in the clipRgn when we're drawing to another image (e.g. animated GIFs), or another non-window destination where we don't want to clip. r=pink, sr=beard. a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119825 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 14:15:33 +00:00
pete.zha%sun.com
e33240dbef bug 92491:press letters to select item in XUL menu, menulist
r=aaronl sr=hyatt a=shaver
Check in for Kyle Yuan's(kyle.yuan@sun.com) fix


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119821 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 10:44:07 +00:00
sspitzer%netscape.com
5c8009f90e fix for #124208. Address Book window shows LDAP directories from previous Profile in turbo mode.
r=bienvenu, sr=mscott.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119815 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 05:37:13 +00:00
jj%netscape.com
812bb1716c backing out last checkin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119814 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 05:36:59 +00:00
morse%netscape.com
dd51cc7727 bug 136972, change p3p default settings, r=sgehani, sr=jag, a=rjesup@wgate.com, adt=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119813 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 04:10:50 +00:00
dprice%netscape.com
9b5a6028f2 130428 - r=syd sr=dveditz a=scc adt=putterman
xpis can be triggered from urls with query strings
118216 - r=syd sr=dveditz a=scc adt=putterman
avoid edge case crashes by adding a few error checks


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119812 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 03:47:59 +00:00
mscott%netscape.com
83f74adbed Bug #132731 --> dynamically adjust the width of the alert window to avoid truncation issues. Use the correct
font in the alert.
r=neil
sr=hewitt
a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119808 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 01:44:23 +00:00
sgehani%netscape.com
6d7ba532c9 Use getComplexValue() instead of getLocalizedUnicharPref().
b=139355; r=bryner; sr=alecf; a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119802 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 00:52:18 +00:00
dbaron%fas.harvard.edu
719f6148dd Fix up and enable hierarchical :hover and remove the hacks that made :hover work for anchors without it. Pass mask rather than pseudo-class to ContentStatesChanged notifications. Optimize event state changes in the style system by passing state mask to HasStateDependentStyle and using it in HasStateDependentStyle implementations. b=5693 r=bryner, joki sr=hyatt. Also includes fixes for regressions from original checkin: bug 137556 (r=bryner sr=kin) and bug 137067 (r=bzbarsky sr=waterson). a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119796 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 00:24:49 +00:00
bzbarsky%mit.edu
5d62c3cc6a Fix parsing of content-types. Bug 138639, r=bbaetz, sr=darin, a=scc.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119787 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:54:35 +00:00
cotter%netscape.com
aae80b929a ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. content updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119782 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:39:56 +00:00
rbs%maths.uq.edu.au
c3c7fa242d MathML entries are missing in embedding packages, b=137029, r=adamlock, sr=heikki, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119777 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:13:26 +00:00
kaie%netscape.com
8d102035fa b=134992 Fix crash when displaying some S/Mime messages.
r=javi sr=alecf adt=putterman a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119776 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:10:59 +00:00
kaie%netscape.com
aa91314590 b=139349 Need to use dont_AddRef with GetCertAtIndex
r=bryner sr=alecf adt=putterman a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119775 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:09:55 +00:00
kaie%netscape.com
f1d171d635 b=139325 Leaking CERTCertificate references from
nsNSSCertificate::GetChain
r=bryner/javi sr=alecf adt=jaime a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119774 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:08:17 +00:00
kaie%netscape.com
b3068b50ef b=125607 Temporary workaround for better displaying signed S/Mime messages
w/ attachments from IMAP servers.
r=ducarroz sr=bienvenu adt=putterman a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119773 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:04:33 +00:00
rbs%maths.uq.edu.au
7579ba6446 MathML entries are missing in embedding packages, b=137029, r=adamlock, sr=heikki, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119771 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:02:37 +00:00
mscott%netscape.com
eaa65c0868 Bug #133580 --> make image/tiff attachments show up as external attachments
instead of acting non-existent in the message.
r=ducarroz
sr=bienvenu
a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119770 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:56:42 +00:00
bryner%netscape.com
09e6ecc483 Bug 124304 - make tab/shift+tab cycle through all recipients in the mail compose window (even ones not scrolled into view). r=ben, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119768 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:31:23 +00:00
sicking%bigfoot.com
cbe5acd88b bug 137399: Make removeAttribute work again for html-elements not in main doc-tree
r=glazou sr=jst a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119765 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:14:39 +00:00
mkaply%us.ibm.com
44309b6b69 #124164
r=pedemont, sr=blizzard, a=asa
OS/2 only - remove unnecessary XP_OS2 chunk that tries to fix form element fonts


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119762 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:05:17 +00:00
nhotta%netscape.com
e232ba020c Changed to use a different util function which does not call the converter repeatedly in a loop
in order to workaround the converter problem (bug 138578),
bug 120728, r=ducarroz, sr=sspitzer, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119761 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:56:13 +00:00
mkaply%us.ibm.com
aaf2e134b8 #136958
r=cls, a=scc
OS/2 only - remove high performance timer code - switch to OS millisecond timers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119760 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:55:38 +00:00
nhotta%netscape.com
29c0a861b1 Added out argument for NS_MsgStripRE to avoid altering the const argument,
bug 131983, r=ducarroz, sr=bienvenu, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119759 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:54:13 +00:00
brade%netscape.com
699a315d5e fix double-click bug (clicking twice quickly in scrollbar invokes properties dialogs); bug 134503, r=akkana, sr=kin, a=scc, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119750 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:32:12 +00:00
shanjian%netscape.com
6e2c371544 #115114 autodetect universal detects french as Central European (ISO-8859-2)
removing latin2 and win1250 prober to prevent latin1 confusion.
r=ftang, sr=scc, a=rjesup, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119745 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:16:26 +00:00
varga%utcru.sk
6c1e42594e Fix for bug 135764 - mozilla crashes in DOM Inspector - Trunk [@ nsTreeBodyFrame::SetBounds]
r=bryner, sr=ben, a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119744 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:05:32 +00:00
jfrancis%netscape.com
45b43ac004 branch landing of fix for bugzilla 135337: adt=jaime, a=shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119743 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:04:17 +00:00
blizzard%redhat.com
b502b8efc1 Bug #81779 . Mozilla crashes if you higlight and repeatedly drag text. Return if the source data items aren't available. r=rjesup,sr=shaver,a=shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119742 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:03:46 +00:00
cltbld%netscape.com
52bc62de79 bugscape bug 13170: updated 'vers' to 2 - kysmith checking in as cltbld
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119737 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 20:24:15 +00:00
cotter%netscape.com
7beecd0046 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. cert updates, help on help
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119691 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 05:55:48 +00:00
(no author)
959f48bb82 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119689 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 05:52:06 +00:00
saari%netscape.com
9392bde1e3 fix for bugzilla 135226. Slight modification of previous patch to disable image optimization to DDBs when displaying on a paletted device. This isn't the ideal solution, but it is what I'm going with for the moment to deal with the embedding pull tomorrow morning.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119687 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 04:53:42 +00:00
shanjian%netscape.com
d4bc26bd24 #138002 nsParser should not accept charset notification coming from low priority source
check existing charset source and send notification only when existing charset source is
lower than meta charset.
r=ftang, sr=jst, a=shaver, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119663 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 00:49:38 +00:00
locka%iol.ie
aa4c21982b Add missing nssckbi library to embedding manifests. b=134034 r=kaie@netscape.com sr=rpotts@netscape.com a=putterman@netscape.com a=valeski@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119641 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 22:51:46 +00:00
suresh%netscape.com
9820819552 fix for 138231. select a tab if the last selected one is not in view. r=suresh, sr=alecf.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119636 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 22:27:08 +00:00
dougt%netscape.com
880f61a67c PAC instantiation hangs Regxpcom Solaris nightly build packaging process. Fixing timer logic. Patch by Kenneth Herron. r=dougt@netscape.com, sr=brendan@mozilla.org, a=rjesup@wgate.com , b=106009
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119633 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:32:33 +00:00
dougt%netscape.com
521e7835df Fix for 139512. GPF During Installation in Regxpcom during install. patch by jband, r=dougt, sr=shaver, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119632 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:19:39 +00:00
mkaply%us.ibm.com
c5bd386711 #100676
r=pedemont,cls (makefile), sr=alecf, a=shaver
OS/2 only - remove dependency on uconv for filename conversions


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119631 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:11:47 +00:00
bzbarsky%mit.edu
e85e0624e7 Fix cloneNode() to properly copy the "style" attr as an object, not a
string.  Bug 137428, r=fabian, sr=jst, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119630 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:08:11 +00:00
bzbarsky%mit.edu
9821e88608 Fix crash on copying string with embedded nulls. Bug 136278, r=brade,
sr=kin, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119629 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:05:38 +00:00
mkaply%us.ibm.com
b4b60272e8 #100676
r=pedemont,cls (makefile), sr=alecf, a=shaver
OS/2 only - remove dependency on uconv for filename conversions


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119628 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:04:20 +00:00
varada%netscape.com
fc89f1262e fix for 136937- mail compose body becomes uneditable after send failure;r=srilatha;sr=mscott;a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119627 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:01:59 +00:00
mkaply%us.ibm.com
3e5989752f #124164
r=mkaply, sr=blizzard, a=shaver
OS/2 only - code from Javier Pedemonte to properly set font heights


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119626 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:01:28 +00:00
cavin%netscape.com
a40574c03f Fix for 134897. Reset 'mInitialized' and 'm_initialized' for imap so that the folder obj will be re-initialized for new profiles. Also reset 'mPath' and 'm_pathName' for imap so that it points to the right physical location for the new profile (instead of carrying over from previous profile). r=bienvenu, sr=sspitzer, a=asa, adt=putterman.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119625 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 20:55:20 +00:00
brade%netscape.com
f6cf35ca4e remove FontManager (moved to gfxComponent.xml) so it can be weak linked (bug 138495); r=ccarlen, pinkerton, sr=sfraser, a=rjesup, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119611 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 13:23:15 +00:00
brade%netscape.com
33244035e4 add fontmanager library (bug 138495) r=ccarlen, pinkerton, sr=sfraser, a=rjesup, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119610 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 13:06:05 +00:00
peterv%netscape.com
1071f10c04 Fix for bug 135895 (XHTML <style> element not working). r=sicking, sr=jst, a=asa, adt1.0.0+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119607 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 12:37:17 +00:00
darin%netscape.com
e6328bd509 fixes bug 136216 "[viewpoint] GetURL fails on https file when the file is
partially in the browser's memory cache" r=serge, sr=rpotts, a=asa, ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119602 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 05:47:43 +00:00
naving%netscape.com
d86149a289 134291 r=mscott sr=bienvenu a=rjesup. Make migration work for 2nd profile w/ imap acct in turbo mode.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119586 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 00:57:41 +00:00
rdayal%netscape.com
14eda85230 Fix for leaks by each entry retrieved during any LDAP search, bug # 134069
r=dmose, sr=sspitzer, a=roc+moz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119580 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 00:02:44 +00:00
srilatha%netscape.com
57e6b9c547 Fix for bug #134947. Import text dialog unusable,
r=varada, sr=sspitzer, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119579 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 23:57:55 +00:00
bzbarsky%mit.edu
82d1070192 Inspector shows wrong list of style rules for table elements. Bug
122557, r=caillon, sr=hewitt, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119577 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 23:51:23 +00:00
rdayal%netscape.com
c0392aee23 fix for MAPI Send of file with non English filenames, bug # 103313
r=nhotta, sr=mscott, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119565 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 22:30:40 +00:00
ducarroz%netscape.com
02822617db Fix for bug 136008. Do not cache the compose window if it's the last window else that will prevent the application to shutdown. Patch submitted by antonio.xu@sun.com. R=ducarroz, SR=bienvenu, A=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119563 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 20:58:35 +00:00
ducarroz%netscape.com
172fc515a3 Fix for bug 134729. Remove cols attibute passed down when user press the delete key and instead add a function to calculate the number of columns. R=varada,shuehan SR=sspitzer, A= rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119559 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 20:37:09 +00:00
jdunn%netscape.com
eac3008773 adding a newline (HP requires them)
r=cls@seawood.org
a=asasaki@netscape.com
# 139191


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119550 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 17:04:18 +00:00
kaie%netscape.com
52cca6ed36 b=137154 PSM needs to call SSL_ClearSessionCache before switching profiles
r=wtc/javi sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119541 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 13:55:32 +00:00
brade%netscape.com
02f579ce4a show error when unable to publish (such as being unable to create a uri) bug 126258; r=cmanske, sr=kin, a=asa, adt=jaime
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119537 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 13:08:35 +00:00
rods%netscape.com
9ed956dcca Cache the Zoom and TextZoom for the main DC while in Print Preview and then set
it back when leaving Print Preview
Bug 136785 r=dcone sr=attinasi adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119536 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 12:18:39 +00:00
blakeross%telocity.com
96d8a8ece0 105547 - remove pref to control where new windows open (tab or window). r=bryner sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119533 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 03:13:11 +00:00
blakeross%telocity.com
bf9337f3d8 105547 - windows open in new window instead of tabs (remove pref for now). r=bryner sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119531 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 03:08:12 +00:00
naving%netscape.com
4ce66d0295 22994 r=morse sr=dveditz sspitzer a=asa Add support for blocking cookies in mailnews by default. Used an overlay to add this new checkbox that gets the value from disableCookieForMailNews pref
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119530 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 01:46:26 +00:00
naving%netscape.com
5b7d330067 137008 r=bienvenu sr=mscott a=asa. Make redo delete messages work for quick search results when folder was in
threaded view.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119529 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 01:33:36 +00:00
sicking%bigfoot.com
9c4bd18276 Bug 132302: Throw right exceptions for DOM Ranges.
r=Pike, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119520 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-21 18:01:15 +00:00
cbiesinger%web.de
36ca27b46a bug 136402 patch by neil.marshall@sympatico.ca r=db48x sr=alecf a=asa
Case of first letter in text labels is sometimes wrong in the Media tab


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119499 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 18:12:00 +00:00
caillon%returnzero.com
998811395f Page info shouldn't open cache items in blocking mode. Fixes Bug 124566, 'View Page Info whilst this page loading hangs browser.' Patch by db48x@yahoo.com, r=caillon, sr=darin, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119492 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 14:48:47 +00:00
caillon%returnzero.com
e7acea9915 Bug 137297. Alphabetize computed style's queryableProperties list. r=bzbarsky, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119491 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 14:40:32 +00:00
jfrancis%netscape.com
65d1906f81 branch landing of 136944: crash in editor when typing.
a=asa; adt=Jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119489 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 14:14:01 +00:00
hwaara%chello.se
fce95b6677 #128527, "disabling a radiobutton doesn't disable the text"
r=andreww, sr=hewitt, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119488 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 13:12:40 +00:00
rods%netscape.com
2ec240eb5c This displays a focus ring when the listbox has focus for HTML listboxes (NOT XBL listboxes)
The idea is that when the SelectAreaFrame (which is the parent) of the options
is asked to paint then it asks the ListControlframe to paint the focus ring in
the correct spot. It need to find the first non-disabled option (ignoring opt
groups) and if nothing is selected it need to find the first frame which is the
dummy option. Also, it now track thru a static data member which listControl
frame currently has focus (this was taking from how comboboxes track it internally)
Bug 64165 r=jkeiser sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119486 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 12:29:40 +00:00
mscott%netscape.com
21202829f3 Bug #133130 --> fix a race condition that caused the notification icon
to never go away.

Bug #135753 --> figure out the folder to select when the user clicks on the
animated alert to ensure that we select the right folder.

Bug #123104 --> fix an inaccuracy in the new mail count. Always reset to 0
if we discover we have no new mail even if the state has already been changed
that way.

r=naving, sr=bienvenu/sspitzer
a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119471 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 03:11:20 +00:00
oeschger%netscape.com
df8ed489af adding image to help, author=robinf, r=oeschger, dispensation for regular updates per 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119447 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 01:22:41 +00:00
harishd%netscape.com
759cc84ac4 Prevent charset loading for document.write content because it's already in unicode. b=125317, r=ftang, sr=jst, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119439 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 23:24:07 +00:00
heikki%netscape.com
5e7aa6a1c8 Bug 137632, going back and forward in history does not scroll back to anchor location nor does it select the anchor (if pref set). r=radha, sr=jst, a=rjesup,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119436 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 23:13:15 +00:00
(no author)
943efc9e9f This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119426 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 22:25:24 +00:00
bzbarsky%mit.edu
b7b3e572b6 Make the "Close" menuitem and shortcut work in Inspector. Bug 128663,
r=hwaara, sr=hewitt, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119424 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 22:24:45 +00:00
ftang%netscape.com
2b12789fbf fix bug 131837 r=nhotta sr=kin. fix simp chinese to unicode mapping table for se
veral sites
carry from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119423 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:58:18 +00:00
mkaply%us.ibm.com
aaa9ecf79b #137693
r=mkaply, sr=blizzard, a=rjesup@wgate.com
OS/2 only - workaround for MINCHO font bug


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119422 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:57:22 +00:00
nhotta%netscape.com
9ac4527500 Use ISO-8859-1 as a compose charset if us-ascii, change for edit as new,
bug 136938, r=ducarroz, sr=kin, a=asa, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119419 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:37:36 +00:00
harishd%netscape.com
d9d21ee90f Initialize token allocator, in the BuildMode(), regardless of whether a sink is available or not. b=137644, r=heikki, sr=jst, a=adt,asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119418 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:09:20 +00:00
harishd%netscape.com
0068546bf3 Fixed a crash by making sure that the CNavDTD and nsHTMLContentSink stacjs are synchronized when handling FORM. b=133410, r=heikki, sr=jst, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119417 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:00:14 +00:00
peterlubczynski%netscape.com
0d8ecd0d21 Fixing smoketest blocker bug 138500 r=av sr=jag a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119410 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 18:18:58 +00:00
cbiesinger%web.de
a41a9d2a9e bug 138475 r=bbaetz sr=darin a=asa
data: protocol doesn't unescape its uri string
also fixes bug where data: urls w/o mimetype didn't work (e.g. data:,foobar)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119404 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 15:16:41 +00:00
varada%netscape.com
39b506ab01 fix for 58506;smtp panel doesnt get refreshed when creating a new default smtp server;r=srilatha;sr=mscott;a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119401 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 14:22:54 +00:00
kin%netscape.com
bd004663da Fix for bug 106489 (Text entered in box does not appear)
- Moved MoveChildrenTo() and GetRealFrame() to a point in the
  file where they could be called from my new utility method
  AdjustOutOfFlowFrameParentPtrs().

- Modified MoveChildrenTo() to take an nsFrameConstructorState arg,
  so that it can call my new method AdjustOutOfFlowFrameParentPtrs()
  so that out-of-flow floater frames are reparented to the correct
  containing block when the placeholder is moved under the block
  created in ConstructInline().

r=attinasi@netscape.com  sr=waterson@netscape.com
adt=jaimejr@netscape.com  a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119395 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 13:37:35 +00:00
kin%netscape.com
6ee8dd438a Fix for bug 68331 (Moving caret in TEXTAREA to start of line can cause page to scroll horizontally)
- Modified GetSelectionRegionRectAndScrollableView() to clip
  aRect so that it is completely within the bounds of the
  scrolledView. This insures that other scrolled views in
  the parent hierarchy will not scroll more than they have to.

r=brade@netscape.com  sr=sfraser@netscape.com
adt=jaimejr@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119394 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 13:36:31 +00:00
sicking%bigfoot.com
a8674b4e10 Bug 132300. A better way to bootstrap XPathEvaluator by following the specs recommendation and making documents implement the interface.
r=pike sr=jst a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119393 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 13:26:19 +00:00
rjc%netscape.com
31f63c43ed Fix adt1.0.0+ bug #132493 on MOZILLA_1_0_0_BRANCH (already on tip): Mac OS X multiple sheets issue. r=pink sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119390 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 10:29:16 +00:00
mjudge%netscape.com
4eb038a1c4 82151 fix for caret jumping in text areas from beginning to end. adt+ a+ ect QA tested on Trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119388 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 10:09:17 +00:00
mjudge%netscape.com
094f94cb44 adt+ and a+ 82151. fix to stop caret from jumping to beginning or ending of text area.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119387 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 10:08:18 +00:00
rpotts%netscape.com
82b127ba0b bug #105253 (r=peterl, sr=jst, a=adt) plugin streams are not added to the loadgroup...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119385 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 08:24:08 +00:00
gerv%gerv.net
93d7608437 Bug 3935 - mozilla-native psuedo classes and properties should be marked as such. This fixes a number of them; still a few more to do. Patch by gerv, r=dbaron, sr=jst, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119384 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 08:07:11 +00:00
cotter%netscape.com
efe7a90161 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. uprivacy feature updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119383 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:51:30 +00:00
shliang%netscape.com
3c852822ad 135975 - theme preview images are outdated - images by gregvalure@yahoo.com - r=andreww, sr=hewitt, a=jesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119381 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:38:23 +00:00
shliang%netscape.com
195ec35e03 134801 - account manager panels out of order - r=bhuvan,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119380 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:22:44 +00:00
shliang%netscape.com
ffc3fedbde 133863 - plugin finder service pref ui - r=hewitt, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119377 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:15:03 +00:00
rdayal%netscape.com
70903d0a21 Fix for MAPI send to work without causing any hang of the calling MAPI apps.
bug # 129347.
r=ducarroz, sr=mscott, a=asa.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119376 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:11:28 +00:00
jefft%netscape.com
ce8692fe97 fixed bug 133437 - Pop acnts:Sent Copy of MDN Request messages should have MSG_FLAG_MDN_REPORT_NEEDED turned off, r=ducarroz, sr=bienvenu, a=jaimejr; bug 136476 - MDN:If you filter mesgs and receive a mesg that is requesting RR, you are prompted to send the RR before you actually click on the mesg; r=bienvenu,sr=sspitzer,a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119373 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:42:12 +00:00
sfraser%netscape.com
a41718dcc7 Fix for bug 127362 -- incremental scrolling gets slower and slower. Make sure that we shift window->visRgn to the correct coordinates before doing region math, and ensure that HandleUpdateEvent() leaves the port in the way that it found it. r=pinkerton, sr=beard. a=asa for branch checkin.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119372 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:30:57 +00:00
srilatha%netscape.com
133c46acb5 Part of fix for bug# 134947. Import Text Dialog unusable
r=varada, sr=sspitzer, a=jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119371 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:29:15 +00:00
racham%netscape.com
a7ee21f18d Fixing bug 137876. This fixes a typo in the function call so that ISPs can execute customized routines at the end of mailnews account creation process. r=andreww, sr=sspitzer, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119370 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:20:34 +00:00
racham%netscape.com
ea39f306d9 Fixing bug 131330. This fix allows ISPs to customize wizard pages with desired style rules example being setting customized images for page header. r=andreww, sr=sspitzer, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119369 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:14:52 +00:00
mjudge%netscape.com
c71efb01ce 103888 adt approved. QA tested on trunk. fix for typing and having characters end up at end of inline style block after a <BR>
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119368 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:09:17 +00:00
danm%netscape.com
e0a60c50f5 make blur() available to embedded apps. bug 57841 in its third avatar r=jst,scc a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119367 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:06:36 +00:00
bbaetz%student.usyd.edu.au
efec05ce41 Bug 134270 - ftp password displayed in page heading
r=dougt, sr=darin, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119365 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:02:42 +00:00
mjudge%netscape.com
b5d53cbfd1 102220 r=jfrancis sr=kin QA approved on trunk. fix forup down situation with typing and shift selecting.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119364 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:55:23 +00:00
heikki%netscape.com
07e496302c Bug 136788, XML pages do not display when going back and forward in history. Patch from peterv, r=jst, sr=heikki, a=asa,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119363 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:49:32 +00:00
srilatha%netscape.com
329777865b Fix for bug # 129708. Multibyte baseDN gets garbled in Directory Server Properties dialog
r=ducarroz, sr=sspitzer, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119362 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:48:04 +00:00
joki%netscape.com
bde5680d10 Fix for bug 93111, fix event targetting in tables over rowspans and empty cells by making rows and cols invalid targets (forcing targetting of cells or the table itself). r:dbaron, sr:jst, a:asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119361 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:47:38 +00:00
bnesse%netscape.com
60f04d9ed1 Fix for bug 123787. Insure gRoot is allocated before attempting to free it. r=sfraser, sr=alecf, a=valeski, adt=paw.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119360 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:46:07 +00:00
joki%netscape.com
a44296e6f4 Fix for bug 128676, Have focus events sent directly to their widgets since using coord targeting can now be inaccurate. r:roc+moz, sr:jst, a:asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119359 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:42:27 +00:00
joki%netscape.com
4fd072f9b3 Fix for bug 135345, stop infinite recursion caused when calling select() from inside a focus event handler. r:jkeiser, sr:jst, a:asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119358 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:38:29 +00:00
mjudge%netscape.com
02d6beada3 7868 QA checked it out on trunk. fx will allow a QI to nsISelectionDisplay of nsPresShell and a GetInterface of nsISelectionDisplay on the webbrowser.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119357 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:33:39 +00:00
jkeiser%netscape.com
cf4ae53af2 rods's patch to move print properties to global dialog for embedding (bug 138026), r=dcone@netscape.com, sr=attinasi@netscape.com, a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119356 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 04:46:29 +00:00
timeless%mac.com
c5bcf9cb2d Bug 136910ÿldap build bustage on QNX
r=dmose r=cls a=asa (for build bustage checkin and on behalf of drivers)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119299 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-18 21:32:36 +00:00
dougt%netscape.com
31012ea782 Fixing 138080 on the branch. a=leaf@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119272 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-18 16:17:29 +00:00
kaie%netscape.com
3045303bda b=119418 Fix handling of opaque signed S/Mime messages.
Also fixes some other S/Mime issues, as described in the bug.
r=ddrinan/ducarroz/darin sr=alecf a=rjesup
Fixing bustage, approval for checkin to the closed tree from asasaki


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119238 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 17:21:14 +00:00
dougt%netscape.com
664f7b6ba9 Backing out pavlov's changes. Note to self: never check in other people's code.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119237 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 16:23:35 +00:00
peterlubczynski%netscape.com
ae1c53e386 Fixing bustage in REQUIRES line for Windows gmake builds
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119236 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 16:07:09 +00:00
caillon%returnzero.com
0b3bab9d61 Make WidgetStateManager also remember the .checked property for <listitem type="checkbox"/>. This fixes bug 134441, Scripts & Windows pref panel doesn't remember checkboxes on viewing it the second time. r=hewitt, sr=ben
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119234 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:46:21 +00:00
peterlubczynski%netscape.com
7234c2c8d4 Fix for hidden attribute not working correctly on EMBED tag, bug 136456 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119232 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:32:27 +00:00
kaie%netscape.com
a86b530963 b=119418 Fix handling of opaque signed S/Mime messages.
Also fixes some other S/Mime issues, as described in the bug.
r=ddrinan/ducarroz/darin sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119230 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:24:53 +00:00
caillon%returnzero.com
7798a03d15 Bug 137103, Remove a duplicate pref that slipped in with the fix for 117707. Thanks to jonasj@jonasj.dk for noticing this and providing the patch. r=caillon sr=tor a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119229 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:17:31 +00:00
pinkerton%netscape.com
bc50d32b62 package xul security dialogs in embedding. also add appcomps to embed to get session history. r=ccarlen/sr=alecf/a=rjesup. bug# 135211
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119227 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:11:36 +00:00
peterlubczynski%netscape.com
8fa83f72eb Changes for plugin finder service, bug 133864, r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119225 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:07:10 +00:00
pinkerton%netscape.com
c27c3fcdcc fixes to make tabs look much nicer in dialogs. r=pink/sr=hyatt. bug# 134447
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119223 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 13:51:35 +00:00
karnaze%netscape.com
735a2536da bug 125543 - Row groups are prevented from splitting in the reflow preceeding the special height reflow. Cells are only notified that they should observe a percent height element if the element is inside the table's cell. Percent height elements inside the body will have a height based on the page height when printing. a=asa, adt=paw, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119222 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 13:01:22 +00:00
rods%netscape.com
f24f902979 Add a new attr to PrintObject for identifying POs that are to be hidden, not
reflowed. So if a frameset frame's root frame is zero height then we mark it
hidden and not to be printed.
Bug 134769 r=dcone sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119221 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 12:37:04 +00:00
heikki%netscape.com
64dd27f57c Bug 128541, make send(null) work again, and make us match IE6 more closely regarding the parameters we accept. r=harishd, sr=jst, a=rjesup,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119214 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 06:33:57 +00:00
heikki%netscape.com
33ecf1d294 Bug 128326, disable save as complete for XML because of serious dataloss bugs. r=bzbarsky, sr=blake, a=asa,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119213 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 06:29:44 +00:00
shanjian%netscape.com
918dad7488 #128154 Crash: opening non-ascii attachments
replace default "default char" from '?' to '_'. The former one is not
acceptable in windows filename.
r=ftang, sr=alecf, a=asa, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119212 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 06:01:51 +00:00
dprice%netscape.com
0d3b70b536 1364967 r=jfrancis sr=dveditz a=rjesup adt=putterman
add xpicleanup to carbon builds


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119208 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 04:57:35 +00:00
cotter%netscape.com
6ebf49f699 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; minor fix for smime help.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119207 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 04:52:07 +00:00
jst%netscape.com
b1df11336d Checking in jeff.qiu@sun.com's fix for bug 77585. Speeding up AppendData() on nsGenericDOMDataNode, this speeds up loading of long text documents. r=cbiesinger@web.de, sr=jst@netscape.com, a=rjesup@wgate.com.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119186 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 00:26:53 +00:00
ccarlen%netscape.com
6497384abd Bug 136311 - Can't install on 8.6 because MSL is using functions not available there. Set the compile flags so we don't use HFS. r=brade/sr=sfraser/a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119180 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 00:07:01 +00:00
jaggernaut%netscape.com
af6d4e6058 Bug 121841: <!ENTITY> hangs 0.9.8 and trunk using 100% CPU. r=bryner, sr=scc, a=scc, a=adt, approval from leaf and asa to check into closed tree.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119179 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 00:02:33 +00:00
rods%netscape.com
d0ddeb0ea7 backing out unwanted check in
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119164 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 22:39:07 +00:00
sspitzer%netscape.com
177c560d03 temporary fix for #130581. the cached compose window has issues on linux, if your
focus model is "focus follows mouse".  Until we figure that out (see #137698),
we need to disable this performance trick on unix.
APPROVED FOR THE CLOSED 1.0 BRANCH.
r/sr=bienvenu, a=asa,leaf, adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119163 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 22:36:43 +00:00
rods%netscape.com
b5137cca5b Add a new attr to PrintObject for identifying POs that are to be hidden, not
reflowed. So if a frameset frame's root frame is zero height then we mark it
hidden and not to be printed.
Bug 134769 r=dcone sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119152 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 22:04:47 +00:00
brade%netscape.com
5b4d8f10d0 back out changes that were inadvertently checked in with previous revision (a=asa, a=leaf) bug 137790
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119146 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 21:04:40 +00:00
waterson%netscape.com
15861e0899 Bug 137378. Stop ancestor frame notification at a frame that is an NS_FRAME_REFLOW_ROOT. r=karnaze, sr=kin, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119143 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 20:56:18 +00:00
dougt%netscape.com
459491e786 Landing the better part of 129953 and in the process fixing a smoketest blocker. a=leaf
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119142 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 20:55:29 +00:00
andreww%netscape.com
a25e0f514e bug 128895 removing aqua button appearance to throbber in osx , r=shliang, sr=sfraser, adt=jaimejr a=asa and a=asa+leaf on checking this into closed tree.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119139 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 20:04:11 +00:00
mkaply%us.ibm.com
c5eb29c591 OS/2 bustage
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119134 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 19:22:46 +00:00
(no author)
5551933833 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119132 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 19:09:58 +00:00
jj%netscape.com
6f7df30dbe #134227: Updated Mozilla installer strings to 1.0.0 (branch). r=leaf, sr=granrose, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119113 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 17:41:03 +00:00
jj%netscape.com
c7bae18605 #134223: udpating Finder's Get Info strings to 1.0 for OS9 and OSX. r=asaki, sr=granrose, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119112 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 17:29:13 +00:00
kaie%netscape.com
cbac461555 b=118319 Fix memory leak.
r=javi/wtc sr=blizzard a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119107 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 14:16:13 +00:00
kaie%netscape.com
e7af3755e5 b=136908 Make CRL manager UI work again.
r=kaie sr=ben a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119105 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 14:11:27 +00:00
bbaetz%student.usyd.edu.au
cf1554a393 Bug 129420 - mailto: urls not working with PAC
r=dougt, sr=darin, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119092 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 07:44:10 +00:00
ftang%netscape.com
45fcc528e6 carry ccarlen's mac os 9 trunk bustage fix to branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119085 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 06:33:34 +00:00
jaggernaut%netscape.com
6fb703b7e6 Bug 128965: Better icons for components, images by Andreas Premstaller <andreas.premstaller@uibk.ac.at>, r=marlon, sr=jag, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119081 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 05:45:34 +00:00
dprice%netscape.com
c90c704127 123649 r=mjudge sr=dveditz a=rjesup adt=putterman
crasher fix landing on branch


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119079 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 05:19:17 +00:00
dougt%netscape.com
bc2f5778ac I am with Alec. I really hate the mac build system.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119077 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 04:55:48 +00:00
dougt%netscape.com
5820b9d970 xpcom initalization of event queue. r=brendan@mozilla.org, sr=darin@netscape.com, a=asa@mozilla.org, 135531
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119068 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 04:03:48 +00:00
rbs%maths.uq.edu.au
26432dcb35 dataloss, SaveAs leaves private [-|_moz] attributes in the output, b=134298, r=akkana, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119063 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:22:31 +00:00
dougt%netscape.com
a060ea6240 xpcom initalization of event queue. r=brendan@mozilla.org, sr=darin@netscape.com, a=asa@mozilla.org, 135531
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119060 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:07:13 +00:00
dougt%netscape.com
fdfe478178 Addresses threadsafe of native loader. 98755, r=waterson, sr=jband, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119059 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:02:40 +00:00
dougt%netscape.com
cea9c992fa Fixes shutdown crash [@PR_EnterMonitor] called with a deleted monitor on the MemoryFlusher thread. 135330, r=brendan@mozilla.org, sr=jband@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119058 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:00:04 +00:00
dougt%netscape.com
e510dfda65 Landing 129953 for pavlov@netscape.com. r=rjesup@wgate.com, sr=rpotts@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119057 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:52:49 +00:00
leaf%mozilla.org
3349bf4f6c bug 136673. version mozilla.exe. code from asasaki@netscape.com, r=cls, sr=leaf
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119053 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:18:12 +00:00
mkaply%us.ibm.com
50de85c1f1 #59403
r=pedemont, sr=blizzard, a=asa
OS/2 only - beginning of drag/drop


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119052 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:17:11 +00:00
mkaply%us.ibm.com
f5acf31b44 #135795
r=cls, a=asa
Disable mkdepend on OS/2 for now


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119051 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:14:20 +00:00
varga%utcru.sk
9a5c5ad50c Fix for bug 137178 - Outliner tree expanded by default, should not be.
- prevent insertions to closed containers
r=sgehani/varga, sr=hewitt, patch=sgehani,varga, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119048 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 01:15:28 +00:00
morse%netscape.com
bd887d65a7 bug 137551, form manager stopped working, sr=scc, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119046 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 01:08:12 +00:00
shliang%netscape.com
dfc2a9baa4 137211 - change Netcenter reference in absync to Netscape.com. r=ssu,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119043 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:15:25 +00:00
smontagu%netscape.com
785b3a8b97 (Checkin for Roland.Mainz@informatik.med.uni-giessen.de). Bug 127520 "Large pictures print corrupted", r=db48x, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119040 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:11:08 +00:00
ftang%netscape.com
e089b55ded fix bug 110726. r=ccarlen sr=sfraser a=asa
install Carbon Input Text event handler for embedding project
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119039 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:10:02 +00:00
ftang%netscape.com
56eaff5f89 fix bug 110726. add imlementation of Carbone Text Event handler forwarding code to CBrowserShell
r=ccarlen sr=sfraser a=asa
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119036 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:08:10 +00:00
ftang%netscape.com
b1b0b5e26f add CTextInputEventHandling.cpp to the project
fix bug 110726. r=ccarlen sr=sfraser a=asa
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119035 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:05:43 +00:00
ftang%netscape.com
5f9959cb6a fix bug 110726. r=ccarlen sr=sfraser a=asa
from trunk. add implementation to deal with Carboneevnt for input method


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119034 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:04:11 +00:00
ftang%netscape.com
d0d165e336 fix bug 110726. add CTextInputEventHandler.h
r=ccarlen sr=sfraser a=asa
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119033 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:03:25 +00:00
attinasi%netscape.com
673fac74ae Migrating patch from trunk to branch: prevent crash by clearing undisplayed map when style sheet is added. b=118014 r=dbaron sr=kin a=asa and jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119032 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:03:15 +00:00
ftang%netscape.com
849a03fcf4 fix bug 110726. impelement nsIMacTextInputEventSink on nsMacWindow
to fix embedding input method
r=ccarlen sr=sfraser a=asa
carry from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119030 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:01:01 +00:00
dcone%netscape.com
43b89a87c3 b=121230 r=kmcclusk sr=attinasi a=tor. ADT+ approved. Fix PNG rendering.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119029 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:00:01 +00:00
ftang%netscape.com
2b462d89ac add nsIMacTextInputEventSink.idl to the widetIDL. move from trunk
fix bug 110726. r=ccarlen sr=sfraser a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119028 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:58:56 +00:00
ftang%netscape.com
7f02e46de6 add this from trunk
fix bug 110726 r=ccarlen sr=sfraser a=asa
add idl for mac input method.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119026 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:56:53 +00:00
leaf%mozilla.org
6ea3a5d455 bugs 133794 and 135585, update release notes urls, fix about: page user-agent
printing. reviews/approvals noted in bugs.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119023 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:50:17 +00:00
(no author)
6fd3021383 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119022 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:49:30 +00:00
harishd%netscape.com
75ffa9f160 Fix js line numbers in html documents. b=111576, r=heikki, sr=jst a=asa,scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119016 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:44:48 +00:00
brade%netscape.com
ae776da105 bug 135862, use correct strings for new composer window (submitted by cmanske, r=brade, sr=kin, a=rjesup, adt=jaime, l10n=rchen)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118985 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 14:42:09 +00:00
brade%netscape.com
add60686df bug 75898 (force platform overlays during jar process) r=pinkerton, sr=sfraser, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118984 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 14:28:32 +00:00
brade%netscape.com
318c4d4e32 remove Composer's debug menu (bug 83349, r=rcassubm cmanske, sr=sfraser, a=asa, adt=jaime)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118982 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 13:54:24 +00:00
kaie%netscape.com
e93a97fc87 b=119481 Fix various unitialized variables.
r=kaie/javi sr=kin a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118977 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 11:37:58 +00:00
kaie%netscape.com
758b75177d b=129740 Fix client auth with profiles migrated from Communicator.
r=javi sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118976 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 11:34:38 +00:00
kaie%netscape.com
045bea67fd b=132543 Fix crash when downloading CRL
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118975 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 11:32:10 +00:00
jkeiser%netscape.com
d78f3e282e Fix reflow problems for boxes with non-box children (bug 119849), r=hewitt, sr=attinasi, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118972 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 04:54:23 +00:00
dcone%netscape.com
f6400c0959 b=135208 r=kmcclusk, sr=attinasi a=asa adt approved. Fix color printout of light text.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118971 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 04:09:28 +00:00
naving%netscape.com
9507ed70ae 136636 r=bienvenu sr=sspitzer a=rjesup. Do not set m_ownFolderStream to false, StartBatch is called twice here
and would leave the stream open.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118970 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 04:01:50 +00:00
jdunn%netscape.com
358d670381 Use compiler define _AIX instead of user defined AIX4_3 (which isn't set
on AIX5L)
# 133834
r=dmose@netscape.com
a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118952 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-14 11:15:10 +00:00
timeless%mac.com
76ee3df50c Bug 129999 needs ansi-1251 font support in nsFontMetricsGTK/nsFontMetricsXlib
patch by Roland.Mainz@informatik.med.uni-giessen.de r=katakai sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118946 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-14 00:40:26 +00:00
seawood%netscape.com
d37950ff50 Make --srcdir autodetection work with activestate perl
Bug #135589


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118942 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 23:03:00 +00:00
caillon%returnzero.com
a31ba917d3 Bug 133764. Unable to change content pack and language pack at once. Patch by kairo@kairo.at, r=dbragg, sr=alecf, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118941 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 22:49:21 +00:00
dbragg%netscape.com
72cf8919f4 Regular update of localeVersion to 1.0.0 (bug 126785) r=tao, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118932 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 16:22:23 +00:00
dbragg%netscape.com
a533e6f79e Regular update of localeVersion strings to 1.0.0. (bug 126785) r=tao, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118931 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 16:09:05 +00:00
dbaron%fas.harvard.edu
e8755c4945 Fix percentage font sizes when all font properties specified (and not inherited) by weaking (again) optimization of not calling parent's GetStyleData. b=132381 r=hyatt sr=waterson a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118930 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 15:40:31 +00:00
sicking%bigfoot.com
e661aff94e Bug 119317: move the "inherits" attribute to the xbl namespace for most clients.
r=hixie sr=hyatt a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118928 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 15:05:18 +00:00
colin%theblakes.com
11af650b54 Fix busted printing for OpenVMS.
All these changes should be OpenVMS only.
b=136884 r=rods sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118924 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 12:53:28 +00:00
cbiesinger%web.de
7bdf727629 bug 44716 r=pavlov sr=tor a=asa
Mozilla doesn't claim .jfif, .pjpeg, .pjp extensions when checked


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118918 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 09:55:39 +00:00
cotter%netscape.com
804d8b6a74 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; update for edit ciphers section per new UI
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118912 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 05:38:36 +00:00
danm%netscape.com
4699ab09d6 changing the format of the comment describing registerNotification, as requested by depstein. bug 99618
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118902 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:55:13 +00:00
peterlubczynski%netscape.com
a7ec286d93 Stop sending bogus menu events to full-page plugins bug 93895 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118896 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:46:31 +00:00
waterson%netscape.com
10b1eb2d72 Bug 135146. Implement NS_FRAME_REFLOW_ROOT to allow reflows for <textarea> and <input type='text'> to be dispatched from the scroll frame within the nsGfxTextControlFrame2. r=kin, sr=attinasi, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118894 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:36:58 +00:00
yokoyama%netscape.com
f9b23c4cbf Bug 135476
Customize Character coding dialog box doesn't
display charencoding correctly.
Fixing typo in pref-charset.js
/r=ftang;/sr=hewitt;/adt+=paw@netscape.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118892 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:35:57 +00:00
mstoltz%netscape.com
8a360f6c9d Bug 136993 - Put the "trusted codebase principals" feature back in.
r=harishd, sr=jst, a=valeski


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118889 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:15:57 +00:00
cltbld%netscape.com
b3f041a340 Bug# 134225 - Updated milestone string from 0.9.9+ to 1.0.0+ r=asaki, sr/a=leaf. ycalonje checking in as cltbld
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118887 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:54:04 +00:00
jgmyers%netscape.com
f1ccc4dde2 Remove no longer needed forcehandshake code, fixing SSL/IMAP over SOCKS: bug 133434 r=kaie@netscape.com sr=brendan@mozilla.org a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118886 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:35:43 +00:00
leaf%mozilla.org
42d216f822 bug 133794 r/a=blizzard. User agent change for rc1, about: page spell-out of "Release
Candidate 1"


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118885 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:28:12 +00:00
shanjian%netscape.com
9e65ef69a5 #91305 add univerialchardet into unix default extensions list
add universalchardet.so to unix package as well.
r=cls, sr=hewitt, a=rjesup, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118884 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:20:05 +00:00
sspitzer%netscape.com
36cdd5f3ff fix for blocker bug #136874. can't open mail/news window after closing.
r=shuehan, sr=bienvenu.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118881 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 21:16:38 +00:00
ccarlen%netscape.com
d0f31fb261 Fix for blocker bug 136693 - form submission not working dur to unimplemented confirmEx. r=pink/sr=sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118873 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 20:57:32 +00:00
pinkerton%netscape.com
f8e3cddf0a turn off double-buffering on osx with a new method on nsIRenderingContext. r=kmcclusk/sr=sfraser/a=valeski. bug# 78764
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118853 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 13:56:53 +00:00
brade%netscape.com
4604325dfc fix warning (bug 135771) r=akkana; sr=kin; a=asa; adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118845 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 13:00:48 +00:00
brade%netscape.com
34ed215e04 change progress status icons if cancellation of publish, fix SetProgressFinished to handle cases where we don't have a filename (bug 126258 and 135771) r=cmanske, akkana; sr=kin, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118844 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 12:59:36 +00:00
brade%netscape.com
fa5c5eeb7d disable debug output, handle aborted error as a non-error, handle cases where we have a null channel (bugs 135527, 126258, 135771) r=cmanske, akkana; sr=kin, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118843 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 12:57:53 +00:00
kaie%netscape.com
3317bd174a b=128586 Fix restoring certificates
adt=jaimejr a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118842 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 12:56:08 +00:00
caillon%returnzero.com
04958e3f9b Bug 117707. Disabling most of the prefs in Edit>Prefs>Advanced>Scripts/Windows was causing real JS scripts to break because it used CAPS. Move the checks for these features into C++, with new prefs. Patch by doronr@naboonline.com (initial work) and caillon@returnzero.com. r=fabian sr=jst a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118839 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 10:11:39 +00:00
seawood%netscape.com
92ff2b7272 Roll our own version of abs2rel to fix bustage when MOZ_OBJDIR contains ..
Bug #135589 r=kaie a=jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118828 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 04:09:31 +00:00
kmcclusk%netscape.com
58150531b4 Fix off by one pixel scrolling errors running under 96DPI by replacing the damageRect.ScaleRoundOut(p2t) call with explicit conversion to twips because ScaleRoundOut introduced errors in the pixel to twips conversion. bug 120918; sr=attinasi r=dcone a=asa adt_a=paw
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118825 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 03:36:37 +00:00
jj%netscape.com
0869043d48 #4830: turning traceback option off for optimized non-Carbon classic builds - 1.0.0 BRANCH
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118817 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 01:06:28 +00:00
wtc%netscape.com
c8e259b919 Bugzilla bug 135448: removed a level of code to make semaphores faster.
This patch is contributed by Michael Kaply <mkaply@us.ibm.com>.
Modified files: _os2 os2cv.c os2vacpp.asm
Tag: MOZILLA_1_0_0_BRANCH


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118815 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 00:27:29 +00:00
morse%netscape.com
c74d723da4 remove the send flyout menu, r=sgehani, sr=jag, a=asa, adt=putterman, ok'ed by mcarlson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118814 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 00:04:50 +00:00
shliang%netscape.com
d3fb5163a2 132896 - remove offline mode at startup ui in pref panel - r=ssu,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118811 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 23:40:48 +00:00
darin%netscape.com
4ce3a9d36f fixes bug 136857 "Enable Pipelining doesn't remain disabled when HTTP 1.0
selected" patch=davidstl@yahoo.com r=brade sr=darin


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118806 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:50:59 +00:00
naving%netscape.com
e629278774 136443 r=blake sr=sspitzer a=asa. Make stop button, stop from menus work again in mailnews.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118805 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:44:06 +00:00
dbragg%netscape.com
22d56d374f Final little teeny part of bug 130102. Adding a comma after toolbars. r=bzbarsky, sr=alecf, a=asa (for drivers)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118804 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:34:01 +00:00
blakeross%telocity.com
587635d6b6 127349 - remove partial favicon support. r=ben sr=alecf a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118803 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:27:33 +00:00
(no author)
551965e5db This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118801 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:18:56 +00:00
wtc%netscape.com
1e111acc39 Merged the fix for Bugzilla bug 136625 on the MOZILLA_1_0_0_BRANCH.
r=relyea. a=jaimejr@netscape.com adt1.0.0+ (on ADT's behalf).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118799 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:13:47 +00:00
darin%netscape.com
c461ca32b7 fixes bug 130079 "Importing IE favorites turns spaces into %20 (URL-encoded)"
patch=andreas.otte@debitel.net
r=ben sr=darin a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118786 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 21:12:27 +00:00
pinkerton%netscape.com
a0bac4e516 actually hook up dnd overriding apis to webbrowserchrome. r=brade/sr=blizzard/a=valeski. bug# 136744.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118781 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 19:47:23 +00:00
wtc%netscape.com
8e4140b79c Bugzilla bug 135119: fixed compilation problems on Linux Alpha. r=cls.
a=rjesup@wgate.com for check into the mozilla 1.0.0 branch.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118773 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 18:14:39 +00:00
oeschger%netscape.com
7f3448f68f just updating some mozilla help content, dispensation per 122806, updating per 46917, r=oeschger, author=jayesh sheth
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118764 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:43:36 +00:00
(no author)
0ee3a71577 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118763 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:41:30 +00:00
pinkerton%netscape.com
b1e2b1e3bf clean up checking for a golden child menu. don't delete a golden child menu when setting the hidden attribute. that would be bad. r=saari/sr=sfraser/a=asa. bug# 136460
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118760 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:37:39 +00:00
seawood%netscape.com
2ade79cfe2 Fix link ordering problem when building with static components and a static gtk.
Bug #136192 r=bryner a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118757 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:31:27 +00:00
kin%netscape.com
f57fa35533 Fix for bug 128136 (Printing disables keyboard movement of caret in textfields)
Added SuppressEventHandlers() utility routine, which PreDestroy()
and CreateAnonymousContent() now call to determine if the controller
unregister/register code should be executed.

r=rods@netscape.com  sr=sfraser@netscape.com
adt=jaimejr@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118754 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:22:32 +00:00
kin%netscape.com
c89366eb3e Fix for bug 110940 (order List ID does not display correctly after change )
RenumberListsFor() now calls Invalidate() for a bullet frame if it's ordinal is changed.

r=kmcclusk@netscape.com  sr=waterson@netscape.com
adt=jaimejr@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118753 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:19:49 +00:00
seawood%netscape.com
204c694be1 Add dependency to fix -jx build bustage.
Bug #136297 r=dcran,dmose a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118751 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:01:14 +00:00
cbiesinger%web.de
b148ba5407 bug 136382 r=rjesup@wgate.com sr=tor a=asa
preference to disable image placeholders


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118742 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 12:22:31 +00:00
timeless%mac.com
9090496ade Bug 135903 'Size' items in Page Info hasn't units
patch by db48x@yahoo.com r=biesi sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118737 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 06:46:18 +00:00
timeless%mac.com
1d66a32348 Bug 69295 [RFE] Unable to follow link/copy/drag elements of Page Info, e.g. images
patch by db48x@yahoo.com r=kerz sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118736 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 06:45:06 +00:00
badami%netscape.com
d8a4df2f50 HTTP 300 page screws up session history
bug=114982 sr=darin r=rpotts a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118724 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 04:56:03 +00:00
dbaron%fas.harvard.edu
daca085785 Fix topcrash by clearing the view manager's weak pointer back to the pres shell before the pres shell goes away. b=134664 r=roc+moz sr=jag a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118717 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 04:05:10 +00:00
dbaron%fas.harvard.edu
992e77fb04 Fix potential leak of view observer (pres shell). b=134664 r=roc+moz sr=jag a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118716 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 04:04:19 +00:00
serge%netscape.com
fbe8d4409c fix #94895, Flash movie is constantly stopped and restarted, r=peterl, sr=beard, a=paw
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118714 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 03:40:42 +00:00
dveditz%netscape.com
4743655549 fix chromeless/blank browser after upgrade (bug 135222) r=syd, sr=sfraser, a=rjesup, adt=paw
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118705 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 01:42:17 +00:00
(no author)
08b55a8c92 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118704 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 01:28:52 +00:00
saari%netscape.com
358a7fceee small fix 7868 r=jfrancis sr= kin adt+ ect. Added parameter that was in 9.8 branch now to 1.0 branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118694 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 01:02:16 +00:00
darin%netscape.com
6f907b6f81 fixes bug 136678 "byte range request fails if server returns anything other
than 206" r=dougt sr=rpotts a=asa adt1.0.0+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118685 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 00:27:11 +00:00
darin%netscape.com
be52de925f fixes bug 135547 "make event queues more robust"
r=danm sr=rpotts,brendan a=drivers,adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118683 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 00:19:25 +00:00
alexsavulov%netscape.com
d7072a40f3 fix for bug 107545
added nullcheck for frame pointer
r=kmccluskey sr=attinasi a=rjesup adt1.0.0+=syd


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118681 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 00:12:48 +00:00
cotter%netscape.com
7d36c6511d ongoing privacy & securtity help content updates per 122806, r=oeschger; misc. minor correx.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118675 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 23:31:16 +00:00
akkana%netscape.com
9d9d6d8619 129122: Add a new serializer mode (used primarily by mail)
in which <br> tags within <pre> blocks are translated to newlines.
r=nhotta,ducarroz,tmutreja sr=sspitzer a=rjesup adt1.0.0+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118673 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 23:27:20 +00:00
mkaply%us.ibm.com
239695399c #135450
r=wtc, a=asa
OS/2 only - don't set priority if it is the default


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118669 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 23:05:03 +00:00
mkaply%us.ibm.com
c1b3007458 #136622
r=pedemont, sr=blizzard, a=asa
OS/2 only - rewrite cursor code - support crosshair


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118667 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 22:55:38 +00:00
mkaply%us.ibm.com
731717a2fe OS/2 bustage - need extern C - already baked on trunk - r=dmose
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118657 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 22:12:19 +00:00
kin%netscape.com
c92d888b06 Fix for bug 136408 (Crash editing pages with text widgets)
Use :canvas as selector to avoid triggering layout crash bug 123049.
Added isindex and textarea to list of items to use default cursor.

r=jfrancis@netscape.com  sr=sfraser@netscape.com
adt=syd@netscape.com  a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118655 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 22:02:27 +00:00
ducarroz%netscape.com
3722e59eaa Fix for bug 129358. Need to pre-initialize spec.name to void memory corruption in the copy constructor when the file doesn't exist. Also protect the copy constructor against bogus spec.name. R=fraser, SR=sspitzer, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118647 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:32:27 +00:00
danm%netscape.com
7341a8a72f freezing interface for 1.0. bug 99618 r=chak,rpotts a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118644 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:21:46 +00:00
danm%netscape.com
d87745cb1f freezing interface for 1.0. bug 99617 r=chak,rpotts a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118643 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:21:12 +00:00
danm%netscape.com
26fe20452e freezing interface for 1.0. bug 136275 r=chak,rpotts a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118641 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:20:10 +00:00
ducarroz%netscape.com
fa18c05f79 Fix for bug 120594. Add a null pointer check to avoid crashing. R=varada, SR=bienvenu, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118636 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 20:53:57 +00:00
radha%netscape.com
a48dbb8e4c Fix for bug 135868. crash due to null pointer reference in nsDocShell::InternalLoad().
r=mcafee, sr=rpotts a=valeski. Approved by ADT.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118634 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 19:41:04 +00:00
sicking%bigfoot.com
e317dd137f Bug 135679: fixes form submit when target url is same page and current url has anchor.
r=jkeiser sr=attinasi a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118619 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 14:03:12 +00:00
shliang%netscape.com
8946cfe8c2 133355 - adding fake free web mail account to folder pane - will only show up in commercial builds - r=bhuvan,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118614 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 11:59:45 +00:00
locka%iol.ie
4a01af29d0 Fix an %s which should have been an %S. b=131143 r=chak@netscape.com sr=rpotts@netscape.com a=lorikaplan@netscape.com (locale) a=jaimejr@netscape.com (adt) a=asa@mozilla.org (drivers)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118612 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 11:30:09 +00:00
locka%iol.ie
c14766db45 Lower limit on number of nested content frames before giving up. b=126466 r=fabian@bluishgecko.net sr=jst@netscape.com a=rjesup@wgate.com (drivers) a=jaimejr@netscape.com (adt)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118611 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 11:28:01 +00:00
caillon%returnzero.com
e885f1dd15 Bug 135998, Clean up and shrink output of the HTML directory listing. r=bbaetz,glazou sr=darin a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118608 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 10:28:57 +00:00
varga%utcru.sk
bab75062ce Fix for bug 135048 - Folder pane won't auto scroll down during drag and drop.
Covers 134889 also.
r=bryner, sr=ben, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118607 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 09:48:53 +00:00
racham%netscape.com
49443b5f2c Fixing bug 135594. Allow ISPs to customize mailnews account wizard via overlay wizard pages. r/sr=sspitzer, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118603 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 09:02:09 +00:00
dmose%netscape.com
895a74da95 LDAP over SSL (bug 107411). UI changes thanks to srilatha@netscape.com nsLDAPSecurityGlue.cpp: r=mcs@netscape.com; Mac S/MIME build changes: r=javi@netscape.com; Mac Project changes: r=rdayal; all other files: r=bhuvan@netscape.com; entire patch: sr=sspitzer@netscape.com; a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118597 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 05:56:07 +00:00
(no author)
446b07e818 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118589 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 04:41:24 +00:00
danm%netscape.com
7fbc9919c2 reverting rev 3.409. this re-opens bug 120155 but fixes bug 134317 and bug 135528. snif.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118587 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 04:36:20 +00:00
cltbld%netscape.com
6320f9759f force commit to allow checkouts by branch and date
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118581 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 03:46:58 +00:00
leaf%mozilla.org
72b6ef5cdc testing dolog change, comment change only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118579 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 23:49:17 +00:00
jj%netscape.com
024577fbad pull from MOZILLA_1_0_0_BRANCH tag
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118574 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 22:20:34 +00:00
(no author)
6e8bb30a03 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118551 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 14:31:21 +00:00
123 changed files with 650 additions and 46486 deletions

650
mozilla/client.mk Normal file
View File

@@ -0,0 +1,650 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm
# Build the Mozilla client.
#
# This needs CVSROOT set to work, e.g.,
# setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
# or
# setenv CVSROOT :pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot
#
# To checkout and build a tree,
# 1. cvs co mozilla/client.mk
# 2. cd mozilla
# 3. gmake -f client.mk
#
# Other targets (gmake -f client.mk [targets...]),
# checkout
# build
# clean (realclean is now the same as clean)
# distclean
#
# See http://www.mozilla.org/build/unix.html for more information.
#
# Options:
# MOZ_OBJDIR - Destination object directory
# MOZ_CO_DATE - Date tag to use for checkout (default: none)
# MOZ_CO_MODULE - Module to checkout (default: SeaMonkeyAll)
# MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3)
# MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P)
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
# MOZ_CO_BRANCH - Branch tag (Deprecated. Use MOZ_CO_TAG below.)
#
#######################################################################
# Checkout Tags
#
# For branches, uncomment the MOZ_CO_TAG line with the proper tag,
# and commit this file on that tag.
MOZ_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
NSPR_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
PSM_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
NSS_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
LDAPCSDK_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
ACCESSIBLE_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
GFX2_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
IMGLIB2_CO_TAG = NETSCAPE_7_0_OEM_BRANCH
BUILD_MODULES = all
#######################################################################
# Defines
#
CVS = cvs
CWD := $(shell pwd)
ifeq "$(CWD)" "/"
CWD := /.
endif
ifneq (, $(wildcard client.mk))
# Ran from mozilla directory
ROOTDIR := $(shell dirname $(CWD))
TOPSRCDIR := $(CWD)
else
# Ran from mozilla/.. directory (?)
ROOTDIR := $(CWD)
TOPSRCDIR := $(CWD)/mozilla
endif
# on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't
# work; replace first instance with one forward slash
TOPSRCDIR := $(shell echo "$(TOPSRCDIR)" | sed -e 's%//%/%')
ifndef TOPSRCDIR_MOZ
TOPSRCDIR_MOZ=$(TOPSRCDIR)
endif
# if ROOTDIR equals only drive letter (i.e. "C:"), set to "/"
DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://')
ifeq ($(DIRNAME),)
ROOTDIR := /.
endif
AUTOCONF := autoconf
MKDIR := mkdir
SH := /bin/sh
ifndef MAKE
MAKE := gmake
endif
CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
ifdef CONFIG_GUESS_SCRIPT
CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
else
_IS_FIRST_CHECKOUT := 1
endif
####################################
# CVS
# Add the CVS root to CVS_FLAGS if needed
CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null)
ifneq ($(CVS_ROOT_IN_TREE),)
ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT))
CVS_FLAGS := -d $(CVS_ROOT_IN_TREE)
endif
endif
CVSCO = $(strip $(CVS) $(CVS_FLAGS) co $(CVS_CO_FLAGS))
CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%)
ifdef MOZ_CO_TAG
CVS_CO_FLAGS := -r $(MOZ_CO_TAG)
endif
####################################
# Load mozconfig Options
# See build pages, http://www.mozilla.org/build/unix.html,
# for how to set up mozconfig.
MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk
MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find
MOZCONFIG_MODULES := mozilla/build/unix/modules.mk
run_for_side_effects := \
$(shell cd $(ROOTDIR); \
if test "$(_IS_FIRST_CHECKOUT)"; then \
$(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER) $(MOZCONFIG_MODULES); \
else true; \
fi; \
$(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.mozconfig.mk > mozilla/.mozconfig.out)
include $(TOPSRCDIR)/.mozconfig.mk
include $(TOPSRCDIR)/build/unix/modules.mk
####################################
# Options that may come from mozconfig
# Change CVS flags if anonymous root is requested
ifdef MOZ_CO_USE_MIRROR
CVS_FLAGS := -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
endif
# MOZ_CVS_FLAGS - Basic CVS flags
ifeq "$(origin MOZ_CVS_FLAGS)" "undefined"
CVS_FLAGS := $(CVS_FLAGS) -q -z 3
else
CVS_FLAGS := $(MOZ_CVS_FLAGS)
endif
# This option is deprecated. The best way to have client.mk pull a tag
# is to set MOZ_CO_TAG (see above) and commit that change on the tag.
ifdef MOZ_CO_BRANCH
$(warning Use MOZ_CO_TAG instead of MOZ_CO_BRANCH)
CVS_CO_FLAGS := -r $(MOZ_CO_BRANCH)
endif
# MOZ_CO_FLAGS - Anything that we should use on all checkouts
ifeq "$(origin MOZ_CO_FLAGS)" "undefined"
CVS_CO_FLAGS := $(CVS_CO_FLAGS) -P
else
CVS_CO_FLAGS := $(CVS_CO_FLAGS) $(MOZ_CO_FLAGS)
endif
ifdef MOZ_CO_DATE
CVS_CO_DATE_FLAGS := -D "$(MOZ_CO_DATE)"
endif
ifdef MOZ_OBJDIR
OBJDIR := $(MOZ_OBJDIR)
MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
else
OBJDIR := $(TOPSRCDIR)
MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS)
endif
####################################
# CVS defines for PSM
#
PSM_CO_MODULE= mozilla/security/manager
PSM_CO_FLAGS := -P -A
ifdef MOZ_CO_FLAGS
PSM_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef PSM_CO_TAG
PSM_CO_FLAGS := $(PSM_CO_FLAGS) -r $(PSM_CO_TAG)
endif
CVSCO_PSM = $(CVS) $(CVS_FLAGS) co $(PSM_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(PSM_CO_MODULE)
####################################
# CVS defines for NSS
#
NSS_CO_MODULE = mozilla/security/nss \
mozilla/security/coreconf \
$(NULL)
NSS_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
NSS_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef NSS_CO_TAG
NSS_CO_FLAGS := $(NSS_CO_FLAGS) -r $(NSS_CO_TAG)
endif
# Cannot pull static tags by date
ifeq ($(NSS_CO_TAG),NSS_CLIENT_TAG)
CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(NSS_CO_MODULE)
else
CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE)
endif
####################################
# CVS defines for NSPR
#
NSPR_CO_MODULE = mozilla/nsprpub
NSPR_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
NSPR_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef NSPR_CO_TAG
NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) -r $(NSPR_CO_TAG)
endif
# Cannot pull static tags by date
ifeq ($(NSPR_CO_TAG),NSPRPUB_CLIENT_TAG)
CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE)
else
CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE)
endif
####################################
# CVS defines for the C LDAP SDK
#
LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk
LDAPCSDK_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
LDAPCSDK_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef LDAPCSDK_CO_TAG
LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) -r $(LDAPCSDK_CO_TAG)
endif
CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE)
####################################
# CVS defines for the C LDAP SDK
#
ACCESSIBLE_CO_MODULE = mozilla/accessible
ACCESSIBLE_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
ACCESSIBLE_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef ACCESSIBLE_CO_TAG
ACCESSIBLE_CO_FLAGS := $(ACCESSIBLE_CO_FLAGS) -r $(ACCESSIBLE_CO_TAG)
endif
CVSCO_ACCESSIBLE = $(CVS) $(CVS_FLAGS) co $(ACCESSIBLE_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(ACCESSIBLE_CO_MODULE)
####################################
# CVS defines for gfx2
#
GFX2_CO_MODULE = mozilla/gfx2
GFX2_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
GFX2_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef GFX2_CO_TAG
GFX2_CO_FLAGS := $(GFX2_CO_FLAGS) -r $(GFX2_CO_TAG)
endif
CVSCO_GFX2 = $(CVS) $(CVS_FLAGS) co $(GFX2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(GFX2_CO_MODULE)
####################################
# CVS defines for new image library
#
IMGLIB2_CO_MODULE = mozilla/modules/libpr0n
IMGLIB2_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
IMGLIB2_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
ifdef IMGLIB2_CO_TAG
IMGLIB2_CO_FLAGS := $(IMGLIB2_CO_FLAGS) -r $(IMGLIB2_CO_TAG)
endif
CVSCO_IMGLIB2 = $(CVS) $(CVS_FLAGS) co $(IMGLIB2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(IMGLIB2_CO_MODULE)
####################################
# CVS defines for standalone modules
#
ifneq ($(BUILD_MODULES),all)
MOZ_CO_MODULE := $(filter-out $(NSPRPUB_DIR) security directory/c-sdk, $(BUILD_MODULE_CVS))
MOZ_CO_MODULE += allmakefiles.sh client.mk aclocal.m4 configure configure.in
MOZ_CO_MODULE += Makefile.in
MOZ_CO_MODULE := $(addprefix mozilla/, $(MOZ_CO_MODULE))
NOSUBDIRS_MODULE := $(addprefix mozilla/, $(BUILD_MODULE_CVS_NS))
ifneq ($(NOSUBDIRS_MODULE),)
CVSCO_NOSUBDIRS := $(CVSCO) -l $(CVS_CO_DATE_FLAGS) $(NOSUBDIRS_MODULE)
endif
ifeq (,$(filter $(NSPRPUB_DIR), $(BUILD_MODULE_CVS)))
CVSCO_NSPR :=
endif
ifeq (,$(filter security security/manager, $(BUILD_MODULE_CVS)))
CVSCO_PSM :=
CVSCO_NSS :=
endif
ifeq (,$(filter directory/c-sdk, $(BUILD_MODULE_CVS)))
CVSCO_LDAPCSDK :=
endif
ifeq (,$(filter accessible, $(BUILD_MODULE_CVS)))
CVSCO_ACCESSIBLE :=
endif
ifeq (,$(filter gfx2, $(BUILD_MODULE_CVS)))
CVSCO_GFX2 :=
endif
ifeq (,$(filter modules/libpr0n, $(BUILD_MODULE_CVS)))
CVSCO_IMGLIB2 :=
endif
endif
####################################
# CVS defines for SeaMonkey
#
ifeq ($(MOZ_CO_MODULE),)
MOZ_CO_MODULE := SeaMonkeyAll
endif
CVSCO_SEAMONKEY := $(CVSCO) $(CVS_CO_DATE_FLAGS) $(MOZ_CO_MODULE)
####################################
# CVS defined for libart (pulled and built if MOZ_INTERNAL_LIBART_LGPL is set)
#
CVSCO_LIBART := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/other-licenses/libart_lgpl
ifdef MOZ_INTERNAL_LIBART_LGPL
FASTUPDATE_LIBART := fast_update $(CVSCO_LIBART)
CHECKOUT_LIBART := cvs_co $(CVSCO_LIBART)
else
CHECKOUT_LIBART := true
FASTUPDATE_LIBART := true
endif
####################################
# CVS defines for Calendar (pulled and built if MOZ_CALENDAR is set)
#
CVSCO_CALENDAR := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/calendar
ifdef MOZ_CALENDAR
FASTUPDATE_CALENDAR := fast_update $(CVSCO_CALENDAR)
CHECKOUT_CALENDAR := cvs_co $(CVSCO_CALENDAR)
else
CHECKOUT_CALENDAR := true
FASTUPDATE_CALENDAR := true
endif
# because some cygwin tools can't handle native dos-drive paths & vice-versa
# force configure to use a relative path for --srcdir
# need a better check for win32
# and we need to get OBJDIR earlier
ifdef MOZ_TOOLS
_tmpobjdir := $(shell cygpath -u $(OBJDIR))
_abs2rel := $(shell cygpath -w $(TOPSRCDIR)/build/unix/abs2rel.pl | sed -e 's|\\|/|g')
_OBJ2SRCPATH := $(shell $(_abs2rel) $(TOPSRCDIR) $(_tmpobjdir))
endif
#######################################################################
# Rules
#
# Print out any options loaded from mozconfig.
all build checkout clean depend distclean export libs install realclean::
@if test -f .mozconfig.out; then \
cat .mozconfig.out; \
rm -f .mozconfig.out; \
else true; \
fi
ifdef _IS_FIRST_CHECKOUT
all:: checkout build
else
all:: checkout alldep
endif
# Windows equivalents
pull_all: checkout
build_all: build
build_all_dep: alldep
build_all_depend: alldep
clobber clobber_all: clean
pull_and_build_all: checkout alldep
# Do everything from scratch
everything: checkout clean build
####################################
# CVS checkout
#
checkout::
# @: Backup the last checkout log.
@if test -f $(CVSCO_LOGFILE) ; then \
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
else true; \
fi
ifdef RUN_AUTOCONF_LOCALLY
@echo "Removing local configures" ; \
cd $(ROOTDIR) && \
$(RM) -f mozilla/configure mozilla/nsprpub/configure \
mozilla/directory/c-sdk/configure
endif
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
@echo '$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk'; \
cd $(ROOTDIR) && \
$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk
@cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_checkout
real_checkout:
# @: Start the checkout. Split the output to the tty and a log file. \
# : If it fails, touch an error file because "tee" hides the error.
@failed=.cvs-failed.tmp; rm -f $$failed*; \
cvs_co() { echo "$$@" ; \
("$$@" || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
if test -f $$failed; then false; else true; fi; }; \
cvs_co $(CVSCO_NSPR) && \
cvs_co $(CVSCO_NSS) && \
cvs_co $(CVSCO_PSM) && \
cvs_co $(CVSCO_LDAPCSDK) && \
cvs_co $(CVSCO_ACCESSIBLE) && \
cvs_co $(CVSCO_GFX2) && \
cvs_co $(CVSCO_IMGLIB2) && \
$(CHECKOUT_CALENDAR) && \
$(CHECKOUT_LIBART) && \
cvs_co $(CVSCO_SEAMONKEY) && \
cvs_co $(CVSCO_NOSUBDIRS)
@echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
# @: Check the log for conflicts. ;
@conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
if test "$$conflicts" ; then \
echo "$(MAKE): *** Conflicts during checkout." ;\
echo "$$conflicts" ;\
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
false; \
else true; \
fi
ifdef RUN_AUTOCONF_LOCALLY
@echo Generating configures using $(AUTOCONF) ; \
cd $(TOPSRCDIR) && $(AUTOCONF) && \
cd $(TOPSRCDIR)/nsprpub && $(AUTOCONF) && \
cd $(TOPSRCDIR)/directory/c-sdk && $(AUTOCONF)
endif
fast-update:
# @: Backup the last checkout log.
@if test -f $(CVSCO_LOGFILE) ; then \
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
else true; \
fi
ifdef RUN_AUTOCONF_LOCALLY
@echo "Removing local configures" ; \
cd $(ROOTDIR) && \
$(RM) -f mozilla/configure mozilla/nsprpub/configure \
mozilla/directory/c-sdk/configure
endif
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
@echo '$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk'; \
cd $(ROOTDIR) && \
$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk
@cd $(TOPSRCDIR) && \
$(MAKE) -f client.mk real_fast-update
real_fast-update:
# @: Start the update. Split the output to the tty and a log file. \
# : If it fails, touch an error file because "tee" hides the error.
@failed=.fast_update-failed.tmp; rm -f $$failed*; \
fast_update() { (config/cvsco-fast-update.pl $$@ || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
if test -f $$failed; then false; else true; fi; }; \
cvs_co() { echo "$$@" ; \
("$$@" || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
if test -f $$failed; then false; else true; fi; }; \
fast_update $(CVSCO_NSPR) && \
cd $(ROOTDIR) && \
failed=mozilla/.fast_update-failed.tmp && \
cvs_co $(CVSCO_NSS) && \
failed=.fast_update-failed.tmp && \
cd mozilla && \
fast_update $(CVSCO_PSM) && \
fast_update $(CVSCO_LDAPCSDK) && \
fast_update $(CVSCO_ACCESSIBLE) && \
fast_update $(CVSCO_GFX2) && \
fast_update $(CVSCO_IMGLIB2) && \
$(FASTUPDATE_CALENDAR) && \
$(FASTUPDATE_LIBART) && \
fast_update $(CVSCO_SEAMONKEY) && \
fast_update $(CVSCO_NOSUBDIRS)
@echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE)
# @: Check the log for conflicts. ;
@conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
if test "$$conflicts" ; then \
echo "$(MAKE): *** Conflicts during fast-update." ;\
echo "$$conflicts" ;\
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
false; \
else true; \
fi
ifdef RUN_AUTOCONF_LOCALLY
@echo Generating configures using $(AUTOCONF) ; \
cd $(TOPSRCDIR) && $(AUTOCONF) && \
cd $(TOPSRCDIR)/nsprpub && $(AUTOCONF) && \
cd $(TOPSRCDIR)/directory/c-sdk && $(AUTOCONF)
endif
####################################
# Web configure
WEBCONFIG_FILE := $(HOME)/.mozconfig
MOZCONFIG2CONFIGURATOR := build/autoconf/mozconfig2configurator
webconfig:
@cd $(TOPSRCDIR); \
url=`$(MOZCONFIG2CONFIGURATOR) $(TOPSRCDIR)`; \
echo Running mozilla with the following url: ;\
echo ;\
echo $$url ;\
mozilla -remote "openURL($$url)" || \
netscape -remote "openURL($$url)" || \
mozilla $$url || \
netscape $$url ;\
echo ;\
echo 1. Fill out the form on the browser. ;\
echo 2. Save the results to $(WEBCONFIG_FILE)
#####################################################
# First Checkout
ifdef _IS_FIRST_CHECKOUT
# First time, do build target in a new process to pick up new files.
build::
$(MAKE) -f $(TOPSRCDIR)/client.mk build
else
#####################################################
# After First Checkout
####################################
# Configure
CONFIG_STATUS := $(wildcard $(OBJDIR)/config.status)
CONFIG_CACHE := $(wildcard $(OBJDIR)/config.cache)
ifdef RUN_AUTOCONF_LOCALLY
EXTRA_CONFIG_DEPS := \
$(TOPSRCDIR)/aclocal.m4 \
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
$(NULL)
$(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
@echo Generating $@ using autoconf
cd $(TOPSRCDIR); $(AUTOCONF)
endif
CONFIG_STATUS_DEPS_L10N := $(wildcard $(TOPSRCDIR)/l10n/makefiles.all)
CONFIG_STATUS_DEPS := \
$(TOPSRCDIR)/configure \
$(TOPSRCDIR)/allmakefiles.sh \
$(TOPSRCDIR)/.mozconfig.mk \
$(wildcard $(TOPSRCDIR)/nsprpub/configure) \
$(wildcard $(TOPSRCDIR)/directory/c-sdk/configure) \
$(wildcard $(TOPSRCDIR)/mailnews/makefiles) \
$(CONFIG_STATUS_DEPS_L10N) \
$(wildcard $(TOPSRCDIR)/themes/makefiles) \
$(NULL)
# configure uses the program name to determine @srcdir@. Calling it without
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
# path of $(TOPSRCDIR).
ifeq ($(TOPSRCDIR),$(OBJDIR))
CONFIGURE := ./configure
else
CONFIGURE := $(TOPSRCDIR)/configure
endif
ifdef _OBJ2SRCPATH
CONFIGURE_ARGS := --srcdir=$(_OBJ2SRCPATH) $(CONFIGURE_ARGS)
endif
$(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
@echo cd $(OBJDIR);
@echo $(CONFIGURE) $(CONFIGURE_ARGS)
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
|| ( echo "*** Fix above errors and then restart with\
\"$(MAKE) -f client.mk build\"" && exit 1 )
@touch $(OBJDIR)/Makefile
ifdef CONFIG_STATUS
$(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
cd $(OBJDIR); \
CONFIG_FILES=config/autoconf.mk ./config.status
endif
####################################
# Depend
depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
$(MOZ_MAKE) export && $(MOZ_MAKE) depend
####################################
# Build it
build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
$(MOZ_MAKE)
####################################
# Other targets
# Pass these target onto the real build system
install export libs clean realclean distclean alldep:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
$(MOZ_MAKE) $@
cleansrcdir:
@cd $(TOPSRCDIR); \
if [ -f webshell/embed/gtk/Makefile ]; then \
$(MAKE) -C webshell/embed/gtk distclean; \
fi; \
if [ -f Makefile ]; then \
$(MAKE) distclean ; \
else \
echo "Removing object files from srcdir..."; \
rm -fr `find . -type d \( -name .deps -print -o -name CVS \
-o -exec test ! -d {}/CVS \; \) -prune \
-o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
build/autoconf/clean-config.sh; \
fi;
# (! IS_FIRST_CHECKOUT)
endif
.PHONY: checkout real_checkout depend build export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything

View File

@@ -1,152 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Dr Vipul Gupta <vipul.gupta@sun.com> and
# Douglas Stebila <douglas@stebila.ca>, Sun Microsystems
# Laboratories
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
CORE_DEPTH = ../../..
MODULE = nss
ifndef FREEBL_RECURSIVE_BUILD
LIBRARY_NAME = freebl
else
ifdef USE_PURE_32
CORE_DEPTH = ../../../..
LIBRARY_NAME = freebl_pure32
else
LIBRARY_NAME = freebl_hybrid
endif
endif
# same version as rest of freebl
LIBRARY_VERSION = _3
DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\"
REQUIRES =
EXPORTS = \
blapit.h \
shsign.h \
ecl-exp.h \
$(NULL)
PRIVATE_EXPORTS = \
blapi.h \
secmpi.h \
secrng.h \
ec.h \
ecl.h \
ecl-curve.h \
$(NULL)
MPI_HDRS = mpi-config.h mpi.h mpi-priv.h mplogic.h mpprime.h logtab.h mp_gf2m.h
MPI_SRCS = mpprime.c mpmontg.c mplogic.c mpi.c mp_gf2m.c mpcpucache.c
ECL_HDRS = ecl-exp.h ecl.h ec2.h ecp.h ecl-priv.h
ifdef NSS_ENABLE_ECC
ECL_SRCS = ecl.c ecl_curve.c ecl_mult.c ecl_gf.c \
ec2_aff.c ec2_mont.c ec2_proj.c \
ec2_163.c ec2_193.c ec2_233.c \
ecp_aff.c ecp_jac.c ecp_mont.c \
ecp_192.c ecp_224.c \
ec_naf.c ecp_jm.c
else
ECL_SRCS = $(NULL)
endif
CSRCS = \
ldvector.c \
prng_fips1861.c \
sysrand.c \
sha_fast.c \
md2.c \
md5.c \
sha512.c \
alg2268.c \
arcfour.c \
arcfive.c \
desblapi.c \
des.c \
rijndael.c \
aeskeywrap.c \
dh.c \
ec.c \
pqg.c \
dsa.c \
rsa.c \
shvfy.c \
$(MPI_SRCS) \
$(ECL_SRCS) \
$(NULL)
ALL_CSRCS := $(CSRCS)
ALL_HDRS = \
blapi.h \
blapit.h \
des.h \
ec.h \
loader.h \
rijndael.h \
secmpi.h \
sha.h \
sha_fast.h \
shsign.h \
vis_proto.h \
$(NULL)
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif
ifdef AES_GEN_TBL
DEFINES += -DRIJNDAEL_GENERATE_TABLES
else
ifdef AES_GEN_TBL_M
DEFINES += -DRIJNDAEL_GENERATE_TABLES_MACRO
else
ifdef AES_GEN_VAL
DEFINES += -DRIJNDAEL_GENERATE_VALUES
else
ifdef AES_GEN_VAL_M
DEFINES += -DRIJNDAEL_GENERATE_VALUES_MACRO
else
DEFINES += -DRIJNDAEL_INCLUDE_TABLES
endif
endif
endif
endif

View File

@@ -1,278 +0,0 @@
#
# Makefile for MPI library
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Netscape Communications Corporation
# Richard C. Swift (swift@netscape.com)
# Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# $Id: Makefile,v 1.21 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
## Define CC to be the C compiler you wish to use. The GNU cc
## compiler (gcc) should work, at the very least
#CC=cc
#CC=gcc
##
## Define PERL to point to your local Perl interpreter. It
## should be Perl 5.x, although it's conceivable that Perl 4
## might work ... I haven't tested it.
##
#PERL=/usr/bin/perl
PERL=perl
include target.mk
CFLAGS+= $(XCFLAGS)
##
## Define LIBS to include any libraries you need to link against.
## If NO_TABLE is define, LIBS should include '-lm' or whatever is
## necessary to bring in the math library. Otherwise, it can be
## left alone, unless your system has other peculiar requirements.
##
LIBS=#-lmalloc#-lefence#-lm
##
## Define RANLIB to be the library header randomizer; you might not
## need this on some systems (just set it to 'echo' on these systems,
## such as IRIX)
##
RANLIB=echo
##
## This is the version string used for the documentation and
## building the distribution tarball. Don't mess with it unless
## you are releasing a new version
VERS=1.7p6
## ----------------------------------------------------------------------
## You probably don't need to change anything below this line...
##
##
## This is the list of source files that need to be packed into
## the distribution file
SRCS= mpi.c mpprime.c mplogic.c mp_gf2m.c mpmontg.c mpi-test.c primes.c tests/ \
utils/gcd.c utils/invmod.c utils/lap.c \
utils/ptab.pl utils/sieve.c utils/isprime.c\
utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
utils/bbsrand.c utils/prng.c utils/primegen.c \
utils/basecvt.c utils/makeprime.c\
utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
utils/mpi.h utils/mpprime.h mulsqr.c \
make-test-arrays test-arrays.txt all-tests make-logtab \
types.pl stats timetest multest
## These are the header files that go into the distribution file
HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h mplogic.h mp_gf2m.h \
mp_gf2m-priv.h utils/bbs_rand.h tests/mpi.h tests/mpprime.h
## These are the documentation files that go into the distribution file
DOCS=README doc utils/README utils/PRIMES
## This is the list of tools built by 'make tools'
TOOLS=gcd invmod isprime lap dec2hex hex2dec primegen prng \
basecvt fact exptmod pi makeprime identest
LIBOBJS = mpprime.o mpmontg.o mplogic.o mp_gf2m.o mpi.o $(AS_OBJS)
LIBHDRS = mpi-config.h mpi-priv.h mpi.h
APPHDRS = mpi-config.h mpi.h mplogic.h mp_gf2m.h mpprime.h
help:
@ echo ""
@ echo "The following targets can be built with this Makefile:"
@ echo ""
@ echo "libmpi.a - arithmetic and prime testing library"
@ echo "mpi-test - test driver (requires MP_IOFUNC)"
@ echo "tools - command line tools"
@ echo "doc - manual pages for tools"
@ echo "clean - clean up objects and such"
@ echo "distclean - get ready for distribution"
@ echo "dist - distribution tarball"
@ echo ""
.SUFFIXES: .c .o .i
.c.i:
$(CC) $(CFLAGS) -E $< > $@
#.c.o: $*.h $*.c
# $(CC) $(CFLAGS) -c $<
#---------------------------------------
$(LIBOBJS): $(LIBHDRS)
logtab.h: make-logtab
$(PERL) make-logtab > logtab.h
mpi.o: mpi.c logtab.h $(LIBHDRS)
mplogic.o: mplogic.c mpi-priv.h mplogic.h $(LIBHDRS)
mp_gf2m.o: mp_gf2m.c mpi-priv.h mp_gf2m.h mp_gf2m-priv.h $(LIBHDRS)
mpmontg.o: mpmontg.c mpi-priv.h mplogic.h mpprime.h $(LIBHDRS)
mpprime.o: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
mpi_mips.o: mpi_mips.s
$(CC) -o $@ $(ASFLAGS) -c mpi_mips.s
mpi_sparc.o : montmulf.h
mpv_sparcv9.s: vis_64.il mpv_sparc.c
$(CC) -o $@ $(SOLARIS_FPU_FLAGS) -S vis_64.il mpv_sparc.c
mpv_sparcv8.s: vis_64.il mpv_sparc.c
$(CC) -o $@ $(SOLARIS_FPU_FLAGS) -S vis_32.il mpv_sparc.c
montmulfv8.o montmulfv9.o mpv_sparcv8.o mpv_sparcv9.o : %.o : %.s
$(CC) -o $@ $(SOLARIS_ASM_FLAGS) -c $<
# This rule is used to build the .s sources, which are then hand optimized.
#montmulfv8.s montmulfv9.s : montmulf%.s : montmulf%.il montmulf.c montmulf.h
# $(CC) -o $@ $(SOLARIS_ASM_FLAGS) -S montmulf$*.il montmulf.c
libmpi.a: $(LIBOBJS)
ar -cvr libmpi.a $(LIBOBJS)
$(RANLIB) libmpi.a
lib libs: libmpi.a
mpi.i: mpi.h
#---------------------------------------
MPTESTOBJS = mptest1.o mptest2.o mptest3.o mptest3a.o mptest4.o mptest4a.o \
mptest4b.o mptest6.o mptest7.o mptest8.o mptest9.o mptestb.o
MPTESTS = $(MPTESTOBJS:.o=)
$(MPTESTOBJS): mptest%.o: tests/mptest-%.c $(LIBHDRS)
$(CC) $(CFLAGS) -o $@ -c $<
$(MPTESTS): mptest%: mptest%.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
tests: mptest1 mptest2 mptest3 mptest3a mptest4 mptest4a mptest4b mptest6 \
mptestb bbsrand
utests: mptest7 mptest8 mptest9
#---------------------------------------
EXTRAOBJS = bbsrand.o bbs_rand.o prng.o
UTILOBJS = primegen.o metime.o identest.o basecvt.o fact.o exptmod.o pi.o \
makeprime.o gcd.o invmod.o lap.o isprime.o \
dec2hex.o hex2dec.o
UTILS = $(UTILOBJS:.o=)
$(UTILS): % : %.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
$(UTILOBJS) $(EXTRAOBJS): %.o : utils/%.c $(LIBHDRS)
$(CC) $(CFLAGS) -o $@ -c $<
prng: prng.o bbs_rand.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
bbsrand: bbsrand.o bbs_rand.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
utils: $(UTILS) prng bbsrand
#---------------------------------------
test-info.c: test-arrays.txt
$(PERL) make-test-arrays test-arrays.txt > test-info.c
mpi-test.o: mpi-test.c test-info.c $(LIBHDRS)
$(CC) $(CFLAGS) -o $@ -c $<
mpi-test: mpi-test.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
mdxptest.o: mdxptest.c $(LIBHDRS) mpi-priv.h
mdxptest: mdxptest.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
mulsqr.o: mulsqr.c logtab.h mpi.h mpi-config.h mpprime.h
$(CC) $(CFLAGS) -DMP_SQUARE=1 -o $@ -c mulsqr.c
mulsqr: mulsqr.o libmpi.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
#---------------------------------------
alltests: tests utests mpi-test
tools: $(TOOLS)
doc:
(cd doc; ./build)
clean:
rm -f *.o *.a *.i
rm -f core
rm -f *~ .*~
rm -f utils/*.o
rm -f utils/core
rm -f utils/*~ utils/.*~
clobber: clean
rm -f $(TOOLS) $(UTILS)
distclean: clean
rm -f mptest? mpi-test metime mulsqr karatsuba
rm -f mptest?a mptest?b
rm -f utils/mptest?
rm -f test-info.c logtab.h
rm -f libmpi.a
rm -f $(TOOLS)
dist: Makefile $(HDRS) $(SRCS) $(DOCS)
tar -cvf mpi-$(VERS).tar Makefile $(HDRS) $(SRCS) $(DOCS)
pgps -ab mpi-$(VERS).tar
chmod +r mpi-$(VERS).tar.asc
gzip -9 mpi-$(VERS).tar
# END

View File

@@ -1,280 +0,0 @@
#
# Makefile.win - gmake Makefile for building MPI with VACPP on OS/2
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Netscape Communications Corporation
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# $Id: Makefile.os2,v 1.3 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
## Define CC to be the C compiler you wish to use. The GNU cc
## compiler (gcc) should work, at the very least
#CC=cc
#CC=gcc
CC=icc.exe
AS=alp.exe
##
## Define PERL to point to your local Perl interpreter. It
## should be Perl 5.x, although it's conceivable that Perl 4
## might work ... I haven't tested it.
##
#PERL=/usr/bin/perl
PERL=perl
##
## Define CFLAGS to contain any local options your compiler
## setup requires.
##
## Conditional compilation options are no longer here; see
## the file 'mpi-config.h' instead.
##
MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
#OS/2
AS_SRCS = mpi_x86.asm
MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
#CFLAGS= -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC \
-DDEBUG -D_DEBUG -UNDEBUG -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
#CFLAGS = -O2 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
-DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
#CFLAGS = -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
-DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
CFLAGS = /Ti+ -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
$(MPICMN)
ASFLAGS =
##
## Define LIBS to include any libraries you need to link against.
## If NO_TABLE is define, LIBS should include '-lm' or whatever is
## necessary to bring in the math library. Otherwise, it can be
## left alone, unless your system has other peculiar requirements.
##
LIBS=#-lmalloc#-lefence#-lm
##
## Define RANLIB to be the library header randomizer; you might not
## need this on some systems (just set it to 'echo' on these systems,
## such as IRIX)
##
RANLIB=echo
##
## This is the version string used for the documentation and
## building the distribution tarball. Don't mess with it unless
## you are releasing a new version
VERS=1.7p6
## ----------------------------------------------------------------------
## You probably don't need to change anything below this line...
##
##
## This is the list of source files that need to be packed into
## the distribution file
SRCS= mpi.c mpprime.c mplogic.c mpmontg.c mpi-test.c primes.c tests/ \
utils/gcd.c utils/invmod.c utils/lap.c \
utils/ptab.pl utils/sieve.c utils/isprime.c\
utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
utils/bbsrand.c utils/prng.c utils/primegen.c \
utils/basecvt.c utils/makeprime.c\
utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
utils/mpi.h utils/mpprime.h mulsqr.c \
make-test-arrays test-arrays.txt all-tests make-logtab \
types.pl stats timetest multest
## These are the header files that go into the distribution file
HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h mplogic.h \
utils/bbs_rand.h tests/mpi.h tests/mpprime.h
## These are the documentation files that go into the distribution file
DOCS=README doc utils/README utils/PRIMES
## This is the list of tools built by 'make tools'
TOOLS=gcd.exe invmod.exe isprime.exe lap.exe dec2hex.exe hex2dec.exe \
primegen.exe prng.exe basecvt.exe fact.exe exptmod.exe pi.exe makeprime.exe
AS_OBJS = $(AS_SRCS:.asm=.obj)
LIBOBJS = mpprime.obj mpmontg.obj mplogic.obj mpi.obj $(AS_OBJS)
LIBHDRS = mpi-config.h mpi-priv.h mpi.h
APPHDRS = mpi-config.h mpi.h mplogic.h mpprime.h
help:
@ echo ""
@ echo "The following targets can be built with this Makefile:"
@ echo ""
@ echo "mpi.lib - arithmetic and prime testing library"
@ echo "mpi-test.exe - test driver (requires MP_IOFUNC)"
@ echo "tools - command line tools"
@ echo "doc - manual pages for tools"
@ echo "clean - clean up objects and such"
@ echo "distclean - get ready for distribution"
@ echo "dist - distribution tarball"
@ echo ""
.SUFFIXES: .c .obj .i .lib .exe .asm
.c.i:
$(CC) $(CFLAGS) -E $< > $@
.c.obj:
$(CC) $(CFLAGS) -c $<
.asm.obj:
$(AS) $(ASFLAGS) $<
.obj.exe:
$(CC) $(CFLAGS) -Fo$@ $<
#---------------------------------------
$(LIBOBJS): $(LIBHDRS)
logtab.h: make-logtab
$(PERL) make-logtab > logtab.h
mpi.obj: mpi.c logtab.h $(LIBHDRS)
mplogic.obj: mplogic.c mpi-priv.h mplogic.h $(LIBHDRS)
mpmontg.obj: mpmontg.c mpi-priv.h mplogic.h mpprime.h $(LIBHDRS)
mpprime.obj: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
mpi_mips.obj: mpi_mips.s
$(CC) -Fo$@ $(ASFLAGS) -c mpi_mips.s
mpi.lib: $(LIBOBJS)
ilib /out:mpi.lib $(LIBOBJS)
$(RANLIB) mpi.lib
lib libs: mpi.lib
#---------------------------------------
MPTESTOBJS = mptest1.obj mptest2.obj mptest3.obj mptest3a.obj mptest4.obj \
mptest4a.obj mptest4b.obj mptest6.obj mptest7.obj mptest8.obj mptest9.obj
MPTESTS = $(MPTESTOBJS:.obj=.exe)
$(MPTESTOBJS): mptest%.obj: tests/mptest-%.c $(LIBHDRS)
$(CC) $(CFLAGS) -Fo$@ -c $<
$(MPTESTS): mptest%.exe: mptest%.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
tests: mptest1.exe mptest2.exe mptest3.exe mptest3a.exe mptest4.exe \
mptest4a.exe mptest4b.exe mptest6.exe bbsrand.exe
utests: mptest7.exe mptest8.exe mptest9.exe
#---------------------------------------
EXTRAOBJS = bbsrand.obj bbs_rand.obj prng.obj
UTILOBJS = primegen.obj metime.obj identest.obj basecvt.obj fact.obj \
exptmod.obj pi.obj makeprime.obj karatsuba.obj gcd.obj invmod.obj lap.obj \
isprime.obj dec2hex.obj hex2dec.obj
UTILS = $(UTILOBJS:.obj=.exe)
$(UTILS): %.exe : %.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
$(UTILOBJS) $(EXTRAOBJS): %.obj : utils/%.c $(LIBHDRS)
$(CC) $(CFLAGS) -Fo$@ -c $<
prng.exe: prng.obj bbs_rand.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
bbsrand.exe: bbsrand.obj bbs_rand.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
utils: $(UTILS) prng.exe bbsrand.exe
#---------------------------------------
test-info.c: test-arrays.txt
$(PERL) make-test-arrays test-arrays.txt > test-info.c
mpi-test.obj: mpi-test.c test-info.c $(LIBHDRS)
$(CC) $(CFLAGS) -Fo$@ -c $<
mpi-test.exe: mpi-test.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
mdxptest.obj: mdxptest.c $(LIBHDRS) mpi-priv.h
mdxptest.exe: mdxptest.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
mulsqr.obj: mulsqr.c logtab.h mpi.h mpi-config.h mpprime.h
$(CC) $(CFLAGS) -DMP_SQUARE=1 -Fo$@ -c mulsqr.c
mulsqr.exe: mulsqr.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
#---------------------------------------
alltests: tests utests mpi-test.exe
tools: $(TOOLS)
doc:
(cd doc; ./build)
clean:
rm -f *.obj *.lib *.pdb *.ilk
cd utils; rm -f *.obj *.lib *.pdb *.ilk
distclean: clean
rm -f mptest? mpi-test metime mulsqr karatsuba
rm -f mptest?a mptest?b
rm -f utils/mptest?
rm -f test-info.c logtab.h
rm -f mpi.lib
rm -f $(TOOLS)
dist: Makefile $(HDRS) $(SRCS) $(DOCS)
tar -cvf mpi-$(VERS).tar Makefile $(HDRS) $(SRCS) $(DOCS)
pgps -ab mpi-$(VERS).tar
chmod +r mpi-$(VERS).tar.asc
gzip -9 mpi-$(VERS).tar
print:
@echo LIBOBJS = $(LIBOBJS)
# END

View File

@@ -1,280 +0,0 @@
#
# Makefile.win - gmake Makefile for building MPI with MSVC on NT
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Netscape Communications Corporation
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# $Id: Makefile.win,v 1.3 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
## Define CC to be the C compiler you wish to use. The GNU cc
## compiler (gcc) should work, at the very least
#CC=cc
#CC=gcc
CC=cl.exe
AS=ml.exe
##
## Define PERL to point to your local Perl interpreter. It
## should be Perl 5.x, although it's conceivable that Perl 4
## might work ... I haven't tested it.
##
#PERL=/usr/bin/perl
PERL=perl
##
## Define CFLAGS to contain any local options your compiler
## setup requires.
##
## Conditional compilation options are no longer here; see
## the file 'mpi-config.h' instead.
##
MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC
#NT
AS_SRCS = mpi_x86.asm
MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
#CFLAGS= -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC \
-DDEBUG -D_DEBUG -UNDEBUG -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
#CFLAGS = -O2 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
-DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
#CFLAGS = -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
-DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
CFLAGS = -O2 -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
-DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
ASFLAGS = -Cp -Sn -Zi -coff -I.
##
## Define LIBS to include any libraries you need to link against.
## If NO_TABLE is define, LIBS should include '-lm' or whatever is
## necessary to bring in the math library. Otherwise, it can be
## left alone, unless your system has other peculiar requirements.
##
LIBS=#-lmalloc#-lefence#-lm
##
## Define RANLIB to be the library header randomizer; you might not
## need this on some systems (just set it to 'echo' on these systems,
## such as IRIX)
##
RANLIB=echo
##
## This is the version string used for the documentation and
## building the distribution tarball. Don't mess with it unless
## you are releasing a new version
VERS=1.7p6
## ----------------------------------------------------------------------
## You probably don't need to change anything below this line...
##
##
## This is the list of source files that need to be packed into
## the distribution file
SRCS= mpi.c mpprime.c mplogic.c mpmontg.c mpi-test.c primes.c tests/ \
utils/gcd.c utils/invmod.c utils/lap.c \
utils/ptab.pl utils/sieve.c utils/isprime.c\
utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
utils/bbsrand.c utils/prng.c utils/primegen.c \
utils/basecvt.c utils/makeprime.c\
utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
utils/mpi.h utils/mpprime.h mulsqr.c \
make-test-arrays test-arrays.txt all-tests make-logtab \
types.pl stats timetest multest
## These are the header files that go into the distribution file
HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h mplogic.h \
utils/bbs_rand.h tests/mpi.h tests/mpprime.h
## These are the documentation files that go into the distribution file
DOCS=README doc utils/README utils/PRIMES
## This is the list of tools built by 'make tools'
TOOLS=gcd.exe invmod.exe isprime.exe lap.exe dec2hex.exe hex2dec.exe \
primegen.exe prng.exe basecvt.exe fact.exe exptmod.exe pi.exe makeprime.exe
AS_OBJS = $(AS_SRCS:.asm=.obj)
LIBOBJS = mpprime.obj mpmontg.obj mplogic.obj mpi.obj $(AS_OBJS)
LIBHDRS = mpi-config.h mpi-priv.h mpi.h
APPHDRS = mpi-config.h mpi.h mplogic.h mpprime.h
help:
@ echo ""
@ echo "The following targets can be built with this Makefile:"
@ echo ""
@ echo "mpi.lib - arithmetic and prime testing library"
@ echo "mpi-test - test driver (requires MP_IOFUNC)"
@ echo "tools - command line tools"
@ echo "doc - manual pages for tools"
@ echo "clean - clean up objects and such"
@ echo "distclean - get ready for distribution"
@ echo "dist - distribution tarball"
@ echo ""
.SUFFIXES: .c .obj .i .lib .exe .asm
.c.i:
$(CC) $(CFLAGS) -E $< > $@
.c.obj:
$(CC) $(CFLAGS) -c $<
.asm.obj:
$(AS) $(ASFLAGS) -c $<
.obj.exe:
$(CC) $(CFLAGS) -Fo$@ $<
#---------------------------------------
$(LIBOBJS): $(LIBHDRS)
logtab.h: make-logtab
$(PERL) make-logtab > logtab.h
mpi.obj: mpi.c logtab.h $(LIBHDRS)
mplogic.obj: mplogic.c mpi-priv.h mplogic.h $(LIBHDRS)
mpmontg.obj: mpmontg.c mpi-priv.h mplogic.h mpprime.h $(LIBHDRS)
mpprime.obj: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
mpi_mips.obj: mpi_mips.s
$(CC) -Fo$@ $(ASFLAGS) -c mpi_mips.s
mpi.lib: $(LIBOBJS)
ar -cvr mpi.lib $(LIBOBJS)
$(RANLIB) mpi.lib
lib libs: mpi.lib
#---------------------------------------
MPTESTOBJS = mptest1.obj mptest2.obj mptest3.obj mptest3a.obj mptest4.obj \
mptest4a.obj mptest4b.obj mptest6.obj mptest7.obj mptest8.obj mptest9.obj
MPTESTS = $(MPTESTOBJS:.obj=.exe)
$(MPTESTOBJS): mptest%.obj: tests/mptest-%.c $(LIBHDRS)
$(CC) $(CFLAGS) -Fo$@ -c $<
$(MPTESTS): mptest%.exe: mptest%.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
tests: mptest1.exe mptest2.exe mptest3.exe mptest3a.exe mptest4.exe \
mptest4a.exe mptest4b.exe mptest6.exe bbsrand.exe
utests: mptest7.exe mptest8.exe mptest9.exe
#---------------------------------------
EXTRAOBJS = bbsrand.obj bbs_rand.obj prng.obj
UTILOBJS = primegen.obj metime.obj identest.obj basecvt.obj fact.obj \
exptmod.obj pi.obj makeprime.obj karatsuba.obj gcd.obj invmod.obj lap.obj \
isprime.obj dec2hex.obj hex2dec.obj
UTILS = $(UTILOBJS:.obj=.exe)
$(UTILS): %.exe : %.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
$(UTILOBJS) $(EXTRAOBJS): %.obj : utils/%.c $(LIBHDRS)
$(CC) $(CFLAGS) -Fo$@ -c $<
prng.exe: prng.obj bbs_rand.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
bbsrand.exe: bbsrand.obj bbs_rand.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
utils: $(UTILS) prng.exe bbsrand.exe
#---------------------------------------
test-info.c: test-arrays.txt
$(PERL) make-test-arrays test-arrays.txt > test-info.c
mpi-test.obj: mpi-test.c test-info.c $(LIBHDRS)
$(CC) $(CFLAGS) -Fo$@ -c $<
mpi-test.exe: mpi-test.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
mdxptest.obj: mdxptest.c $(LIBHDRS) mpi-priv.h
mdxptest.exe: mdxptest.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
mulsqr.obj: mulsqr.c logtab.h mpi.h mpi-config.h mpprime.h
$(CC) $(CFLAGS) -DMP_SQUARE=1 -Fo$@ -c mulsqr.c
mulsqr.exe: mulsqr.obj mpi.lib $(LIBS)
$(CC) $(CFLAGS) -Fo$@ $^
#---------------------------------------
alltests: tests utests mpi-test.exe
tools: $(TOOLS)
doc:
(cd doc; ./build)
clean:
rm -f *.obj *.lib *.pdb *.ilk
cd utils; rm -f *.obj *.lib *.pdb *.ilk
distclean: clean
rm -f mptest? mpi-test metime mulsqr karatsuba
rm -f mptest?a mptest?b
rm -f utils/mptest?
rm -f test-info.c logtab.h
rm -f mpi.lib
rm -f $(TOOLS)
dist: Makefile $(HDRS) $(SRCS) $(DOCS)
tar -cvf mpi-$(VERS).tar Makefile $(HDRS) $(SRCS) $(DOCS)
pgps -ab mpi-$(VERS).tar
chmod +r mpi-$(VERS).tar.asc
gzip -9 mpi-$(VERS).tar
print:
@echo LIBOBJS = $(LIBOBJS)
# END

View File

@@ -1,799 +0,0 @@
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1997-2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
About the MPI Library
---------------------
The files 'mpi.h' and 'mpi.c' define a simple, arbitrary precision
signed integer arithmetic package. The implementation is not the most
efficient possible, but the code is small and should be fairly easily
portable to just about any machine that supports an ANSI C compiler,
as long as it is capable of at least 16-bit arithmetic (but also see
below for more on this).
This library was written with an eye to cryptographic applications;
thus, some care is taken to make sure that temporary values are not
left lying around in memory when they are no longer in use. This adds
some overhead for zeroing buffers before they are released back into
the free pool; however, it gives you the assurance that there is only
one copy of your important values residing in your process's address
space at a time. Obviously, it is difficult to guarantee anything, in
a pre-emptive multitasking environment, but this at least helps you
keep a lid on the more obvious ways your data can get spread around in
memory.
Using the Library
-----------------
To use the MPI library in your program, you must include the header:
#include "mpi.h"
This header provides all the type and function declarations you'll
need to use the library. Almost all the names defined by the library
begin with the prefix 'mp_', so it should be easy to keep them from
clashing with your program's namespace (he says, glibly, knowing full
well there are always pathological cases).
There are a few things you may want to configure about the library.
By default, the MPI library uses an unsigned short for its digit type,
and an unsigned int for its word type. The word type must be big
enough to contain at least two digits, for the primitive arithmetic to
work out. On my machine, a short is 2 bytes and an int is 4 bytes --
but if you have 64-bit ints, you might want to use a 4-byte digit and
an 8-byte word. I have tested the library using 1-byte digits and
2-byte words, as well. Whatever you choose to do, the things you need
to change are:
(1) The type definitions for mp_digit and mp_word.
(2) The macro DIGIT_FMT which tells mp_print() how to display a
single digit. This is just a printf() format string, so you
can adjust it appropriately.
(3) The macros DIGIT_MAX and MP_WORD_MAX, which specify the
largest value expressible in an mp_digit and an mp_word,
respectively.
Both the mp_digit and mp_word should be UNSIGNED integer types. The
code relies on having the full positive precision of the type used for
digits and words.
The remaining type definitions should be left alone, for the most
part. The code in the library does not make any significant
assumptions about the sizes of things, but there is little if any
reason to change the other parameters, so I would recommend you leave
them as you found them.
The library comes with a Perl script, 'types.pl', which will scan your
current Makefile settings, and attempt to find good definitions for
these types. It relies on a Unix sort of build environment, so it
probably won't work under MacOS or Windows, but it can be convenient
if you're porting to a new flavour of Unix. Just run 'types.pl' at
the command line, and it will spit out its results to the standard
output.
Conventions
-----------
Most functions in the library return a value of type mp_err. This
permits the library to communicate success or various kinds of failure
to the calling program. The return values currently defined are:
MP_OKAY - okay, operation succeeded, all's well
MP_YES - okay, the answer is yes (same as MP_OKAY)
MP_NO - okay, but answer is no (not MP_OKAY)
MP_MEM - operation ran out of memory
MP_RANGE - input parameter was out of range
MP_BADARG - an invalid input parameter was provided
MP_UNDEF - no output value is defined for this input
The only function which currently uses MP_UNDEF is mp_invmod().
Division by zero is undefined, but the division functions will return
MP_RANGE for a zero divisor. MP_BADARG usually means you passed a
bogus mp_int structure to the function. MP_YES and MP_NO are not used
by the library itself; they're defined so you can use them in your own
extensions.
If you need a readable interpretation of these error codes in your
program, you may also use the mp_strerror() function. This function
takes an mp_err as input, and returns a pointer to a human-readable
string describing the meaning of the error. These strings are stored
as constants within the library, so the caller should not attempt to
modify or free the memory associated with these strings.
The library represents values in signed-magnitude format. Values
strictly less than zero are negative, all others are considered
positive (zero is positive by fiat). You can access the 'sign' member
of the mp_int structure directly, but better is to use the mp_cmp_z()
function, to find out which side of zero the value lies on.
Most arithmetic functions have a single-digit variant, as well as the
full arbitrary-precision. An mp_digit is an unsigned value between 0
and DIGIT_MAX inclusive. The radix is available as RADIX. The number
of bits in a given digit is given as DIGIT_BIT.
Generally, input parameters are given before output parameters.
Unless otherwise specified, any input parameter can be re-used as an
output parameter, without confusing anything.
The basic numeric type defined by the library is an mp_int. Virtually
all the functions in the library take a pointer to an mp_int as one of
their parameters. An explanation of how to create and use these
<HR>
<A NAME="p23">
<H3>Problem 23:</H3>
structures follows. And so, without further ado...
Initialization and Cleanup
--------------------------
The basic numeric type defined by the library is an 'mp_int'.
However, it is not sufficient to simply declare a variable of type
mp_int in your program. These variables also need to be initialized
before they can be used, to allocate the internal storage they require
for computation.
This is done using one of the following functions:
mp_init(mp_int *mp);
mp_init_copy(mp_int *mp, mp_int *from);
mp_init_size(mp_int *mp, mp_size p);
Each of these requires a pointer to a structure of type mp_int. The
basic mp_init() simply initializes the mp_int to a default size, and
sets its value to zero. If you would like to initialize a copy of an
existing mp_int, use mp_init_copy(), where the 'from' parameter is the
mp_int you'd like to make a copy of. The third function,
mp_init_size(), permits you to specify how many digits of precision
should be preallocated for your mp_int. This can help the library
avoid unnecessary re-allocations later on.
The default precision used by mp_init() can be retrieved using:
precision = mp_get_prec();
This returns the number of digits that will be allocated. You can
change this value by using:
mp_set_prec(unsigned int prec);
Any positive value is acceptable -- if you pass zero, the default
precision will be re-set to the compiled-in library default (this is
specified in the header file 'mpi-config.h', and typically defaults to
8 or 16).
Just as you must allocate an mp_int before you can use it, you must
clean up the structure when you are done with it. This is performed
using the mp_clear() function. Remember that any mp_int that you
create as a local variable in a function must be mp_clear()'d before
that function exits, or else the memory allocated to that mp_int will
be orphaned and unrecoverable.
To set an mp_int to a given value, the following functions are given:
mp_set(mp_int *mp, mp_digit d);
mp_set_int(mp_int *mp, long z);
The mp_set() function sets the mp_int to a single digit value, while
mp_set_int() sets the mp_int to a signed long integer value.
To set an mp_int to zero, use:
mp_zero(mp_int *mp);
Copying and Moving
------------------
If you have two initialized mp_int's, and you want to copy the value
of one into the other, use:
mp_copy(from, to)
This takes care of clearing the old value of 'to', and copies the new
value into it. If 'to' is not yet initialized, use mp_init_copy()
instead (see above).
Note: The library tries, whenever possible, to avoid allocating
---- new memory. Thus, mp_copy() tries first to satisfy the needs
of the copy by re-using the memory already allocated to 'to'.
Only if this proves insufficient will mp_copy() actually
allocate new memory.
For this reason, if you know a priori that 'to' has enough
available space to hold 'from', you don't need to check the
return value of mp_copy() for memory failure. The USED()
macro tells you how many digits are used by an mp_int, and
the ALLOC() macro tells you how many are allocated.
If you have two initialized mp_int's, and you want to exchange their
values, use:
mp_exch(a, b)
This is better than using mp_copy() with a temporary, since it will
not (ever) touch the memory allocator -- it just swaps the exact
contents of the two structures. The mp_exch() function cannot fail;
if you pass it an invalid structure, it just ignores it, and does
nothing.
Basic Arithmetic
----------------
Once you have initialized your integers, you can operate on them. The
basic arithmetic functions on full mp_int values are:
mp_add(a, b, c) - computes c = a + b
mp_sub(a, b, c) - computes c = a - b
mp_mul(a, b, c) - computes c = a * b
mp_sqr(a, b) - computes b = a * a
mp_div(a, b, q, r) - computes q, r such that a = bq + r
mp_div_2d(a, d, q, r) - computes q = a / 2^d, r = a % 2^d
mp_expt(a, b, c) - computes c = a ** b
mp_2expt(a, k) - computes a = 2^k
mp_sqrt(a, c) - computes c = floor(sqrt(a))
The mp_div_2d() function efficiently computes division by powers of
two. Either the q or r parameter may be NULL, in which case that
portion of the computation will be discarded.
The algorithms used for some of the computations here are described in
the following files which are included with this distribution:
mul.txt Describes the multiplication algorithm
div.txt Describes the division algorithm
expt.txt Describes the exponentiation algorithm
sqrt.txt Describes the square-root algorithm
square.txt Describes the squaring algorithm
There are single-digit versions of most of these routines, as well.
In the following prototypes, 'd' is a single mp_digit:
mp_add_d(a, d, c) - computes c = a + d
mp_sub_d(a, d, c) - computes c = a - d
mp_mul_d(a, d, c) - computes c = a * d
mp_mul_2(a, c) - computes c = a * 2
mp_div_d(a, d, q, r) - computes q, r such that a = bq + r
mp_div_2(a, c) - computes c = a / 2
mp_expt_d(a, d, c) - computes c = a ** d
The mp_mul_2() and mp_div_2() functions take advantage of the internal
representation of an mp_int to do multiplication by two more quickly
than mp_mul_d() would. Other basic functions of an arithmetic variety
include:
mp_zero(a) - assign 0 to a
mp_neg(a, c) - negate a: c = -a
mp_abs(a, c) - absolute value: c = |a|
Comparisons
-----------
Several comparison functions are provided. Each of these, unless
otherwise specified, returns zero if the comparands are equal, < 0 if
the first is less than the second, and > 0 if the first is greater
than the second:
mp_cmp_z(a) - compare a <=> 0
mp_cmp_d(a, d) - compare a <=> d, d is a single digit
mp_cmp(a, b) - compare a <=> b
mp_cmp_mag(a, b) - compare |a| <=> |b|
mp_cmp_int(a, z) - compare a <=> z, z is a signed long integer
mp_isodd(a) - return nonzero if odd, zero otherwise
mp_iseven(a) - return nonzero if even, zero otherwise
Modular Arithmetic
------------------
Modular variations of the basic arithmetic functions are also
supported. These are available if the MP_MODARITH parameter in
mpi-config.h is turned on (it is by default). The modular arithmetic
functions are:
mp_mod(a, m, c) - compute c = a (mod m), 0 <= c < m
mp_mod_d(a, d, c) - compute c = a (mod d), 0 <= c < d (see below)
mp_addmod(a, b, m, c) - compute c = (a + b) mod m
mp_submod(a, b, m, c) - compute c = (a - b) mod m
mp_mulmod(a, b, m, c) - compute c = (a * b) mod m
mp_sqrmod(a, m, c) - compute c = (a * a) mod m
mp_exptmod(a, b, m, c) - compute c = (a ** b) mod m
mp_exptmod_d(a, d, m, c)- compute c = (a ** d) mod m
The mp_sqr() function squares its input argument. A call to mp_sqr(a,
c) is identical in meaning to mp_mul(a, a, c); however, if the
MP_SQUARE variable is set true in mpi-config.h (see below), then it
will be implemented with a different algorithm, that is supposed to
take advantage of the redundant computation that takes place during
squaring. Unfortunately, some compilers result in worse performance
on this code, so you can change the behaviour at will. There is a
utility program "mulsqr.c" that lets you test which does better on
your system.
The mp_sqrmod() function is analogous to the mp_sqr() function; it
uses the mp_sqr() function rather than mp_mul(), and then performs the
modular reduction. This probably won't help much unless you are doing
a lot of them.
See the file 'square.txt' for a synopsis of the algorithm used.
Note: The mp_mod_d() function computes a modular reduction around
---- a single digit d. The result is a single digit c.
Because an inverse is defined for a (mod m) if and only if (a, m) = 1
(that is, if a and m are relatively prime), mp_invmod() may not be
able to compute an inverse for the arguments. In this case, it
returns the value MP_UNDEF, and does not modify c. If an inverse is
defined, however, it returns MP_OKAY, and sets c to the value of the
inverse (mod m).
See the file 'redux.txt' for a description of the modular reduction
algorithm used by mp_exptmod().
Greatest Common Divisor
-----------------------
If The greates common divisor of two values can be found using one of the
following functions:
mp_gcd(a, b, c) - compute c = (a, b) using binary algorithm
mp_lcm(a, b, c) - compute c = [a, b] = ab / (a, b)
mp_xgcd(a, b, g, x, y) - compute g, x, y so that ax + by = g = (a, b)
Also provided is a function to compute modular inverses, if they
exist:
mp_invmod(a, m, c) - compute c = a^-1 (mod m), if it exists
The function mp_xgcd() computes the greatest common divisor, and also
returns values of x and y satisfying Bezout's identity. This is used
by mp_invmod() to find modular inverses. However, if you do not need
these values, you will find that mp_gcd() is MUCH more efficient,
since it doesn't need all the intermediate values that mp_xgcd()
requires in order to compute x and y.
The mp_gcd() (and mp_xgcd()) functions use the binary (extended) GCD
algorithm due to Josef Stein.
Input & Output Functions
------------------------
The following basic I/O routines are provided. These are present at
all times:
mp_read_radix(mp, str, r) - convert a string in radix r to an mp_int
mp_read_raw(mp, s, len) - convert a string of bytes to an mp_int
mp_radix_size(mp, r) - return length of buffer needed by mp_toradix()
mp_raw_size(mp) - return length of buffer needed by mp_toraw()
mp_toradix(mp, str, r) - convert an mp_int to a string of radix r
digits
mp_toraw(mp, str) - convert an mp_int to a string of bytes
mp_tovalue(ch, r) - convert ch to its value when taken as
a radix r digit, or -1 if invalid
mp_strerror(err) - get a string describing mp_err value 'err'
If you compile the MPI library with MP_IOFUNC defined, you will also
have access to the following additional I/O function:
mp_print(mp, ofp) - print an mp_int as text to output stream ofp
Note that mp_radix_size() returns a size in bytes guaranteed to be AT
LEAST big enough for the digits output by mp_toradix(). Because it
uses an approximation technique to figure out how many digits will be
needed, it may return a figure which is larger than necessary. Thus,
the caller should not rely on the value to determine how many bytes
will actually be written by mp_toradix(). The string mp_toradix()
creates will be NUL terminated, so the standard C library function
strlen() should be able to ascertain this for you, if you need it.
The mp_read_radix() and mp_toradix() functions support bases from 2 to
64 inclusive. If you require more general radix conversion facilities
than this, you will need to write them yourself (that's why mp_div_d()
is provided, after all).
Note: mp_read_radix() will accept as digits either capital or
---- lower-case letters. However, the current implementation of
mp_toradix() only outputs upper-case letters, when writing
bases betwee 10 and 36. The underlying code supports using
lower-case letters, but the interface stub does not have a
selector for it. You can add one yourself if you think it
is worthwhile -- I do not. Bases from 36 to 64 use lower-
case letters as distinct from upper-case. Bases 63 and
64 use the characters '+' and '/' as digits.
Note also that compiling with MP_IOFUNC defined will cause
inclusion of <stdio.h>, so if you are trying to write code
which does not depend on the standard C library, you will
probably want to avoid this option. This is needed because
the mp_print() function takes a standard library FILE * as
one of its parameters, and uses the fprintf() function.
The mp_toraw() function converts the integer to a sequence of bytes,
in big-endian ordering (most-significant byte first). Assuming your
bytes are 8 bits wide, this corresponds to base 256. The sign is
encoded as a single leading byte, whose value is 0 for zero or
positive values, or 1 for negative values. The mp_read_raw() function
reverses this process -- it takes a buffer of bytes, interprets the
first as a sign indicator (0 = zero/positive, nonzero = negative), and
the rest as a sequence of 1-byte digits in big-endian ordering.
The mp_raw_size() function returns the exact number of bytes required
to store the given integer in "raw" format (as described in the
previous paragraph). Zero is returned in case of error; a valid
integer will require at least three bytes of storage.
In previous versions of the MPI library, an "external representation
format" was supported. This was removed, however, because I found I
was never using it, it was not as portable as I would have liked, and
I decided it was a waste of space.
Other Functions
---------------
The files 'mpprime.h' and 'mpprime.c' define some routines which are
useful for divisibility testing and probabilistic primality testing.
The routines defined are:
mpp_divis(a, b) - is a divisible by b?
mpp_divis_d(a, d) - is a divisible by digit d?
mpp_random(a) - set a to random value at current precision
mpp_random_size(a, prec) - set a to random value at given precision
Note: The mpp_random() and mpp_random_size() functions use the C
---- library's rand() function to generate random values. It is
up to the caller to seed this generator before it is called.
These functions are not suitable for generating quantities
requiring cryptographic-quality randomness; they are intended
primarily for use in primality testing.
Note too that the MPI library does not call srand(), so your
application should do this, if you ever want the sequence
to change.
mpp_divis_vector(a, v, s, w) - is a divisible by any of the s digits
in v? If so, let w be the index of
that digit
mpp_divis_primes(a, np) - is a divisible by any of the first np
primes? If so, set np to the prime
which divided a.
mpp_fermat(a, d) - test if w^a = w (mod a). If so,
returns MP_YES, otherwise MP_NO.
mpp_pprime(a, nt) - perform nt iterations of the Rabin-
Miller probabilistic primality test
on a. Returns MP_YES if all tests
passed, or MP_NO if any test fails.
The mpp_fermat() function works based on Fermat's little theorem, a
consequence of which is that if p is a prime, and (w, p) = 1, then:
w^p = w (mod p)
Put another way, if w^p != w (mod p), then p is not prime. The test
is expensive to compute, but it helps to quickly eliminate an enormous
class of composite numbers prior to Rabin-Miller testing.
Building the Library
--------------------
The MPI library is designed to be as self-contained as possible. You
should be able to compile it with your favourite ANSI C compiler, and
link it into your program directly. If you are on a Unix system using
the GNU C compiler (gcc), the following should work:
% gcc -ansi -pedantic -Wall -O2 -c mpi.c
The file 'mpi-config.h' defines several configurable parameters for
the library, which you can adjust to suit your application. At the
time of this writing, the available options are:
MP_IOFUNC - Define true to include the mp_print() function,
which is moderately useful for debugging. This
implicitly includes <stdio.h>.
MP_MODARITH - Define true to include the modular arithmetic
functions. If you don't need modular arithmetic
in your application, you can set this to zero to
leave out all the modular routines.
MP_NUMTH - Define true to include number theoretic functions
such as mp_gcd(), mp_lcm(), and mp_invmod().
MP_LOGTAB - If true, the file "logtab.h" is included, which
is basically a static table of base 2 logarithms.
These are used to compute how big the buffers for
radix conversion need to be. If you set this false,
the library includes <math.h> and uses log(). This
typically forces you to link against math libraries.
MP_MEMSET - If true, use memset() to zero buffers. If you run
into weird alignment related bugs, set this to zero
and an explicit loop will be used.
MP_MEMCPY - If true, use memcpy() to copy buffers. If you run
into weird alignment bugs, set this to zero and an
explicit loop will be used.
MP_CRYPTO - If true, whenever arrays of digits are free'd, they
are zeroed first. This is useful if you're using
the library in a cryptographic environment; however,
it does add overhead to each free operation. For
performance, if you don't care about zeroing your
buffers, set this to false.
MP_ARGCHK - Set to 0, 1, or 2. This defines how the argument
checking macro, ARGCHK(), gets expanded. If this
is set to zero, ARGCHK() expands to nothing; no
argument checks are performed. If this is 1, the
ARGCHK() macro expands to code that returns MP_BADARG
or similar at runtime. If it is 2, ARGCHK() expands
to an assert() call that aborts the program on a
bad input.
MP_DEBUG - Turns on debugging output. This is probably not at
all useful unless you are debugging the library. It
tends to spit out a LOT of output.
MP_DEFPREC - The default precision of a newly-created mp_int, in
digits. The precision can be changed at runtime by
the mp_set_prec() function, but this is its initial
value.
MP_SQUARE - If this is set to a nonzero value, the mp_sqr()
function will use an alternate algorithm that takes
advantage of the redundant inner product computation
when both multiplicands are identical. Unfortunately,
with some compilers this is actually SLOWER than just
calling mp_mul() with the same argument twice. So
if you set MP_SQUARE to zero, mp_sqr() will be expan-
ded into a call to mp_mul(). This applies to all
the uses of mp_sqr(), including mp_sqrmod() and the
internal calls to s_mp_sqr() inside mpi.c
The program 'mulsqr' (mulsqr.c) can be used to test
which works best for your configuration. Set up the
CC and CFLAGS variables in the Makefile, then type:
make mulsqr
Invoke it with arguments similar to the following:
mulsqr 25000 1024
That is, 25000 products computed on 1024-bit values.
The output will compare the two timings, and recommend
a setting for MP_SQUARE. It is off by default.
If you would like to use the mp_print() function (see above), be sure
to define MP_IOFUNC in mpi-config.h. Many of the test drivers in the
'tests' subdirectory expect this to be defined (although the test
driver 'mpi-test' doesn't need it)
The Makefile which comes with the library should take care of building
the library for you, if you have set the CC and CFLAGS variables at
the top of the file appropriately. By default, they are set up to
use the GNU C compiler:
CC=gcc
CFLAGS=-ansi -pedantic -Wall -O2
If all goes well, the library should compile without warnings using
this combination. You should, of course, make whatever adjustments
you find necessary.
The MPI library distribution comes with several additional programs
which are intended to demonstrate the use of the library, and provide
a framework for testing it. There are a handful of test driver
programs, in the files named 'mptest-X.c', where X is a digit. Also,
there are some simple command-line utilities (in the 'utils'
directory) for manipulating large numbers. These include:
basecvt.c A radix-conversion program, supporting bases from
2 to 64 inclusive.
bbsrand.c A BBS (quadratic residue) pseudo-random number
generator. The file 'bbsrand.c' is just the driver
for the program; the real code lives in the files
'bbs_rand.h' and 'bbs_rand.c'
dec2hex.c Converts decimal to hexadecimal
gcd.c Computes the greatest common divisor of two values.
If invoked as 'xgcd', also computes constants x and
y such that (a, b) = ax + by, in accordance with
Bezout's identity.
hex2dec.c Converts hexadecimal to decimal
invmod.c Computes modular inverses
isprime.c Performs the Rabin-Miller probabilistic primality
test on a number. Values which fail this test are
definitely composite, and those which pass are very
likely to be prime (although there are no guarantees)
lap.c Computes the order (least annihilating power) of
a value v modulo m. Very dumb algorithm.
primegen.c Generates large (probable) primes.
prng.c A pseudo-random number generator based on the
BBS generator code in 'bbs_rand.c'
sieve.c Implements the Sieve of Eratosthenes, using a big
bitmap, to generate a list of prime numbers.
fact.c Computes the factorial of an arbitrary precision
integer (iterative).
exptmod.c Computes arbitrary precision modular exponentiation
from the command line (exptmod a b m -> a^b (mod m))
Most of these can be built from the Makefile that comes with the
library. Try 'make tools', if your environment supports it. (If you
are compiling on a Macintosh, I'm afraid you'll have to build them by
hand -- fortunately, this is not difficult -- the library itself
should compile just fine under Metrowerks CodeWarrior).
Testing the Library
-------------------
Automatic test vectors are included, in the form of a program called
'mpi-test'. To build this program and run all the tests, simply
invoke the shell script 'all-tests'. If all the tests pass, you
should see a message:
All tests passed
If something went wrong, you'll get:
One or more tests failed.
If this happens, scan back through the preceding lines, to see which
test failed. Any failure indicates a bug in the library, which needs
to be fixed before it will give accurate results. If you get any such
thing, please let me know, and I'll try to fix it. Please let me know
what platform and compiler you were using, as well as which test
failed. If a reason for failure was given, please send me that text
as well.
If you're on a system such as the Macintosh, where the standard Unix
build tools don't work, you can build the 'mpi-test' program manually,
and run it by hand. This is tedious and obnoxious, sorry.
Further manual testing can be performed by building the manual testing
programs, whose source is found in the 'tests' subdirectory. Each
test is in a source file called 'mptest-X.c'. The Makefile contains a
target to build all of them at once:
make tests
Read the comments at the top of each source file to see what the
driver is supposed to test. You probably don't need to do this; these
programs were only written to help me as I was developing the library.
The relevant files are:
mpi-test.c The source for the test driver
make-test-arrays A Perl script to generate some of the internal
data structures used by mpi-test.c
test-arrays.txt The source file for make-test-arrays
all-tests A Bourne shell script which runs all the
tests in the mpi-test suite
Running 'make mpi-test' should build the mpi-test program. If you
cannot use make, here is what needs to be done:
(1) Use 'make-test-arrays' to generate the file 'test-info.c' from
the 'test-arrays.txt' file. Since Perl can be found everywhere,
even on the Macintosh, this should be no trouble. Under Unix,
this looks like:
make-test-arrays test-arrays.txt > test-info.c
(2) Build the MPI library:
gcc -ansi -pedantic -Wall -c mpi.c
(3) Build the mpi-test program:
gcc -ansi -pedantic -Wall -o mpi-test mpi.o mpi-test.c
When you've got mpi-test, you can use 'all-tests' to run all the tests
made available by mpi-test. If any of them fail, there should be a
diagnostic indicating what went wrong. These are fairly high-level
diagnostics, and won't really help you debug the problem; they're
simply intended to help you isolate which function caused the problem.
If you encounter a problem of this sort, feel free to e-mail me, and I
will certainly attempt to help you debug it.
Note: Several of the tests hard-wired into 'mpi-test' operate under
---- the assumption that you are using at least a 16-bit mp_digit
type. If that is not true, several tests might fail, because
of range problems with the maximum digit value.
If you are using an 8-bit digit, you will also need to
modify the code for mp_read_raw(), which assumes that
multiplication by 256 can be done with mp_mul_d(), a
fact that fails when DIGIT_MAX is 255. You can replace
the call with s_mp_lshd(), which will give you the same
effect, and without doing as much work. :)
Acknowledgements:
----------------
The algorithms used in this library were drawn primarily from Volume
2 of Donald Knuth's magnum opus, _The Art of Computer Programming_,
"Semi-Numerical Methods". Barrett's algorithm for modular reduction
came from Menezes, Oorschot, and Vanstone's _Handbook of Applied
Cryptography_, Chapter 14.
Thanks are due to Tom St. Denis, for finding an obnoxious sign-related
bug in mp_read_raw() that made things break on platforms which use
signed chars.
About the Author
----------------
This software was written by Michael J. Fromberger. You can contact
the author as follows:
E-mail: <sting@linguist.dartmouth.edu>
Postal: 8000 Cummings Hall, Thayer School of Engineering
Dartmouth College, Hanover, New Hampshire, USA
PGP key: http://linguist.dartmouth.edu/~sting/keys/mjf.html
9736 188B 5AFA 23D6 D6AA BE0D 5856 4525 289D 9907
Last updated: 16-Jan-2000

View File

@@ -1,115 +0,0 @@
#!/bin/sh
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1997
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
ECHO=/bin/echo
MAKE=gmake
$ECHO "\n** Running unit tests for MPI library\n"
# Build the mpi-test program, which comprises all the unit tests for
# the MPI library...
$ECHO "Bringing mpi-test up to date ... "
if $MAKE mpi-test ; then
:
else
$ECHO " "
$ECHO "Make failed to build mpi-test."
$ECHO " "
exit 1
fi
if [ ! -x mpi-test ] ; then
$ECHO " "
$ECHO "Cannot find 'mpi-test' program, testing cannot continue."
$ECHO " "
exit 1
fi
# Get the list of available test suites...
tests=`mpi-test list | awk '{print $1}'`
errs=0
# Run each test suite and check the result code of mpi-test
for test in $tests ; do
$ECHO "$test ... \c"
if mpi-test $test ; then
$ECHO "passed"
else
$ECHO "FAILED"
errs=1
fi
done
# If any tests failed, we'll stop at this point
if [ "$errs" = "0" ] ; then
$ECHO "All unit tests passed"
else
$ECHO "One or more tests failed"
exit 1
fi
# Now try to build the 'pi' program, and see if it can compute the
# first thousand digits of pi correctly
$ECHO "\n** Running other tests\n"
$ECHO "Bringing 'pi' up to date ... "
if $MAKE pi ; then
:
else
$ECHO "\nMake failed to build pi.\n"
exit 1
fi
if [ ! -x pi ] ; then
$ECHO "\nCannot find 'pi' program; testing cannot continue.\n"
exit 1
fi
./pi 2000 > /tmp/pi.tmp.$$
if cmp tests/pi2k.txt /tmp/pi.tmp.$$ ; then
$ECHO "Okay! The pi test passes."
else
$ECHO "Oops! The pi test failed. :("
exit 1
fi
rm -f /tmp/pi.tmp.$$
exit 0
# Here there be dragons

View File

@@ -1,11 +0,0 @@
Within this directory, each of the file listed below is licensed under
the terms given in the file LICENSE-MPL, also in this directory.
basecvt.pod
gcd.pod
invmod.pod
isprime.pod
lap.pod
mpi-test.pod
prime.txt
prng.pod

View File

@@ -1,32 +0,0 @@
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is the Netscape security libraries.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1994-2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License Version 2 or later (the
"GPL"), in which case the provisions of the GPL are applicable
instead of those above. If you wish to allow use of your
version of this file only under the terms of the GPL and not to
allow others to use your version of this file under the MPL,
indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by
the GPL. If you do not delete the provisions above, a recipient
may use your version of this file under either the MPL or the
GPL.

View File

@@ -1,63 +0,0 @@
=head1 NAME
basecvt - radix conversion for arbitrary precision integers
=head1 SYNOPSIS
basecvt <ibase> <obase> [values]
=head1 DESCRIPTION
The B<basecvt> program is a command-line tool for converting integers
of arbitrary precision from one radix to another. The current version
supports radix values from 2 (binary) to 64, inclusive. The first two
command line arguments specify the input and output radix, in base 10.
Any further arguments are taken to be integers notated in the input
radix, and these are converted to the output radix. The output is
written, one integer per line, to standard output.
When reading integers, only digits considered "valid" for the input
radix are considered. Processing of an integer terminates when an
invalid input digit is encountered. So, for example, if you set the
input radix to 10 and enter '10ACF', B<basecvt> would assume that you
had entered '10' and ignore the rest of the string.
If no values are provided, no output is written, but the program
simply terminates with a zero exit status. Error diagnostics are
written to standard error in the event of out-of-range radix
specifications. Regardless of the actual values of the input and
output radix, the radix arguments are taken to be in base 10 (decimal)
notation.
=head1 DIGITS
For radices from 2-10, standard ASCII decimal digits 0-9 are used for
both input and output. For radices from 11-36, the ASCII letters A-Z
are also included, following the convention used in hexadecimal. In
this range, input is accepted in either upper or lower case, although
on output only lower-case letters are used.
For radices from 37-62, the output includes both upper- and lower-case
ASCII letters, and case matters. In this range, case is distinguished
both for input and for output values.
For radices 63 and 64, the characters '+' (plus) and '/' (forward
solidus) are also used. These are derived from the MIME base64
encoding scheme. The overall encoding is not the same as base64,
because the ASCII digits are used for the bottom of the range, and the
letters are shifted upward; however, the output will consist of the
same character set.
This input and output behaviour is inherited from the MPI library used
by B<basecvt>, and so is not configurable at runtime.
=head1 SEE ALSO
dec2hex(1), hex2dec(1)
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Thayer School of Engineering, Hanover, New Hampshire, USA
$Date: 2000-07-14 00:44:31 $

View File

@@ -1,66 +0,0 @@
#!/bin/sh
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Netscape Communications Corporation
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: build,v 1.3 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
VERS="1.7p6"
SECT="1"
NAME="MPI Tools"
echo "Building manual pages ..."
case $# in
0)
files=`ls *.pod`
;;
*)
files=$*
;;
esac
for name in $files
do
echo -n "$name ... "
# sname=`noext $name`
sname=`basename $name .pod`
pod2man --section="$SECT" --center="$NAME" --release="$VERS" $name > $sname.$SECT
echo "(done)"
done
echo "Finished building."

View File

@@ -1,101 +0,0 @@
Division
This describes the division algorithm used by the MPI library.
Input: a, b; a > b
Compute: Q, R; a = Qb + R
The input numbers are normalized so that the high-order digit of b is
at least half the radix. This guarantees that we have a reasonable
way to guess at the digits of the quotient (this method was taken from
Knuth, vol. 2, with adaptations).
To normalize, test the high-order digit of b. If it is less than half
the radix, multiply both a and b by d, where:
radix - 1
d = -----------
bmax + 1
...where bmax is the high-order digit of b. Otherwise, set d = 1.
Given normalize values for a and b, let the notation a[n] denote the
nth digit of a. Let #a be the number of significant figures of a (not
including any leading zeroes).
Let R = 0
Let p = #a - 1
while(p >= 0)
do
R = (R * radix) + a[p]
p = p - 1
while(R < b and p >= 0)
if(R < b)
break
q = (R[#R - 1] * radix) + R[#R - 2]
q = q / b[#b - 1]
T = b * q
while(T > L)
q = q - 1
T = T - b
endwhile
L = L - T
Q = (Q * radix) + q
endwhile
At this point, Q is the quotient, and R is the normalized remainder.
To denormalize R, compute:
R = (R / d)
At this point, you are finished.
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: div.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,132 +0,0 @@
Exponentiation
For exponentiation, the MPI library uses a simple and fairly standard
square-and-multiply method. The algorithm is this:
Input: a, b
Output: a ** b
s = 1
while(b != 0)
if(b is odd)
s = s * a
endif
b = b / 2
x = x * x
endwhile
return s
The modular exponentiation is done the same way, except replacing:
s = s * a
with
s = (s * a) mod m
and replacing
x = x * x
with
x = (x * x) mod m
Here is a sample exponentiation using the MPI library, as compared to
the same problem solved by the Unix 'bc' program on my system:
Computation of 2,381,283 ** 235
'bc' says:
4385CA4A804D199FBEAD95FAD0796FAD0D0B51FC9C16743C45568C789666985DB719\
4D90E393522F74C9601262C0514145A49F3B53D00983F95FDFCEA3D0043ECEF6227E\
6FB59C924C3EE74447B359B5BF12A555D46CB819809EF423F004B55C587D6F0E8A55\
4988036A42ACEF9F71459F97CEF6E574BD7373657111648626B1FF8EE15F663B2C0E\
6BBE5082D4CDE8E14F263635AE8F35DB2C280819517BE388B5573B84C5A19C871685\
FD408A6471F9D6AFAF5129A7548EAE926B40874B340285F44765BF5468CE20A13267\
CD88CE6BC786ACED36EC7EA50F67FF27622575319068A332C3C0CB23E26FB55E26F4\
5F732753A52B8E2FB4D4F42D894242613CA912A25486C3DEC9C66E5DB6182F6C1761\
CF8CD0D255BE64B93836B27D452AE38F950EB98B517D4CF50D48F0165EF0CCCE1F5C\
49BF18219FDBA0EEDD1A7E8B187B70C2BAED5EC5C6821EF27FAFB1CFF70111C52235\
5E948B93A015AA1AE152B110BB5658CB14D3E45A48BFE7F082C1182672A455A695CD\
A1855E8781E625F25B41B516E77F589FA420C3B058861EA138CF7A2C58DB3C7504FD\
D29554D78237834CC5AE710D403CC4F6973D5012B7E117A8976B14A0B5AFA889BD47\
92C461F0F96116F00A97AE9E83DC5203680CAF9A18A062566C145650AB86BE4F907F\
A9F7AB4A700B29E1E5BACCD6DCBFA513E10832815F710807EED2E279081FEC61D619\
AB270BEB3D3A1787B35A9DD41A8766CF21F3B5C693B3BAB1C2FA14A4ED202BC35743\
E5CBE2391624D4F8C9BFBBC78D69764E7C6C5B11BF005677BFAD17D9278FFC1F158F\
1B3683FF7960FA0608103792C4163DC0AF3E06287BB8624F8FE3A0FFBDF82ACECA2F\
CFFF2E1AC93F3CA264A1B
MPI says:
4385CA4A804D199FBEAD95FAD0796FAD0D0B51FC9C16743C45568C789666985DB719\
4D90E393522F74C9601262C0514145A49F3B53D00983F95FDFCEA3D0043ECEF6227E\
6FB59C924C3EE74447B359B5BF12A555D46CB819809EF423F004B55C587D6F0E8A55\
4988036A42ACEF9F71459F97CEF6E574BD7373657111648626B1FF8EE15F663B2C0E\
6BBE5082D4CDE8E14F263635AE8F35DB2C280819517BE388B5573B84C5A19C871685\
FD408A6471F9D6AFAF5129A7548EAE926B40874B340285F44765BF5468CE20A13267\
CD88CE6BC786ACED36EC7EA50F67FF27622575319068A332C3C0CB23E26FB55E26F4\
5F732753A52B8E2FB4D4F42D894242613CA912A25486C3DEC9C66E5DB6182F6C1761\
CF8CD0D255BE64B93836B27D452AE38F950EB98B517D4CF50D48F0165EF0CCCE1F5C\
49BF18219FDBA0EEDD1A7E8B187B70C2BAED5EC5C6821EF27FAFB1CFF70111C52235\
5E948B93A015AA1AE152B110BB5658CB14D3E45A48BFE7F082C1182672A455A695CD\
A1855E8781E625F25B41B516E77F589FA420C3B058861EA138CF7A2C58DB3C7504FD\
D29554D78237834CC5AE710D403CC4F6973D5012B7E117A8976B14A0B5AFA889BD47\
92C461F0F96116F00A97AE9E83DC5203680CAF9A18A062566C145650AB86BE4F907F\
A9F7AB4A700B29E1E5BACCD6DCBFA513E10832815F710807EED2E279081FEC61D619\
AB270BEB3D3A1787B35A9DD41A8766CF21F3B5C693B3BAB1C2FA14A4ED202BC35743\
E5CBE2391624D4F8C9BFBBC78D69764E7C6C5B11BF005677BFAD17D9278FFC1F158F\
1B3683FF7960FA0608103792C4163DC0AF3E06287BB8624F8FE3A0FFBDF82ACECA2F\
CFFF2E1AC93F3CA264A1B
Diff says:
% diff bc.txt mp.txt
%
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: expt.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,27 +0,0 @@
=head1 NAME
gcd - compute greatest common divisor of two integers
=head1 SYNOPSIS
gcd <a> <b>
=head1 DESCRIPTION
The B<gcd> program computes the greatest common divisor of two
arbitrary-precision integers I<a> and I<b>. The result is written in
standard decimal notation to the standard output.
If I<b> is zero, B<gcd> will print an error message and exit.
=head1 SEE ALSO
invmod(1), isprime(1), lap(1)
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Thayer School of Engineering, Hanover, New Hampshire, USA
$Date: 2000-07-14 00:44:32 $

View File

@@ -1,33 +0,0 @@
=head1 NAME
invmod - compute modular inverse of an integer
=head1 SYNOPSIS
invmod <a> <m>
=head1 DESCRIPTION
The B<invmod> program computes the inverse of I<a>, modulo I<m>, if
that inverse exists. Both I<a> and I<m> are arbitrary-precision
integers in decimal notation. The result is written in standard
decimal notation to the standard output.
If there is no inverse, the message:
No inverse
...will be printed to the standard output (an inverse exists if and
only if the greatest common divisor of I<a> and I<m> is 1).
=head1 SEE ALSO
gcd(1), isprime(1), lap(1)
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Thayer School of Engineering, Hanover, New Hampshire, USA
$Date: 2000-07-14 00:44:33 $

View File

@@ -1,62 +0,0 @@
=head1 NAME
isprime - probabilistic primality testing
=head1 SYNOPSIS
isprime <a>
=head1 DESCRIPTION
The B<isprime> program attempts to determine whether the arbitrary
precision integer I<a> is prime. It first tests I<a> for divisibility
by the first 170 or so small primes, and assuming I<a> is not
divisible by any of these, applies 15 iterations of the Rabin-Miller
probabilistic primality test.
If the program discovers that the number is composite, it will print:
Not prime (reason)
Where I<reason> is either:
divisible by small prime x
Or:
failed nth pseudoprime test
In the first case, I<x> indicates the first small prime factor that
was found. In the second case, I<n> indicates which of the
pseudoprime tests failed (numbered from 1)
If this happens, the number is definitely not prime. However, if the
number succeeds, this message results:
Probably prime, 1 in 4^15 chance of false positive
If this happens, the number is prime with very high probability, but
its primality has not been absolutely proven, only demonstrated to a
very convincing degree.
The value I<a> can be input in standard decimal notation, or, if it is
prefixed with I<Ox>, it will be read as hexadecimal.
=head1 ENVIRONMENT
You can control how many iterations of Rabin-Miller are performed on
the candidate number by setting the I<RM_TESTS> environment variable
to an integer value before starting up B<isprime>. This will change
the output slightly if the number passes all the tests.
=head1 SEE ALSO
gcd(1), invmod(1), lap(1)
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Thayer School of Engineering, Hanover, New Hampshire, USA
$Date: 2000-07-14 00:44:33 $

View File

@@ -1,35 +0,0 @@
=head1 NAME
lap - compute least annihilating power of a number
=head1 SYNOPSIS
lap <a> <m>
=head1 DESCRIPTION
The B<lap> program computes the order of I<a> modulo I<m>, for
arbitrary precision integers I<a> and I<m>. The B<order> of I<a>
modulo I<m> is defined as the smallest positive value I<n> for which
I<a> raised to the I<n>th power, modulo I<m>, is equal to 1. The
order may not exist, if I<m> is composite.
=head1 RESTRICTIONS
This program is very slow, especially for large moduli. It is
intended as a way to help find primitive elements in a modular field,
but it does not do so in a particularly inefficient manner. It was
written simply to help verify that a particular candidate does not
have an obviously short cycle mod I<m>.
=head1 SEE ALSO
gcd(1), invmod(1), isprime(1)
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Thayer School of Engineering, Hanover, New Hampshire, USA
$Date: 2000-07-14 00:44:34 $

View File

@@ -1,49 +0,0 @@
=head1 NAME
mpi-test - automated test program for MPI library
=head1 SYNOPSIS
mpi-test <suite-name> [quiet]
mpi-test list
mpi-test help
=head1 DESCRIPTION
The B<mpi-test> program is a general unit test driver for the MPI
library. It is used to verify that the library works as it is
supposed to on your architecture. As with most such things, passing
all the tests in B<mpi-test> does not guarantee the code is correct,
but if any of them fail, there are certainly problems.
Each major function of the library can be tested individually. For a
list of the test suites understood by B<mpi-test>, run it with the
I<list> command line option:
mpi-test list
This will display a list of the available test suites and a brief
synopsis of what each one does. For a brief overview of this
document, run B<mpi-test> I<help>.
B<mpi-test> exits with a zero status if the selected test succeeds, or
a nonzero status if it fails. If a I<suite-name> which is not
understood by B<mpi-test> is given, a diagnostic is printed to the
standard error, and the program exits with a result code of 2. If a
test fails, the result code will be 1, and a diagnostic is ordinarily
printed to the standard error. However, if the I<quiet> option is
provided, these diagnostics will be suppressed.
=head1 RESTRICTIONS
Only a few canned test cases are provided. The solutions have been
verified using the GNU bc(1) program, so bugs there may cause problems
here; however, this is very unlikely, so if a test fails, it is almost
certainly my fault, not bc(1)'s.
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Thayer School of Engineering, Hanover, New Hampshire, USA
$Date: 2000-07-14 00:44:34 $

View File

@@ -1,114 +0,0 @@
Multiplication
This describes the multiplication algorithm used by the MPI library.
This is basically a standard "schoolbook" algorithm. It is slow --
O(mn) for m = #a, n = #b -- but easy to implement and verify.
Basically, we run two nested loops, as illustrated here (R is the
radix):
k = 0
for j <- 0 to (#b - 1)
for i <- 0 to (#a - 1)
w = (a[j] * b[i]) + k + c[i+j]
c[i+j] = w mod R
k = w div R
endfor
c[i+j] = k;
k = 0;
endfor
It is necessary that 'w' have room for at least two radix R digits.
The product of any two digits in radix R is at most:
(R - 1)(R - 1) = R^2 - 2R + 1
Since a two-digit radix-R number can hold R^2 - 1 distinct values,
this insures that the product will fit into the two-digit register.
To insure that two digits is enough for w, we must also show that
there is room for the carry-in from the previous multiplication, and
the current value of the product digit that is being recomputed.
Assuming each of these may be as big as R - 1 (and no larger,
certainly), two digits will be enough if and only if:
(R^2 - 2R + 1) + 2(R - 1) <= R^2 - 1
Solving this equation shows that, indeed, this is the case:
R^2 - 2R + 1 + 2R - 2 <= R^2 - 1
R^2 - 1 <= R^2 - 1
This suggests that a good radix would be one more than the largest
value that can be held in half a machine word -- so, for example, as
in this implementation, where we used a radix of 65536 on a machine
with 4-byte words. Another advantage of a radix of this sort is that
binary-level operations are easy on numbers in this representation.
Here's an example multiplication worked out longhand in radix-10,
using the above algorithm:
a = 999
b = x 999
-------------
p = 98001
w = (a[jx] * b[ix]) + kin + c[ix + jx]
c[ix+jx] = w % RADIX
k = w / RADIX
product
ix jx a[jx] b[ix] kin w c[i+j] kout 000000
0 0 9 9 0 81+0+0 1 8 000001
0 1 9 9 8 81+8+0 9 8 000091
0 2 9 9 8 81+8+0 9 8 000991
8 0 008991
1 0 9 9 0 81+0+9 0 9 008901
1 1 9 9 9 81+9+9 9 9 008901
1 2 9 9 9 81+9+8 8 9 008901
9 0 098901
2 0 9 9 0 81+0+9 0 9 098001
2 1 9 9 9 81+9+8 8 9 098001
2 2 9 9 9 81+9+9 9 9 098001
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: mul.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,90 +0,0 @@
This file describes how pi is computed by the program in 'pi.c' (see
the utils subdirectory).
Basically, we use Machin's formula, which is what everyone in the
world uses as a simple method for computing approximations to pi.
This works for up to a few thousand digits without too much effort.
Beyond that, though, it gets too slow.
Machin's formula states:
pi := 16 * arctan(1/5) - 4 * arctan(1/239)
We compute this in integer arithmetic by first multiplying everything
through by 10^d, where 'd' is the number of digits of pi we wanted to
compute. It turns out, the last few digits will be wrong, but the
number that are wrong is usually very small (ordinarly only 2-3).
Having done this, we compute the arctan() function using the formula:
1 1 1 1 1
arctan(1/x) := --- - ----- + ----- - ----- + ----- - ...
x 3 x^3 5 x^5 7 x^7 9 x^9
This is done iteratively by computing the first term manually, and
then iteratively dividing x^2 and k, where k = 3, 5, 7, ... out of the
current figure. This is then added to (or subtracted from) a running
sum, as appropriate. The iteration continues until we overflow our
available precision and the current figure goes to zero under integer
division. At that point, we're finished.
Actually, we get a couple extra bits of precision out of the fact that
we know we're computing y * arctan(1/x), by setting up the multiplier
as:
y * 10^d
... instead of just 10^d. There is also a bit of cleverness in how
the loop is constructed, to avoid special-casing the first term.
Check out the code for arctan() in 'pi.c', if you are interested in
seeing how it is set up.
Thanks to Jason P. for this algorithm, which I assembled from notes
and programs found on his cool "Pile of Pi Programs" page, at:
http://www.isr.umd.edu/~jasonp/pipage.html
Thanks also to Henrik Johansson <Henrik.Johansson@Nexus.Comm.SE>, from
whose pi program I borrowed the clever idea of pre-multiplying by x in
order to avoid a special case on the loop iteration.
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: pi.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +0,0 @@
=head1 NAME
prng - pseudo-random number generator
=head1 SYNOPSIS
prng [count]
=head1 DESCRIPTION
B<Prng> generates 32-bit pseudo-random integers using the
Blum-Blum-Shub (BBS) quadratic residue generator. It is seeded using
the standard C library's rand() function, which itself seeded from the
system clock and the process ID number. Thus, the values generated
are not particularly useful for cryptographic applications, but they
are in general much better than the typical output of the usual
multiplicative congruency generator used by most runtime libraries.
You may optionally specify how many random values should be generated
by giving a I<count> argument on the command line. If you do not
specify a count, only one random value will be generated. The results
are output to the standard output in decimal notation, one value per
line.
=head1 RESTRICTIONS
As stated above, B<prng> uses the C library's rand() function to seed
the generator, so it is not terribly suitable for cryptographic
applications. Also note that each time you run the program, a new
seed is generated, so it is better to run it once with a I<count>
parameter than it is to run it multiple times to generate several
values.
=head1 AUTHOR
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Copyright (C) 1998 Michael J. Fromberger, All Rights Reserved
Thayer School of Engineering, Dartmouth College, Hanover, NH USA
$Date: 2000-07-14 00:44:36 $

View File

@@ -1,121 +0,0 @@
Modular Reduction
Usually, modular reduction is accomplished by long division, using the
mp_div() or mp_mod() functions. However, when performing modular
exponentiation, you spend a lot of time reducing by the same modulus
again and again. For this purpose, doing a full division for each
multiplication is quite inefficient.
For this reason, the mp_exptmod() function does not perform modular
reductions in the usual way, but instead takes advantage of an
algorithm due to Barrett, as described by Menezes, Oorschot and
VanStone in their book _Handbook of Applied Cryptography_, published
by the CRC Press (see Chapter 14 for details). This method reduces
most of the computation of reduction to efficient shifting and masking
operations, and avoids the multiple-precision division entirely.
Here is a brief synopsis of Barrett reduction, as it is implemented in
this library.
Let b denote the radix of the computation (one more than the maximum
value that can be denoted by an mp_digit). Let m be the modulus, and
let k be the number of significant digits of m. Let x be the value to
be reduced modulo m. By the Division Theorem, there exist unique
integers Q and R such that:
x = Qm + R, 0 <= R < m
Barrett reduction takes advantage of the fact that you can easily
approximate Q to within two, given a value M such that:
2k
b
M = floor( ----- )
m
Computation of M requires a full-precision division step, so if you
are only doing a single reduction by m, you gain no advantage.
However, when multiple reductions by the same m are required, this
division need only be done once, beforehand. Using this, we can use
the following equation to compute Q', an approximation of Q:
x
floor( ------ ) M
k-1
b
Q' = floor( ----------------- )
k+1
b
The divisions by b^(k-1) and b^(k+1) and the floor() functions can be
efficiently implemented with shifts and masks, leaving only a single
multiplication to be performed to get this approximation. It can be
shown that Q - 2 <= Q' <= Q, so in the worst case, we can get out with
two additional subtractions to bring the value into line with the
actual value of Q.
Once we've got Q', we basically multiply that by m and subtract from
x, yielding:
x - Q'm = Qm + R - Q'm
Since we know the constraint on Q', this is one of:
R
m + R
2m + R
Since R < m by the Division Theorem, we can simply subtract off m
until we get a value in the correct range, which will happen with no
more than 2 subtractions:
v = x - Q'm
while(v >= m)
v = v - m
endwhile
In random performance trials, modular exponentiation using this method
of reduction gave around a 40% speedup over using the division for
reduction.
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: redux.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,87 +0,0 @@
Square Root
A simple iterative algorithm is used to compute the greatest integer
less than or equal to the square root. Essentially, this is Newton's
linear approximation, computed by finding successive values of the
equation:
x[k]^2 - V
x[k+1] = x[k] - ------------
2 x[k]
...where V is the value for which the square root is being sought. In
essence, what is happening here is that we guess a value for the
square root, then figure out how far off we were by squaring our guess
and subtracting the target. Using this value, we compute a linear
approximation for the error, and adjust the "guess". We keep doing
this until the precision gets low enough that the above equation
yields a quotient of zero. At this point, our last guess is one
greater than the square root we're seeking.
The initial guess is computed by dividing V by 4, which is a heuristic
I have found to be fairly good on average. This also has the
advantage of being very easy to compute efficiently, even for large
values.
So, the resulting algorithm works as follows:
x = V / 4 /* compute initial guess */
loop
t = (x * x) - V /* Compute absolute error */
u = 2 * x /* Adjust by tangent slope */
t = t / u
/* Loop is done if error is zero */
if(t == 0)
break
/* Adjust guess by error term */
x = x - t
end
x = x - 1
The result of the computation is the value of x.
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: sqrt.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,109 +0,0 @@
Squaring Algorithm
When you are squaring a value, you can take advantage of the fact that
half the multiplications performed by the more general multiplication
algorithm (see 'mul.txt' for a description) are redundant when the
multiplicand equals the multiplier.
In particular, the modified algorithm is:
k = 0
for j <- 0 to (#a - 1)
w = c[2*j] + (a[j] ^ 2);
k = w div R
for i <- j+1 to (#a - 1)
w = (2 * a[j] * a[i]) + k + c[i+j]
c[i+j] = w mod R
k = w div R
endfor
c[i+j] = k;
k = 0;
endfor
On the surface, this looks identical to the multiplication algorithm;
however, note the following differences:
- precomputation of the leading term in the outer loop
- i runs from j+1 instead of from zero
- doubling of a[i] * a[j] in the inner product
Unfortunately, the construction of the inner product is such that we
need more than two digits to represent the inner product, in some
cases. In a C implementation, this means that some gymnastics must be
performed in order to handle overflow, for which C has no direct
abstraction. We do this by observing the following:
If we have multiplied a[i] and a[j], and the product is more than half
the maximum value expressible in two digits, then doubling this result
will overflow into a third digit. If this occurs, we take note of the
overflow, and double it anyway -- C integer arithmetic ignores
overflow, so the two digits we get back should still be valid, modulo
the overflow.
Having doubled this value, we now have to add in the remainders and
the digits already computed by earlier steps. If we did not overflow
in the previous step, we might still cause an overflow here. That
will happen whenever the maximum value expressible in two digits, less
the amount we have to add, is greater than the result of the previous
step. Thus, the overflow computation is:
u = 0
w = a[i] * a[j]
if(w > (R - 1)/ 2)
u = 1;
w = w * 2
v = c[i + j] + k
if(u == 0 && (R - 1 - v) < w)
u = 1
If there is an overflow, u will be 1, otherwise u will be 0. The rest
of the parameters are the same as they are in the above description.
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: square.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,250 +0,0 @@
MPI Library Timing Tests
Hardware/OS
(A) SGI O2 1 x MIPS R10000 250MHz IRIX 6.5.3
(B) IBM RS/6000 43P-240 1 x PowerPC 603e 223MHz AIX 4.3
(C) Dell GX1/L+ 1 x Pentium III 550MHz Linux 2.2.12-20
(D) PowerBook G3 1 x PowerPC 750 266MHz LinuxPPC 2.2.6-15apmac
(E) PowerBook G3 1 x PowerPC 750 266MHz MacOS 8.5.1
(F) PowerBook G3 1 x PowerPC 750 400MHz MacOS 9.0.2
Compiler
(1) MIPSpro C 7.2.1 -O3 optimizations
(2) GCC 2.95.1 -O3 optimizations
(3) IBM AIX xlc -O3 optimizations (version unknown)
(4) EGCS 2.91.66 -O3 optimizations
(5) Metrowerks CodeWarrior 5.0 C, all optimizations
(6) MIPSpro C 7.30 -O3 optimizations
(7) same as (6), with optimized libmalloc.so
Timings are given in seconds, computed using the C library's clock()
function. The first column gives the hardware and compiler
configuration used for the test. The second column indicates the
number of tests that were aggregated to get the statistics for that
size. These were compiled using 16 bit digits.
Source data were generated randomly using a fixed seed, so they should
be internally consistent, but may vary on different systems depending
on the C library. Also, since the resolution of the timer accessed by
clock() varies, there may be some variance in the precision of these
measurements.
Prime Generation (primegen)
128 bits:
A1 200 min=0.03, avg=0.19, max=0.72, sum=38.46
A2 200 min=0.02, avg=0.16, max=0.62, sum=32.55
B3 200 min=0.01, avg=0.07, max=0.22, sum=13.29
C4 200 min=0.00, avg=0.03, max=0.20, sum=6.14
D4 200 min=0.00, avg=0.05, max=0.33, sum=9.70
A6 200 min=0.01, avg=0.09, max=0.36, sum=17.48
A7 200 min=0.00, avg=0.05, max=0.24, sum=10.07
192 bits:
A1 200 min=0.05, avg=0.45, max=3.13, sum=89.96
A2 200 min=0.04, avg=0.39, max=2.61, sum=77.55
B3 200 min=0.02, avg=0.18, max=1.25, sum=36.97
C4 200 min=0.01, avg=0.09, max=0.33, sum=18.24
D4 200 min=0.02, avg=0.15, max=0.54, sum=29.63
A6 200 min=0.02, avg=0.24, max=1.70, sum=47.84
A7 200 min=0.01, avg=0.15, max=1.05, sum=30.88
256 bits:
A1 200 min=0.08, avg=0.92, max=6.13, sum=184.79
A2 200 min=0.06, avg=0.76, max=5.03, sum=151.11
B3 200 min=0.04, avg=0.41, max=2.68, sum=82.35
C4 200 min=0.02, avg=0.19, max=0.69, sum=37.91
D4 200 min=0.03, avg=0.31, max=1.15, sum=63.00
A6 200 min=0.04, avg=0.48, max=3.13, sum=95.46
A7 200 min=0.03, avg=0.37, max=2.36, sum=73.60
320 bits:
A1 200 min=0.11, avg=1.59, max=6.14, sum=318.81
A2 200 min=0.09, avg=1.27, max=4.93, sum=254.03
B3 200 min=0.07, avg=0.82, max=3.13, sum=163.80
C4 200 min=0.04, avg=0.44, max=1.91, sum=87.59
D4 200 min=0.06, avg=0.73, max=3.22, sum=146.73
A6 200 min=0.07, avg=0.93, max=3.50, sum=185.01
A7 200 min=0.05, avg=0.76, max=2.94, sum=151.78
384 bits:
A1 200 min=0.16, avg=2.69, max=11.41, sum=537.89
A2 200 min=0.13, avg=2.15, max=9.03, sum=429.14
B3 200 min=0.11, avg=1.54, max=6.49, sum=307.78
C4 200 min=0.06, avg=0.81, max=4.84, sum=161.13
D4 200 min=0.10, avg=1.38, max=8.31, sum=276.81
A6 200 min=0.11, avg=1.73, max=7.36, sum=345.55
A7 200 min=0.09, avg=1.46, max=6.12, sum=292.02
448 bits:
A1 200 min=0.23, avg=3.36, max=15.92, sum=672.63
A2 200 min=0.17, avg=2.61, max=12.25, sum=522.86
B3 200 min=0.16, avg=2.10, max=9.83, sum=420.86
C4 200 min=0.09, avg=1.44, max=7.64, sum=288.36
D4 200 min=0.16, avg=2.50, max=13.29, sum=500.17
A6 200 min=0.15, avg=2.31, max=10.81, sum=461.58
A7 200 min=0.14, avg=2.03, max=9.53, sum=405.16
512 bits:
A1 200 min=0.30, avg=6.12, max=22.18, sum=1223.35
A2 200 min=0.25, avg=4.67, max=16.90, sum=933.18
B3 200 min=0.23, avg=4.13, max=14.94, sum=825.45
C4 200 min=0.13, avg=2.08, max=9.75, sum=415.22
D4 200 min=0.24, avg=4.04, max=20.18, sum=808.11
A6 200 min=0.22, avg=4.47, max=16.19, sum=893.83
A7 200 min=0.20, avg=4.03, max=14.65, sum=806.02
Modular Exponentation (metime)
The following results are aggregated from 200 pseudo-randomly
generated tests, based on a fixed seed.
base, exponent, and modulus size (bits)
P/C 128 192 256 320 384 448 512 640 768 896 1024
------- -----------------------------------------------------------------
A1 0.015 0.027 0.047 0.069 0.098 0.133 0.176 0.294 0.458 0.680 1.040
A2 0.013 0.024 0.037 0.053 0.077 0.102 0.133 0.214 0.326 0.476 0.668
B3 0.005 0.011 0.021 0.036 0.056 0.084 0.121 0.222 0.370 0.573 0.840
C4 0.002 0.006 0.011 0.020 0.032 0.048 0.069 0.129 0.223 0.344 0.507
D4 0.004 0.010 0.019 0.034 0.056 0.085 0.123 0.232 0.390 0.609 0.899
E5 0.007 0.015 0.031 0.055 0.088 0.133 0.183 0.342 0.574 0.893 1.317
A6 0.008 0.016 0.038 0.042 0.064 0.093 0.133 0.239 0.393 0.604 0.880
A7 0.005 0.011 0.020 0.036 0.056 0.083 0.121 0.223 0.374 0.583 0.855
Multiplication and Squaring tests, (mulsqr)
The following results are aggregated from 500000 pseudo-randomly
generated tests, based on a per-run wall-clock seed. Times are given
in seconds, except where indicated in microseconds (us).
(A1)
bits multiply square ad percent time/mult time/square
64 9.33 9.15 > 1.9 18.7us 18.3us
128 10.88 10.44 > 4.0 21.8us 20.9us
192 13.30 11.89 > 10.6 26.7us 23.8us
256 14.88 12.64 > 15.1 29.8us 25.3us
320 18.64 15.01 > 19.5 37.3us 30.0us
384 23.11 17.70 > 23.4 46.2us 35.4us
448 28.28 20.88 > 26.2 56.6us 41.8us
512 34.09 24.51 > 28.1 68.2us 49.0us
640 47.86 33.25 > 30.5 95.7us 66.5us
768 64.91 43.54 > 32.9 129.8us 87.1us
896 84.49 55.48 > 34.3 169.0us 111.0us
1024 107.25 69.21 > 35.5 214.5us 138.4us
1536 227.97 141.91 > 37.8 456.0us 283.8us
2048 394.05 242.15 > 38.5 788.1us 484.3us
(A2)
bits multiply square ad percent time/mult time/square
64 7.87 7.95 < 1.0 15.7us 15.9us
128 9.40 9.19 > 2.2 18.8us 18.4us
192 11.15 10.59 > 5.0 22.3us 21.2us
256 12.02 11.16 > 7.2 24.0us 22.3us
320 14.62 13.43 > 8.1 29.2us 26.9us
384 17.72 15.80 > 10.8 35.4us 31.6us
448 21.24 18.51 > 12.9 42.5us 37.0us
512 25.36 21.78 > 14.1 50.7us 43.6us
640 34.57 29.00 > 16.1 69.1us 58.0us
768 46.10 37.60 > 18.4 92.2us 75.2us
896 58.94 47.72 > 19.0 117.9us 95.4us
1024 73.76 59.12 > 19.8 147.5us 118.2us
1536 152.00 118.80 > 21.8 304.0us 237.6us
2048 259.41 199.57 > 23.1 518.8us 399.1us
(B3)
bits multiply square ad percent time/mult time/square
64 2.60 2.47 > 5.0 5.20us 4.94us
128 4.43 4.06 > 8.4 8.86us 8.12us
192 7.03 6.10 > 13.2 14.1us 12.2us
256 10.44 8.59 > 17.7 20.9us 17.2us
320 14.44 11.64 > 19.4 28.9us 23.3us
384 19.12 15.08 > 21.1 38.2us 30.2us
448 24.55 19.09 > 22.2 49.1us 38.2us
512 31.03 23.53 > 24.2 62.1us 47.1us
640 45.05 33.80 > 25.0 90.1us 67.6us
768 63.02 46.05 > 26.9 126.0us 92.1us
896 83.74 60.29 > 28.0 167.5us 120.6us
1024 106.73 76.65 > 28.2 213.5us 153.3us
1536 228.94 160.98 > 29.7 457.9us 322.0us
2048 398.08 275.93 > 30.7 796.2us 551.9us
(C4)
bits multiply square ad percent time/mult time/square
64 1.34 1.28 > 4.5 2.68us 2.56us
128 2.76 2.59 > 6.2 5.52us 5.18us
192 4.52 4.16 > 8.0 9.04us 8.32us
256 6.64 5.99 > 9.8 13.3us 12.0us
320 9.20 8.13 > 11.6 18.4us 16.3us
384 12.01 10.58 > 11.9 24.0us 21.2us
448 15.24 13.33 > 12.5 30.5us 26.7us
512 19.02 16.46 > 13.5 38.0us 32.9us
640 27.56 23.54 > 14.6 55.1us 47.1us
768 37.89 31.78 > 16.1 75.8us 63.6us
896 49.24 41.42 > 15.9 98.5us 82.8us
1024 62.59 52.18 > 16.6 125.2us 104.3us
1536 131.66 107.72 > 18.2 263.3us 215.4us
2048 226.45 182.95 > 19.2 453.0us 365.9us
(A7)
bits multiply square ad percent time/mult time/square
64 1.74 1.71 > 1.7 3.48us 3.42us
128 3.48 2.96 > 14.9 6.96us 5.92us
192 5.74 4.60 > 19.9 11.5us 9.20us
256 8.75 6.61 > 24.5 17.5us 13.2us
320 12.5 8.99 > 28.1 25.0us 18.0us
384 16.9 11.9 > 29.6 33.8us 23.8us
448 22.2 15.2 > 31.7 44.4us 30.4us
512 28.3 19.0 > 32.7 56.6us 38.0us
640 42.4 28.0 > 34.0 84.8us 56.0us
768 59.4 38.5 > 35.2 118.8us 77.0us
896 79.5 51.2 > 35.6 159.0us 102.4us
1024 102.6 65.5 > 36.2 205.2us 131.0us
1536 224.3 140.6 > 37.3 448.6us 281.2us
2048 393.4 244.3 > 37.9 786.8us 488.6us
------------------------------------------------------------------
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
$Id: timing.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $

View File

@@ -1,640 +0,0 @@
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is multacc512 multiple-precision integer arithmetic.
*
* The Initial Developer of the Original Code is Hewlett-Packard Company.
* Portions created by Hewlett-Packard Company are
* Copyright (C) March 1999, Hewlett-Packard Company. All Rights Reserved.
*
* Contributor(s):
* coded by: Bill Worley, Hewlett-Packard labs
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*
* This PA-RISC 2.0 function computes the product of two unsigned integers,
* and adds the result to a previously computed integer. The multiplicand
* is a 512-bit (64-byte, eight doubleword) unsigned integer, stored in
* memory in little-double-wordian order. The multiplier is an unsigned
* 64-bit integer. The previously computed integer to which the product is
* added is located in the result ("res") area, and is assumed to be a
* 576-bit (72-byte, nine doubleword) unsigned integer, stored in memory
* in little-double-wordian order. This value normally will be the result
* of a previously computed nine doubleword result. It is not necessary
* to pad the multiplicand with an additional 64-bit zero doubleword.
*
* Multiplicand, multiplier, and addend ideally should be aligned at
* 16-byte boundaries for best performance. The code will function
* correctly for alignment at eight-byte boundaries which are not 16-byte
* boundaries, but the execution may be slightly slower due to even/odd
* bank conflicts on PA-RISC 8000 processors.
*
* This function is designed to accept the same calling sequence as Bill
* Ackerman's "maxpy_little" function. The carry from the ninth doubleword
* of the result is written to the tenth word of the result, as is done by
* Bill Ackerman's function. The final carry also is returned as an
* integer, which may be ignored. The function prototype may be either
* of the following:
*
* void multacc512( int l, chunk* m, const chunk* a, chunk* res );
* or
* int multacc512( int l, chunk* m, const chunk* a, chunk* res );
*
* where: "l" originally denoted vector lengths. This parameter is
* ignored. This function always assumes a multiplicand length of
* 512 bits (eight doublewords), and addend and result lengths of
* 576 bits (nine doublewords).
*
* "m" is a pointer to the doubleword multiplier, ideally aligned
* on a 16-byte boundary.
*
* "a" is a pointer to the eight-doubleword multiplicand, stored
* in little-double-wordian order, and ideally aligned on a 16-byte
* boundary.
*
* "res" is a pointer to the nine doubleword addend, and to the
* nine-doubleword product computed by this function. The result
* also is stored in little-double-wordian order, and ideally is
* aligned on a 16-byte boundary. It is expected that the alignment
* of the "res" area may alternate between even/odd doubleword
* boundaries for successive calls for 512-bit x 512-bit
* multiplications.
*
* The code for this function has been scheduled to use the parallelism
* of the PA-RISC 8000 series microprocessors as well as the author was
* able. Comments and/or suggestions for improvement are welcomed.
*
* The code is "64-bit safe". This means it may be called in either
* the 32ILP context or the 64LP context. All 64-bits of registers are
* saved and restored.
*
* This code is self-contained. It requires no other header files in order
* to compile and to be linkable on a PA-RISC 2.0 machine. Symbolic
* definitions for registers and stack offsets are included within this
* one source file.
*
* This is a leaf routine. As such, minimal use is made of the stack area.
* Of the 192 bytes allocated, 64 bytes are used for saving/restoring eight
* general registers, and 128 bytes are used to move intermediate products
* from the floating-point registers to the general registers. Stack
* protocols assure proper alignment of these areas.
*
*/
/* ====================================================================*/
/* symbolic definitions for PA-RISC registers */
/* in the MIPS style, avoids lots of case shifts */
/* assigments (except t4) preserve register number parity */
/* ====================================================================*/
#define zero %r0 /* permanent zero */
#define t5 %r1 /* temp register, altered by addil */
#define rp %r2 /* return pointer */
#define s1 %r3 /* callee saves register*/
#define s0 %r4 /* callee saves register*/
#define s3 %r5 /* callee saves register*/
#define s2 %r6 /* callee saves register*/
#define s5 %r7 /* callee saves register*/
#define s4 %r8 /* callee saves register*/
#define s7 %r9 /* callee saves register*/
#define s6 %r10 /* callee saves register*/
#define t1 %r19 /* caller saves register*/
#define t0 %r20 /* caller saves register*/
#define t3 %r21 /* caller saves register*/
#define t2 %r22 /* caller saves register*/
#define a3 %r23 /* fourth argument register, high word */
#define a2 %r24 /* third argument register, low word*/
#define a1 %r25 /* second argument register, high word*/
#define a0 %r26 /* first argument register, low word*/
#define v0 %r28 /* high order return value*/
#define v1 %r29 /* low order return value*/
#define sp %r30 /* stack pointer*/
#define t4 %r31 /* temporary register */
#define fa0 %fr4 /* first argument register*/
#define fa1 %fr5 /* second argument register*/
#define fa2 %fr6 /* third argument register*/
#define fa3 %fr7 /* fourth argument register*/
#define fa0r %fr4R /* first argument register*/
#define fa1r %fr5R /* second argument register*/
#define fa2r %fr6R /* third argument register*/
#define fa3r %fr7R /* fourth argument register*/
#define ft0 %fr8 /* caller saves register*/
#define ft1 %fr9 /* caller saves register*/
#define ft2 %fr10 /* caller saves register*/
#define ft3 %fr11 /* caller saves register*/
#define ft0r %fr8R /* caller saves register*/
#define ft1r %fr9R /* caller saves register*/
#define ft2r %fr10R /* caller saves register*/
#define ft3r %fr11R /* caller saves register*/
#define ft4 %fr22 /* caller saves register*/
#define ft5 %fr23 /* caller saves register*/
#define ft6 %fr24 /* caller saves register*/
#define ft7 %fr25 /* caller saves register*/
#define ft8 %fr26 /* caller saves register*/
#define ft9 %fr27 /* caller saves register*/
#define ft10 %fr28 /* caller saves register*/
#define ft11 %fr29 /* caller saves register*/
#define ft12 %fr30 /* caller saves register*/
#define ft13 %fr31 /* caller saves register*/
#define ft4r %fr22R /* caller saves register*/
#define ft5r %fr23R /* caller saves register*/
#define ft6r %fr24R /* caller saves register*/
#define ft7r %fr25R /* caller saves register*/
#define ft8r %fr26R /* caller saves register*/
#define ft9r %fr27R /* caller saves register*/
#define ft10r %fr28R /* caller saves register*/
#define ft11r %fr29R /* caller saves register*/
#define ft12r %fr30R /* caller saves register*/
#define ft13r %fr31R /* caller saves register*/
/* ================================================================== */
/* functional definitions for PA-RISC registers */
/* ================================================================== */
/* general registers */
#define T1 a0 /* temp, (length parameter ignored) */
#define pM a1 /* -> 64-bit multiplier */
#define T2 a1 /* temp, (after fetching multiplier) */
#define pA a2 /* -> multiplicand vector (8 64-bit words) */
#define T3 a2 /* temp, (after fetching multiplicand) */
#define pR a3 /* -> addend vector (8 64-bit doublewords,
result vector (9 64-bit words) */
#define S0 s0 /* callee saves summand registers */
#define S1 s1
#define S2 s2
#define S3 s3
#define S4 s4
#define S5 s5
#define S6 s6
#define S7 s7
#define S8 v0 /* caller saves summand registers */
#define S9 v1
#define S10 t0
#define S11 t1
#define S12 t2
#define S13 t3
#define S14 t4
#define S15 t5
/* floating-point registers */
#define M fa0 /* multiplier double word */
#define MR fa0r /* low order half of multiplier double word */
#define ML fa0 /* high order half of multiplier double word */
#define A0 fa2 /* multiplicand double word 0 */
#define A0R fa2r /* low order half of multiplicand double word */
#define A0L fa2 /* high order half of multiplicand double word */
#define A1 fa3 /* multiplicand double word 1 */
#define A1R fa3r /* low order half of multiplicand double word */
#define A1L fa3 /* high order half of multiplicand double word */
#define A2 ft0 /* multiplicand double word 2 */
#define A2R ft0r /* low order half of multiplicand double word */
#define A2L ft0 /* high order half of multiplicand double word */
#define A3 ft1 /* multiplicand double word 3 */
#define A3R ft1r /* low order half of multiplicand double word */
#define A3L ft1 /* high order half of multiplicand double word */
#define A4 ft2 /* multiplicand double word 4 */
#define A4R ft2r /* low order half of multiplicand double word */
#define A4L ft2 /* high order half of multiplicand double word */
#define A5 ft3 /* multiplicand double word 5 */
#define A5R ft3r /* low order half of multiplicand double word */
#define A5L ft3 /* high order half of multiplicand double word */
#define A6 ft4 /* multiplicand double word 6 */
#define A6R ft4r /* low order half of multiplicand double word */
#define A6L ft4 /* high order half of multiplicand double word */
#define A7 ft5 /* multiplicand double word 7 */
#define A7R ft5r /* low order half of multiplicand double word */
#define A7L ft5 /* high order half of multiplicand double word */
#define P0 ft6 /* product word 0 */
#define P1 ft7 /* product word 0 */
#define P2 ft8 /* product word 0 */
#define P3 ft9 /* product word 0 */
#define P4 ft10 /* product word 0 */
#define P5 ft11 /* product word 0 */
#define P6 ft12 /* product word 0 */
#define P7 ft13 /* product word 0 */
/* ====================================================================== */
/* symbolic definitions for HP-UX stack offsets */
/* symbolic definitions for memory NOPs */
/* ====================================================================== */
#define ST_SZ 192 /* stack area total size */
#define SV0 -192(sp) /* general register save area */
#define SV1 -184(sp)
#define SV2 -176(sp)
#define SV3 -168(sp)
#define SV4 -160(sp)
#define SV5 -152(sp)
#define SV6 -144(sp)
#define SV7 -136(sp)
#define XF0 -128(sp) /* data transfer area */
#define XF1 -120(sp) /* for floating-pt to integer regs */
#define XF2 -112(sp)
#define XF3 -104(sp)
#define XF4 -96(sp)
#define XF5 -88(sp)
#define XF6 -80(sp)
#define XF7 -72(sp)
#define XF8 -64(sp)
#define XF9 -56(sp)
#define XF10 -48(sp)
#define XF11 -40(sp)
#define XF12 -32(sp)
#define XF13 -24(sp)
#define XF14 -16(sp)
#define XF15 -8(sp)
#define mnop proberi (sp),3,zero /* memory NOP */
/* ====================================================================== */
/* assembler formalities */
/* ====================================================================== */
#ifdef __LP64__
.level 2.0W
#else
.level 2.0
#endif
.space $TEXT$
.subspa $CODE$
.align 16
/* ====================================================================== */
/* here to compute 64-bit x 512-bit product + 512-bit addend */
/* ====================================================================== */
multacc512
.PROC
.CALLINFO
.ENTER
fldd 0(pM),M ; multiplier double word
ldo ST_SZ(sp),sp ; push stack
fldd 0(pA),A0 ; multiplicand double word 0
std S1,SV1 ; save s1
fldd 16(pA),A2 ; multiplicand double word 2
std S3,SV3 ; save s3
fldd 32(pA),A4 ; multiplicand double word 4
std S5,SV5 ; save s5
fldd 48(pA),A6 ; multiplicand double word 6
std S7,SV7 ; save s7
std S0,SV0 ; save s0
fldd 8(pA),A1 ; multiplicand double word 1
xmpyu MR,A0L,P0 ; A0 cross 32-bit word products
xmpyu ML,A0R,P2
std S2,SV2 ; save s2
fldd 24(pA),A3 ; multiplicand double word 3
xmpyu MR,A2L,P4 ; A2 cross 32-bit word products
xmpyu ML,A2R,P6
std S4,SV4 ; save s4
fldd 40(pA),A5 ; multiplicand double word 5
std S6,SV6 ; save s6
fldd 56(pA),A7 ; multiplicand double word 7
fstd P0,XF0 ; MR * A0L
xmpyu MR,A0R,P0 ; A0 right 32-bit word product
xmpyu MR,A1L,P1 ; A1 cross 32-bit word product
fstd P2,XF2 ; ML * A0R
xmpyu ML,A0L,P2 ; A0 left 32-bit word product
xmpyu ML,A1R,P3 ; A1 cross 32-bit word product
fstd P4,XF4 ; MR * A2L
xmpyu MR,A2R,P4 ; A2 right 32-bit word product
xmpyu MR,A3L,P5 ; A3 cross 32-bit word product
fstd P6,XF6 ; ML * A2R
xmpyu ML,A2L,P6 ; A2 parallel 32-bit word product
xmpyu ML,A3R,P7 ; A3 cross 32-bit word product
ldd XF0,S0 ; MR * A0L
fstd P1,XF1 ; MR * A1L
ldd XF2,S2 ; ML * A0R
fstd P3,XF3 ; ML * A1R
ldd XF4,S4 ; MR * A2L
fstd P5,XF5 ; MR * A3L
xmpyu MR,A1R,P1 ; A1 parallel 32-bit word products
xmpyu ML,A1L,P3
ldd XF6,S6 ; ML * A2R
fstd P7,XF7 ; ML * A3R
xmpyu MR,A3R,P5 ; A3 parallel 32-bit word products
xmpyu ML,A3L,P7
fstd P0,XF0 ; MR * A0R
ldd XF1,S1 ; MR * A1L
nop
add S0,S2,T1 ; A0 cross product sum
fstd P2,XF2 ; ML * A0L
ldd XF3,S3 ; ML * A1R
add,dc zero,zero,S0 ; A0 cross product sum carry
depd,z T1,31,32,S2 ; A0 cross product sum << 32
fstd P4,XF4 ; MR * A2R
ldd XF5,S5 ; MR * A3L
shrpd S0,T1,32,S0 ; A0 carry | cross product sum >> 32
add S4,S6,T3 ; A2 cross product sum
fstd P6,XF6 ; ML * A2L
ldd XF7,S7 ; ML * A3R
add,dc zero,zero,S4 ; A2 cross product sum carry
depd,z T3,31,32,S6 ; A2 cross product sum << 32
ldd XF0,S8 ; MR * A0R
fstd P1,XF1 ; MR * A1R
xmpyu MR,A4L,P0 ; A4 cross 32-bit word product
xmpyu MR,A5L,P1 ; A5 cross 32-bit word product
ldd XF2,S10 ; ML * A0L
fstd P3,XF3 ; ML * A1L
xmpyu ML,A4R,P2 ; A4 cross 32-bit word product
xmpyu ML,A5R,P3 ; A5 cross 32-bit word product
ldd XF4,S12 ; MR * A2R
fstd P5,XF5 ; MR * A3L
xmpyu MR,A6L,P4 ; A6 cross 32-bit word product
xmpyu MR,A7L,P5 ; A7 cross 32-bit word product
ldd XF6,S14 ; ML * A2L
fstd P7,XF7 ; ML * A3L
xmpyu ML,A6R,P6 ; A6 cross 32-bit word product
xmpyu ML,A7R,P7 ; A7 cross 32-bit word product
fstd P0,XF0 ; MR * A4L
ldd XF1,S9 ; MR * A1R
shrpd S4,T3,32,S4 ; A2 carry | cross product sum >> 32
add S1,S3,T1 ; A1 cross product sum
fstd P2,XF2 ; ML * A4R
ldd XF3,S11 ; ML * A1L
add,dc zero,zero,S1 ; A1 cross product sum carry
depd,z T1,31,32,S3 ; A1 cross product sum << 32
fstd P4,XF4 ; MR * A6L
ldd XF5,S13 ; MR * A3R
shrpd S1,T1,32,S1 ; A1 carry | cross product sum >> 32
add S5,S7,T3 ; A3 cross product sum
fstd P6,XF6 ; ML * A6R
ldd XF7,S15 ; ML * A3L
add,dc zero,zero,S5 ; A3 cross product sum carry
depd,z T3,31,32,S7 ; A3 cross product sum << 32
shrpd S5,T3,32,S5 ; A3 carry | cross product sum >> 32
add S2,S8,S8 ; M * A0 right doubleword, P0 doubleword
add,dc S0,S10,S10 ; M * A0 left doubleword
add S3,S9,S9 ; M * A1 right doubleword
add,dc S1,S11,S11 ; M * A1 left doubleword
add S6,S12,S12 ; M * A2 right doubleword
ldd 24(pR),S3 ; Addend word 3
fstd P1,XF1 ; MR * A5L
add,dc S4,S14,S14 ; M * A2 left doubleword
xmpyu MR,A5R,P1 ; A5 right 32-bit word product
ldd 8(pR),S1 ; Addend word 1
fstd P3,XF3 ; ML * A5R
add S7,S13,S13 ; M * A3 right doubleword
xmpyu ML,A5L,P3 ; A5 left 32-bit word product
ldd 0(pR),S7 ; Addend word 0
fstd P5,XF5 ; MR * A7L
add,dc S5,S15,S15 ; M * A3 left doubleword
xmpyu MR,A7R,P5 ; A7 right 32-bit word product
ldd 16(pR),S5 ; Addend word 2
fstd P7,XF7 ; ML * A7R
add S10,S9,S9 ; P1 doubleword
xmpyu ML,A7L,P7 ; A7 left 32-bit word products
ldd XF0,S0 ; MR * A4L
fstd P1,XF9 ; MR * A5R
add,dc S11,S12,S12 ; P2 doubleword
xmpyu MR,A4R,P0 ; A4 right 32-bit word product
ldd XF2,S2 ; ML * A4R
fstd P3,XF11 ; ML * A5L
add,dc S14,S13,S13 ; P3 doubleword
xmpyu ML,A4L,P2 ; A4 left 32-bit word product
ldd XF6,S6 ; ML * A6R
fstd P5,XF13 ; MR * A7R
add,dc zero,S15,T2 ; P4 partial doubleword
xmpyu MR,A6R,P4 ; A6 right 32-bit word product
ldd XF4,S4 ; MR * A6L
fstd P7,XF15 ; ML * A7L
add S7,S8,S8 ; R0 + P0, new R0 doubleword
xmpyu ML,A6L,P6 ; A6 left 32-bit word product
fstd P0,XF0 ; MR * A4R
ldd XF7,S7 ; ML * A7R
add,dc S1,S9,S9 ; c + R1 + P1, new R1 doubleword
fstd P2,XF2 ; ML * A4L
ldd XF1,S1 ; MR * A5L
add,dc S5,S12,S12 ; c + R2 + P2, new R2 doubleword
fstd P4,XF4 ; MR * A6R
ldd XF5,S5 ; MR * A7L
add,dc S3,S13,S13 ; c + R3 + P3, new R3 doubleword
fstd P6,XF6 ; ML * A6L
ldd XF3,S3 ; ML * A5R
add,dc zero,T2,T2 ; c + partial P4
add S0,S2,T1 ; A4 cross product sum
std S8,0(pR) ; save R0
add,dc zero,zero,S0 ; A4 cross product sum carry
depd,z T1,31,32,S2 ; A4 cross product sum << 32
std S9,8(pR) ; save R1
shrpd S0,T1,32,S0 ; A4 carry | cross product sum >> 32
add S4,S6,T3 ; A6 cross product sum
std S12,16(pR) ; save R2
add,dc zero,zero,S4 ; A6 cross product sum carry
depd,z T3,31,32,S6 ; A6 cross product sum << 32
std S13,24(pR) ; save R3
shrpd S4,T3,32,S4 ; A6 carry | cross product sum >> 32
add S1,S3,T1 ; A5 cross product sum
ldd XF0,S8 ; MR * A4R
add,dc zero,zero,S1 ; A5 cross product sum carry
depd,z T1,31,32,S3 ; A5 cross product sum << 32
ldd XF2,S10 ; ML * A4L
ldd XF9,S9 ; MR * A5R
shrpd S1,T1,32,S1 ; A5 carry | cross product sum >> 32
add S5,S7,T3 ; A7 cross product sum
ldd XF4,S12 ; MR * A6R
ldd XF11,S11 ; ML * A5L
add,dc zero,zero,S5 ; A7 cross product sum carry
depd,z T3,31,32,S7 ; A7 cross product sum << 32
ldd XF6,S14 ; ML * A6L
ldd XF13,S13 ; MR * A7R
shrpd S5,T3,32,S5 ; A7 carry | cross product sum >> 32
add S2,S8,S8 ; M * A4 right doubleword
ldd XF15,S15 ; ML * A7L
add,dc S0,S10,S10 ; M * A4 left doubleword
add S3,S9,S9 ; M * A5 right doubleword
add,dc S1,S11,S11 ; M * A5 left doubleword
add S6,S12,S12 ; M * A6 right doubleword
ldd 32(pR),S0 ; Addend word 4
ldd 40(pR),S1 ; Addend word 5
add,dc S4,S14,S14 ; M * A6 left doubleword
add S7,S13,S13 ; M * A7 right doubleword
ldd 48(pR),S2 ; Addend word 6
ldd 56(pR),S3 ; Addend word 7
add,dc S5,S15,S15 ; M * A7 left doubleword
add S8,T2,S8 ; P4 doubleword
ldd 64(pR),S4 ; Addend word 8
ldd SV5,s5 ; restore s5
add,dc S10,S9,S9 ; P5 doubleword
add,dc S11,S12,S12 ; P6 doubleword
ldd SV6,s6 ; restore s6
ldd SV7,s7 ; restore s7
add,dc S14,S13,S13 ; P7 doubleword
add,dc zero,S15,S15 ; P8 doubleword
add S0,S8,S8 ; new R4 doubleword
ldd SV0,s0 ; restore s0
std S8,32(pR) ; save R4
add,dc S1,S9,S9 ; new R5 doubleword
ldd SV1,s1 ; restore s1
std S9,40(pR) ; save R5
add,dc S2,S12,S12 ; new R6 doubleword
ldd SV2,s2 ; restore s2
std S12,48(pR) ; save R6
add,dc S3,S13,S13 ; new R7 doubleword
ldd SV3,s3 ; restore s3
std S13,56(pR) ; save R7
add,dc S4,S15,S15 ; new R8 doubleword
ldd SV4,s4 ; restore s4
std S15,64(pR) ; save result[8]
add,dc zero,zero,v0 ; return carry from R8
CMPIB,*= 0,v0,$L0 ; if no overflow, exit
LDO 8(pR),pR
$FINAL1 ; Final carry propagation
LDD 64(pR),v0
LDO 8(pR),pR
ADDI 1,v0,v0
CMPIB,*= 0,v0,$FINAL1 ; Keep looping if there is a carry.
STD v0,56(pR)
$L0
bv zero(rp) ; -> caller
ldo -ST_SZ(sp),sp ; pop stack
/* ====================================================================== */
/* end of module */
/* ====================================================================== */
.LEAVE
.PROCEND
.SPACE $TEXT$
.SUBSPA $CODE$
.EXPORT multacc512,ENTRY
.end

View File

@@ -1,929 +0,0 @@
; The contents of this file are subject to the Mozilla Public
; License Version 1.1 (the "License"); you may not use this file
; except in compliance with the License. You may obtain a copy of
; the License at http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS
; IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
; implied. See the License for the specific language governing
; rights and limitations under the License.
;
; The Original Code is MAXPY multiple-precision integer arithmetic.
;
; The Initial Developer of the Original Code is the Hewlett-Packard Company.
; Portions created by Hewlett-Packard Company are
; Copyright (C) 1997 Hewlett-Packard Company. All Rights Reserved.
;
; Contributor(s):
; coded by: William B. Ackerman
;
; Alternatively, the contents of this file may be used under the
; terms of the GNU General Public License Version 2 or later (the
; "GPL"), in which case the provisions of the GPL are applicable
; instead of those above. If you wish to allow use of your
; version of this file only under the terms of the GPL and not to
; allow others to use your version of this file under the MPL,
; indicate your decision by deleting the provisions above and
; replace them with the notice and other provisions required by
; the GPL. If you do not delete the provisions above, a recipient
; may use your version of this file under either the MPL or the
; GPL.
#ifdef __LP64__
.LEVEL 2.0W
#else
; .LEVEL 1.1
; .ALLOW 2.0N
.LEVEL 2.0N
#endif
.SPACE $TEXT$,SORT=8
.SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=0x2c,CODE_ONLY,SORT=24
; ***************************************************************
;
; maxpy_[little/big]
;
; ***************************************************************
; There is no default -- you must specify one or the other.
#define LITTLE_WORDIAN 1
#ifdef LITTLE_WORDIAN
#define EIGHT 8
#define SIXTEEN 16
#define THIRTY_TWO 32
#define UN_EIGHT -8
#define UN_SIXTEEN -16
#define UN_TWENTY_FOUR -24
#endif
#ifdef BIG_WORDIAN
#define EIGHT -8
#define SIXTEEN -16
#define THIRTY_TWO -32
#define UN_EIGHT 8
#define UN_SIXTEEN 16
#define UN_TWENTY_FOUR 24
#endif
; This performs a multiple-precision integer version of "daxpy",
; Using the selected addressing direction. "Little-wordian" means that
; the least significant word of a number is stored at the lowest address.
; "Big-wordian" means that the most significant word is at the lowest
; address. Either way, the incoming address of the vector is that
; of the least significant word. That means that, for little-wordian
; addressing, we move the address upward as we propagate carries
; from the least significant word to the most significant. For
; big-wordian we move the address downward.
; We use the following registers:
;
; r2 return PC, of course
; r26 = arg1 = length
; r25 = arg2 = address of scalar
; r24 = arg3 = multiplicand vector
; r23 = arg4 = result vector
;
; fr9 = scalar loaded once only from r25
; The cycle counts shown in the bodies below are simply the result of a
; scheduling by hand. The actual PCX-U hardware does it differently.
; The intention is that the overall speed is the same.
; The pipeline startup and shutdown code is constructed in the usual way,
; by taking the loop bodies and removing unnecessary instructions.
; We have left the comments describing cycle numbers in the code.
; These are intended for reference when comparing with the main loop,
; and have no particular relationship to actual cycle numbers.
#ifdef LITTLE_WORDIAN
maxpy_little
#else
maxpy_big
#endif
.PROC
.CALLINFO FRAME=120,ENTRY_GR=%r4
.ENTER
; Of course, real men don't use the sissy "enter" and "leave" commands.
; They write their own stack manipulation stuff. Unfortunately,
; that doesn't generate complete unwind info, whereas "enter" and
; "leave" (if the documentation is to be believed) do so. Therefore,
; we use the sissy commands. We have verified (by real-man methods)
; that the above command generates what we want:
; STW,MA %r3,128(%sp)
; STW %r4,-124(%sp)
ADDIB,< -1,%r26,$L0 ; If N = 0, exit immediately.
FLDD 0(%r25),%fr9 ; fr9 = scalar
; First startup
FLDD 0(%r24),%fr24 ; Cycle 1
XMPYU %fr9R,%fr24R,%fr27 ; Cycle 3
XMPYU %fr9R,%fr24L,%fr25 ; Cycle 4
XMPYU %fr9L,%fr24L,%fr26 ; Cycle 5
CMPIB,> 3,%r26,$N_IS_SMALL ; Pick out cases N = 1, 2, or 3
XMPYU %fr9L,%fr24R,%fr24 ; Cycle 6
FLDD EIGHT(%r24),%fr28 ; Cycle 8
XMPYU %fr9L,%fr28R,%fr31 ; Cycle 10
FSTD %fr24,-96(%sp)
XMPYU %fr9R,%fr28L,%fr30 ; Cycle 11
FSTD %fr25,-80(%sp)
LDO SIXTEEN(%r24),%r24 ; Cycle 12
FSTD %fr31,-64(%sp)
XMPYU %fr9R,%fr28R,%fr29 ; Cycle 13
FSTD %fr27,-48(%sp)
; Second startup
XMPYU %fr9L,%fr28L,%fr28 ; Cycle 1
FSTD %fr30,-56(%sp)
FLDD 0(%r24),%fr24
FSTD %fr26,-88(%sp) ; Cycle 2
XMPYU %fr9R,%fr24R,%fr27 ; Cycle 3
FSTD %fr28,-104(%sp)
XMPYU %fr9R,%fr24L,%fr25 ; Cycle 4
LDD -96(%sp),%r3
FSTD %fr29,-72(%sp)
XMPYU %fr9L,%fr24L,%fr26 ; Cycle 5
LDD -64(%sp),%r19
LDD -80(%sp),%r21
XMPYU %fr9L,%fr24R,%fr24 ; Cycle 6
LDD -56(%sp),%r20
ADD %r21,%r3,%r3
ADD,DC %r20,%r19,%r19 ; Cycle 7
LDD -88(%sp),%r4
SHRPD %r3,%r0,32,%r21
LDD -48(%sp),%r1
FLDD EIGHT(%r24),%fr28 ; Cycle 8
LDD -104(%sp),%r31
ADD,DC %r0,%r0,%r20
SHRPD %r19,%r3,32,%r3
LDD -72(%sp),%r29 ; Cycle 9
SHRPD %r20,%r19,32,%r20
ADD %r21,%r1,%r1
XMPYU %fr9L,%fr28R,%fr31 ; Cycle 10
ADD,DC %r3,%r4,%r4
FSTD %fr24,-96(%sp)
XMPYU %fr9R,%fr28L,%fr30 ; Cycle 11
ADD,DC %r0,%r20,%r20
LDD 0(%r23),%r3
FSTD %fr25,-80(%sp)
LDO SIXTEEN(%r24),%r24 ; Cycle 12
FSTD %fr31,-64(%sp)
XMPYU %fr9R,%fr28R,%fr29 ; Cycle 13
ADD %r0,%r0,%r0 ; clear the carry bit
ADDIB,<= -4,%r26,$ENDLOOP ; actually happens in cycle 12
FSTD %fr27,-48(%sp)
; MFCTL %cr16,%r21 ; for timing
; STD %r21,-112(%sp)
; Here is the loop.
$LOOP XMPYU %fr9L,%fr28L,%fr28 ; Cycle 1
ADD,DC %r29,%r4,%r4
FSTD %fr30,-56(%sp)
FLDD 0(%r24),%fr24
LDO SIXTEEN(%r23),%r23 ; Cycle 2
ADD,DC %r0,%r20,%r20
FSTD %fr26,-88(%sp)
XMPYU %fr9R,%fr24R,%fr27 ; Cycle 3
ADD %r3,%r1,%r1
FSTD %fr28,-104(%sp)
LDD UN_EIGHT(%r23),%r21
XMPYU %fr9R,%fr24L,%fr25 ; Cycle 4
ADD,DC %r21,%r4,%r28
FSTD %fr29,-72(%sp)
LDD -96(%sp),%r3
XMPYU %fr9L,%fr24L,%fr26 ; Cycle 5
ADD,DC %r20,%r31,%r22
LDD -64(%sp),%r19
LDD -80(%sp),%r21
XMPYU %fr9L,%fr24R,%fr24 ; Cycle 6
ADD %r21,%r3,%r3
LDD -56(%sp),%r20
STD %r1,UN_SIXTEEN(%r23)
ADD,DC %r20,%r19,%r19 ; Cycle 7
SHRPD %r3,%r0,32,%r21
LDD -88(%sp),%r4
LDD -48(%sp),%r1
ADD,DC %r0,%r0,%r20 ; Cycle 8
SHRPD %r19,%r3,32,%r3
FLDD EIGHT(%r24),%fr28
LDD -104(%sp),%r31
SHRPD %r20,%r19,32,%r20 ; Cycle 9
ADD %r21,%r1,%r1
STD %r28,UN_EIGHT(%r23)
LDD -72(%sp),%r29
XMPYU %fr9L,%fr28R,%fr31 ; Cycle 10
ADD,DC %r3,%r4,%r4
FSTD %fr24,-96(%sp)
XMPYU %fr9R,%fr28L,%fr30 ; Cycle 11
ADD,DC %r0,%r20,%r20
FSTD %fr25,-80(%sp)
LDD 0(%r23),%r3
LDO SIXTEEN(%r24),%r24 ; Cycle 12
FSTD %fr31,-64(%sp)
XMPYU %fr9R,%fr28R,%fr29 ; Cycle 13
ADD %r22,%r1,%r1
ADDIB,> -2,%r26,$LOOP ; actually happens in cycle 12
FSTD %fr27,-48(%sp)
$ENDLOOP
; Shutdown code, first stage.
; MFCTL %cr16,%r21 ; for timing
; STD %r21,UN_SIXTEEN(%r23)
; LDD -112(%sp),%r21
; STD %r21,UN_EIGHT(%r23)
XMPYU %fr9L,%fr28L,%fr28 ; Cycle 1
ADD,DC %r29,%r4,%r4
CMPIB,= 0,%r26,$ONEMORE
FSTD %fr30,-56(%sp)
LDO SIXTEEN(%r23),%r23 ; Cycle 2
ADD,DC %r0,%r20,%r20
FSTD %fr26,-88(%sp)
ADD %r3,%r1,%r1 ; Cycle 3
FSTD %fr28,-104(%sp)
LDD UN_EIGHT(%r23),%r21
ADD,DC %r21,%r4,%r28 ; Cycle 4
FSTD %fr29,-72(%sp)
STD %r28,UN_EIGHT(%r23) ; moved up from cycle 9
LDD -96(%sp),%r3
ADD,DC %r20,%r31,%r22 ; Cycle 5
STD %r1,UN_SIXTEEN(%r23)
$JOIN4
LDD -64(%sp),%r19
LDD -80(%sp),%r21
ADD %r21,%r3,%r3 ; Cycle 6
LDD -56(%sp),%r20
ADD,DC %r20,%r19,%r19 ; Cycle 7
SHRPD %r3,%r0,32,%r21
LDD -88(%sp),%r4
LDD -48(%sp),%r1
ADD,DC %r0,%r0,%r20 ; Cycle 8
SHRPD %r19,%r3,32,%r3
LDD -104(%sp),%r31
SHRPD %r20,%r19,32,%r20 ; Cycle 9
ADD %r21,%r1,%r1
LDD -72(%sp),%r29
ADD,DC %r3,%r4,%r4 ; Cycle 10
ADD,DC %r0,%r20,%r20 ; Cycle 11
LDD 0(%r23),%r3
ADD %r22,%r1,%r1 ; Cycle 13
; Shutdown code, second stage.
ADD,DC %r29,%r4,%r4 ; Cycle 1
LDO SIXTEEN(%r23),%r23 ; Cycle 2
ADD,DC %r0,%r20,%r20
LDD UN_EIGHT(%r23),%r21 ; Cycle 3
ADD %r3,%r1,%r1
ADD,DC %r21,%r4,%r28 ; Cycle 4
ADD,DC %r20,%r31,%r22 ; Cycle 5
STD %r1,UN_SIXTEEN(%r23); Cycle 6
STD %r28,UN_EIGHT(%r23) ; Cycle 9
LDD 0(%r23),%r3 ; Cycle 11
; Shutdown code, third stage.
LDO SIXTEEN(%r23),%r23
ADD %r3,%r22,%r1
$JOIN1 ADD,DC %r0,%r0,%r21
CMPIB,*= 0,%r21,$L0 ; if no overflow, exit
STD %r1,UN_SIXTEEN(%r23)
; Final carry propagation
$FINAL1 LDO EIGHT(%r23),%r23
LDD UN_SIXTEEN(%r23),%r21
ADDI 1,%r21,%r21
CMPIB,*= 0,%r21,$FINAL1 ; Keep looping if there is a carry.
STD %r21,UN_SIXTEEN(%r23)
B $L0
NOP
; Here is the code that handles the difficult cases N=1, N=2, and N=3.
; We do the usual trick -- branch out of the startup code at appropriate
; points, and branch into the shutdown code.
$N_IS_SMALL
CMPIB,= 0,%r26,$N_IS_ONE
FSTD %fr24,-96(%sp) ; Cycle 10
FLDD EIGHT(%r24),%fr28 ; Cycle 8
XMPYU %fr9L,%fr28R,%fr31 ; Cycle 10
XMPYU %fr9R,%fr28L,%fr30 ; Cycle 11
FSTD %fr25,-80(%sp)
FSTD %fr31,-64(%sp) ; Cycle 12
XMPYU %fr9R,%fr28R,%fr29 ; Cycle 13
FSTD %fr27,-48(%sp)
XMPYU %fr9L,%fr28L,%fr28 ; Cycle 1
CMPIB,= 2,%r26,$N_IS_THREE
FSTD %fr30,-56(%sp)
; N = 2
FSTD %fr26,-88(%sp) ; Cycle 2
FSTD %fr28,-104(%sp) ; Cycle 3
LDD -96(%sp),%r3 ; Cycle 4
FSTD %fr29,-72(%sp)
B $JOIN4
ADD %r0,%r0,%r22
$N_IS_THREE
FLDD SIXTEEN(%r24),%fr24
FSTD %fr26,-88(%sp) ; Cycle 2
XMPYU %fr9R,%fr24R,%fr27 ; Cycle 3
FSTD %fr28,-104(%sp)
XMPYU %fr9R,%fr24L,%fr25 ; Cycle 4
LDD -96(%sp),%r3
FSTD %fr29,-72(%sp)
XMPYU %fr9L,%fr24L,%fr26 ; Cycle 5
LDD -64(%sp),%r19
LDD -80(%sp),%r21
B $JOIN3
ADD %r0,%r0,%r22
$N_IS_ONE
FSTD %fr25,-80(%sp)
FSTD %fr27,-48(%sp)
FSTD %fr26,-88(%sp) ; Cycle 2
B $JOIN5
ADD %r0,%r0,%r22
; We came out of the unrolled loop with wrong parity. Do one more
; single cycle. This is quite tricky, because of the way the
; carry chains and SHRPD chains have been chopped up.
$ONEMORE
FLDD 0(%r24),%fr24
LDO SIXTEEN(%r23),%r23 ; Cycle 2
ADD,DC %r0,%r20,%r20
FSTD %fr26,-88(%sp)
XMPYU %fr9R,%fr24R,%fr27 ; Cycle 3
FSTD %fr28,-104(%sp)
LDD UN_EIGHT(%r23),%r21
ADD %r3,%r1,%r1
XMPYU %fr9R,%fr24L,%fr25 ; Cycle 4
ADD,DC %r21,%r4,%r28
STD %r28,UN_EIGHT(%r23) ; moved from cycle 9
LDD -96(%sp),%r3
FSTD %fr29,-72(%sp)
XMPYU %fr9L,%fr24L,%fr26 ; Cycle 5
ADD,DC %r20,%r31,%r22
LDD -64(%sp),%r19
LDD -80(%sp),%r21
STD %r1,UN_SIXTEEN(%r23); Cycle 6
$JOIN3
XMPYU %fr9L,%fr24R,%fr24
LDD -56(%sp),%r20
ADD %r21,%r3,%r3
ADD,DC %r20,%r19,%r19 ; Cycle 7
LDD -88(%sp),%r4
SHRPD %r3,%r0,32,%r21
LDD -48(%sp),%r1
LDD -104(%sp),%r31 ; Cycle 8
ADD,DC %r0,%r0,%r20
SHRPD %r19,%r3,32,%r3
LDD -72(%sp),%r29 ; Cycle 9
SHRPD %r20,%r19,32,%r20
ADD %r21,%r1,%r1
ADD,DC %r3,%r4,%r4 ; Cycle 10
FSTD %fr24,-96(%sp)
ADD,DC %r0,%r20,%r20 ; Cycle 11
LDD 0(%r23),%r3
FSTD %fr25,-80(%sp)
ADD %r22,%r1,%r1 ; Cycle 13
FSTD %fr27,-48(%sp)
; Shutdown code, stage 1-1/2.
ADD,DC %r29,%r4,%r4 ; Cycle 1
LDO SIXTEEN(%r23),%r23 ; Cycle 2
ADD,DC %r0,%r20,%r20
FSTD %fr26,-88(%sp)
LDD UN_EIGHT(%r23),%r21 ; Cycle 3
ADD %r3,%r1,%r1
ADD,DC %r21,%r4,%r28 ; Cycle 4
STD %r28,UN_EIGHT(%r23) ; moved from cycle 9
ADD,DC %r20,%r31,%r22 ; Cycle 5
STD %r1,UN_SIXTEEN(%r23)
$JOIN5
LDD -96(%sp),%r3 ; moved from cycle 4
LDD -80(%sp),%r21
ADD %r21,%r3,%r3 ; Cycle 6
ADD,DC %r0,%r0,%r19 ; Cycle 7
LDD -88(%sp),%r4
SHRPD %r3,%r0,32,%r21
LDD -48(%sp),%r1
SHRPD %r19,%r3,32,%r3 ; Cycle 8
ADD %r21,%r1,%r1 ; Cycle 9
ADD,DC %r3,%r4,%r4 ; Cycle 10
LDD 0(%r23),%r3 ; Cycle 11
ADD %r22,%r1,%r1 ; Cycle 13
; Shutdown code, stage 2-1/2.
ADD,DC %r0,%r4,%r4 ; Cycle 1
LDO SIXTEEN(%r23),%r23 ; Cycle 2
LDD UN_EIGHT(%r23),%r21 ; Cycle 3
ADD %r3,%r1,%r1
STD %r1,UN_SIXTEEN(%r23)
ADD,DC %r21,%r4,%r1
B $JOIN1
LDO EIGHT(%r23),%r23
; exit
$L0
.LEAVE
; We have verified that the above command generates what we want:
; LDW -124(%sp),%r4
; BVE (%r2)
; LDW,MB -128(%sp),%r3
.PROCEND
; ***************************************************************
;
; add_diag_[little/big]
;
; ***************************************************************
; The arguments are as follows:
; r2 return PC, of course
; r26 = arg1 = length
; r25 = arg2 = vector to square
; r24 = arg3 = result vector
#ifdef LITTLE_WORDIAN
add_diag_little
#else
add_diag_big
#endif
.PROC
.CALLINFO FRAME=120,ENTRY_GR=%r4
.ENTER
ADDIB,< -1,%r26,$Z0 ; If N=0, exit immediately.
NOP
; Startup code
FLDD 0(%r25),%fr7 ; Cycle 2 (alternate body)
XMPYU %fr7R,%fr7R,%fr29 ; Cycle 4
XMPYU %fr7L,%fr7R,%fr27 ; Cycle 5
XMPYU %fr7L,%fr7L,%fr30
LDO SIXTEEN(%r25),%r25 ; Cycle 6
FSTD %fr29,-88(%sp)
FSTD %fr27,-72(%sp) ; Cycle 7
CMPIB,= 0,%r26,$DIAG_N_IS_ONE ; Cycle 1 (main body)
FSTD %fr30,-96(%sp)
FLDD UN_EIGHT(%r25),%fr7 ; Cycle 2
LDD -88(%sp),%r22 ; Cycle 3
LDD -72(%sp),%r31 ; Cycle 4
XMPYU %fr7R,%fr7R,%fr28
XMPYU %fr7L,%fr7R,%fr24 ; Cycle 5
XMPYU %fr7L,%fr7L,%fr31
LDD -96(%sp),%r20 ; Cycle 6
FSTD %fr28,-80(%sp)
ADD %r0,%r0,%r0 ; clear the carry bit
ADDIB,<= -2,%r26,$ENDDIAGLOOP ; Cycle 7
FSTD %fr24,-64(%sp)
; Here is the loop. It is unrolled twice, modelled after the "alternate body" and then the "main body".
$DIAGLOOP
SHRPD %r31,%r0,31,%r3 ; Cycle 1 (alternate body)
LDO SIXTEEN(%r25),%r25
LDD 0(%r24),%r1
FSTD %fr31,-104(%sp)
SHRPD %r0,%r31,31,%r4 ; Cycle 2
ADD,DC %r22,%r3,%r3
FLDD UN_SIXTEEN(%r25),%fr7
ADD,DC %r0,%r20,%r20 ; Cycle 3
ADD %r1,%r3,%r3
XMPYU %fr7R,%fr7R,%fr29 ; Cycle 4
LDD -80(%sp),%r21
STD %r3,0(%r24)
XMPYU %fr7L,%fr7R,%fr27 ; Cycle 5
XMPYU %fr7L,%fr7L,%fr30
LDD -64(%sp),%r29
LDD EIGHT(%r24),%r1
ADD,DC %r4,%r20,%r20 ; Cycle 6
LDD -104(%sp),%r19
FSTD %fr29,-88(%sp)
ADD %r20,%r1,%r1 ; Cycle 7
FSTD %fr27,-72(%sp)
SHRPD %r29,%r0,31,%r4 ; Cycle 1 (main body)
LDO THIRTY_TWO(%r24),%r24
LDD UN_SIXTEEN(%r24),%r28
FSTD %fr30,-96(%sp)
SHRPD %r0,%r29,31,%r3 ; Cycle 2
ADD,DC %r21,%r4,%r4
FLDD UN_EIGHT(%r25),%fr7
STD %r1,UN_TWENTY_FOUR(%r24)
ADD,DC %r0,%r19,%r19 ; Cycle 3
ADD %r28,%r4,%r4
XMPYU %fr7R,%fr7R,%fr28 ; Cycle 4
LDD -88(%sp),%r22
STD %r4,UN_SIXTEEN(%r24)
XMPYU %fr7L,%fr7R,%fr24 ; Cycle 5
XMPYU %fr7L,%fr7L,%fr31
LDD -72(%sp),%r31
LDD UN_EIGHT(%r24),%r28
ADD,DC %r3,%r19,%r19 ; Cycle 6
LDD -96(%sp),%r20
FSTD %fr28,-80(%sp)
ADD %r19,%r28,%r28 ; Cycle 7
FSTD %fr24,-64(%sp)
ADDIB,> -2,%r26,$DIAGLOOP ; Cycle 8
STD %r28,UN_EIGHT(%r24)
$ENDDIAGLOOP
ADD,DC %r0,%r22,%r22
CMPIB,= 0,%r26,$ONEMOREDIAG
SHRPD %r31,%r0,31,%r3
; Shutdown code, first stage.
FSTD %fr31,-104(%sp) ; Cycle 1 (alternate body)
LDD 0(%r24),%r28
SHRPD %r0,%r31,31,%r4 ; Cycle 2
ADD %r3,%r22,%r3
ADD,DC %r0,%r20,%r20 ; Cycle 3
LDD -80(%sp),%r21
ADD %r3,%r28,%r3
LDD -64(%sp),%r29 ; Cycle 4
STD %r3,0(%r24)
LDD EIGHT(%r24),%r1 ; Cycle 5
LDO SIXTEEN(%r25),%r25 ; Cycle 6
LDD -104(%sp),%r19
ADD,DC %r4,%r20,%r20
ADD %r20,%r1,%r1 ; Cycle 7
ADD,DC %r0,%r21,%r21 ; Cycle 8
STD %r1,EIGHT(%r24)
; Shutdown code, second stage.
SHRPD %r29,%r0,31,%r4 ; Cycle 1 (main body)
LDO THIRTY_TWO(%r24),%r24
LDD UN_SIXTEEN(%r24),%r1
SHRPD %r0,%r29,31,%r3 ; Cycle 2
ADD %r4,%r21,%r4
ADD,DC %r0,%r19,%r19 ; Cycle 3
ADD %r4,%r1,%r4
STD %r4,UN_SIXTEEN(%r24); Cycle 4
LDD UN_EIGHT(%r24),%r28 ; Cycle 5
ADD,DC %r3,%r19,%r19 ; Cycle 6
ADD %r19,%r28,%r28 ; Cycle 7
ADD,DC %r0,%r0,%r22 ; Cycle 8
CMPIB,*= 0,%r22,$Z0 ; if no overflow, exit
STD %r28,UN_EIGHT(%r24)
; Final carry propagation
$FDIAG2
LDO EIGHT(%r24),%r24
LDD UN_EIGHT(%r24),%r26
ADDI 1,%r26,%r26
CMPIB,*= 0,%r26,$FDIAG2 ; Keep looping if there is a carry.
STD %r26,UN_EIGHT(%r24)
B $Z0
NOP
; Here is the code that handles the difficult case N=1.
; We do the usual trick -- branch out of the startup code at appropriate
; points, and branch into the shutdown code.
$DIAG_N_IS_ONE
LDD -88(%sp),%r22
LDD -72(%sp),%r31
B $JOINDIAG
LDD -96(%sp),%r20
; We came out of the unrolled loop with wrong parity. Do one more
; single cycle. This is the "alternate body". It will, of course,
; give us opposite registers from the other case, so we need
; completely different shutdown code.
$ONEMOREDIAG
FSTD %fr31,-104(%sp) ; Cycle 1 (alternate body)
LDD 0(%r24),%r28
FLDD 0(%r25),%fr7 ; Cycle 2
SHRPD %r0,%r31,31,%r4
ADD %r3,%r22,%r3
ADD,DC %r0,%r20,%r20 ; Cycle 3
LDD -80(%sp),%r21
ADD %r3,%r28,%r3
LDD -64(%sp),%r29 ; Cycle 4
STD %r3,0(%r24)
XMPYU %fr7R,%fr7R,%fr29
LDD EIGHT(%r24),%r1 ; Cycle 5
XMPYU %fr7L,%fr7R,%fr27
XMPYU %fr7L,%fr7L,%fr30
LDD -104(%sp),%r19 ; Cycle 6
FSTD %fr29,-88(%sp)
ADD,DC %r4,%r20,%r20
FSTD %fr27,-72(%sp) ; Cycle 7
ADD %r20,%r1,%r1
ADD,DC %r0,%r21,%r21 ; Cycle 8
STD %r1,EIGHT(%r24)
; Shutdown code, first stage.
SHRPD %r29,%r0,31,%r4 ; Cycle 1 (main body)
LDO THIRTY_TWO(%r24),%r24
FSTD %fr30,-96(%sp)
LDD UN_SIXTEEN(%r24),%r1
SHRPD %r0,%r29,31,%r3 ; Cycle 2
ADD %r4,%r21,%r4
ADD,DC %r0,%r19,%r19 ; Cycle 3
LDD -88(%sp),%r22
ADD %r4,%r1,%r4
LDD -72(%sp),%r31 ; Cycle 4
STD %r4,UN_SIXTEEN(%r24)
LDD UN_EIGHT(%r24),%r28 ; Cycle 5
LDD -96(%sp),%r20 ; Cycle 6
ADD,DC %r3,%r19,%r19
ADD %r19,%r28,%r28 ; Cycle 7
ADD,DC %r0,%r22,%r22 ; Cycle 8
STD %r28,UN_EIGHT(%r24)
; Shutdown code, second stage.
$JOINDIAG
SHRPD %r31,%r0,31,%r3 ; Cycle 1 (alternate body)
LDD 0(%r24),%r28
SHRPD %r0,%r31,31,%r4 ; Cycle 2
ADD %r3,%r22,%r3
ADD,DC %r0,%r20,%r20 ; Cycle 3
ADD %r3,%r28,%r3
STD %r3,0(%r24) ; Cycle 4
LDD EIGHT(%r24),%r1 ; Cycle 5
ADD,DC %r4,%r20,%r20
ADD %r20,%r1,%r1 ; Cycle 7
ADD,DC %r0,%r0,%r21 ; Cycle 8
CMPIB,*= 0,%r21,$Z0 ; if no overflow, exit
STD %r1,EIGHT(%r24)
; Final carry propagation
$FDIAG1
LDO EIGHT(%r24),%r24
LDD EIGHT(%r24),%r26
ADDI 1,%r26,%r26
CMPIB,*= 0,%r26,$FDIAG1 ; Keep looping if there is a carry.
STD %r26,EIGHT(%r24)
$Z0
.LEAVE
.PROCEND
; .ALLOW
.SPACE $TEXT$
.SUBSPA $CODE$
#ifdef LITTLE_WORDIAN
.EXPORT maxpy_little,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,LONG_RETURN
.EXPORT add_diag_little,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,LONG_RETURN
#else
.EXPORT maxpy_big,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,LONG_RETURN
.EXPORT add_diag_big,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,LONG_RETURN
#endif
.END
; How to use "maxpy_PA20_little" and "maxpy_PA20_big"
;
; The routine "maxpy_PA20_little" or "maxpy_PA20_big"
; performs a 64-bit x any-size multiply, and adds the
; result to an area of memory. That is, it performs
; something like
;
; A B C D
; * Z
; __________
; P Q R S T
;
; and then adds the "PQRST" vector into an area of memory,
; handling all carries.
;
; Digression on nomenclature and endian-ness:
;
; Each of the capital letters in the above represents a 64-bit
; quantity. That is, you could think of the discussion as
; being in terms of radix-16-quintillion arithmetic. The data
; type being manipulated is "unsigned long long int". This
; requires the 64-bit extension of the HP-UX C compiler,
; available at release 10. You need these compiler flags to
; enable these extensions:
;
; -Aa +e +DA2.0 +DS2.0
;
; (The first specifies ANSI C, the second enables the
; extensions, which are beyond ANSI C, and the third and
; fourth tell the compiler to use whatever features of the
; PA2.0 architecture it wishes, in order to made the code more
; efficient. Since the presence of the assembly code will
; make the program unable to run on anything less than PA2.0,
; you might as well gain the performance enhancements in the C
; code as well.)
;
; Questions of "endian-ness" often come up, usually in the
; context of byte ordering in a word. These routines have a
; similar issue, that could be called "wordian-ness".
; Independent of byte ordering (PA is always big-endian), one
; can make two choices when representing extremely large
; numbers as arrays of 64-bit doublewords in memory.
;
; "Little-wordian" layout means that the least significant
; word of a number is stored at the lowest address.
;
; MSW LSW
; | |
; V V
;
; A B C D E
;
; ^ ^ ^
; | | |____ address 0
; | |
; | |_______address 8
; |
; address 32
;
; "Big-wordian" means that the most significant word is at the
; lowest address.
;
; MSW LSW
; | |
; V V
;
; A B C D E
;
; ^ ^ ^
; | | |____ address 32
; | |
; | |_______address 24
; |
; address 0
;
; When you compile the file, you must specify one or the other, with
; a switch "-DLITTLE_WORDIAN" or "-DBIG_WORDIAN".
;
; Incidentally, you assemble this file as part of your
; project with the same C compiler as the rest of the program.
; My "makefile" for a superprecision arithmetic package has
; the following stuff:
;
; # definitions:
; CC = cc -Aa +e -z +DA2.0 +DS2.0 +w1
; CFLAGS = +O3
; LDFLAGS = -L /usr/lib -Wl,-aarchive
;
; # general build rule for ".s" files:
; .s.o:
; $(CC) $(CFLAGS) -c $< -DBIG_WORDIAN
;
; # Now any bind step that calls for pa20.o will assemble pa20.s
;
; End of digression, back to arithmetic:
;
; The way we multiply two huge numbers is, of course, to multiply
; the "ABCD" vector by each of the "WXYZ" doublewords, adding
; the result vectors with increasing offsets, the way we learned
; in school, back before we all used calculators:
;
; A B C D
; * W X Y Z
; __________
; P Q R S T
; E F G H I
; M N O P Q
; + R S T U V
; _______________
; F I N A L S U M
;
; So we call maxpy_PA20_big (in my case; my package is
; big-wordian) repeatedly, giving the W, X, Y, and Z arguments
; in turn as the "scalar", and giving the "ABCD" vector each
; time. We direct it to add its result into an area of memory
; that we have cleared at the start. We skew the exact
; location into that area with each call.
;
; The prototype for the function is
;
; extern void maxpy_PA20_big(
; int length, /* Number of doublewords in the multiplicand vector. */
; const long long int *scalaraddr, /* Address to fetch the scalar. */
; const long long int *multiplicand, /* The multiplicand vector. */
; long long int *result); /* Where to accumulate the result. */
;
; (You should place a copy of this prototype in an include file
; or in your C file.)
;
; Now, IN ALL CASES, the given address for the multiplicand or
; the result is that of the LEAST SIGNIFICANT DOUBLEWORD.
; That word is, of course, the word at which the routine
; starts processing. "maxpy_PA20_little" then increases the
; addresses as it computes. "maxpy_PA20_big" decreases them.
;
; In our example above, "length" would be 4 in each case.
; "multiplicand" would be the "ABCD" vector. Specifically,
; the address of the element "D". "scalaraddr" would be the
; address of "W", "X", "Y", or "Z" on the four calls that we
; would make. (The order doesn't matter, of course.)
; "result" would be the appropriate address in the result
; area. When multiplying by "Z", that would be the least
; significant word. When multiplying by "Y", it would be the
; next higher word (8 bytes higher if little-wordian; 8 bytes
; lower if big-wordian), and so on. The size of the result
; area must be the the sum of the sizes of the multiplicand
; and multiplier vectors, and must be initialized to zero
; before we start.
;
; Whenever the routine adds its partial product into the result
; vector, it follows carry chains as far as they need to go.
;
; Here is the super-precision multiply routine that I use for
; my package. The package is big-wordian. I have taken out
; handling of exponents (it's a floating point package):
;
; static void mul_PA20(
; int size,
; const long long int *arg1,
; const long long int *arg2,
; long long int *result)
; {
; int i;
;
; for (i=0 ; i<2*size ; i++) result[i] = 0ULL;
;
; for (i=0 ; i<size ; i++) {
; maxpy_PA20_big(size, &arg2[i], &arg1[size-1], &result[size+i]);
; }
; }

View File

@@ -1,54 +0,0 @@
#/bin/sh
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is script to change the system id in an object file from PA-RISC 2.0 to 1.1.
#
# The Initial Developer of the Original Code is
# Hewlett-Packard Company.
# Portions created by the Initial Developer are Copyright (C) 1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# wrapped by Dennis Handly on Tue Mar 23 15:23:43 1999
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# script to change the system id in an object file from PA-RISC 2.0 to 1.1
adb -w $1 << EOF
?m 0 -1 0
0x0?X
0x0?W (@0x0&~0x40000)|(~@0x0&0x40000)
0?"change checksum"
0x7c?X
0x7c?W (@0x7c&~0x40000)|(~@0x7c&0x40000)
$q
EOF
exit 0

View File

@@ -1,62 +0,0 @@
/*
* logtab.h
*
* Arbitrary precision integer arithmetic library
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: logtab.h,v 1.5 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
const float s_logv_2[] = {
0.000000000f, 0.000000000f, 1.000000000f, 0.630929754f, /* 0 1 2 3 */
0.500000000f, 0.430676558f, 0.386852807f, 0.356207187f, /* 4 5 6 7 */
0.333333333f, 0.315464877f, 0.301029996f, 0.289064826f, /* 8 9 10 11 */
0.278942946f, 0.270238154f, 0.262649535f, 0.255958025f, /* 12 13 14 15 */
0.250000000f, 0.244650542f, 0.239812467f, 0.235408913f, /* 16 17 18 19 */
0.231378213f, 0.227670249f, 0.224243824f, 0.221064729f, /* 20 21 22 23 */
0.218104292f, 0.215338279f, 0.212746054f, 0.210309918f, /* 24 25 26 27 */
0.208014598f, 0.205846832f, 0.203795047f, 0.201849087f, /* 28 29 30 31 */
0.200000000f, 0.198239863f, 0.196561632f, 0.194959022f, /* 32 33 34 35 */
0.193426404f, 0.191958720f, 0.190551412f, 0.189200360f, /* 36 37 38 39 */
0.187901825f, 0.186652411f, 0.185449023f, 0.184288833f, /* 40 41 42 43 */
0.183169251f, 0.182087900f, 0.181042597f, 0.180031327f, /* 44 45 46 47 */
0.179052232f, 0.178103594f, 0.177183820f, 0.176291434f, /* 48 49 50 51 */
0.175425064f, 0.174583430f, 0.173765343f, 0.172969690f, /* 52 53 54 55 */
0.172195434f, 0.171441601f, 0.170707280f, 0.169991616f, /* 56 57 58 59 */
0.169293808f, 0.168613099f, 0.167948779f, 0.167300179f, /* 60 61 62 63 */
0.166666667f
};

View File

@@ -1,64 +0,0 @@
#!/usr/linguist/bin/perl
#
# make-logtab
#
# Generate a table of logarithms of 2 in various bases, for use in
# estimating the output sizes of various bases.
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic
# library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>
# Portions created by the Initial Developer are Copyright (C) 1998, 2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: make-logtab,v 1.4 2005-02-02 22:28:22 gerv%gerv.net Exp $
$ARRAYNAME = $ENV{'ARRAYNAME'} || "s_logv_2";
$ARRAYTYPE = $ENV{'ARRAYTYPE'} || "float";
printf("const %s %s[] = {\n %0.9ff, %0.9ff, ",
$ARRAYTYPE, $ARRAYNAME, 0, 0);
$brk = 2;
for($ix = 2; $ix < 64; $ix++) {
printf("%0.9ff, ", (log(2)/log($ix)));
$brk = ($brk + 1) & 3;
if(!$brk) {
printf(" /* %2d %2d %2d %2d */\n ",
$ix - 3, $ix - 2, $ix - 1, $ix);
}
}
printf("%0.9ff\n};\n\n", (log(2)/log($ix)));
exit 0;

View File

@@ -1,133 +0,0 @@
#!/usr/linguist/bin/perl
#
# make-test-arrays
#
# Given a test-arrays file, which specifies the test suite names, the
# names of the functions which perform those test suites, and
# descriptive comments, this script generates C structures for the
# mpi-test program. The input consists of lines of the form:
#
# suite-name:function-name:comment
#
# The output is written to the standard output. Blank lines are
# ignored, and comments beginning with '#' are stripped.
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: make-test-arrays,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
# Read parameters from the environment, if available
$NAMEVAR = $ENV{'NAMEVAR'} || "g_names";
$COUNTVAR = $ENV{'COUNTVAR'} || "g_count";
$FUNCVAR = $ENV{'FUNCVAR'} || "g_tests";
$DESCVAR = $ENV{'DESCVAR'} || "g_descs";
$FUNCLEN = 13;
$NAMELEN = 18;
$DESCLEN = 45;
#------------------------------------------------------------------------
# Suck in input from the files on the command line, or standard input
while(<>) {
chomp;
s/\#.*$//;
next if /^\s*$/;
($suite, $func, $desc) = split(/:/, $_);
$tmp = { "suite" => $suite,
"func" => $func,
"desc" => $desc };
push(@item, $tmp);
}
$count = scalar(@item);
$last = pop(@item);
#------------------------------------------------------------------------
# Output the table of names
print "/* Table mapping test suite names to index numbers */\n";
printf("const int %s = %d;\n", $COUNTVAR, $count);
printf("const char *%s[] = {\n", $NAMEVAR);
foreach $elt (@item) {
printf(" \"%s\",%s/* %s%s */\n", $elt->{"suite"},
" " x ($NAMELEN - length($elt->{"suite"})),
$elt->{"desc"},
" " x ($DESCLEN - length($elt->{"desc"})));
}
printf(" \"%s\" %s/* %s%s */\n", $last->{"suite"},
" " x ($NAMELEN - length($last->{"suite"})),
$last->{"desc"},
" " x ($DESCLEN - length($last->{"desc"})));
print "};\n\n";
#------------------------------------------------------------------------
# Output the driver function prototypes
print "/* Test function prototypes */\n";
foreach $elt (@item, $last) {
printf("int %s(void);\n", $elt->{"func"});
}
print "\n";
#------------------------------------------------------------------------
# Output the table of functions
print "/* Table mapping index numbers to functions */\n";
printf("int (*%s[])(void) = {\n ", $FUNCVAR);
$brk = 0;
foreach $elt (@item) {
print($elt->{"func"}, ", ",
" " x ($FUNCLEN - length($elt->{"func"})));
$brk = ($brk + 1) & 3;
print "\n " unless($brk);
}
print $last->{"func"}, "\n};\n\n";
#------------------------------------------------------------------------
# Output the table of descriptions
print "/* Table mapping index numbers to descriptions */\n";
printf("const char *%s[] = {\n", $DESCVAR);
foreach $elt (@item) {
printf(" \"%s\",\n", $elt->{"desc"});
}
printf(" \"%s\"\n};\n\n", $last->{"desc"});
exit 0;

View File

@@ -1,342 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <time.h>
#include "mpi.h"
#include "mpi-priv.h"
/* #define OLD_WAY 1 */
/* This key is the 1024-bit test key used for speed testing of RSA private
** key ops.
*/
#define CONST const
static CONST unsigned char default_n[128] = {
0xc2,0xae,0x96,0x89,0xaf,0xce,0xd0,0x7b,0x3b,0x35,0xfd,0x0f,0xb1,0xf4,0x7a,0xd1,
0x3c,0x7d,0xb5,0x86,0xf2,0x68,0x36,0xc9,0x97,0xe6,0x82,0x94,0x86,0xaa,0x05,0x39,
0xec,0x11,0x51,0xcc,0x5c,0xa1,0x59,0xba,0x29,0x18,0xf3,0x28,0xf1,0x9d,0xe3,0xae,
0x96,0x5d,0x6d,0x87,0x73,0xf6,0xf6,0x1f,0xd0,0x2d,0xfb,0x2f,0x7a,0x13,0x7f,0xc8,
0x0c,0x7a,0xe9,0x85,0xfb,0xce,0x74,0x86,0xf8,0xef,0x2f,0x85,0x37,0x73,0x0f,0x62,
0x4e,0x93,0x17,0xb7,0x7e,0x84,0x9a,0x94,0x11,0x05,0xca,0x0d,0x31,0x4b,0x2a,0xc8,
0xdf,0xfe,0xe9,0x0c,0x13,0xc7,0xf2,0xad,0x19,0x64,0x28,0x3c,0xb5,0x6a,0xc8,0x4b,
0x79,0xea,0x7c,0xce,0x75,0x92,0x45,0x3e,0xa3,0x9d,0x64,0x6f,0x04,0x69,0x19,0x17
};
static CONST unsigned char default_d[128] = {
0x13,0xcb,0xbc,0xf2,0xf3,0x35,0x8c,0x6d,0x7b,0x6f,0xd9,0xf3,0xa6,0x9c,0xbd,0x80,
0x59,0x2e,0x4f,0x2f,0x11,0xa7,0x17,0x2b,0x18,0x8f,0x0f,0xe8,0x1a,0x69,0x5f,0x6e,
0xac,0x5a,0x76,0x7e,0xd9,0x4c,0x6e,0xdb,0x47,0x22,0x8a,0x57,0x37,0x7a,0x5e,0x94,
0x7a,0x25,0xb5,0xe5,0x78,0x1d,0x3c,0x99,0xaf,0x89,0x7d,0x69,0x2e,0x78,0x9d,0x1d,
0x84,0xc8,0xc1,0xd7,0x1a,0xb2,0x6d,0x2d,0x8a,0xd9,0xab,0x6b,0xce,0xae,0xb0,0xa0,
0x58,0x55,0xad,0x5c,0x40,0x8a,0xd6,0x96,0x08,0x8a,0xe8,0x63,0xe6,0x3d,0x6c,0x20,
0x49,0xc7,0xaf,0x0f,0x25,0x73,0xd3,0x69,0x43,0x3b,0xf2,0x32,0xf8,0x3d,0x5e,0xee,
0x7a,0xca,0xd6,0x94,0x55,0xe5,0xbd,0x25,0x34,0x8d,0x63,0x40,0xb5,0x8a,0xc3,0x01
};
#define DEFAULT_ITERS 50
typedef clock_t timetype;
#define gettime(x) *(x) = clock()
#define subtime(a, b) a -= b
#define msec(x) ((clock_t)((double)x * 1000.0 / CLOCKS_PER_SEC))
#define sec(x) (x / CLOCKS_PER_SEC)
struct TimingContextStr {
timetype start;
timetype end;
timetype interval;
int minutes;
int seconds;
int millisecs;
};
typedef struct TimingContextStr TimingContext;
TimingContext *CreateTimingContext(void)
{
return (TimingContext *)malloc(sizeof(TimingContext));
}
void DestroyTimingContext(TimingContext *ctx)
{
free(ctx);
}
void TimingBegin(TimingContext *ctx)
{
gettime(&ctx->start);
}
static void timingUpdate(TimingContext *ctx)
{
ctx->millisecs = msec(ctx->interval) % 1000;
ctx->seconds = sec(ctx->interval);
ctx->minutes = ctx->seconds / 60;
ctx->seconds %= 60;
}
void TimingEnd(TimingContext *ctx)
{
gettime(&ctx->end);
ctx->interval = ctx->end;
subtime(ctx->interval, ctx->start);
timingUpdate(ctx);
}
char *TimingGenerateString(TimingContext *ctx)
{
static char sBuf[4096];
sprintf(sBuf, "%d minutes, %d.%03d seconds", ctx->minutes,
ctx->seconds, ctx->millisecs);
return sBuf;
}
static void
dumpBytes( unsigned char * b, int l)
{
int i;
if (l <= 0)
return;
for (i = 0; i < l; ++i) {
if (i % 16 == 0)
printf("\t");
printf(" %02x", b[i]);
if (i % 16 == 15)
printf("\n");
}
if ((i % 16) != 0)
printf("\n");
printf("\n");
}
static mp_err
testNewFuncs(const unsigned char * modulusBytes, int modulus_len)
{
mp_err mperr = MP_OKAY;
mp_int modulus;
unsigned char buf[512];
mperr = mp_init(&modulus);
mperr = mp_read_unsigned_octets(&modulus, modulusBytes, modulus_len );
mperr = mp_to_fixlen_octets(&modulus, buf, modulus_len);
mperr = mp_to_fixlen_octets(&modulus, buf, modulus_len+1);
mperr = mp_to_fixlen_octets(&modulus, buf, modulus_len+4);
mperr = mp_to_unsigned_octets(&modulus, buf, modulus_len);
mperr = mp_to_signed_octets(&modulus, buf, modulus_len + 1);
mp_clear(&modulus);
return mperr;
}
int
testModExp( const unsigned char * modulusBytes,
const unsigned int expo,
const unsigned char * input,
unsigned char * output,
int modulus_len)
{
mp_err mperr = MP_OKAY;
mp_int modulus;
mp_int base;
mp_int exponent;
mp_int result;
mperr = mp_init(&modulus);
mperr += mp_init(&base);
mperr += mp_init(&exponent);
mperr += mp_init(&result);
/* we initialize all mp_ints unconditionally, even if some fail.
** This guarantees that the DIGITS pointer is valid (even if null).
** So, mp_clear will do the right thing below.
*/
if (mperr == MP_OKAY) {
mperr = mp_read_unsigned_octets(&modulus,
modulusBytes + (sizeof default_n - modulus_len), modulus_len );
mperr += mp_read_unsigned_octets(&base, input, modulus_len );
mp_set(&exponent, expo);
if (mperr == MP_OKAY) {
#if OLD_WAY
mperr = s_mp_exptmod(&base, &exponent, &modulus, &result);
#else
mperr = mp_exptmod(&base, &exponent, &modulus, &result);
#endif
if (mperr == MP_OKAY) {
mperr = mp_to_fixlen_octets(&result, output, modulus_len);
}
}
}
mp_clear(&base);
mp_clear(&result);
mp_clear(&modulus);
mp_clear(&exponent);
return (int)mperr;
}
int
doModExp( const unsigned char * modulusBytes,
const unsigned char * exponentBytes,
const unsigned char * input,
unsigned char * output,
int modulus_len)
{
mp_err mperr = MP_OKAY;
mp_int modulus;
mp_int base;
mp_int exponent;
mp_int result;
mperr = mp_init(&modulus);
mperr += mp_init(&base);
mperr += mp_init(&exponent);
mperr += mp_init(&result);
/* we initialize all mp_ints unconditionally, even if some fail.
** This guarantees that the DIGITS pointer is valid (even if null).
** So, mp_clear will do the right thing below.
*/
if (mperr == MP_OKAY) {
mperr = mp_read_unsigned_octets(&modulus,
modulusBytes + (sizeof default_n - modulus_len), modulus_len );
mperr += mp_read_unsigned_octets(&exponent, exponentBytes, modulus_len );
mperr += mp_read_unsigned_octets(&base, input, modulus_len );
if (mperr == MP_OKAY) {
#if OLD_WAY
mperr = s_mp_exptmod(&base, &exponent, &modulus, &result);
#else
mperr = mp_exptmod(&base, &exponent, &modulus, &result);
#endif
if (mperr == MP_OKAY) {
mperr = mp_to_fixlen_octets(&result, output, modulus_len);
}
}
}
mp_clear(&base);
mp_clear(&result);
mp_clear(&modulus);
mp_clear(&exponent);
return (int)mperr;
}
int
main(int argc, char **argv)
{
TimingContext * timeCtx;
char * progName;
long iters = DEFAULT_ITERS;
unsigned int modulus_len;
int i;
int rv;
unsigned char buf [1024];
unsigned char buf2[1024];
progName = strrchr(argv[0], '/');
if (!progName)
progName = strrchr(argv[0], '\\');
progName = progName ? progName+1 : argv[0];
if (argc >= 2) {
iters = atol(argv[1]);
}
if (argc >= 3) {
modulus_len = atol(argv[2]);
} else
modulus_len = sizeof default_n;
/* no library init function !? */
memset(buf, 0x41, sizeof buf);
if (iters < 2) {
testNewFuncs( default_n, modulus_len);
testNewFuncs( default_n+1, modulus_len - 1);
testNewFuncs( default_n+2, modulus_len - 2);
testNewFuncs( default_n+3, modulus_len - 3);
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
rv = testModExp(default_n, 0, buf, buf2, modulus_len);
dumpBytes((unsigned char *)buf2, modulus_len);
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
rv = testModExp(default_n, 1, buf, buf2, modulus_len);
dumpBytes((unsigned char *)buf2, modulus_len);
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
rv = testModExp(default_n, 2, buf, buf2, modulus_len);
dumpBytes((unsigned char *)buf2, modulus_len);
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
rv = testModExp(default_n, 3, buf, buf2, modulus_len);
dumpBytes((unsigned char *)buf2, modulus_len);
}
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
rv = doModExp(default_n, default_d, buf, buf2, modulus_len);
if (rv != 0) {
fprintf(stderr, "Error in modexp operation:\n");
exit(1);
}
dumpBytes((unsigned char *)buf2, modulus_len);
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
timeCtx = CreateTimingContext();
TimingBegin(timeCtx);
i = iters;
while (i--) {
rv = doModExp(default_n, default_d, buf, buf2, modulus_len);
if (rv != 0) {
fprintf(stderr, "Error in modexp operation\n");
exit(1);
}
}
TimingEnd(timeCtx);
printf("%ld iterations in %s\n", iters, TimingGenerateString(timeCtx));
printf("%lu allocations, %lu frees, %lu copies\n", mp_allocs, mp_frees, mp_copies);
return 0;
}

View File

@@ -1,329 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is SPARC optimized Montgomery multiply functions.
*
* The Initial Developer of the Original Code is
* Sun Microsystems Inc.
* Portions created by the Initial Developer are Copyright (C) 1999-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape Communications Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: montmulf.c,v 1.7 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
#ifdef SOLARIS
#define RF_INLINE_MACROS 1
#endif
static const double TwoTo16=65536.0;
static const double TwoToMinus16=1.0/65536.0;
static const double Zero=0.0;
static const double TwoTo32=65536.0*65536.0;
static const double TwoToMinus32=1.0/(65536.0*65536.0);
#ifdef RF_INLINE_MACROS
double upper32(double);
double lower32(double, double);
double mod(double, double, double);
void i16_to_d16_and_d32x4(const double * /*1/(2^16)*/,
const double * /* 2^16*/,
const double * /* 0 */,
double * /*result16*/,
double * /* result32 */,
float * /*source - should be unsigned int*
converted to float* */);
#else
#ifdef MP_USE_FLOOR
#include <math.h>
#else
#define floor(d) ((double)((unsigned long long)(d)))
#endif
static double upper32(double x)
{
return floor(x*TwoToMinus32);
}
static double lower32(double x, double y)
{
return x-TwoTo32*floor(x*TwoToMinus32);
}
static double mod(double x, double oneoverm, double m)
{
return x-m*floor(x*oneoverm);
}
#endif
static void cleanup(double *dt, int from, int tlen)
{
int i;
double tmp,tmp1,x,x1;
tmp=tmp1=Zero;
/* original code **
for(i=2*from;i<2*tlen-2;i++)
{
x=dt[i];
dt[i]=lower32(x,Zero)+tmp1;
tmp1=tmp;
tmp=upper32(x);
}
dt[tlen-2]+=tmp1;
dt[tlen-1]+=tmp;
**end original code ***/
/* new code ***/
for(i=2*from;i<2*tlen;i+=2)
{
x=dt[i];
x1=dt[i+1];
dt[i]=lower32(x,Zero)+tmp;
dt[i+1]=lower32(x1,Zero)+tmp1;
tmp=upper32(x);
tmp1=upper32(x1);
}
/** end new code **/
}
void conv_d16_to_i32(unsigned int *i32, double *d16, long long *tmp, int ilen)
{
int i;
long long t, t1, a, b, c, d;
t1=0;
a=(long long)d16[0];
b=(long long)d16[1];
for(i=0; i<ilen-1; i++)
{
c=(long long)d16[2*i+2];
t1+=(unsigned int)a;
t=(a>>32);
d=(long long)d16[2*i+3];
t1+=(b&0xffff)<<16;
t+=(b>>16)+(t1>>32);
i32[i]=(unsigned int)t1;
t1=t;
a=c;
b=d;
}
t1+=(unsigned int)a;
t=(a>>32);
t1+=(b&0xffff)<<16;
i32[i]=(unsigned int)t1;
}
void conv_i32_to_d32(double *d32, unsigned int *i32, int len)
{
int i;
#pragma pipeloop(0)
for(i=0;i<len;i++) d32[i]=(double)(i32[i]);
}
void conv_i32_to_d16(double *d16, unsigned int *i32, int len)
{
int i;
unsigned int a;
#pragma pipeloop(0)
for(i=0;i<len;i++)
{
a=i32[i];
d16[2*i]=(double)(a&0xffff);
d16[2*i+1]=(double)(a>>16);
}
}
void conv_i32_to_d32_and_d16(double *d32, double *d16,
unsigned int *i32, int len)
{
int i = 0;
unsigned int a;
#pragma pipeloop(0)
#ifdef RF_INLINE_MACROS
for(;i<len-3;i+=4)
{
i16_to_d16_and_d32x4(&TwoToMinus16, &TwoTo16, &Zero,
&(d16[2*i]), &(d32[i]), (float *)(&(i32[i])));
}
#endif
for(;i<len;i++)
{
a=i32[i];
d32[i]=(double)(i32[i]);
d16[2*i]=(double)(a&0xffff);
d16[2*i+1]=(double)(a>>16);
}
}
void adjust_montf_result(unsigned int *i32, unsigned int *nint, int len)
{
long long acc;
int i;
if(i32[len]>0) i=-1;
else
{
for(i=len-1; i>=0; i--)
{
if(i32[i]!=nint[i]) break;
}
}
if((i<0)||(i32[i]>nint[i]))
{
acc=0;
for(i=0;i<len;i++)
{
acc=acc+(unsigned long long)(i32[i])-(unsigned long long)(nint[i]);
i32[i]=(unsigned int)acc;
acc=acc>>32;
}
}
}
/*
** the lengths of the input arrays should be at least the following:
** result[nlen+1], dm1[nlen], dm2[2*nlen+1], dt[4*nlen+2], dn[nlen], nint[nlen]
** all of them should be different from one another
**
*/
void mont_mulf_noconv(unsigned int *result,
double *dm1, double *dm2, double *dt,
double *dn, unsigned int *nint,
int nlen, double dn0)
{
int i, j, jj;
int tmp;
double digit, m2j, nextm2j, a, b;
double *dptmp, *pdm1, *pdm2, *pdn, *pdtj, pdn_0, pdm1_0;
pdm1=&(dm1[0]);
pdm2=&(dm2[0]);
pdn=&(dn[0]);
pdm2[2*nlen]=Zero;
if (nlen!=16)
{
for(i=0;i<4*nlen+2;i++) dt[i]=Zero;
a=dt[0]=pdm1[0]*pdm2[0];
digit=mod(lower32(a,Zero)*dn0,TwoToMinus16,TwoTo16);
pdtj=&(dt[0]);
for(j=jj=0;j<2*nlen;j++,jj++,pdtj++)
{
m2j=pdm2[j];
a=pdtj[0]+pdn[0]*digit;
b=pdtj[1]+pdm1[0]*pdm2[j+1]+a*TwoToMinus16;
pdtj[1]=b;
#pragma pipeloop(0)
for(i=1;i<nlen;i++)
{
pdtj[2*i]+=pdm1[i]*m2j+pdn[i]*digit;
}
if((jj==30)) {cleanup(dt,j/2+1,2*nlen+1); jj=0;}
digit=mod(lower32(b,Zero)*dn0,TwoToMinus16,TwoTo16);
}
}
else
{
a=dt[0]=pdm1[0]*pdm2[0];
dt[65]= dt[64]= dt[63]= dt[62]= dt[61]= dt[60]=
dt[59]= dt[58]= dt[57]= dt[56]= dt[55]= dt[54]=
dt[53]= dt[52]= dt[51]= dt[50]= dt[49]= dt[48]=
dt[47]= dt[46]= dt[45]= dt[44]= dt[43]= dt[42]=
dt[41]= dt[40]= dt[39]= dt[38]= dt[37]= dt[36]=
dt[35]= dt[34]= dt[33]= dt[32]= dt[31]= dt[30]=
dt[29]= dt[28]= dt[27]= dt[26]= dt[25]= dt[24]=
dt[23]= dt[22]= dt[21]= dt[20]= dt[19]= dt[18]=
dt[17]= dt[16]= dt[15]= dt[14]= dt[13]= dt[12]=
dt[11]= dt[10]= dt[ 9]= dt[ 8]= dt[ 7]= dt[ 6]=
dt[ 5]= dt[ 4]= dt[ 3]= dt[ 2]= dt[ 1]=Zero;
pdn_0=pdn[0];
pdm1_0=pdm1[0];
digit=mod(lower32(a,Zero)*dn0,TwoToMinus16,TwoTo16);
pdtj=&(dt[0]);
for(j=0;j<32;j++,pdtj++)
{
m2j=pdm2[j];
a=pdtj[0]+pdn_0*digit;
b=pdtj[1]+pdm1_0*pdm2[j+1]+a*TwoToMinus16;
pdtj[1]=b;
/**** this loop will be fully unrolled:
for(i=1;i<16;i++)
{
pdtj[2*i]+=pdm1[i]*m2j+pdn[i]*digit;
}
*************************************/
pdtj[2]+=pdm1[1]*m2j+pdn[1]*digit;
pdtj[4]+=pdm1[2]*m2j+pdn[2]*digit;
pdtj[6]+=pdm1[3]*m2j+pdn[3]*digit;
pdtj[8]+=pdm1[4]*m2j+pdn[4]*digit;
pdtj[10]+=pdm1[5]*m2j+pdn[5]*digit;
pdtj[12]+=pdm1[6]*m2j+pdn[6]*digit;
pdtj[14]+=pdm1[7]*m2j+pdn[7]*digit;
pdtj[16]+=pdm1[8]*m2j+pdn[8]*digit;
pdtj[18]+=pdm1[9]*m2j+pdn[9]*digit;
pdtj[20]+=pdm1[10]*m2j+pdn[10]*digit;
pdtj[22]+=pdm1[11]*m2j+pdn[11]*digit;
pdtj[24]+=pdm1[12]*m2j+pdn[12]*digit;
pdtj[26]+=pdm1[13]*m2j+pdn[13]*digit;
pdtj[28]+=pdm1[14]*m2j+pdn[14]*digit;
pdtj[30]+=pdm1[15]*m2j+pdn[15]*digit;
/* no need for cleenup, cannot overflow */
digit=mod(lower32(b,Zero)*dn0,TwoToMinus16,TwoTo16);
}
}
conv_d16_to_i32(result,dt+2*nlen,(long long *)dt,nlen+1);
adjust_montf_result(result,nint,nlen);
}

View File

@@ -1,103 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is interface file for SPARC Montgomery multiply functions.
*
* The Initial Developer of the Original Code is
* Sun Microsystems Inc.
* Portions created by the Initial Developer are Copyright (C) 1999-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape Communications Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: montmulf.h,v 1.4 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
/* The functions that are to be called from outside of the .s file have the
* following interfaces and array size requirements:
*/
void conv_i32_to_d32(double *d32, unsigned int *i32, int len);
/* Converts an array of int's to an array of doubles, so that each double
* corresponds to an int. len is the number of items converted.
* Does not allocate the output array.
* The pointers d32 and i32 should point to arrays of size at least len
* (doubles and unsigned ints, respectively)
*/
void conv_i32_to_d16(double *d16, unsigned int *i32, int len);
/* Converts an array of int's to an array of doubles so that each element
* of the int array is converted to a pair of doubles, the first one
* corresponding to the lower (least significant) 16 bits of the int and
* the second one corresponding to the upper (most significant) 16 bits of
* the 32-bit int. len is the number of ints converted.
* Does not allocate the output array.
* The pointer d16 should point to an array of doubles of size at least
* 2*len and i32 should point an array of ints of size at least len
*/
void conv_i32_to_d32_and_d16(double *d32, double *d16,
unsigned int *i32, int len);
/* Does the above two conversions together, it is much faster than doing
* both of those in succession
*/
void mont_mulf_noconv(unsigned int *result,
double *dm1, double *dm2, double *dt,
double *dn, unsigned int *nint,
int nlen, double dn0);
/* Does the Montgomery multiplication of the numbers stored in the arrays
* pointed to by dm1 and dm2, writing the result to the array pointed to by
* result. It uses the array pointed to by dt as a temporary work area.
* nint should point to the modulus in the array-of-integers representation,
* dn should point to its array-of-doubles as obtained as a result of the
* function call conv_i32_to_d32(dn, nint, nlen);
* nlen is the length of the array containing the modulus.
* The representation used for dm1 is the one that is a result of the function
* call conv_i32_to_d32(dm1, m1, nlen), the representation for dm2 is the
* result of the function call conv_i32_to_d16(dm2, m2, nlen).
* Note that m1 and m2 should both be of length nlen, so they should be
* padded with 0's if necessary before the conversion. The result comes in
* this form (int representation, padded with 0's).
* dn0 is the value of the 16 least significant bits of n0'.
* The function does not allocate memory for any of the arrays, so the
* pointers should point to arrays with the following minimal sizes:
* result - nlen+1
* dm1 - nlen
* dm2 - 2*nlen+1 ( the +1 is necessary for technical reasons )
* dt - 4*nlen+2
* dn - nlen
* nint - nlen
* No two arrays should point to overlapping areas of memory.
*/

View File

@@ -1,141 +0,0 @@
!
! ***** BEGIN LICENSE BLOCK *****
! Version: MPL 1.1/GPL 2.0/LGPL 2.1
!
! The contents of this file are subject to the Mozilla Public License Version
! 1.1 (the "License"); you may not use this file except in compliance with
! the License. You may obtain a copy of the License at
! http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
! for the specific language governing rights and limitations under the
! License.
!
! The Original Code is inline macros for SPARC Montgomery multiply functions.
!
! The Initial Developer of the Original Code is
! Sun Microsystems Inc.
! Portions created by the Initial Developer are Copyright (C) 1999-2000
! the Initial Developer. All Rights Reserved.
!
! Contributor(s):
!
! Alternatively, the contents of this file may be used under the terms of
! either the GNU General Public License Version 2 or later (the "GPL"), or
! the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
! in which case the provisions of the GPL or the LGPL are applicable instead
! of those above. If you wish to allow use of your version of this file only
! under the terms of either the GPL or the LGPL, and not to allow others to
! use your version of this file under the terms of the MPL, indicate your
! decision by deleting the provisions above and replace them with the notice
! and other provisions required by the GPL or the LGPL. If you do not delete
! the provisions above, a recipient may use your version of this file under
! the terms of any one of the MPL, the GPL or the LGPL.
!
! ***** END LICENSE BLOCK *****
! $Id: montmulf.il,v 1.4 2004-04-27 23:04:36 gerv%gerv.net Exp $
!
! double upper32(double /*frs1*/);
!
.inline upper32,8
std %o0,[%sp+0x48]
ldd [%sp+0x48],%f10
fdtox %f10,%f10
fitod %f10,%f0
.end
!
! double lower32(double /*frs1*/, double /* Zero */);
!
.inline lower32,8
std %o0,[%sp+0x48]
ldd [%sp+0x48],%f10
std %o2,[%sp+0x48]
ldd [%sp+0x48],%f12
fdtox %f10,%f10
fmovs %f12,%f10
fxtod %f10,%f0
.end
!
! double mod(double /*x*/, double /*1/m*/, double /*m*/);
!
.inline mod,12
std %o0,[%sp+0x48]
ldd [%sp+0x48],%f2
std %o2,[%sp+0x48]
ldd [%sp+0x48],%f4
std %o4,[%sp+0x48]
ldd [%sp+0x48],%f6
fmuld %f2,%f4,%f4
fdtox %f4,%f4
fxtod %f4,%f4
fmuld %f4,%f6,%f4
fsubd %f2,%f4,%f0
.end
!
! void i16_to_d16_and_d32x4(double * /*1/(2^16)*/, double * /* 2^16*/,
! double * /* 0 */,
! double * /*result16*/, double * /* result32 */
! float * /*source - should be unsigned int*
! converted to float* */);
!
.inline i16_to_d16_and_d32x4,24
ldd [%o0],%f2 ! 1/(2^16)
ldd [%o1],%f4 ! 2^16
ldd [%o2],%f22
fmovd %f22,%f6
ld [%o5],%f7
fmovd %f22,%f10
ld [%o5+4],%f11
fmovd %f22,%f14
ld [%o5+8],%f15
fmovd %f22,%f18
ld [%o5+12],%f19
fxtod %f6,%f6
std %f6,[%o4]
fxtod %f10,%f10
std %f10,[%o4+8]
fxtod %f14,%f14
std %f14,[%o4+16]
fxtod %f18,%f18
std %f18,[%o4+24]
fmuld %f2,%f6,%f8
fmuld %f2,%f10,%f12
fmuld %f2,%f14,%f16
fmuld %f2,%f18,%f20
fdtox %f8,%f8
fdtox %f12,%f12
fdtox %f16,%f16
fdtox %f20,%f20
fxtod %f8,%f8
std %f8,[%o3+8]
fxtod %f12,%f12
std %f12,[%o3+24]
fxtod %f16,%f16
std %f16,[%o3+40]
fxtod %f20,%f20
std %f20,[%o3+56]
fmuld %f8,%f4,%f8
fmuld %f12,%f4,%f12
fmuld %f16,%f4,%f16
fmuld %f20,%f4,%f20
fsubd %f6,%f8,%f8
std %f8,[%o3]
fsubd %f10,%f12,%f12
std %f12,[%o3+16]
fsubd %f14,%f16,%f16
std %f16,[%o3+32]
fsubd %f18,%f20,%f20
std %f20,[%o3+48]
.end

File diff suppressed because it is too large Load Diff

View File

@@ -1,141 +0,0 @@
!
! ***** BEGIN LICENSE BLOCK *****
! Version: MPL 1.1/GPL 2.0/LGPL 2.1
!
! The contents of this file are subject to the Mozilla Public License Version
! 1.1 (the "License"); you may not use this file except in compliance with
! the License. You may obtain a copy of the License at
! http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
! for the specific language governing rights and limitations under the
! License.
!
! The Original Code is inline macros for SPARC Montgomery multiply functions.
!
! The Initial Developer of the Original Code is
! Sun Microsystems Inc.
! Portions created by the Initial Developer are Copyright (C) 1999-2000
! the Initial Developer. All Rights Reserved.
!
! Contributor(s):
!
! Alternatively, the contents of this file may be used under the terms of
! either the GNU General Public License Version 2 or later (the "GPL"), or
! the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
! in which case the provisions of the GPL or the LGPL are applicable instead
! of those above. If you wish to allow use of your version of this file only
! under the terms of either the GPL or the LGPL, and not to allow others to
! use your version of this file under the terms of the MPL, indicate your
! decision by deleting the provisions above and replace them with the notice
! and other provisions required by the GPL or the LGPL. If you do not delete
! the provisions above, a recipient may use your version of this file under
! the terms of any one of the MPL, the GPL or the LGPL.
!
! ***** END LICENSE BLOCK *****
! $Id: montmulfv8.il,v 1.3 2004-04-27 23:04:36 gerv%gerv.net Exp $
!
! double upper32(double /*frs1*/);
!
.inline upper32,8
std %o0,[%sp+0x48]
ldd [%sp+0x48],%f10
fdtox %f10,%f10
fitod %f10,%f0
.end
!
! double lower32(double /*frs1*/, double /* Zero */);
!
.inline lower32,8
std %o0,[%sp+0x48]
ldd [%sp+0x48],%f10
std %o2,[%sp+0x48]
ldd [%sp+0x48],%f12
fdtox %f10,%f10
fmovs %f12,%f10
fxtod %f10,%f0
.end
!
! double mod(double /*x*/, double /*1/m*/, double /*m*/);
!
.inline mod,12
std %o0,[%sp+0x48]
ldd [%sp+0x48],%f2
std %o2,[%sp+0x48]
ldd [%sp+0x48],%f4
std %o4,[%sp+0x48]
ldd [%sp+0x48],%f6
fmuld %f2,%f4,%f4
fdtox %f4,%f4
fxtod %f4,%f4
fmuld %f4,%f6,%f4
fsubd %f2,%f4,%f0
.end
!
! void i16_to_d16_and_d32x4(double * /*1/(2^16)*/, double * /* 2^16*/,
! double * /* 0 */,
! double * /*result16*/, double * /* result32 */
! float * /*source - should be unsigned int*
! converted to float* */);
!
.inline i16_to_d16_and_d32x4,24
ldd [%o0],%f2 ! 1/(2^16)
ldd [%o1],%f4 ! 2^16
ldd [%o2],%f22
fmovd %f22,%f6
ld [%o5],%f7
fmovd %f22,%f10
ld [%o5+4],%f11
fmovd %f22,%f14
ld [%o5+8],%f15
fmovd %f22,%f18
ld [%o5+12],%f19
fxtod %f6,%f6
std %f6,[%o4]
fxtod %f10,%f10
std %f10,[%o4+8]
fxtod %f14,%f14
std %f14,[%o4+16]
fxtod %f18,%f18
std %f18,[%o4+24]
fmuld %f2,%f6,%f8
fmuld %f2,%f10,%f12
fmuld %f2,%f14,%f16
fmuld %f2,%f18,%f20
fdtox %f8,%f8
fdtox %f12,%f12
fdtox %f16,%f16
fdtox %f20,%f20
fxtod %f8,%f8
std %f8,[%o3+8]
fxtod %f12,%f12
std %f12,[%o3+24]
fxtod %f16,%f16
std %f16,[%o3+40]
fxtod %f20,%f20
std %f20,[%o3+56]
fmuld %f8,%f4,%f8
fmuld %f12,%f4,%f12
fmuld %f16,%f4,%f16
fmuld %f20,%f4,%f20
fsubd %f6,%f8,%f8
std %f8,[%o3]
fsubd %f10,%f12,%f12
std %f12,[%o3+16]
fsubd %f14,%f16,%f16
std %f16,[%o3+32]
fsubd %f18,%f20,%f20
std %f20,[%o3+48]
.end

File diff suppressed because it is too large Load Diff

View File

@@ -1,126 +0,0 @@
!
! ***** BEGIN LICENSE BLOCK *****
! Version: MPL 1.1/GPL 2.0/LGPL 2.1
!
! The contents of this file are subject to the Mozilla Public License Version
! 1.1 (the "License"); you may not use this file except in compliance with
! the License. You may obtain a copy of the License at
! http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
! for the specific language governing rights and limitations under the
! License.
!
! The Original Code is inline macros for SPARC Montgomery multiply functions.
!
! The Initial Developer of the Original Code is
! Sun Microsystems Inc.
! Portions created by the Initial Developer are Copyright (C) 1999-2000
! the Initial Developer. All Rights Reserved.
!
! Contributor(s):
!
! Alternatively, the contents of this file may be used under the terms of
! either the GNU General Public License Version 2 or later (the "GPL"), or
! the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
! in which case the provisions of the GPL or the LGPL are applicable instead
! of those above. If you wish to allow use of your version of this file only
! under the terms of either the GPL or the LGPL, and not to allow others to
! use your version of this file under the terms of the MPL, indicate your
! decision by deleting the provisions above and replace them with the notice
! and other provisions required by the GPL or the LGPL. If you do not delete
! the provisions above, a recipient may use your version of this file under
! the terms of any one of the MPL, the GPL or the LGPL.
!
! ***** END LICENSE BLOCK *****
! $Id: montmulfv9.il,v 1.3 2004-04-27 23:04:36 gerv%gerv.net Exp $
!
! double upper32(double /*frs1*/);
!
.inline upper32,8
fdtox %f0,%f10
fitod %f10,%f0
.end
!
! double lower32(double /*frs1*/, double /* Zero */);
!
.inline lower32,8
fdtox %f0,%f10
fmovs %f2,%f10
fxtod %f10,%f0
.end
!
! double mod(double /*x*/, double /*1/m*/, double /*m*/);
!
.inline mod,12
fmuld %f0,%f2,%f2
fdtox %f2,%f2
fxtod %f2,%f2
fmuld %f2,%f4,%f2
fsubd %f0,%f2,%f0
.end
!
! void i16_to_d16_and_d32x4(double * /*1/(2^16)*/, double * /* 2^16*/,
! double * /* 0 */,
! double * /*result16*/, double * /* result32 */
! float * /*source - should be unsigned int*
! converted to float* */);
!
.inline i16_to_d16_and_d32x4,24
ldd [%o0],%f2 ! 1/(2^16)
ldd [%o1],%f4 ! 2^16
ldd [%o2],%f22
fmovd %f22,%f6
ld [%o5],%f7
fmovd %f22,%f10
ld [%o5+4],%f11
fmovd %f22,%f14
ld [%o5+8],%f15
fmovd %f22,%f18
ld [%o5+12],%f19
fxtod %f6,%f6
std %f6,[%o4]
fxtod %f10,%f10
std %f10,[%o4+8]
fxtod %f14,%f14
std %f14,[%o4+16]
fxtod %f18,%f18
std %f18,[%o4+24]
fmuld %f2,%f6,%f8
fmuld %f2,%f10,%f12
fmuld %f2,%f14,%f16
fmuld %f2,%f18,%f20
fdtox %f8,%f8
fdtox %f12,%f12
fdtox %f16,%f16
fdtox %f20,%f20
fxtod %f8,%f8
std %f8,[%o3+8]
fxtod %f12,%f12
std %f12,[%o3+24]
fxtod %f16,%f16
std %f16,[%o3+40]
fxtod %f20,%f20
std %f20,[%o3+56]
fmuld %f8,%f4,%f8
fmuld %f12,%f4,%f12
fmuld %f16,%f4,%f16
fmuld %f20,%f4,%f20
fsubd %f6,%f8,%f8
std %f8,[%o3]
fsubd %f10,%f12,%f12
std %f12,[%o3+16]
fsubd %f14,%f16,%f16
std %f16,[%o3+32]
fsubd %f18,%f20,%f20
std %f20,[%o3+48]
.end

File diff suppressed because it is too large Load Diff

View File

@@ -1,102 +0,0 @@
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Sheueling Chang Shantz <sheueling.chang@sun.com> and
* Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _MP_GF2M_PRIV_H_
#define _MP_GF2M_PRIV_H_
#include "mpi-priv.h"
extern const mp_digit mp_gf2m_sqr_tb[16];
#if defined(MP_USE_UINT_DIGIT)
#define MP_DIGIT_BITS 32
#else
#define MP_DIGIT_BITS 64
#endif
/* Platform-specific macros for fast binary polynomial squaring. */
#if MP_DIGIT_BITS == 32
#define gf2m_SQR1(w) \
mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 16 | \
mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF]
#define gf2m_SQR0(w) \
mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 8 & 0xF] << 16 | \
mp_gf2m_sqr_tb[(w) >> 4 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) & 0xF]
#else
#define gf2m_SQR1(w) \
mp_gf2m_sqr_tb[(w) >> 60 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 56 & 0xF] << 48 | \
mp_gf2m_sqr_tb[(w) >> 52 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 48 & 0xF] << 32 | \
mp_gf2m_sqr_tb[(w) >> 44 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 40 & 0xF] << 16 | \
mp_gf2m_sqr_tb[(w) >> 36 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) >> 32 & 0xF]
#define gf2m_SQR0(w) \
mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 48 | \
mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF] << 32 | \
mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 8 & 0xF] << 16 | \
mp_gf2m_sqr_tb[(w) >> 4 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) & 0xF]
#endif
/* Multiply two binary polynomials mp_digits a, b.
* Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1.
* Output in two mp_digits rh, rl.
*/
void s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b);
/* Compute xor-multiply of two binary polynomials (a1, a0) x (b1, b0)
* result is a binary polynomial in 4 mp_digits r[4].
* The caller MUST ensure that r has the right amount of space allocated.
*/
void s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1,
const mp_digit b0);
/* Compute xor-multiply of two binary polynomials (a2, a1, a0) x (b2, b1, b0)
* result is a binary polynomial in 6 mp_digits r[6].
* The caller MUST ensure that r has the right amount of space allocated.
*/
void s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0,
const mp_digit b2, const mp_digit b1, const mp_digit b0);
/* Compute xor-multiply of two binary polynomials (a3, a2, a1, a0) x (b3, b2, b1, b0)
* result is a binary polynomial in 8 mp_digits r[8].
* The caller MUST ensure that r has the right amount of space allocated.
*/
void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1,
const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1,
const mp_digit b0);
#endif /* _MP_GF2M_PRIV_H_ */

View File

@@ -1,600 +0,0 @@
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Sheueling Chang Shantz <sheueling.chang@sun.com> and
* Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "mp_gf2m.h"
#include "mp_gf2m-priv.h"
#include "mplogic.h"
#include "mpi-priv.h"
const mp_digit mp_gf2m_sqr_tb[16] =
{
0, 1, 4, 5, 16, 17, 20, 21,
64, 65, 68, 69, 80, 81, 84, 85
};
/* Multiply two binary polynomials mp_digits a, b.
* Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1.
* Output in two mp_digits rh, rl.
*/
#if MP_DIGIT_BITS == 32
void
s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
{
register mp_digit h, l, s;
mp_digit tab[8], top2b = a >> 30;
register mp_digit a1, a2, a4;
a1 = a & (0x3FFFFFFF); a2 = a1 << 1; a4 = a2 << 1;
tab[0] = 0; tab[1] = a1; tab[2] = a2; tab[3] = a1^a2;
tab[4] = a4; tab[5] = a1^a4; tab[6] = a2^a4; tab[7] = a1^a2^a4;
s = tab[b & 0x7]; l = s;
s = tab[b >> 3 & 0x7]; l ^= s << 3; h = s >> 29;
s = tab[b >> 6 & 0x7]; l ^= s << 6; h ^= s >> 26;
s = tab[b >> 9 & 0x7]; l ^= s << 9; h ^= s >> 23;
s = tab[b >> 12 & 0x7]; l ^= s << 12; h ^= s >> 20;
s = tab[b >> 15 & 0x7]; l ^= s << 15; h ^= s >> 17;
s = tab[b >> 18 & 0x7]; l ^= s << 18; h ^= s >> 14;
s = tab[b >> 21 & 0x7]; l ^= s << 21; h ^= s >> 11;
s = tab[b >> 24 & 0x7]; l ^= s << 24; h ^= s >> 8;
s = tab[b >> 27 & 0x7]; l ^= s << 27; h ^= s >> 5;
s = tab[b >> 30 ]; l ^= s << 30; h ^= s >> 2;
/* compensate for the top two bits of a */
if (top2b & 01) { l ^= b << 30; h ^= b >> 2; }
if (top2b & 02) { l ^= b << 31; h ^= b >> 1; }
*rh = h; *rl = l;
}
#else
void
s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
{
register mp_digit h, l, s;
mp_digit tab[16], top3b = a >> 61;
register mp_digit a1, a2, a4, a8;
a1 = a & (0x1FFFFFFFFFFFFFFF); a2 = a1 << 1;
a4 = a2 << 1; a8 = a4 << 1;
tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2;
tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4;
tab[ 8] = a8; tab[ 9] = a1^a8; tab[10] = a2^a8; tab[11] = a1^a2^a8;
tab[12] = a4^a8; tab[13] = a1^a4^a8; tab[14] = a2^a4^a8; tab[15] = a1^a2^a4^a8;
s = tab[b & 0xF]; l = s;
s = tab[b >> 4 & 0xF]; l ^= s << 4; h = s >> 60;
s = tab[b >> 8 & 0xF]; l ^= s << 8; h ^= s >> 56;
s = tab[b >> 12 & 0xF]; l ^= s << 12; h ^= s >> 52;
s = tab[b >> 16 & 0xF]; l ^= s << 16; h ^= s >> 48;
s = tab[b >> 20 & 0xF]; l ^= s << 20; h ^= s >> 44;
s = tab[b >> 24 & 0xF]; l ^= s << 24; h ^= s >> 40;
s = tab[b >> 28 & 0xF]; l ^= s << 28; h ^= s >> 36;
s = tab[b >> 32 & 0xF]; l ^= s << 32; h ^= s >> 32;
s = tab[b >> 36 & 0xF]; l ^= s << 36; h ^= s >> 28;
s = tab[b >> 40 & 0xF]; l ^= s << 40; h ^= s >> 24;
s = tab[b >> 44 & 0xF]; l ^= s << 44; h ^= s >> 20;
s = tab[b >> 48 & 0xF]; l ^= s << 48; h ^= s >> 16;
s = tab[b >> 52 & 0xF]; l ^= s << 52; h ^= s >> 12;
s = tab[b >> 56 & 0xF]; l ^= s << 56; h ^= s >> 8;
s = tab[b >> 60 ]; l ^= s << 60; h ^= s >> 4;
/* compensate for the top three bits of a */
if (top3b & 01) { l ^= b << 61; h ^= b >> 3; }
if (top3b & 02) { l ^= b << 62; h ^= b >> 2; }
if (top3b & 04) { l ^= b << 63; h ^= b >> 1; }
*rh = h; *rl = l;
}
#endif
/* Compute xor-multiply of two binary polynomials (a1, a0) x (b1, b0)
* result is a binary polynomial in 4 mp_digits r[4].
* The caller MUST ensure that r has the right amount of space allocated.
*/
void
s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1,
const mp_digit b0)
{
mp_digit m1, m0;
/* r[3] = h1, r[2] = h0; r[1] = l1; r[0] = l0 */
s_bmul_1x1(r+3, r+2, a1, b1);
s_bmul_1x1(r+1, r, a0, b0);
s_bmul_1x1(&m1, &m0, a0 ^ a1, b0 ^ b1);
/* Correction on m1 ^= l1 ^ h1; m0 ^= l0 ^ h0; */
r[2] ^= m1 ^ r[1] ^ r[3]; /* h0 ^= m1 ^ l1 ^ h1; */
r[1] = r[3] ^ r[2] ^ r[0] ^ m1 ^ m0; /* l1 ^= l0 ^ h0 ^ m0; */
}
/* Compute xor-multiply of two binary polynomials (a2, a1, a0) x (b2, b1, b0)
* result is a binary polynomial in 6 mp_digits r[6].
* The caller MUST ensure that r has the right amount of space allocated.
*/
void
s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0,
const mp_digit b2, const mp_digit b1, const mp_digit b0)
{
mp_digit zm[4];
s_bmul_1x1(r+5, r+4, a2, b2); /* fill top 2 words */
s_bmul_2x2(zm, a1, a2^a0, b1, b2^b0); /* fill middle 4 words */
s_bmul_2x2(r, a1, a0, b1, b0); /* fill bottom 4 words */
zm[3] ^= r[3];
zm[2] ^= r[2];
zm[1] ^= r[1] ^ r[5];
zm[0] ^= r[0] ^ r[4];
r[5] ^= zm[3];
r[4] ^= zm[2];
r[3] ^= zm[1];
r[2] ^= zm[0];
}
/* Compute xor-multiply of two binary polynomials (a3, a2, a1, a0) x (b3, b2, b1, b0)
* result is a binary polynomial in 8 mp_digits r[8].
* The caller MUST ensure that r has the right amount of space allocated.
*/
void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1,
const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1,
const mp_digit b0)
{
mp_digit zm[4];
s_bmul_2x2(r+4, a3, a2, b3, b2); /* fill top 4 words */
s_bmul_2x2(zm, a3^a1, a2^a0, b3^b1, b2^b0); /* fill middle 4 words */
s_bmul_2x2(r, a1, a0, b1, b0); /* fill bottom 4 words */
zm[3] ^= r[3] ^ r[7];
zm[2] ^= r[2] ^ r[6];
zm[1] ^= r[1] ^ r[5];
zm[0] ^= r[0] ^ r[4];
r[5] ^= zm[3];
r[4] ^= zm[2];
r[3] ^= zm[1];
r[2] ^= zm[0];
}
/* Compute addition of two binary polynomials a and b,
* store result in c; c could be a or b, a and b could be equal;
* c is the bitwise XOR of a and b.
*/
mp_err
mp_badd(const mp_int *a, const mp_int *b, mp_int *c)
{
mp_digit *pa, *pb, *pc;
mp_size ix;
mp_size used_pa, used_pb;
mp_err res = MP_OKAY;
/* Add all digits up to the precision of b. If b had more
* precision than a initially, swap a, b first
*/
if (MP_USED(a) >= MP_USED(b)) {
pa = MP_DIGITS(a);
pb = MP_DIGITS(b);
used_pa = MP_USED(a);
used_pb = MP_USED(b);
} else {
pa = MP_DIGITS(b);
pb = MP_DIGITS(a);
used_pa = MP_USED(b);
used_pb = MP_USED(a);
}
/* Make sure c has enough precision for the output value */
MP_CHECKOK( s_mp_pad(c, used_pa) );
/* Do word-by-word xor */
pc = MP_DIGITS(c);
for (ix = 0; ix < used_pb; ix++) {
(*pc++) = (*pa++) ^ (*pb++);
}
/* Finish the rest of digits until we're actually done */
for (; ix < used_pa; ++ix) {
*pc++ = *pa++;
}
MP_USED(c) = used_pa;
MP_SIGN(c) = ZPOS;
s_mp_clamp(c);
CLEANUP:
return res;
}
#define s_mp_div2(a) MP_CHECKOK( mpl_rsh((a), (a), 1) );
/* Compute binary polynomial multiply d = a * b */
static void
s_bmul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
{
mp_digit a_i, a0b0, a1b1, carry = 0;
while (a_len--) {
a_i = *a++;
s_bmul_1x1(&a1b1, &a0b0, a_i, b);
*d++ = a0b0 ^ carry;
carry = a1b1;
}
*d = carry;
}
/* Compute binary polynomial xor multiply accumulate d ^= a * b */
static void
s_bmul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
{
mp_digit a_i, a0b0, a1b1, carry = 0;
while (a_len--) {
a_i = *a++;
s_bmul_1x1(&a1b1, &a0b0, a_i, b);
*d++ ^= a0b0 ^ carry;
carry = a1b1;
}
*d ^= carry;
}
/* Compute binary polynomial xor multiply c = a * b.
* All parameters may be identical.
*/
mp_err
mp_bmul(const mp_int *a, const mp_int *b, mp_int *c)
{
mp_digit *pb, b_i;
mp_int tmp;
mp_size ib, a_used, b_used;
mp_err res = MP_OKAY;
MP_DIGITS(&tmp) = 0;
ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
if (a == c) {
MP_CHECKOK( mp_init_copy(&tmp, a) );
if (a == b)
b = &tmp;
a = &tmp;
} else if (b == c) {
MP_CHECKOK( mp_init_copy(&tmp, b) );
b = &tmp;
}
if (MP_USED(a) < MP_USED(b)) {
const mp_int *xch = b; /* switch a and b if b longer */
b = a;
a = xch;
}
MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
MP_CHECKOK( s_mp_pad(c, USED(a) + USED(b)) );
pb = MP_DIGITS(b);
s_bmul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c));
/* Outer loop: Digits of b */
a_used = MP_USED(a);
b_used = MP_USED(b);
MP_USED(c) = a_used + b_used;
for (ib = 1; ib < b_used; ib++) {
b_i = *pb++;
/* Inner product: Digits of a */
if (b_i)
s_bmul_d_add(MP_DIGITS(a), a_used, b_i, MP_DIGITS(c) + ib);
else
MP_DIGIT(c, ib + a_used) = b_i;
}
s_mp_clamp(c);
SIGN(c) = ZPOS;
CLEANUP:
mp_clear(&tmp);
return res;
}
/* Compute modular reduction of a and store result in r.
* r could be a.
* For modular arithmetic, the irreducible polynomial f(t) is represented
* as an array of int[], where f(t) is of the form:
* f(t) = t^p[0] + t^p[1] + ... + t^p[k]
* where m = p[0] > p[1] > ... > p[k] = 0.
*/
mp_err
mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r)
{
int j, k;
int n, dN, d0, d1;
mp_digit zz, *z, tmp;
mp_size used;
mp_err res = MP_OKAY;
/* The algorithm does the reduction in place in r,
* if a != r, copy a into r first so reduction can be done in r
*/
if (a != r) {
MP_CHECKOK( mp_copy(a, r) );
}
z = MP_DIGITS(r);
/* start reduction */
dN = p[0] / MP_DIGIT_BITS;
used = MP_USED(r);
for (j = used - 1; j > dN;) {
zz = z[j];
if (zz == 0) {
j--; continue;
}
z[j] = 0;
for (k = 1; p[k] > 0; k++) {
/* reducing component t^p[k] */
n = p[0] - p[k];
d0 = n % MP_DIGIT_BITS;
d1 = MP_DIGIT_BITS - d0;
n /= MP_DIGIT_BITS;
z[j-n] ^= (zz>>d0);
if (d0)
z[j-n-1] ^= (zz<<d1);
}
/* reducing component t^0 */
n = dN;
d0 = p[0] % MP_DIGIT_BITS;
d1 = MP_DIGIT_BITS - d0;
z[j-n] ^= (zz >> d0);
if (d0)
z[j-n-1] ^= (zz << d1);
}
/* final round of reduction */
while (j == dN) {
d0 = p[0] % MP_DIGIT_BITS;
zz = z[dN] >> d0;
if (zz == 0) break;
d1 = MP_DIGIT_BITS - d0;
/* clear up the top d1 bits */
if (d0) z[dN] = (z[dN] << d1) >> d1;
*z ^= zz; /* reduction t^0 component */
for (k = 1; p[k] > 0; k++) {
/* reducing component t^p[k]*/
n = p[k] / MP_DIGIT_BITS;
d0 = p[k] % MP_DIGIT_BITS;
d1 = MP_DIGIT_BITS - d0;
z[n] ^= (zz << d0);
tmp = zz >> d1;
if (d0 && tmp)
z[n+1] ^= tmp;
}
}
s_mp_clamp(r);
CLEANUP:
return res;
}
/* Compute the product of two polynomials a and b, reduce modulo p,
* Store the result in r. r could be a or b; a could be b.
*/
mp_err
mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], mp_int *r)
{
mp_err res;
if (a == b) return mp_bsqrmod(a, p, r);
if ((res = mp_bmul(a, b, r) ) != MP_OKAY)
return res;
return mp_bmod(r, p, r);
}
/* Compute binary polynomial squaring c = a*a mod p .
* Parameter r and a can be identical.
*/
mp_err
mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r)
{
mp_digit *pa, *pr, a_i;
mp_int tmp;
mp_size ia, a_used;
mp_err res;
ARGCHK(a != NULL && r != NULL, MP_BADARG);
MP_DIGITS(&tmp) = 0;
if (a == r) {
MP_CHECKOK( mp_init_copy(&tmp, a) );
a = &tmp;
}
MP_USED(r) = 1; MP_DIGIT(r, 0) = 0;
MP_CHECKOK( s_mp_pad(r, 2*USED(a)) );
pa = MP_DIGITS(a);
pr = MP_DIGITS(r);
a_used = MP_USED(a);
MP_USED(r) = 2 * a_used;
for (ia = 0; ia < a_used; ia++) {
a_i = *pa++;
*pr++ = gf2m_SQR0(a_i);
*pr++ = gf2m_SQR1(a_i);
}
MP_CHECKOK( mp_bmod(r, p, r) );
s_mp_clamp(r);
SIGN(r) = ZPOS;
CLEANUP:
mp_clear(&tmp);
return res;
}
/* Compute binary polynomial y/x mod p, y divided by x, reduce modulo p.
* Store the result in r. r could be x or y, and x could equal y.
* Uses algorithm Modular_Division_GF(2^m) from
* Chang-Shantz, S. "From Euclid's GCD to Montgomery Multiplication to
* the Great Divide".
*/
int
mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
const unsigned int p[], mp_int *r)
{
mp_int aa, bb, uu;
mp_int *a, *b, *u, *v;
mp_err res = MP_OKAY;
MP_DIGITS(&aa) = 0;
MP_DIGITS(&bb) = 0;
MP_DIGITS(&uu) = 0;
MP_CHECKOK( mp_init_copy(&aa, x) );
MP_CHECKOK( mp_init_copy(&uu, y) );
MP_CHECKOK( mp_init_copy(&bb, pp) );
MP_CHECKOK( s_mp_pad(r, USED(pp)) );
MP_USED(r) = 1; MP_DIGIT(r, 0) = 0;
a = &aa; b= &bb; u=&uu; v=r;
/* reduce x and y mod p */
MP_CHECKOK( mp_bmod(a, p, a) );
MP_CHECKOK( mp_bmod(u, p, u) );
while (!mp_isodd(a)) {
s_mp_div2(a);
if (mp_isodd(u)) {
MP_CHECKOK( mp_badd(u, pp, u) );
}
s_mp_div2(u);
}
do {
if (mp_cmp_mag(b, a) > 0) {
MP_CHECKOK( mp_badd(b, a, b) );
MP_CHECKOK( mp_badd(v, u, v) );
do {
s_mp_div2(b);
if (mp_isodd(v)) {
MP_CHECKOK( mp_badd(v, pp, v) );
}
s_mp_div2(v);
} while (!mp_isodd(b));
}
else if ((MP_DIGIT(a,0) == 1) && (MP_USED(a) == 1))
break;
else {
MP_CHECKOK( mp_badd(a, b, a) );
MP_CHECKOK( mp_badd(u, v, u) );
do {
s_mp_div2(a);
if (mp_isodd(u)) {
MP_CHECKOK( mp_badd(u, pp, u) );
}
s_mp_div2(u);
} while (!mp_isodd(a));
}
} while (1);
MP_CHECKOK( mp_copy(u, r) );
CLEANUP:
return res;
}
/* Convert the bit-string representation of a polynomial a into an array
* of integers corresponding to the bits with non-zero coefficient.
* Up to max elements of the array will be filled. Return value is total
* number of coefficients that would be extracted if array was large enough.
*/
int
mp_bpoly2arr(const mp_int *a, unsigned int p[], int max)
{
int i, j, k;
mp_digit top_bit, mask;
top_bit = 1;
top_bit <<= MP_DIGIT_BIT - 1;
for (k = 0; k < max; k++) p[k] = 0;
k = 0;
for (i = MP_USED(a) - 1; i >= 0; i--) {
mask = top_bit;
for (j = MP_DIGIT_BIT - 1; j >= 0; j--) {
if (MP_DIGITS(a)[i] & mask) {
if (k < max) p[k] = MP_DIGIT_BIT * i + j;
k++;
}
mask >>= 1;
}
}
return k;
}
/* Convert the coefficient array representation of a polynomial to a
* bit-string. The array must be terminated by 0.
*/
mp_err
mp_barr2poly(const unsigned int p[], mp_int *a)
{
mp_err res = MP_OKAY;
int i;
mp_zero(a);
for (i = 0; p[i] > 0; i++) {
MP_CHECKOK( mpl_set_bit(a, p[i], 1) );
}
MP_CHECKOK( mpl_set_bit(a, 0, 1) );
CLEANUP:
return res;
}

View File

@@ -1,63 +0,0 @@
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Sheueling Chang Shantz <sheueling.chang@sun.com> and
* Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _MP_GF2M_H_
#define _MP_GF2M_H_
#include "mpi.h"
mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c);
mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c);
/* For modular arithmetic, the irreducible polynomial f(t) is represented
* as an array of int[], where f(t) is of the form:
* f(t) = t^p[0] + t^p[1] + ... + t^p[k]
* where m = p[0] > p[1] > ... > p[k] = 0.
*/
mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r);
mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[],
mp_int *r);
mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r);
mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
const unsigned int p[], mp_int *r);
int mp_bpoly2arr(const mp_int *a, unsigned int p[], int max);
mp_err mp_barr2poly(const unsigned int p[], mp_int *a);
#endif /* _MP_GF2M_H_ */

View File

@@ -1,760 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Red Hat, Inc
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Robert Relyea <rrelyea@redhat.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "mpi.h"
/*
* This file implements a single function: mpi_getProcessorLineSize();
* mpi_getProcessorLineSize() returns the size in bytes of the cache line
* if a cache exists, or zero if there is no cache. If more than one
* cache line exists, it should return the smallest line size (which is
* usually the L1 cache).
*
* mp_modexp uses this information to make sure that private key information
* isn't being leaked through the cache.
*
* Currently the file returns good data for most modern x86 processors, and
* reasonable data on 64-bit ppc processors. All other processors are assumed
* to have a cache line size of 32 bytes unless modified by target.mk.
*
*/
#if defined(i386) || defined(__i386) || defined(__X86__) || defined (_M_IX86)
/* X86 processors have special instructions that tell us about the cache */
#include "string.h"
/* Generic CPUID function */
#ifndef _WIN32
static void cpuid(unsigned long op, unsigned long *eax,
unsigned long *ebx, unsigned long *ecx,
unsigned long *edx)
{
/* sigh GCC isn't smart enough to save the ebx PIC register on it's own
* in this case, so do it by hand. */
__asm__("pushl %%ebx\n\t"
"cpuid\n\t"
"mov %%ebx,%1\n\t"
"popl %%ebx\n\t"
: "=a" (*eax),
"=r" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "0" (op));
}
/*
* try flipping a processor flag to determine CPU type
*/
static unsigned long changeFlag(unsigned long flag)
{
unsigned long changedFlags, originalFlags;
__asm__("pushfl\n\t" /* get the flags */
"popl %0\n\t"
"movl %0,%1\n\t" /* save the original flags */
"xor %0,%2\n\t" /* flip the but */
"pushl %0\n\t" /* set the flags */
"popfl\n\t"
"pushfl\n\t" /* get the flags again (for return) */
"popl %0\n\t"
"pushl %1\n\t" /* restore the original flags */
"popfl\n\t"
: "=r" (changedFlags),
"=r" (originalFlags)
: "r" (flag));
return changedFlags ^ originalFlags;
}
#else
/*
* windows versions of the above assembler
*/
#define wcpuid __asm __emit 0fh __asm __emit 0a2h
static void cpuid(unsigned long op, unsigned long *Reax, unsigned long *Rebx,
unsigned long *Recx, unsigned long *Redx)
{
unsigned long Leax, Lebx, Lecx, Ledx;
__asm {
pushad
mov eax,op
wcpuid
mov Leax,eax
mov Lebx,ebx
mov Lecx,ecx
mov Ledx,edx
popad
}
*Reax = Leax;
*Rebx = Lebx;
*Recx = Lecx;
*Redx = Ledx;
}
static unsigned long changeFlag(unsigned long flag)
{
unsigned long changedFlags, originalFlags;
__asm {
pushad
pushfd /* get the flags */
pop eax
mov ecx,eax /* save the original flags */
mov originalFlags,ecx /* save the original flags */
mov ebx,flag
xor eax,ebx /* flip the but */
push eax /* set the flags */
popfd
pushfd /* get the flags again (for return) */
pop eax
push ecx /* restore the original flags */
popfd
mov changedFlags,eax
popad
}
return changedFlags ^ originalFlags;
}
#endif
#define AC_FLAG 0x40000
#define ID_FLAG 0x200000
/* 386 processors can't flip the AC_FLAG, intel AP Note AP-485 */
static int is386()
{
return changeFlag(AC_FLAG) == 0;
}
/* 486 processors can't flip the ID_FLAG, intel AP Note AP-485 */
static int is486()
{
return changeFlag(ID_FLAG) == 0;
}
/*
* table for Intel Cache.
* See Intel Application Note AP-485 for more information
*/
typedef enum {
Cache_NONE = 0,
Cache_UNKNOWN = 1,
Cache_TLB = 2,
Cache_Trace = 3,
Cache_L1 = 4,
Cache_L2 = 5 ,
Cache_L3 = 6
} CacheType;
#define DATA_INSTR 1
#define DATA_DATA 2
#define DATA_BOTH 3
#define DATA_TRACE 4
#define DATA_NONE 0
#define TLB_4k 0x01
#define TLB_2M 0x08
#define TLB_4M 0x10
#define TLB_4Mk 0x11
#define TLB_ALL 0x19
#define k * 1024
#define M * (1024*1024)
#define G * (1024*1024*1024)
struct _cache {
CacheType type;
unsigned long data;
#define pageSize size
#define trcuops size
unsigned long size;
unsigned long association;
#define tlbEntries lineSize
unsigned long lineSize;
} CacheMap[] = {
/* 00 */ {Cache_NONE, DATA_NONE, 0, 0, 0 },
/* 01 */ {Cache_TLB, DATA_INSTR, TLB_4k, 4, 32 },
/* 02 */ {Cache_TLB, DATA_INSTR, TLB_4M, 0, 2 },
/* 03 */ {Cache_TLB, DATA_DATA, TLB_4k, 4, 64 },
/* 04 */ {Cache_TLB, DATA_DATA, TLB_4M, 4, 8 },
/* 05 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 06 */ {Cache_L1, DATA_INSTR, 8 k, 4, 32 },
/* 07 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 08 */ {Cache_L1, DATA_INSTR, 16 k, 4, 32 },
/* 09 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 0a */ {Cache_L1, DATA_DATA, 8 k, 4, 32 },
/* 0b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 0c */ {Cache_L1, DATA_DATA, 16 k, 4, 32 },
/* 0d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 0e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 0f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 10 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 11 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 12 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 13 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 14 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 15 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 16 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 17 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 18 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 19 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 1a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 1b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 1c */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 1d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 1e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 1f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 20 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 21 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 22 */ {Cache_L3, DATA_BOTH, 512 k, 8, 64 },
/* 23 */ {Cache_L3, DATA_BOTH, 1 M, 8, 64 },
/* 24 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 25 */ {Cache_L3, DATA_BOTH, 2 M, 8, 64 },
/* 26 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 27 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 28 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 29 */ {Cache_L3, DATA_BOTH, 4 M, 8, 64 },
/* 2a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 2b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 2c */ {Cache_L1, DATA_DATA, 32 k, 8, 64 },
/* 2d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 2e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 2f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 30 */ {Cache_L1, DATA_INSTR, 32 k, 8, 64 },
/* 31 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 32 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 33 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 34 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 35 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 36 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 37 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 38 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 39 */ {Cache_L2, DATA_BOTH, 128 k, 4, 64 },
/* 3a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 3b */ {Cache_L2, DATA_BOTH, 128 k, 2, 64 },
/* 3c */ {Cache_L2, DATA_BOTH, 256 k, 4, 64 },
/* 3d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 3e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 3f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 40 */ {Cache_L2, DATA_NONE, 0, 0, 0 },
/* 41 */ {Cache_L2, DATA_BOTH, 128 k, 4, 32 },
/* 42 */ {Cache_L2, DATA_BOTH, 256 k, 4, 32 },
/* 43 */ {Cache_L2, DATA_BOTH, 512 k, 4, 32 },
/* 44 */ {Cache_L2, DATA_BOTH, 1 M, 4, 32 },
/* 45 */ {Cache_L2, DATA_BOTH, 2 M, 4, 32 },
/* 46 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 47 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 48 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 49 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 4a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 4b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 4c */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 4d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 4e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 4f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 50 */ {Cache_TLB, DATA_INSTR, TLB_ALL, 0, 64 },
/* 51 */ {Cache_TLB, DATA_INSTR, TLB_ALL, 0, 128 },
/* 52 */ {Cache_TLB, DATA_INSTR, TLB_ALL, 0, 256 },
/* 53 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 54 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 55 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 56 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 57 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 58 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 59 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 5a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 5b */ {Cache_TLB, DATA_DATA, TLB_4Mk, 0, 64 },
/* 5c */ {Cache_TLB, DATA_DATA, TLB_4Mk, 0, 128 },
/* 5d */ {Cache_TLB, DATA_DATA, TLB_4Mk, 0, 256 },
/* 5e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 5f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 60 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 61 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 62 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 63 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 64 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 65 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 66 */ {Cache_L1, DATA_DATA, 8 k, 4, 64 },
/* 67 */ {Cache_L1, DATA_DATA, 16 k, 4, 64 },
/* 68 */ {Cache_L1, DATA_DATA, 32 k, 4, 64 },
/* 69 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 6a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 6b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 6c */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 6d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 6e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 6f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 70 */ {Cache_Trace, DATA_TRACE, 12 k, 8, 1 },
/* 71 */ {Cache_Trace, DATA_TRACE, 16 k, 8, 1 },
/* 72 */ {Cache_Trace, DATA_TRACE, 32 k, 8, 1 },
/* 73 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 74 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 75 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 76 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 77 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 78 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 79 */ {Cache_L2, DATA_BOTH, 128 k, 8, 64 },
/* 7a */ {Cache_L2, DATA_BOTH, 256 k, 8, 64 },
/* 7b */ {Cache_L2, DATA_BOTH, 512 k, 8, 64 },
/* 7c */ {Cache_L2, DATA_BOTH, 1 M, 8, 64 },
/* 7d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 7e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 7f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 80 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 81 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 82 */ {Cache_L2, DATA_BOTH, 256 k, 8, 32 },
/* 83 */ {Cache_L2, DATA_BOTH, 512 k, 8, 32 },
/* 84 */ {Cache_L2, DATA_BOTH, 1 M, 8, 32 },
/* 85 */ {Cache_L2, DATA_BOTH, 2 M, 8, 32 },
/* 86 */ {Cache_L2, DATA_BOTH, 512 k, 4, 64 },
/* 87 */ {Cache_L2, DATA_BOTH, 1 M, 8, 64 },
/* 88 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 89 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 8a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 8b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 8c */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 8d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 8e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 8f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 90 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 91 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 92 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 93 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 94 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 95 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 96 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 97 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 98 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 99 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 9a */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 9b */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 9c */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 9d */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 9e */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* 9f */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a0 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a1 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a2 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a3 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a4 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a5 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a6 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a7 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a8 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* a9 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* aa */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ab */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ac */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ad */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ae */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* af */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b0 */ {Cache_TLB, DATA_INSTR, TLB_4k, 4, 128 },
/* b1 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b2 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b3 */ {Cache_TLB, DATA_DATA, TLB_4k, 4, 128 },
/* b4 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b5 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b6 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b7 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b8 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* b9 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ba */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* bb */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* bc */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* bd */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* be */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* bf */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c0 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c1 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c2 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c3 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c4 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c5 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c6 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c7 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c8 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* c9 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ca */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* cb */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* cc */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* cd */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ce */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* cf */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d0 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d1 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d2 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d3 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d4 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d5 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d6 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d7 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d8 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* d9 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* da */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* db */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* dc */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* dd */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* de */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* df */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e0 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e1 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e2 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e3 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e4 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e5 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e6 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e7 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e8 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* e9 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ea */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* eb */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ec */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ed */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ee */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ef */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f0 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f1 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f2 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f3 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f4 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f5 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f6 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f7 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f8 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* f9 */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* fa */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* fb */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* fc */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* fd */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* fe */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 },
/* ff */ {Cache_UNKNOWN, DATA_NONE, 0, 0, 0 }
};
/*
* use the above table to determine the CacheEntryLineSize.
*/
static void
getIntelCacheEntryLineSize(unsigned long val, int *level,
unsigned long *lineSize)
{
CacheType type;
type = CacheMap[val].type;
/* only interested in data caches */
/* NOTE val = 0x40 is a special value that means no L2 or L3 cache.
* this data check has the side effect of rejecting that entry. If
* that wasn't the case, we could have to reject it explicitly */
if ((CacheMap[val].data & DATA_DATA) != DATA_DATA) {
return;
}
/* look at the caches, skip types we aren't interested in.
* if we already have a value for a lower level cache, skip the
* current entry */
if (type == Cache_L1) {
*level = 1;
*lineSize = CacheMap[val].lineSize;
} else if ((*level >= 2) && type == Cache_L2) {
*level = 2;
*lineSize = CacheMap[val].lineSize;
} else if ((*level >= 3) && type == Cache_L3) {
*level = 3;
*lineSize = CacheMap[val].lineSize;
}
return;
}
static void
getIntelRegisterCacheLineSize(unsigned long val,
int *level, unsigned long *lineSize)
{
getIntelCacheEntryLineSize(val >> 24 & 0xff, level, lineSize);
getIntelCacheEntryLineSize(val >> 16 & 0xff, level, lineSize);
getIntelCacheEntryLineSize(val >> 8 & 0xff, level, lineSize);
getIntelCacheEntryLineSize(val & 0xff, level, lineSize);
}
/*
* returns '0' if no recognized cache is found, or if the cache
* information is supported by this processor
*/
static unsigned long
getIntelCacheLineSize(int cpuidLevel)
{
int level = 4;
unsigned long lineSize = 0;
unsigned long eax, ebx, ecx, edx;
int repeat, count;
if (cpuidLevel < 2) {
return 0;
}
/* command '2' of the cpuid is intel's cache info call. Each byte of the
* 4 registers contain a potential descriptor for the cache. The CacheMap
* table maps the cache entry with the processor cache. Register 'al'
* contains a count value that cpuid '2' needs to be called in order to
* find all the cache descriptors. Only registers with the high bit set
* to 'zero' have valid descriptors. This code loops through all the
* required calls to cpuid '2' and passes any valid descriptors it finds
* to the getIntelRegisterCacheLineSize code, which breaks the registers
* down into their component descriptors. In the end the lineSize of the
* lowest level cache data cache is returned. */
cpuid(2, &eax, &ebx, &ecx, &edx);
repeat = eax & 0xf;
for (count = 0; count < repeat; count++) {
if ((eax & 0x80000000) == 0) {
getIntelRegisterCacheLineSize(eax & 0xffffff00, &level, &lineSize);
}
if ((ebx & 0x80000000) == 0) {
getIntelRegisterCacheLineSize(ebx, &level, &lineSize);
}
if ((ecx & 0x80000000) == 0) {
getIntelRegisterCacheLineSize(ecx, &level, &lineSize);
}
if ((edx & 0x80000000) == 0) {
getIntelRegisterCacheLineSize(edx, &level, &lineSize);
}
if (count+1 != repeat) {
cpuid(2, &eax, &ebx, &ecx, &edx);
}
}
return lineSize;
}
/*
* returns '0' if the cache info is not supported by this processor.
* This is based on the AMD extended cache commands for cpuid.
* (see "AMD Processor Recognition Application Note" Publication 20734).
* Some other processors use the identical scheme.
* (see "Processor Recognition, Transmeta Corporation").
*/
static unsigned long
getOtherCacheLineSize(unsigned long cpuidLevel)
{
unsigned long lineSize = 0;
unsigned long eax, ebx, ecx, edx;
/* get the Extended CPUID level */
cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
cpuidLevel = eax;
if (cpuidLevel >= 0x80000005) {
cpuid(0x80000005, &eax, &ebx, &ecx, &edx);
lineSize = ecx & 0xff; /* line Size, L1 Data Cache */
}
return lineSize;
}
char *manMap[] = {
#define INTEL 0
"GenuineIntel",
#define AMD 1
"AuthenticAMD",
#define CYRIX 2
"CyrixInstead",
#define CENTAUR 2
"CentaurHauls",
#define NEXGEN 3
"NexGenDriven",
#define TRANSMETA 4
"GenuineTMx86",
#define RISE 5
"RiseRiseRise",
#define UMC 6
"UMC UMC UMC ",
#define SIS 7
"Sis Sis Sis ",
#define NATIONAL 8
"Geode by NSC",
};
int n_manufacturers = sizeof(manMap)/sizeof(manMap[0]);
#define MAN_UNKNOWN 9
unsigned long
mpi_getProcessorLineSize()
{
unsigned long eax, ebx, ecx, edx;
unsigned long cpuidLevel;
unsigned long cacheLineSize = 0;
int manufacturer = MAN_UNKNOWN;
int i;
char string[65];
if (is386()) {
return 0; /* 386 had no cache */
} if (is486()) {
return 32; /* really? need more info */
}
/* Pentium, cpuid command is available */
cpuid(0, &eax, &ebx, &ecx, &edx);
cpuidLevel = eax;
*(int *)string = ebx;
*(int *)&string[4] = edx;
*(int *)&string[8] = ecx;
string[12] = 0;
manufacturer = MAN_UNKNOWN;
for (i=0; i < n_manufacturers; i++) {
if ( strcmp(manMap[i],string) == 0) {
manufacturer = i;
}
}
if (manufacturer == INTEL) {
cacheLineSize = getIntelCacheLineSize(cpuidLevel);
} else {
cacheLineSize = getOtherCacheLineSize(cpuidLevel);
}
/* doesn't support cache info based on cpuid. This means
* an old pentium class processor, which have cache lines of
* 32. If we learn differently, we can use a switch based on
* the Manufacturer id */
if (cacheLineSize == 0) {
cacheLineSize = 32;
}
return cacheLineSize;
}
#define MPI_GET_PROCESSER_LINE_SIZE_DEFINED 1
#endif
#if defined(__ppc64__)
/*
* Sigh, The PPC has some really nice features to help us determine cache
* size, since it had lots of direct control functions to do so. The POWER
* processor even has an instruction to do this, but it was dropped in
* PowerPC. Unfortunately most of them are not available in user mode.
*
* The dcbz function would be a great way to determine cache line size except
* 1) it only works on write-back memory (it throws an exception otherwise),
* and 2) because so many mac programs 'knew' the processor cache size was
* 32 bytes, they used this instruction as a fast 'zero 32 bytes'. Now the new
* G5 processor has 128 byte cache, but dcbz only clears 32 bytes to keep
* these programs happy. dcbzl work if 64 bit instructions are supported.
* If you know 64 bit instructions are supported, and that stack is
* write-back, you can use this code.
*/
#include "memory.h"
/* clear the cache line that contains 'array' */
static inline void dcbzl(char *array)
{
register char *a asm("r2") = array;
__asm__ __volatile__( "dcbzl %0,r0" : "=r" (a): "0"(a) );
}
#define PPC_DO_ALIGN(x,y) ((char *)\
((((long long) (x))+((y)-1))&~((y)-1)))
#define PPC_MAX_LINE_SIZE 256
unsigned long
mpi_getProcessorLineSize()
{
char testArray[2*PPC_MAX_LINE_SIZE+1];
char *test;
int i;
/* align the array on a maximum line size boundary, so we
* know we are starting to clear from the first address */
test = PPC_DO_ALIGN(testArray, PPC_MAX_LINE_SIZE);
/* set all the values to 1's */
memset(test, 0xff, PPC_MAX_LINE_SIZE);
/* clear one cache block starting at 'test' */
dcbzl(test);
/* find the size of the cleared area, that's our block size */
for (i=PPC_MAX_LINE_SIZE; i != 0; i = i/2) {
if (test[i-1] == 0) {
return i;
}
}
return 0;
}
#define MPI_GET_PROCESSER_LINE_SIZE_DEFINED 1
#endif
/*
* put other processor and platform specific cache code here
* return the smallest cache line size in bytes on the processor
* (usually the L1 cache). If the OS has a call, this would be
* a greate place to put it.
*
* If there is no cache, return 0;
*
* define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED so the generic functions
* below aren't compiled.
*
*/
/* target.mk can define LINE_SIZE if it's common for the family or OS */
#if defined(LINE_SIZE) && !defined(MPI_GET_PROCESSOR_LINE_SIZE_DEFINED)
unsigned long
mpi_getProcessorLineSize()
{
return LINE_SIZE;
}
#define MPI_GET_PROCESSER_LINE_SIZE_DEFINED 1
#endif
/* If no way to get the processor cache line size has been defined, assume
* it's 32 bytes (most common value, does not significantly impact performance
*/
#ifndef MPI_GET_PROCESSER_LINE_SIZE_DEFINED
unsigned long
mpi_getProcessorLineSize()
{
return 32;
}
#endif
#ifdef TEST_IT
#include <stdio.h>
main()
{
printf("line size = %d\n", mpi_getProcessorLineSize());
}
#endif

View File

@@ -1,112 +0,0 @@
/* Default configuration for MPI library
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1997
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape Communications Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mpi-config.h,v 1.5 2004-04-25 15:03:10 gerv%gerv.net Exp $ */
#ifndef MPI_CONFIG_H_
#define MPI_CONFIG_H_
/*
For boolean options,
0 = no
1 = yes
Other options are documented individually.
*/
#ifndef MP_IOFUNC
#define MP_IOFUNC 0 /* include mp_print() ? */
#endif
#ifndef MP_MODARITH
#define MP_MODARITH 1 /* include modular arithmetic ? */
#endif
#ifndef MP_NUMTH
#define MP_NUMTH 1 /* include number theoretic functions? */
#endif
#ifndef MP_LOGTAB
#define MP_LOGTAB 1 /* use table of logs instead of log()? */
#endif
#ifndef MP_MEMSET
#define MP_MEMSET 1 /* use memset() to zero buffers? */
#endif
#ifndef MP_MEMCPY
#define MP_MEMCPY 1 /* use memcpy() to copy buffers? */
#endif
#ifndef MP_CRYPTO
#define MP_CRYPTO 1 /* erase memory on free? */
#endif
#ifndef MP_ARGCHK
/*
0 = no parameter checks
1 = runtime checks, continue execution and return an error to caller
2 = assertions; dump core on parameter errors
*/
#ifdef DEBUG
#define MP_ARGCHK 2 /* how to check input arguments */
#else
#define MP_ARGCHK 1 /* how to check input arguments */
#endif
#endif
#ifndef MP_DEBUG
#define MP_DEBUG 0 /* print diagnostic output? */
#endif
#ifndef MP_DEFPREC
#define MP_DEFPREC 64 /* default precision, in digits */
#endif
#ifndef MP_MACRO
#define MP_MACRO 0 /* use macros for frequent calls? */
#endif
#ifndef MP_SQUARE
#define MP_SQUARE 1 /* use separate squaring code? */
#endif
#endif /* ifndef MPI_CONFIG_H_ */

View File

@@ -1,289 +0,0 @@
/*
* mpi-priv.h - Private header file for MPI
* Arbitrary precision integer arithmetic library
*
* NOTE WELL: the content of this header file is NOT part of the "public"
* API for the MPI library, and may change at any time.
* Application programs that use libmpi should NOT include this header file.
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape Communications Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mpi-priv.h,v 1.18 2005-02-25 04:30:11 julien.pierre.bugs%sun.com Exp $ */
#ifndef _MPI_PRIV_H_
#define _MPI_PRIV_H_ 1
#include "mpi.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#if MP_DEBUG
#include <stdio.h>
#define DIAG(T,V) {fprintf(stderr,T);mp_print(V,stderr);fputc('\n',stderr);}
#else
#define DIAG(T,V)
#endif
/* If we aren't using a wired-in logarithm table, we need to include
the math library to get the log() function
*/
/* {{{ s_logv_2[] - log table for 2 in various bases */
#if MP_LOGTAB
/*
A table of the logs of 2 for various bases (the 0 and 1 entries of
this table are meaningless and should not be referenced).
This table is used to compute output lengths for the mp_toradix()
function. Since a number n in radix r takes up about log_r(n)
digits, we estimate the output size by taking the least integer
greater than log_r(n), where:
log_r(n) = log_2(n) * log_r(2)
This table, therefore, is a table of log_r(2) for 2 <= r <= 36,
which are the output bases supported.
*/
extern const float s_logv_2[];
#define LOG_V_2(R) s_logv_2[(R)]
#else
/*
If MP_LOGTAB is not defined, use the math library to compute the
logarithms on the fly. Otherwise, use the table.
Pick which works best for your system.
*/
#include <math.h>
#define LOG_V_2(R) (log(2.0)/log(R))
#endif /* if MP_LOGTAB */
/* }}} */
/* {{{ Digit arithmetic macros */
/*
When adding and multiplying digits, the results can be larger than
can be contained in an mp_digit. Thus, an mp_word is used. These
macros mask off the upper and lower digits of the mp_word (the
mp_word may be more than 2 mp_digits wide, but we only concern
ourselves with the low-order 2 mp_digits)
*/
#define CARRYOUT(W) (mp_digit)((W)>>DIGIT_BIT)
#define ACCUM(W) (mp_digit)(W)
#define MP_MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MP_MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MP_HOWMANY(a,b) (((a) + (b) - 1)/(b))
#define MP_ROUNDUP(a,b) (MP_HOWMANY(a,b) * (b))
/* }}} */
/* {{{ Comparison constants */
#define MP_LT -1
#define MP_EQ 0
#define MP_GT 1
/* }}} */
/* {{{ private function declarations */
/*
If MP_MACRO is false, these will be defined as actual functions;
otherwise, suitable macro definitions will be used. This works
around the fact that ANSI C89 doesn't support an 'inline' keyword
(although I hear C9x will ... about bloody time). At present, the
macro definitions are identical to the function bodies, but they'll
expand in place, instead of generating a function call.
I chose these particular functions to be made into macros because
some profiling showed they are called a lot on a typical workload,
and yet they are primarily housekeeping.
*/
#if MP_MACRO == 0
void s_mp_setz(mp_digit *dp, mp_size count); /* zero digits */
void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count); /* copy */
void *s_mp_alloc(size_t nb, size_t ni); /* general allocator */
void s_mp_free(void *ptr); /* general free function */
extern unsigned long mp_allocs;
extern unsigned long mp_frees;
extern unsigned long mp_copies;
#else
/* Even if these are defined as macros, we need to respect the settings
of the MP_MEMSET and MP_MEMCPY configuration options...
*/
#if MP_MEMSET == 0
#define s_mp_setz(dp, count) \
{int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=0;}
#else
#define s_mp_setz(dp, count) memset(dp, 0, (count) * sizeof(mp_digit))
#endif /* MP_MEMSET */
#if MP_MEMCPY == 0
#define s_mp_copy(sp, dp, count) \
{int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=(sp)[ix];}
#else
#define s_mp_copy(sp, dp, count) memcpy(dp, sp, (count) * sizeof(mp_digit))
#endif /* MP_MEMCPY */
#define s_mp_alloc(nb, ni) calloc(nb, ni)
#define s_mp_free(ptr) {if(ptr) free(ptr);}
#endif /* MP_MACRO */
mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */
mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */
#if MP_MACRO == 0
void s_mp_clamp(mp_int *mp); /* clip leading zeroes */
#else
#define s_mp_clamp(mp)\
{ mp_size used = MP_USED(mp); \
while (used > 1 && DIGIT(mp, used - 1) == 0) --used; \
MP_USED(mp) = used; \
}
#endif /* MP_MACRO */
void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */
mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */
void s_mp_rshd(mp_int *mp, mp_size p); /* right-shift by p digits */
mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */
void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */
void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */
void s_mp_div_2(mp_int *mp); /* divide by 2 in place */
mp_err s_mp_mul_2(mp_int *mp); /* multiply by 2 in place */
mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd);
/* normalize for division */
mp_err s_mp_add_d(mp_int *mp, mp_digit d); /* unsigned digit addition */
mp_err s_mp_sub_d(mp_int *mp, mp_digit d); /* unsigned digit subtract */
mp_err s_mp_mul_d(mp_int *mp, mp_digit d); /* unsigned digit multiply */
mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r);
/* unsigned digit divide */
mp_err s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu);
/* Barrett reduction */
mp_err s_mp_add(mp_int *a, const mp_int *b); /* magnitude addition */
mp_err s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c);
mp_err s_mp_sub(mp_int *a, const mp_int *b); /* magnitude subtract */
mp_err s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c);
mp_err s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset);
/* a += b * RADIX^offset */
mp_err s_mp_mul(mp_int *a, const mp_int *b); /* magnitude multiply */
#if MP_SQUARE
mp_err s_mp_sqr(mp_int *a); /* magnitude square */
#else
#define s_mp_sqr(a) s_mp_mul(a, a)
#endif
mp_err s_mp_div(mp_int *rem, mp_int *div, mp_int *quot); /* magnitude div */
mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
mp_err s_mp_2expt(mp_int *a, mp_digit k); /* a = 2^k */
int s_mp_cmp(const mp_int *a, const mp_int *b); /* magnitude comparison */
int s_mp_cmp_d(const mp_int *a, mp_digit d); /* magnitude digit compare */
int s_mp_ispow2(const mp_int *v); /* is v a power of 2? */
int s_mp_ispow2d(mp_digit d); /* is d a power of 2? */
int s_mp_tovalue(char ch, int r); /* convert ch to value */
char s_mp_todigit(mp_digit val, int r, int low); /* convert val to digit */
int s_mp_outlen(int bits, int r); /* output length in bytes */
mp_digit s_mp_invmod_radix(mp_digit P); /* returns (P ** -1) mod RADIX */
mp_err s_mp_invmod_odd_m( const mp_int *a, const mp_int *m, mp_int *c);
mp_err s_mp_invmod_2d( const mp_int *a, mp_size k, mp_int *c);
mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c);
/* ------ mpv functions, operate on arrays of digits, not on mp_int's ------ */
#if defined (__OS2__) && defined (__IBMC__)
#define MPI_ASM_DECL __cdecl
#else
#define MPI_ASM_DECL
#endif
#ifdef MPI_AMD64
mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit);
mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit);
/* c = a * b */
#define s_mpv_mul_d(a, a_len, b, c) \
((unsigned long*)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
/* c += a * b */
#define s_mpv_mul_d_add(a, a_len, b, c) \
((unsigned long*)c)[a_len] = s_mpv_mul_add_vec64(c, a, a_len, b)
#else
void MPI_ASM_DECL s_mpv_mul_d(const mp_digit *a, mp_size a_len,
mp_digit b, mp_digit *c);
void MPI_ASM_DECL s_mpv_mul_d_add(const mp_digit *a, mp_size a_len,
mp_digit b, mp_digit *c);
#endif
void MPI_ASM_DECL s_mpv_mul_d_add_prop(const mp_digit *a,
mp_size a_len, mp_digit b,
mp_digit *c);
void MPI_ASM_DECL s_mpv_sqr_add_prop(const mp_digit *a,
mp_size a_len,
mp_digit *sqrs);
mp_err MPI_ASM_DECL s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo,
mp_digit divisor, mp_digit *quot, mp_digit *rem);
/* c += a * b * (MP_RADIX ** offset); */
#define s_mp_mul_d_add_offset(a, b, c, off) \
(s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off), MP_OKAY)
typedef struct {
mp_int N; /* modulus N */
mp_digit n0prime; /* n0' = - (n0 ** -1) mod MP_RADIX */
mp_size b; /* R == 2 ** b, also b = # significant bits in N */
} mp_mont_modulus;
mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c,
mp_mont_modulus *mmm);
mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm);
/* }}} */
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,349 +0,0 @@
/*
* mpi.h
*
* Arbitrary precision integer arithmetic library
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape Communications Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mpi.h,v 1.22.8.1 2005-06-09 20:44:58 relyea%netscape.com Exp $ */
#ifndef _H_MPI_
#define _H_MPI_
#include "mpi-config.h"
#if MP_DEBUG
#undef MP_IOFUNC
#define MP_IOFUNC 1
#endif
#if MP_IOFUNC
#include <stdio.h>
#include <ctype.h>
#endif
#include <limits.h>
#if defined(BSDI)
#undef ULLONG_MAX
#endif
#if defined( macintosh )
#include <Types.h>
#elif defined( _WIN32_WCE)
/* #include <sys/types.h> What do we need here ?? */
#else
#include <sys/types.h>
#endif
#define MP_NEG 1
#define MP_ZPOS 0
#define MP_OKAY 0 /* no error, all is well */
#define MP_YES 0 /* yes (boolean result) */
#define MP_NO -1 /* no (boolean result) */
#define MP_MEM -2 /* out of memory */
#define MP_RANGE -3 /* argument out of range */
#define MP_BADARG -4 /* invalid parameter */
#define MP_UNDEF -5 /* answer is undefined */
#define MP_LAST_CODE MP_UNDEF
typedef unsigned int mp_sign;
typedef unsigned int mp_size;
typedef int mp_err;
#define MP_32BIT_MAX 4294967295U
#if !defined(ULONG_MAX)
#error "ULONG_MAX not defined"
#elif !defined(UINT_MAX)
#error "UINT_MAX not defined"
#elif !defined(USHRT_MAX)
#error "USHRT_MAX not defined"
#endif
#if defined(ULONG_LONG_MAX) /* GCC, HPUX */
#define MP_ULONG_LONG_MAX ULONG_LONG_MAX
#elif defined(ULLONG_MAX) /* Solaris */
#define MP_ULONG_LONG_MAX ULLONG_MAX
/* MP_ULONG_LONG_MAX was defined to be ULLONG_MAX */
#elif defined(ULONGLONG_MAX) /* IRIX, AIX */
#define MP_ULONG_LONG_MAX ULONGLONG_MAX
#endif
/* We only use unsigned long for mp_digit iff long is more than 32 bits. */
#if !defined(MP_USE_UINT_DIGIT) && ULONG_MAX > MP_32BIT_MAX
typedef unsigned long mp_digit;
#define MP_DIGIT_MAX ULONG_MAX
#define MP_DIGIT_FMT "%016lX" /* printf() format for 1 digit */
#define MP_HALF_DIGIT_MAX UINT_MAX
#undef MP_NO_MP_WORD
#define MP_NO_MP_WORD 1
#undef MP_USE_LONG_DIGIT
#define MP_USE_LONG_DIGIT 1
#undef MP_USE_LONG_LONG_DIGIT
#elif !defined(MP_USE_UINT_DIGIT) && defined(MP_ULONG_LONG_MAX)
typedef unsigned long long mp_digit;
#define MP_DIGIT_MAX MP_ULONG_LONG_MAX
#define MP_DIGIT_FMT "%016llX" /* printf() format for 1 digit */
#define MP_HALF_DIGIT_MAX UINT_MAX
#undef MP_NO_MP_WORD
#define MP_NO_MP_WORD 1
#undef MP_USE_LONG_LONG_DIGIT
#define MP_USE_LONG_LONG_DIGIT 1
#undef MP_USE_LONG_DIGIT
#else
typedef unsigned int mp_digit;
#define MP_DIGIT_MAX UINT_MAX
#define MP_DIGIT_FMT "%08X" /* printf() format for 1 digit */
#define MP_HALF_DIGIT_MAX USHRT_MAX
#undef MP_USE_UINT_DIGIT
#define MP_USE_UINT_DIGIT 1
#undef MP_USE_LONG_LONG_DIGIT
#undef MP_USE_LONG_DIGIT
#endif
#if !defined(MP_NO_MP_WORD)
#if defined(MP_USE_UINT_DIGIT) && \
(defined(MP_ULONG_LONG_MAX) || (ULONG_MAX > UINT_MAX))
#if (ULONG_MAX > UINT_MAX)
typedef unsigned long mp_word;
typedef long mp_sword;
#define MP_WORD_MAX ULONG_MAX
#else
typedef unsigned long long mp_word;
typedef long long mp_sword;
#define MP_WORD_MAX MP_ULONG_LONG_MAX
#endif
#else
#define MP_NO_MP_WORD 1
#endif
#endif /* !defined(MP_NO_MP_WORD) */
#if !defined(MP_WORD_MAX) && defined(MP_DEFINE_SMALL_WORD)
typedef unsigned int mp_word;
typedef int mp_sword;
#define MP_WORD_MAX UINT_MAX
#endif
#define MP_DIGIT_BIT (CHAR_BIT*sizeof(mp_digit))
#define MP_WORD_BIT (CHAR_BIT*sizeof(mp_word))
#define MP_RADIX (1+(mp_word)MP_DIGIT_MAX)
#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT/2)
#define MP_HALF_RADIX (1+(mp_digit)MP_HALF_DIGIT_MAX)
/* MP_HALF_RADIX really ought to be called MP_SQRT_RADIX, but it's named
** MP_HALF_RADIX because it's the radix for MP_HALF_DIGITs, and it's
** consistent with the other _HALF_ names.
*/
/* Macros for accessing the mp_int internals */
#define MP_SIGN(MP) ((MP)->sign)
#define MP_USED(MP) ((MP)->used)
#define MP_ALLOC(MP) ((MP)->alloc)
#define MP_DIGITS(MP) ((MP)->dp)
#define MP_DIGIT(MP,N) (MP)->dp[(N)]
/* This defines the maximum I/O base (minimum is 2) */
#define MP_MAX_RADIX 64
typedef struct {
mp_sign sign; /* sign of this quantity */
mp_size alloc; /* how many digits allocated */
mp_size used; /* how many digits used */
mp_digit *dp; /* the digits themselves */
} mp_int;
/* Default precision */
mp_size mp_get_prec(void);
void mp_set_prec(mp_size prec);
/* Memory management */
mp_err mp_init(mp_int *mp);
mp_err mp_init_size(mp_int *mp, mp_size prec);
mp_err mp_init_copy(mp_int *mp, const mp_int *from);
mp_err mp_copy(const mp_int *from, mp_int *to);
void mp_exch(mp_int *mp1, mp_int *mp2);
void mp_clear(mp_int *mp);
void mp_zero(mp_int *mp);
void mp_set(mp_int *mp, mp_digit d);
mp_err mp_set_int(mp_int *mp, long z);
#define mp_set_long(mp,z) mp_set_int(mp,z)
mp_err mp_set_ulong(mp_int *mp, unsigned long z);
/* Single digit arithmetic */
mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b);
mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b);
mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b);
mp_err mp_mul_2(const mp_int *a, mp_int *c);
mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r);
mp_err mp_div_2(const mp_int *a, mp_int *c);
mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c);
/* Sign manipulations */
mp_err mp_abs(const mp_int *a, mp_int *b);
mp_err mp_neg(const mp_int *a, mp_int *b);
/* Full arithmetic */
mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c);
mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int *c);
#if MP_SQUARE
mp_err mp_sqr(const mp_int *a, mp_int *b);
#else
#define mp_sqr(a, b) mp_mul(a, a, b)
#endif
mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r);
mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r);
mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c);
mp_err mp_2expt(mp_int *a, mp_digit k);
mp_err mp_sqrt(const mp_int *a, mp_int *b);
/* Modular arithmetic */
#if MP_MODARITH
mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c);
mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c);
mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
#if MP_SQUARE
mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c);
#else
#define mp_sqrmod(a, m, c) mp_mulmod(a, a, m, c)
#endif
mp_err mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c);
#endif /* MP_MODARITH */
/* Comparisons */
int mp_cmp_z(const mp_int *a);
int mp_cmp_d(const mp_int *a, mp_digit d);
int mp_cmp(const mp_int *a, const mp_int *b);
int mp_cmp_mag(mp_int *a, mp_int *b);
int mp_cmp_int(const mp_int *a, long z);
int mp_isodd(const mp_int *a);
int mp_iseven(const mp_int *a);
/* Number theoretic */
#if MP_NUMTH
mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c);
mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c);
mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y);
mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c);
mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c);
#endif /* end MP_NUMTH */
/* Input and output */
#if MP_IOFUNC
void mp_print(mp_int *mp, FILE *ofp);
#endif /* end MP_IOFUNC */
/* Base conversion */
mp_err mp_read_raw(mp_int *mp, char *str, int len);
int mp_raw_size(mp_int *mp);
mp_err mp_toraw(mp_int *mp, char *str);
mp_err mp_read_radix(mp_int *mp, const char *str, int radix);
mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix);
int mp_radix_size(mp_int *mp, int radix);
mp_err mp_toradix(mp_int *mp, char *str, int radix);
int mp_tovalue(char ch, int r);
#define mp_tobinary(M, S) mp_toradix((M), (S), 2)
#define mp_tooctal(M, S) mp_toradix((M), (S), 8)
#define mp_todecimal(M, S) mp_toradix((M), (S), 10)
#define mp_tohex(M, S) mp_toradix((M), (S), 16)
/* Error strings */
const char *mp_strerror(mp_err ec);
/* Octet string conversion functions */
mp_err mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len);
int mp_unsigned_octet_size(const mp_int *mp);
mp_err mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen);
mp_err mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen);
mp_err mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size len);
/* Miscellaneous */
mp_size mp_trailing_zeros(const mp_int *mp);
#define MP_CHECKOK(x) if (MP_OKAY > (res = (x))) goto CLEANUP
#define MP_CHECKERR(x) if (MP_OKAY > (res = (x))) goto CLEANUP
#if defined(MP_API_COMPATIBLE)
#define NEG MP_NEG
#define ZPOS MP_ZPOS
#define DIGIT_MAX MP_DIGIT_MAX
#define DIGIT_BIT MP_DIGIT_BIT
#define DIGIT_FMT MP_DIGIT_FMT
#define RADIX MP_RADIX
#define MAX_RADIX MP_MAX_RADIX
#define SIGN(MP) MP_SIGN(MP)
#define USED(MP) MP_USED(MP)
#define ALLOC(MP) MP_ALLOC(MP)
#define DIGITS(MP) MP_DIGITS(MP)
#define DIGIT(MP,N) MP_DIGIT(MP,N)
#if MP_ARGCHK == 1
#define ARGCHK(X,Y) {if(!(X)){return (Y);}}
#elif MP_ARGCHK == 2
#include <assert.h>
#define ARGCHK(X,Y) assert(X)
#else
#define ARGCHK(X,Y) /* */
#endif
#endif /* defined MP_API_COMPATIBLE */
/*
* mpi_getProcessorLineSize() returns the size in bytes of the cache line
* if a cache exists, or zero if there is no cache. If more than one
* cache line exists, it should return the smallest line size (which is
* usually the L1 cache).
*
* mp_modexp uses this information to make sure that private key information
* isn't being leaked through the cache.
*
* see mpcpucache.c for the implementation.
*/
unsigned long mpi_getProcessorLineSize();
#endif /* end _H_MPI_ */

View File

@@ -1,65 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Solaris software cryptographic token.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Sun Microsystems, Inc.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MPI_AMD64
#error This file only works on AMD64 platforms.
#endif
#include <mpi-priv.h>
/*
* MPI glue
*
*/
/* Presently, this is only used by the Montgomery arithmetic code. */
/* c += a * b */
void MPI_ASM_DECL s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len,
mp_digit b, mp_digit *c)
{
mp_digit w;
mp_digit d;
d = s_mpv_mul_add_vec64(c, a, a_len, b);
c += a_len;
while (d) {
w = c[0] + d;
d = (w < c[0] || w < d);
*c++ = w;
}
}

View File

@@ -1,418 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Solaris software cryptographic token.
#
# The Initial Developer of the Original Code is
# Sun Microsystems, Inc.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Sun Microsystems, Inc.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK ***** */
# ------------------------------------------------------------------------
#
# Implementation of s_mpv_mul_set_vec which exploits
# the 64X64->128 bit unsigned multiply instruction.
#
# ------------------------------------------------------------------------
# r = a * digit, r and a are vectors of length len
# returns the carry digit
# r and a are 64 bit aligned.
#
# uint64_t
# s_mpv_mul_set_vec64(uint64_t *r, uint64_t *a, int len, uint64_t digit)
#
.text; .align 16; .globl s_mpv_mul_set_vec64; .type s_mpv_mul_set_vec64, @function; s_mpv_mul_set_vec64:
xorq %rax, %rax # if (len == 0) return (0)
testq %rdx, %rdx
jz .L17
movq %rdx, %r8 # Use r8 for len; %rdx is used by mul
xorq %r9, %r9 # cy = 0
.L15:
cmpq $8, %r8 # 8 - len
jb .L16
movq 0(%rsi), %rax # rax = a[0]
movq 8(%rsi), %r11 # prefetch a[1]
mulq %rcx # p = a[0] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 0(%rdi) # r[0] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 16(%rsi), %r11 # prefetch a[2]
mulq %rcx # p = a[1] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 8(%rdi) # r[1] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 24(%rsi), %r11 # prefetch a[3]
mulq %rcx # p = a[2] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 16(%rdi) # r[2] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 32(%rsi), %r11 # prefetch a[4]
mulq %rcx # p = a[3] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 24(%rdi) # r[3] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 40(%rsi), %r11 # prefetch a[5]
mulq %rcx # p = a[4] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 32(%rdi) # r[4] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 48(%rsi), %r11 # prefetch a[6]
mulq %rcx # p = a[5] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 40(%rdi) # r[5] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 56(%rsi), %r11 # prefetch a[7]
mulq %rcx # p = a[6] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 48(%rdi) # r[6] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
mulq %rcx # p = a[7] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 56(%rdi) # r[7] = lo(p)
movq %rdx, %r9 # cy = hi(p)
addq $64, %rsi
addq $64, %rdi
subq $8, %r8
jz .L17
jmp .L15
.L16:
movq 0(%rsi), %rax
mulq %rcx # p = a[0] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 0(%rdi) # r[0] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
movq 8(%rsi), %rax
mulq %rcx # p = a[1] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 8(%rdi) # r[1] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
movq 16(%rsi), %rax
mulq %rcx # p = a[2] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 16(%rdi) # r[2] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
movq 24(%rsi), %rax
mulq %rcx # p = a[3] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 24(%rdi) # r[3] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
movq 32(%rsi), %rax
mulq %rcx # p = a[4] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 32(%rdi) # r[4] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
movq 40(%rsi), %rax
mulq %rcx # p = a[5] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 40(%rdi) # r[5] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
movq 48(%rsi), %rax
mulq %rcx # p = a[6] * digit
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 48(%rdi) # r[6] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L17
.L17:
movq %r9, %rax
ret
.size s_mpv_mul_set_vec64, [.-s_mpv_mul_set_vec64]
# ------------------------------------------------------------------------
#
# Implementation of s_mpv_mul_add_vec which exploits
# the 64X64->128 bit unsigned multiply instruction.
#
# ------------------------------------------------------------------------
# r += a * digit, r and a are vectors of length len
# returns the carry digit
# r and a are 64 bit aligned.
#
# uint64_t
# s_mpv_mul_add_vec64(uint64_t *r, uint64_t *a, int len, uint64_t digit)
#
.text; .align 16; .globl s_mpv_mul_add_vec64; .type s_mpv_mul_add_vec64, @function; s_mpv_mul_add_vec64:
xorq %rax, %rax # if (len == 0) return (0)
testq %rdx, %rdx
jz .L27
movq %rdx, %r8 # Use r8 for len; %rdx is used by mul
xorq %r9, %r9 # cy = 0
.L25:
cmpq $8, %r8 # 8 - len
jb .L26
movq 0(%rsi), %rax # rax = a[0]
movq 0(%rdi), %r10 # r10 = r[0]
movq 8(%rsi), %r11 # prefetch a[1]
mulq %rcx # p = a[0] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[0]
movq 8(%rdi), %r10 # prefetch r[1]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 0(%rdi) # r[0] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 16(%rsi), %r11 # prefetch a[2]
mulq %rcx # p = a[1] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[1]
movq 16(%rdi), %r10 # prefetch r[2]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 8(%rdi) # r[1] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 24(%rsi), %r11 # prefetch a[3]
mulq %rcx # p = a[2] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[2]
movq 24(%rdi), %r10 # prefetch r[3]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 16(%rdi) # r[2] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 32(%rsi), %r11 # prefetch a[4]
mulq %rcx # p = a[3] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[3]
movq 32(%rdi), %r10 # prefetch r[4]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 24(%rdi) # r[3] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 40(%rsi), %r11 # prefetch a[5]
mulq %rcx # p = a[4] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[4]
movq 40(%rdi), %r10 # prefetch r[5]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 32(%rdi) # r[4] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 48(%rsi), %r11 # prefetch a[6]
mulq %rcx # p = a[5] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[5]
movq 48(%rdi), %r10 # prefetch r[6]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 40(%rdi) # r[5] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
movq 56(%rsi), %r11 # prefetch a[7]
mulq %rcx # p = a[6] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[6]
movq 56(%rdi), %r10 # prefetch r[7]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 48(%rdi) # r[6] = lo(p)
movq %rdx, %r9 # cy = hi(p)
movq %r11, %rax
mulq %rcx # p = a[7] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[7]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 56(%rdi) # r[7] = lo(p)
movq %rdx, %r9 # cy = hi(p)
addq $64, %rsi
addq $64, %rdi
subq $8, %r8
jz .L27
jmp .L25
.L26:
movq 0(%rsi), %rax
movq 0(%rdi), %r10
mulq %rcx # p = a[0] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[0]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 0(%rdi) # r[0] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
movq 8(%rsi), %rax
movq 8(%rdi), %r10
mulq %rcx # p = a[1] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[1]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 8(%rdi) # r[1] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
movq 16(%rsi), %rax
movq 16(%rdi), %r10
mulq %rcx # p = a[2] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[2]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 16(%rdi) # r[2] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
movq 24(%rsi), %rax
movq 24(%rdi), %r10
mulq %rcx # p = a[3] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[3]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 24(%rdi) # r[3] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
movq 32(%rsi), %rax
movq 32(%rdi), %r10
mulq %rcx # p = a[4] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[4]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 32(%rdi) # r[4] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
movq 40(%rsi), %rax
movq 40(%rdi), %r10
mulq %rcx # p = a[5] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[5]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 40(%rdi) # r[5] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
movq 48(%rsi), %rax
movq 48(%rdi), %r10
mulq %rcx # p = a[6] * digit
addq %r10, %rax
adcq $0, %rdx # p += r[6]
addq %r9, %rax
adcq $0, %rdx # p += cy
movq %rax, 48(%rdi) # r[6] = lo(p)
movq %rdx, %r9 # cy = hi(p)
decq %r8
jz .L27
.L27:
movq %r9, %rax
ret
.size s_mpv_mul_add_vec64, [.-s_mpv_mul_add_vec64]

View File

@@ -1,418 +0,0 @@
/ ***** BEGIN LICENSE BLOCK *****
/ Version: MPL 1.1/GPL 2.0/LGPL 2.1
/
/ The contents of this file are subject to the Mozilla Public License Version
/ 1.1 (the "License"); you may not use this file except in compliance with
/ the License. You may obtain a copy of the License at
/ http://www.mozilla.org/MPL/
/
/ Software distributed under the License is distributed on an "AS IS" basis,
/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
/ for the specific language governing rights and limitations under the
/ License.
/
/ The Original Code is the Solaris software cryptographic token.
/
/ The Initial Developer of the Original Code is
/ Sun Microsystems, Inc.
/ Portions created by the Initial Developer are Copyright (C) 2005
/ the Initial Developer. All Rights Reserved.
/
/ Contributor(s):
/ Sun Microsystems, Inc.
/
/ Alternatively, the contents of this file may be used under the terms of
/ either the GNU General Public License Version 2 or later (the "GPL"), or
/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
/ in which case the provisions of the GPL or the LGPL are applicable instead
/ of those above. If you wish to allow use of your version of this file only
/ under the terms of either the GPL or the LGPL, and not to allow others to
/ use your version of this file under the terms of the MPL, indicate your
/ decision by deleting the provisions above and replace them with the notice
/ and other provisions required by the GPL or the LGPL. If you do not delete
/ the provisions above, a recipient may use your version of this file under
/ the terms of any one of the MPL, the GPL or the LGPL.
/
/ ***** END LICENSE BLOCK ***** */
/ ------------------------------------------------------------------------
/
/ Implementation of s_mpv_mul_set_vec which exploits
/ the 64X64->128 bit unsigned multiply instruction.
/
/ ------------------------------------------------------------------------
/ r = a * digit, r and a are vectors of length len
/ returns the carry digit
/ r and a are 64 bit aligned.
/
/ uint64_t
/ s_mpv_mul_set_vec64(uint64_t *r, uint64_t *a, int len, uint64_t digit)
/
.text; .align 16; .globl s_mpv_mul_set_vec64; .type s_mpv_mul_set_vec64, @function; s_mpv_mul_set_vec64:
xorq %rax, %rax / if (len == 0) return (0)
testq %rdx, %rdx
jz .L17
movq %rdx, %r8 / Use r8 for len; %rdx is used by mul
xorq %r9, %r9 / cy = 0
.L15:
cmpq $8, %r8 / 8 - len
jb .L16
movq 0(%rsi), %rax / rax = a[0]
movq 8(%rsi), %r11 / prefetch a[1]
mulq %rcx / p = a[0] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 0(%rdi) / r[0] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 16(%rsi), %r11 / prefetch a[2]
mulq %rcx / p = a[1] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 8(%rdi) / r[1] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 24(%rsi), %r11 / prefetch a[3]
mulq %rcx / p = a[2] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 16(%rdi) / r[2] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 32(%rsi), %r11 / prefetch a[4]
mulq %rcx / p = a[3] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 24(%rdi) / r[3] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 40(%rsi), %r11 / prefetch a[5]
mulq %rcx / p = a[4] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 32(%rdi) / r[4] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 48(%rsi), %r11 / prefetch a[6]
mulq %rcx / p = a[5] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 40(%rdi) / r[5] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 56(%rsi), %r11 / prefetch a[7]
mulq %rcx / p = a[6] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 48(%rdi) / r[6] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
mulq %rcx / p = a[7] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 56(%rdi) / r[7] = lo(p)
movq %rdx, %r9 / cy = hi(p)
addq $64, %rsi
addq $64, %rdi
subq $8, %r8
jz .L17
jmp .L15
.L16:
movq 0(%rsi), %rax
mulq %rcx / p = a[0] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 0(%rdi) / r[0] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
movq 8(%rsi), %rax
mulq %rcx / p = a[1] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 8(%rdi) / r[1] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
movq 16(%rsi), %rax
mulq %rcx / p = a[2] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 16(%rdi) / r[2] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
movq 24(%rsi), %rax
mulq %rcx / p = a[3] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 24(%rdi) / r[3] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
movq 32(%rsi), %rax
mulq %rcx / p = a[4] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 32(%rdi) / r[4] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
movq 40(%rsi), %rax
mulq %rcx / p = a[5] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 40(%rdi) / r[5] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
movq 48(%rsi), %rax
mulq %rcx / p = a[6] * digit
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 48(%rdi) / r[6] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L17
.L17:
movq %r9, %rax
ret
.size s_mpv_mul_set_vec64, [.-s_mpv_mul_set_vec64]
/ ------------------------------------------------------------------------
/
/ Implementation of s_mpv_mul_add_vec which exploits
/ the 64X64->128 bit unsigned multiply instruction.
/
/ ------------------------------------------------------------------------
/ r += a * digit, r and a are vectors of length len
/ returns the carry digit
/ r and a are 64 bit aligned.
/
/ uint64_t
/ s_mpv_mul_add_vec64(uint64_t *r, uint64_t *a, int len, uint64_t digit)
/
.text; .align 16; .globl s_mpv_mul_add_vec64; .type s_mpv_mul_add_vec64, @function; s_mpv_mul_add_vec64:
xorq %rax, %rax / if (len == 0) return (0)
testq %rdx, %rdx
jz .L27
movq %rdx, %r8 / Use r8 for len; %rdx is used by mul
xorq %r9, %r9 / cy = 0
.L25:
cmpq $8, %r8 / 8 - len
jb .L26
movq 0(%rsi), %rax / rax = a[0]
movq 0(%rdi), %r10 / r10 = r[0]
movq 8(%rsi), %r11 / prefetch a[1]
mulq %rcx / p = a[0] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[0]
movq 8(%rdi), %r10 / prefetch r[1]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 0(%rdi) / r[0] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 16(%rsi), %r11 / prefetch a[2]
mulq %rcx / p = a[1] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[1]
movq 16(%rdi), %r10 / prefetch r[2]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 8(%rdi) / r[1] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 24(%rsi), %r11 / prefetch a[3]
mulq %rcx / p = a[2] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[2]
movq 24(%rdi), %r10 / prefetch r[3]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 16(%rdi) / r[2] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 32(%rsi), %r11 / prefetch a[4]
mulq %rcx / p = a[3] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[3]
movq 32(%rdi), %r10 / prefetch r[4]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 24(%rdi) / r[3] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 40(%rsi), %r11 / prefetch a[5]
mulq %rcx / p = a[4] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[4]
movq 40(%rdi), %r10 / prefetch r[5]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 32(%rdi) / r[4] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 48(%rsi), %r11 / prefetch a[6]
mulq %rcx / p = a[5] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[5]
movq 48(%rdi), %r10 / prefetch r[6]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 40(%rdi) / r[5] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
movq 56(%rsi), %r11 / prefetch a[7]
mulq %rcx / p = a[6] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[6]
movq 56(%rdi), %r10 / prefetch r[7]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 48(%rdi) / r[6] = lo(p)
movq %rdx, %r9 / cy = hi(p)
movq %r11, %rax
mulq %rcx / p = a[7] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[7]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 56(%rdi) / r[7] = lo(p)
movq %rdx, %r9 / cy = hi(p)
addq $64, %rsi
addq $64, %rdi
subq $8, %r8
jz .L27
jmp .L25
.L26:
movq 0(%rsi), %rax
movq 0(%rdi), %r10
mulq %rcx / p = a[0] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[0]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 0(%rdi) / r[0] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
movq 8(%rsi), %rax
movq 8(%rdi), %r10
mulq %rcx / p = a[1] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[1]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 8(%rdi) / r[1] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
movq 16(%rsi), %rax
movq 16(%rdi), %r10
mulq %rcx / p = a[2] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[2]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 16(%rdi) / r[2] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
movq 24(%rsi), %rax
movq 24(%rdi), %r10
mulq %rcx / p = a[3] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[3]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 24(%rdi) / r[3] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
movq 32(%rsi), %rax
movq 32(%rdi), %r10
mulq %rcx / p = a[4] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[4]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 32(%rdi) / r[4] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
movq 40(%rsi), %rax
movq 40(%rdi), %r10
mulq %rcx / p = a[5] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[5]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 40(%rdi) / r[5] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
movq 48(%rsi), %rax
movq 48(%rdi), %r10
mulq %rcx / p = a[6] * digit
addq %r10, %rax
adcq $0, %rdx / p += r[6]
addq %r9, %rax
adcq $0, %rdx / p += cy
movq %rax, 48(%rdi) / r[6] = lo(p)
movq %rdx, %r9 / cy = hi(p)
decq %r8
jz .L27
.L27:
movq %r9, %rax
ret
.size s_mpv_mul_add_vec64, [.-s_mpv_mul_add_vec64]

View File

@@ -1,115 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mpi_hp.c,v 1.5 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
/* This file contains routines that perform vector multiplication. */
#include "mpi-priv.h"
#include <unistd.h>
#include <stddef.h>
/* #include <sys/systeminfo.h> */
#include <strings.h>
extern void multacc512(
int length, /* doublewords in multiplicand vector. */
const mp_digit *scalaraddr, /* Address of scalar. */
const mp_digit *multiplicand, /* The multiplicand vector. */
mp_digit * result); /* Where to accumulate the result. */
extern void maxpy_little(
int length, /* doublewords in multiplicand vector. */
const mp_digit *scalaraddr, /* Address of scalar. */
const mp_digit *multiplicand, /* The multiplicand vector. */
mp_digit * result); /* Where to accumulate the result. */
extern void add_diag_little(
int length, /* doublewords in input vector. */
const mp_digit *root, /* The vector to square. */
mp_digit * result); /* Where to accumulate the result. */
void
s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps)
{
add_diag_little(a_len, pa, ps);
}
#define MAX_STACK_DIGITS 258
#define MULTACC512_LEN (512 / MP_DIGIT_BIT)
#define HP_MPY_ADD_FN (a_len == MULTACC512_LEN ? multacc512 : maxpy_little)
/* c = a * b */
void
s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
mp_digit x[MAX_STACK_DIGITS];
mp_digit *px = x;
size_t xSize = 0;
if (a == c) {
if (a_len > MAX_STACK_DIGITS) {
xSize = sizeof(mp_digit) * (a_len + 2);
px = malloc(xSize);
if (!px)
return;
}
memcpy(px, a, a_len * sizeof(*a));
a = px;
}
s_mp_setz(c, a_len + 1);
HP_MPY_ADD_FN(a_len, &b, a, c);
if (px != x && px) {
memset(px, 0, xSize);
free(px);
}
}
/* c += a * b, where a is a_len words long. */
void
s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
c[a_len] = 0; /* so carry propagation stops here. */
HP_MPY_ADD_FN(a_len, &b, a, c);
}
/* c += a * b, where a is y words long. */
void
s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b,
mp_digit *c)
{
HP_MPY_ADD_FN(a_len, &b, a, c);
}

View File

@@ -1,342 +0,0 @@
/
/ The contents of this file are subject to the Mozilla Public
/ License Version 1.1 (the "License"); you may not use this file
/ except in compliance with the License. You may obtain a copy of
/ the License at http://www.mozilla.org/MPL/
/
/ Software distributed under the License is distributed on an "AS
/ IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
/ implied. See the License for the specific language governing
/ rights and limitations under the License.
/
/ The Original Code is the Netscape security libraries.
/
/ The Initial Developer of the Original Code is Netscape
/ Communications Corporation. Portions created by Netscape are
/ Copyright (C) 2001 Netscape Communications Corporation. All
/ Rights Reserved.
/
/ Contributor(s):
/
/ Alternatively, the contents of this file may be used under the
/ terms of the GNU General Public License Version 2 or later (the
/ "GPL"), in which case the provisions of the GPL are applicable
/ instead of those above. If you wish to allow use of your
/ version of this file only under the terms of the GPL and not to
/ allow others to use your version of this file under the MPL,
/ indicate your decision by deleting the provisions above and
/ replace them with the notice and other provisions required by
/ the GPL. If you do not delete the provisions above, a recipient
/ may use your version of this file under either the MPL or the
/ GPL.
/ $Id: mpi_i86pc.s,v 1.1 2001-04-27 20:47:39 nelsonb%netscape.com Exp $
/
.text
/ ebp - 36: caller's esi
/ ebp - 32: caller's edi
/ ebp - 28:
/ ebp - 24:
/ ebp - 20:
/ ebp - 16:
/ ebp - 12:
/ ebp - 8:
/ ebp - 4:
/ ebp + 0: caller's ebp
/ ebp + 4: return address
/ ebp + 8: a argument
/ ebp + 12: a_len argument
/ ebp + 16: b argument
/ ebp + 20: c argument
/ registers:
/ eax:
/ ebx: carry
/ ecx: a_len
/ edx:
/ esi: a ptr
/ edi: c ptr
.globl s_mpv_mul_d
.type s_mpv_mul_d,@function
s_mpv_mul_d:
push %ebp
mov %esp,%ebp
sub $28,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx / carry = 0
mov 12(%ebp),%ecx / ecx = a_len
mov 20(%ebp),%edi
cmp $0,%ecx
je L2 / jmp if a_len == 0
mov 8(%ebp),%esi / esi = a
cld
L1:
lodsl / eax = [ds:esi]; esi += 4
mov 16(%ebp),%edx / edx = b
mull %edx / edx:eax = Phi:Plo = a_i * b
add %ebx,%eax / add carry (%ebx) to edx:eax
adc $0,%edx
mov %edx,%ebx / high half of product becomes next carry
stosl / [es:edi] = ax; edi += 4;
dec %ecx / --a_len
jnz L1 / jmp if a_len != 0
L2:
mov %ebx,0(%edi) / *c = carry
pop %ebx
pop %esi
pop %edi
leave
ret
nop
/ ebp - 36: caller's esi
/ ebp - 32: caller's edi
/ ebp - 28:
/ ebp - 24:
/ ebp - 20:
/ ebp - 16:
/ ebp - 12:
/ ebp - 8:
/ ebp - 4:
/ ebp + 0: caller's ebp
/ ebp + 4: return address
/ ebp + 8: a argument
/ ebp + 12: a_len argument
/ ebp + 16: b argument
/ ebp + 20: c argument
/ registers:
/ eax:
/ ebx: carry
/ ecx: a_len
/ edx:
/ esi: a ptr
/ edi: c ptr
.globl s_mpv_mul_d_add
.type s_mpv_mul_d_add,@function
s_mpv_mul_d_add:
push %ebp
mov %esp,%ebp
sub $28,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx / carry = 0
mov 12(%ebp),%ecx / ecx = a_len
mov 20(%ebp),%edi
cmp $0,%ecx
je L4 / jmp if a_len == 0
mov 8(%ebp),%esi / esi = a
cld
L3:
lodsl / eax = [ds:esi]; esi += 4
mov 16(%ebp),%edx / edx = b
mull %edx / edx:eax = Phi:Plo = a_i * b
add %ebx,%eax / add carry (%ebx) to edx:eax
adc $0,%edx
mov 0(%edi),%ebx / add in current word from *c
add %ebx,%eax
adc $0,%edx
mov %edx,%ebx / high half of product becomes next carry
stosl / [es:edi] = ax; edi += 4;
dec %ecx / --a_len
jnz L3 / jmp if a_len != 0
L4:
mov %ebx,0(%edi) / *c = carry
pop %ebx
pop %esi
pop %edi
leave
ret
nop
/ ebp - 36: caller's esi
/ ebp - 32: caller's edi
/ ebp - 28:
/ ebp - 24:
/ ebp - 20:
/ ebp - 16:
/ ebp - 12:
/ ebp - 8:
/ ebp - 4:
/ ebp + 0: caller's ebp
/ ebp + 4: return address
/ ebp + 8: a argument
/ ebp + 12: a_len argument
/ ebp + 16: b argument
/ ebp + 20: c argument
/ registers:
/ eax:
/ ebx: carry
/ ecx: a_len
/ edx:
/ esi: a ptr
/ edi: c ptr
.globl s_mpv_mul_d_add_prop
.type s_mpv_mul_d_add_prop,@function
s_mpv_mul_d_add_prop:
push %ebp
mov %esp,%ebp
sub $28,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx / carry = 0
mov 12(%ebp),%ecx / ecx = a_len
mov 20(%ebp),%edi
cmp $0,%ecx
je L6 / jmp if a_len == 0
cld
mov 8(%ebp),%esi / esi = a
L5:
lodsl / eax = [ds:esi]; esi += 4
mov 16(%ebp),%edx / edx = b
mull %edx / edx:eax = Phi:Plo = a_i * b
add %ebx,%eax / add carry (%ebx) to edx:eax
adc $0,%edx
mov 0(%edi),%ebx / add in current word from *c
add %ebx,%eax
adc $0,%edx
mov %edx,%ebx / high half of product becomes next carry
stosl / [es:edi] = ax; edi += 4;
dec %ecx / --a_len
jnz L5 / jmp if a_len != 0
L6:
cmp $0,%ebx / is carry zero?
jz L8
mov 0(%edi),%eax / add in current word from *c
add %ebx,%eax
stosl / [es:edi] = ax; edi += 4;
jnc L8
L7:
mov 0(%edi),%eax / add in current word from *c
adc $0,%eax
stosl / [es:edi] = ax; edi += 4;
jc L7
L8:
pop %ebx
pop %esi
pop %edi
leave
ret
nop
/ ebp - 20: caller's esi
/ ebp - 16: caller's edi
/ ebp - 12:
/ ebp - 8: carry
/ ebp - 4: a_len local
/ ebp + 0: caller's ebp
/ ebp + 4: return address
/ ebp + 8: pa argument
/ ebp + 12: a_len argument
/ ebp + 16: ps argument
/ ebp + 20:
/ registers:
/ eax:
/ ebx: carry
/ ecx: a_len
/ edx:
/ esi: a ptr
/ edi: c ptr
.globl s_mpv_sqr_add_prop
.type s_mpv_sqr_add_prop,@function
s_mpv_sqr_add_prop:
push %ebp
mov %esp,%ebp
sub $12,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx / carry = 0
mov 12(%ebp),%ecx / a_len
mov 16(%ebp),%edi / edi = ps
cmp $0,%ecx
je L11 / jump if a_len == 0
cld
mov 8(%ebp),%esi / esi = pa
L10:
lodsl / %eax = [ds:si]; si += 4;
mull %eax
add %ebx,%eax / add "carry"
adc $0,%edx
mov 0(%edi),%ebx
add %ebx,%eax / add low word from result
mov 4(%edi),%ebx
stosl / [es:di] = %eax; di += 4;
adc %ebx,%edx / add high word from result
movl $0,%ebx
mov %edx,%eax
adc $0,%ebx
stosl / [es:di] = %eax; di += 4;
dec %ecx / --a_len
jnz L10 / jmp if a_len != 0
L11:
cmp $0,%ebx / is carry zero?
jz L14
mov 0(%edi),%eax / add in current word from *c
add %ebx,%eax
stosl / [es:edi] = ax; edi += 4;
jnc L14
L12:
mov 0(%edi),%eax / add in current word from *c
adc $0,%eax
stosl / [es:edi] = ax; edi += 4;
jc L12
L14:
pop %ebx
pop %esi
pop %edi
leave
ret
nop
/
/ Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized
/ so its high bit is 1. This code is from NSPR.
/
/ mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor,
/ mp_digit *qp, mp_digit *rp)
/ esp + 0: Caller's ebx
/ esp + 4: return address
/ esp + 8: Nhi argument
/ esp + 12: Nlo argument
/ esp + 16: divisor argument
/ esp + 20: qp argument
/ esp + 24: rp argument
/ registers:
/ eax:
/ ebx: carry
/ ecx: a_len
/ edx:
/ esi: a ptr
/ edi: c ptr
/
.globl s_mpv_div_2dx1d
.type s_mpv_div_2dx1d,@function
s_mpv_div_2dx1d:
push %ebx
mov 8(%esp),%edx
mov 12(%esp),%eax
mov 16(%esp),%ebx
div %ebx
mov 20(%esp),%ebx
mov %eax,0(%ebx)
mov 24(%esp),%ebx
mov %edx,0(%ebx)
xor %eax,%eax / return zero
pop %ebx
ret
nop

View File

@@ -1,502 +0,0 @@
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
* $Id: mpi_mips.s,v 1.2 2000-08-31 02:40:32 nelsonb%netscape.com Exp $
*/
#include <regdef.h>
.set noreorder
.set noat
.section .text, 1, 0x00000006, 4, 4
.text:
.section .text
.ent s_mpv_mul_d_add
.globl s_mpv_mul_d_add
s_mpv_mul_d_add:
#/* c += a * b */
#void s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b,
# mp_digit *c)
#{
# mp_digit a0, a1; regs a4, a5
# mp_digit c0, c1; regs a6, a7
# mp_digit cy = 0; reg t2
# mp_word w0, w1; regs t0, t1
#
# if (a_len) {
beq a1,zero,.L.1
move t2,zero # cy = 0
dsll32 a2,a2,0 # "b" is sometimes negative (?!?!)
dsrl32 a2,a2,0 # This clears the upper 32 bits.
# a0 = a[0];
lwu a4,0(a0)
# w0 = ((mp_word)b * a0);
dmultu a2,a4
# if (--a_len) {
addiu a1,a1,-1
beq a1,zero,.L.2
# while (a_len >= 2) {
sltiu t3,a1,2
bne t3,zero,.L.3
# a1 = a[1];
lwu a5,4(a0)
.L.4:
# a_len -= 2;
addiu a1,a1,-2
# c0 = c[0];
lwu a6,0(a3)
# w0 += cy;
mflo t0
daddu t0,t0,t2
# w0 += c0;
daddu t0,t0,a6
# w1 = (mp_word)b * a1;
dmultu a2,a5 #
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# c[0] = ACCUM(w0);
sw t0,0(a3)
# a0 = a[2];
lwu a4,8(a0)
# a += 2;
addiu a0,a0,8
# c1 = c[1];
lwu a7,4(a3)
# w1 += cy;
mflo t1
daddu t1,t1,t2
# w1 += c1;
daddu t1,t1,a7
# w0 = (mp_word)b * a0;
dmultu a2,a4 #
# cy = CARRYOUT(w1);
dsrl32 t2,t1,0
# c[1] = ACCUM(w1);
sw t1,4(a3)
# c += 2;
addiu a3,a3,8
sltiu t3,a1,2
beq t3,zero,.L.4
# a1 = a[1];
lwu a5,4(a0)
# }
.L.3:
# c0 = c[0];
lwu a6,0(a3)
# w0 += cy;
# if (a_len) {
mflo t0
beq a1,zero,.L.5
daddu t0,t0,t2
# w1 = (mp_word)b * a1;
dmultu a2,a5
# w0 += c0;
daddu t0,t0,a6 #
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# c[0] = ACCUM(w0);
sw t0,0(a3)
# c1 = c[1];
lwu a7,4(a3)
# w1 += cy;
mflo t1
daddu t1,t1,t2
# w1 += c1;
daddu t1,t1,a7
# c[1] = ACCUM(w1);
sw t1,4(a3)
# cy = CARRYOUT(w1);
dsrl32 t2,t1,0
# c += 1;
b .L.6
addiu a3,a3,4
# } else {
.L.5:
# w0 += c0;
daddu t0,t0,a6
# c[0] = ACCUM(w0);
sw t0,0(a3)
# cy = CARRYOUT(w0);
b .L.6
dsrl32 t2,t0,0
# }
# } else {
.L.2:
# c0 = c[0];
lwu a6,0(a3)
# w0 += c0;
mflo t0
daddu t0,t0,a6
# c[0] = ACCUM(w0);
sw t0,0(a3)
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# }
.L.6:
# c[1] = cy;
jr ra
sw t2,4(a3)
# }
.L.1:
jr ra
nop
#}
#
.end s_mpv_mul_d_add
.ent s_mpv_mul_d_add_prop
.globl s_mpv_mul_d_add_prop
s_mpv_mul_d_add_prop:
#/* c += a * b */
#void s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b,
# mp_digit *c)
#{
# mp_digit a0, a1; regs a4, a5
# mp_digit c0, c1; regs a6, a7
# mp_digit cy = 0; reg t2
# mp_word w0, w1; regs t0, t1
#
# if (a_len) {
beq a1,zero,.M.1
move t2,zero # cy = 0
dsll32 a2,a2,0 # "b" is sometimes negative (?!?!)
dsrl32 a2,a2,0 # This clears the upper 32 bits.
# a0 = a[0];
lwu a4,0(a0)
# w0 = ((mp_word)b * a0);
dmultu a2,a4
# if (--a_len) {
addiu a1,a1,-1
beq a1,zero,.M.2
# while (a_len >= 2) {
sltiu t3,a1,2
bne t3,zero,.M.3
# a1 = a[1];
lwu a5,4(a0)
.M.4:
# a_len -= 2;
addiu a1,a1,-2
# c0 = c[0];
lwu a6,0(a3)
# w0 += cy;
mflo t0
daddu t0,t0,t2
# w0 += c0;
daddu t0,t0,a6
# w1 = (mp_word)b * a1;
dmultu a2,a5 #
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# c[0] = ACCUM(w0);
sw t0,0(a3)
# a0 = a[2];
lwu a4,8(a0)
# a += 2;
addiu a0,a0,8
# c1 = c[1];
lwu a7,4(a3)
# w1 += cy;
mflo t1
daddu t1,t1,t2
# w1 += c1;
daddu t1,t1,a7
# w0 = (mp_word)b * a0;
dmultu a2,a4 #
# cy = CARRYOUT(w1);
dsrl32 t2,t1,0
# c[1] = ACCUM(w1);
sw t1,4(a3)
# c += 2;
addiu a3,a3,8
sltiu t3,a1,2
beq t3,zero,.M.4
# a1 = a[1];
lwu a5,4(a0)
# }
.M.3:
# c0 = c[0];
lwu a6,0(a3)
# w0 += cy;
# if (a_len) {
mflo t0
beq a1,zero,.M.5
daddu t0,t0,t2
# w1 = (mp_word)b * a1;
dmultu a2,a5
# w0 += c0;
daddu t0,t0,a6 #
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# c[0] = ACCUM(w0);
sw t0,0(a3)
# c1 = c[1];
lwu a7,4(a3)
# w1 += cy;
mflo t1
daddu t1,t1,t2
# w1 += c1;
daddu t1,t1,a7
# c[1] = ACCUM(w1);
sw t1,4(a3)
# cy = CARRYOUT(w1);
dsrl32 t2,t1,0
# c += 1;
b .M.6
addiu a3,a3,8
# } else {
.M.5:
# w0 += c0;
daddu t0,t0,a6
# c[0] = ACCUM(w0);
sw t0,0(a3)
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
b .M.6
addiu a3,a3,4
# }
# } else {
.M.2:
# c0 = c[0];
lwu a6,0(a3)
# w0 += c0;
mflo t0
daddu t0,t0,a6
# c[0] = ACCUM(w0);
sw t0,0(a3)
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
addiu a3,a3,4
# }
.M.6:
# while (cy) {
beq t2,zero,.M.1
nop
.M.7:
# mp_word w = (mp_word)*c + cy;
lwu a6,0(a3)
daddu t2,t2,a6
# *c++ = ACCUM(w);
sw t2,0(a3)
# cy = CARRYOUT(w);
dsrl32 t2,t2,0
bne t2,zero,.M.7
addiu a3,a3,4
# }
.M.1:
jr ra
nop
#}
#
.end s_mpv_mul_d_add_prop
.ent s_mpv_mul_d
.globl s_mpv_mul_d
s_mpv_mul_d:
#/* c = a * b */
#void s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b,
# mp_digit *c)
#{
# mp_digit a0, a1; regs a4, a5
# mp_digit cy = 0; reg t2
# mp_word w0, w1; regs t0, t1
#
# if (a_len) {
beq a1,zero,.N.1
move t2,zero # cy = 0
dsll32 a2,a2,0 # "b" is sometimes negative (?!?!)
dsrl32 a2,a2,0 # This clears the upper 32 bits.
# a0 = a[0];
lwu a4,0(a0)
# w0 = ((mp_word)b * a0);
dmultu a2,a4
# if (--a_len) {
addiu a1,a1,-1
beq a1,zero,.N.2
# while (a_len >= 2) {
sltiu t3,a1,2
bne t3,zero,.N.3
# a1 = a[1];
lwu a5,4(a0)
.N.4:
# a_len -= 2;
addiu a1,a1,-2
# w0 += cy;
mflo t0
daddu t0,t0,t2
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# w1 = (mp_word)b * a1;
dmultu a2,a5
# c[0] = ACCUM(w0);
sw t0,0(a3)
# a0 = a[2];
lwu a4,8(a0)
# a += 2;
addiu a0,a0,8
# w1 += cy;
mflo t1
daddu t1,t1,t2
# cy = CARRYOUT(w1);
dsrl32 t2,t1,0
# w0 = (mp_word)b * a0;
dmultu a2,a4
# c[1] = ACCUM(w1);
sw t1,4(a3)
# c += 2;
addiu a3,a3,8
sltiu t3,a1,2
beq t3,zero,.N.4
# a1 = a[1];
lwu a5,4(a0)
# }
.N.3:
# w0 += cy;
# if (a_len) {
mflo t0
beq a1,zero,.N.5
daddu t0,t0,t2
# w1 = (mp_word)b * a1;
dmultu a2,a5 #
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# c[0] = ACCUM(w0);
sw t0,0(a3)
# w1 += cy;
mflo t1
daddu t1,t1,t2
# c[1] = ACCUM(w1);
sw t1,4(a3)
# cy = CARRYOUT(w1);
dsrl32 t2,t1,0
# c += 1;
b .N.6
addiu a3,a3,4
# } else {
.N.5:
# c[0] = ACCUM(w0);
sw t0,0(a3)
# cy = CARRYOUT(w0);
b .N.6
dsrl32 t2,t0,0
# }
# } else {
.N.2:
mflo t0
# c[0] = ACCUM(w0);
sw t0,0(a3)
# cy = CARRYOUT(w0);
dsrl32 t2,t0,0
# }
.N.6:
# c[1] = cy;
jr ra
sw t2,4(a3)
# }
.N.1:
jr ra
nop
#}
#
.end s_mpv_mul_d
.ent s_mpv_sqr_add_prop
.globl s_mpv_sqr_add_prop
#void s_mpv_sqr_add_prop(const mp_digit *a, mp_size a_len, mp_digit *sqrs);
# registers
# a0 *a
# a1 a_len
# a2 *sqr
# a3 digit from *a, a_i
# a4 square of digit from a
# a5,a6 next 2 digits in sqr
# a7,t0 carry
s_mpv_sqr_add_prop:
move a7,zero
move t0,zero
lwu a3,0(a0)
addiu a1,a1,-1 # --a_len
dmultu a3,a3
beq a1,zero,.P.3 # jump if we've already done the only sqr
addiu a0,a0,4 # ++a
.P.2:
lwu a5,0(a2)
lwu a6,4(a2)
addiu a2,a2,8 # sqrs += 2;
dsll32 a6,a6,0
daddu a5,a5,a6
lwu a3,0(a0)
addiu a0,a0,4 # ++a
mflo a4
daddu a6,a5,a4
sltu a7,a6,a5 # a7 = a6 < a5 detect overflow
dmultu a3,a3
daddu a4,a6,t0
sltu t0,a4,a6
add t0,t0,a7
sw a4,-8(a2)
addiu a1,a1,-1 # --a_len
dsrl32 a4,a4,0
bne a1,zero,.P.2 # loop if a_len > 0
sw a4,-4(a2)
.P.3:
lwu a5,0(a2)
lwu a6,4(a2)
addiu a2,a2,8 # sqrs += 2;
dsll32 a6,a6,0
daddu a5,a5,a6
mflo a4
daddu a6,a5,a4
sltu a7,a6,a5 # a7 = a6 < a5 detect overflow
daddu a4,a6,t0
sltu t0,a4,a6
add t0,t0,a7
sw a4,-8(a2)
beq t0,zero,.P.9 # jump if no carry
dsrl32 a4,a4,0
.P.8:
sw a4,-4(a2)
/* propagate final carry */
lwu a5,0(a2)
daddu a6,a5,t0
sltu t0,a6,a5
bne t0,zero,.P.8 # loop if carry persists
addiu a2,a2,4 # sqrs++
.P.9:
jr ra
sw a4,-4(a2)
.end s_mpv_sqr_add_prop

View File

@@ -1,361 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mpi_sparc.c,v 1.6 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
/* Multiplication performance enhancements for sparc v8+vis CPUs. */
#include "mpi-priv.h"
#include <stddef.h>
#include <sys/systeminfo.h>
#include <strings.h>
/* In the functions below, */
/* vector y must be 8-byte aligned, and n must be even */
/* returns carry out of high order word of result */
/* maximum n is 256 */
/* vector x += vector y * scaler a; where y is of length n words. */
extern mp_digit mul_add_inp(mp_digit *x, const mp_digit *y, int n, mp_digit a);
/* vector z = vector x + vector y * scaler a; where y is of length n words. */
extern mp_digit mul_add(mp_digit *z, const mp_digit *x, const mp_digit *y,
int n, mp_digit a);
/* v8 versions of these functions run on any Sparc v8 CPU. */
/* This trick works on Sparc V8 CPUs with the Workshop compilers. */
#define MP_MUL_DxD(a, b, Phi, Plo) \
{ unsigned long long product = (unsigned long long)a * b; \
Plo = (mp_digit)product; \
Phi = (mp_digit)(product >> MP_DIGIT_BIT); }
/* c = a * b */
static void
v8_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
#if !defined(MP_NO_MP_WORD)
mp_digit d = 0;
/* Inner product: Digits of a */
while (a_len--) {
mp_word w = ((mp_word)b * *a++) + d;
*c++ = ACCUM(w);
d = CARRYOUT(w);
}
*c = d;
#else
mp_digit carry = 0;
while (a_len--) {
mp_digit a_i = *a++;
mp_digit a0b0, a1b1;
MP_MUL_DxD(a_i, b, a1b1, a0b0);
a0b0 += carry;
if (a0b0 < carry)
++a1b1;
*c++ = a0b0;
carry = a1b1;
}
*c = carry;
#endif
}
/* c += a * b */
static void
v8_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
#if !defined(MP_NO_MP_WORD)
mp_digit d = 0;
/* Inner product: Digits of a */
while (a_len--) {
mp_word w = ((mp_word)b * *a++) + *c + d;
*c++ = ACCUM(w);
d = CARRYOUT(w);
}
*c = d;
#else
mp_digit carry = 0;
while (a_len--) {
mp_digit a_i = *a++;
mp_digit a0b0, a1b1;
MP_MUL_DxD(a_i, b, a1b1, a0b0);
a0b0 += carry;
if (a0b0 < carry)
++a1b1;
a0b0 += a_i = *c;
if (a0b0 < a_i)
++a1b1;
*c++ = a0b0;
carry = a1b1;
}
*c = carry;
#endif
}
/* Presently, this is only used by the Montgomery arithmetic code. */
/* c += a * b */
static void
v8_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
#if !defined(MP_NO_MP_WORD)
mp_digit d = 0;
/* Inner product: Digits of a */
while (a_len--) {
mp_word w = ((mp_word)b * *a++) + *c + d;
*c++ = ACCUM(w);
d = CARRYOUT(w);
}
while (d) {
mp_word w = (mp_word)*c + d;
*c++ = ACCUM(w);
d = CARRYOUT(w);
}
#else
mp_digit carry = 0;
while (a_len--) {
mp_digit a_i = *a++;
mp_digit a0b0, a1b1;
MP_MUL_DxD(a_i, b, a1b1, a0b0);
a0b0 += carry;
if (a0b0 < carry)
++a1b1;
a0b0 += a_i = *c;
if (a0b0 < a_i)
++a1b1;
*c++ = a0b0;
carry = a1b1;
}
while (carry) {
mp_digit c_i = *c;
carry += c_i;
*c++ = carry;
carry = carry < c_i;
}
#endif
}
/* vis versions of these functions run only on v8+vis or v9+vis CPUs. */
/* c = a * b */
static void
vis_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
mp_digit d;
mp_digit x[258];
if (a_len <= 256) {
if (a == c || ((ptrdiff_t)a & 0x7) != 0 || (a_len & 1) != 0) {
mp_digit * px;
px = (((ptrdiff_t)x & 0x7) != 0) ? x + 1 : x;
memcpy(px, a, a_len * sizeof(*a));
a = px;
if (a_len & 1) {
px[a_len] = 0;
}
}
s_mp_setz(c, a_len + 1);
d = mul_add_inp(c, a, a_len, b);
c[a_len] = d;
} else {
v8_mpv_mul_d(a, a_len, b, c);
}
}
/* c += a * b, where a is a_len words long. */
static void
vis_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
mp_digit d;
mp_digit x[258];
if (a_len <= 256) {
if (((ptrdiff_t)a & 0x7) != 0 || (a_len & 1) != 0) {
mp_digit * px;
px = (((ptrdiff_t)x & 0x7) != 0) ? x + 1 : x;
memcpy(px, a, a_len * sizeof(*a));
a = px;
if (a_len & 1) {
px[a_len] = 0;
}
}
d = mul_add_inp(c, a, a_len, b);
c[a_len] = d;
} else {
v8_mpv_mul_d_add(a, a_len, b, c);
}
}
/* c += a * b, where a is y words long. */
static void
vis_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b,
mp_digit *c)
{
mp_digit d;
mp_digit x[258];
if (a_len <= 256) {
if (((ptrdiff_t)a & 0x7) != 0 || (a_len & 1) != 0) {
mp_digit * px;
px = (((ptrdiff_t)x & 0x7) != 0) ? x + 1 : x;
memcpy(px, a, a_len * sizeof(*a));
a = px;
if (a_len & 1) {
px[a_len] = 0;
}
}
d = mul_add_inp(c, a, a_len, b);
if (d) {
c += a_len;
do {
mp_digit sum = d + *c;
*c++ = sum;
d = sum < d;
} while (d);
}
} else {
v8_mpv_mul_d_add_prop(a, a_len, b, c);
}
}
#if defined(SOLARIS2_5)
static int
isSparcV8PlusVis(void)
{
long buflen;
int rv = 0; /* false */
char buf[256];
buflen = sysinfo(SI_MACHINE, buf, sizeof buf);
if (buflen > 0) {
rv = (!strcmp(buf, "sun4u") || !strcmp(buf, "sun4u1"));
}
return rv;
}
#else /* SunOS2.6or higher has SI_ISALIST */
static int
isSparcV8PlusVis(void)
{
long buflen;
int rv = 0; /* false */
char buf[256];
buflen = sysinfo(SI_ISALIST, buf, sizeof buf);
if (buflen > 0) {
#if defined(MP_USE_LONG_DIGIT)
char * found = strstr(buf, "sparcv9+vis");
#else
char * found = strstr(buf, "sparcv8plus+vis");
#endif
rv = (found != 0);
}
return rv;
}
#endif
typedef void MPVmpy(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c);
/* forward static function declarations */
static MPVmpy sp_mpv_mul_d;
static MPVmpy sp_mpv_mul_d_add;
static MPVmpy sp_mpv_mul_d_add_prop;
static MPVmpy *p_mpv_mul_d = &sp_mpv_mul_d;
static MPVmpy *p_mpv_mul_d_add = &sp_mpv_mul_d_add;
static MPVmpy *p_mpv_mul_d_add_prop = &sp_mpv_mul_d_add_prop;
static void
initPtrs(void)
{
if (isSparcV8PlusVis()) {
p_mpv_mul_d = &vis_mpv_mul_d;
p_mpv_mul_d_add = &vis_mpv_mul_d_add;
p_mpv_mul_d_add_prop = &vis_mpv_mul_d_add_prop;
} else {
p_mpv_mul_d = &v8_mpv_mul_d;
p_mpv_mul_d_add = &v8_mpv_mul_d_add;
p_mpv_mul_d_add_prop = &v8_mpv_mul_d_add_prop;
}
}
static void
sp_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
initPtrs();
(* p_mpv_mul_d)(a, a_len, b, c);
}
static void
sp_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
initPtrs();
(* p_mpv_mul_d_add)(a, a_len, b, c);
}
static void
sp_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
initPtrs();
(* p_mpv_mul_d_add_prop)(a, a_len, b, c);
}
/* This is the external interface */
void
s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
(* p_mpv_mul_d)(a, a_len, b, c);
}
void
s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
(* p_mpv_mul_d_add)(a, a_len, b, c);
}
void
s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
{
(* p_mpv_mul_d_add_prop)(a, a_len, b, c);
}

View File

@@ -1,356 +0,0 @@
;
; mpi_x86.asm - assembly language implementation of s_mpv_ functions.
;
; ***** BEGIN LICENSE BLOCK *****
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
;
; The contents of this file are subject to the Mozilla Public License Version
; 1.1 (the "License"); you may not use this file except in compliance with
; the License. You may obtain a copy of the License at
; http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
; for the specific language governing rights and limitations under the
; License.
;
; The Original Code is the Netscape security libraries.
;
; The Initial Developer of the Original Code is
; Netscape Communications Corporation.
; Portions created by the Initial Developer are Copyright (C) 2000
; the Initial Developer. All Rights Reserved.
;
; Contributor(s):
;
; Alternatively, the contents of this file may be used under the terms of
; either the GNU General Public License Version 2 or later (the "GPL"), or
; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
; in which case the provisions of the GPL or the LGPL are applicable instead
; of those above. If you wish to allow use of your version of this file only
; under the terms of either the GPL or the LGPL, and not to allow others to
; use your version of this file under the terms of the MPL, indicate your
; decision by deleting the provisions above and replace them with the notice
; and other provisions required by the GPL or the LGPL. If you do not delete
; the provisions above, a recipient may use your version of this file under
; the terms of any one of the MPL, the GPL or the LGPL.
;
; ***** END LICENSE BLOCK *****
; $Id: mpi_x86.asm,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $
.386p
.MODEL FLAT
ASSUME CS: FLAT, DS: FLAT, SS: FLAT
_TEXT SEGMENT
; ebp - 36: caller's esi
; ebp - 32: caller's edi
; ebp - 28:
; ebp - 24:
; ebp - 20:
; ebp - 16:
; ebp - 12:
; ebp - 8:
; ebp - 4:
; ebp + 0: caller's ebp
; ebp + 4: return address
; ebp + 8: a argument
; ebp + 12: a_len argument
; ebp + 16: b argument
; ebp + 20: c argument
; registers:
; eax:
; ebx: carry
; ecx: a_len
; edx:
; esi: a ptr
; edi: c ptr
public _s_mpv_mul_d
_s_mpv_mul_d PROC NEAR
push ebp
mov ebp,esp
sub esp,28
push edi
push esi
push ebx
mov ebx,0 ; carry = 0
mov ecx,[ebp+12] ; ecx = a_len
mov edi,[ebp+20]
cmp ecx,0
je L_2 ; jmp if a_len == 0
mov esi,[ebp+8] ; esi = a
cld
L_1:
lodsd ; eax = [ds:esi]; esi += 4
mov edx,[ebp+16] ; edx = b
mul edx ; edx:eax = Phi:Plo = a_i * b
add eax,ebx ; add carry (ebx) to edx:eax
adc edx,0
mov ebx,edx ; high half of product becomes next carry
stosd ; [es:edi] = ax; edi += 4;
dec ecx ; --a_len
jnz L_1 ; jmp if a_len != 0
L_2:
mov [edi],ebx ; *c = carry
pop ebx
pop esi
pop edi
leave
ret
nop
_s_mpv_mul_d ENDP
; ebp - 36: caller's esi
; ebp - 32: caller's edi
; ebp - 28:
; ebp - 24:
; ebp - 20:
; ebp - 16:
; ebp - 12:
; ebp - 8:
; ebp - 4:
; ebp + 0: caller's ebp
; ebp + 4: return address
; ebp + 8: a argument
; ebp + 12: a_len argument
; ebp + 16: b argument
; ebp + 20: c argument
; registers:
; eax:
; ebx: carry
; ecx: a_len
; edx:
; esi: a ptr
; edi: c ptr
public _s_mpv_mul_d_add
_s_mpv_mul_d_add PROC NEAR
push ebp
mov ebp,esp
sub esp,28
push edi
push esi
push ebx
mov ebx,0 ; carry = 0
mov ecx,[ebp+12] ; ecx = a_len
mov edi,[ebp+20]
cmp ecx,0
je L_4 ; jmp if a_len == 0
mov esi,[ebp+8] ; esi = a
cld
L_3:
lodsd ; eax = [ds:esi]; esi += 4
mov edx,[ebp+16] ; edx = b
mul edx ; edx:eax = Phi:Plo = a_i * b
add eax,ebx ; add carry (ebx) to edx:eax
adc edx,0
mov ebx,[edi] ; add in current word from *c
add eax,ebx
adc edx,0
mov ebx,edx ; high half of product becomes next carry
stosd ; [es:edi] = ax; edi += 4;
dec ecx ; --a_len
jnz L_3 ; jmp if a_len != 0
L_4:
mov [edi],ebx ; *c = carry
pop ebx
pop esi
pop edi
leave
ret
nop
_s_mpv_mul_d_add ENDP
; ebp - 36: caller's esi
; ebp - 32: caller's edi
; ebp - 28:
; ebp - 24:
; ebp - 20:
; ebp - 16:
; ebp - 12:
; ebp - 8:
; ebp - 4:
; ebp + 0: caller's ebp
; ebp + 4: return address
; ebp + 8: a argument
; ebp + 12: a_len argument
; ebp + 16: b argument
; ebp + 20: c argument
; registers:
; eax:
; ebx: carry
; ecx: a_len
; edx:
; esi: a ptr
; edi: c ptr
public _s_mpv_mul_d_add_prop
_s_mpv_mul_d_add_prop PROC NEAR
push ebp
mov ebp,esp
sub esp,28
push edi
push esi
push ebx
mov ebx,0 ; carry = 0
mov ecx,[ebp+12] ; ecx = a_len
mov edi,[ebp+20]
cmp ecx,0
je L_6 ; jmp if a_len == 0
cld
mov esi,[ebp+8] ; esi = a
L_5:
lodsd ; eax = [ds:esi]; esi += 4
mov edx,[ebp+16] ; edx = b
mul edx ; edx:eax = Phi:Plo = a_i * b
add eax,ebx ; add carry (ebx) to edx:eax
adc edx,0
mov ebx,[edi] ; add in current word from *c
add eax,ebx
adc edx,0
mov ebx,edx ; high half of product becomes next carry
stosd ; [es:edi] = ax; edi += 4;
dec ecx ; --a_len
jnz L_5 ; jmp if a_len != 0
L_6:
cmp ebx,0 ; is carry zero?
jz L_8
mov eax,[edi] ; add in current word from *c
add eax,ebx
stosd ; [es:edi] = ax; edi += 4;
jnc L_8
L_7:
mov eax,[edi] ; add in current word from *c
adc eax,0
stosd ; [es:edi] = ax; edi += 4;
jc L_7
L_8:
pop ebx
pop esi
pop edi
leave
ret
nop
_s_mpv_mul_d_add_prop ENDP
; ebp - 20: caller's esi
; ebp - 16: caller's edi
; ebp - 12:
; ebp - 8: carry
; ebp - 4: a_len local
; ebp + 0: caller's ebp
; ebp + 4: return address
; ebp + 8: pa argument
; ebp + 12: a_len argument
; ebp + 16: ps argument
; ebp + 20:
; registers:
; eax:
; ebx: carry
; ecx: a_len
; edx:
; esi: a ptr
; edi: c ptr
public _s_mpv_sqr_add_prop
_s_mpv_sqr_add_prop PROC NEAR
push ebp
mov ebp,esp
sub esp,12
push edi
push esi
push ebx
mov ebx,0 ; carry = 0
mov ecx,[ebp+12] ; a_len
mov edi,[ebp+16] ; edi = ps
cmp ecx,0
je L_11 ; jump if a_len == 0
cld
mov esi,[ebp+8] ; esi = pa
L_10:
lodsd ; eax = [ds:si]; si += 4;
mul eax
add eax,ebx ; add "carry"
adc edx,0
mov ebx,[edi]
add eax,ebx ; add low word from result
mov ebx,[edi+4]
stosd ; [es:di] = eax; di += 4;
adc edx,ebx ; add high word from result
mov ebx,0
mov eax,edx
adc ebx,0
stosd ; [es:di] = eax; di += 4;
dec ecx ; --a_len
jnz L_10 ; jmp if a_len != 0
L_11:
cmp ebx,0 ; is carry zero?
jz L_14
mov eax,[edi] ; add in current word from *c
add eax,ebx
stosd ; [es:edi] = ax; edi += 4;
jnc L_14
L_12:
mov eax,[edi] ; add in current word from *c
adc eax,0
stosd ; [es:edi] = ax; edi += 4;
jc L_12
L_14:
pop ebx
pop esi
pop edi
leave
ret
nop
_s_mpv_sqr_add_prop ENDP
;
; Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized
; so its high bit is 1. This code is from NSPR.
;
; mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor,
; mp_digit *qp, mp_digit *rp)
; Dump of assembler code for function s_mpv_div_2dx1d:
;
; esp + 0: Caller's ebx
; esp + 4: return address
; esp + 8: Nhi argument
; esp + 12: Nlo argument
; esp + 16: divisor argument
; esp + 20: qp argument
; esp + 24: rp argument
; registers:
; eax:
; ebx: carry
; ecx: a_len
; edx:
; esi: a ptr
; edi: c ptr
;
public _s_mpv_div_2dx1d
_s_mpv_div_2dx1d PROC NEAR
push ebx
mov edx,[esp+8]
mov eax,[esp+12]
mov ebx,[esp+16]
div ebx
mov ebx,[esp+20]
mov [ebx],eax
mov ebx,[esp+24]
mov [ebx],edx
xor eax,eax ; return zero
pop ebx
ret
nop
_s_mpv_div_2dx1d ENDP
_TEXT ENDS
END

View File

@@ -1,345 +0,0 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. If you wish to allow use of your
# version of this file only under the terms of the GPL and not to
# allow others to use your version of this file under the MPL,
# indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by
# the GPL. If you do not delete the provisions above, a recipient
# may use your version of this file under either the MPL or the
# GPL.
# $Id: mpi_x86.s,v 1.4 2003-10-24 04:47:23 wchang0222%aol.com Exp $
#
.text
# ebp - 36: caller's esi
# ebp - 32: caller's edi
# ebp - 28:
# ebp - 24:
# ebp - 20:
# ebp - 16:
# ebp - 12:
# ebp - 8:
# ebp - 4:
# ebp + 0: caller's ebp
# ebp + 4: return address
# ebp + 8: a argument
# ebp + 12: a_len argument
# ebp + 16: b argument
# ebp + 20: c argument
# registers:
# eax:
# ebx: carry
# ecx: a_len
# edx:
# esi: a ptr
# edi: c ptr
.globl s_mpv_mul_d
.type s_mpv_mul_d,@function
s_mpv_mul_d:
push %ebp
mov %esp,%ebp
sub $28,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx # carry = 0
mov 12(%ebp),%ecx # ecx = a_len
mov 20(%ebp),%edi
cmp $0,%ecx
je 2f # jmp if a_len == 0
mov 8(%ebp),%esi # esi = a
cld
1:
lodsl # eax = [ds:esi]; esi += 4
mov 16(%ebp),%edx # edx = b
mull %edx # edx:eax = Phi:Plo = a_i * b
add %ebx,%eax # add carry (%ebx) to edx:eax
adc $0,%edx
mov %edx,%ebx # high half of product becomes next carry
stosl # [es:edi] = ax; edi += 4;
dec %ecx # --a_len
jnz 1b # jmp if a_len != 0
2:
mov %ebx,0(%edi) # *c = carry
pop %ebx
pop %esi
pop %edi
leave
ret
nop
# ebp - 36: caller's esi
# ebp - 32: caller's edi
# ebp - 28:
# ebp - 24:
# ebp - 20:
# ebp - 16:
# ebp - 12:
# ebp - 8:
# ebp - 4:
# ebp + 0: caller's ebp
# ebp + 4: return address
# ebp + 8: a argument
# ebp + 12: a_len argument
# ebp + 16: b argument
# ebp + 20: c argument
# registers:
# eax:
# ebx: carry
# ecx: a_len
# edx:
# esi: a ptr
# edi: c ptr
.globl s_mpv_mul_d_add
.type s_mpv_mul_d_add,@function
s_mpv_mul_d_add:
push %ebp
mov %esp,%ebp
sub $28,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx # carry = 0
mov 12(%ebp),%ecx # ecx = a_len
mov 20(%ebp),%edi
cmp $0,%ecx
je 4f # jmp if a_len == 0
mov 8(%ebp),%esi # esi = a
cld
3:
lodsl # eax = [ds:esi]; esi += 4
mov 16(%ebp),%edx # edx = b
mull %edx # edx:eax = Phi:Plo = a_i * b
add %ebx,%eax # add carry (%ebx) to edx:eax
adc $0,%edx
mov 0(%edi),%ebx # add in current word from *c
add %ebx,%eax
adc $0,%edx
mov %edx,%ebx # high half of product becomes next carry
stosl # [es:edi] = ax; edi += 4;
dec %ecx # --a_len
jnz 3b # jmp if a_len != 0
4:
mov %ebx,0(%edi) # *c = carry
pop %ebx
pop %esi
pop %edi
leave
ret
nop
# ebp - 36: caller's esi
# ebp - 32: caller's edi
# ebp - 28:
# ebp - 24:
# ebp - 20:
# ebp - 16:
# ebp - 12:
# ebp - 8:
# ebp - 4:
# ebp + 0: caller's ebp
# ebp + 4: return address
# ebp + 8: a argument
# ebp + 12: a_len argument
# ebp + 16: b argument
# ebp + 20: c argument
# registers:
# eax:
# ebx: carry
# ecx: a_len
# edx:
# esi: a ptr
# edi: c ptr
.globl s_mpv_mul_d_add_prop
.type s_mpv_mul_d_add_prop,@function
s_mpv_mul_d_add_prop:
push %ebp
mov %esp,%ebp
sub $28,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx # carry = 0
mov 12(%ebp),%ecx # ecx = a_len
mov 20(%ebp),%edi
cmp $0,%ecx
je 6f # jmp if a_len == 0
cld
mov 8(%ebp),%esi # esi = a
5:
lodsl # eax = [ds:esi]; esi += 4
mov 16(%ebp),%edx # edx = b
mull %edx # edx:eax = Phi:Plo = a_i * b
add %ebx,%eax # add carry (%ebx) to edx:eax
adc $0,%edx
mov 0(%edi),%ebx # add in current word from *c
add %ebx,%eax
adc $0,%edx
mov %edx,%ebx # high half of product becomes next carry
stosl # [es:edi] = ax; edi += 4;
dec %ecx # --a_len
jnz 5b # jmp if a_len != 0
6:
cmp $0,%ebx # is carry zero?
jz 8f
mov 0(%edi),%eax # add in current word from *c
add %ebx,%eax
stosl # [es:edi] = ax; edi += 4;
jnc 8f
7:
mov 0(%edi),%eax # add in current word from *c
adc $0,%eax
stosl # [es:edi] = ax; edi += 4;
jc 7b
8:
pop %ebx
pop %esi
pop %edi
leave
ret
nop
# ebp - 20: caller's esi
# ebp - 16: caller's edi
# ebp - 12:
# ebp - 8: carry
# ebp - 4: a_len local
# ebp + 0: caller's ebp
# ebp + 4: return address
# ebp + 8: pa argument
# ebp + 12: a_len argument
# ebp + 16: ps argument
# ebp + 20:
# registers:
# eax:
# ebx: carry
# ecx: a_len
# edx:
# esi: a ptr
# edi: c ptr
.globl s_mpv_sqr_add_prop
.type s_mpv_sqr_add_prop,@function
s_mpv_sqr_add_prop:
push %ebp
mov %esp,%ebp
sub $12,%esp
push %edi
push %esi
push %ebx
movl $0,%ebx # carry = 0
mov 12(%ebp),%ecx # a_len
mov 16(%ebp),%edi # edi = ps
cmp $0,%ecx
je 11f # jump if a_len == 0
cld
mov 8(%ebp),%esi # esi = pa
10:
lodsl # %eax = [ds:si]; si += 4;
mull %eax
add %ebx,%eax # add "carry"
adc $0,%edx
mov 0(%edi),%ebx
add %ebx,%eax # add low word from result
mov 4(%edi),%ebx
stosl # [es:di] = %eax; di += 4;
adc %ebx,%edx # add high word from result
movl $0,%ebx
mov %edx,%eax
adc $0,%ebx
stosl # [es:di] = %eax; di += 4;
dec %ecx # --a_len
jnz 10b # jmp if a_len != 0
11:
cmp $0,%ebx # is carry zero?
jz 14f
mov 0(%edi),%eax # add in current word from *c
add %ebx,%eax
stosl # [es:edi] = ax; edi += 4;
jnc 14f
12:
mov 0(%edi),%eax # add in current word from *c
adc $0,%eax
stosl # [es:edi] = ax; edi += 4;
jc 12b
14:
pop %ebx
pop %esi
pop %edi
leave
ret
nop
#
# Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized
# so its high bit is 1. This code is from NSPR.
#
# mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor,
# mp_digit *qp, mp_digit *rp)
# esp + 0: Caller's ebx
# esp + 4: return address
# esp + 8: Nhi argument
# esp + 12: Nlo argument
# esp + 16: divisor argument
# esp + 20: qp argument
# esp + 24: rp argument
# registers:
# eax:
# ebx: carry
# ecx: a_len
# edx:
# esi: a ptr
# edi: c ptr
#
.globl s_mpv_div_2dx1d
.type s_mpv_div_2dx1d,@function
s_mpv_div_2dx1d:
push %ebx
mov 8(%esp),%edx
mov 12(%esp),%eax
mov 16(%esp),%ebx
div %ebx
mov 20(%esp),%ebx
mov %eax,0(%ebx)
mov 24(%esp),%ebx
mov %edx,0(%ebx)
xor %eax,%eax # return zero
pop %ebx
ret
nop
# Magic indicating no need for an executable stack
.section .note.GNU-stack, "", @progbits
.previous

View File

@@ -1,465 +0,0 @@
/*
* mplogic.c
*
* Bitwise logical operations on MPI values
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mplogic.c,v 1.15 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
#include "mpi-priv.h"
#include "mplogic.h"
/* {{{ Lookup table for population count */
static unsigned char bitc[] = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
};
/* }}} */
/*------------------------------------------------------------------------*/
/*
mpl_not(a, b) - compute b = ~a
mpl_and(a, b, c) - compute c = a & b
mpl_or(a, b, c) - compute c = a | b
mpl_xor(a, b, c) - compute c = a ^ b
*/
/* {{{ mpl_not(a, b) */
mp_err mpl_not(mp_int *a, mp_int *b)
{
mp_err res;
unsigned int ix;
ARGCHK(a != NULL && b != NULL, MP_BADARG);
if((res = mp_copy(a, b)) != MP_OKAY)
return res;
/* This relies on the fact that the digit type is unsigned */
for(ix = 0; ix < USED(b); ix++)
DIGIT(b, ix) = ~DIGIT(b, ix);
s_mp_clamp(b);
return MP_OKAY;
} /* end mpl_not() */
/* }}} */
/* {{{ mpl_and(a, b, c) */
mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c)
{
mp_int *which, *other;
mp_err res;
unsigned int ix;
ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
if(USED(a) <= USED(b)) {
which = a;
other = b;
} else {
which = b;
other = a;
}
if((res = mp_copy(which, c)) != MP_OKAY)
return res;
for(ix = 0; ix < USED(which); ix++)
DIGIT(c, ix) &= DIGIT(other, ix);
s_mp_clamp(c);
return MP_OKAY;
} /* end mpl_and() */
/* }}} */
/* {{{ mpl_or(a, b, c) */
mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c)
{
mp_int *which, *other;
mp_err res;
unsigned int ix;
ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
if(USED(a) >= USED(b)) {
which = a;
other = b;
} else {
which = b;
other = a;
}
if((res = mp_copy(which, c)) != MP_OKAY)
return res;
for(ix = 0; ix < USED(which); ix++)
DIGIT(c, ix) |= DIGIT(other, ix);
return MP_OKAY;
} /* end mpl_or() */
/* }}} */
/* {{{ mpl_xor(a, b, c) */
mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c)
{
mp_int *which, *other;
mp_err res;
unsigned int ix;
ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
if(USED(a) >= USED(b)) {
which = a;
other = b;
} else {
which = b;
other = a;
}
if((res = mp_copy(which, c)) != MP_OKAY)
return res;
for(ix = 0; ix < USED(which); ix++)
DIGIT(c, ix) ^= DIGIT(other, ix);
s_mp_clamp(c);
return MP_OKAY;
} /* end mpl_xor() */
/* }}} */
/*------------------------------------------------------------------------*/
/*
mpl_rsh(a, b, d) - b = a >> d
mpl_lsh(a, b, d) - b = a << d
*/
/* {{{ mpl_rsh(a, b, d) */
mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d)
{
mp_err res;
ARGCHK(a != NULL && b != NULL, MP_BADARG);
if((res = mp_copy(a, b)) != MP_OKAY)
return res;
s_mp_div_2d(b, d);
return MP_OKAY;
} /* end mpl_rsh() */
/* }}} */
/* {{{ mpl_lsh(a, b, d) */
mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d)
{
mp_err res;
ARGCHK(a != NULL && b != NULL, MP_BADARG);
if((res = mp_copy(a, b)) != MP_OKAY)
return res;
return s_mp_mul_2d(b, d);
} /* end mpl_lsh() */
/* }}} */
/*------------------------------------------------------------------------*/
/*
mpl_num_set(a, num)
Count the number of set bits in the binary representation of a.
Returns MP_OKAY and sets 'num' to be the number of such bits, if
possible. If num is NULL, the result is thrown away, but it is
not considered an error.
mpl_num_clear() does basically the same thing for clear bits.
*/
/* {{{ mpl_num_set(a, num) */
mp_err mpl_num_set(mp_int *a, int *num)
{
unsigned int ix;
int db, nset = 0;
mp_digit cur;
unsigned char reg;
ARGCHK(a != NULL, MP_BADARG);
for(ix = 0; ix < USED(a); ix++) {
cur = DIGIT(a, ix);
for(db = 0; db < sizeof(mp_digit); db++) {
reg = (unsigned char)(cur >> (CHAR_BIT * db));
nset += bitc[reg];
}
}
if(num)
*num = nset;
return MP_OKAY;
} /* end mpl_num_set() */
/* }}} */
/* {{{ mpl_num_clear(a, num) */
mp_err mpl_num_clear(mp_int *a, int *num)
{
unsigned int ix;
int db, nset = 0;
mp_digit cur;
unsigned char reg;
ARGCHK(a != NULL, MP_BADARG);
for(ix = 0; ix < USED(a); ix++) {
cur = DIGIT(a, ix);
for(db = 0; db < sizeof(mp_digit); db++) {
reg = (unsigned char)(cur >> (CHAR_BIT * db));
nset += bitc[UCHAR_MAX - reg];
}
}
if(num)
*num = nset;
return MP_OKAY;
} /* end mpl_num_clear() */
/* }}} */
/*------------------------------------------------------------------------*/
/*
mpl_parity(a)
Determines the bitwise parity of the value given. Returns MP_EVEN
if an even number of digits are set, MP_ODD if an odd number are
set.
*/
/* {{{ mpl_parity(a) */
mp_err mpl_parity(mp_int *a)
{
unsigned int ix;
int par = 0;
mp_digit cur;
ARGCHK(a != NULL, MP_BADARG);
for(ix = 0; ix < USED(a); ix++) {
int shft = (sizeof(mp_digit) * CHAR_BIT) / 2;
cur = DIGIT(a, ix);
/* Compute parity for current digit */
while(shft != 0) {
cur ^= (cur >> shft);
shft >>= 1;
}
cur &= 1;
/* XOR with running parity so far */
par ^= cur;
}
if(par)
return MP_ODD;
else
return MP_EVEN;
} /* end mpl_parity() */
/* }}} */
/*
mpl_set_bit
Returns MP_OKAY or some error code.
Grows a if needed to set a bit to 1.
*/
mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value)
{
mp_size ix;
mp_err rv;
mp_digit mask;
ARGCHK(a != NULL, MP_BADARG);
ix = bitNum / MP_DIGIT_BIT;
if (ix + 1 > MP_USED(a)) {
rv = s_mp_pad(a, ix + 1);
if (rv != MP_OKAY)
return rv;
}
bitNum = bitNum % MP_DIGIT_BIT;
mask = (mp_digit)1 << bitNum;
if (value)
MP_DIGIT(a,ix) |= mask;
else
MP_DIGIT(a,ix) &= ~mask;
s_mp_clamp(a);
return MP_OKAY;
}
/*
mpl_get_bit
returns 0 or 1 or some (negative) error code.
*/
mp_err mpl_get_bit(const mp_int *a, mp_size bitNum)
{
mp_size bit, ix;
mp_err rv;
ARGCHK(a != NULL, MP_BADARG);
ix = bitNum / MP_DIGIT_BIT;
ARGCHK(ix <= MP_USED(a) - 1, MP_RANGE);
bit = bitNum % MP_DIGIT_BIT;
rv = (mp_err)(MP_DIGIT(a, ix) >> bit) & 1;
return rv;
}
/*
mpl_get_bits
- Extracts numBits bits from a, where the least significant extracted bit
is bit lsbNum. Returns a negative value if error occurs.
- Because sign bit is used to indicate error, maximum number of bits to
be returned is the lesser of (a) the number of bits in an mp_digit, or
(b) one less than the number of bits in an mp_err.
- lsbNum + numbits can be greater than the number of significant bits in
integer a, as long as bit lsbNum is in the high order digit of a.
*/
mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits)
{
mp_size rshift = (lsbNum % MP_DIGIT_BIT);
mp_size lsWndx = (lsbNum / MP_DIGIT_BIT);
mp_digit * digit = MP_DIGITS(a) + lsWndx;
mp_digit mask = ((1 << numBits) - 1);
ARGCHK(numBits < CHAR_BIT * sizeof mask, MP_BADARG);
ARGCHK(MP_HOWMANY(lsbNum, MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE);
if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) ||
(lsWndx + 1 >= MP_USED(a))) {
mask &= (digit[0] >> rshift);
} else {
mask &= ((digit[0] >> rshift) | (digit[1] << (MP_DIGIT_BIT - rshift)));
}
return (mp_err)mask;
}
/*
mpl_significant_bits
returns number of significnant bits in abs(a).
returns 1 if value is zero.
*/
mp_err mpl_significant_bits(const mp_int *a)
{
mp_err bits = 0;
int ix;
ARGCHK(a != NULL, MP_BADARG);
ix = MP_USED(a);
for (ix = MP_USED(a); ix > 0; ) {
mp_digit d;
d = MP_DIGIT(a, --ix);
if (d) {
while (d) {
++bits;
d >>= 1;
}
break;
}
}
bits += ix * MP_DIGIT_BIT;
if (!bits)
bits = 1;
return bits;
}
/*------------------------------------------------------------------------*/
/* HERE THERE BE DRAGONS */

View File

@@ -1,85 +0,0 @@
/*
* mplogic.h
*
* Bitwise logical operations on MPI values
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mplogic.h,v 1.7 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
#ifndef _H_MPLOGIC_
#define _H_MPLOGIC_
#include "mpi.h"
/*
The logical operations treat an mp_int as if it were a bit vector,
without regard to its sign (an mp_int is represented in a signed
magnitude format). Values are treated as if they had an infinite
string of zeros left of the most-significant bit.
*/
/* Parity results */
#define MP_EVEN MP_YES
#define MP_ODD MP_NO
/* Bitwise functions */
mp_err mpl_not(mp_int *a, mp_int *b); /* one's complement */
mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND */
mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c); /* bitwise OR */
mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR */
/* Shift functions */
mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d); /* right shift */
mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d); /* left shift */
/* Bit count and parity */
mp_err mpl_num_set(mp_int *a, int *num); /* count set bits */
mp_err mpl_num_clear(mp_int *a, int *num); /* count clear bits */
mp_err mpl_parity(mp_int *a); /* determine parity */
/* Get & Set the value of a bit */
mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value);
mp_err mpl_get_bit(const mp_int *a, mp_size bitNum);
mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits);
mp_err mpl_significant_bits(const mp_int *a);
#endif /* end _H_MPLOGIC_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,626 +0,0 @@
/*
* mpprime.c
*
* Utilities for finding and working with prime and pseudo-prime
* integers
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1997
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape Communications Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "mpi-priv.h"
#include "mpprime.h"
#include "mplogic.h"
#include <stdlib.h>
#include <string.h>
#define SMALL_TABLE 0 /* determines size of hard-wired prime table */
#define RANDOM() rand()
#include "primes.c" /* pull in the prime digit table */
/*
Test if any of a given vector of digits divides a. If not, MP_NO
is returned; otherwise, MP_YES is returned and 'which' is set to
the index of the integer in the vector which divided a.
*/
mp_err s_mpp_divp(mp_int *a, const mp_digit *vec, int size, int *which);
/* {{{ mpp_divis(a, b) */
/*
mpp_divis(a, b)
Returns MP_YES if a is divisible by b, or MP_NO if it is not.
*/
mp_err mpp_divis(mp_int *a, mp_int *b)
{
mp_err res;
mp_int rem;
if((res = mp_init(&rem)) != MP_OKAY)
return res;
if((res = mp_mod(a, b, &rem)) != MP_OKAY)
goto CLEANUP;
if(mp_cmp_z(&rem) == 0)
res = MP_YES;
else
res = MP_NO;
CLEANUP:
mp_clear(&rem);
return res;
} /* end mpp_divis() */
/* }}} */
/* {{{ mpp_divis_d(a, d) */
/*
mpp_divis_d(a, d)
Return MP_YES if a is divisible by d, or MP_NO if it is not.
*/
mp_err mpp_divis_d(mp_int *a, mp_digit d)
{
mp_err res;
mp_digit rem;
ARGCHK(a != NULL, MP_BADARG);
if(d == 0)
return MP_NO;
if((res = mp_mod_d(a, d, &rem)) != MP_OKAY)
return res;
if(rem == 0)
return MP_YES;
else
return MP_NO;
} /* end mpp_divis_d() */
/* }}} */
/* {{{ mpp_random(a) */
/*
mpp_random(a)
Assigns a random value to a. This value is generated using the
standard C library's rand() function, so it should not be used for
cryptographic purposes, but it should be fine for primality testing,
since all we really care about there is good statistical properties.
As many digits as a currently has are filled with random digits.
*/
mp_err mpp_random(mp_int *a)
{
mp_digit next = 0;
unsigned int ix, jx;
ARGCHK(a != NULL, MP_BADARG);
for(ix = 0; ix < USED(a); ix++) {
for(jx = 0; jx < sizeof(mp_digit); jx++) {
next = (next << CHAR_BIT) | (RANDOM() & UCHAR_MAX);
}
DIGIT(a, ix) = next;
}
return MP_OKAY;
} /* end mpp_random() */
/* }}} */
/* {{{ mpp_random_size(a, prec) */
mp_err mpp_random_size(mp_int *a, mp_size prec)
{
mp_err res;
ARGCHK(a != NULL && prec > 0, MP_BADARG);
if((res = s_mp_pad(a, prec)) != MP_OKAY)
return res;
return mpp_random(a);
} /* end mpp_random_size() */
/* }}} */
/* {{{ mpp_divis_vector(a, vec, size, which) */
/*
mpp_divis_vector(a, vec, size, which)
Determines if a is divisible by any of the 'size' digits in vec.
Returns MP_YES and sets 'which' to the index of the offending digit,
if it is; returns MP_NO if it is not.
*/
mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which)
{
ARGCHK(a != NULL && vec != NULL && size > 0, MP_BADARG);
return s_mpp_divp(a, vec, size, which);
} /* end mpp_divis_vector() */
/* }}} */
/* {{{ mpp_divis_primes(a, np) */
/*
mpp_divis_primes(a, np)
Test whether a is divisible by any of the first 'np' primes. If it
is, returns MP_YES and sets *np to the value of the digit that did
it. If not, returns MP_NO.
*/
mp_err mpp_divis_primes(mp_int *a, mp_digit *np)
{
int size, which;
mp_err res;
ARGCHK(a != NULL && np != NULL, MP_BADARG);
size = (int)*np;
if(size > prime_tab_size)
size = prime_tab_size;
res = mpp_divis_vector(a, prime_tab, size, &which);
if(res == MP_YES)
*np = prime_tab[which];
return res;
} /* end mpp_divis_primes() */
/* }}} */
/* {{{ mpp_fermat(a, w) */
/*
Using w as a witness, try pseudo-primality testing based on Fermat's
little theorem. If a is prime, and (w, a) = 1, then w^a == w (mod
a). So, we compute z = w^a (mod a) and compare z to w; if they are
equal, the test passes and we return MP_YES. Otherwise, we return
MP_NO.
*/
mp_err mpp_fermat(mp_int *a, mp_digit w)
{
mp_int base, test;
mp_err res;
if((res = mp_init(&base)) != MP_OKAY)
return res;
mp_set(&base, w);
if((res = mp_init(&test)) != MP_OKAY)
goto TEST;
/* Compute test = base^a (mod a) */
if((res = mp_exptmod(&base, a, a, &test)) != MP_OKAY)
goto CLEANUP;
if(mp_cmp(&base, &test) == 0)
res = MP_YES;
else
res = MP_NO;
CLEANUP:
mp_clear(&test);
TEST:
mp_clear(&base);
return res;
} /* end mpp_fermat() */
/* }}} */
/*
Perform the fermat test on each of the primes in a list until
a) one of them shows a is not prime, or
b) the list is exhausted.
Returns: MP_YES if it passes tests.
MP_NO if fermat test reveals it is composite
Some MP error code if some other error occurs.
*/
mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes)
{
mp_err rv = MP_YES;
while (nPrimes-- > 0 && rv == MP_YES) {
rv = mpp_fermat(a, *primes++);
}
return rv;
}
/* {{{ mpp_pprime(a, nt) */
/*
mpp_pprime(a, nt)
Performs nt iteration of the Miller-Rabin probabilistic primality
test on a. Returns MP_YES if the tests pass, MP_NO if one fails.
If MP_NO is returned, the number is definitely composite. If MP_YES
is returned, it is probably prime (but that is not guaranteed).
*/
mp_err mpp_pprime(mp_int *a, int nt)
{
mp_err res;
mp_int x, amo, m, z; /* "amo" = "a minus one" */
int iter;
unsigned int jx;
mp_size b;
ARGCHK(a != NULL, MP_BADARG);
MP_DIGITS(&x) = 0;
MP_DIGITS(&amo) = 0;
MP_DIGITS(&m) = 0;
MP_DIGITS(&z) = 0;
/* Initialize temporaries... */
MP_CHECKOK( mp_init(&amo));
/* Compute amo = a - 1 for what follows... */
MP_CHECKOK( mp_sub_d(a, 1, &amo) );
b = mp_trailing_zeros(&amo);
if (!b) { /* a was even ? */
res = MP_NO;
goto CLEANUP;
}
MP_CHECKOK( mp_init_size(&x, MP_USED(a)) );
MP_CHECKOK( mp_init(&z) );
MP_CHECKOK( mp_init(&m) );
MP_CHECKOK( mp_div_2d(&amo, b, &m, 0) );
/* Do the test nt times... */
for(iter = 0; iter < nt; iter++) {
/* Choose a random value for x < a */
s_mp_pad(&x, USED(a));
mpp_random(&x);
MP_CHECKOK( mp_mod(&x, a, &x) );
/* Compute z = (x ** m) mod a */
MP_CHECKOK( mp_exptmod(&x, &m, a, &z) );
if(mp_cmp_d(&z, 1) == 0 || mp_cmp(&z, &amo) == 0) {
res = MP_YES;
continue;
}
res = MP_NO; /* just in case the following for loop never executes. */
for (jx = 1; jx < b; jx++) {
/* z = z^2 (mod a) */
MP_CHECKOK( mp_sqrmod(&z, a, &z) );
res = MP_NO; /* previous line set res to MP_YES */
if(mp_cmp_d(&z, 1) == 0) {
break;
}
if(mp_cmp(&z, &amo) == 0) {
res = MP_YES;
break;
}
} /* end testing loop */
/* If the test passes, we will continue iterating, but a failed
test means the candidate is definitely NOT prime, so we will
immediately break out of this loop
*/
if(res == MP_NO)
break;
} /* end iterations loop */
CLEANUP:
mp_clear(&m);
mp_clear(&z);
mp_clear(&x);
mp_clear(&amo);
return res;
} /* end mpp_pprime() */
/* }}} */
/* Produce table of composites from list of primes and trial value.
** trial must be odd. List of primes must not include 2.
** sieve should have dimension >= MAXPRIME/2, where MAXPRIME is largest
** prime in list of primes. After this function is finished,
** if sieve[i] is non-zero, then (trial + 2*i) is composite.
** Each prime used in the sieve costs one division of trial, and eliminates
** one or more values from the search space. (3 eliminates 1/3 of the values
** alone!) Each value left in the search space costs 1 or more modular
** exponentations. So, these divisions are a bargain!
*/
mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
unsigned char *sieve, mp_size nSieve)
{
mp_err res;
mp_digit rem;
mp_size ix;
unsigned long offset;
memset(sieve, 0, nSieve);
for(ix = 0; ix < nPrimes; ix++) {
mp_digit prime = primes[ix];
mp_size i;
if((res = mp_mod_d(trial, prime, &rem)) != MP_OKAY)
return res;
if (rem == 0) {
offset = 0;
} else {
offset = prime - (rem / 2);
}
for (i = offset; i < nSieve ; i += prime) {
sieve[i] = 1;
}
}
return MP_OKAY;
}
#define SIEVE_SIZE 32*1024
mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong,
unsigned long * nTries)
{
mp_digit np;
mp_err res;
int i = 0;
mp_int trial;
mp_int q;
mp_size num_tests;
/*
* Always make sieve the last variabale allocated so that
* Mac builds don't break by adding an extra variable
* on the stack. -javi
*/
#if defined(macintosh) || defined (XP_OS2) \
|| (defined(HPUX) && defined(__ia64))
unsigned char *sieve;
sieve = malloc(SIEVE_SIZE);
ARGCHK(sieve != NULL, MP_MEM);
#else
unsigned char sieve[SIEVE_SIZE];
#endif
ARGCHK(start != 0, MP_BADARG);
ARGCHK(nBits > 16, MP_RANGE);
MP_DIGITS(&trial) = 0;
MP_DIGITS(&q) = 0;
MP_CHECKOK( mp_init(&trial) );
MP_CHECKOK( mp_init(&q) );
/* values taken from table 4.4, HandBook of Applied Cryptography */
if (nBits >= 1300) {
num_tests = 2;
} else if (nBits >= 850) {
num_tests = 3;
} else if (nBits >= 650) {
num_tests = 4;
} else if (nBits >= 550) {
num_tests = 5;
} else if (nBits >= 450) {
num_tests = 6;
} else if (nBits >= 400) {
num_tests = 7;
} else if (nBits >= 350) {
num_tests = 8;
} else if (nBits >= 300) {
num_tests = 9;
} else if (nBits >= 250) {
num_tests = 12;
} else if (nBits >= 200) {
num_tests = 15;
} else if (nBits >= 150) {
num_tests = 18;
} else if (nBits >= 100) {
num_tests = 27;
} else
num_tests = 50;
if (strong)
--nBits;
MP_CHECKOK( mpl_set_bit(start, nBits - 1, 1) );
MP_CHECKOK( mpl_set_bit(start, 0, 1) );
for (i = mpl_significant_bits(start) - 1; i >= nBits; --i) {
MP_CHECKOK( mpl_set_bit(start, i, 0) );
}
/* start sieveing with prime value of 3. */
MP_CHECKOK(mpp_sieve(start, prime_tab + 1, prime_tab_size - 1,
sieve, SIEVE_SIZE) );
#ifdef DEBUG_SIEVE
res = 0;
for (i = 0; i < SIEVE_SIZE; ++i) {
if (!sieve[i])
++res;
}
fprintf(stderr,"sieve found %d potential primes.\n", res);
#define FPUTC(x,y) fputc(x,y)
#else
#define FPUTC(x,y)
#endif
res = MP_NO;
for(i = 0; i < SIEVE_SIZE; ++i) {
if (sieve[i]) /* this number is composite */
continue;
MP_CHECKOK( mp_add_d(start, 2 * i, &trial) );
FPUTC('.', stderr);
/* run a Fermat test */
res = mpp_fermat(&trial, 2);
if (res != MP_OKAY) {
if (res == MP_NO)
continue; /* was composite */
goto CLEANUP;
}
FPUTC('+', stderr);
/* If that passed, run some Miller-Rabin tests */
res = mpp_pprime(&trial, num_tests);
if (res != MP_OKAY) {
if (res == MP_NO)
continue; /* was composite */
goto CLEANUP;
}
FPUTC('!', stderr);
if (!strong)
break; /* success !! */
/* At this point, we have strong evidence that our candidate
is itself prime. If we want a strong prime, we need now
to test q = 2p + 1 for primality...
*/
MP_CHECKOK( mp_mul_2(&trial, &q) );
MP_CHECKOK( mp_add_d(&q, 1, &q) );
/* Test q for small prime divisors ... */
np = prime_tab_size;
res = mpp_divis_primes(&q, &np);
if (res == MP_YES) { /* is composite */
mp_clear(&q);
continue;
}
if (res != MP_NO)
goto CLEANUP;
/* And test with Fermat, as with its parent ... */
res = mpp_fermat(&q, 2);
if (res != MP_YES) {
mp_clear(&q);
if (res == MP_NO)
continue; /* was composite */
goto CLEANUP;
}
/* And test with Miller-Rabin, as with its parent ... */
res = mpp_pprime(&q, num_tests);
if (res != MP_YES) {
mp_clear(&q);
if (res == MP_NO)
continue; /* was composite */
goto CLEANUP;
}
/* If it passed, we've got a winner */
mp_exch(&q, &trial);
mp_clear(&q);
break;
} /* end of loop through sieved values */
if (res == MP_YES)
mp_exch(&trial, start);
CLEANUP:
mp_clear(&trial);
mp_clear(&q);
if (nTries)
*nTries += i;
#if defined(macintosh) || defined(XP_OS2) \
|| (defined(HPUX) && defined(__ia64))
if (sieve != NULL) {
memset(sieve, 0, SIEVE_SIZE);
free (sieve);
}
#endif
return res;
}
/*========================================================================*/
/*------------------------------------------------------------------------*/
/* Static functions visible only to the library internally */
/* {{{ s_mpp_divp(a, vec, size, which) */
/*
Test for divisibility by members of a vector of digits. Returns
MP_NO if a is not divisible by any of them; returns MP_YES and sets
'which' to the index of the offender, if it is. Will stop on the
first digit against which a is divisible.
*/
mp_err s_mpp_divp(mp_int *a, const mp_digit *vec, int size, int *which)
{
mp_err res;
mp_digit rem;
int ix;
for(ix = 0; ix < size; ix++) {
if((res = mp_mod_d(a, vec[ix], &rem)) != MP_OKAY)
return res;
if(rem == 0) {
if(which)
*which = ix;
return MP_YES;
}
}
return MP_NO;
} /* end s_mpp_divp() */
/* }}} */
/*------------------------------------------------------------------------*/
/* HERE THERE BE DRAGONS */

View File

@@ -1,70 +0,0 @@
/*
* mpprime.h
*
* Utilities for finding and working with prime and pseudo-prime
* integers
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1997
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _H_MP_PRIME_
#define _H_MP_PRIME_
#include "mpi.h"
extern const int prime_tab_size; /* number of primes available */
extern const mp_digit prime_tab[];
/* Tests for divisibility */
mp_err mpp_divis(mp_int *a, mp_int *b);
mp_err mpp_divis_d(mp_int *a, mp_digit d);
/* Random selection */
mp_err mpp_random(mp_int *a);
mp_err mpp_random_size(mp_int *a, mp_size prec);
/* Pseudo-primality testing */
mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which);
mp_err mpp_divis_primes(mp_int *a, mp_digit *np);
mp_err mpp_fermat(mp_int *a, mp_digit w);
mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes);
mp_err mpp_pprime(mp_int *a, int nt);
mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
unsigned char *sieve, mp_size nSieve);
mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong,
unsigned long * nTries);
#endif /* end _H_MP_PRIME_ */

View File

@@ -1,253 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is a SPARC/VIS optimized multiply and add function.
*
* The Initial Developer of the Original Code is
* Sun Microsystems Inc.
* Portions created by the Initial Developer are Copyright (C) 1999-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mpv_sparc.c,v 1.4 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
#include "vis_proto.h"
/***************************************************************/
typedef int t_s32;
typedef unsigned int t_u32;
#if defined(__sparcv9)
typedef long t_s64;
typedef unsigned long t_u64;
#else
typedef long long t_s64;
typedef unsigned long long t_u64;
#endif
typedef double t_d64;
/***************************************************************/
typedef union {
t_d64 d64;
struct {
t_s32 i0;
t_s32 i1;
} i32s;
} d64_2_i32;
/***************************************************************/
#define BUFF_SIZE 256
#define A_BITS 19
#define A_MASK ((1 << A_BITS) - 1)
/***************************************************************/
static t_u64 mask_cnst[] = {
0x8000000080000000ull
};
/***************************************************************/
#define DEF_VARS(N) \
t_d64 *py = (t_d64*)y; \
t_d64 mask = *((t_d64*)mask_cnst); \
t_d64 ca = (1u << 31) - 1; \
t_d64 da = (t_d64)a; \
t_s64 buff[N], s; \
d64_2_i32 dy
/***************************************************************/
#define MUL_U32_S64_2(i) \
dy.d64 = vis_fxnor(mask, py[i]); \
buff[2*(i) ] = (ca - (t_d64)dy.i32s.i0) * da; \
buff[2*(i)+1] = (ca - (t_d64)dy.i32s.i1) * da
#define MUL_U32_S64_2_D(i) \
dy.d64 = vis_fxnor(mask, py[i]); \
d0 = ca - (t_d64)dy.i32s.i0; \
d1 = ca - (t_d64)dy.i32s.i1; \
buff[4*(i) ] = (t_s64)(d0 * da); \
buff[4*(i)+1] = (t_s64)(d0 * db); \
buff[4*(i)+2] = (t_s64)(d1 * da); \
buff[4*(i)+3] = (t_s64)(d1 * db)
/***************************************************************/
#define ADD_S64_U32(i) \
s = buff[i] + x[i] + c; \
z[i] = s; \
c = (s >> 32)
#define ADD_S64_U32_D(i) \
s = buff[2*(i)] +(((t_s64)(buff[2*(i)+1]))<<A_BITS) + x[i] + uc; \
z[i] = s; \
uc = ((t_u64)s >> 32)
/***************************************************************/
#define MUL_U32_S64_8(i) \
MUL_U32_S64_2(i); \
MUL_U32_S64_2(i+1); \
MUL_U32_S64_2(i+2); \
MUL_U32_S64_2(i+3)
#define MUL_U32_S64_D_8(i) \
MUL_U32_S64_2_D(i); \
MUL_U32_S64_2_D(i+1); \
MUL_U32_S64_2_D(i+2); \
MUL_U32_S64_2_D(i+3)
/***************************************************************/
#define ADD_S64_U32_8(i) \
ADD_S64_U32(i); \
ADD_S64_U32(i+1); \
ADD_S64_U32(i+2); \
ADD_S64_U32(i+3); \
ADD_S64_U32(i+4); \
ADD_S64_U32(i+5); \
ADD_S64_U32(i+6); \
ADD_S64_U32(i+7)
#define ADD_S64_U32_D_8(i) \
ADD_S64_U32_D(i); \
ADD_S64_U32_D(i+1); \
ADD_S64_U32_D(i+2); \
ADD_S64_U32_D(i+3); \
ADD_S64_U32_D(i+4); \
ADD_S64_U32_D(i+5); \
ADD_S64_U32_D(i+6); \
ADD_S64_U32_D(i+7)
/***************************************************************/
t_u32 mul_add(t_u32 *z, t_u32 *x, t_u32 *y, int n, t_u32 a)
{
if (a < (1 << A_BITS)) {
if (n == 8) {
DEF_VARS(8);
t_s32 c = 0;
MUL_U32_S64_8(0);
ADD_S64_U32_8(0);
return c;
} else if (n == 16) {
DEF_VARS(16);
t_s32 c = 0;
MUL_U32_S64_8(0);
MUL_U32_S64_8(4);
ADD_S64_U32_8(0);
ADD_S64_U32_8(8);
return c;
} else {
DEF_VARS(BUFF_SIZE);
t_s32 i, c = 0;
#pragma pipeloop(0)
for (i = 0; i < (n+1)/2; i ++) {
MUL_U32_S64_2(i);
}
#pragma pipeloop(0)
for (i = 0; i < n; i ++) {
ADD_S64_U32(i);
}
return c;
}
} else {
if (n == 8) {
DEF_VARS(2*8);
t_d64 d0, d1, db;
t_u32 uc = 0;
da = (t_d64)(a & A_MASK);
db = (t_d64)(a >> A_BITS);
MUL_U32_S64_D_8(0);
ADD_S64_U32_D_8(0);
return uc;
} else if (n == 16) {
DEF_VARS(2*16);
t_d64 d0, d1, db;
t_u32 uc = 0;
da = (t_d64)(a & A_MASK);
db = (t_d64)(a >> A_BITS);
MUL_U32_S64_D_8(0);
MUL_U32_S64_D_8(4);
ADD_S64_U32_D_8(0);
ADD_S64_U32_D_8(8);
return uc;
} else {
DEF_VARS(2*BUFF_SIZE);
t_d64 d0, d1, db;
t_u32 i, uc = 0;
da = (t_d64)(a & A_MASK);
db = (t_d64)(a >> A_BITS);
#pragma pipeloop(0)
for (i = 0; i < (n+1)/2; i ++) {
MUL_U32_S64_2_D(i);
}
#pragma pipeloop(0)
for (i = 0; i < n; i ++) {
ADD_S64_U32_D(i);
}
return uc;
}
}
}
/***************************************************************/
t_u32 mul_add_inp(t_u32 *x, t_u32 *y, int n, t_u32 a)
{
return mul_add(x, x, y, n, a);
}
/***************************************************************/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,214 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Multiple Precision Integer optimization code for
* the Compaq Alpha processor.
*
* The Initial Developer of the Original Code is
* Richard C. Swift.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Richard C. Swift (swift@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "mpi-priv.h"
#include <c_asm.h>
#define MP_MUL_DxD(a, b, Phi, Plo) \
{ Plo = asm ("mulq %a0, %a1, %v0", a, b); \
Phi = asm ("umulh %a0, %a1, %v0", a, b); } \
/* This is empty for the loop in s_mpv_mul_d */
#define CARRY_ADD
#define ONE_MUL \
a_i = *a++; \
MP_MUL_DxD(a_i, b, a1b1, a0b0); \
a0b0 += carry; \
if (a0b0 < carry) \
++a1b1; \
CARRY_ADD \
*c++ = a0b0; \
carry = a1b1; \
#define FOUR_MUL \
ONE_MUL \
ONE_MUL \
ONE_MUL \
ONE_MUL \
#define SIXTEEN_MUL \
FOUR_MUL \
FOUR_MUL \
FOUR_MUL \
FOUR_MUL \
#define THIRTYTWO_MUL \
SIXTEEN_MUL \
SIXTEEN_MUL \
#define ONETWENTYEIGHT_MUL \
THIRTYTWO_MUL \
THIRTYTWO_MUL \
THIRTYTWO_MUL \
THIRTYTWO_MUL \
#define EXPAND_256(CALL) \
mp_digit carry = 0; \
mp_digit a_i; \
mp_digit a0b0, a1b1; \
if (a_len &255) { \
if (a_len &1) { \
ONE_MUL \
} \
if (a_len &2) { \
ONE_MUL \
ONE_MUL \
} \
if (a_len &4) { \
FOUR_MUL \
} \
if (a_len &8) { \
FOUR_MUL \
FOUR_MUL \
} \
if (a_len & 16 ) { \
SIXTEEN_MUL \
} \
if (a_len & 32 ) { \
THIRTYTWO_MUL \
} \
if (a_len & 64 ) { \
THIRTYTWO_MUL \
THIRTYTWO_MUL \
} \
if (a_len & 128) { \
ONETWENTYEIGHT_MUL \
} \
a_len = a_len & (-256); \
} \
if (a_len>=256 ) { \
carry = CALL(a, a_len, b, c, carry); \
c += a_len; \
} \
#define FUNC_NAME(NAME) \
mp_digit NAME(const mp_digit *a, \
mp_size a_len, \
mp_digit b, mp_digit *c, \
mp_digit carry) \
#define DECLARE_MUL_256(FNAME) \
FUNC_NAME(FNAME) \
{ \
mp_digit a_i; \
mp_digit a0b0, a1b1; \
while (a_len) { \
ONETWENTYEIGHT_MUL \
ONETWENTYEIGHT_MUL \
a_len-= 256; \
} \
return carry; \
} \
/* Expanding the loop in s_mpv_mul_d appeared to slow down the
(admittedly) small number of tests (i.e., timetest) used to
measure performance, so this define disables that optimization. */
#define DO_NOT_EXPAND 1
/* Need forward declaration so it can be instantiated after
the routine that uses it; this helps locality somewhat */
#if !defined(DO_NOT_EXPAND)
FUNC_NAME(s_mpv_mul_d_MUL256);
#endif
/* c = a * b */
void s_mpv_mul_d(const mp_digit *a, mp_size a_len,
mp_digit b, mp_digit *c)
{
#if defined(DO_NOT_EXPAND)
mp_digit carry = 0;
while (a_len--) {
mp_digit a_i = *a++;
mp_digit a0b0, a1b1;
MP_MUL_DxD(a_i, b, a1b1, a0b0);
a0b0 += carry;
if (a0b0 < carry)
++a1b1;
*c++ = a0b0;
carry = a1b1;
}
#else
EXPAND_256(s_mpv_mul_d_MUL256)
#endif
*c = carry;
}
#if !defined(DO_NOT_EXPAND)
DECLARE_MUL_256(s_mpv_mul_d_MUL256)
#endif
#undef CARRY_ADD
/* This is redefined for the loop in s_mpv_mul_d_add */
#define CARRY_ADD \
a0b0 += a_i = *c; \
if (a0b0 < a_i) \
++a1b1; \
/* Need forward declaration so it can be instantiated between the
two routines that use it; this helps locality somewhat */
FUNC_NAME(s_mpv_mul_d_add_MUL256);
/* c += a * b */
void s_mpv_mul_d_add(const mp_digit *a, mp_size a_len,
mp_digit b, mp_digit *c)
{
EXPAND_256(s_mpv_mul_d_add_MUL256)
*c = carry;
}
/* Instantiate multiply 256 routine here */
DECLARE_MUL_256(s_mpv_mul_d_add_MUL256)
/* Presently, this is only used by the Montgomery arithmetic code. */
/* c += a * b */
void s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len,
mp_digit b, mp_digit *c)
{
EXPAND_256(s_mpv_mul_d_add_MUL256)
while (carry) {
mp_digit c_i = *c;
carry += c_i;
*c++ = carry;
carry = carry < c_i;
}
}

View File

@@ -1,115 +0,0 @@
/*
* Test whether to include squaring code given the current settings
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1997
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <time.h>
#define MP_SQUARE 1 /* make sure squaring code is included */
#include "mpi.h"
#include "mpprime.h"
int main(int argc, char *argv[])
{
int ntests, prec, ix;
unsigned int seed;
clock_t start, stop;
double multime, sqrtime;
mp_int a, c;
seed = (unsigned int)time(NULL);
if(argc < 3) {
fprintf(stderr, "Usage: %s <ntests> <nbits>\n", argv[0]);
return 1;
}
if((ntests = abs(atoi(argv[1]))) == 0) {
fprintf(stderr, "%s: must request at least 1 test.\n", argv[0]);
return 1;
}
if((prec = abs(atoi(argv[2]))) < CHAR_BIT) {
fprintf(stderr, "%s: must request at least %d bits.\n", argv[0],
CHAR_BIT);
return 1;
}
prec = (prec + (DIGIT_BIT - 1)) / DIGIT_BIT;
mp_init_size(&a, prec);
mp_init_size(&c, 2 * prec);
/* Test multiplication by self */
srand(seed);
start = clock();
for(ix = 0; ix < ntests; ix++) {
mpp_random_size(&a, prec);
mp_mul(&a, &a, &c);
}
stop = clock();
multime = (double)(stop - start) / CLOCKS_PER_SEC;
/* Test squaring */
srand(seed);
start = clock();
for(ix = 0; ix < ntests; ix++) {
mpp_random_size(&a, prec);
mp_sqr(&a, &c);
}
stop = clock();
sqrtime = (double)(stop - start) / CLOCKS_PER_SEC;
printf("Multiply: %.4f\n", multime);
printf("Square: %.4f\n", sqrtime);
if(multime < sqrtime) {
printf("Speedup: %.1f%%\n", 100.0 * (1.0 - multime / sqrtime));
printf("Prefer: multiply\n");
} else {
printf("Speedup: %.1f%%\n", 100.0 * (1.0 - sqrtime / multime));
printf("Prefer: square\n");
}
mp_clear(&a); mp_clear(&c);
return 0;
}

View File

@@ -1,111 +0,0 @@
#!/bin/sh
#
# multest
#
# Run multiply and square timing tests, to compute a chart for the
# current processor and compiler combination.
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: multest,v 1.3 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
ECHO=/bin/echo
MAKE=gmake
$ECHO "\n** Running multiply and square timing tests\n"
$ECHO "Bringing 'mulsqr' up to date ... "
if $MAKE mulsqr ; then
:
else
$ECHO "\nMake failed to build mulsqr.\n"
exit 1
fi
if [ ! -x ./mulsqr ] ; then
$ECHO "\nCannot find 'mulsqr' program, testing cannot continue.\n"
exit 1
fi
sizes='64 128 192 256 320 384 448 512 640 768 896 1024 1536 2048'
ntests=500000
$ECHO "Running timing tests, please wait ... "
trap 'echo "oop!";rm -f tt*.tmp;exit 0' INT HUP
touch tt$$.tmp
$ECHO $ntests tests >> tt$$.tmp
for size in $sizes ; do
$ECHO "$size bits ... \c"
set -A res `./mulsqr $ntests $size|head -3|tr -d '%'|awk '{print $2}'`
$ECHO $size"\t"${res[0]}"\t"${res[1]}"\t"${res[2]} >> tt$$.tmp
$ECHO "(done)"
done
mv tt$$.tmp mulsqr-results.txt
rm -f tt$$.tmp
$ECHO "\n** Running Karatsuba-Ofman multiplication tests\n"
$ECHO "Brining 'karatsuba' up to date ... "
if $MAKE karatsuba ; then
:
else
$ECHO "\nMake failed to build karatsuba.\n"
exit 1
fi
if [ ! -x ./karatsuba ] ; then
$ECHO "\nCannot find 'karatsuba' program, testing cannot continue.\n"
exit 1
fi
ntests=100000
trap 'echo "oop!";rm -f tt*.tmp;exit 0' INT HUP
touch tt$$.tmp
for size in $sizes ; do
$ECHO "$size bits ... "
./karatsuba $ntests $size >> tt$$.tmp
tail -2 tt$$.tmp
done
mv tt$$.tmp karatsuba-results.txt
rm -f tt$$.tmp
exit 0

View File

@@ -1,874 +0,0 @@
/*
* These tables of primes wwere generated using the 'sieve' program
* (sieve.c) and converted to this format with 'ptab.pl'.
*
* The 'small' table is just the first 128 primes. The 'large' table
* is a table of all the prime values that will fit into a single
* mp_digit (given the current size of an mp_digit, which is two bytes).
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1997
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#if SMALL_TABLE
#define MP_PRIME_TAB_SIZE 128
#else
#define MP_PRIME_TAB_SIZE 6542
#endif
const int prime_tab_size = MP_PRIME_TAB_SIZE;
const mp_digit prime_tab[] = {
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035,
0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059,
0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, 0x0083,
0x0089, 0x008B, 0x0095, 0x0097, 0x009D, 0x00A3, 0x00A7, 0x00AD,
0x00B3, 0x00B5, 0x00BF, 0x00C1, 0x00C5, 0x00C7, 0x00D3, 0x00DF,
0x00E3, 0x00E5, 0x00E9, 0x00EF, 0x00F1, 0x00FB, 0x0101, 0x0107,
0x010D, 0x010F, 0x0115, 0x0119, 0x011B, 0x0125, 0x0133, 0x0137,
0x0139, 0x013D, 0x014B, 0x0151, 0x015B, 0x015D, 0x0161, 0x0167,
0x016F, 0x0175, 0x017B, 0x017F, 0x0185, 0x018D, 0x0191, 0x0199,
0x01A3, 0x01A5, 0x01AF, 0x01B1, 0x01B7, 0x01BB, 0x01C1, 0x01C9,
0x01CD, 0x01CF, 0x01D3, 0x01DF, 0x01E7, 0x01EB, 0x01F3, 0x01F7,
0x01FD, 0x0209, 0x020B, 0x021D, 0x0223, 0x022D, 0x0233, 0x0239,
0x023B, 0x0241, 0x024B, 0x0251, 0x0257, 0x0259, 0x025F, 0x0265,
0x0269, 0x026B, 0x0277, 0x0281, 0x0283, 0x0287, 0x028D, 0x0293,
0x0295, 0x02A1, 0x02A5, 0x02AB, 0x02B3, 0x02BD, 0x02C5, 0x02CF,
#if ! SMALL_TABLE
0x02D7, 0x02DD, 0x02E3, 0x02E7, 0x02EF, 0x02F5, 0x02F9, 0x0301,
0x0305, 0x0313, 0x031D, 0x0329, 0x032B, 0x0335, 0x0337, 0x033B,
0x033D, 0x0347, 0x0355, 0x0359, 0x035B, 0x035F, 0x036D, 0x0371,
0x0373, 0x0377, 0x038B, 0x038F, 0x0397, 0x03A1, 0x03A9, 0x03AD,
0x03B3, 0x03B9, 0x03C7, 0x03CB, 0x03D1, 0x03D7, 0x03DF, 0x03E5,
0x03F1, 0x03F5, 0x03FB, 0x03FD, 0x0407, 0x0409, 0x040F, 0x0419,
0x041B, 0x0425, 0x0427, 0x042D, 0x043F, 0x0443, 0x0445, 0x0449,
0x044F, 0x0455, 0x045D, 0x0463, 0x0469, 0x047F, 0x0481, 0x048B,
0x0493, 0x049D, 0x04A3, 0x04A9, 0x04B1, 0x04BD, 0x04C1, 0x04C7,
0x04CD, 0x04CF, 0x04D5, 0x04E1, 0x04EB, 0x04FD, 0x04FF, 0x0503,
0x0509, 0x050B, 0x0511, 0x0515, 0x0517, 0x051B, 0x0527, 0x0529,
0x052F, 0x0551, 0x0557, 0x055D, 0x0565, 0x0577, 0x0581, 0x058F,
0x0593, 0x0595, 0x0599, 0x059F, 0x05A7, 0x05AB, 0x05AD, 0x05B3,
0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7,
0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623,
0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653,
0x0655, 0x065B, 0x0665, 0x0679, 0x067F, 0x0683, 0x0685, 0x069D,
0x06A1, 0x06A3, 0x06AD, 0x06B9, 0x06BB, 0x06C5, 0x06CD, 0x06D3,
0x06D9, 0x06DF, 0x06F1, 0x06F7, 0x06FB, 0x06FD, 0x0709, 0x0713,
0x071F, 0x0727, 0x0737, 0x0745, 0x074B, 0x074F, 0x0751, 0x0755,
0x0757, 0x0761, 0x076D, 0x0773, 0x0779, 0x078B, 0x078D, 0x079D,
0x079F, 0x07B5, 0x07BB, 0x07C3, 0x07C9, 0x07CD, 0x07CF, 0x07D3,
0x07DB, 0x07E1, 0x07EB, 0x07ED, 0x07F7, 0x0805, 0x080F, 0x0815,
0x0821, 0x0823, 0x0827, 0x0829, 0x0833, 0x083F, 0x0841, 0x0851,
0x0853, 0x0859, 0x085D, 0x085F, 0x0869, 0x0871, 0x0883, 0x089B,
0x089F, 0x08A5, 0x08AD, 0x08BD, 0x08BF, 0x08C3, 0x08CB, 0x08DB,
0x08DD, 0x08E1, 0x08E9, 0x08EF, 0x08F5, 0x08F9, 0x0905, 0x0907,
0x091D, 0x0923, 0x0925, 0x092B, 0x092F, 0x0935, 0x0943, 0x0949,
0x094D, 0x094F, 0x0955, 0x0959, 0x095F, 0x096B, 0x0971, 0x0977,
0x0985, 0x0989, 0x098F, 0x099B, 0x09A3, 0x09A9, 0x09AD, 0x09C7,
0x09D9, 0x09E3, 0x09EB, 0x09EF, 0x09F5, 0x09F7, 0x09FD, 0x0A13,
0x0A1F, 0x0A21, 0x0A31, 0x0A39, 0x0A3D, 0x0A49, 0x0A57, 0x0A61,
0x0A63, 0x0A67, 0x0A6F, 0x0A75, 0x0A7B, 0x0A7F, 0x0A81, 0x0A85,
0x0A8B, 0x0A93, 0x0A97, 0x0A99, 0x0A9F, 0x0AA9, 0x0AAB, 0x0AB5,
0x0ABD, 0x0AC1, 0x0ACF, 0x0AD9, 0x0AE5, 0x0AE7, 0x0AED, 0x0AF1,
0x0AF3, 0x0B03, 0x0B11, 0x0B15, 0x0B1B, 0x0B23, 0x0B29, 0x0B2D,
0x0B3F, 0x0B47, 0x0B51, 0x0B57, 0x0B5D, 0x0B65, 0x0B6F, 0x0B7B,
0x0B89, 0x0B8D, 0x0B93, 0x0B99, 0x0B9B, 0x0BB7, 0x0BB9, 0x0BC3,
0x0BCB, 0x0BCF, 0x0BDD, 0x0BE1, 0x0BE9, 0x0BF5, 0x0BFB, 0x0C07,
0x0C0B, 0x0C11, 0x0C25, 0x0C2F, 0x0C31, 0x0C41, 0x0C5B, 0x0C5F,
0x0C61, 0x0C6D, 0x0C73, 0x0C77, 0x0C83, 0x0C89, 0x0C91, 0x0C95,
0x0C9D, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBB, 0x0CC7, 0x0CE3, 0x0CE5,
0x0CEB, 0x0CF1, 0x0CF7, 0x0CFB, 0x0D01, 0x0D03, 0x0D0F, 0x0D13,
0x0D1F, 0x0D21, 0x0D2B, 0x0D2D, 0x0D3D, 0x0D3F, 0x0D4F, 0x0D55,
0x0D69, 0x0D79, 0x0D81, 0x0D85, 0x0D87, 0x0D8B, 0x0D8D, 0x0DA3,
0x0DAB, 0x0DB7, 0x0DBD, 0x0DC7, 0x0DC9, 0x0DCD, 0x0DD3, 0x0DD5,
0x0DDB, 0x0DE5, 0x0DE7, 0x0DF3, 0x0DFD, 0x0DFF, 0x0E09, 0x0E17,
0x0E1D, 0x0E21, 0x0E27, 0x0E2F, 0x0E35, 0x0E3B, 0x0E4B, 0x0E57,
0x0E59, 0x0E5D, 0x0E6B, 0x0E71, 0x0E75, 0x0E7D, 0x0E87, 0x0E8F,
0x0E95, 0x0E9B, 0x0EB1, 0x0EB7, 0x0EB9, 0x0EC3, 0x0ED1, 0x0ED5,
0x0EDB, 0x0EED, 0x0EEF, 0x0EF9, 0x0F07, 0x0F0B, 0x0F0D, 0x0F17,
0x0F25, 0x0F29, 0x0F31, 0x0F43, 0x0F47, 0x0F4D, 0x0F4F, 0x0F53,
0x0F59, 0x0F5B, 0x0F67, 0x0F6B, 0x0F7F, 0x0F95, 0x0FA1, 0x0FA3,
0x0FA7, 0x0FAD, 0x0FB3, 0x0FB5, 0x0FBB, 0x0FD1, 0x0FD3, 0x0FD9,
0x0FE9, 0x0FEF, 0x0FFB, 0x0FFD, 0x1003, 0x100F, 0x101F, 0x1021,
0x1025, 0x102B, 0x1039, 0x103D, 0x103F, 0x1051, 0x1069, 0x1073,
0x1079, 0x107B, 0x1085, 0x1087, 0x1091, 0x1093, 0x109D, 0x10A3,
0x10A5, 0x10AF, 0x10B1, 0x10BB, 0x10C1, 0x10C9, 0x10E7, 0x10F1,
0x10F3, 0x10FD, 0x1105, 0x110B, 0x1115, 0x1127, 0x112D, 0x1139,
0x1145, 0x1147, 0x1159, 0x115F, 0x1163, 0x1169, 0x116F, 0x1181,
0x1183, 0x118D, 0x119B, 0x11A1, 0x11A5, 0x11A7, 0x11AB, 0x11C3,
0x11C5, 0x11D1, 0x11D7, 0x11E7, 0x11EF, 0x11F5, 0x11FB, 0x120D,
0x121D, 0x121F, 0x1223, 0x1229, 0x122B, 0x1231, 0x1237, 0x1241,
0x1247, 0x1253, 0x125F, 0x1271, 0x1273, 0x1279, 0x127D, 0x128F,
0x1297, 0x12AF, 0x12B3, 0x12B5, 0x12B9, 0x12BF, 0x12C1, 0x12CD,
0x12D1, 0x12DF, 0x12FD, 0x1307, 0x130D, 0x1319, 0x1327, 0x132D,
0x1337, 0x1343, 0x1345, 0x1349, 0x134F, 0x1357, 0x135D, 0x1367,
0x1369, 0x136D, 0x137B, 0x1381, 0x1387, 0x138B, 0x1391, 0x1393,
0x139D, 0x139F, 0x13AF, 0x13BB, 0x13C3, 0x13D5, 0x13D9, 0x13DF,
0x13EB, 0x13ED, 0x13F3, 0x13F9, 0x13FF, 0x141B, 0x1421, 0x142F,
0x1433, 0x143B, 0x1445, 0x144D, 0x1459, 0x146B, 0x146F, 0x1471,
0x1475, 0x148D, 0x1499, 0x149F, 0x14A1, 0x14B1, 0x14B7, 0x14BD,
0x14CB, 0x14D5, 0x14E3, 0x14E7, 0x1505, 0x150B, 0x1511, 0x1517,
0x151F, 0x1525, 0x1529, 0x152B, 0x1537, 0x153D, 0x1541, 0x1543,
0x1549, 0x155F, 0x1565, 0x1567, 0x156B, 0x157D, 0x157F, 0x1583,
0x158F, 0x1591, 0x1597, 0x159B, 0x15B5, 0x15BB, 0x15C1, 0x15C5,
0x15CD, 0x15D7, 0x15F7, 0x1607, 0x1609, 0x160F, 0x1613, 0x1615,
0x1619, 0x161B, 0x1625, 0x1633, 0x1639, 0x163D, 0x1645, 0x164F,
0x1655, 0x1669, 0x166D, 0x166F, 0x1675, 0x1693, 0x1697, 0x169F,
0x16A9, 0x16AF, 0x16B5, 0x16BD, 0x16C3, 0x16CF, 0x16D3, 0x16D9,
0x16DB, 0x16E1, 0x16E5, 0x16EB, 0x16ED, 0x16F7, 0x16F9, 0x1709,
0x170F, 0x1723, 0x1727, 0x1733, 0x1741, 0x175D, 0x1763, 0x1777,
0x177B, 0x178D, 0x1795, 0x179B, 0x179F, 0x17A5, 0x17B3, 0x17B9,
0x17BF, 0x17C9, 0x17CB, 0x17D5, 0x17E1, 0x17E9, 0x17F3, 0x17F5,
0x17FF, 0x1807, 0x1813, 0x181D, 0x1835, 0x1837, 0x183B, 0x1843,
0x1849, 0x184D, 0x1855, 0x1867, 0x1871, 0x1877, 0x187D, 0x187F,
0x1885, 0x188F, 0x189B, 0x189D, 0x18A7, 0x18AD, 0x18B3, 0x18B9,
0x18C1, 0x18C7, 0x18D1, 0x18D7, 0x18D9, 0x18DF, 0x18E5, 0x18EB,
0x18F5, 0x18FD, 0x1915, 0x191B, 0x1931, 0x1933, 0x1945, 0x1949,
0x1951, 0x195B, 0x1979, 0x1981, 0x1993, 0x1997, 0x1999, 0x19A3,
0x19A9, 0x19AB, 0x19B1, 0x19B5, 0x19C7, 0x19CF, 0x19DB, 0x19ED,
0x19FD, 0x1A03, 0x1A05, 0x1A11, 0x1A17, 0x1A21, 0x1A23, 0x1A2D,
0x1A2F, 0x1A35, 0x1A3F, 0x1A4D, 0x1A51, 0x1A69, 0x1A6B, 0x1A7B,
0x1A7D, 0x1A87, 0x1A89, 0x1A93, 0x1AA7, 0x1AAB, 0x1AAD, 0x1AB1,
0x1AB9, 0x1AC9, 0x1ACF, 0x1AD5, 0x1AD7, 0x1AE3, 0x1AF3, 0x1AFB,
0x1AFF, 0x1B05, 0x1B23, 0x1B25, 0x1B2F, 0x1B31, 0x1B37, 0x1B3B,
0x1B41, 0x1B47, 0x1B4F, 0x1B55, 0x1B59, 0x1B65, 0x1B6B, 0x1B73,
0x1B7F, 0x1B83, 0x1B91, 0x1B9D, 0x1BA7, 0x1BBF, 0x1BC5, 0x1BD1,
0x1BD7, 0x1BD9, 0x1BEF, 0x1BF7, 0x1C09, 0x1C13, 0x1C19, 0x1C27,
0x1C2B, 0x1C2D, 0x1C33, 0x1C3D, 0x1C45, 0x1C4B, 0x1C4F, 0x1C55,
0x1C73, 0x1C81, 0x1C8B, 0x1C8D, 0x1C99, 0x1CA3, 0x1CA5, 0x1CB5,
0x1CB7, 0x1CC9, 0x1CE1, 0x1CF3, 0x1CF9, 0x1D09, 0x1D1B, 0x1D21,
0x1D23, 0x1D35, 0x1D39, 0x1D3F, 0x1D41, 0x1D4B, 0x1D53, 0x1D5D,
0x1D63, 0x1D69, 0x1D71, 0x1D75, 0x1D7B, 0x1D7D, 0x1D87, 0x1D89,
0x1D95, 0x1D99, 0x1D9F, 0x1DA5, 0x1DA7, 0x1DB3, 0x1DB7, 0x1DC5,
0x1DD7, 0x1DDB, 0x1DE1, 0x1DF5, 0x1DF9, 0x1E01, 0x1E07, 0x1E0B,
0x1E13, 0x1E17, 0x1E25, 0x1E2B, 0x1E2F, 0x1E3D, 0x1E49, 0x1E4D,
0x1E4F, 0x1E6D, 0x1E71, 0x1E89, 0x1E8F, 0x1E95, 0x1EA1, 0x1EAD,
0x1EBB, 0x1EC1, 0x1EC5, 0x1EC7, 0x1ECB, 0x1EDD, 0x1EE3, 0x1EEF,
0x1EF7, 0x1EFD, 0x1F01, 0x1F0D, 0x1F0F, 0x1F1B, 0x1F39, 0x1F49,
0x1F4B, 0x1F51, 0x1F67, 0x1F75, 0x1F7B, 0x1F85, 0x1F91, 0x1F97,
0x1F99, 0x1F9D, 0x1FA5, 0x1FAF, 0x1FB5, 0x1FBB, 0x1FD3, 0x1FE1,
0x1FE7, 0x1FEB, 0x1FF3, 0x1FFF, 0x2011, 0x201B, 0x201D, 0x2027,
0x2029, 0x202D, 0x2033, 0x2047, 0x204D, 0x2051, 0x205F, 0x2063,
0x2065, 0x2069, 0x2077, 0x207D, 0x2089, 0x20A1, 0x20AB, 0x20B1,
0x20B9, 0x20C3, 0x20C5, 0x20E3, 0x20E7, 0x20ED, 0x20EF, 0x20FB,
0x20FF, 0x210D, 0x2113, 0x2135, 0x2141, 0x2149, 0x214F, 0x2159,
0x215B, 0x215F, 0x2173, 0x217D, 0x2185, 0x2195, 0x2197, 0x21A1,
0x21AF, 0x21B3, 0x21B5, 0x21C1, 0x21C7, 0x21D7, 0x21DD, 0x21E5,
0x21E9, 0x21F1, 0x21F5, 0x21FB, 0x2203, 0x2209, 0x220F, 0x221B,
0x2221, 0x2225, 0x222B, 0x2231, 0x2239, 0x224B, 0x224F, 0x2263,
0x2267, 0x2273, 0x2275, 0x227F, 0x2285, 0x2287, 0x2291, 0x229D,
0x229F, 0x22A3, 0x22B7, 0x22BD, 0x22DB, 0x22E1, 0x22E5, 0x22ED,
0x22F7, 0x2303, 0x2309, 0x230B, 0x2327, 0x2329, 0x232F, 0x2333,
0x2335, 0x2345, 0x2351, 0x2353, 0x2359, 0x2363, 0x236B, 0x2383,
0x238F, 0x2395, 0x23A7, 0x23AD, 0x23B1, 0x23BF, 0x23C5, 0x23C9,
0x23D5, 0x23DD, 0x23E3, 0x23EF, 0x23F3, 0x23F9, 0x2405, 0x240B,
0x2417, 0x2419, 0x2429, 0x243D, 0x2441, 0x2443, 0x244D, 0x245F,
0x2467, 0x246B, 0x2479, 0x247D, 0x247F, 0x2485, 0x249B, 0x24A1,
0x24AF, 0x24B5, 0x24BB, 0x24C5, 0x24CB, 0x24CD, 0x24D7, 0x24D9,
0x24DD, 0x24DF, 0x24F5, 0x24F7, 0x24FB, 0x2501, 0x2507, 0x2513,
0x2519, 0x2527, 0x2531, 0x253D, 0x2543, 0x254B, 0x254F, 0x2573,
0x2581, 0x258D, 0x2593, 0x2597, 0x259D, 0x259F, 0x25AB, 0x25B1,
0x25BD, 0x25CD, 0x25CF, 0x25D9, 0x25E1, 0x25F7, 0x25F9, 0x2605,
0x260B, 0x260F, 0x2615, 0x2627, 0x2629, 0x2635, 0x263B, 0x263F,
0x264B, 0x2653, 0x2659, 0x2665, 0x2669, 0x266F, 0x267B, 0x2681,
0x2683, 0x268F, 0x269B, 0x269F, 0x26AD, 0x26B3, 0x26C3, 0x26C9,
0x26CB, 0x26D5, 0x26DD, 0x26EF, 0x26F5, 0x2717, 0x2719, 0x2735,
0x2737, 0x274D, 0x2753, 0x2755, 0x275F, 0x276B, 0x276D, 0x2773,
0x2777, 0x277F, 0x2795, 0x279B, 0x279D, 0x27A7, 0x27AF, 0x27B3,
0x27B9, 0x27C1, 0x27C5, 0x27D1, 0x27E3, 0x27EF, 0x2803, 0x2807,
0x280D, 0x2813, 0x281B, 0x281F, 0x2821, 0x2831, 0x283D, 0x283F,
0x2849, 0x2851, 0x285B, 0x285D, 0x2861, 0x2867, 0x2875, 0x2881,
0x2897, 0x289F, 0x28BB, 0x28BD, 0x28C1, 0x28D5, 0x28D9, 0x28DB,
0x28DF, 0x28ED, 0x28F7, 0x2903, 0x2905, 0x2911, 0x2921, 0x2923,
0x293F, 0x2947, 0x295D, 0x2965, 0x2969, 0x296F, 0x2975, 0x2983,
0x2987, 0x298F, 0x299B, 0x29A1, 0x29A7, 0x29AB, 0x29BF, 0x29C3,
0x29D5, 0x29D7, 0x29E3, 0x29E9, 0x29ED, 0x29F3, 0x2A01, 0x2A13,
0x2A1D, 0x2A25, 0x2A2F, 0x2A4F, 0x2A55, 0x2A5F, 0x2A65, 0x2A6B,
0x2A6D, 0x2A73, 0x2A83, 0x2A89, 0x2A8B, 0x2A97, 0x2A9D, 0x2AB9,
0x2ABB, 0x2AC5, 0x2ACD, 0x2ADD, 0x2AE3, 0x2AEB, 0x2AF1, 0x2AFB,
0x2B13, 0x2B27, 0x2B31, 0x2B33, 0x2B3D, 0x2B3F, 0x2B4B, 0x2B4F,
0x2B55, 0x2B69, 0x2B6D, 0x2B6F, 0x2B7B, 0x2B8D, 0x2B97, 0x2B99,
0x2BA3, 0x2BA5, 0x2BA9, 0x2BBD, 0x2BCD, 0x2BE7, 0x2BEB, 0x2BF3,
0x2BF9, 0x2BFD, 0x2C09, 0x2C0F, 0x2C17, 0x2C23, 0x2C2F, 0x2C35,
0x2C39, 0x2C41, 0x2C57, 0x2C59, 0x2C69, 0x2C77, 0x2C81, 0x2C87,
0x2C93, 0x2C9F, 0x2CAD, 0x2CB3, 0x2CB7, 0x2CCB, 0x2CCF, 0x2CDB,
0x2CE1, 0x2CE3, 0x2CE9, 0x2CEF, 0x2CFF, 0x2D07, 0x2D1D, 0x2D1F,
0x2D3B, 0x2D43, 0x2D49, 0x2D4D, 0x2D61, 0x2D65, 0x2D71, 0x2D89,
0x2D9D, 0x2DA1, 0x2DA9, 0x2DB3, 0x2DB5, 0x2DC5, 0x2DC7, 0x2DD3,
0x2DDF, 0x2E01, 0x2E03, 0x2E07, 0x2E0D, 0x2E19, 0x2E1F, 0x2E25,
0x2E2D, 0x2E33, 0x2E37, 0x2E39, 0x2E3F, 0x2E57, 0x2E5B, 0x2E6F,
0x2E79, 0x2E7F, 0x2E85, 0x2E93, 0x2E97, 0x2E9D, 0x2EA3, 0x2EA5,
0x2EB1, 0x2EB7, 0x2EC1, 0x2EC3, 0x2ECD, 0x2ED3, 0x2EE7, 0x2EEB,
0x2F05, 0x2F09, 0x2F0B, 0x2F11, 0x2F27, 0x2F29, 0x2F41, 0x2F45,
0x2F4B, 0x2F4D, 0x2F51, 0x2F57, 0x2F6F, 0x2F75, 0x2F7D, 0x2F81,
0x2F83, 0x2FA5, 0x2FAB, 0x2FB3, 0x2FC3, 0x2FCF, 0x2FD1, 0x2FDB,
0x2FDD, 0x2FE7, 0x2FED, 0x2FF5, 0x2FF9, 0x3001, 0x300D, 0x3023,
0x3029, 0x3037, 0x303B, 0x3055, 0x3059, 0x305B, 0x3067, 0x3071,
0x3079, 0x307D, 0x3085, 0x3091, 0x3095, 0x30A3, 0x30A9, 0x30B9,
0x30BF, 0x30C7, 0x30CB, 0x30D1, 0x30D7, 0x30DF, 0x30E5, 0x30EF,
0x30FB, 0x30FD, 0x3103, 0x3109, 0x3119, 0x3121, 0x3127, 0x312D,
0x3139, 0x3143, 0x3145, 0x314B, 0x315D, 0x3161, 0x3167, 0x316D,
0x3173, 0x317F, 0x3191, 0x3199, 0x319F, 0x31A9, 0x31B1, 0x31C3,
0x31C7, 0x31D5, 0x31DB, 0x31ED, 0x31F7, 0x31FF, 0x3209, 0x3215,
0x3217, 0x321D, 0x3229, 0x3235, 0x3259, 0x325D, 0x3263, 0x326B,
0x326F, 0x3275, 0x3277, 0x327B, 0x328D, 0x3299, 0x329F, 0x32A7,
0x32AD, 0x32B3, 0x32B7, 0x32C9, 0x32CB, 0x32CF, 0x32D1, 0x32E9,
0x32ED, 0x32F3, 0x32F9, 0x3307, 0x3325, 0x332B, 0x332F, 0x3335,
0x3341, 0x3347, 0x335B, 0x335F, 0x3367, 0x336B, 0x3373, 0x3379,
0x337F, 0x3383, 0x33A1, 0x33A3, 0x33AD, 0x33B9, 0x33C1, 0x33CB,
0x33D3, 0x33EB, 0x33F1, 0x33FD, 0x3401, 0x340F, 0x3413, 0x3419,
0x341B, 0x3437, 0x3445, 0x3455, 0x3457, 0x3463, 0x3469, 0x346D,
0x3481, 0x348B, 0x3491, 0x3497, 0x349D, 0x34A5, 0x34AF, 0x34BB,
0x34C9, 0x34D3, 0x34E1, 0x34F1, 0x34FF, 0x3509, 0x3517, 0x351D,
0x352D, 0x3533, 0x353B, 0x3541, 0x3551, 0x3565, 0x356F, 0x3571,
0x3577, 0x357B, 0x357D, 0x3581, 0x358D, 0x358F, 0x3599, 0x359B,
0x35A1, 0x35B7, 0x35BD, 0x35BF, 0x35C3, 0x35D5, 0x35DD, 0x35E7,
0x35EF, 0x3605, 0x3607, 0x3611, 0x3623, 0x3631, 0x3635, 0x3637,
0x363B, 0x364D, 0x364F, 0x3653, 0x3659, 0x3661, 0x366B, 0x366D,
0x368B, 0x368F, 0x36AD, 0x36AF, 0x36B9, 0x36BB, 0x36CD, 0x36D1,
0x36E3, 0x36E9, 0x36F7, 0x3701, 0x3703, 0x3707, 0x371B, 0x373F,
0x3745, 0x3749, 0x374F, 0x375D, 0x3761, 0x3775, 0x377F, 0x378D,
0x37A3, 0x37A9, 0x37AB, 0x37C9, 0x37D5, 0x37DF, 0x37F1, 0x37F3,
0x37F7, 0x3805, 0x380B, 0x3821, 0x3833, 0x3835, 0x3841, 0x3847,
0x384B, 0x3853, 0x3857, 0x385F, 0x3865, 0x386F, 0x3871, 0x387D,
0x388F, 0x3899, 0x38A7, 0x38B7, 0x38C5, 0x38C9, 0x38CF, 0x38D5,
0x38D7, 0x38DD, 0x38E1, 0x38E3, 0x38FF, 0x3901, 0x391D, 0x3923,
0x3925, 0x3929, 0x392F, 0x393D, 0x3941, 0x394D, 0x395B, 0x396B,
0x3979, 0x397D, 0x3983, 0x398B, 0x3991, 0x3995, 0x399B, 0x39A1,
0x39A7, 0x39AF, 0x39B3, 0x39BB, 0x39BF, 0x39CD, 0x39DD, 0x39E5,
0x39EB, 0x39EF, 0x39FB, 0x3A03, 0x3A13, 0x3A15, 0x3A1F, 0x3A27,
0x3A2B, 0x3A31, 0x3A4B, 0x3A51, 0x3A5B, 0x3A63, 0x3A67, 0x3A6D,
0x3A79, 0x3A87, 0x3AA5, 0x3AA9, 0x3AB7, 0x3ACD, 0x3AD5, 0x3AE1,
0x3AE5, 0x3AEB, 0x3AF3, 0x3AFD, 0x3B03, 0x3B11, 0x3B1B, 0x3B21,
0x3B23, 0x3B2D, 0x3B39, 0x3B45, 0x3B53, 0x3B59, 0x3B5F, 0x3B71,
0x3B7B, 0x3B81, 0x3B89, 0x3B9B, 0x3B9F, 0x3BA5, 0x3BA7, 0x3BAD,
0x3BB7, 0x3BB9, 0x3BC3, 0x3BCB, 0x3BD1, 0x3BD7, 0x3BE1, 0x3BE3,
0x3BF5, 0x3BFF, 0x3C01, 0x3C0D, 0x3C11, 0x3C17, 0x3C1F, 0x3C29,
0x3C35, 0x3C43, 0x3C4F, 0x3C53, 0x3C5B, 0x3C65, 0x3C6B, 0x3C71,
0x3C85, 0x3C89, 0x3C97, 0x3CA7, 0x3CB5, 0x3CBF, 0x3CC7, 0x3CD1,
0x3CDD, 0x3CDF, 0x3CF1, 0x3CF7, 0x3D03, 0x3D0D, 0x3D19, 0x3D1B,
0x3D1F, 0x3D21, 0x3D2D, 0x3D33, 0x3D37, 0x3D3F, 0x3D43, 0x3D6F,
0x3D73, 0x3D75, 0x3D79, 0x3D7B, 0x3D85, 0x3D91, 0x3D97, 0x3D9D,
0x3DAB, 0x3DAF, 0x3DB5, 0x3DBB, 0x3DC1, 0x3DC9, 0x3DCF, 0x3DF3,
0x3E05, 0x3E09, 0x3E0F, 0x3E11, 0x3E1D, 0x3E23, 0x3E29, 0x3E2F,
0x3E33, 0x3E41, 0x3E57, 0x3E63, 0x3E65, 0x3E77, 0x3E81, 0x3E87,
0x3EA1, 0x3EB9, 0x3EBD, 0x3EBF, 0x3EC3, 0x3EC5, 0x3EC9, 0x3ED7,
0x3EDB, 0x3EE1, 0x3EE7, 0x3EEF, 0x3EFF, 0x3F0B, 0x3F0D, 0x3F37,
0x3F3B, 0x3F3D, 0x3F41, 0x3F59, 0x3F5F, 0x3F65, 0x3F67, 0x3F79,
0x3F7D, 0x3F8B, 0x3F91, 0x3FAD, 0x3FBF, 0x3FCD, 0x3FD3, 0x3FDD,
0x3FE9, 0x3FEB, 0x3FF1, 0x3FFD, 0x401B, 0x4021, 0x4025, 0x402B,
0x4031, 0x403F, 0x4043, 0x4045, 0x405D, 0x4061, 0x4067, 0x406D,
0x4087, 0x4091, 0x40A3, 0x40A9, 0x40B1, 0x40B7, 0x40BD, 0x40DB,
0x40DF, 0x40EB, 0x40F7, 0x40F9, 0x4109, 0x410B, 0x4111, 0x4115,
0x4121, 0x4133, 0x4135, 0x413B, 0x413F, 0x4159, 0x4165, 0x416B,
0x4177, 0x417B, 0x4193, 0x41AB, 0x41B7, 0x41BD, 0x41BF, 0x41CB,
0x41E7, 0x41EF, 0x41F3, 0x41F9, 0x4205, 0x4207, 0x4219, 0x421F,
0x4223, 0x4229, 0x422F, 0x4243, 0x4253, 0x4255, 0x425B, 0x4261,
0x4273, 0x427D, 0x4283, 0x4285, 0x4289, 0x4291, 0x4297, 0x429D,
0x42B5, 0x42C5, 0x42CB, 0x42D3, 0x42DD, 0x42E3, 0x42F1, 0x4307,
0x430F, 0x431F, 0x4325, 0x4327, 0x4333, 0x4337, 0x4339, 0x434F,
0x4357, 0x4369, 0x438B, 0x438D, 0x4393, 0x43A5, 0x43A9, 0x43AF,
0x43B5, 0x43BD, 0x43C7, 0x43CF, 0x43E1, 0x43E7, 0x43EB, 0x43ED,
0x43F1, 0x43F9, 0x4409, 0x440B, 0x4417, 0x4423, 0x4429, 0x443B,
0x443F, 0x4445, 0x444B, 0x4451, 0x4453, 0x4459, 0x4465, 0x446F,
0x4483, 0x448F, 0x44A1, 0x44A5, 0x44AB, 0x44AD, 0x44BD, 0x44BF,
0x44C9, 0x44D7, 0x44DB, 0x44F9, 0x44FB, 0x4505, 0x4511, 0x4513,
0x452B, 0x4531, 0x4541, 0x4549, 0x4553, 0x4555, 0x4561, 0x4577,
0x457D, 0x457F, 0x458F, 0x45A3, 0x45AD, 0x45AF, 0x45BB, 0x45C7,
0x45D9, 0x45E3, 0x45EF, 0x45F5, 0x45F7, 0x4601, 0x4603, 0x4609,
0x4613, 0x4625, 0x4627, 0x4633, 0x4639, 0x463D, 0x4643, 0x4645,
0x465D, 0x4679, 0x467B, 0x467F, 0x4681, 0x468B, 0x468D, 0x469D,
0x46A9, 0x46B1, 0x46C7, 0x46C9, 0x46CF, 0x46D3, 0x46D5, 0x46DF,
0x46E5, 0x46F9, 0x4705, 0x470F, 0x4717, 0x4723, 0x4729, 0x472F,
0x4735, 0x4739, 0x474B, 0x474D, 0x4751, 0x475D, 0x476F, 0x4771,
0x477D, 0x4783, 0x4787, 0x4789, 0x4799, 0x47A5, 0x47B1, 0x47BF,
0x47C3, 0x47CB, 0x47DD, 0x47E1, 0x47ED, 0x47FB, 0x4801, 0x4807,
0x480B, 0x4813, 0x4819, 0x481D, 0x4831, 0x483D, 0x4847, 0x4855,
0x4859, 0x485B, 0x486B, 0x486D, 0x4879, 0x4897, 0x489B, 0x48A1,
0x48B9, 0x48CD, 0x48E5, 0x48EF, 0x48F7, 0x4903, 0x490D, 0x4919,
0x491F, 0x492B, 0x4937, 0x493D, 0x4945, 0x4955, 0x4963, 0x4969,
0x496D, 0x4973, 0x4997, 0x49AB, 0x49B5, 0x49D3, 0x49DF, 0x49E1,
0x49E5, 0x49E7, 0x4A03, 0x4A0F, 0x4A1D, 0x4A23, 0x4A39, 0x4A41,
0x4A45, 0x4A57, 0x4A5D, 0x4A6B, 0x4A7D, 0x4A81, 0x4A87, 0x4A89,
0x4A8F, 0x4AB1, 0x4AC3, 0x4AC5, 0x4AD5, 0x4ADB, 0x4AED, 0x4AEF,
0x4B07, 0x4B0B, 0x4B0D, 0x4B13, 0x4B1F, 0x4B25, 0x4B31, 0x4B3B,
0x4B43, 0x4B49, 0x4B59, 0x4B65, 0x4B6D, 0x4B77, 0x4B85, 0x4BAD,
0x4BB3, 0x4BB5, 0x4BBB, 0x4BBF, 0x4BCB, 0x4BD9, 0x4BDD, 0x4BDF,
0x4BE3, 0x4BE5, 0x4BE9, 0x4BF1, 0x4BF7, 0x4C01, 0x4C07, 0x4C0D,
0x4C0F, 0x4C15, 0x4C1B, 0x4C21, 0x4C2D, 0x4C33, 0x4C4B, 0x4C55,
0x4C57, 0x4C61, 0x4C67, 0x4C73, 0x4C79, 0x4C7F, 0x4C8D, 0x4C93,
0x4C99, 0x4CCD, 0x4CE1, 0x4CE7, 0x4CF1, 0x4CF3, 0x4CFD, 0x4D05,
0x4D0F, 0x4D1B, 0x4D27, 0x4D29, 0x4D2F, 0x4D33, 0x4D41, 0x4D51,
0x4D59, 0x4D65, 0x4D6B, 0x4D81, 0x4D83, 0x4D8D, 0x4D95, 0x4D9B,
0x4DB1, 0x4DB3, 0x4DC9, 0x4DCF, 0x4DD7, 0x4DE1, 0x4DED, 0x4DF9,
0x4DFB, 0x4E05, 0x4E0B, 0x4E17, 0x4E19, 0x4E1D, 0x4E2B, 0x4E35,
0x4E37, 0x4E3D, 0x4E4F, 0x4E53, 0x4E5F, 0x4E67, 0x4E79, 0x4E85,
0x4E8B, 0x4E91, 0x4E95, 0x4E9B, 0x4EA1, 0x4EAF, 0x4EB3, 0x4EB5,
0x4EC1, 0x4ECD, 0x4ED1, 0x4ED7, 0x4EE9, 0x4EFB, 0x4F07, 0x4F09,
0x4F19, 0x4F25, 0x4F2D, 0x4F3F, 0x4F49, 0x4F63, 0x4F67, 0x4F6D,
0x4F75, 0x4F7B, 0x4F81, 0x4F85, 0x4F87, 0x4F91, 0x4FA5, 0x4FA9,
0x4FAF, 0x4FB7, 0x4FBB, 0x4FCF, 0x4FD9, 0x4FDB, 0x4FFD, 0x4FFF,
0x5003, 0x501B, 0x501D, 0x5029, 0x5035, 0x503F, 0x5045, 0x5047,
0x5053, 0x5071, 0x5077, 0x5083, 0x5093, 0x509F, 0x50A1, 0x50B7,
0x50C9, 0x50D5, 0x50E3, 0x50ED, 0x50EF, 0x50FB, 0x5107, 0x510B,
0x510D, 0x5111, 0x5117, 0x5123, 0x5125, 0x5135, 0x5147, 0x5149,
0x5171, 0x5179, 0x5189, 0x518F, 0x5197, 0x51A1, 0x51A3, 0x51A7,
0x51B9, 0x51C1, 0x51CB, 0x51D3, 0x51DF, 0x51E3, 0x51F5, 0x51F7,
0x5209, 0x5213, 0x5215, 0x5219, 0x521B, 0x521F, 0x5227, 0x5243,
0x5245, 0x524B, 0x5261, 0x526D, 0x5273, 0x5281, 0x5293, 0x5297,
0x529D, 0x52A5, 0x52AB, 0x52B1, 0x52BB, 0x52C3, 0x52C7, 0x52C9,
0x52DB, 0x52E5, 0x52EB, 0x52FF, 0x5315, 0x531D, 0x5323, 0x5341,
0x5345, 0x5347, 0x534B, 0x535D, 0x5363, 0x5381, 0x5383, 0x5387,
0x538F, 0x5395, 0x5399, 0x539F, 0x53AB, 0x53B9, 0x53DB, 0x53E9,
0x53EF, 0x53F3, 0x53F5, 0x53FB, 0x53FF, 0x540D, 0x5411, 0x5413,
0x5419, 0x5435, 0x5437, 0x543B, 0x5441, 0x5449, 0x5453, 0x5455,
0x545F, 0x5461, 0x546B, 0x546D, 0x5471, 0x548F, 0x5491, 0x549D,
0x54A9, 0x54B3, 0x54C5, 0x54D1, 0x54DF, 0x54E9, 0x54EB, 0x54F7,
0x54FD, 0x5507, 0x550D, 0x551B, 0x5527, 0x552B, 0x5539, 0x553D,
0x554F, 0x5551, 0x555B, 0x5563, 0x5567, 0x556F, 0x5579, 0x5585,
0x5597, 0x55A9, 0x55B1, 0x55B7, 0x55C9, 0x55D9, 0x55E7, 0x55ED,
0x55F3, 0x55FD, 0x560B, 0x560F, 0x5615, 0x5617, 0x5623, 0x562F,
0x5633, 0x5639, 0x563F, 0x564B, 0x564D, 0x565D, 0x565F, 0x566B,
0x5671, 0x5675, 0x5683, 0x5689, 0x568D, 0x568F, 0x569B, 0x56AD,
0x56B1, 0x56D5, 0x56E7, 0x56F3, 0x56FF, 0x5701, 0x5705, 0x5707,
0x570B, 0x5713, 0x571F, 0x5723, 0x5747, 0x574D, 0x575F, 0x5761,
0x576D, 0x5777, 0x577D, 0x5789, 0x57A1, 0x57A9, 0x57AF, 0x57B5,
0x57C5, 0x57D1, 0x57D3, 0x57E5, 0x57EF, 0x5803, 0x580D, 0x580F,
0x5815, 0x5827, 0x582B, 0x582D, 0x5855, 0x585B, 0x585D, 0x586D,
0x586F, 0x5873, 0x587B, 0x588D, 0x5897, 0x58A3, 0x58A9, 0x58AB,
0x58B5, 0x58BD, 0x58C1, 0x58C7, 0x58D3, 0x58D5, 0x58DF, 0x58F1,
0x58F9, 0x58FF, 0x5903, 0x5917, 0x591B, 0x5921, 0x5945, 0x594B,
0x594D, 0x5957, 0x595D, 0x5975, 0x597B, 0x5989, 0x5999, 0x599F,
0x59B1, 0x59B3, 0x59BD, 0x59D1, 0x59DB, 0x59E3, 0x59E9, 0x59ED,
0x59F3, 0x59F5, 0x59FF, 0x5A01, 0x5A0D, 0x5A11, 0x5A13, 0x5A17,
0x5A1F, 0x5A29, 0x5A2F, 0x5A3B, 0x5A4D, 0x5A5B, 0x5A67, 0x5A77,
0x5A7F, 0x5A85, 0x5A95, 0x5A9D, 0x5AA1, 0x5AA3, 0x5AA9, 0x5ABB,
0x5AD3, 0x5AE5, 0x5AEF, 0x5AFB, 0x5AFD, 0x5B01, 0x5B0F, 0x5B19,
0x5B1F, 0x5B25, 0x5B2B, 0x5B3D, 0x5B49, 0x5B4B, 0x5B67, 0x5B79,
0x5B87, 0x5B97, 0x5BA3, 0x5BB1, 0x5BC9, 0x5BD5, 0x5BEB, 0x5BF1,
0x5BF3, 0x5BFD, 0x5C05, 0x5C09, 0x5C0B, 0x5C0F, 0x5C1D, 0x5C29,
0x5C2F, 0x5C33, 0x5C39, 0x5C47, 0x5C4B, 0x5C4D, 0x5C51, 0x5C6F,
0x5C75, 0x5C77, 0x5C7D, 0x5C87, 0x5C89, 0x5CA7, 0x5CBD, 0x5CBF,
0x5CC3, 0x5CC9, 0x5CD1, 0x5CD7, 0x5CDD, 0x5CED, 0x5CF9, 0x5D05,
0x5D0B, 0x5D13, 0x5D17, 0x5D19, 0x5D31, 0x5D3D, 0x5D41, 0x5D47,
0x5D4F, 0x5D55, 0x5D5B, 0x5D65, 0x5D67, 0x5D6D, 0x5D79, 0x5D95,
0x5DA3, 0x5DA9, 0x5DAD, 0x5DB9, 0x5DC1, 0x5DC7, 0x5DD3, 0x5DD7,
0x5DDD, 0x5DEB, 0x5DF1, 0x5DFD, 0x5E07, 0x5E0D, 0x5E13, 0x5E1B,
0x5E21, 0x5E27, 0x5E2B, 0x5E2D, 0x5E31, 0x5E39, 0x5E45, 0x5E49,
0x5E57, 0x5E69, 0x5E73, 0x5E75, 0x5E85, 0x5E8B, 0x5E9F, 0x5EA5,
0x5EAF, 0x5EB7, 0x5EBB, 0x5ED9, 0x5EFD, 0x5F09, 0x5F11, 0x5F27,
0x5F33, 0x5F35, 0x5F3B, 0x5F47, 0x5F57, 0x5F5D, 0x5F63, 0x5F65,
0x5F77, 0x5F7B, 0x5F95, 0x5F99, 0x5FA1, 0x5FB3, 0x5FBD, 0x5FC5,
0x5FCF, 0x5FD5, 0x5FE3, 0x5FE7, 0x5FFB, 0x6011, 0x6023, 0x602F,
0x6037, 0x6053, 0x605F, 0x6065, 0x606B, 0x6073, 0x6079, 0x6085,
0x609D, 0x60AD, 0x60BB, 0x60BF, 0x60CD, 0x60D9, 0x60DF, 0x60E9,
0x60F5, 0x6109, 0x610F, 0x6113, 0x611B, 0x612D, 0x6139, 0x614B,
0x6155, 0x6157, 0x615B, 0x616F, 0x6179, 0x6187, 0x618B, 0x6191,
0x6193, 0x619D, 0x61B5, 0x61C7, 0x61C9, 0x61CD, 0x61E1, 0x61F1,
0x61FF, 0x6209, 0x6217, 0x621D, 0x6221, 0x6227, 0x623B, 0x6241,
0x624B, 0x6251, 0x6253, 0x625F, 0x6265, 0x6283, 0x628D, 0x6295,
0x629B, 0x629F, 0x62A5, 0x62AD, 0x62D5, 0x62D7, 0x62DB, 0x62DD,
0x62E9, 0x62FB, 0x62FF, 0x6305, 0x630D, 0x6317, 0x631D, 0x632F,
0x6341, 0x6343, 0x634F, 0x635F, 0x6367, 0x636D, 0x6371, 0x6377,
0x637D, 0x637F, 0x63B3, 0x63C1, 0x63C5, 0x63D9, 0x63E9, 0x63EB,
0x63EF, 0x63F5, 0x6401, 0x6403, 0x6409, 0x6415, 0x6421, 0x6427,
0x642B, 0x6439, 0x6443, 0x6449, 0x644F, 0x645D, 0x6467, 0x6475,
0x6485, 0x648D, 0x6493, 0x649F, 0x64A3, 0x64AB, 0x64C1, 0x64C7,
0x64C9, 0x64DB, 0x64F1, 0x64F7, 0x64F9, 0x650B, 0x6511, 0x6521,
0x652F, 0x6539, 0x653F, 0x654B, 0x654D, 0x6553, 0x6557, 0x655F,
0x6571, 0x657D, 0x658D, 0x658F, 0x6593, 0x65A1, 0x65A5, 0x65AD,
0x65B9, 0x65C5, 0x65E3, 0x65F3, 0x65FB, 0x65FF, 0x6601, 0x6607,
0x661D, 0x6629, 0x6631, 0x663B, 0x6641, 0x6647, 0x664D, 0x665B,
0x6661, 0x6673, 0x667D, 0x6689, 0x668B, 0x6695, 0x6697, 0x669B,
0x66B5, 0x66B9, 0x66C5, 0x66CD, 0x66D1, 0x66E3, 0x66EB, 0x66F5,
0x6703, 0x6713, 0x6719, 0x671F, 0x6727, 0x6731, 0x6737, 0x673F,
0x6745, 0x6751, 0x675B, 0x676F, 0x6779, 0x6781, 0x6785, 0x6791,
0x67AB, 0x67BD, 0x67C1, 0x67CD, 0x67DF, 0x67E5, 0x6803, 0x6809,
0x6811, 0x6817, 0x682D, 0x6839, 0x683B, 0x683F, 0x6845, 0x684B,
0x684D, 0x6857, 0x6859, 0x685D, 0x6863, 0x6869, 0x686B, 0x6871,
0x6887, 0x6899, 0x689F, 0x68B1, 0x68BD, 0x68C5, 0x68D1, 0x68D7,
0x68E1, 0x68ED, 0x68EF, 0x68FF, 0x6901, 0x690B, 0x690D, 0x6917,
0x6929, 0x692F, 0x6943, 0x6947, 0x6949, 0x694F, 0x6965, 0x696B,
0x6971, 0x6983, 0x6989, 0x6997, 0x69A3, 0x69B3, 0x69B5, 0x69BB,
0x69C1, 0x69C5, 0x69D3, 0x69DF, 0x69E3, 0x69E5, 0x69F7, 0x6A07,
0x6A2B, 0x6A37, 0x6A3D, 0x6A4B, 0x6A67, 0x6A69, 0x6A75, 0x6A7B,
0x6A87, 0x6A8D, 0x6A91, 0x6A93, 0x6AA3, 0x6AC1, 0x6AC9, 0x6AE1,
0x6AE7, 0x6B05, 0x6B0F, 0x6B11, 0x6B23, 0x6B27, 0x6B2D, 0x6B39,
0x6B41, 0x6B57, 0x6B59, 0x6B5F, 0x6B75, 0x6B87, 0x6B89, 0x6B93,
0x6B95, 0x6B9F, 0x6BBD, 0x6BBF, 0x6BDB, 0x6BE1, 0x6BEF, 0x6BFF,
0x6C05, 0x6C19, 0x6C29, 0x6C2B, 0x6C31, 0x6C35, 0x6C55, 0x6C59,
0x6C5B, 0x6C5F, 0x6C65, 0x6C67, 0x6C73, 0x6C77, 0x6C7D, 0x6C83,
0x6C8F, 0x6C91, 0x6C97, 0x6C9B, 0x6CA1, 0x6CA9, 0x6CAF, 0x6CB3,
0x6CC7, 0x6CCB, 0x6CEB, 0x6CF5, 0x6CFD, 0x6D0D, 0x6D0F, 0x6D25,
0x6D27, 0x6D2B, 0x6D31, 0x6D39, 0x6D3F, 0x6D4F, 0x6D5D, 0x6D61,
0x6D73, 0x6D7B, 0x6D7F, 0x6D93, 0x6D99, 0x6DA5, 0x6DB1, 0x6DB7,
0x6DC1, 0x6DC3, 0x6DCD, 0x6DCF, 0x6DDB, 0x6DF7, 0x6E03, 0x6E15,
0x6E17, 0x6E29, 0x6E33, 0x6E3B, 0x6E45, 0x6E75, 0x6E77, 0x6E7B,
0x6E81, 0x6E89, 0x6E93, 0x6E95, 0x6E9F, 0x6EBD, 0x6EBF, 0x6EE3,
0x6EE9, 0x6EF3, 0x6EF9, 0x6EFB, 0x6F0D, 0x6F11, 0x6F17, 0x6F1F,
0x6F2F, 0x6F3D, 0x6F4D, 0x6F53, 0x6F61, 0x6F65, 0x6F79, 0x6F7D,
0x6F83, 0x6F85, 0x6F8F, 0x6F9B, 0x6F9D, 0x6FA3, 0x6FAF, 0x6FB5,
0x6FBB, 0x6FBF, 0x6FCB, 0x6FCD, 0x6FD3, 0x6FD7, 0x6FE3, 0x6FE9,
0x6FF1, 0x6FF5, 0x6FF7, 0x6FFD, 0x700F, 0x7019, 0x701F, 0x7027,
0x7033, 0x7039, 0x704F, 0x7051, 0x7057, 0x7063, 0x7075, 0x7079,
0x7087, 0x708D, 0x7091, 0x70A5, 0x70AB, 0x70BB, 0x70C3, 0x70C7,
0x70CF, 0x70E5, 0x70ED, 0x70F9, 0x70FF, 0x7105, 0x7115, 0x7121,
0x7133, 0x7151, 0x7159, 0x715D, 0x715F, 0x7163, 0x7169, 0x7183,
0x7187, 0x7195, 0x71AD, 0x71C3, 0x71C9, 0x71CB, 0x71D1, 0x71DB,
0x71E1, 0x71EF, 0x71F5, 0x71FB, 0x7207, 0x7211, 0x7217, 0x7219,
0x7225, 0x722F, 0x723B, 0x7243, 0x7255, 0x7267, 0x7271, 0x7277,
0x727F, 0x728F, 0x7295, 0x729B, 0x72A3, 0x72B3, 0x72C7, 0x72CB,
0x72CD, 0x72D7, 0x72D9, 0x72E3, 0x72EF, 0x72F5, 0x72FD, 0x7303,
0x730D, 0x7321, 0x732B, 0x733D, 0x7357, 0x735B, 0x7361, 0x737F,
0x7381, 0x7385, 0x738D, 0x7393, 0x739F, 0x73AB, 0x73BD, 0x73C1,
0x73C9, 0x73DF, 0x73E5, 0x73E7, 0x73F3, 0x7415, 0x741B, 0x742D,
0x7439, 0x743F, 0x7441, 0x745D, 0x746B, 0x747B, 0x7489, 0x748D,
0x749B, 0x74A7, 0x74AB, 0x74B1, 0x74B7, 0x74B9, 0x74DD, 0x74E1,
0x74E7, 0x74FB, 0x7507, 0x751F, 0x7525, 0x753B, 0x753D, 0x754D,
0x755F, 0x756B, 0x7577, 0x7589, 0x758B, 0x7591, 0x7597, 0x759D,
0x75A1, 0x75A7, 0x75B5, 0x75B9, 0x75BB, 0x75D1, 0x75D9, 0x75E5,
0x75EB, 0x75F5, 0x75FB, 0x7603, 0x760F, 0x7621, 0x762D, 0x7633,
0x763D, 0x763F, 0x7655, 0x7663, 0x7669, 0x766F, 0x7673, 0x7685,
0x768B, 0x769F, 0x76B5, 0x76B7, 0x76C3, 0x76DB, 0x76DF, 0x76F1,
0x7703, 0x7705, 0x771B, 0x771D, 0x7721, 0x772D, 0x7735, 0x7741,
0x774B, 0x7759, 0x775D, 0x775F, 0x7771, 0x7781, 0x77A7, 0x77AD,
0x77B3, 0x77B9, 0x77C5, 0x77CF, 0x77D5, 0x77E1, 0x77E9, 0x77EF,
0x77F3, 0x77F9, 0x7807, 0x7825, 0x782B, 0x7835, 0x783D, 0x7853,
0x7859, 0x7861, 0x786D, 0x7877, 0x7879, 0x7883, 0x7885, 0x788B,
0x7895, 0x7897, 0x78A1, 0x78AD, 0x78BF, 0x78D3, 0x78D9, 0x78DD,
0x78E5, 0x78FB, 0x7901, 0x7907, 0x7925, 0x792B, 0x7939, 0x793F,
0x794B, 0x7957, 0x795D, 0x7967, 0x7969, 0x7973, 0x7991, 0x7993,
0x79A3, 0x79AB, 0x79AF, 0x79B1, 0x79B7, 0x79C9, 0x79CD, 0x79CF,
0x79D5, 0x79D9, 0x79F3, 0x79F7, 0x79FF, 0x7A05, 0x7A0F, 0x7A11,
0x7A15, 0x7A1B, 0x7A23, 0x7A27, 0x7A2D, 0x7A4B, 0x7A57, 0x7A59,
0x7A5F, 0x7A65, 0x7A69, 0x7A7D, 0x7A93, 0x7A9B, 0x7A9F, 0x7AA1,
0x7AA5, 0x7AED, 0x7AF5, 0x7AF9, 0x7B01, 0x7B17, 0x7B19, 0x7B1D,
0x7B2B, 0x7B35, 0x7B37, 0x7B3B, 0x7B4F, 0x7B55, 0x7B5F, 0x7B71,
0x7B77, 0x7B8B, 0x7B9B, 0x7BA1, 0x7BA9, 0x7BAF, 0x7BB3, 0x7BC7,
0x7BD3, 0x7BE9, 0x7BEB, 0x7BEF, 0x7BF1, 0x7BFD, 0x7C07, 0x7C19,
0x7C1B, 0x7C31, 0x7C37, 0x7C49, 0x7C67, 0x7C69, 0x7C73, 0x7C81,
0x7C8B, 0x7C93, 0x7CA3, 0x7CD5, 0x7CDB, 0x7CE5, 0x7CED, 0x7CF7,
0x7D03, 0x7D09, 0x7D1B, 0x7D1D, 0x7D33, 0x7D39, 0x7D3B, 0x7D3F,
0x7D45, 0x7D4D, 0x7D53, 0x7D59, 0x7D63, 0x7D75, 0x7D77, 0x7D8D,
0x7D8F, 0x7D9F, 0x7DAD, 0x7DB7, 0x7DBD, 0x7DBF, 0x7DCB, 0x7DD5,
0x7DE9, 0x7DED, 0x7DFB, 0x7E01, 0x7E05, 0x7E29, 0x7E2B, 0x7E2F,
0x7E35, 0x7E41, 0x7E43, 0x7E47, 0x7E55, 0x7E61, 0x7E67, 0x7E6B,
0x7E71, 0x7E73, 0x7E79, 0x7E7D, 0x7E91, 0x7E9B, 0x7E9D, 0x7EA7,
0x7EAD, 0x7EB9, 0x7EBB, 0x7ED3, 0x7EDF, 0x7EEB, 0x7EF1, 0x7EF7,
0x7EFB, 0x7F13, 0x7F15, 0x7F19, 0x7F31, 0x7F33, 0x7F39, 0x7F3D,
0x7F43, 0x7F4B, 0x7F5B, 0x7F61, 0x7F63, 0x7F6D, 0x7F79, 0x7F87,
0x7F8D, 0x7FAF, 0x7FB5, 0x7FC3, 0x7FC9, 0x7FCD, 0x7FCF, 0x7FED,
0x8003, 0x800B, 0x800F, 0x8015, 0x801D, 0x8021, 0x8023, 0x803F,
0x8041, 0x8047, 0x804B, 0x8065, 0x8077, 0x808D, 0x808F, 0x8095,
0x80A5, 0x80AB, 0x80AD, 0x80BD, 0x80C9, 0x80CB, 0x80D7, 0x80DB,
0x80E1, 0x80E7, 0x80F5, 0x80FF, 0x8105, 0x810D, 0x8119, 0x811D,
0x812F, 0x8131, 0x813B, 0x8143, 0x8153, 0x8159, 0x815F, 0x817D,
0x817F, 0x8189, 0x819B, 0x819D, 0x81A7, 0x81AF, 0x81B3, 0x81BB,
0x81C7, 0x81DF, 0x8207, 0x8209, 0x8215, 0x821F, 0x8225, 0x8231,
0x8233, 0x823F, 0x8243, 0x8245, 0x8249, 0x824F, 0x8261, 0x826F,
0x827B, 0x8281, 0x8285, 0x8293, 0x82B1, 0x82B5, 0x82BD, 0x82C7,
0x82CF, 0x82D5, 0x82DF, 0x82F1, 0x82F9, 0x82FD, 0x830B, 0x831B,
0x8321, 0x8329, 0x832D, 0x8333, 0x8335, 0x833F, 0x8341, 0x834D,
0x8351, 0x8353, 0x8357, 0x835D, 0x8365, 0x8369, 0x836F, 0x838F,
0x83A7, 0x83B1, 0x83B9, 0x83CB, 0x83D5, 0x83D7, 0x83DD, 0x83E7,
0x83E9, 0x83ED, 0x83FF, 0x8405, 0x8411, 0x8413, 0x8423, 0x8425,
0x843B, 0x8441, 0x8447, 0x844F, 0x8461, 0x8465, 0x8477, 0x8483,
0x848B, 0x8491, 0x8495, 0x84A9, 0x84AF, 0x84CD, 0x84E3, 0x84EF,
0x84F1, 0x84F7, 0x8509, 0x850D, 0x854B, 0x854F, 0x8551, 0x855D,
0x8563, 0x856D, 0x856F, 0x857B, 0x8587, 0x85A3, 0x85A5, 0x85A9,
0x85B7, 0x85CD, 0x85D3, 0x85D5, 0x85DB, 0x85E1, 0x85EB, 0x85F9,
0x85FD, 0x85FF, 0x8609, 0x860F, 0x8617, 0x8621, 0x862F, 0x8639,
0x863F, 0x8641, 0x864D, 0x8663, 0x8675, 0x867D, 0x8687, 0x8699,
0x86A5, 0x86A7, 0x86B3, 0x86B7, 0x86C3, 0x86C5, 0x86CF, 0x86D1,
0x86D7, 0x86E9, 0x86EF, 0x86F5, 0x8717, 0x871D, 0x871F, 0x872B,
0x872F, 0x8735, 0x8747, 0x8759, 0x875B, 0x876B, 0x8771, 0x8777,
0x877F, 0x8785, 0x878F, 0x87A1, 0x87A9, 0x87B3, 0x87BB, 0x87C5,
0x87C7, 0x87CB, 0x87DD, 0x87F7, 0x8803, 0x8819, 0x881B, 0x881F,
0x8821, 0x8837, 0x883D, 0x8843, 0x8851, 0x8861, 0x8867, 0x887B,
0x8885, 0x8891, 0x8893, 0x88A5, 0x88CF, 0x88D3, 0x88EB, 0x88ED,
0x88F3, 0x88FD, 0x8909, 0x890B, 0x8911, 0x891B, 0x8923, 0x8927,
0x892D, 0x8939, 0x8945, 0x894D, 0x8951, 0x8957, 0x8963, 0x8981,
0x8995, 0x899B, 0x89B3, 0x89B9, 0x89C3, 0x89CF, 0x89D1, 0x89DB,
0x89EF, 0x89F5, 0x89FB, 0x89FF, 0x8A0B, 0x8A19, 0x8A23, 0x8A35,
0x8A41, 0x8A49, 0x8A4F, 0x8A5B, 0x8A5F, 0x8A6D, 0x8A77, 0x8A79,
0x8A85, 0x8AA3, 0x8AB3, 0x8AB5, 0x8AC1, 0x8AC7, 0x8ACB, 0x8ACD,
0x8AD1, 0x8AD7, 0x8AF1, 0x8AF5, 0x8B07, 0x8B09, 0x8B0D, 0x8B13,
0x8B21, 0x8B57, 0x8B5D, 0x8B91, 0x8B93, 0x8BA3, 0x8BA9, 0x8BAF,
0x8BBB, 0x8BD5, 0x8BD9, 0x8BDB, 0x8BE1, 0x8BF7, 0x8BFD, 0x8BFF,
0x8C0B, 0x8C17, 0x8C1D, 0x8C27, 0x8C39, 0x8C3B, 0x8C47, 0x8C53,
0x8C5D, 0x8C6F, 0x8C7B, 0x8C81, 0x8C89, 0x8C8F, 0x8C99, 0x8C9F,
0x8CA7, 0x8CAB, 0x8CAD, 0x8CB1, 0x8CC5, 0x8CDD, 0x8CE3, 0x8CE9,
0x8CF3, 0x8D01, 0x8D0B, 0x8D0D, 0x8D23, 0x8D29, 0x8D37, 0x8D41,
0x8D5B, 0x8D5F, 0x8D71, 0x8D79, 0x8D85, 0x8D91, 0x8D9B, 0x8DA7,
0x8DAD, 0x8DB5, 0x8DC5, 0x8DCB, 0x8DD3, 0x8DD9, 0x8DDF, 0x8DF5,
0x8DF7, 0x8E01, 0x8E15, 0x8E1F, 0x8E25, 0x8E51, 0x8E63, 0x8E69,
0x8E73, 0x8E75, 0x8E79, 0x8E7F, 0x8E8D, 0x8E91, 0x8EAB, 0x8EAF,
0x8EB1, 0x8EBD, 0x8EC7, 0x8ECF, 0x8ED3, 0x8EDB, 0x8EE7, 0x8EEB,
0x8EF7, 0x8EFF, 0x8F15, 0x8F1D, 0x8F23, 0x8F2D, 0x8F3F, 0x8F45,
0x8F4B, 0x8F53, 0x8F59, 0x8F65, 0x8F69, 0x8F71, 0x8F83, 0x8F8D,
0x8F99, 0x8F9F, 0x8FAB, 0x8FAD, 0x8FB3, 0x8FB7, 0x8FB9, 0x8FC9,
0x8FD5, 0x8FE1, 0x8FEF, 0x8FF9, 0x9007, 0x900D, 0x9017, 0x9023,
0x9025, 0x9031, 0x9037, 0x903B, 0x9041, 0x9043, 0x904F, 0x9053,
0x906D, 0x9073, 0x9085, 0x908B, 0x9095, 0x909B, 0x909D, 0x90AF,
0x90B9, 0x90C1, 0x90C5, 0x90DF, 0x90E9, 0x90FD, 0x9103, 0x9113,
0x9127, 0x9133, 0x913D, 0x9145, 0x914F, 0x9151, 0x9161, 0x9167,
0x917B, 0x9185, 0x9199, 0x919D, 0x91BB, 0x91BD, 0x91C1, 0x91C9,
0x91D9, 0x91DB, 0x91ED, 0x91F1, 0x91F3, 0x91F9, 0x9203, 0x9215,
0x9221, 0x922F, 0x9241, 0x9247, 0x9257, 0x926B, 0x9271, 0x9275,
0x927D, 0x9283, 0x9287, 0x928D, 0x9299, 0x92A1, 0x92AB, 0x92AD,
0x92B9, 0x92BF, 0x92C3, 0x92C5, 0x92CB, 0x92D5, 0x92D7, 0x92E7,
0x92F3, 0x9301, 0x930B, 0x9311, 0x9319, 0x931F, 0x933B, 0x933D,
0x9343, 0x9355, 0x9373, 0x9395, 0x9397, 0x93A7, 0x93B3, 0x93B5,
0x93C7, 0x93D7, 0x93DD, 0x93E5, 0x93EF, 0x93F7, 0x9401, 0x9409,
0x9413, 0x943F, 0x9445, 0x944B, 0x944F, 0x9463, 0x9467, 0x9469,
0x946D, 0x947B, 0x9497, 0x949F, 0x94A5, 0x94B5, 0x94C3, 0x94E1,
0x94E7, 0x9505, 0x9509, 0x9517, 0x9521, 0x9527, 0x952D, 0x9535,
0x9539, 0x954B, 0x9557, 0x955D, 0x955F, 0x9575, 0x9581, 0x9589,
0x958F, 0x959B, 0x959F, 0x95AD, 0x95B1, 0x95B7, 0x95B9, 0x95BD,
0x95CF, 0x95E3, 0x95E9, 0x95F9, 0x961F, 0x962F, 0x9631, 0x9635,
0x963B, 0x963D, 0x9665, 0x968F, 0x969D, 0x96A1, 0x96A7, 0x96A9,
0x96C1, 0x96CB, 0x96D1, 0x96D3, 0x96E5, 0x96EF, 0x96FB, 0x96FD,
0x970D, 0x970F, 0x9715, 0x9725, 0x972B, 0x9733, 0x9737, 0x9739,
0x9743, 0x9749, 0x9751, 0x975B, 0x975D, 0x976F, 0x977F, 0x9787,
0x9793, 0x97A5, 0x97B1, 0x97B7, 0x97C3, 0x97CD, 0x97D3, 0x97D9,
0x97EB, 0x97F7, 0x9805, 0x9809, 0x980B, 0x9815, 0x9829, 0x982F,
0x983B, 0x9841, 0x9851, 0x986B, 0x986F, 0x9881, 0x9883, 0x9887,
0x98A7, 0x98B1, 0x98B9, 0x98BF, 0x98C3, 0x98C9, 0x98CF, 0x98DD,
0x98E3, 0x98F5, 0x98F9, 0x98FB, 0x990D, 0x9917, 0x991F, 0x9929,
0x9931, 0x993B, 0x993D, 0x9941, 0x9947, 0x9949, 0x9953, 0x997D,
0x9985, 0x9991, 0x9995, 0x999B, 0x99AD, 0x99AF, 0x99BF, 0x99C7,
0x99CB, 0x99CD, 0x99D7, 0x99E5, 0x99F1, 0x99FB, 0x9A0F, 0x9A13,
0x9A1B, 0x9A25, 0x9A4B, 0x9A4F, 0x9A55, 0x9A57, 0x9A61, 0x9A75,
0x9A7F, 0x9A8B, 0x9A91, 0x9A9D, 0x9AB7, 0x9AC3, 0x9AC7, 0x9ACF,
0x9AEB, 0x9AF3, 0x9AF7, 0x9AFF, 0x9B17, 0x9B1D, 0x9B27, 0x9B2F,
0x9B35, 0x9B45, 0x9B51, 0x9B59, 0x9B63, 0x9B6F, 0x9B77, 0x9B8D,
0x9B93, 0x9B95, 0x9B9F, 0x9BA1, 0x9BA7, 0x9BB1, 0x9BB7, 0x9BBD,
0x9BC5, 0x9BCB, 0x9BCF, 0x9BDD, 0x9BF9, 0x9C01, 0x9C11, 0x9C23,
0x9C2B, 0x9C2F, 0x9C35, 0x9C49, 0x9C4D, 0x9C5F, 0x9C65, 0x9C67,
0x9C7F, 0x9C97, 0x9C9D, 0x9CA3, 0x9CAF, 0x9CBB, 0x9CBF, 0x9CC1,
0x9CD7, 0x9CD9, 0x9CE3, 0x9CE9, 0x9CF1, 0x9CFD, 0x9D01, 0x9D15,
0x9D27, 0x9D2D, 0x9D31, 0x9D3D, 0x9D55, 0x9D5B, 0x9D61, 0x9D97,
0x9D9F, 0x9DA5, 0x9DA9, 0x9DC3, 0x9DE7, 0x9DEB, 0x9DED, 0x9DF1,
0x9E0B, 0x9E17, 0x9E23, 0x9E27, 0x9E2D, 0x9E33, 0x9E3B, 0x9E47,
0x9E51, 0x9E53, 0x9E5F, 0x9E6F, 0x9E81, 0x9E87, 0x9E8F, 0x9E95,
0x9EA1, 0x9EB3, 0x9EBD, 0x9EBF, 0x9EF5, 0x9EF9, 0x9EFB, 0x9F05,
0x9F23, 0x9F2F, 0x9F37, 0x9F3B, 0x9F43, 0x9F53, 0x9F61, 0x9F6D,
0x9F73, 0x9F77, 0x9F7D, 0x9F89, 0x9F8F, 0x9F91, 0x9F95, 0x9FA3,
0x9FAF, 0x9FB3, 0x9FC1, 0x9FC7, 0x9FDF, 0x9FE5, 0x9FEB, 0x9FF5,
0xA001, 0xA00D, 0xA021, 0xA033, 0xA039, 0xA03F, 0xA04F, 0xA057,
0xA05B, 0xA061, 0xA075, 0xA079, 0xA099, 0xA09D, 0xA0AB, 0xA0B5,
0xA0B7, 0xA0BD, 0xA0C9, 0xA0D9, 0xA0DB, 0xA0DF, 0xA0E5, 0xA0F1,
0xA0F3, 0xA0FD, 0xA105, 0xA10B, 0xA10F, 0xA111, 0xA11B, 0xA129,
0xA12F, 0xA135, 0xA141, 0xA153, 0xA175, 0xA17D, 0xA187, 0xA18D,
0xA1A5, 0xA1AB, 0xA1AD, 0xA1B7, 0xA1C3, 0xA1C5, 0xA1E3, 0xA1ED,
0xA1FB, 0xA207, 0xA213, 0xA223, 0xA229, 0xA22F, 0xA231, 0xA243,
0xA247, 0xA24D, 0xA26B, 0xA279, 0xA27D, 0xA283, 0xA289, 0xA28B,
0xA291, 0xA295, 0xA29B, 0xA2A9, 0xA2AF, 0xA2B3, 0xA2BB, 0xA2C5,
0xA2D1, 0xA2D7, 0xA2F7, 0xA301, 0xA309, 0xA31F, 0xA321, 0xA32B,
0xA331, 0xA349, 0xA351, 0xA355, 0xA373, 0xA379, 0xA37B, 0xA387,
0xA397, 0xA39F, 0xA3A5, 0xA3A9, 0xA3AF, 0xA3B7, 0xA3C7, 0xA3D5,
0xA3DB, 0xA3E1, 0xA3E5, 0xA3E7, 0xA3F1, 0xA3FD, 0xA3FF, 0xA40F,
0xA41D, 0xA421, 0xA423, 0xA427, 0xA43B, 0xA44D, 0xA457, 0xA459,
0xA463, 0xA469, 0xA475, 0xA493, 0xA49B, 0xA4AD, 0xA4B9, 0xA4C3,
0xA4C5, 0xA4CB, 0xA4D1, 0xA4D5, 0xA4E1, 0xA4ED, 0xA4EF, 0xA4F3,
0xA4FF, 0xA511, 0xA529, 0xA52B, 0xA535, 0xA53B, 0xA543, 0xA553,
0xA55B, 0xA561, 0xA56D, 0xA577, 0xA585, 0xA58B, 0xA597, 0xA59D,
0xA5A3, 0xA5A7, 0xA5A9, 0xA5C1, 0xA5C5, 0xA5CB, 0xA5D3, 0xA5D9,
0xA5DD, 0xA5DF, 0xA5E3, 0xA5E9, 0xA5F7, 0xA5FB, 0xA603, 0xA60D,
0xA625, 0xA63D, 0xA649, 0xA64B, 0xA651, 0xA65D, 0xA673, 0xA691,
0xA693, 0xA699, 0xA6AB, 0xA6B5, 0xA6BB, 0xA6C1, 0xA6C9, 0xA6CD,
0xA6CF, 0xA6D5, 0xA6DF, 0xA6E7, 0xA6F1, 0xA6F7, 0xA6FF, 0xA70F,
0xA715, 0xA723, 0xA729, 0xA72D, 0xA745, 0xA74D, 0xA757, 0xA759,
0xA765, 0xA76B, 0xA76F, 0xA793, 0xA795, 0xA7AB, 0xA7B1, 0xA7B9,
0xA7BF, 0xA7C9, 0xA7D1, 0xA7D7, 0xA7E3, 0xA7ED, 0xA7FB, 0xA805,
0xA80B, 0xA81D, 0xA829, 0xA82B, 0xA837, 0xA83B, 0xA855, 0xA85F,
0xA86D, 0xA87D, 0xA88F, 0xA897, 0xA8A9, 0xA8B5, 0xA8C1, 0xA8C7,
0xA8D7, 0xA8E5, 0xA8FD, 0xA907, 0xA913, 0xA91B, 0xA931, 0xA937,
0xA939, 0xA943, 0xA97F, 0xA985, 0xA987, 0xA98B, 0xA993, 0xA9A3,
0xA9B1, 0xA9BB, 0xA9C1, 0xA9D9, 0xA9DF, 0xA9EB, 0xA9FD, 0xAA15,
0xAA17, 0xAA35, 0xAA39, 0xAA3B, 0xAA47, 0xAA4D, 0xAA57, 0xAA59,
0xAA5D, 0xAA6B, 0xAA71, 0xAA81, 0xAA83, 0xAA8D, 0xAA95, 0xAAAB,
0xAABF, 0xAAC5, 0xAAC9, 0xAAE9, 0xAAEF, 0xAB01, 0xAB05, 0xAB07,
0xAB0B, 0xAB0D, 0xAB11, 0xAB19, 0xAB4D, 0xAB5B, 0xAB71, 0xAB73,
0xAB89, 0xAB9D, 0xABA7, 0xABAF, 0xABB9, 0xABBB, 0xABC1, 0xABC5,
0xABD3, 0xABD7, 0xABDD, 0xABF1, 0xABF5, 0xABFB, 0xABFD, 0xAC09,
0xAC15, 0xAC1B, 0xAC27, 0xAC37, 0xAC39, 0xAC45, 0xAC4F, 0xAC57,
0xAC5B, 0xAC61, 0xAC63, 0xAC7F, 0xAC8B, 0xAC93, 0xAC9D, 0xACA9,
0xACAB, 0xACAF, 0xACBD, 0xACD9, 0xACE1, 0xACE7, 0xACEB, 0xACED,
0xACF1, 0xACF7, 0xACF9, 0xAD05, 0xAD3F, 0xAD45, 0xAD53, 0xAD5D,
0xAD5F, 0xAD65, 0xAD81, 0xADA1, 0xADA5, 0xADC3, 0xADCB, 0xADD1,
0xADD5, 0xADDB, 0xADE7, 0xADF3, 0xADF5, 0xADF9, 0xADFF, 0xAE05,
0xAE13, 0xAE23, 0xAE2B, 0xAE49, 0xAE4D, 0xAE4F, 0xAE59, 0xAE61,
0xAE67, 0xAE6B, 0xAE71, 0xAE8B, 0xAE8F, 0xAE9B, 0xAE9D, 0xAEA7,
0xAEB9, 0xAEC5, 0xAED1, 0xAEE3, 0xAEE5, 0xAEE9, 0xAEF5, 0xAEFD,
0xAF09, 0xAF13, 0xAF27, 0xAF2B, 0xAF33, 0xAF43, 0xAF4F, 0xAF57,
0xAF5D, 0xAF6D, 0xAF75, 0xAF7F, 0xAF8B, 0xAF99, 0xAF9F, 0xAFA3,
0xAFAB, 0xAFB7, 0xAFBB, 0xAFCF, 0xAFD5, 0xAFFD, 0xB005, 0xB015,
0xB01B, 0xB03F, 0xB041, 0xB047, 0xB04B, 0xB051, 0xB053, 0xB069,
0xB07B, 0xB07D, 0xB087, 0xB08D, 0xB0B1, 0xB0BF, 0xB0CB, 0xB0CF,
0xB0E1, 0xB0E9, 0xB0ED, 0xB0FB, 0xB105, 0xB107, 0xB111, 0xB119,
0xB11D, 0xB11F, 0xB131, 0xB141, 0xB14D, 0xB15B, 0xB165, 0xB173,
0xB179, 0xB17F, 0xB1A9, 0xB1B3, 0xB1B9, 0xB1BF, 0xB1D3, 0xB1DD,
0xB1E5, 0xB1F1, 0xB1F5, 0xB201, 0xB213, 0xB215, 0xB21F, 0xB22D,
0xB23F, 0xB249, 0xB25B, 0xB263, 0xB269, 0xB26D, 0xB27B, 0xB281,
0xB28B, 0xB2A9, 0xB2B7, 0xB2BD, 0xB2C3, 0xB2C7, 0xB2D3, 0xB2F9,
0xB2FD, 0xB2FF, 0xB303, 0xB309, 0xB311, 0xB31D, 0xB327, 0xB32D,
0xB33F, 0xB345, 0xB377, 0xB37D, 0xB381, 0xB387, 0xB393, 0xB39B,
0xB3A5, 0xB3C5, 0xB3CB, 0xB3E1, 0xB3E3, 0xB3ED, 0xB3F9, 0xB40B,
0xB40D, 0xB413, 0xB417, 0xB435, 0xB43D, 0xB443, 0xB449, 0xB45B,
0xB465, 0xB467, 0xB46B, 0xB477, 0xB48B, 0xB495, 0xB49D, 0xB4B5,
0xB4BF, 0xB4C1, 0xB4C7, 0xB4DD, 0xB4E3, 0xB4E5, 0xB4F7, 0xB501,
0xB50D, 0xB50F, 0xB52D, 0xB53F, 0xB54B, 0xB567, 0xB569, 0xB56F,
0xB573, 0xB579, 0xB587, 0xB58D, 0xB599, 0xB5A3, 0xB5AB, 0xB5AF,
0xB5BB, 0xB5D5, 0xB5DF, 0xB5E7, 0xB5ED, 0xB5FD, 0xB5FF, 0xB609,
0xB61B, 0xB629, 0xB62F, 0xB633, 0xB639, 0xB647, 0xB657, 0xB659,
0xB65F, 0xB663, 0xB66F, 0xB683, 0xB687, 0xB69B, 0xB69F, 0xB6A5,
0xB6B1, 0xB6B3, 0xB6D7, 0xB6DB, 0xB6E1, 0xB6E3, 0xB6ED, 0xB6EF,
0xB705, 0xB70D, 0xB713, 0xB71D, 0xB729, 0xB735, 0xB747, 0xB755,
0xB76D, 0xB791, 0xB795, 0xB7A9, 0xB7C1, 0xB7CB, 0xB7D1, 0xB7D3,
0xB7EF, 0xB7F5, 0xB807, 0xB80F, 0xB813, 0xB819, 0xB821, 0xB827,
0xB82B, 0xB82D, 0xB839, 0xB855, 0xB867, 0xB875, 0xB885, 0xB893,
0xB8A5, 0xB8AF, 0xB8B7, 0xB8BD, 0xB8C1, 0xB8C7, 0xB8CD, 0xB8D5,
0xB8EB, 0xB8F7, 0xB8F9, 0xB903, 0xB915, 0xB91B, 0xB91D, 0xB92F,
0xB939, 0xB93B, 0xB947, 0xB951, 0xB963, 0xB983, 0xB989, 0xB98D,
0xB993, 0xB999, 0xB9A1, 0xB9A7, 0xB9AD, 0xB9B7, 0xB9CB, 0xB9D1,
0xB9DD, 0xB9E7, 0xB9EF, 0xB9F9, 0xBA07, 0xBA0D, 0xBA17, 0xBA25,
0xBA29, 0xBA2B, 0xBA41, 0xBA53, 0xBA55, 0xBA5F, 0xBA61, 0xBA65,
0xBA79, 0xBA7D, 0xBA7F, 0xBAA1, 0xBAA3, 0xBAAF, 0xBAB5, 0xBABF,
0xBAC1, 0xBACB, 0xBADD, 0xBAE3, 0xBAF1, 0xBAFD, 0xBB09, 0xBB1F,
0xBB27, 0xBB2D, 0xBB3D, 0xBB43, 0xBB4B, 0xBB4F, 0xBB5B, 0xBB61,
0xBB69, 0xBB6D, 0xBB91, 0xBB97, 0xBB9D, 0xBBB1, 0xBBC9, 0xBBCF,
0xBBDB, 0xBBED, 0xBBF7, 0xBBF9, 0xBC03, 0xBC1D, 0xBC23, 0xBC33,
0xBC3B, 0xBC41, 0xBC45, 0xBC5D, 0xBC6F, 0xBC77, 0xBC83, 0xBC8F,
0xBC99, 0xBCAB, 0xBCB7, 0xBCB9, 0xBCD1, 0xBCD5, 0xBCE1, 0xBCF3,
0xBCFF, 0xBD0D, 0xBD17, 0xBD19, 0xBD1D, 0xBD35, 0xBD41, 0xBD4F,
0xBD59, 0xBD5F, 0xBD61, 0xBD67, 0xBD6B, 0xBD71, 0xBD8B, 0xBD8F,
0xBD95, 0xBD9B, 0xBD9D, 0xBDB3, 0xBDBB, 0xBDCD, 0xBDD1, 0xBDE3,
0xBDEB, 0xBDEF, 0xBE07, 0xBE09, 0xBE15, 0xBE21, 0xBE25, 0xBE27,
0xBE5B, 0xBE5D, 0xBE6F, 0xBE75, 0xBE79, 0xBE7F, 0xBE8B, 0xBE8D,
0xBE93, 0xBE9F, 0xBEA9, 0xBEB1, 0xBEB5, 0xBEB7, 0xBECF, 0xBED9,
0xBEDB, 0xBEE5, 0xBEE7, 0xBEF3, 0xBEF9, 0xBF0B, 0xBF33, 0xBF39,
0xBF4D, 0xBF5D, 0xBF5F, 0xBF6B, 0xBF71, 0xBF7B, 0xBF87, 0xBF89,
0xBF8D, 0xBF93, 0xBFA1, 0xBFAD, 0xBFB9, 0xBFCF, 0xBFD5, 0xBFDD,
0xBFE1, 0xBFE3, 0xBFF3, 0xC005, 0xC011, 0xC013, 0xC019, 0xC029,
0xC02F, 0xC031, 0xC037, 0xC03B, 0xC047, 0xC065, 0xC06D, 0xC07D,
0xC07F, 0xC091, 0xC09B, 0xC0B3, 0xC0B5, 0xC0BB, 0xC0D3, 0xC0D7,
0xC0D9, 0xC0EF, 0xC0F1, 0xC101, 0xC103, 0xC109, 0xC115, 0xC119,
0xC12B, 0xC133, 0xC137, 0xC145, 0xC149, 0xC15B, 0xC173, 0xC179,
0xC17B, 0xC181, 0xC18B, 0xC18D, 0xC197, 0xC1BD, 0xC1C3, 0xC1CD,
0xC1DB, 0xC1E1, 0xC1E7, 0xC1FF, 0xC203, 0xC205, 0xC211, 0xC221,
0xC22F, 0xC23F, 0xC24B, 0xC24D, 0xC253, 0xC25D, 0xC277, 0xC27B,
0xC27D, 0xC289, 0xC28F, 0xC293, 0xC29F, 0xC2A7, 0xC2B3, 0xC2BD,
0xC2CF, 0xC2D5, 0xC2E3, 0xC2FF, 0xC301, 0xC307, 0xC311, 0xC313,
0xC317, 0xC325, 0xC347, 0xC349, 0xC34F, 0xC365, 0xC367, 0xC371,
0xC37F, 0xC383, 0xC385, 0xC395, 0xC39D, 0xC3A7, 0xC3AD, 0xC3B5,
0xC3BF, 0xC3C7, 0xC3CB, 0xC3D1, 0xC3D3, 0xC3E3, 0xC3E9, 0xC3EF,
0xC401, 0xC41F, 0xC42D, 0xC433, 0xC437, 0xC455, 0xC457, 0xC461,
0xC46F, 0xC473, 0xC487, 0xC491, 0xC499, 0xC49D, 0xC4A5, 0xC4B7,
0xC4BB, 0xC4C9, 0xC4CF, 0xC4D3, 0xC4EB, 0xC4F1, 0xC4F7, 0xC509,
0xC51B, 0xC51D, 0xC541, 0xC547, 0xC551, 0xC55F, 0xC56B, 0xC56F,
0xC575, 0xC577, 0xC595, 0xC59B, 0xC59F, 0xC5A1, 0xC5A7, 0xC5C3,
0xC5D7, 0xC5DB, 0xC5EF, 0xC5FB, 0xC613, 0xC623, 0xC635, 0xC641,
0xC64F, 0xC655, 0xC659, 0xC665, 0xC685, 0xC691, 0xC697, 0xC6A1,
0xC6A9, 0xC6B3, 0xC6B9, 0xC6CB, 0xC6CD, 0xC6DD, 0xC6EB, 0xC6F1,
0xC707, 0xC70D, 0xC719, 0xC71B, 0xC72D, 0xC731, 0xC739, 0xC757,
0xC763, 0xC767, 0xC773, 0xC775, 0xC77F, 0xC7A5, 0xC7BB, 0xC7BD,
0xC7C1, 0xC7CF, 0xC7D5, 0xC7E1, 0xC7F9, 0xC7FD, 0xC7FF, 0xC803,
0xC811, 0xC81D, 0xC827, 0xC829, 0xC839, 0xC83F, 0xC853, 0xC857,
0xC86B, 0xC881, 0xC88D, 0xC88F, 0xC893, 0xC895, 0xC8A1, 0xC8B7,
0xC8CF, 0xC8D5, 0xC8DB, 0xC8DD, 0xC8E3, 0xC8E7, 0xC8ED, 0xC8EF,
0xC8F9, 0xC905, 0xC911, 0xC917, 0xC919, 0xC91F, 0xC92F, 0xC937,
0xC93D, 0xC941, 0xC953, 0xC95F, 0xC96B, 0xC979, 0xC97D, 0xC989,
0xC98F, 0xC997, 0xC99D, 0xC9AF, 0xC9B5, 0xC9BF, 0xC9CB, 0xC9D9,
0xC9DF, 0xC9E3, 0xC9EB, 0xCA01, 0xCA07, 0xCA09, 0xCA25, 0xCA37,
0xCA39, 0xCA4B, 0xCA55, 0xCA5B, 0xCA69, 0xCA73, 0xCA75, 0xCA7F,
0xCA8D, 0xCA93, 0xCA9D, 0xCA9F, 0xCAB5, 0xCABB, 0xCAC3, 0xCAC9,
0xCAD9, 0xCAE5, 0xCAED, 0xCB03, 0xCB05, 0xCB09, 0xCB17, 0xCB29,
0xCB35, 0xCB3B, 0xCB53, 0xCB59, 0xCB63, 0xCB65, 0xCB71, 0xCB87,
0xCB99, 0xCB9F, 0xCBB3, 0xCBB9, 0xCBC3, 0xCBD1, 0xCBD5, 0xCBD7,
0xCBDD, 0xCBE9, 0xCBFF, 0xCC0D, 0xCC19, 0xCC1D, 0xCC23, 0xCC2B,
0xCC41, 0xCC43, 0xCC4D, 0xCC59, 0xCC61, 0xCC89, 0xCC8B, 0xCC91,
0xCC9B, 0xCCA3, 0xCCA7, 0xCCD1, 0xCCE5, 0xCCE9, 0xCD09, 0xCD15,
0xCD1F, 0xCD25, 0xCD31, 0xCD3D, 0xCD3F, 0xCD49, 0xCD51, 0xCD57,
0xCD5B, 0xCD63, 0xCD67, 0xCD81, 0xCD93, 0xCD97, 0xCD9F, 0xCDBB,
0xCDC1, 0xCDD3, 0xCDD9, 0xCDE5, 0xCDE7, 0xCDF1, 0xCDF7, 0xCDFD,
0xCE0B, 0xCE15, 0xCE21, 0xCE2F, 0xCE47, 0xCE4D, 0xCE51, 0xCE65,
0xCE7B, 0xCE7D, 0xCE8F, 0xCE93, 0xCE99, 0xCEA5, 0xCEA7, 0xCEB7,
0xCEC9, 0xCED7, 0xCEDD, 0xCEE3, 0xCEE7, 0xCEED, 0xCEF5, 0xCF07,
0xCF0B, 0xCF19, 0xCF37, 0xCF3B, 0xCF4D, 0xCF55, 0xCF5F, 0xCF61,
0xCF65, 0xCF6D, 0xCF79, 0xCF7D, 0xCF89, 0xCF9B, 0xCF9D, 0xCFA9,
0xCFB3, 0xCFB5, 0xCFC5, 0xCFCD, 0xCFD1, 0xCFEF, 0xCFF1, 0xCFF7,
0xD013, 0xD015, 0xD01F, 0xD021, 0xD033, 0xD03D, 0xD04B, 0xD04F,
0xD069, 0xD06F, 0xD081, 0xD085, 0xD099, 0xD09F, 0xD0A3, 0xD0AB,
0xD0BD, 0xD0C1, 0xD0CD, 0xD0E7, 0xD0FF, 0xD103, 0xD117, 0xD12D,
0xD12F, 0xD141, 0xD157, 0xD159, 0xD15D, 0xD169, 0xD16B, 0xD171,
0xD177, 0xD17D, 0xD181, 0xD187, 0xD195, 0xD199, 0xD1B1, 0xD1BD,
0xD1C3, 0xD1D5, 0xD1D7, 0xD1E3, 0xD1FF, 0xD20D, 0xD211, 0xD217,
0xD21F, 0xD235, 0xD23B, 0xD247, 0xD259, 0xD261, 0xD265, 0xD279,
0xD27F, 0xD283, 0xD289, 0xD28B, 0xD29D, 0xD2A3, 0xD2A7, 0xD2B3,
0xD2BF, 0xD2C7, 0xD2E3, 0xD2E9, 0xD2F1, 0xD2FB, 0xD2FD, 0xD315,
0xD321, 0xD32B, 0xD343, 0xD34B, 0xD355, 0xD369, 0xD375, 0xD37B,
0xD387, 0xD393, 0xD397, 0xD3A5, 0xD3B1, 0xD3C9, 0xD3EB, 0xD3FD,
0xD405, 0xD40F, 0xD415, 0xD427, 0xD42F, 0xD433, 0xD43B, 0xD44B,
0xD459, 0xD45F, 0xD463, 0xD469, 0xD481, 0xD483, 0xD489, 0xD48D,
0xD493, 0xD495, 0xD4A5, 0xD4AB, 0xD4B1, 0xD4C5, 0xD4DD, 0xD4E1,
0xD4E3, 0xD4E7, 0xD4F5, 0xD4F9, 0xD50B, 0xD50D, 0xD513, 0xD51F,
0xD523, 0xD531, 0xD535, 0xD537, 0xD549, 0xD559, 0xD55F, 0xD565,
0xD567, 0xD577, 0xD58B, 0xD591, 0xD597, 0xD5B5, 0xD5B9, 0xD5C1,
0xD5C7, 0xD5DF, 0xD5EF, 0xD5F5, 0xD5FB, 0xD603, 0xD60F, 0xD62D,
0xD631, 0xD643, 0xD655, 0xD65D, 0xD661, 0xD67B, 0xD685, 0xD687,
0xD69D, 0xD6A5, 0xD6AF, 0xD6BD, 0xD6C3, 0xD6C7, 0xD6D9, 0xD6E1,
0xD6ED, 0xD709, 0xD70B, 0xD711, 0xD715, 0xD721, 0xD727, 0xD73F,
0xD745, 0xD74D, 0xD757, 0xD76B, 0xD77B, 0xD783, 0xD7A1, 0xD7A7,
0xD7AD, 0xD7B1, 0xD7B3, 0xD7BD, 0xD7CB, 0xD7D1, 0xD7DB, 0xD7FB,
0xD811, 0xD823, 0xD825, 0xD829, 0xD82B, 0xD82F, 0xD837, 0xD84D,
0xD855, 0xD867, 0xD873, 0xD88F, 0xD891, 0xD8A1, 0xD8AD, 0xD8BF,
0xD8CD, 0xD8D7, 0xD8E9, 0xD8F5, 0xD8FB, 0xD91B, 0xD925, 0xD933,
0xD939, 0xD943, 0xD945, 0xD94F, 0xD951, 0xD957, 0xD96D, 0xD96F,
0xD973, 0xD979, 0xD981, 0xD98B, 0xD991, 0xD99F, 0xD9A5, 0xD9A9,
0xD9B5, 0xD9D3, 0xD9EB, 0xD9F1, 0xD9F7, 0xD9FF, 0xDA05, 0xDA09,
0xDA0B, 0xDA0F, 0xDA15, 0xDA1D, 0xDA23, 0xDA29, 0xDA3F, 0xDA51,
0xDA59, 0xDA5D, 0xDA5F, 0xDA71, 0xDA77, 0xDA7B, 0xDA7D, 0xDA8D,
0xDA9F, 0xDAB3, 0xDABD, 0xDAC3, 0xDAC9, 0xDAE7, 0xDAE9, 0xDAF5,
0xDB11, 0xDB17, 0xDB1D, 0xDB23, 0xDB25, 0xDB31, 0xDB3B, 0xDB43,
0xDB55, 0xDB67, 0xDB6B, 0xDB73, 0xDB85, 0xDB8F, 0xDB91, 0xDBAD,
0xDBAF, 0xDBB9, 0xDBC7, 0xDBCB, 0xDBCD, 0xDBEB, 0xDBF7, 0xDC0D,
0xDC27, 0xDC31, 0xDC39, 0xDC3F, 0xDC49, 0xDC51, 0xDC61, 0xDC6F,
0xDC75, 0xDC7B, 0xDC85, 0xDC93, 0xDC99, 0xDC9D, 0xDC9F, 0xDCA9,
0xDCB5, 0xDCB7, 0xDCBD, 0xDCC7, 0xDCCF, 0xDCD3, 0xDCD5, 0xDCDF,
0xDCF9, 0xDD0F, 0xDD15, 0xDD17, 0xDD23, 0xDD35, 0xDD39, 0xDD53,
0xDD57, 0xDD5F, 0xDD69, 0xDD6F, 0xDD7D, 0xDD87, 0xDD89, 0xDD9B,
0xDDA1, 0xDDAB, 0xDDBF, 0xDDC5, 0xDDCB, 0xDDCF, 0xDDE7, 0xDDE9,
0xDDED, 0xDDF5, 0xDDFB, 0xDE0B, 0xDE19, 0xDE29, 0xDE3B, 0xDE3D,
0xDE41, 0xDE4D, 0xDE4F, 0xDE59, 0xDE5B, 0xDE61, 0xDE6D, 0xDE77,
0xDE7D, 0xDE83, 0xDE97, 0xDE9D, 0xDEA1, 0xDEA7, 0xDECD, 0xDED1,
0xDED7, 0xDEE3, 0xDEF1, 0xDEF5, 0xDF01, 0xDF09, 0xDF13, 0xDF1F,
0xDF2B, 0xDF33, 0xDF37, 0xDF3D, 0xDF4B, 0xDF55, 0xDF5B, 0xDF67,
0xDF69, 0xDF73, 0xDF85, 0xDF87, 0xDF99, 0xDFA3, 0xDFAB, 0xDFB5,
0xDFB7, 0xDFC3, 0xDFC7, 0xDFD5, 0xDFF1, 0xDFF3, 0xE003, 0xE005,
0xE017, 0xE01D, 0xE027, 0xE02D, 0xE035, 0xE045, 0xE053, 0xE071,
0xE07B, 0xE08F, 0xE095, 0xE09F, 0xE0B7, 0xE0B9, 0xE0D5, 0xE0D7,
0xE0E3, 0xE0F3, 0xE0F9, 0xE101, 0xE125, 0xE129, 0xE131, 0xE135,
0xE143, 0xE14F, 0xE159, 0xE161, 0xE16D, 0xE171, 0xE177, 0xE17F,
0xE183, 0xE189, 0xE197, 0xE1AD, 0xE1B5, 0xE1BB, 0xE1BF, 0xE1C1,
0xE1CB, 0xE1D1, 0xE1E5, 0xE1EF, 0xE1F7, 0xE1FD, 0xE203, 0xE219,
0xE22B, 0xE22D, 0xE23D, 0xE243, 0xE257, 0xE25B, 0xE275, 0xE279,
0xE287, 0xE29D, 0xE2AB, 0xE2AF, 0xE2BB, 0xE2C1, 0xE2C9, 0xE2CD,
0xE2D3, 0xE2D9, 0xE2F3, 0xE2FD, 0xE2FF, 0xE311, 0xE323, 0xE327,
0xE329, 0xE339, 0xE33B, 0xE34D, 0xE351, 0xE357, 0xE35F, 0xE363,
0xE369, 0xE375, 0xE377, 0xE37D, 0xE383, 0xE39F, 0xE3C5, 0xE3C9,
0xE3D1, 0xE3E1, 0xE3FB, 0xE3FF, 0xE401, 0xE40B, 0xE417, 0xE419,
0xE423, 0xE42B, 0xE431, 0xE43B, 0xE447, 0xE449, 0xE453, 0xE455,
0xE46D, 0xE471, 0xE48F, 0xE4A9, 0xE4AF, 0xE4B5, 0xE4C7, 0xE4CD,
0xE4D3, 0xE4E9, 0xE4EB, 0xE4F5, 0xE507, 0xE521, 0xE525, 0xE537,
0xE53F, 0xE545, 0xE54B, 0xE557, 0xE567, 0xE56D, 0xE575, 0xE585,
0xE58B, 0xE593, 0xE5A3, 0xE5A5, 0xE5CF, 0xE609, 0xE611, 0xE615,
0xE61B, 0xE61D, 0xE621, 0xE629, 0xE639, 0xE63F, 0xE653, 0xE657,
0xE663, 0xE66F, 0xE675, 0xE681, 0xE683, 0xE68D, 0xE68F, 0xE695,
0xE6AB, 0xE6AD, 0xE6B7, 0xE6BD, 0xE6C5, 0xE6CB, 0xE6D5, 0xE6E3,
0xE6E9, 0xE6EF, 0xE6F3, 0xE705, 0xE70D, 0xE717, 0xE71F, 0xE72F,
0xE73D, 0xE747, 0xE749, 0xE753, 0xE755, 0xE761, 0xE767, 0xE76B,
0xE77F, 0xE789, 0xE791, 0xE7C5, 0xE7CD, 0xE7D7, 0xE7DD, 0xE7DF,
0xE7E9, 0xE7F1, 0xE7FB, 0xE801, 0xE807, 0xE80F, 0xE819, 0xE81B,
0xE831, 0xE833, 0xE837, 0xE83D, 0xE84B, 0xE84F, 0xE851, 0xE869,
0xE875, 0xE879, 0xE893, 0xE8A5, 0xE8A9, 0xE8AF, 0xE8BD, 0xE8DB,
0xE8E1, 0xE8E5, 0xE8EB, 0xE8ED, 0xE903, 0xE90B, 0xE90F, 0xE915,
0xE917, 0xE92D, 0xE933, 0xE93B, 0xE94B, 0xE951, 0xE95F, 0xE963,
0xE969, 0xE97B, 0xE983, 0xE98F, 0xE995, 0xE9A1, 0xE9B9, 0xE9D7,
0xE9E7, 0xE9EF, 0xEA11, 0xEA19, 0xEA2F, 0xEA35, 0xEA43, 0xEA4D,
0xEA5F, 0xEA6D, 0xEA71, 0xEA7D, 0xEA85, 0xEA89, 0xEAAD, 0xEAB3,
0xEAB9, 0xEABB, 0xEAC5, 0xEAC7, 0xEACB, 0xEADF, 0xEAE5, 0xEAEB,
0xEAF5, 0xEB01, 0xEB07, 0xEB09, 0xEB31, 0xEB39, 0xEB3F, 0xEB5B,
0xEB61, 0xEB63, 0xEB6F, 0xEB81, 0xEB85, 0xEB9D, 0xEBAB, 0xEBB1,
0xEBB7, 0xEBC1, 0xEBD5, 0xEBDF, 0xEBED, 0xEBFD, 0xEC0B, 0xEC1B,
0xEC21, 0xEC29, 0xEC4D, 0xEC51, 0xEC5D, 0xEC69, 0xEC6F, 0xEC7B,
0xECAD, 0xECB9, 0xECBF, 0xECC3, 0xECC9, 0xECCF, 0xECD7, 0xECDD,
0xECE7, 0xECE9, 0xECF3, 0xECF5, 0xED07, 0xED11, 0xED1F, 0xED2F,
0xED37, 0xED3D, 0xED41, 0xED55, 0xED59, 0xED5B, 0xED65, 0xED6B,
0xED79, 0xED8B, 0xED95, 0xEDBB, 0xEDC5, 0xEDD7, 0xEDD9, 0xEDE3,
0xEDE5, 0xEDF1, 0xEDF5, 0xEDF7, 0xEDFB, 0xEE09, 0xEE0F, 0xEE19,
0xEE21, 0xEE49, 0xEE4F, 0xEE63, 0xEE67, 0xEE73, 0xEE7B, 0xEE81,
0xEEA3, 0xEEAB, 0xEEC1, 0xEEC9, 0xEED5, 0xEEDF, 0xEEE1, 0xEEF1,
0xEF1B, 0xEF27, 0xEF2F, 0xEF45, 0xEF4D, 0xEF63, 0xEF6B, 0xEF71,
0xEF93, 0xEF95, 0xEF9B, 0xEF9F, 0xEFAD, 0xEFB3, 0xEFC3, 0xEFC5,
0xEFDB, 0xEFE1, 0xEFE9, 0xF001, 0xF017, 0xF01D, 0xF01F, 0xF02B,
0xF02F, 0xF035, 0xF043, 0xF047, 0xF04F, 0xF067, 0xF06B, 0xF071,
0xF077, 0xF079, 0xF08F, 0xF0A3, 0xF0A9, 0xF0AD, 0xF0BB, 0xF0BF,
0xF0C5, 0xF0CB, 0xF0D3, 0xF0D9, 0xF0E3, 0xF0E9, 0xF0F1, 0xF0F7,
0xF107, 0xF115, 0xF11B, 0xF121, 0xF137, 0xF13D, 0xF155, 0xF175,
0xF17B, 0xF18D, 0xF193, 0xF1A5, 0xF1AF, 0xF1B7, 0xF1D5, 0xF1E7,
0xF1ED, 0xF1FD, 0xF209, 0xF20F, 0xF21B, 0xF21D, 0xF223, 0xF227,
0xF233, 0xF23B, 0xF241, 0xF257, 0xF25F, 0xF265, 0xF269, 0xF277,
0xF281, 0xF293, 0xF2A7, 0xF2B1, 0xF2B3, 0xF2B9, 0xF2BD, 0xF2BF,
0xF2DB, 0xF2ED, 0xF2EF, 0xF2F9, 0xF2FF, 0xF305, 0xF30B, 0xF319,
0xF341, 0xF359, 0xF35B, 0xF35F, 0xF367, 0xF373, 0xF377, 0xF38B,
0xF38F, 0xF3AF, 0xF3C1, 0xF3D1, 0xF3D7, 0xF3FB, 0xF403, 0xF409,
0xF40D, 0xF413, 0xF421, 0xF425, 0xF42B, 0xF445, 0xF44B, 0xF455,
0xF463, 0xF475, 0xF47F, 0xF485, 0xF48B, 0xF499, 0xF4A3, 0xF4A9,
0xF4AF, 0xF4BD, 0xF4C3, 0xF4DB, 0xF4DF, 0xF4ED, 0xF503, 0xF50B,
0xF517, 0xF521, 0xF529, 0xF535, 0xF547, 0xF551, 0xF563, 0xF56B,
0xF583, 0xF58D, 0xF595, 0xF599, 0xF5B1, 0xF5B7, 0xF5C9, 0xF5CF,
0xF5D1, 0xF5DB, 0xF5F9, 0xF5FB, 0xF605, 0xF607, 0xF60B, 0xF60D,
0xF635, 0xF637, 0xF653, 0xF65B, 0xF661, 0xF667, 0xF679, 0xF67F,
0xF689, 0xF697, 0xF69B, 0xF6AD, 0xF6CB, 0xF6DD, 0xF6DF, 0xF6EB,
0xF709, 0xF70F, 0xF72D, 0xF731, 0xF743, 0xF74F, 0xF751, 0xF755,
0xF763, 0xF769, 0xF773, 0xF779, 0xF781, 0xF787, 0xF791, 0xF79D,
0xF79F, 0xF7A5, 0xF7B1, 0xF7BB, 0xF7BD, 0xF7CF, 0xF7D3, 0xF7E7,
0xF7EB, 0xF7F1, 0xF7FF, 0xF805, 0xF80B, 0xF821, 0xF827, 0xF82D,
0xF835, 0xF847, 0xF859, 0xF863, 0xF865, 0xF86F, 0xF871, 0xF877,
0xF87B, 0xF881, 0xF88D, 0xF89F, 0xF8A1, 0xF8AB, 0xF8B3, 0xF8B7,
0xF8C9, 0xF8CB, 0xF8D1, 0xF8D7, 0xF8DD, 0xF8E7, 0xF8EF, 0xF8F9,
0xF8FF, 0xF911, 0xF91D, 0xF925, 0xF931, 0xF937, 0xF93B, 0xF941,
0xF94F, 0xF95F, 0xF961, 0xF96D, 0xF971, 0xF977, 0xF99D, 0xF9A3,
0xF9A9, 0xF9B9, 0xF9CD, 0xF9E9, 0xF9FD, 0xFA07, 0xFA0D, 0xFA13,
0xFA21, 0xFA25, 0xFA3F, 0xFA43, 0xFA51, 0xFA5B, 0xFA6D, 0xFA7B,
0xFA97, 0xFA99, 0xFA9D, 0xFAAB, 0xFABB, 0xFABD, 0xFAD9, 0xFADF,
0xFAE7, 0xFAED, 0xFB0F, 0xFB17, 0xFB1B, 0xFB2D, 0xFB2F, 0xFB3F,
0xFB47, 0xFB4D, 0xFB75, 0xFB7D, 0xFB8F, 0xFB93, 0xFBB1, 0xFBB7,
0xFBC3, 0xFBC5, 0xFBE3, 0xFBE9, 0xFBF3, 0xFC01, 0xFC29, 0xFC37,
0xFC41, 0xFC43, 0xFC4F, 0xFC59, 0xFC61, 0xFC65, 0xFC6D, 0xFC73,
0xFC79, 0xFC95, 0xFC97, 0xFC9B, 0xFCA7, 0xFCB5, 0xFCC5, 0xFCCD,
0xFCEB, 0xFCFB, 0xFD0D, 0xFD0F, 0xFD19, 0xFD2B, 0xFD31, 0xFD51,
0xFD55, 0xFD67, 0xFD6D, 0xFD6F, 0xFD7B, 0xFD85, 0xFD97, 0xFD99,
0xFD9F, 0xFDA9, 0xFDB7, 0xFDC9, 0xFDE5, 0xFDEB, 0xFDF3, 0xFE03,
0xFE05, 0xFE09, 0xFE1D, 0xFE27, 0xFE2F, 0xFE41, 0xFE4B, 0xFE4D,
0xFE57, 0xFE5F, 0xFE63, 0xFE69, 0xFE75, 0xFE7B, 0xFE8F, 0xFE93,
0xFE95, 0xFE9B, 0xFE9F, 0xFEB3, 0xFEBD, 0xFED7, 0xFEE9, 0xFEF3,
0xFEF5, 0xFF07, 0xFF0D, 0xFF1D, 0xFF2B, 0xFF2F, 0xFF49, 0xFF4D,
0xFF5B, 0xFF65, 0xFF71, 0xFF7F, 0xFF85, 0xFF8B, 0xFF8F, 0xFF9D,
0xFFA7, 0xFFA9, 0xFFC7, 0xFFD9, 0xFFEF, 0xFFF1,
#endif
};

View File

@@ -1,74 +0,0 @@
#!/usr/bin/perl
#
# Treat each line as a sequence of comma and/or space delimited
# floating point numbers, and compute basic statistics on them.
# These are written to standard output
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998, 2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: stats,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
$min = 1.7976931348623157E+308;
$max = 2.2250738585072014E-308;
$sum = $num = 0;
while(<>) {
chomp;
@nums = split(/[\s,]+/, $_);
next if($#nums < 0);
$num += scalar @nums;
foreach (@nums) {
$min = $_ if($_ < $min);
$max = $_ if($_ > $max);
$sum += $_;
}
}
if($num) {
$avg = $sum / $num;
} else {
$min = $max = 0;
}
printf "%d\tmin=%.2f, avg=%.2f, max=%.2f, sum=%.2f\n",
$num, $min, $avg, $max, $sum;
# end

View File

@@ -1,230 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Netscape Communications Corporation
# Richard C. Swift (swift@netscape.com)
# Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
##
## Define CFLAGS to contain any local options your compiler
## setup requires.
##
## Conditional compilation options are no longer here; see
## the file 'mpi-config.h' instead.
##
MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC
CFLAGS= -O $(MPICMN)
#CFLAGS=-ansi -fullwarn -woff 1521 -O3 $(MPICMN)
#CFLAGS=-ansi -pedantic -Wall -O3 $(MPICMN)
#CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1 $(MPICMN)
ifeq ($(TARGET),mipsIRIX)
#IRIX
#MPICMN += -DMP_MONT_USE_MP_MUL
MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
MPICMN += -DMP_USE_UINT_DIGIT
#MPICMN += -DMP_NO_MP_WORD
AS_OBJS = mpi_mips.o
#ASFLAGS = -O -OPT:Olimit=4000 -dollar -fullwarn -xansi -n32 -mips3 -exceptions
ASFLAGS = -O -OPT:Olimit=4000 -dollar -fullwarn -xansi -n32 -mips3
#CFLAGS=-ansi -n32 -O3 -fullwarn -woff 1429 -D_SGI_SOURCE $(MPICMN)
CFLAGS=-ansi -n32 -O2 -fullwarn -woff 1429 -D_SGI_SOURCE $(MPICMN)
#CFLAGS=-ansi -n32 -g -fullwarn -woff 1429 -D_SGI_SOURCE $(MPICMN)
#CFLAGS=-ansi -64 -O2 -fullwarn -woff 1429 -D_SGI_SOURCE -DMP_NO_MP_WORD \
$(MPICMN)
endif
ifeq ($(TARGET),alphaOSF1)
#Alpha/OSF1
MPICMN += -DMP_ASSEMBLY_MULTIPLY
AS_OBJS+= mpvalpha.o
#CFLAGS= -O -Olimit 4000 -ieee_with_inexact -std1 -DOSF1 -D_REENTRANT $(MPICMN)
CFLAGS= -O -Olimit 4000 -ieee_with_inexact -std1 -DOSF1 -D_REENTRANT \
-DMP_NO_MP_WORD $(MPICMN)
endif
ifeq ($(TARGET),v9SOLARIS)
#Solaris 64
SOLARIS_FPU_FLAGS = -fast -xO5 -xrestrict=%all -xchip=ultra -xarch=v9a -KPIC -mt
#SOLARIS_FPU_FLAGS = -fast -xO5 -xrestrict=%all -xdepend -xchip=ultra -xarch=v9a -KPIC -mt
SOLARIS_ASM_FLAGS = -xchip=ultra -xarch=v9a -KPIC -mt
AS_OBJS += montmulfv9.o
AS_OBJS += mpi_sparc.o mpv_sparcv9.o
MPICMN += -DMP_USE_UINT_DIGIT
#MPICMN += -DMP_NO_MP_WORD
MPICMN += -DMP_ASSEMBLY_MULTIPLY
MPICMN += -DMP_USING_MONT_MULF
CFLAGS= -O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
-DSOLARIS2_8 -xarch=v9 -DXP_UNIX $(MPICMN)
#CFLAGS= -g -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
-DSOLARIS2_8 -xarch=v9 -DXP_UNIX $(MPICMN)
endif
ifeq ($(TARGET),v8plusSOLARIS)
#Solaris 32
SOLARIS_FPU_FLAGS = -fast -xO5 -xrestrict=%all -xdepend -xchip=ultra -xarch=v8plusa -KPIC -mt
SOLARIS_ASM_FLAGS = -xchip=ultra -xarch=v8plusa -KPIC -mt
AS_OBJS += montmulfv8.o
AS_OBJS += mpi_sparc.o mpv_sparcv8.o
#AS_OBJS = montmulf.o
MPICMN += -DMP_ASSEMBLY_MULTIPLY
MPICMN += -DMP_USING_MONT_MULF
MPICMN += -DMP_USE_UINT_DIGIT
MPICMN += -DMP_NO_MP_WORD
CFLAGS=-O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
-DSOLARIS2_6 -xarch=v8plus -DXP_UNIX $(MPICMN)
endif
ifeq ($(TARGET),v8SOLARIS)
#Solaris 32
#SOLARIS_FPU_FLAGS = -fast -xO5 -xrestrict=%all -xdepend -xchip=ultra -xarch=v8 -KPIC -mt
#SOLARIS_ASM_FLAGS = -xchip=ultra -xarch=v8plusa -KPIC -mt
#AS_OBJS = montmulfv8.o mpi_sparc.o mpv_sparcv8.o
#AS_OBJS = montmulf.o
#MPICMN += -DMP_USING_MONT_MULF
#MPICMN += -DMP_ASSEMBLY_MULTIPLY
MPICMN += -DMP_USE_LONG_LONG_MULTIPLY -DMP_USE_UINT_DIGIT
MPICMN += -DMP_NO_MP_WORD
CFLAGS=-O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
-DSOLARIS2_6 -xarch=v8 -DXP_UNIX $(MPICMN)
endif
ifeq ($(TARGET),ia64HPUX)
#HPUX 32 on ia64 -- 64 bit digits SCREAM.
# This one is for DD32 which is the 32-bit ABI with 64-bit registers.
CFLAGS= +O3 -DHPUX10 -D_POSIX_C_SOURCE=199506L -Aa +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +p +DD32 -DHPUX11 -DXP_UNIX -Wl,+k $(MPICMN)
#CFLAGS= -O -DHPUX10 -D_POSIX_C_SOURCE=199506L -Aa +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +p +DD32 -DHPUX11 -DXP_UNIX -Wl,+k $(MPICMN)
#CFLAGS= -g -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +p +DD32 -DHPUX11 -DXP_UNIX -Wl,+k $(MPICMN)
endif
ifeq ($(TARGET),ia64HPUX64)
#HPUX 32 on ia64
# This one is for DD64 which is the 64-bit ABI
CFLAGS= +O3 -DHPUX10 -D_POSIX_C_SOURCE=199506L -Aa +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +p +DD64 -DHPUX11 -DXP_UNIX -Wl,+k $(MPICMN)
#CFLAGS= -g -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +p +DD64 -DHPUX11 -DXP_UNIX -Wl,+k $(MPICMN)
endif
ifeq ($(TARGET),PA2.0WHPUX)
#HPUX64 (HP PA 2.0 Wide) using MAXPY and 64-bit digits
MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
AS_OBJS = mpi_hp.o hpma512.o hppa20.o
CFLAGS= -O -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +DA2.0W +DS2.0 +O3 +DChpux -DHPUX11 -DXP_UNIX \
$(MPICMN)
#CFLAGS= -g -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +DA2.0W +DS2.0 +DChpux -DHPUX11 -DXP_UNIX \
$(MPICMN)
AS = $(CC) $(CFLAGS) -c
endif
ifeq ($(TARGET),PA2.0NHPUX)
#HPUX32 (HP PA 2.0 Narrow) hybrid model, using 32-bit digits
# This one is for DA2.0 (N) which is the 32-bit ABI with 64-bit registers.
MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
AS_OBJS = mpi_hp.o hpma512.o hppa20.o
CFLAGS= +O3 -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +DA2.0 +DS2.0 +DChpux -DHPUX11 -DXP_UNIX \
-Wl,+k $(MPICMN)
#CFLAGS= -g -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE -Aa +e -z +DA2.0 +DS2.0 +DChpux -DHPUX11 -DXP_UNIX \
-Wl,+k $(MPICMN)
AS = $(CC) $(CFLAGS) -c
endif
ifeq ($(TARGET),PA1.1HPUX)
#HPUX32 (HP PA 1.1) Pure 32 bit
MPICMN += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
#MPICMN += -DMP_USE_LONG_LONG_MULTIPLY
CFLAGS= -O -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
-D_HPUX_SOURCE +DAportable +DS1.1 -DHPUX11 -DXP_UNIX $(MPICMN)
##CFLAGS= -g -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
# -D_HPUX_SOURCE +DAportable +DS1.1 -DHPUX11 -DXP_UNIX $(MPICMN)
endif
ifeq ($(TARGET),32AIX)
#
CC = xlC_r
MPICMN += -DMP_USE_UINT_DIGIT
MPICMN += -DMP_NO_DIV_WORD
#MPICMN += -DMP_NO_MUL_WORD
MPICMN += -DMP_NO_ADD_WORD
MPICMN += -DMP_NO_SUB_WORD
#MPICMN += -DMP_NO_MP_WORD
#MPICMN += -DMP_USE_LONG_LONG_MULTIPLY
CFLAGS = -O -DAIX -DSYSV -qarch=com -DAIX4_3 -DXP_UNIX -UDEBUG -DNDEBUG $(MPICMN)
#CFLAGS = -g -DAIX -DSYSV -qarch=com -DAIX4_3 -DXP_UNIX -UDEBUG -DNDEBUG $(MPICMN)
#CFLAGS += -pg
endif
ifeq ($(TARGET),64AIX)
#
CC = xlC_r
MPICMN += -DMP_USE_UINT_DIGIT
CFLAGS = -O -O2 -DAIX -DSYSV -qarch=com -DAIX_64BIT -DAIX4_3 -DXP_UNIX -UDEBUG -DNDEBUG $(MPICMN)
OBJECT_MODE=64
export OBJECT_MODE
endif
ifeq ($(TARGET),x86LINUX)
#Linux
AS_OBJS = mpi_x86.o
MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
MPICMN += -DMP_MONT_USE_MP_MUL
CFLAGS= -O2 -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1 -ansi -Wall \
-pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR \
-DXP_UNIX -UDEBUG -DNDEBUG -D_REENTRANT $(MPICMN)
#CFLAGS= -g -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1 -ansi -Wall \
-pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR \
-DXP_UNIX -DDEBUG -UNDEBUG -D_REENTRANT $(MPICMN)
#CFLAGS= -g -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1 -ansi -Wall \
-pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR \
-DXP_UNIX -UDEBUG -DNDEBUG -D_REENTRANT $(MPICMN)
endif
ifeq ($(TARGET),AMD64SOLARIS)
ASFLAGS += -xarch=generic64
AS_OBJS = mpi_amd64.o mpi_amd64_sun.o
MP_CONFIG = -DMP_ASSEMBLY_MULTIPLY -DMPI_AMD64
CFLAGS = -xarch=generic64 -xO4 -I. -DMP_API_COMPATIBLE -DMP_IOFUNC $(MP_CONFIG)
MPICMN += $(MP_CONFIG)
mpi_amd64_asm.o: mpi_amd64_sun.s
$(AS) -xarch=generic64 -P -D_ASM mpi_amd64_sun.s
endif

View File

@@ -1,90 +0,0 @@
#
# Test suite table for MPI library
#
# Format of entries:
# suite-name:function-name:description
#
# suite-name The name used to identify this test in mpi-test
# function-name The function called to perform this test in mpi-test.c
# description A brief description of what the suite tests
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: test-arrays.txt,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
list:test_list:print out a list of the available test suites
copy:test_copy:test assignment of mp-int structures
exchange:test_exch:test exchange of mp-int structures
zero:test_zero:test zeroing of an mp-int
set:test_set:test setting an mp-int to a small constant
absolute-value:test_abs:test the absolute value function
negate:test_neg:test the arithmetic negation function
add-digit:test_add_d:test digit addition
add:test_add:test full addition
subtract-digit:test_sub_d:test digit subtraction
subtract:test_sub:test full subtraction
multiply-digit:test_mul_d:test digit multiplication
multiply:test_mul:test full multiplication
square:test_sqr:test full squaring function
divide-digit:test_div_d:test digit division
divide-2:test_div_2:test division by two
divide-2d:test_div_2d:test division & remainder by 2^d
divide:test_div:test full division
expt-digit:test_expt_d:test digit exponentiation
expt:test_expt:test full exponentiation
expt-2:test_2expt:test power-of-two exponentiation
square-root:test_sqrt:test integer square root function
modulo-digit:test_mod_d:test digit modular reduction
modulo:test_mod:test full modular reduction
mod-add:test_addmod:test modular addition
mod-subtract:test_submod:test modular subtraction
mod-multiply:test_mulmod:test modular multiplication
mod-square:test_sqrmod:test modular squaring function
mod-expt:test_exptmod:test full modular exponentiation
mod-expt-digit:test_exptmod_d:test digit modular exponentiation
mod-inverse:test_invmod:test modular inverse function
compare-digit:test_cmp_d:test digit comparison function
compare-zero:test_cmp_z:test zero comparison function
compare:test_cmp:test general signed comparison
compare-magnitude:test_cmp_mag:test general magnitude comparison
parity:test_parity:test parity comparison functions
gcd:test_gcd:test greatest common divisor functions
lcm:test_lcm:test least common multiple function
conversion:test_convert:test general radix conversion facilities
binary:test_raw:test raw output format
pprime:test_pprime:test probabilistic primality tester
fermat:test_fermat:test Fermat pseudoprimality tester

View File

@@ -1,194 +0,0 @@
/*
* test-info.c
*
* Arbitrary precision integer arithmetic library
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: test-info.c,v 1.3 2004-04-27 23:04:36 gerv%gerv.net Exp $ */
/* Table mapping test suite names to index numbers */
const int g_count = 42;
const char *g_names[] = {
"list", /* print out a list of the available test suites */
"copy", /* test assignment of mp-int structures */
"exchange", /* test exchange of mp-int structures */
"zero", /* test zeroing of an mp-int */
"set", /* test setting an mp-int to a small constant */
"absolute-value", /* test the absolute value function */
"negate", /* test the arithmetic negation function */
"add-digit", /* test digit addition */
"add", /* test full addition */
"subtract-digit", /* test digit subtraction */
"subtract", /* test full subtraction */
"multiply-digit", /* test digit multiplication */
"multiply", /* test full multiplication */
"square", /* test full squaring function */
"divide-digit", /* test digit division */
"divide-2", /* test division by two */
"divide-2d", /* test division & remainder by 2^d */
"divide", /* test full division */
"expt-digit", /* test digit exponentiation */
"expt", /* test full exponentiation */
"expt-2", /* test power-of-two exponentiation */
"square-root", /* test integer square root function */
"modulo-digit", /* test digit modular reduction */
"modulo", /* test full modular reduction */
"mod-add", /* test modular addition */
"mod-subtract", /* test modular subtraction */
"mod-multiply", /* test modular multiplication */
"mod-square", /* test modular squaring function */
"mod-expt", /* test full modular exponentiation */
"mod-expt-digit", /* test digit modular exponentiation */
"mod-inverse", /* test modular inverse function */
"compare-digit", /* test digit comparison function */
"compare-zero", /* test zero comparison function */
"compare", /* test general signed comparison */
"compare-magnitude", /* test general magnitude comparison */
"parity", /* test parity comparison functions */
"gcd", /* test greatest common divisor functions */
"lcm", /* test least common multiple function */
"conversion", /* test general radix conversion facilities */
"binary", /* test raw output format */
"pprime", /* test probabilistic primality tester */
"fermat" /* test Fermat pseudoprimality tester */
};
/* Test function prototypes */
int test_list(void);
int test_copy(void);
int test_exch(void);
int test_zero(void);
int test_set(void);
int test_abs(void);
int test_neg(void);
int test_add_d(void);
int test_add(void);
int test_sub_d(void);
int test_sub(void);
int test_mul_d(void);
int test_mul(void);
int test_sqr(void);
int test_div_d(void);
int test_div_2(void);
int test_div_2d(void);
int test_div(void);
int test_expt_d(void);
int test_expt(void);
int test_2expt(void);
int test_sqrt(void);
int test_mod_d(void);
int test_mod(void);
int test_addmod(void);
int test_submod(void);
int test_mulmod(void);
int test_sqrmod(void);
int test_exptmod(void);
int test_exptmod_d(void);
int test_invmod(void);
int test_cmp_d(void);
int test_cmp_z(void);
int test_cmp(void);
int test_cmp_mag(void);
int test_parity(void);
int test_gcd(void);
int test_lcm(void);
int test_convert(void);
int test_raw(void);
int test_pprime(void);
int test_fermat(void);
/* Table mapping index numbers to functions */
int (*g_tests[])(void) = {
test_list, test_copy, test_exch, test_zero,
test_set, test_abs, test_neg, test_add_d,
test_add, test_sub_d, test_sub, test_mul_d,
test_mul, test_sqr, test_div_d, test_div_2,
test_div_2d, test_div, test_expt_d, test_expt,
test_2expt, test_sqrt, test_mod_d, test_mod,
test_addmod, test_submod, test_mulmod, test_sqrmod,
test_exptmod, test_exptmod_d, test_invmod, test_cmp_d,
test_cmp_z, test_cmp, test_cmp_mag, test_parity,
test_gcd, test_lcm, test_convert, test_raw,
test_pprime, test_fermat
};
/* Table mapping index numbers to descriptions */
const char *g_descs[] = {
"print out a list of the available test suites",
"test assignment of mp-int structures",
"test exchange of mp-int structures",
"test zeroing of an mp-int",
"test setting an mp-int to a small constant",
"test the absolute value function",
"test the arithmetic negation function",
"test digit addition",
"test full addition",
"test digit subtraction",
"test full subtraction",
"test digit multiplication",
"test full multiplication",
"test full squaring function",
"test digit division",
"test division by two",
"test division & remainder by 2^d",
"test full division",
"test digit exponentiation",
"test full exponentiation",
"test power-of-two exponentiation",
"test integer square root function",
"test digit modular reduction",
"test full modular reduction",
"test modular addition",
"test modular subtraction",
"test modular multiplication",
"test modular squaring function",
"test full modular exponentiation",
"test digit modular exponentiation",
"test modular inverse function",
"test digit comparison function",
"test zero comparison function",
"test general signed comparison",
"test general magnitude comparison",
"test parity comparison functions",
"test greatest common divisor functions",
"test least common multiple function",
"test general radix conversion facilities",
"test raw output format",
"test probabilistic primality tester",
"test Fermat pseudoprimality tester"
};

View File

@@ -1,6 +0,0 @@
Within this directory, each of the file listed below is licensed under
the terms given in the file LICENSE-MPL, also in this directory.
pi1k.txt
pi2k.txt
pi5k.txt

View File

@@ -1,32 +0,0 @@
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is the Netscape security libraries.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1994-2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License Version 2 or later (the
"GPL"), in which case the provisions of the GPL are applicable
instead of those above. If you wish to allow use of your
version of this file only under the terms of the GPL and not to
allow others to use your version of this file under the MPL,
indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by
the GPL. If you do not delete the provisions above, a recipient
may use your version of this file under either the MPL or the
GPL.

View File

@@ -1,75 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 1: Simple input test (drives single-digit multiply and add,
* as well as I/O routines)
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-1.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#ifdef MAC_CW_SIOUX
#include <console.h>
#endif
#include "mpi.h"
int main(int argc, char *argv[])
{
int ix;
mp_int mp;
#ifdef MAC_CW_SIOUX
argc = ccommand(&argv);
#endif
mp_init(&mp);
for(ix = 1; ix < argc; ix++) {
mp_read_radix(&mp, argv[ix], 10);
mp_print(&mp, stdout);
fputc('\n', stdout);
}
mp_clear(&mp);
return 0;
}

View File

@@ -1,86 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 2: Basic addition and subtraction test
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-2.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "mpi.h"
int main(int argc, char *argv[])
{
mp_int a, b, c;
if(argc < 3) {
fprintf(stderr, "Usage: %s <a> <b>\n", argv[0]);
return 1;
}
printf("Test 2: Basic addition and subtraction\n\n");
mp_init(&a);
mp_init(&b);
mp_read_radix(&a, argv[1], 10);
mp_read_radix(&b, argv[2], 10);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
mp_init(&c);
printf("c = a + b\n");
mp_add(&a, &b, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("c = a - b\n");
mp_sub(&a, &b, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
mp_clear(&c);
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,131 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 3: Multiplication, division, and exponentiation test
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-3.c,v 1.4 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#include "mpi.h"
#define SQRT 1 /* define nonzero to get square-root test */
#define EXPT 0 /* define nonzero to get exponentiate test */
int main(int argc, char *argv[])
{
int ix;
mp_int a, b, c, d;
mp_digit r;
mp_err res;
if(argc < 3) {
fprintf(stderr, "Usage: %s <a> <b>\n", argv[0]);
return 1;
}
printf("Test 3: Multiplication and division\n\n");
srand(time(NULL));
mp_init(&a);
mp_init(&b);
mp_read_variable_radix(&a, argv[1], 10);
mp_read_variable_radix(&b, argv[2], 10);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
mp_init(&c);
printf("\nc = a * b\n");
mp_mul(&a, &b, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nc = b * 32523\n");
mp_mul_d(&b, 32523, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
mp_init(&d);
printf("\nc = a / b, d = a mod b\n");
mp_div(&a, &b, &c, &d);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("d = "); mp_print(&d, stdout); fputc('\n', stdout);
ix = rand() % 256;
printf("\nc = a / %d, r = a mod %d\n", ix, ix);
mp_div_d(&a, (mp_digit)ix, &c, &r);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("r = %04X\n", r);
#if EXPT
printf("\nc = a ** b\n");
mp_expt(&a, &b, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
#endif
ix = rand() % 256;
printf("\nc = 2^%d\n", ix);
mp_2expt(&c, ix);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
#if SQRT
printf("\nc = sqrt(a)\n");
if((res = mp_sqrt(&a, &c)) != MP_OKAY) {
printf("mp_sqrt: %s\n", mp_strerror(res));
} else {
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
mp_sqr(&c, &c);
printf("c^2 = "); mp_print(&c, stdout); fputc('\n', stdout);
}
#endif
mp_clear(&d);
mp_clear(&c);
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,144 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 3a: Multiplication vs. squaring timing test
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-3a.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#include "mpi.h"
#include "mpprime.h"
int main(int argc, char *argv[])
{
int ix, num, prec = 8;
double d1, d2;
clock_t start, finish;
time_t seed;
mp_int a, c, d;
seed = time(NULL);
if(argc < 2) {
fprintf(stderr, "Usage: %s <num-tests> [<precision>]\n", argv[0]);
return 1;
}
if((num = atoi(argv[1])) < 0)
num = -num;
if(!num) {
fprintf(stderr, "%s: must perform at least 1 test\n", argv[0]);
return 1;
}
if(argc > 2) {
if((prec = atoi(argv[2])) <= 0)
prec = 8;
else
prec = (prec + (DIGIT_BIT - 1)) / DIGIT_BIT;
}
printf("Test 3a: Multiplication vs squaring timing test\n"
"Precision: %d digits (%u bits)\n"
"# of tests: %d\n\n", prec, prec * DIGIT_BIT, num);
mp_init_size(&a, prec);
mp_init(&c); mp_init(&d);
printf("Verifying accuracy ... \n");
srand((unsigned int)seed);
for(ix = 0; ix < num; ix++) {
mpp_random_size(&a, prec);
mp_mul(&a, &a, &c);
mp_sqr(&a, &d);
if(mp_cmp(&c, &d) != 0) {
printf("Error! Results not accurate:\n");
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("d = "); mp_print(&d, stdout); fputc('\n', stdout);
mp_sub(&c, &d, &d);
printf("dif "); mp_print(&d, stdout); fputc('\n', stdout);
mp_clear(&c); mp_clear(&d);
mp_clear(&a);
return 1;
}
}
printf("Accuracy is confirmed for the %d test samples\n", num);
mp_clear(&d);
printf("Testing squaring ... \n");
srand((unsigned int)seed);
start = clock();
for(ix = 0; ix < num; ix++) {
mpp_random_size(&a, prec);
mp_sqr(&a, &c);
}
finish = clock();
d2 = (double)(finish - start) / CLOCKS_PER_SEC;
printf("Testing multiplication ... \n");
srand((unsigned int)seed);
start = clock();
for(ix = 0; ix < num; ix++) {
mpp_random(&a);
mp_mul(&a, &a, &c);
}
finish = clock();
d1 = (double)(finish - start) / CLOCKS_PER_SEC;
printf("Multiplication time: %.3f sec (%.3f each)\n", d1, d1 / num);
printf("Squaring time: %.3f sec (%.3f each)\n", d2, d2 / num);
printf("Improvement: %.2f%%\n", (1.0 - (d2 / d1)) * 100.0);
mp_clear(&c);
mp_clear(&a);
return 0;
}

View File

@@ -1,126 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 4: Modular arithmetic tests
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-4.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "mpi.h"
int main(int argc, char *argv[])
{
int ix;
mp_int a, b, c, m;
mp_digit r;
if(argc < 4) {
fprintf(stderr, "Usage: %s <a> <b> <m>\n", argv[0]);
return 1;
}
printf("Test 4: Modular arithmetic\n\n");
mp_init(&a);
mp_init(&b);
mp_init(&m);
mp_read_radix(&a, argv[1], 10);
mp_read_radix(&b, argv[2], 10);
mp_read_radix(&m, argv[3], 10);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("m = "); mp_print(&m, stdout); fputc('\n', stdout);
mp_init(&c);
printf("\nc = a (mod m)\n");
mp_mod(&a, &m, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nc = b (mod m)\n");
mp_mod(&b, &m, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nc = b (mod 1853)\n");
mp_mod_d(&b, 1853, &r);
printf("c = %04X\n", r);
printf("\nc = (a + b) mod m\n");
mp_addmod(&a, &b, &m, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nc = (a - b) mod m\n");
mp_submod(&a, &b, &m, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nc = (a * b) mod m\n");
mp_mulmod(&a, &b, &m, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nc = (a ** b) mod m\n");
mp_exptmod(&a, &b, &m, &c);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("\nIn-place modular squaring test:\n");
for(ix = 0; ix < 5; ix++) {
printf("a = (a * a) mod m a = ");
mp_sqrmod(&a, &m, &a);
mp_print(&a, stdout);
fputc('\n', stdout);
}
mp_clear(&c);
mp_clear(&m);
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,138 +0,0 @@
/*
* mptest4a - modular exponentiation speed test
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-4a.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>
#include "mpi.h"
#include "mpprime.h"
typedef struct {
unsigned int sec;
unsigned int usec;
} instant_t;
instant_t now(void)
{
struct timeval clk;
instant_t res;
res.sec = res.usec = 0;
if(gettimeofday(&clk, NULL) != 0)
return res;
res.sec = clk.tv_sec;
res.usec = clk.tv_usec;
return res;
}
extern mp_err s_mp_pad();
int main(int argc, char *argv[])
{
int ix, num, prec = 8;
unsigned int d;
instant_t start, finish;
time_t seed;
mp_int a, m, c;
seed = time(NULL);
if(argc < 2) {
fprintf(stderr, "Usage: %s <num-tests> [<precision>]\n", argv[0]);
return 1;
}
if((num = atoi(argv[1])) < 0)
num = -num;
if(!num) {
fprintf(stderr, "%s: must perform at least 1 test\n", argv[0]);
return 1;
}
if(argc > 2) {
if((prec = atoi(argv[2])) <= 0)
prec = 8;
}
printf("Test 3a: Modular exponentiation timing test\n"
"Precision: %d digits (%d bits)\n"
"# of tests: %d\n\n", prec, prec * DIGIT_BIT, num);
mp_init_size(&a, prec);
mp_init_size(&m, prec);
mp_init_size(&c, prec);
s_mp_pad(&a, prec);
s_mp_pad(&m, prec);
s_mp_pad(&c, prec);
printf("Testing modular exponentiation ... \n");
srand((unsigned int)seed);
start = now();
for(ix = 0; ix < num; ix++) {
mpp_random(&a);
mpp_random(&c);
mpp_random(&m);
mp_exptmod(&a, &c, &m, &c);
}
finish = now();
d = (finish.sec - start.sec) * 1000000;
d -= start.usec; d += finish.usec;
printf("Total time elapsed: %u usec\n", d);
printf("Time per exponentiation: %u usec (%.3f sec)\n",
(d / num), (double)(d / num) / 1000000);
mp_clear(&c);
mp_clear(&a);
mp_clear(&m);
return 0;
}

View File

@@ -1,135 +0,0 @@
/*
* mptest-4b.c
*
* Test speed of a large modular exponentiation of a primitive element
* modulo a prime.
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-4b.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>
#include "mpi.h"
#include "mpprime.h"
char *g_prime =
"34BD53C07350E817CCD49721020F1754527959C421C1533244769D4CF060A8B1C3DA"
"25094BE723FB1E2369B55FEEBBE0FAC16425161BF82684062B5EC5D7D47D1B23C117"
"0FA19745E44A55E148314E582EB813AC9EE5126295E2E380CACC2F6D206B293E5ED9"
"23B54EE961A8C69CD625CE4EC38B70C649D7F014432AEF3A1C93";
char *g_gen = "5";
typedef struct {
unsigned int sec;
unsigned int usec;
} instant_t;
instant_t now(void)
{
struct timeval clk;
instant_t res;
res.sec = res.usec = 0;
if(gettimeofday(&clk, NULL) != 0)
return res;
res.sec = clk.tv_sec;
res.usec = clk.tv_usec;
return res;
}
extern mp_err s_mp_pad();
int main(int argc, char *argv[])
{
instant_t start, finish;
mp_int prime, gen, expt, res;
unsigned int ix, diff;
int num;
srand(time(NULL));
if(argc < 2) {
fprintf(stderr, "Usage: %s <num-tests>\n", argv[0]);
return 1;
}
if((num = atoi(argv[1])) < 0)
num = -num;
if(num == 0)
++num;
mp_init(&prime); mp_init(&gen); mp_init(&res);
mp_read_radix(&prime, g_prime, 16);
mp_read_radix(&gen, g_gen, 16);
mp_init_size(&expt, USED(&prime) - 1);
s_mp_pad(&expt, USED(&prime) - 1);
printf("Testing %d modular exponentations ... \n", num);
start = now();
for(ix = 0; ix < num; ix++) {
mpp_random(&expt);
mp_exptmod(&gen, &expt, &prime, &res);
}
finish = now();
diff = (finish.sec - start.sec) * 1000000;
diff += finish.usec; diff -= start.usec;
printf("%d operations took %u usec (%.3f sec)\n",
num, diff, (double)diff / 1000000.0);
printf("That is %.3f sec per operation.\n",
((double)diff / 1000000.0) / num);
mp_clear(&expt);
mp_clear(&res);
mp_clear(&gen);
mp_clear(&prime);
return 0;
}

View File

@@ -1,103 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 5: Other number theoretic functions
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-5.c,v 1.4 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "mpi.h"
int main(int argc, char *argv[])
{
mp_int a, b, c, x, y;
if(argc < 3) {
fprintf(stderr, "Usage: %s <a> <b>\n", argv[0]);
return 1;
}
printf("Test 5: Number theoretic functions\n\n");
mp_init(&a);
mp_init(&b);
mp_read_radix(&a, argv[1], 10);
mp_read_radix(&b, argv[2], 10);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
mp_init(&c);
printf("\nc = (a, b)\n");
mp_gcd(&a, &b, &c);
printf("Euclid: c = "); mp_print(&c, stdout); fputc('\n', stdout);
/*
mp_bgcd(&a, &b, &c);
printf("Binary: c = "); mp_print(&c, stdout); fputc('\n', stdout);
*/
mp_init(&x);
mp_init(&y);
printf("\nc = (a, b) = ax + by\n");
mp_xgcd(&a, &b, &c, &x, &y);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("x = "); mp_print(&x, stdout); fputc('\n', stdout);
printf("y = "); mp_print(&y, stdout); fputc('\n', stdout);
printf("\nc = a^-1 (mod b)\n");
if(mp_invmod(&a, &b, &c) == MP_UNDEF) {
printf("a has no inverse mod b\n");
} else {
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
}
mp_clear(&y);
mp_clear(&x);
mp_clear(&c);
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,165 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 5a: Greatest common divisor speed test, binary vs. Euclid
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-5a.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>
#include "mpi.h"
#include "mpprime.h"
typedef struct {
unsigned int sec;
unsigned int usec;
} instant_t;
instant_t now(void)
{
struct timeval clk;
instant_t res;
res.sec = res.usec = 0;
if(gettimeofday(&clk, NULL) != 0)
return res;
res.sec = clk.tv_sec;
res.usec = clk.tv_usec;
return res;
}
#define PRECISION 16
int main(int argc, char *argv[])
{
int ix, num, prec = PRECISION;
mp_int a, b, c, d;
instant_t start, finish;
time_t seed;
unsigned int d1, d2;
seed = time(NULL);
if(argc < 2) {
fprintf(stderr, "Usage: %s <num-tests>\n", argv[0]);
return 1;
}
if((num = atoi(argv[1])) < 0)
num = -num;
printf("Test 5a: Euclid vs. Binary, a GCD speed test\n\n"
"Number of tests: %d\n"
"Precision: %d digits\n\n", num, prec);
mp_init_size(&a, prec);
mp_init_size(&b, prec);
mp_init(&c);
mp_init(&d);
printf("Verifying accuracy ... \n");
srand((unsigned int)seed);
for(ix = 0; ix < num; ix++) {
mpp_random_size(&a, prec);
mpp_random_size(&b, prec);
mp_gcd(&a, &b, &c);
mp_bgcd(&a, &b, &d);
if(mp_cmp(&c, &d) != 0) {
printf("Error! Results not accurate:\n");
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("d = "); mp_print(&d, stdout); fputc('\n', stdout);
mp_clear(&a); mp_clear(&b); mp_clear(&c); mp_clear(&d);
return 1;
}
}
mp_clear(&d);
printf("Accuracy confirmed for the %d test samples\n", num);
printf("Testing Euclid ... \n");
srand((unsigned int)seed);
start = now();
for(ix = 0; ix < num; ix++) {
mpp_random_size(&a, prec);
mpp_random_size(&b, prec);
mp_gcd(&a, &b, &c);
}
finish = now();
d1 = (finish.sec - start.sec) * 1000000;
d1 -= start.usec; d1 += finish.usec;
printf("Testing binary ... \n");
srand((unsigned int)seed);
start = now();
for(ix = 0; ix < num; ix++) {
mpp_random_size(&a, prec);
mpp_random_size(&b, prec);
mp_bgcd(&a, &b, &c);
}
finish = now();
d2 = (finish.sec - start.sec) * 1000000;
d2 -= start.usec; d2 += finish.usec;
printf("Euclidean algorithm time: %u usec\n", d1);
printf("Binary algorithm time: %u usec\n", d2);
printf("Improvement: %.2f%%\n",
(1.0 - ((double)d2 / (double)d1)) * 100.0);
mp_clear(&c);
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,111 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 6: Output functions
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-6.c,v 1.3 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "mpi.h"
void print_buf(FILE *ofp, char *buf, int len)
{
int ix, brk = 0;
for(ix = 0; ix < len; ix++) {
fprintf(ofp, "%02X ", buf[ix]);
brk = (brk + 1) & 0xF;
if(!brk)
fputc('\n', ofp);
}
if(brk)
fputc('\n', ofp);
}
int main(int argc, char *argv[])
{
int ix, size;
mp_int a;
char *buf;
if(argc < 2) {
fprintf(stderr, "Usage: %s <a>\n", argv[0]);
return 1;
}
printf("Test 6: Output functions\n\n");
mp_init(&a);
mp_read_radix(&a, argv[1], 10);
printf("\nConverting to a string:\n");
printf("Rx Size Representation\n");
for(ix = 2; ix <= MAX_RADIX; ix++) {
size = mp_radix_size(&a, ix);
buf = calloc(size, sizeof(char));
mp_toradix(&a, buf, ix);
printf("%2d: %3d: %s\n", ix, size, buf);
free(buf);
}
printf("\nRaw output:\n");
size = mp_raw_size(&a);
buf = calloc(size, sizeof(char));
printf("Size: %d bytes\n", size);
mp_toraw(&a, buf);
print_buf(stdout, buf, size);
free(buf);
mp_clear(&a);
return 0;
}

View File

@@ -1,107 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 7: Random and divisibility tests
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-7.c,v 1.4 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#define MP_IOFUNC
#include "mpi.h"
#include "mpprime.h"
int main(int argc, char *argv[])
{
mp_digit num;
mp_int a, b;
srand(time(NULL));
if(argc < 3) {
fprintf(stderr, "Usage: %s <a> <b>\n", argv[0]);
return 1;
}
printf("Test 7: Random & divisibility tests\n\n");
mp_init(&a);
mp_init(&b);
mp_read_radix(&a, argv[1], 10);
mp_read_radix(&b, argv[2], 10);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
if(mpp_divis(&a, &b) == MP_YES)
printf("a is divisible by b\n");
else
printf("a is not divisible by b\n");
if(mpp_divis(&b, &a) == MP_YES)
printf("b is divisible by a\n");
else
printf("b is not divisible by a\n");
printf("\nb = mpp_random()\n");
mpp_random(&b);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
mpp_random(&b);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
mpp_random(&b);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("\nTesting a for divisibility by first 170 primes\n");
num = 170;
if(mpp_divis_primes(&a, &num) == MP_YES)
printf("It is divisible by at least one of them\n");
else
printf("It is not divisible by any of them\n");
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,98 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test 8: Probabilistic primality tester
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-8.c,v 1.4 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#define MP_IOFUNC
#include "mpi.h"
#include "mpprime.h"
int main(int argc, char *argv[])
{
int ix;
mp_digit num;
mp_int a;
srand(time(NULL));
if(argc < 2) {
fprintf(stderr, "Usage: %s <a>\n", argv[0]);
return 1;
}
printf("Test 8: Probabilistic primality testing\n\n");
mp_init(&a);
mp_read_radix(&a, argv[1], 10);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("\nChecking for divisibility by small primes ... \n");
num = 170;
if(mpp_divis_primes(&a, &num) == MP_YES) {
printf("it is not prime\n");
goto CLEANUP;
}
printf("Passed that test (not divisible by any small primes).\n");
for(ix = 0; ix < 10; ix++) {
printf("\nPerforming Rabin-Miller test, iteration %d\n", ix + 1);
if(mpp_pprime(&a, 5) == MP_NO) {
printf("it is not prime\n");
goto CLEANUP;
}
}
printf("All tests passed; a is probably prime\n");
CLEANUP:
mp_clear(&a);
return 0;
}

View File

@@ -1,116 +0,0 @@
/*
* mptest-9.c
*
* Test logical functions
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
*
* The Initial Developer of the Original Code is
* Michael J. Fromberger.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: mptest-9.c,v 1.4 2004-04-27 23:04:37 gerv%gerv.net Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#include "mpi.h"
#include "mplogic.h"
int main(int argc, char *argv[])
{
mp_int a, b, c;
int pco;
mp_err res;
printf("Test 9: Logical functions\n\n");
if(argc < 3) {
fprintf(stderr, "Usage: %s <a> <b>\n", argv[0]);
return 1;
}
mp_init(&a); mp_init(&b); mp_init(&c);
mp_read_radix(&a, argv[1], 16);
mp_read_radix(&b, argv[2], 16);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
mpl_not(&a, &c);
printf("~a = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_and(&a, &b, &c);
printf("a & b = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_or(&a, &b, &c);
printf("a | b = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_xor(&a, &b, &c);
printf("a ^ b = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_rsh(&a, &c, 1);
printf("a >> 1 = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_rsh(&a, &c, 5);
printf("a >> 5 = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_rsh(&a, &c, 16);
printf("a >> 16 = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_lsh(&a, &c, 1);
printf("a << 1 = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_lsh(&a, &c, 5);
printf("a << 5 = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_lsh(&a, &c, 16);
printf("a << 16 = "); mp_print(&c, stdout); fputc('\n', stdout);
mpl_num_set(&a, &pco);
printf("population(a) = %d\n", pco);
mpl_num_set(&b, &pco);
printf("population(b) = %d\n", pco);
res = mpl_parity(&a);
if(res == MP_EVEN)
printf("a has even parity\n");
else
printf("a has odd parity\n");
mp_clear(&c);
mp_clear(&b);
mp_clear(&a);
return 0;
}

View File

@@ -1,220 +0,0 @@
/*
* Simple test driver for MPI library
*
* Test GF2m: Binary Polynomial Arithmetic
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Sheueling Chang Shantz <sheueling.chang@sun.com> and
* Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "mp_gf2m.h"
int main(int argc, char *argv[])
{
int ix;
mp_int pp, a, b, x, y, order;
mp_int c, d, e;
mp_digit r;
mp_err res;
unsigned int p[] = {163,7,6,3,0};
unsigned int ptemp[10];
printf("Test b: Binary Polynomial Arithmetic\n\n");
mp_init(&pp);
mp_init(&a);
mp_init(&b);
mp_init(&x);
mp_init(&y);
mp_init(&order);
mp_read_radix(&pp, "0800000000000000000000000000000000000000C9", 16);
mp_read_radix(&a, "1", 16);
mp_read_radix(&b, "020A601907B8C953CA1481EB10512F78744A3205FD", 16);
mp_read_radix(&x, "03F0EBA16286A2D57EA0991168D4994637E8343E36", 16);
mp_read_radix(&y, "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", 16);
mp_read_radix(&order, "040000000000000000000292FE77E70C12A4234C33", 16);
printf("pp = "); mp_print(&pp, stdout); fputc('\n', stdout);
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("x = "); mp_print(&x, stdout); fputc('\n', stdout);
printf("y = "); mp_print(&y, stdout); fputc('\n', stdout);
printf("order = "); mp_print(&order, stdout); fputc('\n', stdout);
mp_init(&c);
mp_init(&d);
mp_init(&e);
/* Test polynomial conversion */
ix = mp_bpoly2arr(&pp, ptemp, 10);
if (
(ix != 5) ||
(ptemp[0] != p[0]) ||
(ptemp[1] != p[1]) ||
(ptemp[2] != p[2]) ||
(ptemp[3] != p[3]) ||
(ptemp[4] != p[4])
) {
printf("Polynomial to array conversion not correct\n");
return -1;
}
printf("Polynomial conversion test #1 successful.\n");
MP_CHECKOK( mp_barr2poly(p, &c) );
if (mp_cmp(&pp, &c) != 0) {
printf("Array to polynomial conversion not correct\n");
return -1;
}
printf("Polynomial conversion test #2 successful.\n");
/* Test addition */
MP_CHECKOK( mp_badd(&a, &a, &c) );
if (mp_cmp_z(&c) != 0) {
printf("a+a should equal zero\n");
return -1;
}
printf("Addition test #1 successful.\n");
MP_CHECKOK( mp_badd(&a, &b, &c) );
MP_CHECKOK( mp_badd(&b, &c, &c) );
if (mp_cmp(&c, &a) != 0) {
printf("c = (a + b) + b should equal a\n");
printf("a = "); mp_print(&a, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Addition test #2 successful.\n");
/* Test multiplication */
mp_set(&c, 2);
MP_CHECKOK( mp_bmul(&b, &c, &c) );
MP_CHECKOK( mp_badd(&b, &c, &c) );
mp_set(&d, 3);
MP_CHECKOK( mp_bmul(&b, &d, &d) );
if (mp_cmp(&c, &d) != 0) {
printf("c = (2 * b) + b should equal c = 3 * b\n");
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("d = "); mp_print(&d, stdout); fputc('\n', stdout);
return -1;
}
printf("Multiplication test #1 successful.\n");
/* Test modular reduction */
MP_CHECKOK( mp_bmod(&b, p, &c) );
if (mp_cmp(&b, &c) != 0) {
printf("c = b mod p should equal b\n");
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular reduction test #1 successful.\n");
MP_CHECKOK( mp_badd(&b, &pp, &c) );
MP_CHECKOK( mp_bmod(&c, p, &c) );
if (mp_cmp(&b, &c) != 0) {
printf("c = (b + p) mod p should equal b\n");
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular reduction test #2 successful.\n");
MP_CHECKOK( mp_bmul(&b, &pp, &c) );
MP_CHECKOK( mp_bmod(&c, p, &c) );
if (mp_cmp_z(&c) != 0) {
printf("c = (b * p) mod p should equal 0\n");
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular reduction test #3 successful.\n");
/* Test modular multiplication */
MP_CHECKOK( mp_bmulmod(&b, &pp, p, &c) );
if (mp_cmp_z(&c) != 0) {
printf("c = (b * p) mod p should equal 0\n");
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular multiplication test #1 successful.\n");
mp_set(&c, 1);
MP_CHECKOK( mp_badd(&pp, &c, &c) );
MP_CHECKOK( mp_bmulmod(&b, &c, p, &c) );
if (mp_cmp(&b, &c) != 0) {
printf("c = (b * (p + 1)) mod p should equal b\n");
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular multiplication test #2 successful.\n");
/* Test modular squaring */
MP_CHECKOK( mp_copy(&b, &c) );
MP_CHECKOK( mp_bmulmod(&b, &c, p, &c) );
MP_CHECKOK( mp_bsqrmod(&b, p, &d) );
if (mp_cmp(&c, &d) != 0) {
printf("c = (b * b) mod p should equal d = b^2 mod p\n");
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
printf("d = "); mp_print(&d, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular squaring test #1 successful.\n");
/* Test modular division */
MP_CHECKOK( mp_bdivmod(&b, &x, &pp, p, &c) );
MP_CHECKOK( mp_bmulmod(&c, &x, p, &c) );
if (mp_cmp(&b, &c) != 0) {
printf("c = (b / x) * x mod p should equal b\n");
printf("b = "); mp_print(&b, stdout); fputc('\n', stdout);
printf("c = "); mp_print(&c, stdout); fputc('\n', stdout);
return -1;
}
printf("Modular division test #1 successful.\n");
CLEANUP:
mp_clear(&order);
mp_clear(&y);
mp_clear(&x);
mp_clear(&b);
mp_clear(&a);
mp_clear(&pp);
return 0;
}

View File

@@ -1 +0,0 @@
31415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989

View File

@@ -1 +0,0 @@
314159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151557485724245415069595082953311686172785588907509838175463746493931925506040092770167113900984882401285836160356370766010471018194295559619894676783744944825537977472684710404753464620804668425906949129331367702898915210475216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992458631503028618297455570674983850549458858692699569092721079750930295532116534498720275596023648066549911988183479775356636980742654252786255181841757467289097777279380008164706001614524919217321721477235014144197356854816136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179049460165346680498862723279178608578438382796797668145410095388378636095068006422512520511739298489608412848862694560424196528502221066118630674427862203919494504712371378696095636437191728746776465757396241389086583264599581339047802759010

File diff suppressed because one or more lines are too long

View File

@@ -1,135 +0,0 @@
#!/bin/sh
# Simple timing test for the MPI library. Basically, we use prime
# generation as a timing test, since it exercises most of the pathways
# of the library fairly heavily. The 'primegen' tool outputs a line
# summarizing timing results. We gather these and process them for
# statistical information, which is collected into a file.
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Netscape Communications Corporation
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# $Id: timetest,v 1.6 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
# Avoid using built-in shell echoes
ECHO=/bin/echo
MAKE=gmake
# Use a fixed seed so timings will be more consistent
# This one is the 11th-18th decimal digits of 'e'
#export SEED=45904523
SEED=45904523; export SEED
#------------------------------------------------------------------------
$ECHO "\n** Running timing tests for MPI library\n"
$ECHO "Bringing 'metime' up to date ... "
if $MAKE metime ; then
:
else
$ECHO "\nMake failed to build metime.\n"
exit 1
fi
if [ ! -x ./metime ] ; then
$ECHO "\nCannot find 'metime' program, testing cannot continue.\n"
exit 1
fi
#------------------------------------------------------------------------
$ECHO "Bringing 'primegen' up to date ... "
if $MAKE primegen ; then
:
else
$ECHO "\nMake failed to build primegen.\n"
exit 1
fi
if [ ! -x ./primegen ] ; then
$ECHO "\nCannot find 'primegen' program, testing cannot continue.\n"
exit 1
fi
#------------------------------------------------------------------------
rm -f timing-results.txt
touch timing-results.txt
sizes="256 512 1024 2048"
ntests=10
trap 'echo "oop!";rm -f tt*.tmp timing-results.txt;exit 0' INT HUP
$ECHO "\n-- Modular exponentiation\n"
$ECHO "Modular exponentiation:" >> timing-results.txt
$ECHO "Running $ntests modular exponentiations per test:"
for size in $sizes ; do
$ECHO "- Gathering statistics for $size bits ... "
secs=`./metime $ntests $size | tail -1 | awk '{print $2}'`
$ECHO "$size: " $secs " seconds per op" >> timing-results.txt
tail -1 timing-results.txt
done
$ECHO "<done>";
sizes="256 512 1024"
ntests=1
$ECHO "\n-- Prime generation\n"
$ECHO "Prime generation:" >> timing-results.txt
$ECHO "Generating $ntests prime values per test:"
for size in $sizes ; do
$ECHO "- Gathering statistics for $size bits ... "
./primegen $size $ntests | grep ticks | awk '{print $7}' | tr -d '(' > tt$$.tmp
$ECHO "$size:" >> timing-results.txt
perl stats tt$$.tmp >> timing-results.txt
tail -1 timing-results.txt
rm -f tt$$.tmp
done
$ECHO "<done>"
trap 'rm -f tt*.tmp timing-results.txt' INT HUP
exit 0

View File

@@ -1,162 +0,0 @@
#!/usr/bin/perl
#
# types.pl - find recommended type definitions for digits and words
#
# This script scans the Makefile for the C compiler and compilation
# flags currently in use, and using this combination, attempts to
# compile a simple test program that outputs the sizes of the various
# unsigned integer types, in bytes. Armed with these, it finds all
# the "viable" type combinations for mp_digit and mp_word, where
# viability is defined by the requirement that mp_word be at least two
# times the precision of mp_digit.
#
# Of these, the one with the largest digit size is chosen, and
# appropriate typedef statements are written to standard output.
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
#
# The Initial Developer of the Original Code is
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
# Portions created by the Initial Developer are Copyright (C) 2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $Id: types.pl,v 1.2 2005-02-02 22:28:22 gerv%gerv.net Exp $
#
@_=split(/\//,$0);chomp($prog=pop(@_));
# The array of integer types to be considered...
@TYPES = (
"unsigned char",
"unsigned short",
"unsigned int",
"unsigned long"
);
# Macro names for the maximum unsigned value of each type
%TMAX = (
"unsigned char" => "UCHAR_MAX",
"unsigned short" => "USHRT_MAX",
"unsigned int" => "UINT_MAX",
"unsigned long" => "ULONG_MAX"
);
# Read the Makefile to find out which C compiler to use
open(MFP, "<Makefile") or die "$prog: Makefile: $!\n";
while(<MFP>) {
chomp;
if(/^CC=(.*)$/) {
$cc = $1;
last if $cflags;
} elsif(/^CFLAGS=(.*)$/) {
$cflags = $1;
last if $cc;
}
}
close(MFP);
# If we couldn't find that, use 'cc' by default
$cc = "cc" unless $cc;
printf STDERR "Using '%s' as the C compiler.\n", $cc;
print STDERR "Determining type sizes ... \n";
open(OFP, ">tc$$.c") or die "$prog: tc$$.c: $!\n";
print OFP "#include <stdio.h>\n\nint main(void)\n{\n";
foreach $type (@TYPES) {
printf OFP "\tprintf(\"%%d\\n\", (int)sizeof(%s));\n", $type;
}
print OFP "\n\treturn 0;\n}\n";
close(OFP);
system("$cc $cflags -o tc$$ tc$$.c");
die "$prog: unable to build test program\n" unless(-x "tc$$");
open(IFP, "./tc$$|") or die "$prog: can't execute test program\n";
$ix = 0;
while(<IFP>) {
chomp;
$size{$TYPES[$ix++]} = $_;
}
close(IFP);
unlink("tc$$");
unlink("tc$$.c");
print STDERR "Selecting viable combinations ... \n";
while(($type, $size) = each(%size)) {
push(@ts, [ $size, $type ]);
}
# Sort them ascending by size
@ts = sort { $a->[0] <=> $b->[0] } @ts;
# Try all possible combinations, finding pairs in which the word size
# is twice the digit size. The number of possible pairs is too small
# to bother doing this more efficiently than by brute force
for($ix = 0; $ix <= $#ts; $ix++) {
$w = $ts[$ix];
for($jx = 0; $jx <= $#ts; $jx++) {
$d = $ts[$jx];
if($w->[0] == 2 * $d->[0]) {
push(@valid, [ $d, $w ]);
}
}
}
# Sort descending by digit size
@valid = sort { $b->[0]->[0] <=> $a->[0]->[0] } @valid;
# Select the maximum as the recommended combination
$rec = shift(@valid);
printf("typedef %-18s mp_sign;\n", "char");
printf("typedef %-18s mp_digit; /* %d byte type */\n",
$rec->[0]->[1], $rec->[0]->[0]);
printf("typedef %-18s mp_word; /* %d byte type */\n",
$rec->[1]->[1], $rec->[1]->[0]);
printf("typedef %-18s mp_size;\n", "unsigned int");
printf("typedef %-18s mp_err;\n\n", "int");
printf("#define %-18s (CHAR_BIT*sizeof(mp_digit))\n", "DIGIT_BIT");
printf("#define %-18s %s\n", "DIGIT_MAX", $TMAX{$rec->[0]->[1]});
printf("#define %-18s (CHAR_BIT*sizeof(mp_word))\n", "MP_WORD_BIT");
printf("#define %-18s %s\n\n", "MP_WORD_MAX", $TMAX{$rec->[1]->[1]});
printf("#define %-18s (DIGIT_MAX+1)\n\n", "RADIX");
printf("#define %-18s \"%%0%dX\"\n", "DIGIT_FMT", (2 * $rec->[0]->[0]));
exit 0;

View File

@@ -1,4 +0,0 @@
Within this directory, each of the file listed below is licensed under
the terms given in the file LICENSE-MPL, also in this directory.
PRIMES

View File

@@ -1,32 +0,0 @@
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is the Netscape security libraries.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1994-2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License Version 2 or later (the
"GPL"), in which case the provisions of the GPL are applicable
instead of those above. If you wish to allow use of your
version of this file only under the terms of the GPL and not to
allow others to use your version of this file under the MPL,
indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by
the GPL. If you do not delete the provisions above, a recipient
may use your version of this file under either the MPL or the
GPL.

View File

@@ -1,41 +0,0 @@
Probable primes (sorted by number of significant bits)
128: 81386202757205669562183851789305348631
128: 180241813863264101444573802809858694397
128: 245274683055224433281596312431122059021
128: 187522309397665259809392608791686659539
256: 83252422946206411852330647237287722547866360773229941071371588246436\
513990159
256: 79132571131322331023736933767063051273085304521895229780914612117520\
058517909
256: 72081815425552909748220041100909735706208853818662000557743644603407\
965465527
256: 87504602391905701494845474079163412737334477797316409702279059573654\
274811271
512: 12233064210800062190450937494718705259777386009095453001870729392786\
63450255179083524798507997690270500580265258111668148238355016411719\
9168737693316468563
512: 12003639081420725322369909586347545220275253633035565716386136197501\
88208318984400479275215620499883521216480724155582768193682335576385\
2069481074929084063
1024: 16467877625718912296741904171202513097057724053648819680815842057593\
20371835940722471475475803725455063836431454757000451907612224427007\
63984592414360595161051906727075047683803534852982766542661204179549\
77327573530800542562611753617736693359790119074768292178493884576587\
0230450429880021317876149636714743053
1024: 16602953991090311275234291158294516471009930684624948451178742895360\
86073703307475884280944414508444679430090561246728195735962931545473\
40743240318558456247740186704660778277799687988031119436541068736925\
20563780233711166724859277827382391527748470939542560819625727876091\
5372193745283891895989104479029844957

View File

@@ -1,241 +0,0 @@
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the MPI Arbitrary Precision Integer Arithmetic
library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
Portions created by the Initial Developer are Copyright (C) 1998, 2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
Additional MPI utilities
------------------------
The files 'mpprime.h' and 'mpprime.c' define some useful extensions to
the MPI library for dealing with prime numbers (in particular, testing
for divisbility, and the Rabin-Miller probabilistic primality test).
The files 'mplogic.h' and 'mplogic.c' define extensions to the MPI
library for doing bitwise logical operations and shifting.
This document assumes you have read the help file for the MPI library
and understand its conventions.
Divisibility (mpprime.h)
------------
To test a number for divisibility by another number:
mpp_divis(a, b) - test if b|a
mpp_divis_d(a, d) - test if d|a
Each of these functions returns MP_YES if its initial argument is
divisible by its second, or MP_NO if it is not. Other errors may be
returned as appropriate (such as MP_RANGE if you try to test for
divisibility by zero).
Randomness (mpprime.h)
----------
To generate random data:
mpp_random(a) - fill a with random data
mpp_random_size(a, p) - fill a with p digits of random data
The mpp_random_size() function increases the precision of a to at
least p, then fills all those digits randomly. The mp_random()
function fills a to its current precision (as determined by the number
of significant digits, USED(a))
Note that these functions simply use the C library's rand() function
to fill a with random digits up to its precision. This should be
adequate for primality testing, but should not be used for
cryptographic applications where truly random values are required for
security.
You should call srand() in your driver program in order to seed the
random generator; this function doesn't call it.
Primality Testing (mpprime.h)
-----------------
mpp_divis_vector(a, v, s, w) - is a divisible by any of the s values
in v, and if so, w = which.
mpp_divis_primes(a, np) - is a divisible by any of the first np primes?
mpp_fermat(a, w) - is a pseudoprime with respect to witness w?
mpp_pprime(a, nt) - run nt iterations of Rabin-Miller on a.
The mpp_divis_vector() function tests a for divisibility by each
member of an array of digits. The array is v, the size of that array
is s. Returns MP_YES if a is divisible, and stores the index of the
offending digit in w. Returns MP_NO if a is not divisible by any of
the digits in the array.
A small table of primes is compiled into the library (typically the
first 128 primes, although you can change this by editing the file
'primes.c' before you build). The global variable prime_tab_size
contains the number of primes in the table, and the values themselves
are in the array prime_tab[], which is an array of mp_digit.
The mpp_divis_primes() function is basically just a wrapper around
mpp_divis_vector() that uses prime_tab[] as the test vector. The np
parameter is a pointer to an mp_digit -- on input, it should specify
the number of primes to be tested against. If a is divisible by any
of the primes, MP_YES is returned and np is given the prime value that
divided a (you can use this if you're factoring, for example).
Otherwise, MP_NO is returned and np is untouched.
The function mpp_fermat() performs Fermat's test, using w as a
witness. This test basically relies on the fact that if a is prime,
and w is relatively prime to a, then:
w^a = w (mod a)
That is,
w^(a - 1) = 1 (mod a)
The function returns MP_YES if the test passes, MP_NO if it fails. If
w is relatively prime to a, and the test fails, a is definitely
composite. If w is relatively prime to a and the test passes, then a
is either prime, or w is a false witness (the probability of this
happening depends on the choice of w and of a ... consult a number
theory textbook for more information about this).
Note: If (w, a) != 1, the output of this test is meaningless.
----
The function mpp_pprime() performs the Rabin-Miller probabilistic
primality test for nt rounds. If all the tests pass, MP_YES is
returned, and a is probably prime. The probability that an answer of
MP_YES is incorrect is no greater than 1 in 4^nt, and in fact is
usually much less than that (this is a pessimistic estimate). If any
test fails, MP_NO is returned, and a is definitely composite.
Bruce Schneier recommends at least 5 iterations of this test for most
cryptographic applications; Knuth suggests that 25 are reasonable.
Run it as many times as you feel are necessary.
See the programs 'makeprime.c' and 'isprime.c' for reasonable examples
of how to use these functions for primality testing.
Bitwise Logic (mplogic.c)
-------------
The four commonest logical operations are implemented as:
mpl_not(a, b) - Compute bitwise (one's) complement, b = ~a
mpl_and(a, b, c) - Compute bitwise AND, c = a & b
mpl_or(a, b, c) - Compute bitwise OR, c = a | b
mpl_xor(a, b, c) - Compute bitwise XOR, c = a ^ b
Left and right shifts are available as well. These take a number to
shift, a destination, and a shift amount. The shift amount must be a
digit value between 0 and DIGIT_BIT inclusive; if it is not, MP_RANGE
will be returned and the shift will not happen.
mpl_rsh(a, b, d) - Compute logical right shift, b = a >> d
mpl_lsh(a, b, d) - Compute logical left shift, b = a << d
Since these are logical shifts, they fill with zeroes (the library
uses a signed magnitude representation, so there are no sign bits to
extend anyway).
Command-line Utilities
----------------------
A handful of interesting command-line utilities are provided. These
are:
lap.c - Find the order of a mod m. Usage is 'lap <a> <m>'.
This uses a dumb algorithm, so don't use it for
a really big modulus.
invmod.c - Find the inverse of a mod m, if it exists. Usage
is 'invmod <a> <m>'
sieve.c - A simple bitmap-based implementation of the Sieve
of Eratosthenes. Used to generate the table of
primes in primes.c. Usage is 'sieve <nbits>'
prng.c - Uses the routines in bbs_rand.{h,c} to generate
one or more 32-bit pseudo-random integers. This
is mainly an example, not intended for use in a
cryptographic application (the system time is
the only source of entropy used)
dec2hex.c - Convert decimal to hexadecimal
hex2dec.c - Convert hexadecimal to decimal
basecvt.c - General radix conversion tool (supports 2-64)
isprime.c - Probabilistically test an integer for primality
using the Rabin-Miller pseudoprime test combined
with division by small primes.
primegen.c - Generate primes at random.
exptmod.c - Perform modular exponentiation
ptab.pl - A Perl script to munge the output of the sieve
program into a compilable C structure.
Other Files
-----------
PRIMES - Some randomly generated numbers which are prime with
extremely high probability.
README - You're reading me already.
About the Author
----------------
This software was written by Michael J. Fromberger. You can contact
the author as follows:
E-mail: <sting@linguist.dartmouth.edu>
Postal: 8000 Cummings Hall, Thayer School of Engineering
Dartmouth College, Hanover, New Hampshire, USA
PGP key: http://linguist.dartmouth.edu/~sting/keys/mjf.html
9736 188B 5AFA 23D6 D6AA BE0D 5856 4525 289D 9907
Last updated: $Id: README,v 1.3 2005-02-02 22:28:23 gerv%gerv.net Exp $

Some files were not shown because too many files have changed in this diff Show More