Commit graph

7 commits

Author SHA1 Message Date
H. Peter Anvin (Intel)
5b39461178 obsolete handing: handle a few more subcases in a useful way
Distinguish instructions which have once been valid (OBSOLETE) from
those that never saw the light of day (NEVER). Futhermore, flag
instructions which devolve to an architectural noop from those with
undefined behavior and possibly recycled opcodes.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-09 14:52:16 -07:00
H. Peter Anvin (Intel)
177a05d0ce perl files: clean up warnings
Clean up some perl warnings, some of which were legitimate (apparently
undef doesn't actually take a list of arguments, a common enough
mistake that it is mentioned in the man page!, and a list of variables
after "my" can be cantankerous), and some of which were nuisance but
were easy enough to clean up.

Maybe this can resolve the problems with very old version of Perl?

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-09 13:30:19 -07:00
H. Peter Anvin (Intel)
602e67f932 insns.pl: use less cantankerous string expansion; better error info
The flags massaging in insns.pl could end up with things like double
commas in some pathological cases, which would make insns_flag_index()
very unhappy due to the appearance of an empty argument. Fix this by
processing the flags as a list already in insns.pl.

Be more explicit and consistent in error messages.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-09 02:41:37 -07:00
H. Peter Anvin
af9fe8f597 Don't sort opcodes; move all pseudo-ops to the beginning
We don't need to sort opcodes anymore, since we are using an O(1) hash
and not binary search.  Instead, sort them in the order they first
appear in insns.dat; this lets us move all the pseudo-ops to a
contiguous range at the start of the file, for more efficient
handling.

Change the functions that process pseudo-ops accordingly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-05-01 21:44:24 -07:00
H. Peter Anvin
526a6c7390 Rename insns-iflags.pl -> insns-iflags.ph, add missing dependency
insns-iflags.ph is included from another Perl script, so rename it .ph
(Perl header).  Add missing dependency to the main Makefile.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 10:33:12 -07:00
H. Peter Anvin
841d904f88 perl: change to the new, safer 3-operand form of open()
The 2-operand form was inherently unsafe.  Use the 3-operand form
instead, which guarantees that arbitrary filenames are supported.

This also means we can remove a few instances of sysopen() which was
used for exactly this reason, however, at least in theory sysopen()
isn't portable.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 19:36:41 -07:00
H. Peter Anvin
e1f985c167 Reorganize the source code into subdirectories
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-05-25 12:06:29 -07:00
Renamed from insns.pl (Browse further)