initial commit
This commit is contained in:
commit
9862d71cfb
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build*/
|
674
LICENSE
Normal file
674
LICENSE
Normal file
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is 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. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
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.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
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 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. Use with the GNU Affero General Public License.
|
||||
|
||||
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 Affero 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 special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 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 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 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 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
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 GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
12
e2k-linux.txt
Normal file
12
e2k-linux.txt
Normal file
@ -0,0 +1,12 @@
|
||||
[binaries]
|
||||
c = 'e2k-linux-cc'
|
||||
cpp = 'e2k-linux-c++'
|
||||
ar = 'e2k-linux-ar'
|
||||
strip = 'e2k-linux-strip'
|
||||
exe_wrapper = 'qemu-e2k'
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'e2k'
|
||||
cpu = 'e8c'
|
||||
endian = 'little'
|
6
meson.build
Normal file
6
meson.build
Normal file
@ -0,0 +1,6 @@
|
||||
project('tests', 'c',
|
||||
version : '0.0.1',
|
||||
license : 'GPL-3.0-only',
|
||||
license_files : 'LICENSE',
|
||||
)
|
||||
subdir('tests')
|
25
tests/asm/aau/mova-fmt.S
Normal file
25
tests/asm/aau/mova-fmt.S
Normal file
@ -0,0 +1,25 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
addd,0 0, arr, %r0
|
||||
ldisp %ctpr2, aau
|
||||
}
|
||||
aaurwd,2 %r0, %aad0
|
||||
bap
|
||||
nop 7
|
||||
nop 7
|
||||
OP,0 area=0, ind=0, am=1, be=0, %r0
|
||||
addd,0 %r0, 0, %r0
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
aau:
|
||||
{
|
||||
fapb ct=1, dcd=0, fmt=FMT, mrng=8, d=0, incr=0, ind=0, asz=1, abs=0, disp=0
|
||||
}
|
||||
|
||||
.section ".rodata"
|
||||
.balign 8
|
||||
arr:
|
||||
.quad 0
|
26
tests/asm/aau/mova-unaligned.S
Normal file
26
tests/asm/aau/mova-unaligned.S
Normal file
@ -0,0 +1,26 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
addd,0 0, arr, %r0
|
||||
ldisp %ctpr2, aau
|
||||
}
|
||||
aaurwd,2 %r0, %aad0
|
||||
bap
|
||||
nop 7
|
||||
nop 7
|
||||
OP,0 area=0, ind=0, am=1, be=0, %r0
|
||||
addd,0 %r0, 0, %r0
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
aau:
|
||||
{
|
||||
fapb ct=1, dcd=0, fmt=FMT, mrng=8, d=0, incr=0, ind=0, asz=1, abs=0, disp=0
|
||||
}
|
||||
|
||||
.section ".rodata"
|
||||
.balign 2
|
||||
.byte 0
|
||||
arr:
|
||||
.quad 0
|
91
tests/asm/aau/mova.S
Normal file
91
tests/asm/aau/mova.S
Normal file
@ -0,0 +1,91 @@
|
||||
#include "test_start.S"
|
||||
|
||||
#define ARR glue(arr_, OP)
|
||||
|
||||
#ifndef FMT
|
||||
# define FMT 4
|
||||
#endif
|
||||
|
||||
#ifndef MRNG
|
||||
# define MRNG 8
|
||||
#endif
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
rwd,0 (1UL << 37) | 8, %lsr
|
||||
ldisp %ctpr2, aau
|
||||
}
|
||||
{
|
||||
addd,0 0, ARR, %r0
|
||||
disp %ctpr1, 0f
|
||||
}
|
||||
aaurwd,2 %r0, %aad0
|
||||
{
|
||||
bap
|
||||
nop 7
|
||||
}
|
||||
{
|
||||
addd,0 0, 0, %r0
|
||||
nop 7
|
||||
}
|
||||
0:
|
||||
OP,0 area=0, ind=0, am=1, be=0, %r1
|
||||
{
|
||||
alc alcf=0, alct=1
|
||||
addd,0 %r0, %r1, %r0
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
}
|
||||
eap
|
||||
assert_eq_i64(%r0, 28)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
aau:
|
||||
{
|
||||
fapb ct=1, dcd=0, fmt=FMT, mrng=MRNG, d=0, incr=0, ind=0, asz=1, abs=0, disp=0
|
||||
}
|
||||
|
||||
.section ".rodata"
|
||||
|
||||
arr_movab:
|
||||
.byte 0
|
||||
.byte 1
|
||||
.byte 2
|
||||
.byte 3
|
||||
.byte 4
|
||||
.byte 5
|
||||
.byte 6
|
||||
.byte 7
|
||||
|
||||
.balign 2
|
||||
arr_movah:
|
||||
.hword 0
|
||||
.hword 1
|
||||
.hword 2
|
||||
.hword 3
|
||||
.hword 4
|
||||
.hword 5
|
||||
.hword 6
|
||||
.hword 7
|
||||
|
||||
.balign 4
|
||||
arr_movaw:
|
||||
.word 0
|
||||
.word 1
|
||||
.word 2
|
||||
.word 3
|
||||
.word 4
|
||||
.word 5
|
||||
.word 6
|
||||
.word 7
|
||||
|
||||
.balign 8
|
||||
arr_movad:
|
||||
.quad 0
|
||||
.quad 1
|
||||
.quad 2
|
||||
.quad 3
|
||||
.quad 4
|
||||
.quad 5
|
||||
.quad 6
|
||||
.quad 7
|
106
tests/asm/aau/staa-1.S
Normal file
106
tests/asm/aau/staa-1.S
Normal file
@ -0,0 +1,106 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr1, 0f
|
||||
addd,0 0, 0, %r0
|
||||
}
|
||||
{
|
||||
addd,0 0, out8, %r4
|
||||
addd,1 0, out16, %r5
|
||||
aaurwd,2 %r0, %aasti0
|
||||
aaurwd,5 %r0, %aasti1
|
||||
}
|
||||
{
|
||||
addd,0 0, out32, %r6
|
||||
addd,1 0, out64, %r7
|
||||
aaurwd,2 %r0, %aasti2
|
||||
aaurwd,5 %r0, %aasti3
|
||||
}
|
||||
{
|
||||
aaurwd,2 %r4, %aad0
|
||||
aaurwd,5 %r5, %aad1
|
||||
}
|
||||
{
|
||||
aaurwd,2 %r6, %aad2
|
||||
aaurwd,5 %r7, %aad3
|
||||
}
|
||||
rwd,0 ((1UL << 37) | 8), %lsr
|
||||
0:
|
||||
{
|
||||
staab,2 %r0, %aad0 [ %aasti0 ]
|
||||
incr,2 %aaincr0
|
||||
staah,5 %r0, %aad1 [ %aasti1 ]
|
||||
incr,5 %aaincr0
|
||||
}
|
||||
{
|
||||
addd,0 %r0, 1, %r0
|
||||
staaw,2 %r0, %aad2 [ %aasti2 ]
|
||||
incr,2 %aaincr0
|
||||
staad,5 %r0, %aad3 [ %aasti3 ]
|
||||
incr,5 %aaincr0
|
||||
alc alcf=1, alct=1
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
}
|
||||
|
||||
assert_eq_i64(%r0, 8)
|
||||
|
||||
ldd,0 [ out8 ], %r0
|
||||
assert_eq_i64(%r0, 0x0706050403020100)
|
||||
|
||||
{
|
||||
ldd,0 [ out16 + 0x00 ], %r0
|
||||
ldd,2 [ out16 + 0x08 ], %r1
|
||||
}
|
||||
assert_eq_i64(%r0, 0x0003000200010000)
|
||||
assert_eq_i64(%r1, 0x0007000600050004)
|
||||
|
||||
{
|
||||
ldd,0 [ out32 + 0x00 ], %r0
|
||||
ldd,2 [ out32 + 0x08 ], %r1
|
||||
}
|
||||
{
|
||||
ldd,0 [ out32 + 0x10 ], %r2
|
||||
ldd,2 [ out32 + 0x18 ], %r3
|
||||
}
|
||||
assert_eq_i64(%r0, 0x0000000100000000)
|
||||
assert_eq_i64(%r1, 0x0000000300000002)
|
||||
assert_eq_i64(%r2, 0x0000000500000004)
|
||||
assert_eq_i64(%r3, 0x0000000700000006)
|
||||
|
||||
{
|
||||
ldd,0 [ out64 + 0x00 ], %r0
|
||||
ldd,2 [ out64 + 0x08 ], %r1
|
||||
}
|
||||
{
|
||||
ldd,0 [ out64 + 0x10 ], %r2
|
||||
ldd,2 [ out64 + 0x18 ], %r3
|
||||
}
|
||||
{
|
||||
ldd,0 [ out64 + 0x20 ], %r4
|
||||
ldd,2 [ out64 + 0x28 ], %r5
|
||||
}
|
||||
{
|
||||
ldd,0 [ out64 + 0x30 ], %r6
|
||||
ldd,2 [ out64 + 0x38 ], %r7
|
||||
}
|
||||
assert_eq_i64(%r0, 0x0000000000000000)
|
||||
assert_eq_i64(%r1, 0x0000000000000001)
|
||||
assert_eq_i64(%r2, 0x0000000000000002)
|
||||
assert_eq_i64(%r3, 0x0000000000000003)
|
||||
assert_eq_i64(%r4, 0x0000000000000004)
|
||||
assert_eq_i64(%r5, 0x0000000000000005)
|
||||
assert_eq_i64(%r6, 0x0000000000000006)
|
||||
assert_eq_i64(%r7, 0x0000000000000007)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.section ".data"
|
||||
out8:
|
||||
.fill 8, 1, -1
|
||||
out16:
|
||||
.fill 8, 2, -1
|
||||
out32:
|
||||
.fill 8, 4, -1
|
||||
out64:
|
||||
.fill 8, 8, -1
|
2
tests/asm/base/exit-0.S
Normal file
2
tests/asm/base/exit-0.S
Normal file
@ -0,0 +1,2 @@
|
||||
#include "test_start.S"
|
||||
#include "test_end.S"
|
3
tests/asm/base/exit-1.S
Normal file
3
tests/asm/base/exit-1.S
Normal file
@ -0,0 +1,3 @@
|
||||
#include "test_start.S"
|
||||
sys_exit 1
|
||||
#include "test_end.S"
|
31
tests/asm/base/same-reg-output-1.S
Normal file
31
tests/asm/base/same-reg-output-1.S
Normal file
@ -0,0 +1,31 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
addd,0 0, 0, %g16
|
||||
addd,1 0, 1, %g16
|
||||
addd,2 0, 2, %g16
|
||||
addd,3 0, 3, %g16
|
||||
addd,4 0, 4, %g16
|
||||
addd,5 0, 5, %g16
|
||||
}
|
||||
assert_eq_i64(%g16, 5)
|
||||
{
|
||||
ldb,0,sm 0, 0, %g16
|
||||
addd,1 0, 1, %g16
|
||||
addd,2 0, 2, %g16
|
||||
addd,3 0, 3, %g16
|
||||
addd,4 0, 4, %g16
|
||||
addd,5 0, 5, %g16
|
||||
}
|
||||
assert_eq_i64(%g16, 5)
|
||||
{
|
||||
addd,0 0, 0, %g16
|
||||
addd,1 0, 1, %g16
|
||||
addd,2 0, 2, %g16
|
||||
addd,3 0, 3, %g16
|
||||
addd,4 0, 4, %g16
|
||||
udivd,5 5, 1, %g16
|
||||
}
|
||||
assert_eq_i64(%g16, 5)
|
||||
|
||||
#include "test_end.S"
|
5
tests/asm/base/template.S
Normal file
5
tests/asm/base/template.S
Normal file
@ -0,0 +1,5 @@
|
||||
#include "test_start.S"
|
||||
|
||||
writeln("Test template")
|
||||
|
||||
#include "test_end.S"
|
25
tests/asm/ct/call-1.S
Normal file
25
tests/asm/ct/call-1.S
Normal file
@ -0,0 +1,25 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=16, nfx=1
|
||||
setbn rsz=7, rbs=8, rcur=0
|
||||
disp %ctpr1, 0f
|
||||
}
|
||||
{
|
||||
addd,0 0, 0xff, %b[0]
|
||||
addd,1 0, 16, %b[1]
|
||||
addd,2 0, 0, %b[2]
|
||||
call %ctpr1, wbs=8
|
||||
}
|
||||
assert_eq_i64(%b[0], 0xff)
|
||||
assert_eq_i64(%b[1], 0x10)
|
||||
assert_eq_i64(%b[2], 0xff0000)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
{
|
||||
shls,0,sm %r0, %r1, %r2
|
||||
return %ctpr3
|
||||
}
|
||||
ct %ctpr3
|
20
tests/asm/ct/call-invalidate-pregs-1.S
Normal file
20
tests/asm/ct/call-invalidate-pregs-1.S
Normal file
@ -0,0 +1,20 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
disp %ctpr1, 0f
|
||||
}
|
||||
{
|
||||
cmpedb,0 0, 0, %pred0
|
||||
call %ctpr1, wbs=4
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
{
|
||||
addd,0 0, 0, %r0 ? %pred0
|
||||
return %ctpr3
|
||||
}
|
||||
ct %ctpr3
|
21
tests/asm/ct/call-invalidate-pregs-2.S
Normal file
21
tests/asm/ct/call-invalidate-pregs-2.S
Normal file
@ -0,0 +1,21 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
disp %ctpr1, 0f
|
||||
}
|
||||
invalid64 %r0
|
||||
{
|
||||
cmpedb,0 0, %r0, %pred0
|
||||
call %ctpr1, wbs=4
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
{
|
||||
addd,0 0, 0, %r0 ? %pred0
|
||||
return %ctpr3
|
||||
}
|
||||
ct %ctpr3
|
14
tests/asm/ct/call-reset-ctpr-1.S
Normal file
14
tests/asm/ct/call-reset-ctpr-1.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr2, 1f
|
||||
}
|
||||
disp %ctpr1, 0f
|
||||
call %ctpr2, wbs=4
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
ct %ctpr1
|
14
tests/asm/ct/call-reset-ctpr-2.S
Normal file
14
tests/asm/ct/call-reset-ctpr-2.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr1, 1f
|
||||
}
|
||||
disp %ctpr2, 0f
|
||||
call %ctpr1, wbs=4
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
ct %ctpr2
|
14
tests/asm/ct/call-reset-ctpr-3.S
Normal file
14
tests/asm/ct/call-reset-ctpr-3.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr1, 1f
|
||||
}
|
||||
disp %ctpr3, 0f
|
||||
call %ctpr1, wbs=4
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
ct %ctpr3
|
24
tests/asm/ct/ct-1.S
Normal file
24
tests/asm/ct/ct-1.S
Normal file
@ -0,0 +1,24 @@
|
||||
#include "test_start.S"
|
||||
|
||||
disp %ctpr1, 1f
|
||||
disp %ctpr2, 2f
|
||||
disp %ctpr3, 3f
|
||||
ct %ctpr2
|
||||
1:
|
||||
{
|
||||
addd,0 %r0, 1, %r1
|
||||
ct %ctpr3
|
||||
}
|
||||
2:
|
||||
{
|
||||
addd,0 0, 0, %r0
|
||||
ct %ctpr1
|
||||
}
|
||||
3:
|
||||
addd,0 %r1, 1, %r2
|
||||
|
||||
assert_eq_i64(%r0, 0)
|
||||
assert_eq_i64(%r1, 1)
|
||||
assert_eq_i64(%r2, 2)
|
||||
|
||||
#include "test_end.S"
|
32
tests/asm/ct/ibranch-1.S
Normal file
32
tests/asm/ct/ibranch-1.S
Normal file
@ -0,0 +1,32 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
ibranch 3f
|
||||
}
|
||||
0:
|
||||
{
|
||||
addd,0 %r0, 1, %r1
|
||||
ibranch 2f
|
||||
}
|
||||
1:
|
||||
{
|
||||
addd,0 %r2, 1, %r3
|
||||
ibranch 4f
|
||||
}
|
||||
2:
|
||||
{
|
||||
addd,0 %r1, 1, %r2
|
||||
ibranch 1b
|
||||
}
|
||||
3:
|
||||
{
|
||||
addd,0 0, 0, %r0
|
||||
ibranch 0b
|
||||
}
|
||||
4:
|
||||
assert_eq_i64(%r0, 0)
|
||||
assert_eq_i64(%r1, 1)
|
||||
assert_eq_i64(%r2, 2)
|
||||
assert_eq_i64(%r3, 3)
|
||||
|
||||
#include "test_end.S"
|
16
tests/asm/ct/ret-reset-ctpr-1.S
Normal file
16
tests/asm/ct/ret-reset-ctpr-1.S
Normal file
@ -0,0 +1,16 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr3, 1f
|
||||
}
|
||||
call %ctpr3, wbs=4
|
||||
ct %ctpr1
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
return %ctpr3
|
||||
disp %ctpr1, 0b
|
||||
ct %ctpr3
|
16
tests/asm/ct/ret-reset-ctpr-2.S
Normal file
16
tests/asm/ct/ret-reset-ctpr-2.S
Normal file
@ -0,0 +1,16 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr3, 1f
|
||||
}
|
||||
call %ctpr3, wbs=4
|
||||
ct %ctpr2
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
return %ctpr3
|
||||
disp %ctpr2, 0b
|
||||
ct %ctpr3
|
14
tests/asm/ct/ret-reset-ctpr-3.S
Normal file
14
tests/asm/ct/ret-reset-ctpr-3.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr3, 1f
|
||||
}
|
||||
call %ctpr3, wbs=4
|
||||
ct %ctpr3
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
return %ctpr3
|
||||
ct %ctpr3
|
33
tests/asm/dam/dam-1.S
Normal file
33
tests/asm/dam/dam-1.S
Normal file
@ -0,0 +1,33 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=4, nfx=1
|
||||
{
|
||||
// Force page fault
|
||||
ldd,0,sm [ mem + 0 ], %empty
|
||||
ldd,2,sm [ mem + 8 ], %empty
|
||||
}
|
||||
{
|
||||
ldd,0,sm [ mem ], %r0, mas=0x4
|
||||
addd,1 0, 0, %r1
|
||||
}
|
||||
{
|
||||
std,2 %r1, [ mem + 8 ]
|
||||
ldd,5 [ mem ], %r0, mas=0x3
|
||||
|
||||
rbranch 1f
|
||||
}
|
||||
0:
|
||||
assert_eq_i64(%r0, -1)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
{
|
||||
addd,0 0, 0xdeadbeef, %r0
|
||||
ibranch 0b
|
||||
}
|
||||
|
||||
.data
|
||||
.balign 8
|
||||
mem:
|
||||
.fill 16, 1, -1
|
32
tests/asm/dam/dam-2.S
Normal file
32
tests/asm/dam/dam-2.S
Normal file
@ -0,0 +1,32 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=4, nfx=1
|
||||
{
|
||||
// Force page fault
|
||||
ldd,0,sm [ mem + 0 ], %empty
|
||||
}
|
||||
{
|
||||
ldd,0,sm [ mem ], %r0, mas=0x4
|
||||
addd,1 0, 0, %r1
|
||||
}
|
||||
{
|
||||
std,2 %r1, [ mem ]
|
||||
ldd,5 [ mem ], %r0, mas=0x3
|
||||
|
||||
rbranch 1f
|
||||
}
|
||||
0:
|
||||
assert_eq_i64(%r0, 0xdeadbeef)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
1:
|
||||
{
|
||||
addd,0 0, 0xdeadbeef, %r0
|
||||
ibranch 0b
|
||||
}
|
||||
|
||||
.data
|
||||
.balign 8
|
||||
mem:
|
||||
.fill 8, 1, -1
|
33
tests/asm/decode/ales25-1.S
Normal file
33
tests/asm/decode/ales25-1.S
Normal file
@ -0,0 +1,33 @@
|
||||
#include "test_start.S"
|
||||
|
||||
min_version 4
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
adds,0 0, 0x40000000, %r0 // 2.0f
|
||||
adds,1 0, 0x40400000, %r1 // 3.0f
|
||||
}
|
||||
fadds,2 %r0, %r1, %r2
|
||||
fadds,5 %r0, %r1, %r3
|
||||
{
|
||||
fadds,2 %r0, %r1, %r4
|
||||
fadds,5 %r0, %r1, %r5
|
||||
}
|
||||
{
|
||||
fadds,2 %r0, %r1, %r6
|
||||
fdivs,5 %r1, %r0, %r7
|
||||
}
|
||||
{
|
||||
puttagd,2 %r0, 0, %r8
|
||||
fadds,5 %r1, %r0, %r9
|
||||
}
|
||||
assert_eq_i32(%r2, 0x40A00000)
|
||||
assert_eq_i32(%r3, 0x40A00000)
|
||||
assert_eq_i32(%r4, 0x40A00000)
|
||||
assert_eq_i32(%r5, 0x40A00000)
|
||||
assert_eq_i32(%r6, 0x40A00000)
|
||||
assert_eq_i32(%r7, 0x3FC00000)
|
||||
assert_eq_i32(%r8, 0x40000000)
|
||||
assert_eq_i32(%r9, 0x40A00000)
|
||||
|
||||
#include "test_end.S"
|
46
tests/asm/decode/lit-1.S
Normal file
46
tests/asm/decode/lit-1.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=16, nfx=1
|
||||
addd,0 0, _f16s,_lts0lo 0x7fff, %r1
|
||||
addd,0 0, _f16s,_lts0hi 0x7fff, %r2
|
||||
addd,0 0, _f16s,_lts1lo 0x7fff, %r3
|
||||
addd,0 0, _f16s,_lts1hi 0x7fff, %r4
|
||||
addd,0 0, _f16s,_lts0lo 0xffff, %r5
|
||||
addd,0 0, _f16s,_lts0hi 0xffff, %r6
|
||||
addd,0 0, _f16s,_lts1lo 0xffff, %r7
|
||||
addd,0 0, _f16s,_lts1hi 0xffff, %r8
|
||||
addd,0 0, _f32s,_lts0 0x7fffffff, %r9
|
||||
addd,0 0, _f32s,_lts1 0x7fffffff, %r10
|
||||
addd,0 0, _f32s,_lts2 0x7fffffff, %r11
|
||||
addd,0 0, _f32s,_lts3 0x7fffffff, %r12
|
||||
addd,0 0, _f32s,_lts0 0xffffffff, %r13
|
||||
addd,0 0, _f32s,_lts1 0xffffffff, %r14
|
||||
addd,0 0, _f32s,_lts2 0xffffffff, %r15
|
||||
addd,0 0, _f32s,_lts3 0xffffffff, %r16
|
||||
addd,0 0, _f64,_lts0 0xffffffffffffffff, %r17
|
||||
addd,0 0, _f64,_lts1 0xffffffffffffffff, %r18
|
||||
addd,0 0, _f64,_lts2 0xffffffffffffffff, %r19
|
||||
addd,0 0, 0, %r20
|
||||
|
||||
assert_eq_i64(%r1, 0x7fff)
|
||||
assert_eq_i64(%r2, 0x7fff)
|
||||
assert_eq_i64(%r3, 0x7fff)
|
||||
assert_eq_i64(%r4, 0x7fff)
|
||||
assert_eq_i64(%r5, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r6, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r7, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r8, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r9, 0x7fffffff)
|
||||
assert_eq_i64(%r10, 0x7fffffff)
|
||||
assert_eq_i64(%r11, 0x7fffffff)
|
||||
assert_eq_i64(%r12, 0x7fffffff)
|
||||
assert_eq_i64(%r13, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r14, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r15, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r16, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r17, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r18, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r19, 0xffffffffffffffff)
|
||||
assert_eq_i64(%r20, 0x0)
|
||||
|
||||
#include "test_end.S"
|
29
tests/asm/decode/store-load-group-1.S
Normal file
29
tests/asm/decode/store-load-group-1.S
Normal file
@ -0,0 +1,29 @@
|
||||
#include "test_start.S"
|
||||
|
||||
addd,0 0, 0, %g16
|
||||
{
|
||||
ldb,0 0, mem, %empty
|
||||
ldb,2 2, mem, %empty
|
||||
ldb,3 3, mem, %empty
|
||||
ldb,5 5, mem, %empty
|
||||
}
|
||||
{
|
||||
ldb,0 0, mem, %empty
|
||||
stb,2 %g16, 2, mem
|
||||
ldb,5 5, mem, %empty
|
||||
}
|
||||
{
|
||||
ldb,2 2, mem, %empty
|
||||
ldb,3 3, mem, %empty
|
||||
stb,5 %g16, 5, mem
|
||||
}
|
||||
{
|
||||
stb,2 %g16, 2, mem
|
||||
stb,5 %g16, 5, mem
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
mem:
|
||||
.fill 8, 1, 0
|
13
tests/asm/decode/store-load-group-2.S
Normal file
13
tests/asm/decode/store-load-group-2.S
Normal file
@ -0,0 +1,13 @@
|
||||
#include "test_start.S"
|
||||
|
||||
addd,0 0, 0, %g16
|
||||
{
|
||||
stb,2 %g16, 2, mem
|
||||
ldb,3 3, mem, %empty
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
mem:
|
||||
.fill 8, 1, 0
|
13
tests/asm/decode/store-load-group-3.S
Normal file
13
tests/asm/decode/store-load-group-3.S
Normal file
@ -0,0 +1,13 @@
|
||||
#include "test_start.S"
|
||||
|
||||
addd,0 0, 0, %g16
|
||||
{
|
||||
ldb,0 0, mem, %empty
|
||||
stb,5 %g16, 5, mem
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
mem:
|
||||
.fill 8, 1, 0
|
10
tests/asm/decode/unaligned-1.S
Normal file
10
tests/asm/decode/unaligned-1.S
Normal file
@ -0,0 +1,10 @@
|
||||
#include "common.S"
|
||||
|
||||
.text
|
||||
.global _start
|
||||
.balign 8
|
||||
.byte 0
|
||||
_start:
|
||||
nop
|
||||
|
||||
#include "test_end.S"
|
11
tests/asm/decode/unaligned-2.S
Normal file
11
tests/asm/decode/unaligned-2.S
Normal file
@ -0,0 +1,11 @@
|
||||
#include "test_start.S"
|
||||
|
||||
ibranch 1f
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.balign 8
|
||||
.byte 0
|
||||
1:
|
||||
ibranch 0b
|
12
tests/asm/decode/unaligned-3.S
Normal file
12
tests/asm/decode/unaligned-3.S
Normal file
@ -0,0 +1,12 @@
|
||||
#include "test_start.S"
|
||||
|
||||
disp %ctpr1, 1f
|
||||
ct %ctpr1
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.balign 8
|
||||
.byte 0
|
||||
1:
|
||||
ibranch 0b
|
15
tests/asm/decode/unaligned-4.S
Normal file
15
tests/asm/decode/unaligned-4.S
Normal file
@ -0,0 +1,15 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr1, 1f
|
||||
}
|
||||
call %ctpr1, wbs=4
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.balign 8
|
||||
.byte 0
|
||||
1:
|
||||
return %ctpr3
|
||||
ct %ctpr3
|
269
tests/asm/include/common.S
Normal file
269
tests/asm/include/common.S
Normal file
@ -0,0 +1,269 @@
|
||||
#ifndef SRC_BASE_COMMON_H
|
||||
#define SRC_BASE_COMMON_H
|
||||
|
||||
#define NR_exit 1
|
||||
#define NR_write 4
|
||||
|
||||
#define SCRATCH_REG0 %g23
|
||||
#define SCRATCH_REG1 %g22
|
||||
#define SCRATCH_REG2 %g21
|
||||
#define SCRATCH_REG3 %g20
|
||||
#define SCRATCH_REG4 %g29
|
||||
#define SCRATCH_REG5 %g18
|
||||
#define SCRATCH_REG6 %g17
|
||||
#define SCRATCH_REG7 %g16
|
||||
|
||||
#define SCRATCH_PREG0 %pred31
|
||||
#define SCRATCH_PREG1 %pred30
|
||||
#define SCRATCH_PREG2 %pred29
|
||||
#define SCRATCH_PREG3 %pred28
|
||||
#define SCRATCH_PREG4 %pred27
|
||||
#define SCRATCH_PREG5 %pred26
|
||||
#define SCRATCH_PREG6 %pred25
|
||||
#define SCRATCH_PREG7 %pred24
|
||||
#define SCRATCH_PREG8 %pred23
|
||||
|
||||
#define str_HELPER(X) #X
|
||||
#define str(X) str_HELPER(X)
|
||||
|
||||
#define glue_helper(A, B) A ## B
|
||||
#define glue(A, B) glue_helper(A, B)
|
||||
#define glue3(A, B, C) glue(glue(A, B), C)
|
||||
#define glue4(A, B, C, D) glue(glue(A, B), glue(C, D))
|
||||
#define local(LABEL) glue3(.L, LABEL, __LINE__)
|
||||
|
||||
// Selector for getf{s,d}.
|
||||
#define F(O, L, S, B) ((O) | ((L) << 6) | ((S) << 12) | ((B) << 13))
|
||||
|
||||
// Selector for insfd.
|
||||
#define IF(O, L, S1_HT, S3_HT) ((O) | ((L) << 6) | ((S1_HT) << 13) | ((S3_HT) << 15))
|
||||
|
||||
.macro sys_exit, code=0
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
sdisp %ctpr1, 0x3
|
||||
nop 4
|
||||
}
|
||||
{
|
||||
addd,0 0, NR_exit, %r8
|
||||
addd,1 0, \code, %r9
|
||||
call %ctpr1, wbs=4
|
||||
}
|
||||
.endm
|
||||
|
||||
#define exit(code) sys_exit code
|
||||
|
||||
.macro set_exit_code code=0
|
||||
addd,0 0, 1, SCRATCH_REG3; \
|
||||
stb,2 SCRATCH_REG3, [ exit_code ]; \
|
||||
.endm
|
||||
|
||||
.macro sys_write msg, len, fd=1
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
sdisp %ctpr1, 0x3
|
||||
nop 4
|
||||
}
|
||||
{
|
||||
addd,0 0, NR_write, %r8
|
||||
addd,1 0, \fd, %r9
|
||||
addd,2 0, \msg, %r10
|
||||
addd,3 0, \len, %r11
|
||||
call %ctpr1, wbs=4
|
||||
}
|
||||
.endm
|
||||
|
||||
#define write(MSG) \
|
||||
.pushsection ".rodata"; \
|
||||
local(str):; \
|
||||
.ascii MSG; \
|
||||
local(len) = . - local(str); \
|
||||
.popsection; \
|
||||
sys_write local(str), local(len)
|
||||
|
||||
#define writeln(MSG) write(MSG "\n")
|
||||
|
||||
#define assert_(PRED, MSG) \
|
||||
ibranch local(ok) ? PRED; \
|
||||
write("assert at " __FILE__ ":" str(__LINE__) ":\n" \
|
||||
"assertion `" str(PRED) "` failed" MSG "\n"); \
|
||||
set_exit_code 1; \
|
||||
local(ok):
|
||||
|
||||
#define assert(PRED) assert_(PRED, "")
|
||||
#define assertm(PRED, MSG) assert_(PRED, ", " MSG)
|
||||
|
||||
#define test_cmp_helper_false ~
|
||||
#define test_cmp_helper_true
|
||||
#define test_cmp_helper(X) glue(test_cmp_helper_, X)
|
||||
#define test_cmp(OP, S1, S2, EXPECTED) \
|
||||
{ \
|
||||
addd,0 0, S1, SCRATCH_REG0; \
|
||||
addd,1 0, S2, SCRATCH_REG1; \
|
||||
} \
|
||||
{ \
|
||||
OP SCRATCH_REG0, SCRATCH_REG1, SCRATCH_PREG0; \
|
||||
nop 2; \
|
||||
} \
|
||||
ibranch local(ok) ? test_cmp_helper(EXPECTED) SCRATCH_PREG0; \
|
||||
write("test_cmp at " __FILE__ ":" str(__LINE__) ":\n" \
|
||||
"assertion `" str(OP) " " str(S1) ", " str(S2) " == " str(EXPECTED) "` failed\n"); \
|
||||
set_exit_code 1; \
|
||||
local(ok):
|
||||
|
||||
#define assert_eq(OP, LEFT, RIGHT, MSG) \
|
||||
{ \
|
||||
OP LEFT, RIGHT, SCRATCH_PREG0; \
|
||||
nop 2; \
|
||||
} \
|
||||
ibranch local(ok) ? SCRATCH_PREG0; \
|
||||
write("assert_eq at " __FILE__ ":" str(__LINE__) ":\n" \
|
||||
"assertion `left == right` failed" MSG "\n" \
|
||||
" left: " #LEFT "\n" \
|
||||
" right: " #RIGHT "\n"); \
|
||||
set_exit_code 1; \
|
||||
local(ok):
|
||||
|
||||
#define assert_eq_i32(LEFT, RIGHT) assert_eq(cmpesb, LEFT, RIGHT, "")
|
||||
#define assert_eq_i64(LEFT, RIGHT) assert_eq(cmpedb, LEFT, RIGHT, "")
|
||||
|
||||
#define assert_eq_i32m(LEFT, RIGHT, MSG) assert_eq(cmpesb, LEFT, RIGHT, ", " MSG)
|
||||
#define assert_eq_i64m(LEFT, RIGHT, MSG) assert_eq(cmpedb, LEFT, RIGHT, ", " MSG)
|
||||
|
||||
#define assert_ne(OP, LEFT, RIGHT, MSG) \
|
||||
{ \
|
||||
nop 2; \
|
||||
OP LEFT, RIGHT, SCRATCH_PREG0; \
|
||||
} \
|
||||
ibranch local(ok) ? ~SCRATCH_PREG0; \
|
||||
write("assert_ne at " __FILE__ ":" str(__LINE__) ":\n" \
|
||||
"assertion `left != right` failed, " MSG "\n" \
|
||||
" left: " #LEFT "\n" \
|
||||
" right: " #RIGHT "\n"); \
|
||||
set_exit_code 1; \
|
||||
local(ok):
|
||||
|
||||
#define assert_ne_i32(LEFT, RIGHT, MSG) assert_ne(cmpesb, LEFT, RIGHT, MSG)
|
||||
#define assert_ne_i64(LEFT, RIGHT, MSG) assert_ne(cmpedb, LEFT, RIGHT, MSG)
|
||||
|
||||
#define test_helper(OP, CMP, S1, S2, EXPECTED) \
|
||||
{ \
|
||||
addd,0 0, S1, SCRATCH_REG1; \
|
||||
addd,1 0, S2, SCRATCH_REG2; \
|
||||
} \
|
||||
OP SCRATCH_REG1, SCRATCH_REG2, SCRATCH_REG0; \
|
||||
{ \
|
||||
nop 2; \
|
||||
CMP SCRATCH_REG0, EXPECTED, SCRATCH_PREG0; \
|
||||
} \
|
||||
ibranch local(ok) ? SCRATCH_PREG0; \
|
||||
write("test at " __FILE__ ":" str(__LINE__) ":\n" \
|
||||
"assertion `" str(OP) " " str(S1) ", " str(S2) " == " str(EXPECTED) "` failed\n"); \
|
||||
set_exit_code 1; \
|
||||
local(ok):
|
||||
|
||||
#define test_i32(OP, S1, S2, EXPECTED) test_helper(OP, cmpesb, S1, S2, EXPECTED)
|
||||
#define test_i64(OP, S1, S2, EXPECTED) test_helper(OP, cmpedb, S1, S2, EXPECTED)
|
||||
|
||||
.macro skip_test
|
||||
exit(77)
|
||||
.endm
|
||||
|
||||
#define MDL_E4S 3 /* Elbrus-4S */
|
||||
#define MDL_E2S 4 /* Elbrus-2S+ */
|
||||
#define MDL_E2SM 6 /* Elbrus-2SM */
|
||||
#define MDL_E8S 7 /* Elbrus-8S */
|
||||
#define MDL_E1SP 8 /* Elbrus-1S+ */
|
||||
#define MDL_E8S2 9 /* Elbrus-8S2 */
|
||||
#define MDL_E12S 10 /* Elbrus-12S */
|
||||
#define MDL_E16S 11 /* Elbrus-16S */
|
||||
#define MDL_E2S3 12 /* Elbrus-2S3 */
|
||||
|
||||
.macro isa_version dst
|
||||
{
|
||||
rrd,0 %idr, SCRATCH_REG7
|
||||
addd,1 0, 0xff, \dst
|
||||
}
|
||||
{
|
||||
andd,0 SCRATCH_REG7, 0xff, SCRATCH_REG7
|
||||
}
|
||||
{
|
||||
cmpedb,0 SCRATCH_REG7, MDL_E2S, SCRATCH_PREG0
|
||||
cmpedb,1 SCRATCH_REG7, MDL_E2SM, SCRATCH_PREG1
|
||||
cmpedb,3 SCRATCH_REG7, MDL_E4S, SCRATCH_PREG2
|
||||
cmpedb,4 SCRATCH_REG7, MDL_E8S, SCRATCH_PREG3
|
||||
}
|
||||
{
|
||||
cmpedb,0 SCRATCH_REG7, MDL_E1SP, SCRATCH_PREG4
|
||||
cmpedb,1 SCRATCH_REG7, MDL_E8S2, SCRATCH_PREG5
|
||||
cmpedb,3 SCRATCH_REG7, MDL_E12S, SCRATCH_PREG6
|
||||
cmpedb,4 SCRATCH_REG7, MDL_E16S, SCRATCH_PREG7
|
||||
}
|
||||
{
|
||||
cmpedb,0 SCRATCH_REG7, MDL_E2S3, SCRATCH_PREG8
|
||||
}
|
||||
{
|
||||
addd,0 0, 2, \dst ? SCRATCH_PREG0
|
||||
addd,1 0, 2, \dst ? SCRATCH_PREG1
|
||||
addd,2 0, 3, \dst ? SCRATCH_PREG2
|
||||
addd,3 0, 4, \dst ? SCRATCH_PREG3
|
||||
addd,4 0, 4, \dst ? SCRATCH_PREG4
|
||||
addd,5 0, 5, \dst ? SCRATCH_PREG5
|
||||
}
|
||||
{
|
||||
addd,0 0, 6, \dst ? SCRATCH_PREG6
|
||||
addd,1 0, 6, \dst ? SCRATCH_PREG7
|
||||
addd,2 0, 6, \dst ? SCRATCH_PREG8
|
||||
}
|
||||
.endm
|
||||
|
||||
.macro min_version ver
|
||||
isa_version SCRATCH_REG0
|
||||
cmplsb,0 SCRATCH_REG0, \ver, SCRATCH_PREG0
|
||||
ibranch 0f ? ~SCRATCH_PREG0
|
||||
skip_test
|
||||
0:
|
||||
.endm
|
||||
|
||||
.macro max_version ver
|
||||
isa_version SCRATCH_REG0
|
||||
cmplesb,0 SCRATCH_REG0, \ver, SCRATCH_PREG0
|
||||
ibranch 0f ? SCRATCH_PREG0
|
||||
skip_test
|
||||
0:
|
||||
.endm
|
||||
|
||||
#define LSR_LCNT(X) ((X) & 0xffffffff)
|
||||
#define LSR_ECNT(X) (((X) & 0x1f) << 32)
|
||||
#define LSR_VLC (1 << 37)
|
||||
#define LSR_OVERFLOW (1 << 38)
|
||||
#define LSR_LDMC (1 << 39)
|
||||
#define LSR_LDOVL(X) (((X) & 0x7f) << 40)
|
||||
#define LSR_PCNT(X) (((X) & 0x1f) << 48)
|
||||
#define LSR_STRRM(X) (((X) & 0x7f) << 53)
|
||||
#define LSR_SEMC (1 << 60)
|
||||
|
||||
#define LSR_LCNT_F F(0, 32, 0, 0)
|
||||
#define LSR_ECNT_F F(32, 5, 0, 0)
|
||||
#define LSR_VLC_F F(37, 1, 0, 0)
|
||||
#define LSR_OVERFLOW_F F(38, 1, 0, 0)
|
||||
#define LSR_LDMC_F F(39, 1, 0, 0)
|
||||
#define LSR_LDOVL_F F(40, 8, 0, 0)
|
||||
#define LSR_PCNT_F F(48, 5, 0, 0)
|
||||
#define LSR_STRRM_F F(53, 7, 0, 0)
|
||||
#define LSR_SEMC_F F(60, 1, 0, 0)
|
||||
|
||||
.macro invalid32 dst
|
||||
udivs,5,sm 0, 0, \dst
|
||||
.endm
|
||||
|
||||
.macro invalid64 dst
|
||||
udivd,5,sm 0, 0, \dst
|
||||
.endm
|
||||
|
||||
.macro invalid_preg dst, scratch=SCRATCH_REG3
|
||||
invalid64 \scratch
|
||||
cmpedb,0 0, \scratch, \dst
|
||||
.endm
|
||||
|
||||
#endif // SRC_BASE_COMMON_H
|
13
tests/asm/include/test_end.S
Normal file
13
tests/asm/include/test_end.S
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef SRC_BASE_TEST_END_H
|
||||
#define SRC_BASE_TEST_END_H
|
||||
|
||||
ldb,0 [ exit_code ], SCRATCH_REG3
|
||||
exit(SCRATCH_REG3)
|
||||
.size _start, . - _start
|
||||
|
||||
.pushsection ".data"
|
||||
exit_code:
|
||||
.byte 0
|
||||
.popsection
|
||||
|
||||
#endif // SRC_BASE_TEST_END_H
|
18
tests/asm/include/test_start.S
Normal file
18
tests/asm/include/test_start.S
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef SRC_BASE_TEST_START_H
|
||||
#define SRC_BASE_TEST_START_H
|
||||
|
||||
#include "common.S"
|
||||
|
||||
.text
|
||||
.global _start
|
||||
.type _start, #function
|
||||
.balign 8
|
||||
_start:
|
||||
#ifdef MAX_VER
|
||||
max_version MAX_VER
|
||||
#endif
|
||||
#ifdef MIN_VER
|
||||
min_version MIN_VER
|
||||
#endif
|
||||
|
||||
#endif // SRC_BASE_TEST_START_H
|
151
tests/asm/int/basic-1.S
Normal file
151
tests/asm/int/basic-1.S
Normal file
@ -0,0 +1,151 @@
|
||||
#include "test_start.S"
|
||||
|
||||
test_i32(ands, 0, 0, 0)
|
||||
test_i32(ands, 1, 0, 0)
|
||||
test_i32(ands, 0, 1, 0)
|
||||
test_i32(ands, 1, 1, 1)
|
||||
|
||||
test_i32(ors, 0, 0, 0)
|
||||
test_i32(ors, 1, 0, 1)
|
||||
test_i32(ors, 0, 1, 1)
|
||||
test_i32(ors, 1, 1, 1)
|
||||
|
||||
test_i32(xors, 0, 0, 0)
|
||||
test_i32(xors, 1, 0, 1)
|
||||
test_i32(xors, 0, 1, 1)
|
||||
test_i32(xors, 1, 1, 0)
|
||||
|
||||
test_i32(andns, 0, 0, 0)
|
||||
test_i32(andns, 1, 0, 1)
|
||||
test_i32(andns, 0, 1, 0)
|
||||
test_i32(andns, 1, 1, 0)
|
||||
|
||||
test_i32(orns, 0, 0, 0xffffffff)
|
||||
test_i32(orns, 1, 0, 0xffffffff)
|
||||
test_i32(orns, 0, 1, 0xfffffffe)
|
||||
test_i32(orns, 1, 1, 0xffffffff)
|
||||
|
||||
test_i32(xorns, 0, 0, 0xffffffff)
|
||||
test_i32(xorns, 1, 0, 0xfffffffe)
|
||||
test_i32(xorns, 0, 1, 0xfffffffe)
|
||||
test_i32(xorns, 1, 1, 0xffffffff)
|
||||
|
||||
test_i32(shls, 1, 0, 1)
|
||||
test_i32(shls, 1, 1, 2)
|
||||
test_i32(shls, 1, 2, 4)
|
||||
test_i32(shls, 1, 32, 1)
|
||||
|
||||
test_i32(shrs, 8, 0, 8)
|
||||
test_i32(shrs, 8, 1, 4)
|
||||
test_i32(shrs, 8, 2, 2)
|
||||
test_i32(shrs, 8, 32, 8)
|
||||
|
||||
test_i32(sars, 0x80000000, 0, 0x80000000)
|
||||
test_i32(sars, 0x80000000, 1, 0xc0000000)
|
||||
test_i32(sars, 0x80000000, 2, 0xe0000000)
|
||||
test_i32(sars, 0x80000000, 31, 0xffffffff)
|
||||
test_i32(sars, 0x80000000, 32, 0x80000000)
|
||||
|
||||
test_i32(scls, 0x80000001, 0, 0x80000001)
|
||||
test_i32(scls, 0x80000001, 1, 0x00000003)
|
||||
test_i32(scls, 0x80000001, 2, 0x00000006)
|
||||
test_i32(scls, 0x80000001, 31, 0xc0000000)
|
||||
test_i32(scls, 0x80000001, 32, 0x80000001)
|
||||
|
||||
test_i32(scrs, 0x80000001, 0, 0x80000001)
|
||||
test_i32(scrs, 0x80000001, 1, 0xc0000000)
|
||||
test_i32(scrs, 0x80000001, 2, 0x60000000)
|
||||
test_i32(scrs, 0x80000001, 31, 0x00000003)
|
||||
test_i32(scrs, 0x80000001, 32, 0x80000001)
|
||||
|
||||
test_i32(adds, 0, 0, 0)
|
||||
test_i32(adds, 1, 0, 1)
|
||||
test_i32(adds, 0, 1, 1)
|
||||
test_i32(adds, 1, 1, 2)
|
||||
|
||||
test_i32(subs, 0, 0, 0)
|
||||
test_i32(subs, 1, 0, 1)
|
||||
test_i32(subs, 0, 1, -1)
|
||||
test_i32(subs, 1, 1, 0)
|
||||
|
||||
test_i32(muls, 0, 0, 0)
|
||||
test_i32(muls, 1, 0, 0)
|
||||
test_i32(muls, 0, 1, 0)
|
||||
test_i32(muls, 1, 1, 1)
|
||||
test_i32(muls, 2, 3, 6)
|
||||
|
||||
test_i64(andd, 0, 0, 0)
|
||||
test_i64(andd, 1, 0, 0)
|
||||
test_i64(andd, 0, 1, 0)
|
||||
test_i64(andd, 1, 1, 1)
|
||||
|
||||
test_i64(ord, 0, 0, 0)
|
||||
test_i64(ord, 1, 0, 1)
|
||||
test_i64(ord, 0, 1, 1)
|
||||
test_i64(ord, 1, 1, 1)
|
||||
|
||||
test_i64(xord, 0, 0, 0)
|
||||
test_i64(xord, 1, 0, 1)
|
||||
test_i64(xord, 0, 1, 1)
|
||||
test_i64(xord, 1, 1, 0)
|
||||
|
||||
test_i64(andnd, 0, 0, 0)
|
||||
test_i64(andnd, 1, 0, 1)
|
||||
test_i64(andnd, 0, 1, 0)
|
||||
test_i64(andnd, 1, 1, 0)
|
||||
|
||||
test_i64(ornd, 0, 0, 0xffffffffffffffff)
|
||||
test_i64(ornd, 1, 0, 0xffffffffffffffff)
|
||||
test_i64(ornd, 0, 1, 0xfffffffffffffffe)
|
||||
test_i64(ornd, 1, 1, 0xffffffffffffffff)
|
||||
|
||||
test_i64(xornd, 0, 0, 0xffffffffffffffff)
|
||||
test_i64(xornd, 1, 0, 0xfffffffffffffffe)
|
||||
test_i64(xornd, 0, 1, 0xfffffffffffffffe)
|
||||
test_i64(xornd, 1, 1, 0xffffffffffffffff)
|
||||
|
||||
test_i64(shld, 1, 0, 1)
|
||||
test_i64(shld, 1, 1, 2)
|
||||
test_i64(shld, 1, 2, 4)
|
||||
test_i64(shld, 1, 64, 1)
|
||||
|
||||
test_i64(shrd, 8, 0, 8)
|
||||
test_i64(shrd, 8, 1, 4)
|
||||
test_i64(shrd, 8, 2, 2)
|
||||
test_i64(shrd, 8, 64, 8)
|
||||
|
||||
test_i64(sard, 0x8000000000000000, 0, 0x8000000000000000)
|
||||
test_i64(sard, 0x8000000000000000, 1, 0xc000000000000000)
|
||||
test_i64(sard, 0x8000000000000000, 2, 0xe000000000000000)
|
||||
test_i64(sard, 0x8000000000000000, 63, 0xffffffffffffffff)
|
||||
test_i64(sard, 0x8000000000000000, 64, 0x8000000000000000)
|
||||
|
||||
test_i64(scld, 0x8000000000000001, 0, 0x8000000000000001)
|
||||
test_i64(scld, 0x8000000000000001, 1, 0x0000000000000003)
|
||||
test_i64(scld, 0x8000000000000001, 2, 0x0000000000000006)
|
||||
test_i64(scld, 0x8000000000000001, 63, 0xc000000000000000)
|
||||
test_i64(scld, 0x8000000000000001, 64, 0x8000000000000001)
|
||||
|
||||
test_i64(scrd, 0x8000000000000001, 0, 0x8000000000000001)
|
||||
test_i64(scrd, 0x8000000000000001, 1, 0xc000000000000000)
|
||||
test_i64(scrd, 0x8000000000000001, 2, 0x6000000000000000)
|
||||
test_i64(scrd, 0x8000000000000001, 63, 0x0000000000000003)
|
||||
test_i64(scrd, 0x8000000000000001, 64, 0x8000000000000001)
|
||||
|
||||
test_i64(addd, 0, 0, 0)
|
||||
test_i64(addd, 1, 0, 1)
|
||||
test_i64(addd, 0, 1, 1)
|
||||
test_i64(addd, 1, 1, 2)
|
||||
|
||||
test_i64(subd, 0, 0, 0)
|
||||
test_i64(subd, 1, 0, 1)
|
||||
test_i64(subd, 0, 1, -1)
|
||||
test_i64(subd, 1, 1, 0)
|
||||
|
||||
test_i64(muld, 0, 0, 0)
|
||||
test_i64(muld, 1, 0, 0)
|
||||
test_i64(muld, 0, 1, 0)
|
||||
test_i64(muld, 1, 1, 1)
|
||||
test_i64(muld, 2, 3, 6)
|
||||
|
||||
#include "test_end.S"
|
27
tests/asm/int/bitrev-1.S
Normal file
27
tests/asm/int/bitrev-1.S
Normal file
@ -0,0 +1,27 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
{
|
||||
bitrevs,0 0x12345678, %r1
|
||||
bitrevs,1 0xdeadbeef, %r2
|
||||
bitrevs,3 0x0a0a0a0a, %r3
|
||||
bitrevs,4 0xdeadc0de, %r4
|
||||
}
|
||||
{
|
||||
bitrevd,0 0x123456789abcdef0, %r5
|
||||
bitrevd,1 0x00cafefeedcaca00, %r6
|
||||
}
|
||||
{
|
||||
bitrevd,3 0xa0a0a0a0a0a0a0a0, %r7
|
||||
bitrevd,4 0xbeeffacefa11baad, %r8
|
||||
}
|
||||
assert_eq_i32(%r1, 0x1e6a2c48)
|
||||
assert_eq_i32(%r2, 0xf77db57b)
|
||||
assert_eq_i32(%r3, 0x50505050)
|
||||
assert_eq_i32(%r4, 0x7b03b57b)
|
||||
assert_eq_i64(%r5, 0x00f7b3d591e6a2c48)
|
||||
assert_eq_i64(%r6, 0x0005353b77f7f5300)
|
||||
assert_eq_i64(%r7, 0x00505050505050505)
|
||||
assert_eq_i64(%r8, 0x0b55d885f735ff77d)
|
||||
|
||||
#include "test_end.S"
|
899
tests/asm/int/cmpd-1.S
Normal file
899
tests/asm/int/cmpd-1.S
Normal file
@ -0,0 +1,899 @@
|
||||
#include "test_start.S"
|
||||
|
||||
#undef OP
|
||||
#define OP cmpodb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
#undef OP
|
||||
#define OP cmpbdb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
#undef OP
|
||||
#define OP cmpedb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
#undef OP
|
||||
#define OP cmpbedb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
#undef OP
|
||||
#define OP cmpsdb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
#undef OP
|
||||
#define OP cmppdb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
#undef OP
|
||||
#define OP cmpldb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
#undef OP
|
||||
#define OP cmpledb
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000000000001, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000000000001, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x000000007fffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x000000007fffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x0000000080000000, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x0000000080000000, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000deadbeef, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x00000000ffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000000000001, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x000000007fffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x0000000080000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000deadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x00000000ffffffff, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0x7fffffffffffffff, 0xffffffffffffffff, false)
|
||||
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0x8000000000000000, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0x8000000000000000, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xdeadbeefdeadbeef, true)
|
||||
test_cmp(OP, 0xdeadbeefdeadbeef, 0xffffffffffffffff, true)
|
||||
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000000000001, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x000000007fffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x0000000080000000, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000deadbeef, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x00000000ffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x7fffffffffffffff, true)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0x8000000000000000, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xdeadbeefdeadbeef, false)
|
||||
test_cmp(OP, 0xffffffffffffffff, 0xffffffffffffffff, true)
|
||||
|
||||
#include "test_end.S"
|
98
tests/asm/int/getfd-1.S
Normal file
98
tests/asm/int/getfd-1.S
Normal file
@ -0,0 +1,98 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
|
||||
test_i64(getfd, 0x0000000000000000, F( 0, 0, 0, 0), 0x0000000000000000)
|
||||
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 0, 4, 0, 0), 0x0000000000000000)
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 4, 4, 0, 0), 0x0000000000000001)
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 8, 4, 0, 0), 0x0000000000000002)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(12, 4, 0, 0), 0x0000000000000003)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(16, 4, 0, 0), 0x0000000000000004)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(20, 4, 0, 0), 0x0000000000000005)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(24, 4, 0, 0), 0x0000000000000006)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(28, 4, 0, 0), 0x0000000000000007)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(32, 4, 0, 0), 0x0000000000000008)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(36, 4, 0, 0), 0x0000000000000009)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(40, 4, 0, 0), 0x000000000000000a)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(44, 4, 0, 0), 0x000000000000000b)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(48, 4, 0, 0), 0x000000000000000c)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(52, 4, 0, 0), 0x000000000000000d)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(56, 4, 0, 0), 0x000000000000000e)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(60, 4, 0, 0), 0x000000000000000f)
|
||||
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 0, 4, 1, 0), 0x0000000000000000)
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 4, 4, 1, 0), 0x0000000000000001)
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 8, 4, 1, 1), 0x0000000000000002)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(12, 4, 1, 1), 0x0000000000000003)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(16, 4, 1, 2), 0x0000000000000004)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(20, 4, 1, 2), 0x0000000000000005)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(24, 4, 1, 3), 0x0000000000000006)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(28, 4, 1, 3), 0x0000000000000007)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(32, 4, 1, 4), 0xfffffffffffffff8)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(36, 4, 1, 4), 0xfffffffffffffff9)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(40, 4, 1, 5), 0xfffffffffffffffa)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(44, 4, 1, 5), 0xfffffffffffffffb)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(48, 4, 1, 6), 0xfffffffffffffffc)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(52, 4, 1, 6), 0xfffffffffffffffd)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(56, 4, 1, 7), 0xfffffffffffffffe)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(60, 4, 1, 7), 0xffffffffffffffff)
|
||||
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 0, 8, 0, 0), 0x0000000000000010)
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 8, 8, 0, 0), 0x0000000000000032)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(16, 8, 0, 0), 0x0000000000000054)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(24, 8, 0, 0), 0x0000000000000076)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(32, 8, 0, 0), 0x0000000000000098)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(40, 8, 0, 0), 0x00000000000000ba)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(48, 8, 0, 0), 0x00000000000000dc)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(56, 8, 0, 0), 0x00000000000000fe)
|
||||
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 0, 8, 1, 0), 0x0000000000000010)
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 8, 8, 1, 1), 0x0000000000000032)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(16, 8, 1, 2), 0x0000000000000054)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(24, 8, 1, 3), 0x0000000000000076)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(32, 8, 1, 4), 0xffffffffffffff98)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(40, 8, 1, 5), 0xffffffffffffffba)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(48, 8, 1, 6), 0xffffffffffffffdc)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(56, 8, 1, 7), 0xfffffffffffffffe)
|
||||
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 0,16, 0, 0), 0x0000000000003210)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(16,16, 0, 0), 0x0000000000007654)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(32,16, 0, 0), 0x000000000000ba98)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(48,16, 0, 0), 0x000000000000fedc)
|
||||
|
||||
test_i64(getfd, 0xfedcba9876543210, F( 0,16, 1, 0), 0x0000000000003210)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(16,16, 1, 2), 0x0000000000007654)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(32,16, 1, 4), 0xffffffffffffba98)
|
||||
test_i64(getfd, 0xfedcba9876543210, F(48,16, 1, 6), 0xfffffffffffffedc)
|
||||
|
||||
isa_version %r0
|
||||
cmpbdb,0 %r0, 5, %pred0
|
||||
ibranch 0f ? %pred0
|
||||
|
||||
// v5+ does not follow older rules for src2[15:13]
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 0), 0x0000000000808080)
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 1), 0x0000000000808080)
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 2), 0x0000000000808080)
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 3), 0x0000000000808080)
|
||||
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 0), 0x0000000000008080)
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 1), 0x0000000000008080)
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 2), 0x0000000000008080)
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 3), 0x0000000000008080)
|
||||
|
||||
ibranch 1f
|
||||
|
||||
0:
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 0), 0xffffffff00808080)
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 1), 0xffffffff00808080)
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 2), 0xffffffff00808080)
|
||||
test_i64(getfd, 0x0000000000808080, F( 0,32, 1, 3), 0x0000000000808080)
|
||||
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 0), 0xffffffff00008080)
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 1), 0xffffffff00008080)
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 2), 0xffffffff00008080)
|
||||
test_i64(getfd, 0x0000000000010101, F( 1,32, 1, 3), 0x0000000000008080)
|
||||
1:
|
||||
|
||||
#include "test_end.S"
|
33
tests/asm/int/insfd-1.S
Normal file
33
tests/asm/int/insfd-1.S
Normal file
@ -0,0 +1,33 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
|
||||
ldd,0,sm [ 0 ], %r1
|
||||
ldd,2,sm [ 0 ], %r2
|
||||
}
|
||||
{
|
||||
adds,0 0, 0x1cccccc0, %r1
|
||||
adds,1 0, 0x1ffffff0, %r2
|
||||
}
|
||||
{
|
||||
addd,0 0, 0x4afafafa1cccccc0, %r3
|
||||
addd,1 0, 0x4afafafa1ffffff0, %r4
|
||||
}
|
||||
{
|
||||
insfd,0 %r3, (0x0 << 12) | (32 << 6) | 8, %r4, %r5
|
||||
insfd,1 %r1, (0x2 << 12) | (32 << 6) | 8, %r4, %r6
|
||||
insfd,3 %r3, (0x8 << 12) | (32 << 6) | 8, %r2, %r7
|
||||
insfd,4 %r1, (0xa << 12) | (32 << 6) | 8, %r2, %r8
|
||||
}
|
||||
assert_eq_i32(%r1, 0x1cccccc0)
|
||||
assert_eq_i32(%r2, 0x1ffffff0)
|
||||
assert_eq_i64(%r3, 0x4afafafa1cccccc0)
|
||||
assert_eq_i64(%r4, 0x4afafafa1ffffff0)
|
||||
assert_eq_i64(%r5, 0xc04afafa1ffffff0)
|
||||
assert_eq_i64(%r6, 0xc04afafa1ffffff0)
|
||||
assert_eq_i64(%r7, 0xc04afafa1ffffff0)
|
||||
assert_eq_i64(%r8, 0xc04afafa1ffffff0)
|
||||
|
||||
#include "test_end.S"
|
||||
|
9
tests/asm/int/rwd-alc-rrd-1.S
Normal file
9
tests/asm/int/rwd-alc-rrd-1.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
rwd,0 10, %lsr
|
||||
rwd,0 5, %lsr
|
||||
alc alcf=1, alct=1
|
||||
rrd,0 %lsr, %g16
|
||||
assert_eq_i64(%g16, 4)
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/int/rwd-rrd-1.S
Normal file
8
tests/asm/int/rwd-rrd-1.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
rwd,0 0, %lsr
|
||||
rwd,0 1, %lsr
|
||||
rrd,0 %lsr, %g16
|
||||
assert_eq_i64(%g16, 1)
|
||||
|
||||
#include "test_end.S"
|
21
tests/asm/int/sxt-1.S
Normal file
21
tests/asm/int/sxt-1.S
Normal file
@ -0,0 +1,21 @@
|
||||
#include "test_start.S"
|
||||
|
||||
test_i64(sxt, 0, 0x7fff7f7f, 0x000000000000007f)
|
||||
test_i64(sxt, 1, 0x7fff7f7f, 0x0000000000007f7f)
|
||||
test_i64(sxt, 2, 0x7fff7f7f, 0x000000007fff7f7f)
|
||||
test_i64(sxt, 3, 0x7fff7f7f, 0x000000007fff7f7f)
|
||||
test_i64(sxt, 4, 0x7fff7f7f, 0x000000000000007f)
|
||||
test_i64(sxt, 5, 0x7fff7f7f, 0x0000000000007f7f)
|
||||
test_i64(sxt, 6, 0x7fff7f7f, 0x000000007fff7f7f)
|
||||
test_i64(sxt, 7, 0x7fff7f7f, 0x000000007fff7f7f)
|
||||
|
||||
test_i64(sxt, 0, 0x80008080, 0xffffffffffffff80)
|
||||
test_i64(sxt, 1, 0x80008080, 0xffffffffffff8080)
|
||||
test_i64(sxt, 2, 0x80008080, 0xffffffff80008080)
|
||||
test_i64(sxt, 3, 0x80008080, 0xffffffff80008080)
|
||||
test_i64(sxt, 4, 0x80008080, 0x0000000000000080)
|
||||
test_i64(sxt, 5, 0x80008080, 0x0000000000008080)
|
||||
test_i64(sxt, 6, 0x80008080, 0x0000000080008080)
|
||||
test_i64(sxt, 7, 0x80008080, 0x0000000080008080)
|
||||
|
||||
#include "test_end.S"
|
45
tests/asm/loop/loop-1.S
Normal file
45
tests/asm/loop/loop-1.S
Normal file
@ -0,0 +1,45 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=12, nfx=1
|
||||
setbn rsz=7, rbs=4, rcur=0
|
||||
|
||||
rwd,0 LSR_LCNT(8) | LSR_VLC | LSR_PCNT(5) | LSR_ECNT(6), %lsr
|
||||
|
||||
disp %ctpr1, 0f
|
||||
}
|
||||
{
|
||||
addd,0 0, 0, %b[2]
|
||||
subd,1 0, buffer, %b[4]
|
||||
subd,2 0, buffer, %b[6]
|
||||
subd,3 0, buffer, %b[8]
|
||||
subd,4 0, buffer, %b[10]
|
||||
subd,5 0, buffer, %b[12]
|
||||
}
|
||||
0:
|
||||
{
|
||||
loop_mode
|
||||
|
||||
alc alcf=0, alct=1
|
||||
abn abnf=0, abnt=1
|
||||
|
||||
addd,1 %b[2], 1, %b[0]
|
||||
ldb,0,sm %b[2], buffer, %b[3]
|
||||
addd,3,sm %b[9], %b[8], %b[9]
|
||||
// store must not be executed in prologue
|
||||
stb,2 %b[13], [ %b[12] + buffer ]
|
||||
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
}
|
||||
{
|
||||
ldd,0 0, [ buffer + 0 ], %r0
|
||||
ldd,2 0, [ buffer + 8 ], %r1
|
||||
}
|
||||
assert_eq_i64(%r0, 0x0706050403020100)
|
||||
assert_eq_i64(%r1, 0x0000000000000000)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
buffer:
|
||||
.fill 16, 1, 0
|
38
tests/asm/lsr/lsr-1.S
Normal file
38
tests/asm/lsr/lsr-1.S
Normal file
@ -0,0 +1,38 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
|
||||
.macro loop r, p=0, l=0, e=0, s=0
|
||||
{
|
||||
rwd,0 (\s << 53) | (\p << 48) | (1UL << 37) | (\e << 32) | \l, %lsr
|
||||
addd,1 0, 0, \r
|
||||
disp %ctpr1, 0f
|
||||
nop 4
|
||||
}
|
||||
0:
|
||||
{
|
||||
addd \r, 1, \r
|
||||
alc alcf=1, alct=1
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
}
|
||||
.endm
|
||||
|
||||
loop %r1, 0UL, 0, 0UL
|
||||
loop %r2, 0UL, 1, 0UL
|
||||
loop %r3, 0UL, 2, 0UL
|
||||
loop %r4, 0UL, 3, 0UL
|
||||
loop %r5, 4UL, 8, 0UL
|
||||
loop %r6, 8UL, 2, 0UL
|
||||
loop %r7, 4UL, 8, 2UL
|
||||
loop %r8, 4UL, 0, 8UL
|
||||
|
||||
assert_eq_i64(%r1, 0x1)
|
||||
assert_eq_i64(%r2, 0x1)
|
||||
assert_eq_i64(%r3, 0x2)
|
||||
assert_eq_i64(%r4, 0x3)
|
||||
assert_eq_i64(%r5, 0x8)
|
||||
assert_eq_i64(%r6, 0x2)
|
||||
assert_eq_i64(%r7, 0xa)
|
||||
assert_eq_i64(%r8, 0x9)
|
||||
|
||||
#include "test_end.S"
|
36
tests/asm/lsr/lsr-2.S
Normal file
36
tests/asm/lsr/lsr-2.S
Normal file
@ -0,0 +1,36 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
|
||||
.macro loop r, p=0, l=0, e=0, s=0
|
||||
{
|
||||
rwd,0 (\s << 53) | (\p << 48) | (1UL << 37) | (\e << 32) | \l, %lsr
|
||||
addd,1 0, 0, \r
|
||||
disp %ctpr1, 0f
|
||||
nop 4
|
||||
}
|
||||
0:
|
||||
addd,0 \r, 1, \r
|
||||
alc alcf=1, alct=1
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
.endm
|
||||
|
||||
loop %r1, 0UL, 0, 0UL
|
||||
loop %r2, 0UL, 1, 0UL
|
||||
loop %r3, 0UL, 2, 0UL
|
||||
loop %r4, 0UL, 3, 0UL
|
||||
loop %r5, 4UL, 8, 0UL
|
||||
loop %r6, 8UL, 2, 0UL
|
||||
loop %r7, 4UL, 8, 2UL
|
||||
loop %r8, 4UL, 0, 8UL
|
||||
|
||||
assert_eq_i64(%r1, 0x1)
|
||||
assert_eq_i64(%r2, 0x1)
|
||||
assert_eq_i64(%r3, 0x1)
|
||||
assert_eq_i64(%r4, 0x2)
|
||||
assert_eq_i64(%r5, 0x7)
|
||||
assert_eq_i64(%r6, 0x1)
|
||||
assert_eq_i64(%r7, 0x9)
|
||||
assert_eq_i64(%r8, 0x8)
|
||||
|
||||
#include "test_end.S"
|
22
tests/asm/lsr/lsr-3.S
Normal file
22
tests/asm/lsr/lsr-3.S
Normal file
@ -0,0 +1,22 @@
|
||||
#include "test_start.S"
|
||||
|
||||
rwd,0 0x4000400000000, %lsr
|
||||
alc alcf=1, alct=0
|
||||
{
|
||||
alc alcf=0, alct=1
|
||||
ibranch 0f
|
||||
}
|
||||
0:
|
||||
rrd,0 %lsr, %r1
|
||||
{
|
||||
shrd,0 %r1, 32, %r1
|
||||
shrd,1 %r1, 48, %r2
|
||||
}
|
||||
{
|
||||
andd,0 %r1, 0x1f, %r1
|
||||
andd,1 %r2, 0x1f, %r2
|
||||
}
|
||||
assert_eq_i32m(%r1, 4, "ecnt")
|
||||
assert_eq_i32m(%r2, 2, "pcnt")
|
||||
|
||||
#include "test_end.S"
|
20
tests/asm/lsr/rwd-lsr-delay-1.S
Normal file
20
tests/asm/lsr/rwd-lsr-delay-1.S
Normal file
@ -0,0 +1,20 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
disp %ctpr1, 0f
|
||||
rwd,0 (1UL << 37) | 1, %lsr
|
||||
nop 3
|
||||
}
|
||||
{
|
||||
rwd,0 (1UL << 37) | 2, %lsr
|
||||
nop 2 // must not be visible for ct
|
||||
}
|
||||
{
|
||||
alc alcf=1, alct=1
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
exit(1)
|
20
tests/asm/lsr/rwd-lsr-delay-2.S
Normal file
20
tests/asm/lsr/rwd-lsr-delay-2.S
Normal file
@ -0,0 +1,20 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
disp %ctpr1, 0f
|
||||
rwd,0 (1UL << 37) | 1, %lsr
|
||||
nop 3
|
||||
}
|
||||
{
|
||||
rwd,0 (1UL << 37) | 2, %lsr
|
||||
nop 3 // must be visible for ct
|
||||
}
|
||||
{
|
||||
alc alcf=1, alct=1
|
||||
ct %ctpr1 ? #NOT_LOOP_END
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
exit(1)
|
72
tests/asm/lsr/strmd-1.S
Normal file
72
tests/asm/lsr/strmd-1.S
Normal file
@ -0,0 +1,72 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
addd,0 0, 0, %r0
|
||||
addd,1 0, 0, %r1
|
||||
addd,2 0, .Lmem, %r2
|
||||
}
|
||||
|
||||
.macro strmd v=0, p=0, l=0, e=0, s=0
|
||||
rwd (\s << 53) | (\p << 48) | (\v << 37) | (\e << 32) | \l, %lsr
|
||||
{
|
||||
loop_mode
|
||||
stb %r0, [ %r2 ]
|
||||
stb %r1, [ %r2 ]
|
||||
}
|
||||
addd %r2, 1, %r2
|
||||
.endm
|
||||
|
||||
strmd 0UL, 0UL, 0, 0UL, 0UL
|
||||
|
||||
strmd 0UL, 0UL, 0, 0UL, 1UL
|
||||
strmd 0UL, 0UL, 0, 1UL, 0UL
|
||||
strmd 0UL, 0UL, 1, 0UL, 0UL
|
||||
strmd 0UL, 1UL, 0, 0UL, 0UL
|
||||
strmd 1UL, 0UL, 0, 0UL, 0UL
|
||||
|
||||
strmd 0UL, 0UL, 0, 0UL, 1UL
|
||||
strmd 0UL, 0UL, 0, 1UL, 1UL
|
||||
strmd 0UL, 0UL, 1, 0UL, 1UL
|
||||
strmd 0UL, 1UL, 0, 0UL, 1UL
|
||||
strmd 1UL, 0UL, 0, 0UL, 1UL
|
||||
strmd 0UL, 0UL, 0, 0UL, 1UL
|
||||
|
||||
strmd 1UL, 0UL, 0, 0UL, 1UL
|
||||
strmd 1UL, 0UL, 0, 1UL, 1UL
|
||||
strmd 1UL, 0UL, 1, 0UL, 1UL
|
||||
strmd 1UL, 1UL, 0, 0UL, 1UL
|
||||
|
||||
strmd 1UL, 0UL, 0, 1UL, 1UL
|
||||
strmd 1UL, 0UL, 1, 1UL, 1UL
|
||||
strmd 1UL, 1UL, 0, 1UL, 1UL
|
||||
|
||||
strmd 1UL, 1UL, 0, 0UL, 1UL
|
||||
strmd 1UL, 1UL, 1, 0UL, 1UL
|
||||
strmd 1UL, 1UL, 0, 1UL, 1UL
|
||||
|
||||
strmd 1UL, 1UL, 1, 0UL, 1UL
|
||||
strmd 1UL, 1UL, 1, 1UL, 1UL
|
||||
|
||||
assert_eq_i64(%r2, .Lmem + 0x18)
|
||||
|
||||
{
|
||||
ldd,0 [ .Lmem + 0x00 ], %r0
|
||||
ldd,2 [ .Lmem + 0x08 ], %r1
|
||||
}
|
||||
{
|
||||
nop 1
|
||||
ldd,3 [ .Lmem + 0x10 ], %r2
|
||||
}
|
||||
|
||||
assert_eq_i64(%r0, 0x0000ffff00000000)
|
||||
assert_eq_i64(%r1, 0xff0000000000ff00)
|
||||
assert_eq_i64(%r2, 0xffffffffffff0000)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
.Lmem:
|
||||
.quad -1
|
||||
.quad -1
|
||||
.quad -1
|
178
tests/asm/meson.build
Normal file
178
tests/asm/meson.build
Normal file
@ -0,0 +1,178 @@
|
||||
inc_dir = include_directories('include')
|
||||
|
||||
asm_tests = {
|
||||
'aau': {
|
||||
'staa-1': {},
|
||||
'movab-1': { 'src': 'mova', 'c_args': ['-DOP=movab', '-DFMT=1'] },
|
||||
'movah-1': { 'src': 'mova', 'c_args': ['-DOP=movah', '-DFMT=2'] },
|
||||
'movaw-1': { 'src': 'mova', 'c_args': ['-DOP=movaw', '-DFMT=3'] },
|
||||
'movad-1': { 'src': 'mova', 'c_args': ['-DOP=movad', '-DFMT=4'] },
|
||||
'movab-fmt-0': { 'src': 'mova-fmt', 'c_args': ['-DOP=movab', '-DFMT=0'], 'should_fail': true },
|
||||
'movab-fmt-1': { 'src': 'mova-fmt', 'c_args': ['-DOP=movab', '-DFMT=1'] },
|
||||
'movab-fmt-2': { 'src': 'mova-fmt', 'c_args': ['-DOP=movab', '-DFMT=2'] },
|
||||
'movab-fmt-3': { 'src': 'mova-fmt', 'c_args': ['-DOP=movab', '-DFMT=3'] },
|
||||
'movab-fmt-4': { 'src': 'mova-fmt', 'c_args': ['-DOP=movab', '-DFMT=4'] },
|
||||
'movab-fmt-5': { 'src': 'mova-fmt', 'c_args': ['-DOP=movab', '-DFMT=5'] },
|
||||
'movah-fmt-0': { 'src': 'mova-fmt', 'c_args': ['-DOP=movah', '-DFMT=0'], 'should_fail': true },
|
||||
'movah-fmt-1': { 'src': 'mova-fmt', 'c_args': ['-DOP=movah', '-DFMT=1'], 'should_fail': true },
|
||||
'movah-fmt-2': { 'src': 'mova-fmt', 'c_args': ['-DOP=movah', '-DFMT=2'] },
|
||||
'movah-fmt-3': { 'src': 'mova-fmt', 'c_args': ['-DOP=movah', '-DFMT=3'] },
|
||||
'movah-fmt-4': { 'src': 'mova-fmt', 'c_args': ['-DOP=movah', '-DFMT=4'] },
|
||||
'movah-fmt-5': { 'src': 'mova-fmt', 'c_args': ['-DOP=movah', '-DFMT=5'] },
|
||||
'movaw-fmt-0': { 'src': 'mova-fmt', 'c_args': ['-DOP=movaw', '-DFMT=0'], 'should_fail': true },
|
||||
'movaw-fmt-1': { 'src': 'mova-fmt', 'c_args': ['-DOP=movaw', '-DFMT=1'], 'should_fail': true },
|
||||
'movaw-fmt-2': { 'src': 'mova-fmt', 'c_args': ['-DOP=movaw', '-DFMT=2'], 'should_fail': true },
|
||||
'movaw-fmt-3': { 'src': 'mova-fmt', 'c_args': ['-DOP=movaw', '-DFMT=3'] },
|
||||
'movaw-fmt-4': { 'src': 'mova-fmt', 'c_args': ['-DOP=movaw', '-DFMT=4'] },
|
||||
'movaw-fmt-5': { 'src': 'mova-fmt', 'c_args': ['-DOP=movaw', '-DFMT=5'] },
|
||||
'movad-fmt-0': { 'src': 'mova-fmt', 'c_args': ['-DOP=movad', '-DFMT=0'], 'should_fail': true },
|
||||
'movad-fmt-1': { 'src': 'mova-fmt', 'c_args': ['-DOP=movad', '-DFMT=1'], 'should_fail': true },
|
||||
'movad-fmt-2': { 'src': 'mova-fmt', 'c_args': ['-DOP=movad', '-DFMT=2'], 'should_fail': true },
|
||||
'movad-fmt-3': { 'src': 'mova-fmt', 'c_args': ['-DOP=movad', '-DFMT=3'], 'should_fail': true },
|
||||
'movad-fmt-4': { 'src': 'mova-fmt', 'c_args': ['-DOP=movad', '-DFMT=4'] },
|
||||
'movad-fmt-5': { 'src': 'mova-fmt', 'c_args': ['-DOP=movad', '-DFMT=5'] },
|
||||
'movah-unaligned-1': { 'src': 'mova-unaligned', 'c_args': ['-DOP=movah', '-DFMT=2', '-DMAX_VER=4'], 'should_fail': true },
|
||||
'movah-unaligned-2': { 'src': 'mova-unaligned', 'c_args': ['-DOP=movah', '-DFMT=2', '-DMIN_VER=5'] },
|
||||
'movaw-unaligned-1': { 'src': 'mova-unaligned', 'c_args': ['-DOP=movaw', '-DFMT=3', '-DMAX_VER=4'], 'should_fail': true },
|
||||
'movaw-unaligned-2': { 'src': 'mova-unaligned', 'c_args': ['-DOP=movaw', '-DFMT=3', '-DMIN_VER=5'] },
|
||||
'movad-unaligned-1': { 'src': 'mova-unaligned', 'c_args': ['-DOP=movad', '-DFMT=4', '-DMAX_VER=4'], 'should_fail': true },
|
||||
'movad-unaligned-2': { 'src': 'mova-unaligned', 'c_args': ['-DOP=movad', '-DFMT=4', '-DMIN_VER=5'] },
|
||||
},
|
||||
'base': {
|
||||
'same-reg-output-1': {},
|
||||
'exit-0': {},
|
||||
'exit-1': { 'should_fail': true },
|
||||
'template': {},
|
||||
},
|
||||
'win': {
|
||||
'setwd-1': {},
|
||||
'setwd-2': {},
|
||||
'setwd-invalidate-regs-1': {},
|
||||
'setwd-invalidate-regs-2': {},
|
||||
'setbn-invalidate-regs-1': {},
|
||||
'setbn-invalidate-regs-2': { 'should_fail': true },
|
||||
'setbp-invalidate-regs-1': {},
|
||||
'setbp-invalidate-regs-2': { 'should_fail': true },
|
||||
'dbl-1': { 'c_args': ['-march=elbrus-v3'] },
|
||||
'out-of-bounds-1': { 'should_fail': true },
|
||||
'out-of-bounds-2': { 'should_fail': true },
|
||||
'out-of-bounds-3': { 'should_fail': true },
|
||||
'br-1': {},
|
||||
},
|
||||
'ct': {
|
||||
'ibranch-1': {},
|
||||
'ct-1': {},
|
||||
'call-1': {},
|
||||
'call-invalidate-pregs-1': {},
|
||||
'call-invalidate-pregs-2': { 'should_fail': true },
|
||||
'call-reset-ctpr-1': { 'should_fail': true },
|
||||
'call-reset-ctpr-2': { 'should_fail': true },
|
||||
'call-reset-ctpr-3': { 'should_fail': true },
|
||||
'ret-reset-ctpr-1': { 'should_fail': true },
|
||||
'ret-reset-ctpr-2': { 'should_fail': true },
|
||||
'ret-reset-ctpr-3': { 'should_fail': true },
|
||||
},
|
||||
'decode': {
|
||||
'ales25-1': { 'c_args': ['-march=elbrus-v4'] },
|
||||
'lit-1': {},
|
||||
'store-load-group-1': {},
|
||||
'store-load-group-2': { 'should_fail': true },
|
||||
'store-load-group-3': { 'should_fail': true },
|
||||
'unaligned-1': { 'should_fail': true },
|
||||
'unaligned-2': { 'should_fail': true },
|
||||
'unaligned-3': { 'should_fail': true },
|
||||
'unaligned-4': { 'should_fail': true },
|
||||
},
|
||||
'plu': {
|
||||
'andp-1': {},
|
||||
'landp-1': {},
|
||||
'movep-1': {},
|
||||
},
|
||||
'int': {
|
||||
'basic-1': {},
|
||||
'bitrev-1': {},
|
||||
'getfd-1': {},
|
||||
'insfd-1': {},
|
||||
'sxt-1': {},
|
||||
'cmpd-1': {},
|
||||
'rwd-rrd-1': {},
|
||||
'rwd-alc-rrd-1': {},
|
||||
},
|
||||
'sm': {
|
||||
'dbl-1': {},
|
||||
'gettagd-1': {},
|
||||
'gettagd-2': { 'should_fail': true },
|
||||
'insfd-1': {},
|
||||
'insfd-2': { 'should_fail': true },
|
||||
'ldd-1': { 'should_fail': true },
|
||||
'merged-1': {},
|
||||
'merged-2': { 'should_fail': true },
|
||||
'merged-3': { 'should_fail': true },
|
||||
'merged-4': { 'should_fail': true },
|
||||
'merged-5': {},
|
||||
'movtd-ct-1': {},
|
||||
'movtd-ct-2': {},
|
||||
'puttagd-1': {},
|
||||
'puttagd-2': { 'should_fail': true },
|
||||
'puttagd-3': { 'should_fail': true },
|
||||
'puttags-1': {},
|
||||
'puttags-2': { 'should_fail': true },
|
||||
'qual-1': {},
|
||||
'qual-2': { 'should_fail': true },
|
||||
'qual-3': { 'should_fail': true },
|
||||
'qual-4': {},
|
||||
'qual-call-1': { 'should_fail': true },
|
||||
'qual-ct-1': { 'should_fail': true },
|
||||
'qual-ibranch-1': { 'should_fail': true },
|
||||
'std-1': {},
|
||||
'udivs-1': { 'should_fail': true },
|
||||
},
|
||||
'lsr': {
|
||||
'lsr-1': {},
|
||||
'lsr-2': {},
|
||||
'lsr-3': {},
|
||||
'rwd-lsr-delay-1': {},
|
||||
'rwd-lsr-delay-2': { 'should_fail': true },
|
||||
'strmd-1': {},
|
||||
},
|
||||
'loop': {
|
||||
'loop-1': {},
|
||||
},
|
||||
'dam': {
|
||||
'dam-1': {},
|
||||
'dam-2': {},
|
||||
},
|
||||
}
|
||||
|
||||
foreach suite, tests : asm_tests
|
||||
foreach name, opts : tests
|
||||
if 'src' in opts
|
||||
name_src = opts['src']
|
||||
else
|
||||
name_src = name
|
||||
endif
|
||||
|
||||
exe_name = suite + '-' + name
|
||||
exe_src = files(suite + '/' + name_src + '.S')
|
||||
exe_args = {
|
||||
'link_args': ['-nostdlib'],
|
||||
'include_directories': inc_dir,
|
||||
}
|
||||
|
||||
if 'c_args' in opts
|
||||
exe_args += { 'c_args': opts['c_args'] }
|
||||
endif
|
||||
|
||||
test_args = {
|
||||
'timeout': 20,
|
||||
'suite': [suite],
|
||||
}
|
||||
|
||||
if 'should_fail' in opts
|
||||
test_args += { 'should_fail': opts['should_fail'] }
|
||||
endif
|
||||
|
||||
exe = executable(exe_name, exe_src, kwargs: exe_args)
|
||||
test(name, exe, kwargs: test_args)
|
||||
endforeach
|
||||
endforeach
|
34
tests/asm/plu/andp-1.S
Normal file
34
tests/asm/plu/andp-1.S
Normal file
@ -0,0 +1,34 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
cmpbsb,0 0, 0, %pred0
|
||||
cmpesb,1 0, 0, %pred1
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
andp @p0, @p0, @p4
|
||||
pass @p4, %pred2
|
||||
|
||||
andp @p0, @p1, @p5
|
||||
pass @p5, %pred3
|
||||
|
||||
andp @p1, @p0, @p6
|
||||
pass @p6, %pred4
|
||||
}
|
||||
{
|
||||
nop 2
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
andp @p1, @p1, @p4
|
||||
pass @p4, %pred5
|
||||
}
|
||||
|
||||
assert(~%pred0)
|
||||
assert( %pred1)
|
||||
assert(~%pred2)
|
||||
assert(~%pred3)
|
||||
assert(~%pred4)
|
||||
assert( %pred5)
|
||||
|
||||
#include "test_end.S"
|
34
tests/asm/plu/landp-1.S
Normal file
34
tests/asm/plu/landp-1.S
Normal file
@ -0,0 +1,34 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
cmpbsb,0 0, 0, %pred0
|
||||
cmpesb,1 0, 0, %pred1
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
landp @p0, @p0, @p4
|
||||
pass @p4, %pred2
|
||||
|
||||
landp @p0, @p1, @p5
|
||||
pass @p5, %pred3
|
||||
|
||||
landp @p1, @p0, @p6
|
||||
pass @p6, %pred4
|
||||
}
|
||||
{
|
||||
nop 2
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
landp @p1, @p1, @p4
|
||||
pass @p4, %pred5
|
||||
}
|
||||
|
||||
assert(~%pred0)
|
||||
assert( %pred1)
|
||||
assert(~%pred2)
|
||||
assert(~%pred3)
|
||||
assert(~%pred4)
|
||||
assert( %pred5)
|
||||
|
||||
#include "test_end.S"
|
69
tests/asm/plu/movep-1.S
Normal file
69
tests/asm/plu/movep-1.S
Normal file
@ -0,0 +1,69 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
cmpbsb,0 0, 0, %pred0
|
||||
cmpesb,1 0, 0, %pred1
|
||||
cmpbsb,3 0, 0, %pred2
|
||||
cmpbsb,4 0, 0, %pred3
|
||||
}
|
||||
{
|
||||
cmpbsb,0 0, 0, %pred4
|
||||
cmpbsb,1 0, 0, %pred5
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
movep @p0, @p0, @p4
|
||||
pass @p4, %pred2
|
||||
|
||||
movep @p0, @p1, @p5
|
||||
pass @p5, %pred3
|
||||
|
||||
movep @p1, @p0, @p6
|
||||
pass @p6, %pred4
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
movep @p1, @p1, @p4
|
||||
pass @p4, %pred5
|
||||
}
|
||||
{
|
||||
cmpesb,0 0, 0, %pred6
|
||||
cmpesb,1 0, 0, %pred7
|
||||
}
|
||||
{
|
||||
cmpesb,0 0, 0, %pred8
|
||||
cmpesb,1 0, 0, %pred9
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
movep @p0, @p0, @p4
|
||||
pass @p4, %pred6
|
||||
|
||||
movep @p0, @p1, @p5
|
||||
pass @p5, %pred7
|
||||
|
||||
movep @p1, @p0, @p6
|
||||
pass @p6, %pred8
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
movep @p1, @p1, @p4
|
||||
pass @p4, %pred9
|
||||
}
|
||||
|
||||
assert(~%pred0)
|
||||
assert( %pred1)
|
||||
assert(~%pred2)
|
||||
assert(~%pred3)
|
||||
assert(~%pred4)
|
||||
assert( %pred5)
|
||||
assert( %pred6)
|
||||
assert( %pred7)
|
||||
assert(~%pred8)
|
||||
assert( %pred9)
|
||||
|
||||
#include "test_end.S"
|
10
tests/asm/sm/dbl-1.S
Normal file
10
tests/asm/sm/dbl-1.S
Normal file
@ -0,0 +1,10 @@
|
||||
#include "test_start.S"
|
||||
|
||||
min_version 3
|
||||
|
||||
setwd wsz=4, nfx=1, dbl=1
|
||||
invalid64 %r0
|
||||
adds,0 0, 0, %r0
|
||||
addd,0 %r0, 0, %r0
|
||||
|
||||
#include "test_end.S"
|
14
tests/asm/sm/gettagd-1.S
Normal file
14
tests/asm/sm/gettagd-1.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
{
|
||||
gettagd,2 %r0, %r0
|
||||
gettagd,5,sm %r0, %r1
|
||||
}
|
||||
{
|
||||
adds,2 %r0, 0, %r0
|
||||
adds,5 %r1, 0, %r1
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/sm/gettagd-2.S
Normal file
8
tests/asm/sm/gettagd-2.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
gettagd,2 %r0, %r0
|
||||
addd,0 %r0, 0, %r0
|
||||
|
||||
#include "test_end.S"
|
18
tests/asm/sm/insfd-1.S
Normal file
18
tests/asm/sm/insfd-1.S
Normal file
@ -0,0 +1,18 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
invalid64 %r1
|
||||
{
|
||||
adds,0 0, 0, %r0
|
||||
subs,1 0, 1, %r1
|
||||
addd,2 0, 0, %r2
|
||||
subd,3 0, 1, %r3
|
||||
}
|
||||
{
|
||||
insfd,0 %r0, IF(0, 32, 1, 1), %r1, %empty
|
||||
insfd,1 %r2, IF(0, 32, 0, 1), %r1, %empty
|
||||
insfd,3 %r0, IF(0, 32, 1, 0), %r3, %empty
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/sm/insfd-2.S
Normal file
8
tests/asm/sm/insfd-2.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
subd,0 0, 1, %r1
|
||||
insfd,0 %r0, IF(0, 16, 0, 0), %r1, %empty
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/ldd-1.S
Normal file
7
tests/asm/sm/ldd-1.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=4, nfx=1
|
||||
ldd,0,sm 0, 0, %r0
|
||||
addd,0 %r0, 1, %r0
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/sm/merged-1.S
Normal file
8
tests/asm/sm/merged-1.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
cmpedb,0 0, 0, %pred0
|
||||
merged,0 0, %g16, %empty, ~%pred0
|
||||
merged,0 %g16, 0, %empty, %pred0
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/merged-2.S
Normal file
7
tests/asm/sm/merged-2.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
cmpedb,0 0, 0, %pred0
|
||||
merged,0 0, %g16, %empty, %pred0
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/merged-3.S
Normal file
7
tests/asm/sm/merged-3.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
cmpedb,0 0, 0, %pred0
|
||||
merged,0 %g16, 0, %empty, ~%pred0
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/merged-4.S
Normal file
7
tests/asm/sm/merged-4.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
cmpedb,0,sm 0, %g16, %pred0
|
||||
merged,0 0, 0, %empty, %pred0
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/merged-5.S
Normal file
7
tests/asm/sm/merged-5.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
cmpedb,0,sm 0, %g16, %pred0
|
||||
merged,0,sm 0, 0, %empty, %pred0
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/movtd-ct-1.S
Normal file
7
tests/asm/sm/movtd-ct-1.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
movtd,0,sm %r0, %ctpr1
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/movtd-ct-2.S
Normal file
7
tests/asm/sm/movtd-ct-2.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
movtd,0 %r0, %ctpr1
|
||||
|
||||
#include "test_end.S"
|
20
tests/asm/sm/puttagd-1.S
Normal file
20
tests/asm/sm/puttagd-1.S
Normal file
@ -0,0 +1,20 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
{
|
||||
puttagd,2 %r0, 0, %r1
|
||||
puttagd,5 0, 1, %r2
|
||||
}
|
||||
{
|
||||
puttagd,2 0, 4, %r3
|
||||
puttagd,5 0, 5, %r4
|
||||
}
|
||||
{
|
||||
addd,0 %r1, 0, %empty
|
||||
addd,1 %r2, 0, %empty
|
||||
addd,2 %r3, 0, %empty
|
||||
addd,3 %r4, 0, %empty
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/puttagd-2.S
Normal file
7
tests/asm/sm/puttagd-2.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
puttagd,2 0, 2, %r0
|
||||
addd,0 %r0, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/puttagd-3.S
Normal file
7
tests/asm/sm/puttagd-3.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
puttagd,2 0, 8, %r0
|
||||
addd,0 %r0, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/puttagd-4.S
Normal file
7
tests/asm/sm/puttagd-4.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
puttagd,2 0, 10, %r0
|
||||
addd,0 %r0, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
14
tests/asm/sm/puttags-1.S
Normal file
14
tests/asm/sm/puttags-1.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
{
|
||||
puttags,2 %r0, 0, %r1
|
||||
puttags,5 0, 1, %r2
|
||||
}
|
||||
{
|
||||
adds,2 %r1, 0, %empty
|
||||
adds,5 %r2, 0, %empty
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
7
tests/asm/sm/puttags-2.S
Normal file
7
tests/asm/sm/puttags-2.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
puttags,2 0, 3, %r0
|
||||
addd,0 %r0, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/sm/qual-1.S
Normal file
8
tests/asm/sm/qual-1.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
cmpedb,0,sm 0, %r0, %pred0
|
||||
addd,0,sm 0, 1, %r0 ? %pred0
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/sm/qual-2.S
Normal file
8
tests/asm/sm/qual-2.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
cmpedb,0,sm 0, %r0, %pred0
|
||||
addd,0 0, 1, %r0 ? %pred0
|
||||
|
||||
#include "test_end.S"
|
17
tests/asm/sm/qual-3.S
Normal file
17
tests/asm/sm/qual-3.S
Normal file
@ -0,0 +1,17 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
{
|
||||
cmpedb,0,sm 0, %r0, %pred0
|
||||
cmpedb,1,sm 0, 0, %pred1
|
||||
}
|
||||
{
|
||||
pass %pred0, @p0
|
||||
pass %pred1, @p1
|
||||
landp @p0, @p1, @p4
|
||||
pass @p4, %pred2
|
||||
}
|
||||
addd,0 0, 1, %r0 ? %pred2
|
||||
|
||||
#include "test_end.S"
|
14
tests/asm/sm/qual-4.S
Normal file
14
tests/asm/sm/qual-4.S
Normal file
@ -0,0 +1,14 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r0
|
||||
cmpedb,0,sm 0, %r0, %pred0
|
||||
addd,0,sm 0, 0, %r0 ? %pred0
|
||||
{
|
||||
puttagd,2 %r0, 0, %r0
|
||||
gettagd,5 %r0, %r1
|
||||
}
|
||||
assert_eq_i64(%r0, 0x4000000040000000)
|
||||
assert_eq_i32(%r1, 0x5)
|
||||
|
||||
#include "test_end.S"
|
15
tests/asm/sm/qual-call-1.S
Normal file
15
tests/asm/sm/qual-call-1.S
Normal file
@ -0,0 +1,15 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
disp %ctpr3, 0f
|
||||
}
|
||||
invalid64 %g16
|
||||
cmpedb,0,sm 0, %g16, %pred0
|
||||
call %ctpr3, wbs=4 ? %pred0
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
return %ctpr3
|
||||
ct %ctpr3
|
9
tests/asm/sm/qual-ct-1.S
Normal file
9
tests/asm/sm/qual-ct-1.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
disp %ctpr1, 0f
|
||||
invalid64 %g16
|
||||
cmpedb,0,sm 0, %g16, %pred0
|
||||
ct %ctpr1 ? %pred0
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/sm/qual-ibranch-1.S
Normal file
8
tests/asm/sm/qual-ibranch-1.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
cmpedb,0,sm 0, %g16, %pred0
|
||||
ibranch 0f ? %pred0
|
||||
0:
|
||||
|
||||
#include "test_end.S"
|
15
tests/asm/sm/std-1.S
Normal file
15
tests/asm/sm/std-1.S
Normal file
@ -0,0 +1,15 @@
|
||||
#include "test_start.S"
|
||||
|
||||
invalid64 %g16
|
||||
std,2,sm %g16, [ mem ]
|
||||
ldd,2 [ mem ], %g17
|
||||
addd,0 0, 0, %g18
|
||||
gettagd,2 %g17, %g18
|
||||
assert_eq_i32(%g18, 0)
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
.balign 8
|
||||
mem:
|
||||
.quad 0
|
7
tests/asm/sm/udivs-1.S
Normal file
7
tests/asm/sm/udivs-1.S
Normal file
@ -0,0 +1,7 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=4, nfx=1
|
||||
udivs,5,sm 0, 0, %r0
|
||||
addd,5 %r0, 1, %r0
|
||||
|
||||
#include "test_end.S"
|
72
tests/asm/win/br-1.S
Normal file
72
tests/asm/win/br-1.S
Normal file
@ -0,0 +1,72 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
|
||||
addd,0 0, 0, %r0
|
||||
addd,1 0, 0, %r1
|
||||
addd,2 0, 0, %r2
|
||||
addd,3 0, 0, %r3
|
||||
addd,4 0, 0, %r4
|
||||
addd,5 0, 0, %r5
|
||||
}
|
||||
{
|
||||
addd,0 0, 0, %r6
|
||||
addd,1 0, 0, %r7
|
||||
addd,2 0, 0, %r8
|
||||
addd,3 0, 0, %r9
|
||||
addd,4 0, 0, %r10
|
||||
addd,5 0, 0, %r11
|
||||
}
|
||||
{
|
||||
addd,0 0, 0, %r12
|
||||
addd,1 0, 0, %r13
|
||||
addd,2 0, 0, %r14
|
||||
addd,3 0, 0, %r15
|
||||
}
|
||||
{
|
||||
addd,0 0, 1, %b[0]
|
||||
abn abnf=1, abnt=0
|
||||
}
|
||||
{
|
||||
addd,0 0, 1, %b[0]
|
||||
abn abnf=0, abnt=1
|
||||
ibranch 0f
|
||||
}
|
||||
0:
|
||||
{
|
||||
addd,0 0, 2, %b[0]
|
||||
abn abnf=1, abnt=0
|
||||
}
|
||||
{
|
||||
addd,0 0, 3, %b[0]
|
||||
abn abnf=1, abnt=0
|
||||
}
|
||||
|
||||
assert_eq_i64(%r0, 0)
|
||||
assert_eq_i64(%r1, 0)
|
||||
assert_eq_i64(%r2, 0)
|
||||
assert_eq_i64(%r3, 0)
|
||||
assert_eq_i64(%r4, 0)
|
||||
assert_eq_i64(%r5, 0)
|
||||
assert_eq_i64(%r6, 0)
|
||||
assert_eq_i64(%r7, 0)
|
||||
assert_eq_i64(%r8, 1)
|
||||
assert_eq_i64(%r9, 0)
|
||||
assert_eq_i64(%r10, 3)
|
||||
assert_eq_i64(%r11, 0)
|
||||
assert_eq_i64(%r12, 2)
|
||||
assert_eq_i64(%r13, 0)
|
||||
assert_eq_i64(%r14, 1)
|
||||
assert_eq_i64(%r15, 0)
|
||||
assert_eq_i64(%b[0], 1)
|
||||
assert_eq_i64(%b[1], 0)
|
||||
assert_eq_i64(%b[2], 3)
|
||||
assert_eq_i64(%b[3], 0)
|
||||
assert_eq_i64(%b[4], 2)
|
||||
assert_eq_i64(%b[5], 0)
|
||||
assert_eq_i64(%b[6], 1)
|
||||
assert_eq_i64(%b[7], 0)
|
||||
|
||||
#include "test_end.S"
|
41
tests/asm/win/dbl-1.S
Normal file
41
tests/asm/win/dbl-1.S
Normal file
@ -0,0 +1,41 @@
|
||||
#include "test_start.S"
|
||||
|
||||
min_version 3
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
subd,0 0, 1, %r0
|
||||
subd,1 0, 1, %r1
|
||||
subd,2 0, 1, %g16
|
||||
}
|
||||
{
|
||||
setwd wsz=8, nfx=0, dbl=0
|
||||
adds,0 0, 0, %r0
|
||||
}
|
||||
{
|
||||
adds,0 0, 0, %r1
|
||||
adds,1 0, 0, %g16
|
||||
}
|
||||
assert_eq_i64(%r0, 0xffffffff00000000)
|
||||
assert_eq_i64(%r1, 0xffffffff00000000)
|
||||
assert_eq_i64(%g16, 0xffffffff00000000)
|
||||
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
subd,0 0, 1, %r0
|
||||
subd,1 0, 1, %r1
|
||||
subd,2 0, 1, %g16
|
||||
}
|
||||
{
|
||||
setwd wsz=8, nfx=0, dbl=1
|
||||
adds,0 0, 0, %r0
|
||||
}
|
||||
{
|
||||
adds,0 0, 0, %r1
|
||||
adds,1 0, 0, %g16
|
||||
}
|
||||
assert_eq_i64(%r0, 0)
|
||||
assert_eq_i64(%r1, 0)
|
||||
assert_eq_i64(%g16, 0)
|
||||
|
||||
#include "test_end.S"
|
8
tests/asm/win/out-of-bounds-1.S
Normal file
8
tests/asm/win/out-of-bounds-1.S
Normal file
@ -0,0 +1,8 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=0
|
||||
addd %r16, 0, %empty
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
9
tests/asm/win/out-of-bounds-2.S
Normal file
9
tests/asm/win/out-of-bounds-2.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=0
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
}
|
||||
addd %b[8], 0, %empty
|
||||
|
||||
#include "test_end.S"
|
10
tests/asm/win/out-of-bounds-3.S
Normal file
10
tests/asm/win/out-of-bounds-3.S
Normal file
@ -0,0 +1,10 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=16, nfx=0
|
||||
setbn rsz=7, rbs=8, rcur=0
|
||||
|
||||
addd %b[8], 0, %empty
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
24
tests/asm/win/setbn-1.S
Normal file
24
tests/asm/win/setbn-1.S
Normal file
@ -0,0 +1,24 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=112, nfx=1
|
||||
setbn rsz=63, rbs=48, rcur=0
|
||||
}
|
||||
|
||||
addd 0, 3, %b[0]
|
||||
addd 0, 4, %b[127]
|
||||
|
||||
assert_eq_i64(%b[0], 3)
|
||||
assert_eq_i64(%b[127], 4)
|
||||
|
||||
abn abnf=1, abnt=0
|
||||
|
||||
assert_eq_i64(%b[2], 3)
|
||||
assert_eq_i64(%b[1], 4)
|
||||
|
||||
abn abnf=1, abnt=0
|
||||
|
||||
assert_eq_i64(%b[4], 3)
|
||||
assert_eq_i64(%b[3], 4)
|
||||
|
||||
#include "test_end.S"
|
11
tests/asm/win/setbn-invalidate-regs-1.S
Normal file
11
tests/asm/win/setbn-invalidate-regs-1.S
Normal file
@ -0,0 +1,11 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
setbn rsz=0, rbs=7, rcur=0
|
||||
}
|
||||
addd,0 0, 0, %r8
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
addd,0 %r8, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
12
tests/asm/win/setbn-invalidate-regs-2.S
Normal file
12
tests/asm/win/setbn-invalidate-regs-2.S
Normal file
@ -0,0 +1,12 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
}
|
||||
invalid64 %b[0]
|
||||
setbn rsz=0, rbs=7, rcur=0
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
addd,0 %b[0], 0, %empty
|
||||
|
||||
#include "test_end.S"
|
9
tests/asm/win/setbp-invalidate-regs-1.S
Normal file
9
tests/asm/win/setbp-invalidate-regs-1.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setbp psz=1
|
||||
cmpedb,0 0, 0, %pred1
|
||||
setbp psz=0
|
||||
setbp psz=1
|
||||
addd,0 0, 0, %empty ? %pred1
|
||||
|
||||
#include "test_end.S"
|
10
tests/asm/win/setbp-invalidate-regs-2.S
Normal file
10
tests/asm/win/setbp-invalidate-regs-2.S
Normal file
@ -0,0 +1,10 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setbp psz=1
|
||||
invalid64 %g16
|
||||
cmpedb,0 %g16, 0, %pred1
|
||||
setbp psz=0
|
||||
setbp psz=1
|
||||
addd,0 0, 0, %empty ? %pred1
|
||||
|
||||
#include "test_end.S"
|
9
tests/asm/win/setwd-1.S
Normal file
9
tests/asm/win/setwd-1.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=16, nfx=1
|
||||
|
||||
addd,0 0, 0, %r16
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
13
tests/asm/win/setwd-2.S
Normal file
13
tests/asm/win/setwd-2.S
Normal file
@ -0,0 +1,13 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=112, nfx=1
|
||||
setbn rsz=63, rbs=48, rcur=0
|
||||
}
|
||||
addd 0, 1, %r1
|
||||
addd 0, 2, %r63
|
||||
|
||||
assert_eq_i64(%r1, 1)
|
||||
assert_eq_i64(%r63, 2)
|
||||
|
||||
#include "test_end.S"
|
9
tests/asm/win/setwd-invalidate-regs-1.S
Normal file
9
tests/asm/win/setwd-invalidate-regs-1.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
addd,0 0, 0, %r8
|
||||
setwd wsz=4, nfx=1
|
||||
setwd wsz=8, nfx=1
|
||||
addd,0 %r8, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
9
tests/asm/win/setwd-invalidate-regs-2.S
Normal file
9
tests/asm/win/setwd-invalidate-regs-2.S
Normal file
@ -0,0 +1,9 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
invalid64 %r8
|
||||
setwd wsz=4, nfx=1
|
||||
setwd wsz=8, nfx=1
|
||||
addd,0 %r8, 0, %empty
|
||||
|
||||
#include "test_end.S"
|
4
tests/c/include/common.h
Normal file
4
tests/c/include/common.h
Normal file
@ -0,0 +1,4 @@
|
||||
#ifndef C_COMMON_H
|
||||
#define C_COMMON_H
|
||||
|
||||
#endif // C_COMMON_H
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user