Combines arith2.c ... arith4.c files and their associated header files
into new arithops.c/arithopsdefs.h files, and adjusts the CMakeLists.txt,
and old-style makefile-tail. Also updates makefile-dos,
inlnPS2.h, and inlndos.h to reflect these changes, though these are not
used.
Remove unused #define PERCENT_OF_SCREEN in MyWindow.h
Move structures for dir.c to dirdefs.h where they are used
Resolve S_CHAR vs S_CHARACTER in favor of S_CHARACTER and cleanup #defines
Fix = vs == bug in FSDEBUG code in dir.c
Eliminate duplicate/unused constant definitions in gcr.c
Declare static internal function bytecmp in mkatom.c
Update many source and include files to include headers for what they use
* arithmetic opcode implementations should return LispPTR rather than int
* all callers of ERROR_EXIT() have return type LispPTR, therefore ERROR_EXIT should too
* N_[I]GETNUMBER, [N_]ARITH_SWITCH need (int) casts for some large constants that would otherwise be unsigned
* Expand use of macro N_ARITH_BODY_1_UNSIGNED and correct types
* Remove unused macros N_ARITH_BODY_1 and N_ARITH_BODY_1_UNSIGNED
* Cast to correct type for storing to TopOfStack, and return type of TIMER_EXIT()
Except where the expansion would be syntactically invalid,
for example "goto macroarg;" detection of which is a bug in clang-tidy,
so warn it off with a NOLINT...(bugprone-macro-parentheses)
"warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning" [-Wextra-semi-stmt]
occurred 254 times in xc.c when warnings were turned up.
Review this commit with "git diff -w ..." to make it easier to see changes other than indentation caused by
the addition of do { ... } while (0) around many macro definition bodies.
...in preparation for editing macro definitions to wrap in do {} while (0)
or other adjustment to make them complete statements without unnecessary
semicolons.
This programmatic reformatting should not introduce any functional changes.
This isn't used and if it were, it wouldn't compile. It calls
`ufn`, which doesn't get compiled in either (unless `C_ONLY`
is defined, which it isn't, and if it were, that wouldn't
compile either due to a missing `StkLim0`).
A subsequent PR will remove `ufn` and related code.
* Use gcc / clang overflow builtins.
This avoids expensive checks for overflow that employ undefined
behavior.
This is a step along the way towards replacing the old hand-written
assembler that did the same thing in terms of using the CPU's
overflow detection.
* Remove unimplemented SPARC asm for multiplication, divide, and remainder.
This wasn't implemented before, and for multiplication, it is now
implemented for gcc and friends using overflow detection.
* Remove USE_INLINE_ARITH.
Now that we have the compiler built-ins for detecting overflow,
we don't need custom assembly for it for each platform.
For now, we keep, but still don't use, the code that do a hot
path through the dispatch loop for some math. This code isn't
actually running or in use, but it is separate from how the
other inline arithmetic was being performed. These are the
`fast_op_*` functions that are implemented in assembler.
As a prerequisite for cleaning up some other include issues, all the
include files in inc/ should have an include guard. All the xxxdefs.h
were created with them, but most older files were not.
There were 2 definitions for `N_GETINUMBER`, one for `I386` and one
for `I386` not being defined. Whether they differed or not in the
past isn't known, but they're identical now, so we don't need
two definitions.