ENH: Initial import from sourceforge.

These source tree was directly imported from
http://sourceforge.net/projects/fis-gtm/files/GT.M-x86-Linux-src/V5.4-002B/

by extracting the file:
gtm_V54002B_linux_i686_src.tar.gz
This commit is contained in:
Luis Ibanez 2012-02-05 11:35:58 -05:00
commit 9299623e19
2972 changed files with 391886 additions and 0 deletions

661
COPYING Executable file
View File

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

106
README Executable file
View File

@ -0,0 +1,106 @@
The make file enclosed (sr_unix/comlist.mk) will build GT.M from source.
The prerequisites are GNU make, GT.M binary installation (which you can
download from http://sourceforge.net/projects/fis-gtm/), Linux x86, tcsh,
Unicode and GPG include files. Unicode include files are automatically
installed if ICU is installed. GPG include files require installing the
GNUPG and related library development packages. GNU make 3.81,
Ubuntu 10.04 LTS and RHEL 5.0 were used to do the test builds for this
distribution. The default ICU and GPG packages were taken from the OS
vendors' repositories.
To build a production version GT.M for linux do the following steps:
1. Fulfill the pre-requisites.
Download and install GT.M binary distribution from SourceForge if you
do not have GT.M installed already. The build procedure needs an
existing GT.M mumps installed on the machine.
You can download GT.M from http://sourceforge.net/projects/fis-gtm/
Unpack the tar file and run the configure script as root. Note: the tar
file unpacks everything into your current working directory, not a new
subdirectory. The Linux Standard Base (LSB) install path for GT.M
V54002 is /opt/lsb-gtm/V5.4-002_i686 or /opt/lsb-gtm/V5.4-002_x8664.
$ tar xfz gtm_V54002_linux_i686_src.tar.gz
$ sudo sh ./configure
2. Unpack the GT.M sources
Change directory in the directory that you will place the GT.M source,
here after referred to as <gtm-directory>.
$ mkdir <gtm-directory>
$ cd <gtm-directory>
$ tar xfz gtm_V54002_linux_i686_src.tar.gz
You should find this README, COPYING file and sr_* source directroies.
3. Define environment variables needed to build GT.M
You will need to use tcsh to build GT.M. GT.M uses several csh script
files the define environment variables used in the build process. You
will need to define several variables prior to intiating your GT.M build.
- Define 'gtm_curpro' and 'gtm_exe' so that you can compile M programs.
This is the directory in which you installed the GT.M binaries from
SourceForge.
$ setenv gtm_curpro <path to installed GT.M>
$ setenv gtm_exe $gtm_curpro
$ setenv HOSTOS `uname -s`
- Define 'gtm_tools' and 'gtm_inc'
$ setenv gtm_tools $PWD/sr_linux
$ setenv gtm_inc $PWD/sr_linux
- [OPTIONAL] Ubuntu users must define 'distro'
$ setenv distro ubuntu
- [OPTIONAL] By default the build procedure will build 64 bit version of
GT.M on a x86_64 bit machine.
If you intend to build 32 bit version of GT.M on a x86_64 bit machine you
have to explicitly set the environment variable 'OBJECT_MODE' to '32'
$ setenv OBJECT_MODE 32
- Specify which ICU version is installed.
ICU version needs to be of the form #.# If the result of running
"icu-config --version" has the form #.#.#, just use the first two
parts. For example, if "icu-config --version" returns 3.8.1, use
3.8 in the "setenv" step.
$ icu-config --version
$ setenv gtm_icu_version <result of previous step>
- Define 'gtm_version_change' and execute gtm_env.csh
$ setenv gtm_version_change 1
$ source sr_unix/gtm_env.csh
4. Building GT.M -
By default, the gmake will build a production version GT.M. The build type
of GT.M can be controlled by a parameter "buildtypes" - dbg (debug),
bta (beta), and pro (production). Passing a subset of dbg, bta, or pro in
"buildtypes" from the environment or the command line will build that subset.
For example:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=dbg gtm_ver=$PWD
will build just a debuggable GT.M release.
You can clean your builds by appending 'clean' to the make line.
For example:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=dbg gtm_ver=$PWD clean
5. Packaging GT.M -
Once the required builds have been done the object distribution can be
tar'ed by doing:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux gtm_ver=$PWD package
Again, buildtypes can be used to package just a subset. For example:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=pro gtm_ver=$PWD package
Appendix: Known warnings and errors
- "cc1: note: obsolete option -I- used, please use -iquote instead"
You can safely ignore this warning
- "chk2lev.mdep:2: *** missing separator. Stop."
tcsh is using the builtin echo, you need to set the environment variable
'distro' to 'ubuntu' and clean your build.
$ setenv distro ubuntu

27
sr_i386/aswp.s Normal file
View File

@ -0,0 +1,27 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title aswp.s
.sbttl aswp
.include "linkage.si"
# .386
# .MODEL FLAT, C
.text
ENTRY aswp
movl 4(%esp),%edx # A(latch longword)
movl 8(%esp),%eax # replacement value
# LOCK xchg (%edx),%eax # return original value
lock
xchgl (%edx),%eax # return original value
ret

97
sr_i386/auto_zlink.c Normal file
View File

@ -0,0 +1,97 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gtm_string.h"
#include "i386.h"
#include "urx.h"
#include "rtnhdr.h"
#include "op.h"
#include "auto_zlink.h"
#define PEA_SZ 5
#define XFER_BYTE_SZ 3
#define XFER_LONG_SZ 6
#define INST_SZ 1
rhdtyp *auto_zlink (unsigned char *pc, int4 **line)
{
char *adj_pc; /* address of PEA rtnref offset */
mstr rname;
mident_fixed rname_local;
urx_rtnref *rtnurx;
mval rtn;
rhdtyp *rhead;
error_def (ERR_ROUTINEUNKNOWN);
error_def (ERR_LABELUNKNOWN);
union
{
ModR_M modrm;
unsigned char byte;
} modrm_byte_byte, modrm_byte_long;
/* ASSUMPTION -- The instruction previous to the current mpc is a transfer table jump.
* This is either a byte or a int4 displacement off of ebx, instruction
* size either 3 or 6 (prefix byte, ModR/M byte, 8- or 32-bit offset).
*/
modrm_byte_byte.modrm.reg_opcode = I386_INS_CALL_Ev;
modrm_byte_byte.modrm.mod = I386_MOD32_BASE_DISP_8;
modrm_byte_byte.modrm.r_m = I386_REG_EBX;
modrm_byte_long.modrm.reg_opcode = I386_INS_CALL_Ev;
modrm_byte_long.modrm.mod = I386_MOD32_BASE_DISP_32;
modrm_byte_long.modrm.r_m = I386_REG_EBX;
if (*(pc - XFER_BYTE_SZ) == I386_INS_Grp5_Prefix && *(pc - XFER_BYTE_SZ + 1) == modrm_byte_byte.byte)
{
assert (*(pc - XFER_BYTE_SZ - PEA_SZ) == I386_INS_PUSH_Iv);
adj_pc = (char *)pc - XFER_BYTE_SZ - PEA_SZ;
}
else if (*(pc - XFER_LONG_SZ) == I386_INS_Grp5_Prefix && *(pc - XFER_LONG_SZ + 1) == modrm_byte_long.byte)
{
assert (*(pc - XFER_LONG_SZ - PEA_SZ) == I386_INS_PUSH_Iv);
adj_pc = (char *)pc - XFER_LONG_SZ - PEA_SZ;
}
else
GTMASSERT;
if (azl_geturxrtn (adj_pc + INST_SZ, &rname, &rtnurx))
{
assert (0 <= rname.len && rname.len <= MAX_MIDENT_LEN);
assert (rname.addr);
/* Copy rname into local storage because azl_geturxrtn sets
rname.addr to an address that is freed during op_zlink
and before the call to find_rtn_hdr.
*/
memcpy(rname_local.c, rname.addr, rname.len);
rname.addr = rname_local.c;
assert (rtnurx);
assert (*(adj_pc - PEA_SZ) == I386_INS_PUSH_Iv);
assert (azl_geturxlab (adj_pc - PEA_SZ + INST_SZ, rtnurx));
assert (!find_rtn_hdr (&rname));
rtn.mvtype = MV_STR;
rtn.str.len = rname.len;
rtn.str.addr = rname.addr;
op_zlink (&rtn, 0);
if (0 != (rhead = find_rtn_hdr (&rname)))
{
*line = *(int4 **) (adj_pc - PEA_SZ + INST_SZ);
if (!(*line))
rts_error(VARLSTCNT(1) ERR_LABELUNKNOWN);
return rhead;
}
}
rts_error(VARLSTCNT(1) ERR_ROUTINEUNKNOWN);
return NULL;
}

17
sr_i386/auto_zlink.h Normal file
View File

@ -0,0 +1,17 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef __AUTO_ZLINK_H__
#define __AUTO_ZLINK_H__
rhdtyp *auto_zlink (unsigned char *pc, int4 **line);
#endif

35
sr_i386/call_dm.s Normal file
View File

@ -0,0 +1,35 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title call_dm.s
.sbttl call_dm
.include "linkage.si"
# .386
# .MODEL FLAT, C
.DATA
.text
.extern op_oldvar
.extern opp_dmode
# PUBLIC call_dm
# call_dm PROC
ENTRY call_dm
l1: call opp_dmode
call op_oldvar
jmp l1
ret
# call_dm ENDP
# END

29
sr_i386/caller_id.s Normal file
View File

@ -0,0 +1,29 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title caller_id.s
.sbttl caller_id
# .386
# .MODEL FLAT, C
.include "linkage.si"
.text
# PUBLIC caller_id
ENTRY caller_id
movl 4(%ebp),%eax # address of caller's return address
ret
# caller_id ENDP
# END

58
sr_i386/callg.s Normal file
View File

@ -0,0 +1,58 @@
#################################################################
# #
# Copyright 2001, 2006 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title callg.s
.sbttl callg
.include "linkage.si"
# .386
# .MODEL FLAT, C
# Assembler routine to immitate the VAX CALLG instruction, which can redirect
# a routine calls argument list to a prepared list in memory.
# This implementation has the caveat that the argument list must be integers,
# and that it follows our version of the VMS calling conventions - i.e. that
# a count of the arguments following is actually the first thing on the stack.
routarg = 8
argsarg = 12
cntsav = -4
.text
ENTRY callg
enter $4,$0
pushl %edi
pushl %esi
pushl %ebx
movl routarg(%ebp),%edx # routine to call
movl argsarg(%ebp),%esi # argument list
movl (%esi),%ecx
movl %ecx,cntsav(%ebp) # save following argument count
addl $4,%esi # skip argument count
movl %ecx, %eax
negl %eax
leal (%esp,%eax,4),%esp
movl %esp,%edi
pushl %ecx
rep
movsl
call *%edx
popl %edx # discard possibly modified count
movl cntsav(%ebp),%edx # edx to preserve return value in eax
leal (%esp,%edx,4),%esp
popl %ebx
popl %esi
popl %edi
leave
ret

55
sr_i386/ci_restart.s Normal file
View File

@ -0,0 +1,55 @@
#################################################################
# #
# Copyright 2001, 2003 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title ci_restart.s
.sbttl ci_restart
# .386
# .MODEL FLAT, C
.include "linkage.si"
.DATA
.extern param_list
.text
ENTRY ci_restart
pushl %ebp # save C frame pointer
movl %esp,%ebp # set frame marker for this procedure
movl param_list,%eax
movl 4(%eax),%eax # argcnt
cmpl $0,%eax # if (argcnt > 0) {
jle L0
imull $4,%eax,%edx # param_list->args[argcnt]
leal 20(%edx),%edx
pushl %eax
movl param_list,%eax
addl %eax,%edx
popl %eax
L1: pushl 0(%edx) # pushing arguments backwards
subl $4,%edx
subl $1,%eax
cmpl $0,%eax
jg L1 # }
L0: movl param_list,%eax
pushl 4(%eax) #argcnt
pushl 20(%eax) #mask
pushl 16(%eax) #retaddr
pushl 12(%eax) #labaddr
pushl 8(%eax) #rtnaddr
pushl 4(%ebp) # push the return address to the caller of ci_restart
movl 0(%ebp),%ebp # restore previous C frame pointer
jmp *(%eax)
ret
# ci_restart ENDP
# END

34
sr_i386/compswap.s Normal file
View File

@ -0,0 +1,34 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title compswap.s
.sbttl compswap
.include "linkage.si"
# .386
# .MODEL FLAT, C
.text
ENTRY compswap
movl 4(%esp),%edx # A(latch longword)
movl 8(%esp),%eax # comparison value
movl 12(%esp),%ecx # replacement value
# LOCK cmpxchgl %ecx,(%edx)
lock
cmpxchgl %ecx,(%edx) # compare-n-swap
jnz fail
movl $1,%eax # return TRUE
ret
fail:
xor %eax,%eax # return FALSE
ret

73
sr_i386/dm_start.s Normal file
View File

@ -0,0 +1,73 @@
#################################################################
# #
# Copyright 2001, 2010 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title dm_start.s
.sbttl dm_start
# .386
# .MODEL FLAT, C
.include "linkage.si"
.include "error.si"
.DATA
.extern dollar_truth
.extern xfer_table
.extern frame_pointer
.extern msp
.extern mumps_status
.extern restart
.text
.extern mdb_condition_handler
.extern op_unwind
.ifndef cygwin
.type dm_start,@function
.endif
ENTRY dm_start
enter $0,$0
pushl %edi
pushl %esi
pushl %ebx
movl $1,mumps_status
leal xfer_table,%ebx
movl $1,dollar_truth
ESTABLISH mdb_condition_handler, l30
call *restart
return: movl mumps_status,%eax
popl %ebx
popl %esi
popl %edi
leave
ret
ENTRY gtm_ret_code
REVERT
call op_unwind
movl msp,%eax
movl (%eax),%eax
movl %eax,frame_pointer
addl $4,msp
jmp return
# Used by triggers (and eventually call-ins) to return from a nested generated code call
# (a call not at the base C stack level).
ENTRY gtm_levl_ret_code
REVERT
jmp return
# dm_start ENDP
# END

1315
sr_i386/emit_code.c Normal file

File diff suppressed because it is too large Load Diff

20
sr_i386/emit_code.h Normal file
View File

@ -0,0 +1,20 @@
/****************************************************************
* *
* Copyright 2001 Sanchez Computer Associates, Inc. *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef EMIT_CODE_INCLUDED
#define EMIT_CODE_INCLUDED
void trip_gen(triple *ct);
short *emit_vax_inst(short *inst, oprtype **fst_opr, oprtype **lst_opr);
void emit_xfer(short xfer);
void emit_base_offset (short reg_opcode, short base_reg, int4 offset);
#endif

75
sr_i386/error.si Normal file
View File

@ -0,0 +1,75 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
.sbttl error.si
# PAGE +
#-----------------------------------------------
# Mumps error condition handler macros
#-----------------------------------------------
.ifdef cygwin
# will need another 8 to save sigmasks
chnd_size = 220
.else
chnd_size = 168
.endif
chnd_save_active = 0
chnd_ch_active = 4
chnd_ch = 8
chnd_jmp = 12
.data
.extern ctxt
.extern active_ch
.text
.ifdef cygwin
# on cygwin, sigsetjmp is a macro which calls sigprocmask then setjmp
.extern _setjmp
.else
# setjmp is really __sigsetjmp(env,0)
.extern __sigsetjmp
.endif
.sbttl error.si ESTABLISH
.macro ESTABLISH x, label
addl $chnd_size,ctxt # ctxt++
movl ctxt,%eax
movl active_ch,%edx # ctxt->save_active_ch = active_ch
movl %edx,chnd_save_active(%eax)
movl $0,chnd_ch_active(%eax) # ctxt->ch_active = FALSE
movl %eax,active_ch # active_ch = ctxt
movl $\x,chnd_ch(%eax) # ctxt->ch = x
addl $chnd_jmp,%eax # setjmp(ctxt->jmp)
.ifndef cygwin
pushl $0
.endif
pushl %eax
.ifdef cygwin
call _setjmp
addl $4,%esp
.else
call __sigsetjmp
addl $8,%esp
.endif
incl %eax
jne \label
REVERT
jmp return
\label:
.endm
.sbttl error.si REVERT
.macro REVERT
movl ctxt,%eax # active_ch = ctxt->save_active_c
movl chnd_save_active(%eax),%eax
movl %eax,active_ch
subl $chnd_size,ctxt # ctxt--
.endm

93
sr_i386/find_line_call.c Normal file
View File

@ -0,0 +1,93 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "xfer_enum.h"
#include "i386.h"
#include "rtnhdr.h" /* Needed by zbreak.h */
#include "zbreak.h"
zb_code *find_line_call(void *addr)
{
unsigned char *call_addr;
union
{
ModR_M modrm;
unsigned char byte;
} modrm_byte;
call_addr = (unsigned char *)addr;
modrm_byte.byte = *(call_addr + 1);
if (*call_addr == I386_INS_Grp5_Prefix && modrm_byte.modrm.reg_opcode == I386_INS_CALL_Ev)
{
call_addr++;
assert (modrm_byte.modrm.r_m == I386_REG_EBX);
call_addr++;
if (modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_8)
{
if (*call_addr == xf_linestart * SIZEOF(int4) ||
*call_addr == xf_zbstart * SIZEOF(int4))
return (zb_code *)call_addr;
call_addr++;
}
else
{
assert (modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_32);
if (*((int4 *)call_addr) != xf_isformal * SIZEOF(int4))
return (zb_code *)addr;
call_addr += SIZEOF(int4);
}
}
modrm_byte.byte = *(call_addr + 1);
if (*call_addr == I386_INS_PUSH_Ib || *call_addr == I386_INS_PUSH_Iv)
{
while (*call_addr == I386_INS_PUSH_Ib || *call_addr == I386_INS_PUSH_Iv)
{
if (*call_addr == I386_INS_PUSH_Ib)
call_addr += 1 + SIZEOF(unsigned char);
else
{
assert (*call_addr == I386_INS_PUSH_Iv);
call_addr += 1 + SIZEOF(int4);
}
}
modrm_byte.byte = *(call_addr + 1);
if (*call_addr++ != I386_INS_Grp5_Prefix || modrm_byte.modrm.reg_opcode != I386_INS_CALL_Ev)
return (zb_code *)addr;
assert (modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_8 || modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_32);
assert (modrm_byte.modrm.r_m == I386_REG_EBX);
call_addr++;
if (modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_8)
{
if (*call_addr != xf_linefetch * SIZEOF(int4) &&
*call_addr != xf_zbfetch * SIZEOF(int4))
return (zb_code *)addr;
}
}
else if (*call_addr == I386_INS_Grp5_Prefix && modrm_byte.modrm.reg_opcode == I386_INS_CALL_Ev)
{
call_addr++;
assert (modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_8 || modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_32);
assert (modrm_byte.modrm.r_m == I386_REG_EBX);
call_addr++;
if (modrm_byte.modrm.mod == I386_MOD32_BASE_DISP_8)
{
if (*call_addr != xf_linestart * SIZEOF(int4) &&
*call_addr != xf_zbstart * SIZEOF(int4))
return (zb_code *)addr;
}
}
return (zb_code *)call_addr;
}

36
sr_i386/follow.s Normal file
View File

@ -0,0 +1,36 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title follow.s
.sbttl follow
.include "linkage.si"
# .386
# .MODEL FLAT, C
.text
.extern op_follow
# PUBLIC follow
ENTRY follow
movl 4(%esp),%eax
movl 8(%esp),%edx
call op_follow
jle l1
movl $1,%eax
ret
l1: movl $0,%eax
ret
# follow ENDP
# END

91
sr_i386/g_msf.si Normal file
View File

@ -0,0 +1,91 @@
#################################################################
# #
# Copyright 2001, 2011 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
.sbttl g_msf.si
# PAGE +
#-----------------------------------------------
# Mumps stack frame manipulation macros
# for the GNU gas i386 assembler version
#-----------------------------------------------
msf_rvector_off = 0
msf_l_symtab_off = 4
msf_mpc_off = 8
msf_ctxt_off = 12
msf_temps_ptr_off = 16
msf_vartab_ptr_off = 20
msf_vartab_len_off = 24
msf_temp_mvals_off = 26
msf_old_frame_off = 28
msf_typ_off = 32
msf_flags_off = 34
msf_for_ctrl_stack = 36
msf_frame_size = 40
SFT_COUNT = 0x01
SFT_DM = 0x02
SFT_REP_OP = 0x04
SFT_ZBRK_ACT = 0x08
SFT_DEV_ACT = 0x10
SFT_ZTRAP = 0x20
SFT_EXTFUN = 0x40
SFT_ZSTEP_ACT = 0x80
SFT_ZINTR = 0x100
SFF_INDCE = 0x01
SFF_ZTRAP_ERR = 0x02
SFF_DEV_ACT_ERR = 0x04
SFF_CI = 0x08
SFF_ETRAP_ERR = 0x10
.sbttl g_msf.si putframe
.macro putframe
movl frame_pointer,%edx
movl %edi,msf_temps_ptr_off(%edx)
movl %esi,msf_l_symtab_off(%edx)
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
.endm
.extern error_return
.sbttl g_msf.si getframe
.macro getframe
movl frame_pointer,%edi
movb msf_flags_off(%edi),%dl
andb $SFF_ETRAP_ERR,%dl
jz lab1\@
call error_return
lab1\@:
movl frame_pointer, %edx
movl msf_temps_ptr_off(%edx),%edi
movl msf_l_symtab_off(%edx),%esi
pushl msf_mpc_off(%edx)
.endm
.sbttl g_msf.si
mrt_jsb = 0
mrt_src_len = 12
mrt_src_addr = 16
mrt_rtn_len = 24
mrt_rtn_addr = 28
mrt_var_ptr = 32
mrt_var_len = 36
mrt_lab_ptr = 40
mrt_lab_len = 44
mrt_lnr_ptr = 48
mrt_lnr_len = 52
mrt_ptxt_ptr = 56
mrt_checksum = 60
mrt_compiler_qlf = 64
mrt_oldr_ptr = 68
mrt_curr_ptr = 72
mrt_tmp_mv = 76
mrt_tmp_sz = 78

441
sr_i386/incr_link.c Normal file
View File

@ -0,0 +1,441 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gtm_unistd.h"
#include "gtm_stdio.h"
#include "gtm_string.h"
#include <errno.h>
#include "rtnhdr.h"
#include "compiler.h"
#include "urx.h"
#include "objlabel.h" /* needed for masscomp.h */
#include "masscomp.h"
#include "gtmio.h"
#include "incr_link.h"
#include "min_max.h" /* MIDENT_CMP needs MIN */
#include "cmd_qlf.h" /* needed for CQ_UTF8 */
#include "gtm_text_alloc.h"
/* INCR_LINK - read and process a mumps object module. Link said module to
currently executing image */
LITREF char gtm_release_name[];
LITREF int4 gtm_release_name_len;
static char *code;
GBLREF mident_fixed zlink_mname;
GBLREF unsigned char *zl_lab_err;
GBLREF boolean_t gtm_utf8_mode;
#define RELREAD 50 /* number of relocation entries to buffer */
typedef struct res_list_struct
{
struct res_list_struct *next, *list;
unsigned int addr, symnum;
} res_list;
void res_free(res_list *root);
bool addr_fix(int file, struct exec *fhead, urx_rtnref *urx_lcl, rhdtyp *code);
void zl_error(int4 file, int4 err, int4 err2, int4 len, char *addr);
bool incr_link(int file_desc)
{
rhdtyp *hdr, *old_rhead;
int code_size, save_errno, cnt;
int4 rhd_diff,lab_miss_off,*olnt_ent,*olnt_top, read_size;
char *literal_ptr;
var_tabent *curvar;
char module_name[SIZEOF(mident_fixed)];
lab_tabent *lbt_ent, *lbt_bot, *lbt_top, *olbt_ent, *olbt_bot, *olbt_top, *curlab;
urx_rtnref urx_lcl_anchor;
int order;
struct exec file_hdr;
error_def(ERR_INVOBJ);
error_def(ERR_LOADRUNNING);
error_def(ERR_TEXT);
urx_lcl_anchor.len = 0;
urx_lcl_anchor.addr = 0;
urx_lcl_anchor.lab = 0;
urx_lcl_anchor.next = 0;
code = NULL;
DOREADRL(file_desc, &file_hdr, SIZEOF(file_hdr), read_size);
if (read_size != SIZEOF(file_hdr))
{
if (-1 == read_size)
{
save_errno = errno;
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, strlen(STRERROR(save_errno)),
STRERROR(save_errno));
}
else
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, RTS_ERROR_TEXT("reading file header"));
}
else if (OMAGIC != file_hdr.a_magic)
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, RTS_ERROR_TEXT("bad magic"));
else if (OBJ_LABEL != file_hdr.a_stamp)
return FALSE; /* wrong version */
assert (file_hdr.a_bss == 0);
code_size = file_hdr.a_text + file_hdr.a_data;
code = GTM_TEXT_ALLOC(code_size);
DOREADRL(file_desc, code, code_size, read_size);
if (read_size != code_size)
{
if (-1 == read_size)
{
save_errno = errno;
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, strlen(STRERROR(save_errno)),
STRERROR(save_errno));
}
else
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, RTS_ERROR_TEXT("reading code"));
}
hdr = (rhdtyp *)code;
if (memcmp(&hdr->jsb[0], "GTM_CODE", SIZEOF(hdr->jsb)))
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, RTS_ERROR_TEXT("missing GTM_CODE"));
if ((hdr->compiler_qlf & CQ_UTF8) && !gtm_utf8_mode)
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT,
RTS_ERROR_TEXT("Object compiled with CHSET=UTF-8 which is different from $ZCHSET"));
if (!(hdr->compiler_qlf & CQ_UTF8) && gtm_utf8_mode)
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT,
RTS_ERROR_TEXT("Object compiled with CHSET=M which is different from $ZCHSET"));
literal_ptr = code + file_hdr.a_text;
for (cnt = hdr->vartab_len, curvar = VARTAB_ADR(hdr); cnt; --cnt, ++curvar)
{ /* relocate the variable table */
assert(0 < curvar->var_name.len);
curvar->var_name.addr += (uint4)literal_ptr;
}
for (cnt = hdr->labtab_len, curlab = LABTAB_ADR(hdr); cnt; --cnt, ++curlab)
{ /* relocate the label table */
curlab->lab_name.addr += (uint4)literal_ptr;
}
if (!addr_fix(file_desc, &file_hdr, &urx_lcl_anchor, hdr))
{
urx_free(&urx_lcl_anchor);
zl_error(file_desc, ERR_INVOBJ, ERR_TEXT, RTS_ERROR_TEXT("address fixup failure"));
}
if (!zlput_rname (hdr))
{
urx_free(&urx_lcl_anchor);
/* Copy routine name to local variable because zl_error free's it. */
memcpy(&module_name[0], hdr->routine_name.addr, hdr->routine_name.len);
zl_error(file_desc, 0, ERR_LOADRUNNING, hdr->routine_name.len, &module_name[0]);
}
urx_add (&urx_lcl_anchor);
old_rhead = (rhdtyp *) hdr->old_rhead_ptr;
lbt_bot = (lab_tabent *) ((char *)hdr + hdr->labtab_ptr);
lbt_top = lbt_bot + hdr->labtab_len;
while (old_rhead)
{
rhd_diff = (char *) hdr - (char *) old_rhead;
lab_miss_off = (char *)(&zl_lab_err) - rhd_diff - (char *) old_rhead;
lbt_ent = lbt_bot;
olnt_ent = (int4 *)((char *) old_rhead + old_rhead->lnrtab_ptr);
olnt_top = olnt_ent + old_rhead->lnrtab_len;
for ( ; olnt_ent < olnt_top ;olnt_ent++)
*olnt_ent = lab_miss_off;
olbt_bot = (lab_tabent *) ((char *) old_rhead + old_rhead->labtab_ptr);
olbt_top = olbt_bot + old_rhead->labtab_len;
for (olbt_ent = olbt_bot; olbt_ent < olbt_top ;olbt_ent++)
{
for (; lbt_ent < lbt_top; lbt_ent++)
{
MIDENT_CMP(&olbt_ent->lab_name, &lbt_ent->lab_name, order);
if (order <= 0)
break;
}
if ((lbt_ent < lbt_top) && !order)
{
olnt_ent = (int4 *)((char *) old_rhead + olbt_ent->lab_ln_ptr);
assert(*olnt_ent == lab_miss_off);
*olnt_ent = *((int4 *) (code + lbt_ent->lab_ln_ptr));
}
}
old_rhead->src_full_name = hdr->src_full_name;
old_rhead->routine_name = hdr->routine_name;
old_rhead->vartab_len = hdr->vartab_len;
old_rhead->vartab_ptr = hdr->vartab_ptr + rhd_diff;
old_rhead->ptext_ptr = hdr->ptext_ptr + rhd_diff;
old_rhead->current_rhead_ptr = rhd_diff;
old_rhead->temp_mvals = hdr->temp_mvals;
old_rhead->temp_size = hdr->temp_size;
old_rhead = (rhdtyp *) old_rhead->old_rhead_ptr;
}
urx_resolve (hdr, lbt_bot, lbt_top);
return TRUE;
}
bool addr_fix(int file, struct exec *fhead, urx_rtnref *urx_lcl, rhdtyp *code)
{
res_list *res_root, *new_res, *res_temp, *res_temp1;
char *symbols, *sym_temp, *sym_temp1, *symtop, *res_addr;
struct relocation_info rel[RELREAD];
int numrel, rel_read, i, string_size, sym_size;
size_t status;
mident_fixed rtnid, labid;
mstr rtn_str;
rhdtyp *rtn;
lab_tabent *label, *labtop;
bool labsym;
urx_rtnref *urx_rp;
urx_addr *urx_tmpaddr;
res_root = 0;
numrel = (fhead->a_trsize + fhead->a_drsize) / SIZEOF(struct relocation_info);
if (numrel * SIZEOF(struct relocation_info) != fhead->a_trsize + fhead->a_drsize)
return FALSE;
for ( ; numrel;)
{
rel_read = numrel < RELREAD ? numrel : RELREAD;
DOREADRC(file, rel, rel_read * SIZEOF(struct relocation_info), status);
if (0 != status)
{
res_free(res_root);
return FALSE;
}
numrel -= rel_read;
for (i = 0; i < rel_read; i++)
{ if (rel[i].r_extern)
{ new_res = (res_list *) malloc(SIZEOF(*new_res));
new_res->symnum = rel[i].r_symbolnum;
new_res->addr = rel[i].r_address;
new_res->next = new_res->list = 0;
/* Insert the relocation entry in symbol number order on the unresolved chain */
if (!res_root)
res_root = new_res;
else
{ res_temp = res_root;
res_temp1 = 0;
while (res_temp)
{ if (res_temp->symnum >= new_res->symnum)
break;
res_temp1 = res_temp;
res_temp = res_temp->next;
}
if (res_temp)
{ if (res_temp->symnum == new_res->symnum)
{ new_res->list = res_temp->list;
res_temp->list = new_res;
}
else
{ if (res_temp1)
{ new_res->next = res_temp1->next;
res_temp1->next = new_res;
}
else
{ assert(res_temp == res_root);
new_res->next = res_root;
res_root = new_res;
}
}
}
else
res_temp1->next = new_res;
}
}
else
*(unsigned int *)(((char *)code) + rel[i].r_address) += (unsigned int)code;
}
}
/* All relocations within the routine should have been done, so copy the routine_name */
assert(code->routine_name.len < SIZEOF(zlink_mname.c));
memcpy(&zlink_mname.c[0], code->routine_name.addr, code->routine_name.len);
zlink_mname.c[code->routine_name.len] = 0;
if (!res_root)
return TRUE;
if ((off_t)-1 == lseek(file, (off_t)fhead->a_syms, SEEK_CUR))
{ res_free(res_root);
return FALSE;
}
DOREADRC(file, &string_size, SIZEOF(string_size), status);
if (0 != status)
{
res_free(res_root);
return FALSE;
}
string_size -= SIZEOF(string_size);
symbols = malloc(string_size);
DOREADRC(file, symbols, string_size, status);
if (0 != status)
{
free(symbols);
res_free(res_root);
return FALSE;
}
/* Match up unresolved entries with the null terminated symbol name entries from the
* symbol text pool we just read in. */
sym_temp = sym_temp1 = symbols;
symtop = symbols + string_size;
for (i = 0; res_root; i++)
{ while (i < res_root->symnum)
{ /* Forward symbol space until our symnum index (i) matches the symbol we are processing in res_root */
while (*sym_temp)
{
if (sym_temp >= symtop)
{
free(symbols);
res_free(res_root);
return FALSE;
}
sym_temp++;
}
sym_temp++;
sym_temp1 = sym_temp;
i++;
}
assert (i == res_root->symnum);
/* Find end of routine name that we care about */
while (*sym_temp1 != '.' && *sym_temp1)
{ if (sym_temp1 >= symtop)
{
free(symbols);
res_free(res_root);
return FALSE;
}
sym_temp1++;
}
sym_size = sym_temp1 - sym_temp;
assert(sym_size <= MAX_MIDENT_LEN);
memcpy(&rtnid.c[0], sym_temp, sym_size);
rtnid.c[sym_size] = 0;
if (rtnid.c[0] == '_')
rtnid.c[0] = '%';
assert(sym_size != mid_len(&zlink_mname) || 0 != memcmp(&zlink_mname.c[0], &rtnid.c[0], sym_size));
rtn_str.addr = &rtnid.c[0];
rtn_str.len = sym_size;
rtn = find_rtn_hdr(&rtn_str); /* Routine already resolved? */
sym_size = 0;
labsym = FALSE;
if (*sym_temp1 == '.')
{ /* If symbol is for a label, find the end of the label name */
sym_temp1++;
sym_temp = sym_temp1;
while (*sym_temp1)
{ if (sym_temp1 >= symtop)
{
free(symbols);
res_free(res_root);
return FALSE;
}
sym_temp1++;
}
sym_size = sym_temp1 - sym_temp;
assert(sym_size <= MAX_MIDENT_LEN);
memcpy(&labid.c[0], sym_temp, sym_size);
labid.c[sym_size] = 0;
if (labid.c[0] == '_')
labid.c[0] = '%';
labsym = TRUE;
}
sym_temp1++;
sym_temp = sym_temp1;
if (rtn)
{ /* The routine part at least is known */
if (labsym)
{ /* Look our target label up in the routines label table */
label = (lab_tabent *)((char *) rtn + rtn->labtab_ptr);
labtop = label + rtn->labtab_len;
for (; label < labtop && (sym_size != label->lab_name.len ||
memcmp(&labid.c[0], label->lab_name.addr, sym_size)); label++)
;
if (label < labtop)
res_addr = (char *)(label->LABENT_LNR_OFFSET + (char *)rtn);
else
res_addr = 0;
}
else
res_addr = (char *)rtn;
if (res_addr)
{ /* The external symbol definition is available. Resolve all references to it */
res_temp = res_root->next;
while(res_root)
{ *(uint4 *)(((char *)code) + res_root->addr) = (unsigned int) res_addr;
res_temp1 = res_root->list;
free(res_root);
res_root = res_temp1;
}
res_root = res_temp;
continue;
}
}
/* This symbol is unknown. Put on the (local) unresolved extern chain -- either for labels or routines */
urx_rp = urx_putrtn(rtn_str.addr, rtn_str.len, urx_lcl);
res_temp = res_root->next;
while(res_root)
{
if (labsym)
urx_putlab(&labid.c[0], sym_size, urx_rp, ((char *)code) + res_root->addr);
else
{ urx_tmpaddr = (urx_addr *) malloc(SIZEOF(urx_addr));
urx_tmpaddr->next = urx_rp->addr;
urx_tmpaddr->addr = (INTPTR_T *)(((char *)code) + res_root->addr);
urx_rp->addr = urx_tmpaddr;
}
res_temp1 = res_root->list;
free(res_root);
res_root = res_temp1;
}
res_root = res_temp;
}
free(symbols);
return TRUE;
}
void res_free(res_list *root)
{
res_list *temp;
while (root)
{ while (root->list)
{ temp = root->list->list;
free(root->list);
root->list = temp;
}
temp = root->next;
free(root);
root = temp;
}
}
/* ZL_ERROR - perform cleanup and signal errors found in zlinking a mumps object module
* err - an error code that accepts no arguments and
* err2 - an error code that accepts two arguments (!AD) */
void zl_error(int4 file, int4 err, int4 err2, int4 len, char *addr)
{
int rc;
if (code)
{
GTM_TEXT_FREE(code);
code = NULL;
}
CLOSEFILE_RESET(file, rc); /* resets "file" to FD_INVALID */
if (0 != err && 0 != err2)
rts_error(VARLSTCNT(6) err, 0, err2, 2, len, addr);
else if (0 != err)
rts_error(VARLSTCNT(1) err);
else
{
assert(0 != err2);
rts_error(VARLSTCNT(4) err2, 2, len, addr);
}
}

29
sr_i386/linkage.si Normal file
View File

@ -0,0 +1,29 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# #define SYMBOL_NAME_STR(X) #X
# #define SYMBOL_NAME(X) X
# #ifdef __STDC__
# #define SYMBOL_NAME_LABEL(X) X##:
# #else
# #define SYMBOL_NAME_LABEL(X) X/**/:
# #endif
.macro SYMBOL_NAME_LABEL X
\X:
.endm
.macro ENTRY name
# .globl SYMBOL_NAME \name
.globl \name
.align 16,0x90
SYMBOL_NAME_LABEL \name
.endm

81
sr_i386/make_cimode.c Normal file
View File

@ -0,0 +1,81 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gtm_string.h"
#include "error.h"
#include "rtnhdr.h"
#include "op.h"
#include "i386.h"
#include "inst_flush.h"
#include "gtmci.h"
#include "gtm_text_alloc.h"
#define CALL_SIZE 5
#define CODE_SIZE (3 * CALL_SIZE)
#define CODE_LINES 3
/* The code created and returned by make_cimode() is executed in the frame GTM$CI at level 1 of
* every nested call-in environment. For every M routine being called-in from C, GTM$CI code
* will setup argument registers/stack and executes the M routine. When the M routine returns
* from its final QUIT, GTM$CI returns to gtm_ci(). make_cimode generates machine equivalents
* for the following operations in that order:
*
* CALL ci_restart :setup register/stack arguments from 'param_list' and transfer control
* to op_extcall/op_extexfun which return only after the M routine finishes and QUITs.
* CALL ci_ret_code :transfer control from the M routine back to C (gtm_ci). Never returns.
* CALL opp_ret :an implicit QUIT although it is never executed.
*
* Before GTM$CI executes, it is assumed that the global 'param_list' has been populated with
* argument/return mval*.
*/
rhdtyp *make_cimode(void)
{
static rhdtyp *base_address = NULL;
lab_tabent *lbl;
int *lnr;
unsigned char *code;
if (NULL != base_address)
return base_address;
base_address = (rhdtyp *)GTM_TEXT_ALLOC(SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent) + CODE_LINES * SIZEOF(int4));
memset(base_address,0,SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent) + CODE_LINES * SIZEOF(int4));
base_address->routine_name.len = STR_LIT_LEN(GTM_CIMOD);
base_address->routine_name.addr = GTM_CIMOD;
base_address->ptext_ptr = SIZEOF(rhdtyp);
base_address->vartab_ptr =
base_address->labtab_ptr = SIZEOF(rhdtyp) + CODE_SIZE; /* hdr + code */
base_address->lnrtab_ptr = SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent);
base_address->labtab_len = 1;
base_address->lnrtab_len = CODE_LINES;
code = (unsigned char *) base_address + base_address->ptext_ptr;
*code++ = I386_INS_CALL_Jv;
*((int4 *)code) = (int4)((unsigned char *)ci_restart - (code + SIZEOF(int4)));
code += SIZEOF(int4);
*code++ = I386_INS_CALL_Jv; /* a CALL to return control from M to ci_ret_code() which in turn returns to gtm_ci() */
*((int4 *)code) = (int4)((unsigned char *)ci_ret_code - (code + SIZEOF(int4)));
code += SIZEOF(int4);
*code++ = I386_INS_JMP_Jv;
*((int4 *)code) = (int4)((unsigned char *)opp_ret - (code + SIZEOF(int4)));
code += SIZEOF(int4);
lbl = (lab_tabent *)((int) base_address + base_address->labtab_ptr);
lbl->lab_ln_ptr = base_address->lnrtab_ptr;
lnr = (int *)((int)base_address + base_address->lnrtab_ptr);
*lnr++ = base_address->ptext_ptr;
*lnr++ = base_address->ptext_ptr;
*lnr++ = base_address->ptext_ptr + 2 * CALL_SIZE;
assert(code - ((unsigned char *)base_address + base_address->ptext_ptr) == CODE_SIZE);
zlput_rname(base_address);
inst_flush(base_address, SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent) + CODE_LINES * SIZEOF(int4));
return base_address;
}

67
sr_i386/make_dmode.c Normal file
View File

@ -0,0 +1,67 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gtm_string.h"
#include "error.h"
#include "rtnhdr.h"
#include "op.h"
#include "i386.h"
#include "inst_flush.h"
#include "dm_setup.h"
#include "gtm_text_alloc.h"
#define CALL_SIZE 5
#define CODE_SIZE 3*CALL_SIZE
#define CODE_LINES 3
rhdtyp *make_dmode(void)
{
rhdtyp *base_address;
lab_tabent *lbl;
int *lnr;
unsigned char *code;
/* dummy code + label entry + line entries */
base_address = (rhdtyp *)GTM_TEXT_ALLOC(SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent) + CODE_LINES * SIZEOF(int4));
memset(base_address,0,SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent) + CODE_LINES*SIZEOF(int4));
base_address->routine_name.len = STR_LIT_LEN(GTM_DMOD);
base_address->routine_name.addr = GTM_DMOD;
base_address->ptext_ptr = SIZEOF(rhdtyp);
base_address->vartab_ptr =
base_address->labtab_ptr = SIZEOF(rhdtyp) + CODE_SIZE; /* hdr + code */
base_address->lnrtab_ptr = SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent);
base_address->labtab_len = 1;
base_address->lnrtab_len = CODE_LINES;
code = (unsigned char *) base_address + base_address->ptext_ptr;
*code++ = I386_INS_CALL_Jv;
*((int4 *)code) = (int4)((unsigned char *)dm_setup - (code + SIZEOF(int4)));
code += SIZEOF(int4);
*code++ = I386_INS_CALL_Jv; /* this should be a CALL to maintain uniformity between transfer to mum_tstart from baseframe
and transfers to mum_tstart from error processing (MUM_TSTART marco in
mdb_condition_handler) */
*((int4 *)code) = (int4)((unsigned char *)mum_tstart - (code + SIZEOF(int4)));
code += SIZEOF(int4);
*code++ = I386_INS_JMP_Jv;
*((int4 *)code) = (int4)((unsigned char *)opp_ret - (code + SIZEOF(int4)));
code += SIZEOF(int4);
lbl = (lab_tabent *)((int) base_address + base_address->labtab_ptr);
lbl->lab_ln_ptr = base_address->lnrtab_ptr;
lnr = (int *)((int)base_address + base_address->lnrtab_ptr);
*lnr++ = base_address->ptext_ptr;
*lnr++ = base_address->ptext_ptr;
*lnr++ = base_address->ptext_ptr + 2 * CALL_SIZE;
assert(code - ((unsigned char *)base_address + base_address->ptext_ptr) == CODE_SIZE);
zlput_rname(base_address);
inst_flush(base_address, SIZEOF(rhdtyp) + CODE_SIZE + SIZEOF(lab_tabent) + CODE_LINES * SIZEOF(int4));
return base_address;
}

77
sr_i386/masscomp.h Normal file
View File

@ -0,0 +1,77 @@
/****************************************************************
* *
* Copyright 2001 Sanchez Computer Associates, Inc. *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
struct exec {
short a_magic; /* magic number */
short a_stamp; /* version stamp - RTU 2.0+ uses this - see below */
uint4 a_text; /* size of text segment */
uint4 a_data; /* size of initialized data */
uint4 a_bss; /* size of uninitialized data */
uint4 a_syms; /* size of symbol table */
uint4 a_entry; /* entry point */
uint4 a_trsize; /* size of text relocation */
uint4 a_drsize; /* size of data relocation */
};
/*
* Format of a relocation datum.
*/
struct relocation_info {
int r_address; /* address which is relocated */
unsigned int r_symbolnum:24, /* local symbol ordinal */
r_pcrel:1, /* was relocated pc relative already */
r_length:2, /* 0=byte, 1=word, 2=int4 */
r_extern:1, /* does not include value of sym referenced */
r_pad:4; /* nothing, yet */
};
struct rel_table {
struct rel_table *next, *resolve;
struct relocation_info r;
};
/*
* Format of a symbol table entry; this file is included by <a.out.h>
* and should be used if you aren't interested the a.out header
* or relocation information.
*/
struct nlist {
int4 n_strx; /* index into file string table */
unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
char n_other; /* unused */
short n_desc; /* see <stab.h> */
uint4 n_value; /* value of this symbol (or sdb offset) */
};
struct sym_table {
struct sym_table *next;
struct nlist n;
struct rel_table *resolve;
unsigned short name_len;
unsigned char name[1];
};
/*
* Simple values for n_type.
*/
#define N_UNDF 0x0 /* undefined */
#define N_ABS 0x2 /* absolute */
#define N_TEXT 0x4 /* text */
#define N_DATA 0x6 /* data */
#define N_BSS 0x8 /* bss */
#define N_COMM 0x12 /* common (internal to ld) */
#define N_IPCOMM 0x16 /* initialized private */
#define N_PCOMM 0x18 /* uninitialized private */
#define N_FN 0x1f /* file name symbol */
#define N_EXT 01 /* external bit, or'ed in */
#define N_TYPE 0x1e /* mask for all the type bits */

42
sr_i386/mint2mval.s Normal file
View File

@ -0,0 +1,42 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title mint2mval.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.include "mval_def.si"
.sbttl mint2mval
# PAGE +
.text
# --------------------------------
# mint2mval.s
# Convert int to mval
# --------------------------------
.extern i2mval
# PUBLIC mint2mval
ENTRY mint2mval
pushl %edx
leal (%eax),%eax
pushl %eax
call i2mval
addl $8,%esp
ret
# mint2mval ENDP
# END

34
sr_i386/mum_tstart.s Normal file
View File

@ -0,0 +1,34 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
.TITLE mum_tstart.s
.include "linkage.si"
.include "g_msf.si"
#comment perhaps
.sbttl mum_tstart
.data
.extern frame_pointer
.extern proc_act_type
.text
.extern trans_code
.extern inst_flush
ENTRY mum_tstart
addl $4,%esp # back up over return address
cmpw $0,proc_act_type
je l1
call trans_code
l1: getframe
leal xfer_table,%ebx
call inst_flush # smw 99/11/24 is this needed
ret

43
sr_i386/mval2bool.s Normal file
View File

@ -0,0 +1,43 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title mval2bool.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl mval2bool
# PAGE +
# --------------------------------
# mval2bool.s
# Convert mval to bool
# --------------------------------
# edx - src. mval
.text
.extern s2n
.extern underr
# PUBLIC mval2bool
ENTRY mval2bool
mv_force_defined %edx, l1
pushl %edx
mv_force_num %edx, skip_conv
popl %edx
cmpl $0,mval_l_m1(%edx)
ret
# mval2bool ENDP
# END

45
sr_i386/mval2mint.s Normal file
View File

@ -0,0 +1,45 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title mval2mint.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl mval2mint
# PAGE +
# --------------------------------
# mval2mint.s
# Convert mval to int
# --------------------------------
# edx - source mval
# eax - destination mval
.text
.extern mval2i
.extern s2n
.extern underr
# PUBLIC mval2mint
ENTRY mval2mint
mv_force_defined %edx, l1
pushl %edx # preserve src + push it as arg
mv_force_num %edx, skip_conv
call mval2i
addl $4,%esp
ret
# mval2mint ENDP
# END

39
sr_i386/mval2num.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title mval2num.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl mval2num
# PAGE +
.text
.extern n2s
.extern s2n
.extern underr
# PUBLIC mval2num
ENTRY mval2num
mv_force_defined %edx, l0
pushl %edx # save in case call s2n
mv_force_num %edx, l1
popl %edx
mv_force_str_if_num_approx %edx, l2
ret
# mval2num ENDP
# END

245
sr_i386/mval_def.si Normal file
View File

@ -0,0 +1,245 @@
#################################################################
# #
# Copyright 2001, 2011 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
.sbttl mval_def.si
# PAGE +
# -------------------------------------------
# mval_def.si
#
# This is an include file for
# SCO Unix 80386 masm assembler containing
# the macros for mval-related assembly routines.
# -------------------------------------------
mval_v_nm = 0
mval_v_int = 1
mval_v_str = 2
mval_v_num_approx = 3
mval_v_canonical = 4
mval_v_sym = 5
mval_v_sublit = 6
mval_v_retarg = 7
mval_v_utflen = 8
mval_v_aliascont = 9
mval_m_nm = 0x001
mval_m_int_without_nm = 0x002
mval_m_int = 0x003
mval_m_str = 0x004
mval_m_num_approx = 0x008
mval_m_canonical = 0x010
mval_m_sym = 0x020
mval_m_sublit = 0x040
mval_m_retarg = 0x080
mval_m_utflen = 0x100
mval_m_aliascont = 0x200
#smw 99/7/12 Now using MS VC 5.0 so the following paragraph should
# be replaced.
# NOTE: The SCO C compiler pads out bit fields to the length of
# the underlying type. For example, a series of "unsigned int"
# bit fields will be padded out to a multiple of 4 bytes, even if
# they require less than one byte total, because the underlying
# type is "int". Similarly, a series of "unsigned short" bit
# fields will be padded out to a multiple of 2 bytes, and a
# series of "unsigned char" will be padded out to a byte boundary.
# Also note the padding is not related to alignment, only to
# total length.
#
#smw 99/10/19 gcc on Linux doesn't do the above
#
# Length of mval in bytes
mval_byte_len = 24
# Offsets of type, exp, strlen, stradd, num in mval structure
mval_w_mvtype = 0
mval_b_exp = 2
mval_l_strlen = 16
mval_a_straddr = 20
# Address offset of number in mval
mvalnm_offs = 4
mval_l_m0 = 4
mval_l_m1 = 8
mval_esign_mask = 0x080
MV_BIAS = 1000 # 10**3
MANT_LO = 100000000 # 10**8
MANT_HI = 1000000000 # 10**9
INT_HI = 1000000 # 10**6
# Stringpool structure offsets
base = 0
free = 4
top = 8
# mvals passed to these macros must be registers
.sbttl mval_def.si mv_force_defined
# ---------------------------------------
# mv_force_defined(mval, label)
# ---------------------------------------
.macro mv_force_defined mval, label
testw $(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
jne \label
pushl \mval
call underr
addl $4,%esp
movl %eax, \mval
\label:
.endm
.sbttl mval_def.si mv_force_str
# ---------------------------------------
# mv_force_str(mval, label)
# ---------------------------------------
.macro mv_force_str mval, label
testw $mval_m_str,mval_w_mvtype(\mval)
jne \label
pushl \mval
call n2s
addl $4,%esp
\label:
.endm
.sbttl mval_def.si mv_force_num
# ---------------------------------------
# mv_force_num(mval, label)
# ---------------------------------------
.macro mv_force_num mval, label
testw $mval_m_nm,mval_w_mvtype(\mval)
jne \label
pushl \mval
call s2n
addl $4,%esp
\label:
.endm
.sbttl mval_def.si mv_force_str_if_num_approx
# ---------------------------------------
# mv_force_str_if_num_approx(mval, label)
# ---------------------------------------
.macro mv_force_str_if_num_approx mval, label
testw $mval_m_num_approx,mval_w_mvtype(\mval)
je \label
pushl \mval
call n2s
addl $4,%esp
\label:
.endm
.sbttl mval_def.si mv_i2mval
# ---------------------------------------
# mv_i2mval(int, mval)
# ---------------------------------------
.macro mv_i2mval int, mval
movw $mval_m_int,mval_w_mvtype(\mval)
movl \int,%eax
imull $MV_BIAS,%eax,%eax
movl %eax,mval_l_m1(\mval)
.endm
.sbttl mval_def.si mv_if_string
# ---------------------------------------
# mv_if_string(mval,label)
# ---------------------------------------
.macro mv_if_string mval, label
testw $mval_m_str,mval_w_mvtype(\mval)
jne \label
.endm
.sbttl mval_def.si mv_if_number
# ---------------------------------------
# mv_if_number(mval,label)
# ---------------------------------------
.macro mv_if_number mval, label
testw $mval_m_nm,mval_w_mvtype(\mval)
jne \label
.endm
.sbttl mval_def.si mv_if_int
# ---------------------------------------
# mv_if_int(mval,label)
# ---------------------------------------
.macro mv_if_int mval, label
testw $mval_m_int_without_nm,mval_w_mvtype(\mval)
jne \label
.endm
.sbttl mval_def.si mv_if_notstring
# ---------------------------------------
# mv_if_notstring(mval,label)
# ---------------------------------------
.macro mv_if_notstring mval, label
testw $mval_m_str,mval_w_mvtype(\mval)
je \label
.endm
.sbttl mval_def.si mv_if_notnumber
# ---------------------------------------
# mv_if_notnumber(mval,label)
# ---------------------------------------
.macro mv_if_notnumber mval, label
testw $mval_m_nm,mval_w_mvtype(\mval)
je \label
.endm
.sbttl mval_def.si mv_if_notint
# ---------------------------------------
# mv_if_notint(mval,label)
# ---------------------------------------
.macro mv_if_notint mval, label
testw $mval_m_int_without_nm,mval_w_mvtype(\mval)
je \label
.endm
.sbttl mval_def.si mv_if_defined
# ---------------------------------------
# mv_if_defined(mval,label)
# ---------------------------------------
.macro mv_if_defined mval, label
testw $(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
jne \label
.endm
.sbttl mval_def.si mv_if_notdefined
# ---------------------------------------
# mv_if_notdefined(mval,label)
# ---------------------------------------
.macro mv_if_notdefined mval, label
testw $(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
je \label
.endm
.sbttl mval_def.si mv_if_canonical
# -------------------------------------------------------------
# WARNING:
# Following macro needs to be supplied with 2 extra labels that
# are used by local branch instructions, tmp_label1 and tmp_label2
# -------------------------------------------------------------
# mv_if_canonical(mval,mainlabel, tmp_label1, tmp_label2)
# -------------------------------------------------------------
.macro mv_if_canonical mval, mainlabel, tmp_label1, tmp_label2
testw $mval_m_nm,mval_w_mvtype(\mval)
je \tmp_label1
testw $mval_m_num_approx,mval_w_mvtype(\mval)
jne \tmp_label2
jmp \mainlabel
\tmp_label1:
pushl \mval
call val_iscan
addl $4,%esp
cmpl $0,%eax
jne \mainlabel
\tmp_label2:
.endm

479
sr_i386/obj_file.c Normal file
View File

@ -0,0 +1,479 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gtm_string.h"
#include <errno.h>
#include "compiler.h"
#include "rtnhdr.h"
#include "obj_gen.h"
#include "cgp.h"
#include "mdq.h"
#include "cmd_qlf.h"
#include "objlabel.h" /* needed for masscomp.h */
#include "masscomp.h"
#include "stringpool.h"
#include "parse_file.h"
#include "gtm_fcntl.h"
#include "gtm_unistd.h"
#include "gtmio.h"
#include "mmemory.h"
#include "obj_file.h"
LITREF char gtm_release_name[];
LITREF int4 gtm_release_name_len;
GBLREF mliteral literal_chain;
GBLREF char source_file_name[];
GBLREF unsigned short source_name_len;
GBLREF command_qualifier cmd_qlf;
GBLREF mident routine_name;
GBLREF mident module_name;
GBLREF boolean_t run_time;
GBLREF int4 mlmax, mvmax;
GBLREF int4 code_size, lit_addrs, lits_size;
GBLDEF int4 psect_use_tab[GTM_LASTPSECT]; /* bytes of each psect in this module */
GBLREF char object_file_name[];
GBLREF short object_name_len;
GBLREF int object_file_des;
static short int current_psect;
static char emit_buff[OBJ_EMIT_BUF_SIZE]; /* buffer for emit output */
static short int emit_buff_used; /* number of chars in emit_buff */
GBLREF uint4 txtrel_cnt;
static uint4 cdlits;
static struct rel_table *data_rel, *data_rel_end;
static struct rel_table *text_rel, *text_rel_end;
DEBUG_ONLY(static uint4 txtrel_cnt_in_hdr;)
error_def(ERR_OBJFILERR);
void create_object_file(rhdtyp *rhead)
{
int status;
unsigned char rout_len;
uint4 stat;
char obj_name[SIZEOF(mident_fixed) + 5];
mstr fstr;
parse_blk pblk;
struct exec hdr;
error_def(ERR_FILEPARSE);
assert(!run_time);
memset(&pblk, 0, SIZEOF(pblk));
pblk.buffer = object_file_name;
pblk.buff_size = MAX_FBUFF;
/* create the object file */
fstr.len = (MV_DEFINED(&cmd_qlf.object_file) ? cmd_qlf.object_file.str.len : 0);
fstr.addr = cmd_qlf.object_file.str.addr;
rout_len = module_name.len;
memcpy(&obj_name[0], module_name.addr, rout_len);
obj_name[rout_len] = '.';
obj_name[rout_len + 1] = 'o';
obj_name[rout_len + 2] = 0;
pblk.def1_size = rout_len + 2;
pblk.def1_buf = obj_name;
status = parse_file(&fstr, &pblk);
if (!(status & 1))
rts_error(VARLSTCNT(5) ERR_FILEPARSE, 2, fstr.len, fstr.addr, status);
object_name_len = pblk.b_esl;
object_file_name[object_name_len] = 0;
OPEN_OBJECT_FILE(object_file_name, O_CREAT | O_RDWR, object_file_des);
if (FD_INVALID == object_file_des)
rts_error(VARLSTCNT(5) ERR_OBJFILERR, 2, object_name_len, object_file_name, errno);
memcpy(&rhead->jsb[0], "GTM_CODE", SIZEOF(rhead->jsb));
emit_addr((char *)&rhead->src_full_name.addr - (char *)rhead,
(int4)rhead->src_full_name.addr, (int4 *)&rhead->src_full_name.addr);
emit_addr((char *)&rhead->routine_name.addr - (char *)rhead,
(int4)rhead->routine_name.addr, (int4 *)&rhead->routine_name.addr);
txtrel_cnt += 2;
DEBUG_ONLY(txtrel_cnt_in_hdr = txtrel_cnt;)
set_psect(GTM_CODE, 0);
hdr.a_magic = OMAGIC;
hdr.a_stamp = OBJ_LABEL;
hdr.a_entry = 0;
hdr.a_bss = 0;
hdr.a_text = code_size;
assert(0 == PADLEN(lits_size, NATIVE_WSIZE));
hdr.a_data = lits_size; /* and pad to even # */
hdr.a_syms = (mlmax + cdlits) * SIZEOF(struct nlist);
hdr.a_trsize = txtrel_cnt * SIZEOF(struct relocation_info);
hdr.a_drsize = lit_addrs * SIZEOF(struct relocation_info);
emit_immed((char *)&hdr, SIZEOF(hdr));
memset(psect_use_tab, 0, SIZEOF(psect_use_tab));
emit_immed((char *)rhead, SIZEOF(*rhead));
}
void close_object_file(void)
{
assert(0 == PADLEN(lits_size, NATIVE_WSIZE));
resolve_sym();
output_relocation();
output_symbol();
if (emit_buff_used)
buff_emit();
if ((off_t)-1 == lseek(object_file_des, (off_t)0, SEEK_SET))
rts_error(VARLSTCNT(5) ERR_OBJFILERR, 2, object_name_len, object_file_name, errno);
}
void drop_object_file(void)
{
int rc;
if (FD_INVALID != object_file_des)
{
UNLINK(object_file_name);
CLOSEFILE_RESET(object_file_des, rc); /* resets "object_file_des" to FD_INVALID */
}
}
GBLREF spdesc stringpool;
void emit_addr(int4 refaddr, int4 offset, int4 *result)
{
struct rel_table *newrel;
if (run_time)
{
unsigned char *ptr;
ptr = stringpool.free;
*result = offset - (int4) ptr;
} else
{ *result = offset + code_size;
newrel = (struct rel_table *) mcalloc(SIZEOF(struct rel_table));
newrel->next = (struct rel_table *) 0;
newrel->resolve = 0;
newrel->r.r_address = refaddr;
newrel->r.r_symbolnum = N_DATA;
newrel->r.r_pcrel = 0;
newrel->r.r_length = 2;
newrel->r.r_extern = 0;
newrel->r.r_pad = 0;
if (!text_rel)
text_rel = text_rel_end = newrel;
else
{ text_rel_end->next = newrel;
text_rel_end = newrel;
}
}
return;
}
void emit_pidr(int4 refoffset, int4 data_offset, int4 *result)
{
struct rel_table *newrel;
assert(!run_time);
refoffset += code_size;
data_offset += code_size;
*result = data_offset;
newrel = (struct rel_table *) mcalloc(SIZEOF(struct rel_table));
newrel->next = (struct rel_table *)0;
newrel->resolve = 0;
newrel->r.r_address = refoffset;
newrel->r.r_symbolnum = N_DATA;
newrel->r.r_pcrel = 0;
newrel->r.r_length = 2;
newrel->r.r_extern = 0;
newrel->r.r_pad = 0;
if (!data_rel)
data_rel = data_rel_end = newrel;
else
{ data_rel_end->next = newrel;
data_rel_end = newrel;
}
}
void emit_reference(uint4 refaddr, mstr *name, uint4 *result)
{
struct sym_table *sym;
struct rel_table *newrel;
sym = define_symbol(0, name, 0);
assert(sym);
if (sym->n.n_type == (N_TEXT | N_EXT))
*result = sym->n.n_value;
else
{
newrel = (struct rel_table *) mcalloc(SIZEOF(struct rel_table));
newrel->next = (struct rel_table *)0;
newrel->resolve = 0;
newrel->r.r_address = refaddr;
newrel->r.r_symbolnum = 0;
newrel->r.r_pcrel = 0;
newrel->r.r_length = 2;
newrel->r.r_extern = 1;
newrel->r.r_pad = 0;
if (!text_rel)
text_rel = text_rel_end = newrel;
else
{ text_rel_end->next = newrel;
text_rel_end = newrel;
}
if (sym->resolve)
newrel->resolve = sym->resolve;
sym->resolve = newrel;
*result = 0;
}
}
/*
* emit_immed
*
* Args: buffer of executable code, and byte count to be output.
*/
error_def(ERR_STRINGOFLOW);
void emit_immed(char *source, uint4 size)
{
short int write;
if (run_time)
{
if (stringpool.free + size > stringpool.top)
rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
memcpy(stringpool.free, source, size);
stringpool.free += size;
} else
{ while(size > 0)
{
write = SIZEOF(emit_buff) - emit_buff_used;
write = size < write ? size : write;
memcpy(emit_buff + emit_buff_used, source, write);
size -= write;
source += write;
emit_buff_used += write;
psect_use_tab[current_psect] += write;
if (size)
buff_emit();
}
}
}
/*
* buff_emit
*
* Args: buffer pointer, number of bytes to emit
*/
void buff_emit(void)
{
uint4 stat;
if (-1 == write(object_file_des, emit_buff, emit_buff_used))
rts_error(VARLSTCNT(5) ERR_OBJFILERR, 2, object_name_len, object_file_name, errno);
emit_buff_used = 0;
}
void set_psect(unsigned char psect,unsigned char offset)
{
current_psect = psect;
return;
}
/*
* define_symbol
*
* Args: psect index, symbol name, symbol value.
*
* Description: Buffers a definition of a global symbol with the
* given name and value in the given psect.
*/
static struct sym_table *symbols;
struct sym_table *define_symbol(unsigned char psect, mstr *name, int4 value)
{
int cmp;
struct sym_table *sym, *sym1, *newsym;
sym = symbols;
sym1 = 0;
while(sym)
{
if ((cmp = memvcmp(name->addr, name->len, &sym->name[0], sym->name_len - 1)) <= 0)
break;
sym1 = sym;
sym = sym->next;
}
if (cmp || !sym)
{ newsym = (struct sym_table *) mcalloc(SIZEOF(struct sym_table) + name->len);
newsym->name_len = name->len + 1;
memcpy(&newsym->name[0], name->addr, name->len);
newsym->name[ name->len ] = 0;
newsym->n.n_strx = 0;
newsym->n.n_type = N_EXT;
if (psect == GTM_CODE)
newsym->n.n_type |= N_TEXT; /* if symbol is in GTM_CODE, it is defined */
else
txtrel_cnt++;
newsym->n.n_other = 0;
newsym->n.n_desc = 0;
newsym->n.n_value = value;
newsym->resolve = 0;
newsym->next = sym;
if (sym1)
sym1->next = newsym;
else
symbols = newsym;
cdlits++;
return 0;
}
if (!(sym->n.n_type & N_TEXT))
txtrel_cnt++;
return sym;
}
void resolve_sym(void)
{
uint4 symnum;
struct sym_table *sym;
struct rel_table *rel;
symnum = 0;
sym = symbols;
while (sym)
{ if (sym->resolve)
{ rel = sym->resolve;
while (rel)
{ rel->r.r_symbolnum = symnum;
rel = rel->resolve;
}
}
symnum++;
sym = sym->next;
}
}
void output_relocation(void)
{
struct rel_table *rel;
DEBUG_ONLY(int cnt;)
DEBUG_ONLY(cnt = 0;)
rel = text_rel;
while (rel)
{
emit_immed((char *)&rel->r, SIZEOF(rel->r));
rel = rel->next;
DEBUG_ONLY(cnt++;)
}
assert(cnt == txtrel_cnt_in_hdr);
DEBUG_ONLY(cnt = 0;)
rel = data_rel;
while (rel)
{
emit_immed((char *)&rel->r, SIZEOF(rel->r));
rel = rel->next;
DEBUG_ONLY(cnt++;)
}
assert(cnt == lit_addrs);
}
void output_symbol(void)
{
uint4 string_length;
struct sym_table *sym;
string_length = SIZEOF(int4);
sym = symbols;
while (sym)
{
sym->n.n_strx = string_length;
emit_immed((char *)&sym->n, SIZEOF(sym->n));
string_length += sym->name_len;
sym = sym->next;
}
emit_immed((char *)&string_length, SIZEOF(string_length));
sym = symbols;
while (sym)
{
emit_immed((char *)&sym->name[0], sym->name_len);
sym = sym->next;
}
}
void obj_init(void)
{
cdlits = txtrel_cnt = 0;
data_rel = text_rel = data_rel_end = text_rel_end = 0;
symbols = 0;
}
void emit_literals(void)
{
uint4 offset, padsize;
mliteral *p;
set_psect(GTM_LITERALS, 0);
offset = stringpool.free - stringpool.base;
emit_immed((char *)stringpool.base, offset);
/* comp_lits aligns the start of source path on a NATIVE_WSIZE boundary.*/
padsize = PADLEN(offset, NATIVE_WSIZE);
if (padsize)
{
emit_immed(PADCHARS, padsize);
offset += padsize;
}
emit_immed(source_file_name, source_name_len);
offset += source_name_len;
/* comp_lits aligns the start of routine_name on a NATIVE_WSIZE boundary.*/
padsize = PADLEN(offset, NATIVE_WSIZE);
if (padsize)
{
emit_immed(PADCHARS, padsize);
offset += padsize;
}
emit_immed(routine_name.addr, routine_name.len);
offset += routine_name.len;
/* comp_lits aligns the start of the literal area on a NATIVE_WSIZE boundary.*/
padsize = PADLEN(offset, NATIVE_WSIZE);
if (padsize)
{
emit_immed(PADCHARS, padsize);
offset += padsize;
}
dqloop(&literal_chain, que, p)
{
assert (p->rt_addr == offset);
MV_FORCE_NUMD(&p->v);
if (p->v.str.len)
emit_pidr(p->rt_addr + ((char *) &p->v.str.addr - (char *)&p->v),
p->v.str.addr - (char *) stringpool.base, (int4 *)&p->v.str.addr);
else
p->v.str.addr = 0;
emit_immed((char *)&p->v, SIZEOF(p->v));
offset += SIZEOF(p->v);
}
assert(lits_size == offset);
}

264
sr_i386/op_bkpt.s Normal file
View File

@ -0,0 +1,264 @@
#################################################################
# #
# Copyright 2001, 2010 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_bkpt.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_zstepret
# PAGE +
.DATA
.extern frame_pointer
.extern zstep_level
.text
.extern gtm_fetch
.extern op_retarg
.extern op_zbreak
.extern op_zst_break
.extern op_zst_over
.extern op_zstepret
.extern opp_ret
# PUBLIC opp_zstepret
ENTRY opp_zstepret
movl frame_pointer,%eax
movw msf_typ_off(%eax),%dx
testw $1,%dx
je l1
movl zstep_level,%edx
cmpl %eax, %edx
jg l1
call op_zstepret
l1: jmp opp_ret
# opp_zstepret ENDP
# PUBLIC opp_zstepretarg
ENTRY opp_zstepretarg
pushl %eax
pushl %edx
movl frame_pointer,%eax
movw msf_typ_off(%eax),%dx
testw $1,%dx
je l2
movl zstep_level,%edx
cmpl %eax, %edx
jg l2
call op_zstepret
l2: popl %edx
popl %eax
jmp op_retarg
# opp_zstepretarg ENDP
# PUBLIC op_zbfetch
ENTRY op_zbfetch
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call gtm_fetch
popl %eax
# lea esp, [esp][eax*4]
leal (%esp,%eax,4),%esp
pushl frame_pointer
call op_zbreak
addl $4,%esp
getframe
ret
# op_zbfetch ENDP
# PUBLIC op_zbstart
ENTRY op_zbstart
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
pushl %edx
call op_zbreak
addl $4,%esp
getframe
ret
# op_zbstart ENDP
# PUBLIC op_zstepfetch
ENTRY op_zstepfetch
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call gtm_fetch
popl %eax
# lea esp, [esp][eax*4]
leal (%esp,%eax,4),%esp
call op_zst_break
getframe
ret
# op_zstepfetch ENDP
# PUBLIC op_zstepstart
ENTRY op_zstepstart
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call op_zst_break
getframe
ret
# op_zstepstart ENDP
# PUBLIC op_zstzbfetch
ENTRY op_zstzbfetch
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call gtm_fetch
popl %eax
# lea esp, [esp][eax*4]
leal (%esp,%eax,4),%esp
pushl frame_pointer
call op_zbreak
addl $4,%esp
call op_zst_break
getframe
ret
# op_zstzbfetch ENDP
# PUBLIC op_zstzbstart
ENTRY op_zstzbstart
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
pushl %edx
call op_zbreak
addl $4,%esp
call op_zst_break
getframe
ret
# op_zstzbstart ENDP
# PUBLIC op_zstzb_fet_over
ENTRY op_zstzb_fet_over
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call gtm_fetch
popl %eax
# lea esp, [esp][eax*4]
leal (%esp,%eax,4),%esp
pushl frame_pointer
call op_zbreak
addl $4,%esp
movl zstep_level,%edx
cmpl frame_pointer,%edx
jle l3
cmpl $0,%eax
jne l5
jmp l4
l3: call op_zst_break
l4: getframe
ret
l5: call op_zst_over
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
ret
# op_zstzb_fet_over ENDP
# PUBLIC op_zstzb_st_over
ENTRY op_zstzb_st_over
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
pushl %edx
call op_zbreak
addl $4,%esp
movl zstep_level,%edx
cmpl frame_pointer,%edx
jle l6
cmpl $0,%eax
jne l8
jmp l7
l6: call op_zst_break
l7: getframe
ret
l8: call op_zst_over
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
ret
# op_zstzb_st_over ENDP
# PUBLIC op_zst_fet_over
ENTRY op_zst_fet_over
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call gtm_fetch
popl %eax
# lea esp, [esp][eax*4]
leal (%esp,%eax,4),%esp
movl zstep_level,%edx
cmpl frame_pointer,%edx
jg l9
call op_zst_break
getframe
ret
l9: call op_zst_over
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
ret
# op_zst_fet_over ENDP
# PUBLIC op_zst_st_over
ENTRY op_zst_st_over
movl frame_pointer,%eax
popl msf_mpc_off(%eax)
movl zstep_level,%edx
cmpl %eax,%edx
jg l10
call op_zst_break
getframe
ret
l10: call op_zst_over
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
ret
# op_zst_st_over ENDP
# PUBLIC opp_zst_over_ret
ENTRY opp_zst_over_ret
movl frame_pointer,%eax
movw msf_typ_off(%eax),%dx
testw $1,%dx
je l11
movl zstep_level,%edx
movl msf_old_frame_off(%eax),%eax
cmpl %eax,%edx
jg l11
call op_zstepret
l11: jmp opp_ret
# opp_zst_over_ret ENDP
# PUBLIC opp_zst_over_retarg
ENTRY opp_zst_over_retarg
pushl %eax
pushl %edx
movl frame_pointer,%eax
movw msf_typ_off(%eax),%dx
testw $1,%dx
je l12
movl zstep_level,%edx
movl msf_old_frame_off(%eax),%eax
cmpl %eax,%edx
jg l12
call op_zstepret
l12: popl %edx
popl %eax
jmp op_retarg
# opp_zst_over_retarg ENDP
# END

51
sr_i386/op_call.s Normal file
View File

@ -0,0 +1,51 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_call.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_callb
# PAGE +
.DATA
.extern frame_pointer
.text
.extern copy_stack_frame
# PUBLIC op_callb
ENTRY op_callb
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx)
call copy_stack_frame
ret
# op_callb ENDP
.sbttl op_callw, op_calll
# PUBLIC op_callw, op_calll
ENTRY op_calll
ENTRY op_callw
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx)
call copy_stack_frame
ret
# op_calll ENDP
# END

58
sr_i386/op_callsp.s Normal file
View File

@ -0,0 +1,58 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_callsp.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_callsp
# PAGE +
.DATA
.extern dollar_truth
.extern frame_pointer
.text
.extern exfun_frame
.extern push_tval
.sbttl op_callspb
# PUBLIC op_callspb
ENTRY op_callspb
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx) # store pc in MUMPS stack frame
doit: call exfun_frame
pushl dollar_truth
call push_tval
addl $4,%esp
movl frame_pointer,%edx
movl msf_temps_ptr_off(%edx),%edi
ret
# op_callspb ENDP
.sbttl op_callspw, op_callspl
# PUBLIC op_callspw, op_callspl
ENTRY op_callspw
ENTRY op_callspl
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx) # store pc in MUMPS stack frame
jmp doit
# op_callspw ENDP
# END

75
sr_i386/op_contain.s Normal file
View File

@ -0,0 +1,75 @@
#################################################################
# #
# Copyright 2001, 2009 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_contain.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_contain
# PAGE +
.text
sav_eax = -4
sav_edx = -8
.extern matchc
.extern n2s
.extern underr
# PUBLIC op_contain
ENTRY op_contain
enter $8, $0
pushl %edi
pushl %esi
pushl %ebx
movl %edx, sav_edx(%ebp)
mv_force_defined %eax, l1
movl %eax, sav_eax(%ebp)
mv_force_str %eax, l2
movl sav_edx(%ebp), %edx
mv_force_defined %edx, l3
movl %edx, sav_edx(%ebp)
mv_force_str %edx, l4
pushl $1 # pieces argument but have to pass its addr
movl %esp, %edx
subl $4, %esp # returned value
movl %esp, %eax
pushl %edx # parm 6
pushl %eax # parm 5
movl sav_eax(%ebp), %eax
movl sav_edx(%ebp), %edx
pushl mval_a_straddr(%eax) # parm 4
movl mval_l_strlen(%eax), %eax
pushl %eax # parm 3
pushl mval_a_straddr(%edx) # parm 2
movl mval_l_strlen(%edx), %eax
pushl %eax # parm 1
call matchc
leal 24(%esp), %esp # remove args
popl %eax # return value
popl %edx # updated pieces value (ignored)
cmpl $0, %eax
popl %ebx
popl %esi
popl %edi
leave
ret
# op_contain ENDP
# END

42
sr_i386/op_currtn.s Normal file
View File

@ -0,0 +1,42 @@
#################################################################
# #
# Copyright 2001, 2006 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_currtn.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.INCLUDE "g_msf.si"
.sbttl op_currtn
# PAGE +
.DATA
.extern frame_pointer
.text
# PUBLIC op_currtn
ENTRY op_currtn
movw $mval_m_str,mval_w_mvtype(%edx)
movl frame_pointer,%eax
movl msf_rvector_off(%eax),%eax
pushl mrt_rtn_len(%eax)
popl mval_l_strlen(%edx) # %edx->str.len = frame_pointer->rvector->routine_name.len
movl mrt_rtn_addr(%eax),%eax
movl %eax,mval_a_straddr(%edx) # %edx->str.addr = frame_pointer->rvector->routine_name.addr
ret
# op_currtn ENDP
# END

33
sr_i386/op_equ.s Normal file
View File

@ -0,0 +1,33 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_equ.s
.sbttl op_equ
.include "linkage.si"
# .386
# .MODEL FLAT, C
.text
.extern is_equ
# PUBLIC op_equ
ENTRY op_equ
pushl %edx
pushl %eax
call is_equ
addl $8,%esp
cmpl $0,%eax
ret
# op_equ ENDP
# END

53
sr_i386/op_equnul.s Normal file
View File

@ -0,0 +1,53 @@
#################################################################
# #
# Copyright 2001, 2006 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_equnul.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_equnul
# PAGE +
.DATA
.extern undef_inhibit
.text
.extern underr
# PUBLIC op_equnul
ENTRY op_equnul
mv_if_notdefined %eax, l3
testw $mval_m_str,mval_w_mvtype(%eax)
je l2
cmpl $0,mval_l_strlen(%eax)
jne l2
l1: movl $1,%eax
cmpl $0,%eax
ret
l2: movl $0,%eax
cmpl $0,%eax
ret
l3: cmpb $0,undef_inhibit # not defined
jne l1 # if undef_inhibit, then all undefined
# values are equal to null string
pushl %eax # really undef
call underr
addl $4,%esp
ret
# op_equnul ENDP
# END

121
sr_i386/op_exfun.s Normal file
View File

@ -0,0 +1,121 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_exfun.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_exfun
# PAGE +
# call op_exfun with the following stack:
#
# return PC
# ret_value address
# mask
# actualcnt
# actual1 address
# actual2 address
# ...
.DATA
.extern ERR_GTMCHECK
.extern dollar_truth
.extern frame_pointer
.text
.extern exfun_frame
.extern push_parm
.extern rts_error
JMP_Jb = 0x0eb
JMP_Jv = 0x0e9
actual1 = 20
act_cnt = 16
mask_arg = 12
ret_val = 8
rtn_pc = 4
sav_esi = -4
sav_ebx = -8
sav_msf = -12
# PUBLIC op_exfun
ENTRY op_exfun
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
leal sav_msf(%ebp),%esp # establish space for locals
movl act_cnt(%ebp),%eax
addl $3,%eax
negl %eax
leal (%esp,%eax,4),%esp # establish space for temps
movl frame_pointer,%edx
movl rtn_pc(%ebp),%eax
cmpb $JMP_Jv,(%eax)
je long
cmpb $JMP_Jb,(%eax)
je byte_off
error: pushl ERR_GTMCHECK
pushl $1
call rts_error
addl $8,%esp
jmp retlab
byte_off:
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx)
jmp cont
long: movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx)
cont: call exfun_frame
movl frame_pointer,%edx
movl msf_old_frame_off(%edx),%eax
movl %eax,frame_pointer
movl %edx,sav_msf(%ebp)
leal ret_val(%ebp),%esi
movl %esp,%edi
movl act_cnt(%ebp),%eax
movl %eax,%ecx
addl $3,%ecx
REP
movsl
movl dollar_truth,%ecx
andl $1,%ecx
pushl %ecx # push $T
addl $4,%eax
pushl %eax # push total count
call push_parm # push_parm ($T, ret_value, mask, argc [,arg1, arg2, ...]);
done: movl sav_msf(%ebp),%eax
movl %eax,frame_pointer
orw $SFT_EXTFUN,msf_typ_off(%eax)
movl msf_temps_ptr_off(%eax),%edi
retlab: leal sav_ebx(%ebp),%esp
movl rtn_pc(%ebp),%edx
movl act_cnt(%ebp),%eax
addl $4,%eax
popl %ebx
popl %esi
popl %ebp
leal (%esp,%eax,4),%esp
pushl %edx
ret
# op_exfun ENDP
# END

83
sr_i386/op_extcall.s Normal file
View File

@ -0,0 +1,83 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_extcall.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_extcall
# PAGE +
.DATA
.extern ERR_GTMCHECK
.extern ERR_LABELUNKNOWN
.extern frame_pointer
.text
.extern auto_zlink
.extern new_stack_frame
.extern rts_error
# PUBLIC op_extcall
ENTRY op_extcall
putframe
addl $4,%esp
popl %edx
popl %eax
cmpl $0,%eax
je l2
l1: movl (%eax),%eax
addl mrt_curr_ptr(%edx),%eax
addl %edx,%eax
pushl %eax
pushl $0
pushl %edx
call new_stack_frame
addl $12,%esp
getframe
ret
l2: cmpl $0,%edx
jne l4
subl $4,%esp
pushl %esp
movl frame_pointer,%eax
pushl msf_mpc_off(%eax)
call auto_zlink
addl $8,%esp
cmpl $0,%eax
je l3
movl %eax,%edx
popl %eax
cmpl $0,%eax
jne l1
l3: addl $4,%esp
pushl ERR_GTMCHECK
pushl $1
call rts_error
pushl $1 # in original m68020 code ??
addl $8,%esp
getframe
ret
l4: pushl ERR_LABELUNKNOWN
pushl $1
call rts_error
addl $8,%esp
getframe
ret
# op_extcall ENDP
# END

158
sr_i386/op_extexfun.s Normal file
View File

@ -0,0 +1,158 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_extexfun.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_extexfun
# PAGE +
# call op_extexfun with the following stack:
#
# return PC
# routine
# label
# ret_value address
# mask
# actualcnt
# actual1 address
# actual2 address
# ...
.DATA
.extern ERR_FMLLSTMISSING
.extern ERR_GTMCHECK
.extern ERR_LABELUNKNOWN
.extern dollar_truth
.extern frame_pointer
.text
.extern auto_zlink
.extern new_stack_frame
.extern push_parm
.extern rts_error
Grp5_Prefix = 0x0ff # escape for CALL_Ev opcode
CALL_Ev = 0x010 # CALL_Ev part of ModR/M byte
reg_opcode_mask = 0x038
ISFORMAL = 0x0244 # xf_isformal*4
actual1 = 24
act_cnt = 20
mask_arg = 16
ret_val = 12
label_arg = 8
routine = 4
sav_ebx = -4
sav_msf = -8
# PUBLIC op_extexfun
ENTRY op_extexfun
putframe
addl $4,%esp # burn return PC
pushl %ebp
movl %esp,%ebp
pushl %ebx
leal sav_msf(%ebp),%esp # establish space for locals
movl act_cnt(%ebp),%eax
addl $3,%eax
negl %eax
leal (%esp,%eax,4),%esp # add space for temps
movl routine(%ebp),%edx
movl label_arg(%ebp),%eax
cmpl $0,%eax
je l3
l1: movl (%eax),%ebx
addl mrt_curr_ptr(%edx),%ebx
addl %edx,%ebx
cmpb $Grp5_Prefix,0(%ebx)
jne l6
movb 1(%ebx),%cl
andb $reg_opcode_mask,%cl
cmpb $CALL_Ev,%cl
jne l6
cmpl $ISFORMAL,2(%ebx)
jne l6
pushl %ebx
pushl $0
pushl %edx
call new_stack_frame
addl $12,%esp
movl frame_pointer,%edx
movl msf_old_frame_off(%edx),%eax
movl %eax,frame_pointer
movl %edx,sav_msf(%ebp)
leal ret_val(%ebp),%esi
movl %esp,%edi
movl act_cnt(%ebp),%eax
movl %eax,%ecx
addl $3,%ecx # include: A(ret_value), mask, argc
REP
movsl
movl dollar_truth,%ecx
andl $1,%ecx
pushl %ecx
addl $4,%eax # include: $T(just pushed) plus other 3
pushl %eax # push total count
call push_parm # push_parm ($T, ret_value, mask, argc [,arg1, arg2, ...]);
movl sav_msf(%ebp),%eax
movl %eax,frame_pointer
orw $SFT_EXTFUN,msf_typ_off(%eax)
retlab: leal sav_ebx(%ebp),%esp
movl act_cnt(%ebp),%eax
addl $5,%eax
popl %ebx
popl %ebp
leal (%esp,%eax,4),%esp
getframe
ret
l3: cmpl $0,%edx
jne l5
subl $4,%esp
movl %esp,%eax
pushl %eax
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
call auto_zlink
addl $8,%esp
cmpl $0,%eax
je l4
movl %eax,%edx
popl %eax
cmpl $0,%eax
jne l1
l4: pushl ERR_GTMCHECK
pushl $1
call rts_error
jmp retlab
l5: pushl ERR_LABELUNKNOWN
pushl $1
call rts_error
jmp retlab
l6: pushl ERR_FMLLSTMISSING
pushl $1
call rts_error
jmp retlab
# op_extexfun ENDP
# END

85
sr_i386/op_extjmp.s Normal file
View File

@ -0,0 +1,85 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_extjmp.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_extjmp
# PAGE +
.DATA
.extern ERR_GTMCHECK
.extern ERR_LABELUNKNOWN
.extern frame_pointer
.text
.extern auto_zlink
.extern flush_jmp
.extern rts_error
# PUBLIC op_extjmp
ENTRY op_extjmp
putframe
addl $4,%esp
popl %edx
cmpl $0,%edx
je l2
popl %eax
cmpl $0,%eax
je l4
l1: movl (%eax),%eax
addl mrt_curr_ptr(%edx),%eax
addl %edx,%eax
pushl %eax
pushl $0
pushl %edx
call flush_jmp
addl $12,%esp
getframe
ret
l2: movl %esp,%eax
pushl %eax
movl frame_pointer,%eax
pushl msf_mpc_off(%eax)
call auto_zlink
addl $8,%esp
cmpl $0,%eax
je l3
movl %eax,%edx
popl %eax
cmpl $0,%eax
jne l1
jmp l4
l3: addl $4,%esp
pushl ERR_GTMCHECK
pushl $1
call rts_error
addl $8,%esp
getframe
ret
l4: pushl ERR_LABELUNKNOWN
pushl $1
call rts_error
addl $8,%esp
getframe
ret
# op_extjmp ENDP
# END

53
sr_i386/op_fetchintrrpt.s Normal file
View File

@ -0,0 +1,53 @@
#################################################################
# #
# Copyright 2001, 2009 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_fetchintrrpt.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_fetchintrrpt
# PAGE +
.DATA
.extern frame_pointer
.extern neterr_pending
.text
.extern gtm_fetch
.extern gvcmz_neterr
.extern outofband_clear
.extern async_action
# PUBLIC op_fetchintrrpt
ENTRY op_fetchintrrpt
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call gtm_fetch
popl %eax
leal (%esp,%eax,4),%esp
cmpb $0,neterr_pending
je l1
call outofband_clear
pushl $0
call gvcmz_neterr
addl $4,%esp
l1: pushl $1
call async_action
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
ret
# op_fetchintrrpt ENDP
# END

57
sr_i386/op_fnget.s Normal file
View File

@ -0,0 +1,57 @@
#################################################################
# #
# Copyright 2001, 2009 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_fnget.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_fnget
# PAGE +
# ------------------------------------
# op_fnget.s
#
# Mumps $Get function
# ------------------------------------
# edx - src. mval
# eax - dest. mval
.text
# PUBLIC op_fnget
ENTRY op_fnget
cmpl $0,%edx
je l5 # if arg = 0, set type and len
mv_if_notdefined %edx, l5
# Copy the mval from [edx] to [eax].
pushl %edi
pushl %esi
movl $mval_byte_len,%ecx
movl %edx,%esi
movl %eax,%edi
REP
movsb
andw $~mval_m_aliascont, mval_w_mvtype(%eax) # Don't propagate alias container flag
popl %esi
popl %edi
ret
l5: movw $mval_m_str,mval_w_mvtype(%eax) # string type
movl $0,mval_l_strlen(%eax) # dest. str. len. = 0
ret
# op_fnget ENDP
# END

93
sr_i386/op_fnzextract.s Normal file
View File

@ -0,0 +1,93 @@
#################################################################
# #
# Copyright 2006, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_fnzextract.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_fnzextract
# PAGE +
# ------------------------------------
# op_fnzextract.s
#
# Mumps $Extract function
# ------------------------------------
# --------------------------------
# op_fnzextract (int last, int first, mval *src, mval *dest)
# --------------------------------
# esi - src mval
# edi - dest mval
# ecx - src. str. len.
# ebx - resultant str. len.
# eax - first index
# edx - last index
last = 8
first = 12
src = 16
dest = 20
.text
.extern n2s
.extern underr
# PUBLIC op_fnzextract
ENTRY op_fnzextract
enter $0,$0
pushl %edi
pushl %esi
pushl %ebx
movl src(%ebp),%esi # esi - src. mval
mv_force_defined %esi, l00
movl %esi, src(%ebp) # save possibly modified src ptr
mv_force_str %esi, l01
movl src(%ebp),%esi # esi - src.mval
movl first(%ebp),%eax # eax - first
cmpl $0,%eax
jg l10
movl $1,%eax # if first < 1, then first = 1
l10: movl last(%ebp),%edx # edx - last
movl dest(%ebp),%edi # edi - last
movw $mval_m_str,mval_w_mvtype(%edi) # always a string
movl mval_l_strlen(%esi),%ecx # ecx - src. str. len.
cmpl %eax,%ecx # if left index > str. len,
# then null result
jl l25
cmpl %edx,%ecx # right index may be at most the len.
jge l20 # of the source string
movl %ecx,%edx
l20: movl %edx,%ebx
subl %eax,%ebx # result len. = end - start + 1
addl $1,%ebx
jg l30 # if len > 0, then continue
l25: movl $0,mval_l_strlen(%edi)
jmp retlab
l30: movl %ebx,mval_l_strlen(%edi) # dest. str. len.
subl $1,%eax # base = src.addr + left ind. - 1
addl mval_a_straddr(%esi),%eax
movl %eax,mval_a_straddr(%edi) # string addr.
retlab: popl %ebx
popl %esi
popl %edi
leave
ret
# op_fnzextract ENDP
# END

61
sr_i386/op_follow.s Normal file
View File

@ -0,0 +1,61 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_follow.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_follow
# PAGE +
sav_eax = -4
sav_edx = -8
.text
.extern memvcmp
.extern n2s
.extern underr
# PUBLIC op_follow
ENTRY op_follow
enter $8, $0
movl %edx, sav_edx(%ebp)
mv_force_defined %eax, l1
movl %eax, sav_eax(%ebp)
mv_force_str %eax, l2
movl sav_edx(%ebp), %edx
mv_force_defined %edx, l3
movl %edx, sav_edx(%ebp)
mv_force_str %edx, l4
movl sav_eax(%ebp),%eax
movl sav_edx(%ebp),%edx
movl mval_l_strlen(%edx),%ecx
pushl %ecx
pushl mval_a_straddr(%edx)
movl mval_l_strlen(%eax),%ecx
pushl %ecx
pushl mval_a_straddr(%eax)
call memvcmp
addl $16,%esp
cmpl $0,%eax
leave
ret
# op_follow ENDP
# END

78
sr_i386/op_forcenum.s Normal file
View File

@ -0,0 +1,78 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_forcenum.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_forcenum
# PAGE +
.text
.extern s2n
# edx - source mval
# eax - destination mval
# PUBLIC op_forcenum
ENTRY op_forcenum
pushl %eax
mv_force_defined %edx, l00
pushl %edx
mv_force_num %edx, l10
popl %edx
popl %eax
testw $mval_m_str,mval_w_mvtype(%edx)
je l20
testw $mval_m_num_approx,mval_w_mvtype(%edx)
je l40
l20: testw $mval_m_int_without_nm,mval_w_mvtype(%edx)
je l30
movw $mval_m_int,mval_w_mvtype(%eax)
movl mval_l_m1(%edx),%edx
movl %edx,mval_l_m1(%eax)
ret
l30: pushl %ebx
movw $mval_m_nm,mval_w_mvtype(%eax)
movb mval_b_exp(%edx),%bl
movb %bl,mval_b_exp(%eax)
# Copy the only numeric part of Mval from [edx] to [eax].
movl mval_l_m0(%edx),%ebx
movl %ebx,mval_l_m0(%eax)
movl mval_l_m1(%edx),%ebx
movl %ebx,mval_l_m1(%eax)
popl %ebx
ret
l40:
# Copy the Mval from [edx] to [eax].
pushl %edi
pushl %esi
movl %eax,%edi
movl %edx,%esi
movl $mval_byte_len,%ecx
REP
movsb
popl %esi
popl %edi
ret
# op_forcenum ENDP
# END

27
sr_i386/op_forchk1.s Normal file
View File

@ -0,0 +1,27 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_forchk1.s
.sbttl op_forchk1
# .386
# .MODEL FLAT, C
.include "linkage.si"
.text
# PUBLIC op_forchk1
ENTRY op_forchk1
ret
# op_forchk1 ENDP
# END

66
sr_i386/op_forinit.s Normal file
View File

@ -0,0 +1,66 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_forinit.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.INCLUDE "mval_def.si"
.sbttl op_forinit
# PAGE +
.DATA
.extern frame_pointer
.text
.extern numcmp
.extern s2n
.extern underr
# PUBLIC op_forinit
ENTRY op_forinit
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
movl 4(%esp),%eax
mv_force_defined %eax, l0
movl %eax, 4(%esp)
mv_force_num %eax, t2
movl 4(%esp),%eax
cmpl $0,mval_l_m1(%eax)
js l2
mv_if_int %eax, l1
testb $mval_esign_mask,mval_b_exp(%eax)
jne l2
l1: movl 8(%esp),%eax
movl %eax,4(%esp)
call numcmp
addl $12,%esp
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
cmpl $0,%eax
ret
l2: movl 8(%esp),%eax
pushl %eax
call numcmp
addl $16,%esp
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
cmpl $0,%eax
ret
# op_forinit ENDP
# END

44
sr_i386/op_forintrrpt.s Normal file
View File

@ -0,0 +1,44 @@
#################################################################
# #
# Copyright 2001, 2011 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_forintrrpt.s
.sbttl op_forintrrpt
# .386
# .MODEL FLAT, C
.include "linkage.si"
.DATA
.extern neterr_pending
.extern restart_pc
.text
.extern gvcmz_neterr
.extern async_action
.extern outofband_clear
# PUBLIC op_forintrrpt
ENTRY op_forintrrpt
cmpb $0,neterr_pending
je l1
call outofband_clear
pushl $0
call gvcmz_neterr
addl $4,%esp
l1: pushl $0
call async_action
addl $4,%esp
ret
# op_forintrrpt ENDP
# END

53
sr_i386/op_forlcldo.s Normal file
View File

@ -0,0 +1,53 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_forlcldo.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_forlcldo
# PAGE +
.DATA
.extern frame_pointer
.text
.extern exfun_frame
.sbttl op_forlcldob
# PUBLIC op_forlcldob
ENTRY op_forlcldob
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx) # store pc in MUMPS stack frame
doit: call exfun_frame
movl frame_pointer,%edx
movl msf_temps_ptr_off(%edx),%edi
ret
# op_forlcldob ENDP
.sbttl op_forlcldow, op_forlcldol
# PUBLIC op_forlcldow, op_forlcldol
ENTRY op_forlcldol
ENTRY op_forlcldow
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx) # store pc in MUMPS stack frame
jmp doit
# op_forlcldol ENDP
# END

188
sr_i386/op_forloop.s Normal file
View File

@ -0,0 +1,188 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_forloop.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.INCLUDE "mval_def.si"
.sbttl op_forloop
# PAGE +
# Called with the stack contents:
# call return
# ptr to index mval
# ptr to step mval
# ptr to terminator mval
# loop address
.DATA
.extern frame_pointer
# ten_dd DD 10
ten_dd:
.long 10
.text
.extern add_mvals
.extern numcmp
.extern s2n
.extern underr
term = 12
step = 8
indx = 4
# PUBLIC op_forloop
ENTRY op_forloop
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
enter $0, $0
pushl %edi
pushl %esi
pushl %ebx
movl indx(%ebp),%esi
mv_force_defined %esi, l0
movl %esi, indx(%ebp)
mv_force_num %esi, l1
movl indx(%ebp),%esi
movl step(%ebp),%edi
movw mval_w_mvtype(%esi),%ax
movw mval_w_mvtype(%edi),%dx
andw %dx,%ax
testw $mval_m_int_without_nm,%ax
je L66
movl mval_l_m1(%esi),%eax
addl mval_l_m1(%edi),%eax
cmpl $MANT_HI,%eax
jge L68
cmpl $-MANT_HI,%eax
jle L67
movw $mval_m_int,mval_w_mvtype(%esi)
movl %eax,mval_l_m1(%esi)
jmp L63
L67: movb $mval_esign_mask,mval_b_exp(%esi) # set sign bit
negl %eax
jmp L69
L68: movb $0,mval_b_exp(%esi) # clear sign bit
L69: movw $mval_m_nm,mval_w_mvtype(%esi)
orb $69,mval_b_exp(%esi) # set exponent field
movl %eax,%ebx
movl $0,%edx
idivl ten_dd,%eax
movl %eax,mval_l_m1(%esi)
imull $10,%eax,%eax
subl %eax,%ebx
imull $MANT_LO,%ebx,%ebx
movl %ebx,mval_l_m0(%esi)
jmp L63
L66: pushl %esi
pushl $0
pushl %edi
pushl %esi
call add_mvals
addl $16,%esp
movl indx(%ebp),%esi
L63: movl step(%ebp),%edi
testw $mval_m_int_without_nm,mval_w_mvtype(%edi)
jne a
cmpb $0,mval_b_exp(%edi)
jl b
jmp a2
a: cmpl $0,mval_l_m1(%edi)
jl b
a2: movl term(%ebp),%edi
jmp e
b: movl %esi,%edi # if step is negative, reverse compare
movl term(%ebp),%esi
e: # compare indx and term
movw mval_w_mvtype(%esi),%ax
movw mval_w_mvtype(%edi),%dx
andw %dx,%ax
testw $2,%ax
je ccmp
movl mval_l_m1(%esi),%eax
subl mval_l_m1(%edi),%eax
jmp tcmp
ccmp: pushl %edi
pushl %esi
call numcmp
addl $8,%esp
cmpl $0,%eax
tcmp: jle d
movl indx(%ebp),%esi
movl step(%ebp),%edi
movw mval_w_mvtype(%esi),%ax
movw mval_w_mvtype(%edi),%dx
andw %dx,%ax
testw $mval_m_int_without_nm,%ax
je l66
movl mval_l_m1(%esi),%eax
subl mval_l_m1(%edi),%eax
cmpl $MANT_HI,%eax
jge l68
cmpl $-MANT_HI,%eax
jle l67
movw $mval_m_int,mval_w_mvtype(%esi)
movl %eax,mval_l_m1(%esi)
jmp l63
l67: movb $mval_esign_mask,mval_b_exp(%esi) # set sign bit
negl %eax
jmp l69
l68: movb $0,mval_b_exp(%esi) # clear sign bit
l69: movw $mval_m_nm,mval_w_mvtype(%esi)
orb $69,mval_b_exp(%esi) # set exponent field
movl %eax,%ebx
movl $0,%edx
idivl ten_dd,%eax
movl %eax,mval_l_m1(%esi)
imull $10,%eax,%eax
subl %eax,%ebx
imull $MANT_LO,%ebx,%ebx
movl %ebx,mval_l_m0(%esi)
jmp l63
l66: pushl %esi
pushl $1
pushl %edi
pushl %esi
call add_mvals
addl $16,%esp
l63: popl %ebx
popl %esi
popl %edi
leave
addl $16,%esp # remove op_forloop arguments
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
ret
d: popl %ebx
popl %esi
popl %edi
leave
addl $12,%esp # remove term, step, indx; leave loop addr
ret
# op_forloop ENDP
# END

50
sr_i386/op_gettruth.s Normal file
View File

@ -0,0 +1,50 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_gettruth.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_gettruth
# PAGE +
.DATA
.extern dollar_truth
.extern literal_one
.extern literal_zero
.text
# PUBLIC op_gettruth
ENTRY op_gettruth
pushl %edi
pushl %esi
cmpl $0,dollar_truth
jne l1
leal literal_zero,%esi
jmp doit
l1: leal literal_one,%esi
doit: movl %edx,%edi
movl $mval_byte_len,%ecx
REP
movsb
popl %esi
popl %edi
ret
# op_gettruth ENDP
# END

42
sr_i386/op_iretmvad.s Normal file
View File

@ -0,0 +1,42 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_iretmvad.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_iretmvad
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_unwind
# PUBLIC op_iretmvad
ENTRY op_iretmvad
movl %edx,%ecx # save input parameter from putframe macro
putframe
addl $4,%esp
movl %ecx,%edx
pushl %edx
call op_unwind
popl %eax # return input parameter
getframe
ret
# op_iretmvad ENDP
# END

47
sr_i386/op_isformal.s Normal file
View File

@ -0,0 +1,47 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_isformal.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_isformal
# PAGE +
.DATA
.extern ERR_ACTLSTEXP
.extern frame_pointer
.text
.extern rts_error
# PUBLIC op_isformal
ENTRY op_isformal
movl frame_pointer,%edx
movw msf_typ_off(%edx),%ax
andw $~SFT_EXTFUN,msf_typ_off(%edx)
andw $SFT_EXTFUN,%ax
je l1
ret
l1: putframe
pushl ERR_ACTLSTEXP
pushl $1
call rts_error
addl $8,%esp
ret
# op_isformal ENDP
# END

41
sr_i386/op_linefetch.s Normal file
View File

@ -0,0 +1,41 @@
#################################################################
# #
# Copyright 2001, 2009 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_linefetch.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_linefetch
# PAGE +
.DATA
.extern frame_pointer
.text
.extern gtm_fetch
# PUBLIC op_linefetch
ENTRY op_linefetch
movl frame_pointer,%eax
popl msf_mpc_off(%eax)
call gtm_fetch
popl %eax
leal (%esp,%eax,4),%esp
movl frame_pointer,%eax
pushl msf_mpc_off(%eax)
ret
# op_linefetch ENDP
# END

35
sr_i386/op_linestart.s Normal file
View File

@ -0,0 +1,35 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_linestart.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_linestart
# PAGE +
.DATA
.extern frame_pointer
.text
# PUBLIC op_linestart
ENTRY op_linestart
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
ret
# op_linestart ENDP
# END

51
sr_i386/op_mprofcall.s Normal file
View File

@ -0,0 +1,51 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mprofcall.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofcallb
# PAGE +
.DATA
.extern frame_pointer
.text
.extern copy_stack_frame_sp
# PUBLIC op_mprofcallb
ENTRY op_mprofcallb
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx)
call copy_stack_frame_sp
ret
# op_callb ENDP
.sbttl op_mprofcallw, op_mprofcalll
# PUBLIC op_mprofcallw, op_mprofcalll
ENTRY op_mprofcalll
ENTRY op_mprofcallw
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx)
call copy_stack_frame_sp
ret
# op_mprofcalll ENDP
# END

58
sr_i386/op_mprofcallsp.s Normal file
View File

@ -0,0 +1,58 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mprofcallsp.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofcallsp
# PAGE +
.DATA
.extern dollar_truth
.extern frame_pointer
.text
.extern exfun_frame_push_dummy_frame
.extern push_tval
.sbttl op_mprofcallspb
# PUBLIC op_mprofcallspb
ENTRY op_mprofcallspb
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx) # store pc in MUMPS stack frame
doit: call exfun_frame_push_dummy_frame
pushl dollar_truth
call push_tval
addl $4,%esp
movl frame_pointer,%edx
movl msf_temps_ptr_off(%edx),%edi
ret
# op_mprofcallspb ENDP
.sbttl op_mprofcallspw, op_mprofcallspl
# PUBLIC op_mprofcallspw, op_mprofcallspl
ENTRY op_mprofcallspw
ENTRY op_mprofcallspl
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx) # store pc in MUMPS stack frame
jmp doit
# op_mprofcallspw ENDP
# END

121
sr_i386/op_mprofexfun.s Normal file
View File

@ -0,0 +1,121 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mprofexfun.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofexfun
# PAGE +
# call op_mprofexfun with the following stack:
#
# return PC
# ret_value address
# mask
# actualcnt
# actual1 address
# actual2 address
# ...
.DATA
.extern ERR_GTMCHECK
.extern dollar_truth
.extern frame_pointer
.text
.extern exfun_frame_sp
.extern push_parm
.extern rts_error
JMP_Jb = 0x0eb
JMP_Jv = 0x0e9
actual1 = 20
act_cnt = 16
mask_arg = 12
ret_val = 8
rtn_pc = 4
sav_esi = -4
sav_ebx = -8
sav_msf = -12
# PUBLIC op_mprofexfun
ENTRY op_mprofexfun
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
leal sav_msf(%ebp),%esp # establish space for locals
movl act_cnt(%ebp),%eax
addl $3,%eax
negl %eax
leal (%esp,%eax,4),%esp # establish space for temps
movl frame_pointer,%edx
movl rtn_pc(%ebp),%eax
cmpb $JMP_Jv,(%eax)
je long
cmpb $JMP_Jb,(%eax)
je byte_off
error: pushl ERR_GTMCHECK
pushl $1
call rts_error
addl $8,%esp
jmp retlab
byte_off:
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx)
jmp cont
long: movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx)
cont: call exfun_frame_sp
movl frame_pointer,%edx
movl msf_old_frame_off(%edx),%eax
movl %eax,frame_pointer
movl %edx,sav_msf(%ebp)
leal ret_val(%ebp),%esi
movl %esp,%edi
movl act_cnt(%ebp),%eax
movl %eax,%ecx
addl $3,%ecx
REP
movsl
movl dollar_truth,%ecx
andl $1,%ecx
pushl %ecx # push $T
addl $4,%eax
pushl %eax # push total count
call push_parm # push_parm ($T, ret_value, mask, argc [,arg1, arg2, ...]);
done: movl sav_msf(%ebp),%eax
movl %eax,frame_pointer
orw $SFT_EXTFUN,msf_typ_off(%eax)
movl msf_temps_ptr_off(%eax),%edi
retlab: leal sav_ebx(%ebp),%esp
movl rtn_pc(%ebp),%edx
movl act_cnt(%ebp),%eax
addl $4,%eax
popl %ebx
popl %esi
popl %ebp
leal (%esp,%eax,4),%esp
pushl %edx
ret
# op_mprofexfun ENDP
# END

83
sr_i386/op_mprofextcall.s Normal file
View File

@ -0,0 +1,83 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mprofextcall.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofextcall
# PAGE +
.DATA
.extern ERR_GTMCHECK
.extern ERR_LABELUNKNOWN
.extern frame_pointer
.text
.extern auto_zlink
.extern new_stack_frame_sp
.extern rts_error
# PUBLIC op_mprofextcall
ENTRY op_mprofextcall
putframe
addl $4,%esp
popl %edx
popl %eax
cmpl $0,%eax
je l2
l1: movl (%eax),%eax
addl mrt_curr_ptr(%edx),%eax
addl %edx,%eax
pushl %eax
pushl $0
pushl %edx
call new_stack_frame_sp
addl $12,%esp
getframe
ret
l2: cmpl $0,%edx
jne l4
subl $4,%esp
pushl %esp
movl frame_pointer,%eax
pushl msf_mpc_off(%eax)
call auto_zlink
addl $8,%esp
cmpl $0,%eax
je l3
movl %eax,%edx
popl %eax
cmpl $0,%eax
jne l1
l3: addl $4,%esp
pushl ERR_GTMCHECK
pushl $1
call rts_error
pushl $1 # in original m68020 code ??
addl $8,%esp
getframe
ret
l4: pushl ERR_LABELUNKNOWN
pushl $1
call rts_error
addl $8,%esp
getframe
ret
# op_mprofextcall ENDP
# END

158
sr_i386/op_mprofextexfun.s Normal file
View File

@ -0,0 +1,158 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mprofextexfun.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofextexfun
# PAGE +
# call op_mprofextexfun with the following stack:
#
# return PC
# routine
# label
# ret_value address
# mask
# actualcnt
# actual1 address
# actual2 address
# ...
.DATA
.extern ERR_FMLLSTMISSING
.extern ERR_GTMCHECK
.extern ERR_LABELUNKNOWN
.extern dollar_truth
.extern frame_pointer
.text
.extern auto_zlink
.extern new_stack_frame_sp
.extern push_parm
.extern rts_error
Grp5_Prefix = 0x0ff # escape for CALL_Ev opcode
CALL_Ev = 0x010 # CALL_Ev part of ModR/M byte
reg_opcode_mask = 0x038
ISFORMAL = 0x0244 # xf_isformal*4
actual1 = 24
act_cnt = 20
mask_arg = 16
ret_val = 12
label_arg = 8
routine = 4
sav_ebx = -4
sav_msf = -8
# PUBLIC op_mprofextexfun
ENTRY op_mprofextexfun
putframe
addl $4,%esp # burn return PC
pushl %ebp
movl %esp,%ebp
pushl %ebx
leal sav_msf(%ebp),%esp # establish space for locals
movl act_cnt(%ebp),%eax
addl $3,%eax
negl %eax
leal (%esp,%eax,4),%esp # add space for temps
movl routine(%ebp),%edx
movl label_arg(%ebp),%eax
cmpl $0,%eax
je l3
l1: movl (%eax),%ebx
addl mrt_curr_ptr(%edx),%ebx
addl %edx,%ebx
cmpb $Grp5_Prefix,0(%ebx)
jne l6
movb 1(%ebx),%cl
andb $reg_opcode_mask,%cl
cmpb $CALL_Ev,%cl
jne l6
cmpl $ISFORMAL,2(%ebx)
jne l6
pushl %ebx
pushl $0
pushl %edx
call new_stack_frame_sp
addl $12,%esp
movl frame_pointer,%edx
movl msf_old_frame_off(%edx),%eax
movl %eax,frame_pointer
movl %edx,sav_msf(%ebp)
leal ret_val(%ebp),%esi
movl %esp,%edi
movl act_cnt(%ebp),%eax
movl %eax,%ecx
addl $3,%ecx # include: A(ret_value), mask, argc
REP
movsl
movl dollar_truth,%ecx
andl $1,%ecx
pushl %ecx
addl $4,%eax # include: $T(just pushed) plus other 3
pushl %eax # push total count
call push_parm # push_parm ($T, ret_value, mask, argc [,arg1, arg2, ...]);
movl sav_msf(%ebp),%eax
movl %eax,frame_pointer
orw $SFT_EXTFUN,msf_typ_off(%eax)
retlab: leal sav_ebx(%ebp),%esp
movl act_cnt(%ebp),%eax
addl $5,%eax
popl %ebx
popl %ebp
leal (%esp,%eax,4),%esp
getframe
ret
l3: cmpl $0,%edx
jne l5
subl $4,%esp
movl %esp,%eax
pushl %eax
movl frame_pointer,%edx
pushl msf_mpc_off(%edx)
call auto_zlink
addl $8,%esp
cmpl $0,%eax
je l4
movl %eax,%edx
popl %eax
cmpl $0,%eax
jne l1
l4: pushl ERR_GTMCHECK
pushl $1
call rts_error
jmp retlab
l5: pushl ERR_LABELUNKNOWN
pushl $1
call rts_error
jmp retlab
l6: pushl ERR_FMLLSTMISSING
pushl $1
call rts_error
jmp retlab
# op_mprofextexfun ENDP
# END

38
sr_i386/op_mprofforchk1.s Normal file
View File

@ -0,0 +1,38 @@
#################################################################
# #
# Copyright 2011 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
.title op_mprofforchk1.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofforchk1
# Called with the stack contents:
# call return
.DATA
.text
.extern forchkhandler
# PUBLIC op_mprofforchk1
ENTRY op_mprofforchk1
pushl 0(%esp) # throw the current return address on as an arg
call forchkhandler
addl $4, %esp
ret
# op_mprofforchk1 ENDP
# END

View File

@ -0,0 +1,53 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mprofforlcldo.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mprofforlcldo
# PAGE +
.DATA
.extern frame_pointer
.text
.extern exfun_frame_push_dummy_frame
.sbttl op_mprofforlcldob
# PUBLIC op_mprofforlcldob
ENTRY op_mprofforlcldob
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $2,msf_mpc_off(%edx) # store pc in MUMPS stack frame
doit: call exfun_frame_push_dummy_frame
movl frame_pointer,%edx
movl msf_temps_ptr_off(%edx),%edi
ret
# op_mprofforlcldob ENDP
.sbttl op_mprofforlcldow, op_mprofforlcldol
# PUBLIC op_mprofforlcldow, op_mprofforlcldol
ENTRY op_mprofforlcldol
ENTRY op_mprofforlcldow
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
addl $5,msf_mpc_off(%edx) # store pc in MUMPS stack frame
jmp doit
# op_mprofforlcldol ENDP
# END

View File

@ -0,0 +1,45 @@
#################################################################
# #
# Copyright 2001, 2011 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mproflinefetch.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mproflinefetch
# PAGE +
.DATA
.extern frame_pointer
.text
.extern gtm_fetch
.extern stack_leak_check
.extern pcurrpos
# PUBLIC op_mproflinefetch
ENTRY op_mproflinefetch
movl frame_pointer,%eax
popl msf_mpc_off(%eax)
call gtm_fetch
call pcurrpos
popl %eax # popping generated code args off stack before leak check
leal (%esp,%eax,4),%esp
call stack_leak_check
movl frame_pointer,%eax
pushl msf_mpc_off(%eax)
ret
# op_mproflinefetch ENDP
# END

View File

@ -0,0 +1,38 @@
#################################################################
# #
# Copyright 2001, 2011 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_mproflinestart.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_mproflinestart
# PAGE +
.DATA
.extern frame_pointer
.text
.extern pcurrpos
# PUBLIC op_mproflinestart
ENTRY op_mproflinestart
movl frame_pointer,%edx
movl (%esp),%eax
movl %eax,msf_mpc_off(%edx)
call pcurrpos
ret
# op_mproflinestart ENDP
# END

64
sr_i386/op_neg.s Normal file
View File

@ -0,0 +1,64 @@
#################################################################
# #
# Copyright 2001, 2008 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_neg.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_neg
# PAGE +
.text
#
# op_neg ( mval *u, mval *v ) : u = -v
#
# edx - source mval = &v
# eax - destination mval = &u
.extern s2n
.extern underr
# PUBLIC op_neg
ENTRY op_neg
pushl %eax
mv_force_defined %edx, isdefined
popl %eax
mv_if_number %edx, numer
pushl %eax
pushl %edx
call s2n
popl %edx
popl %eax
numer: mv_if_notint %edx, float
movw $mval_m_int,mval_w_mvtype(%eax)
movl mval_l_m1(%edx),%edx
negl %edx
movl %edx,mval_l_m1(%eax)
ret
float: pushl %ebx # need a temp register
movw $mval_m_nm,mval_w_mvtype(%eax)
movb mval_b_exp(%edx),%bl
xorb $mval_esign_mask,%bl # flip the sign bit
movb %bl,mval_b_exp(%eax)
movl mval_l_m0(%edx),%ebx
movl %ebx,mval_l_m0(%eax)
movl mval_l_m1(%edx),%ebx
movl %ebx,mval_l_m1(%eax)
popl %ebx
ret
# op_neg ENDP
#END

44
sr_i386/op_numcmp.s Normal file
View File

@ -0,0 +1,44 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_numcmp.s
.sbttl op_numcmp
# .386
# .MODEL FLAT, C
.include "linkage.si"
# op_numcmp calls numcmp to compare two mvals
#
# entry:
# eax mval *u
# edx mval *v
#
# exit:
# condition codes set according to value of
# numcmp (u, v)
.text
.extern numcmp
# PUBLIC op_numcmp
ENTRY op_numcmp
pushl %edx
pushl %eax
call numcmp
addl $8,%esp # restore stack
cmpl $0,%eax # set flags according to result from numcmp
ret
# op_numcmp ENDP
# END

50
sr_i386/op_pattern.s Normal file
View File

@ -0,0 +1,50 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_pattern.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_pattern
# PAGE +
.text
.extern do_patfixed
.extern do_pattern
# PUBLIC op_pattern
ENTRY op_pattern
pushl %edx
pushl %eax
movl mval_a_straddr(%edx),%eax
#
# This is an array of unaligned ints. If the first word is zero, then call do_pattern
# instead of do_patfixed. Only the low order byte is significant and so it is the only
# one we need to test. We would do this in assembly because (1) we need the assmembly
# routine anyway to save the return value into $TEST and (2) it saves an extra level of
# call linkage at the C level to do the decision here.
#
cmpb $0,(%eax) # little endian compare of low order byte
je l1
call do_patfixed
jmp l2
l1: call do_pattern
l2: addl $8,%esp
cmpl $0,%eax
ret
# op_pattern ENDP
# END

39
sr_i386/op_restartpc.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_restartpc.s
.sbttl op_restartpc
# .386
# .MODEL FLAT, C
.include "linkage.si"
.include "g_msf.si"
.DATA
.extern restart_pc
.extern restart_ctxt
.extern frame_pointer
.text
# PUBLIC op_restartpc
ENTRY op_restartpc
movl (%esp),%eax
subl $6,%eax
movl %eax,restart_pc
movl frame_pointer,%eax
movl msf_ctxt_off(%eax),%edx
movl %edx,restart_ctxt
ret
# op_restartpc ENDP
# END

39
sr_i386/op_retarg.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2010 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_retarg.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_retarg
# PAGE +
.DATA
.extern frame_pointer
.text
.extern unw_retarg
# PUBLIC op_retarg
ENTRY op_retarg
movl %edx,(%esp) # Reuse return point on stack (not needed)
pushl %eax
call unw_retarg
addl $8,%esp
getframe
ret
# op_retarg ENDP
# END

51
sr_i386/op_sorts_after.s Normal file
View File

@ -0,0 +1,51 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_sorts_after.s
.sbttl op_sorts_after
# .386
# .MODEL FLAT, C
.include "linkage.si"
# op_sorts_after.s 80386
#
# op_sorts_after(mval *mval1, *mval2)
# Call sorts_after() to determine whether mval1 comes after mval2
# in sorting order. Use alternate local collation sequence if
# present.
#
# entry:
# eax mval *mval1
# edx mval *mval2
#
# Sets condition flags and returns in eax:
## 1 mval1 > mval2
## 0 mval1 = mval2
## -1 mval1 < mval2
#
.text
.extern sorts_after
# PUBLIC op_sorts_after
ENTRY op_sorts_after
pushl %edx
pushl %eax
call sorts_after
addl $8,%esp # restore stack
cmpl $0,%eax # set flags according to result from
ret # sorts_after.
# op_sorts_after ENDP
# END

48
sr_i386/op_startintrrpt.s Normal file
View File

@ -0,0 +1,48 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_startintrrpt.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_startintrrpt
# PAGE +
.DATA
.extern frame_pointer
.extern neterr_pending
.text
.extern gvcmz_neterr
.extern async_action
.extern outofband_clear
# PUBLIC op_startintrrpt
ENTRY op_startintrrpt
putframe
cmpb $0,neterr_pending
je l1
call outofband_clear
pushl $0
call gvcmz_neterr
addl $4,%esp
l1: pushl $1
call async_action
addl $8,%esp # 4 bytes to burn return pc, 4 more to remove arg to async_action
getframe
ret
# op_startintrrpt ENDP
# END

57
sr_i386/op_sto.s Normal file
View File

@ -0,0 +1,57 @@
#################################################################
# #
# Copyright 2001, 2009 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_sto.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "mval_def.si"
.sbttl op_sto
# PAGE +
.DATA
.extern literal_null
.extern undef_inhibit
.text
.extern underr
# PUBLIC op_sto
ENTRY op_sto
mv_if_notdefined %edx, b
a: pushl %edi
pushl %esi
movl $mval_byte_len,%ecx
movl %edx,%esi
movl %eax,%edi
REP
movsb
andw $~mval_m_aliascont, mval_w_mvtype(%eax) # Don't propagate alias container flag
popl %esi
popl %edi
ret
b: cmpb $0,undef_inhibit
je clab
leal literal_null,%edx
jmp a
clab: pushl %edx
call underr
addl $4,%esp
ret
# op_sto ENDP
# END

37
sr_i386/op_zhelp.s Normal file
View File

@ -0,0 +1,37 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_zhelp.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_zhelp_xfr
# PUBLIC op_zhelp
ENTRY op_zhelp
movl frame_pointer,%edx
popl msf_mpc_off(%edx)
call op_zhelp_xfr
getframe
ret
# op_zhelp ENDP
# END

38
sr_i386/opp_break.s Normal file
View File

@ -0,0 +1,38 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_break.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_break
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_break
# PUBLIC opp_break
ENTRY opp_break
putframe
addl $4,%esp
call op_break
getframe
ret
# opp_break ENDP
# END

39
sr_i386/opp_commarg.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_commarg.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_commarg
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_commarg
# PUBLIC opp_commarg
ENTRY opp_commarg
putframe
addl $4,%esp
call op_commarg
addl $8,%esp
getframe
ret
# opp_commarg ENDP
# END

38
sr_i386/opp_dmode.s Normal file
View File

@ -0,0 +1,38 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_dmode.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_dmode
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_dmode
# PUBLIC opp_dmode
ENTRY opp_dmode
putframe
addl $4,%esp
call op_dmode
getframe
ret
# opp_dmode ENDP
# END

38
sr_i386/opp_hardret.s Normal file
View File

@ -0,0 +1,38 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_hardret.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_hardret
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_hardret
# PUBLIC opp_hardret
ENTRY opp_hardret
putframe
addl $4,%esp
call op_hardret
getframe
ret
# opp_hardret ENDP
# END

39
sr_i386/opp_inddevparms.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_inddevparms.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_inddevparms
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_inddevparms
# PUBLIC opp_inddevparms
ENTRY opp_inddevparms # /* PROC */
putframe
addl $4,%esp
call op_inddevparms
addl $12,%esp
getframe
ret
# opp_inddevparms ENDP
# END

39
sr_i386/opp_indfnname.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indfnname.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indfnname
# PAGE +
.DATA
.extern frame_pointer
.text
.extern op_indfnname
# PUBLIC opp_indfnname
ENTRY opp_indfnname
putframe
addl $4,%esp
call op_indfnname
addl $12,%esp
getframe
ret
# opp_indfnname ENDP
# END

39
sr_i386/opp_indfun.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indfun.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indfun
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indfun
# PUBLIC opp_indfun
ENTRY opp_indfun # /* PROC */
putframe
addl $4,%esp
call op_indfun
addl $12,%esp
getframe
ret
# opp_indfun ENDP
# END

39
sr_i386/opp_indget.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indget.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indget
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indget
# PUBLIC opp_indget
ENTRY opp_indget # /* PROC */
putframe
addl $4,%esp
call op_indget
addl $12,%esp
getframe
ret
# opp_indget ENDP
# END

39
sr_i386/opp_indglvn.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indglvn.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indglvn
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indglvn
# PUBLIC opp_indglvn
ENTRY opp_indglvn # /* PROC */
putframe
addl $4,%esp
call op_indglvn
addl $8,%esp
getframe
ret
# opp_indglvn ENDP
# END

39
sr_i386/opp_indincr.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2004 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indincr.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indincr
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indincr
# PUBLIC opp_indincr
ENTRY opp_indincr # /* PROC */
putframe
addl $4,%esp
call op_indincr
addl $12,%esp
getframe
ret
# opp_indincr ENDP
# END

39
sr_i386/opp_indlvadr.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indlvadr.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indlvadr
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indlvadr
# PUBLIC opp_indlvadr
ENTRY opp_indlvadr # /* PROC */
putframe
addl $4,%esp
call op_indlvadr
addl $4,%esp
getframe
ret
# opp_indlvadr ENDP
# END

39
sr_i386/opp_indlvarg.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indlvarg.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indlvarg
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indlvarg
# PUBLIC opp_indlvarg
ENTRY opp_indlvarg # /* PROC */
putframe
addl $4,%esp
call op_indlvarg
addl $8,%esp
getframe
ret
# opp_indlvarg ENDP
# END

39
sr_i386/opp_indlvnamadr.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indlvnamadr.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indlvnamadr
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indlvnamadr
# PUBLIC opp_indlvnamadr
ENTRY opp_indlvnamadr # /* PROC */
putframe
addl $4,%esp
call op_indlvnamadr
addl $4,%esp
getframe
ret
# opp_indlvnamadr ENDP
# END

39
sr_i386/opp_indmerge.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indmerge.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indmerge
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indmerge
# PUBLIC opp_indmerge
ENTRY opp_indmerge # /* PROC */
putframe
addl $4,%esp
call op_indmerge
addl $8,%esp
getframe
ret
# opp_indmerge ENDP
# END

39
sr_i386/opp_indo2.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indo2.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indo2
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indo2
# PUBLIC opp_indo2
ENTRY opp_indo2 # /* PROC */
putframe
addl $4,%esp
call op_indo2
addl $12,%esp
getframe
ret
# opp_indo2 ENDP
# END

39
sr_i386/opp_indpat.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indpat.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indpat
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indpat
# PUBLIC opp_indpat
ENTRY opp_indpat # /* PROC */
putframe
addl $4,%esp
call op_indpat
addl $8,%esp
getframe
ret
# opp_indpat ENDP
# END

39
sr_i386/opp_indrzshow.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indrzshow.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indrzshow
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indrzshow
# PUBLIC opp_indrzshow
ENTRY opp_indrzshow # /* PROC */
putframe
addl $4,%esp
call op_indrzshow
addl $8,%esp
getframe
ret
# opp_indrzshow ENDP
# END

39
sr_i386/opp_indset.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indset.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indset
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indset
# PUBLIC opp_indset
ENTRY opp_indset # /* PROC */
putframe
addl $4,%esp
call op_indset
addl $8,%esp
getframe
ret
# opp_indset ENDP
# END

39
sr_i386/opp_indtext.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_indtext.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_indtext
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_indtext
# PUBLIC opp_indtext
ENTRY opp_indtext # /* PROC */
putframe
addl $4,%esp # burn return PC
call op_indtext
addl $16,%esp # remove args from stack
getframe
ret
# opp_indtext ENDP
# END

39
sr_i386/opp_iretmval.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_iretmval.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_iretmval
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_iretmval
# PUBLIC opp_iretmval
ENTRY opp_iretmval # /* PROC */
putframe
addl $4,%esp
call op_iretmval
addl $4,%esp
getframe
ret
# opp_iretmval ENDP
# END

View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_newintrinsic.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_newintrinsic
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_newintrinsic
# PUBLIC opp_newintrinsic
ENTRY opp_newintrinsic # /* PROC */
putframe
addl $4,%esp
call op_newintrinsic
addl $4,%esp
getframe
ret
# opp_newintrinsic ENDP
# END

39
sr_i386/opp_newvar.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_newvar.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_newvar
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_newvar
# PUBLIC opp_newvar
ENTRY opp_newvar # /* PROC */
putframe
addl $4,%esp
call op_newvar
addl $4,%esp
getframe
ret
# opp_newvar ENDP
# END

37
sr_i386/opp_ret.s Normal file
View File

@ -0,0 +1,37 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_ret.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_ret
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_unwind
# PUBLIC opp_ret
ENTRY opp_ret # /* PROC */
addl $4,%esp
call op_unwind
getframe
ret
# opp_ret ENDP
#END

39
sr_i386/opp_rterror.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_rterror.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_rterror
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_rterror
# PUBLIC opp_rterror
ENTRY opp_rterror # /* PROC */
putframe
addl $4,%esp # burn return PC
call op_rterror
addl $8,%esp # remove args from stack
getframe
ret
# opp_rterror ENDP
# END

39
sr_i386/opp_svput.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_svput.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_svput
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_svput
# PUBLIC opp_svput
ENTRY opp_svput # /* PROC */
putframe
addl $4,%esp # burn return PC
call op_svput
addl $8,%esp # remove args from stack
getframe
ret
# opp_svput ENDP
# END

38
sr_i386/opp_tcommit.s Normal file
View File

@ -0,0 +1,38 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_tcommit.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_tcommit
# PAGE +
.DATA
.extern frame_pointer # /* :DWORD */
.text
.extern op_tcommit
# PUBLIC opp_tcommit
ENTRY opp_tcommit # /* PROC */
putframe
addl $4,%esp
call op_tcommit
getframe
ret
# opp_tcommit ENDP
# END

39
sr_i386/opp_trestart.s Normal file
View File

@ -0,0 +1,39 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title opp_trestart.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl opp_trestart
# PAGE +
.DATA
.extern frame_pointer # /*:DWORD */
.text
.extern op_trestart
# PUBLIC opp_trestart
ENTRY opp_trestart # /* PROC */
putframe
addl $4,%esp
call op_trestart
addl $4,%esp
getframe
ret
# opp_trestart ENDP
# END

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