1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-15 07:54:13 +00:00

569 Commits

Author SHA1 Message Date
Bruce Mitchener
db21b00a9f
Make sure OLD_CURSOR code is only for SUNDISPLAY. (#279)
This is work in progress on Interlisp/medley#84.
2021-01-24 16:58:18 -08:00
Bruce Mitchener
ab28391c18
Remove -fwrapv compiler flag. (#278)
This was making sure that the overflow in some our opcode
implementations was visible to the C code so that overflow
detection would work in gcc and clang.

This is now handled on those compilers by using some built-ins
that detect overflow.

The `-fwrapv` should no longer be needed.

Closes Interlisp/medley#90.
2021-01-24 16:55:51 -08:00
Bruce Mitchener
a45bce3133
Remove OPCODEFAIL, FIXTOS1 (#277)
These had been used on Sun3 in the ancient past, but not after
that in the current code.
2021-01-24 16:41:16 -08:00
Bruce Mitchener
cc060be1c7
Remove assembly fn call optimizations. (#276)
These were for old platforms and not used in recent history.

There's no NOASMFNCALL flag as there's no more asm fn call code.
2021-01-24 16:39:32 -08:00
Nick Briggs
e90b0f734a
Remove unnecessary (and incorrect) include in unixcomm.c (#280) 2021-01-24 16:28:50 -08:00
Bruce Mitchener
23a244a0fa
Remove some unused variables from makefiles. (#275)
Removed are:

* `FPFLAGS`
* `INLINE`
* `INLINEFLAGS`
* `BITBLTFILE`
* `BYTESWAPFILES`

A couple of other minor cleanups were also included.
2021-01-24 04:23:02 +00:00
Bruce Mitchener
0d6fae222f
Remove old setup_table optimizer workarounds. (#274)
These were for old compilers aren't needed any longer with
the new `OPDISP` code arrangement and modern compilers.
2021-01-24 04:14:19 +00:00
Bruce Mitchener
9e9f8c4475
Remove profile.h (#272)
This no longer had anything to do with profiling and was
only doing some defines for the switch case block addresses,
which we no longer need since there's no longer optional
asm generated for them.
2021-01-23 18:39:55 +00:00
Bruce Mitchener
85e8cb21ec
Remove special rules for building xc.c. (#273)
This also removes the special `DISP*` flags that were used for
building some files, including `xc.c`.
2021-01-23 18:29:37 +00:00
Bruce Mitchener
b7e9529322
Begin to modernize optimized dispatch. (#271)
This feature was controlled by the compilation flag `OPDISP`
which would enable some bits of assembler on the x86 (ISC or DOS)
or some other specialized code on SPARC. On SPARC hardware, there
was a special compilation process that would preprocess the code
and generate dispatch tables.

We do this now when this feature is enabled using gcc's computed
gotos feature. This is available in clang and some other compilers.
Notably, it isn't present in Visual Studio.

This doesn't decrease our portability at all as this feature is
optional and it replaces specialized assembler code with C using
compiler extensions (making it cross-platform).

In doing this, we've removed a bunch of related code, however,
it is likely that other pieces yet remain and will be removed
in subsequent commits as we clean things up and refine them.

This feature remains disabled by default for now.
2021-01-22 12:28:16 -08:00
Bruce Mitchener
61a0c02681
More SUNDISPLAY / NOPIXRECT fixes. (#269)
This fixes most of the remaining issues, apart from llcolor.
2021-01-22 11:59:11 -08:00
Larry Masinter
1b1ff995c3
move Build instructions to wiki (#259)
* move Build instructions to wiki

* added too many links, fixed

* put (new) build instructions

* More tweaks to text
2021-01-22 11:29:53 -08:00
Bruce Mitchener
13370475d4
Fix compilation if !SUNDISPLAY && !XWINDOW && !DOS. (#270)
Some extra braces make this syntax more resilient. Go ahead and
fix a bit of formatting at the same time.
2021-01-22 07:10:35 +00:00
Bruce Mitchener
3b25bc27ee
build: Don't run ls -l when building ldeether. (#268)
Perhaps this was there as a reminder about it needing to be
`setuid`, but it shouldn't be in the default build output.
2021-01-21 13:20:17 -08:00
Bruce Mitchener
a0dec4045e
cmake: ldeether shouldn't link full maiko lib. (#267)
In the old build system, `ldeether` is built as follows:

```
$(OSARCHDIR)ldeether :  $(SRCDIR)ldeether.c $(DLPIFILES)
    $(CC) $(CFLAGS) -I$(INCDIR) $(SRCDIR)ldeether.c $(DLPIFILES) $(LDEETHERLDFLAGS) -o $(OSARCHDIR)ldeether
```

Instead of linking all of Maiko, it just links in the `src/dlpi.c`
object file.
2021-01-21 13:18:57 -08:00
Bruce Mitchener
bf15105d3c
Remove 'release' support from makeright. (#265)
This is the old way that releases were built and isn't relevant
today. It made a variety of assumptions about how things were
linked and allowed for the user to re-link an executable, but
that isn't something we need to do any longer.

This doesn't yet remove the checksum, ldechecksum, and related
scripts.
2021-01-21 13:03:11 -08:00
Bruce Mitchener
95b482d5d5
Use gcc / clang overflow builtins. (#142)
* 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.
2021-01-21 00:27:31 -08:00
Bruce Mitchener
36b8695bf6
Fix compilation error from dead store removal. (#266)
In commit 6f7ec059bc763d49c753adea70d5cc337f9e353c, we removed
some dead stores. This broke compilation when `STACKCHECK` was
enabled.

Closes Interlisp/medley#162.
2021-01-20 23:49:18 -08:00
Bruce Mitchener
421685bd49
Remove find-writes and fixid. (#264) 2021-01-20 23:43:26 -08:00
Bruce Mitchener
1828f208ec
Remove outdated comment about RISCOS. (#263) 2021-01-20 23:42:32 -08:00
Bruce Mitchener
68de0e2dfc
Use the same TIMER_INTERVAL on all platforms. (#262)
This removes a special case for SPARC which was using a slower
interval.
2021-01-20 23:41:37 -08:00
Bruce Mitchener
979c3ad6be
Remove flags for LINUX, OPENBSD, FREEBSD, MACOSX from build system. (#261)
We now can handle these via `inc/maiko/platform.h` and the
constants defined there.

This doesn't change `OS5` for Solaris yet as that's a much wider
set of changes.
2021-01-20 23:38:15 -08:00
Bruce Mitchener
164b5651b7
Remove obsolete testdsp. (#235)
This was an old executable from the SUNDISPLAY days and is not
needed any longer.
2021-01-20 18:34:45 -08:00
Bruce Mitchener
0010a02cb1
Disallow UNALIGNED_FETCH_OK on ARM, not LINUX. (#258)
UNALIGNED_FETCH_OK shouldn't be set for an entire OS, but
based on the CPU architecture.

Some ARM systems don't allow unaligned reads. x86 and x86_64
do, so update how we configure this.
2021-01-21 02:26:47 +00:00
Bruce Mitchener
819f1c6c0a
Fix crash in xrdopt. (#260)
In 85fa89ba88fb34c04d1710ac0f4d32a91c94af3b, I removed 2 entries
from a table, but didn't update the count. This leads to a
`SIGSEGV`.
2021-01-21 02:19:29 +00:00
Bruce Mitchener
45d67305e7
Remove ANSICC and related variables. (#257)
In the SunOS 4 days, the system cc apparently couldn't compile
the lp* files, so there was an arrangement to use an `ANSICC`,
which was just `gcc`, to build those files.

We no longer have this issue.
2021-01-20 09:43:46 -08:00
Bruce Mitchener
d311b0f4c8
Remove unintentional coercion from float to double. (#256)
By adding `0.0` and not `0.0f` and by calling `fmod()` rather than
`fmodf()`, we were unintentionally coercing the value from a
`float` to a `double`.

This resulted in x86_64 assembler like this:

```
    cvtss2sd %xmm0,%xmm0
    cvtss2sd %xmm1,%xmm1
    callq  403340 <fmod@plt>
    cvtsd2ss %xmm0,%xmm0
```

which is now:

```
    callq  403360 <fmodf@plt>
```

And for the `N_OP_equal` change:

```
    cvtss2sd %xmm0,%xmm0
    xorpd  %xmm2,%xmm2
    addsd  %xmm2,%xmm0
    cvtss2sd %xmm1,%xmm1
    addsd  %xmm2,%xmm1
    xor    %ecx,%ecx
    ucomisd %xmm1,%xmm0
```

is now:

```
    xorps  %xmm2,%xmm2
    addss  %xmm2,%xmm0
    addss  %xmm2,%xmm1
    xor    %ecx,%ecx
    ucomiss %xmm1,%xmm0
```

(Note `ss` rather than `sd`, along with the missing `cvtss2sd` calls.)
2021-01-20 09:36:13 -08:00
Bruce Mitchener
a427d9f394
Remove stderr output from mkvdate. (#255)
This shows up on every build and isn't needed.
2021-01-20 09:29:38 -08:00
Bruce Mitchener
addaad51fc
Remove SunOS4 removal of __inline__. (#253) 2021-01-20 17:28:06 +00:00
Bruce Mitchener
6c1bfeaf79
Use MAIKO_ARCH_SPARC rather than sparc. (#252) 2021-01-19 23:50:03 -08:00
Bruce Mitchener
85fa89ba88
Remove key checking code. (#251)
This wasn't actually hooked up any more, so it was pretty much
all dead code. The handling of this in the command line options
is gone.

In `bin/makefile-tail`, `DEVFILES` and `LIBFILES` became identical, so
`DEVFILES` went away.
2021-01-19 23:47:55 -08:00
Bruce Mitchener
397143d760
xc.c: Remove sparc-only optimization hack. (#254)
It looks like this was trying to force a pointer into a register,
but only for SPARC.
2021-01-20 07:46:43 +00:00
Bruce Mitchener
d99209916a
Remove bin/launch.asm. (#249)
This was a copy of `src/launch.asm`. Part of the DOS build process
made a copy, but that isn't something that needs to be in version
control.
2021-01-20 06:10:11 +00:00
Bruce Mitchener
f4c2f872a1
Remove bin/runlisp* (#250)
These are from when people were running lde on a small set of hosts
and needed some keys hardcoded. They are no longer relevant.
2021-01-20 06:07:45 +00:00
Bruce Mitchener
c51aff7bf3
Remove endiffix relics. (#248)
This isn't something we need around or even have the full source
for. It is a SPARC binary and a lexer script.
2021-01-19 21:45:43 -08:00
Bruce Mitchener
26bccdb3a8
Change some NOPIXRECT checks to SUNDISPLAY or remove. (#244) 2021-01-19 21:30:52 -08:00
Bruce Mitchener
e63c53cc06
Move SunOS 3 and 4 makefiles to legacy directory. (#245)
We don't remove them for now as we still reference the build
options as we work through things.
2021-01-19 21:27:22 -08:00
Bruce Mitchener
3318e75f7a
Remove csh version of makeright. (#246)
In 2001, makeright was ported from csh to bash. This is the old
csh version.
2021-01-19 21:26:09 -08:00
Bruce Mitchener
2ffcc4209d
Remove macOS 11 from GitHub Actions. (#247)
This platform is experimental on their end and is having
capacity problems. We don't need it for now and the noise
of the failures is not worth it.
2021-01-19 21:24:39 -08:00
Bruce Mitchener
6f7ec059bc
Remove dead stores. (#240) 2021-01-19 21:23:26 -08:00
Bruce Mitchener
0a057dec6b
Delete code related to NATIVETRAN feature. (#232)
* Delete code related to NATIVETRAN feature.

This was obsolete work that had been done for generating
native code from the bytecode.

Closes Interlisp/medley#89.

* Remove unused SaveD6.
2021-01-19 17:57:53 -08:00
Bruce Mitchener
c89b6fd611
Use the C99 floating point error code on Solaris. (#243)
Previously, we were building as C89 and the new code required
the C99 flag on Solaris with Sun Studio. Now that we build as
C99, this should work now and we can remove the special case
code.
2021-01-19 19:35:00 +00:00
Nick Briggs
26857f3131
Change icon, cursor images and masks to const uint8_t (#239)
The predefined cursors (image and mask) are better represented
as arrays of const uint8_t rather than char.  Likewise for the
window icon.  Track this change in the functions that take the
image and mask as arguments, casting only when we get to the
X library functions that take char*.
2021-01-19 10:16:08 -08:00
Bruce Mitchener
a42189fb8b conspage: Fix uninitialized memory read. (#242)
If `prior` was not set, then `priorpg` would be uninitialized and
was subsequently used in a comparison. It should be initialized
to `NULL`.
2021-01-19 09:28:40 -08:00
Bruce Mitchener
616b526516
No mode_t for open() for opening read-only file. (#241) 2021-01-19 08:40:33 -08:00
Bruce Mitchener
7a24b41fc4
Fix !XWINDOW to be SUNDISPLAY ifdefery. (#234)
Some of the `ifndef XWINDOW` code should have been
`ifdef SUNDISPLAY` instead.
2021-01-18 23:45:59 -08:00
Bruce Mitchener
db6b351397
Remove FORKCOMM define. (#238)
This code path was followed everywhere except DOS, so remove
it from the build system, and adjust the code.
2021-01-18 22:12:41 -08:00
Bruce Mitchener
c4e4c5ec5b
Fix sunwindow include ifdefery on vmemsave.c. (#236)
The cursor management code is `#ifdef` `SUNDISPLAY` and
`OLD_CURSOR`, not `NOPIXRECT`, so do the same for the
header include.
2021-01-18 22:11:42 -08:00
Bruce Mitchener
7549c746eb
Remove old xXWINDOW code. (#233)
This looks like code that was a mix of SUNDISPLAY and XWINDOW.
But it isn't valid any longer...
2021-01-19 04:52:50 +00:00
Bruce Mitchener
c9a72229dd
Bit of cleanup for Lisp_Xinitialized. (#237)
* Bit of cleanup for Lisp_Xinitialized.

* Remove the `extern` from `xcursor.c`, where it was not used.
* Move the definition from `main.c` to `xinit.c` as it is
  the only file using it.
* Use `stdbool.h` for it rather than an `int` with custom `TRUE`
  and `FALSE` values.

* Add some asserts with Lisp_Xinitialized.
2021-01-19 04:46:20 +00:00