Commit Graph

959 Commits

Author SHA1 Message Date
Paulo Matos
45fefb214d Add further tests to CI (#27)
original commit: 6627417c0a5737cfb0d04d3ce13f52191c15c78f
2020-07-13 15:22:21 +02:00
Matthew Flatt
a4fb72e84c unbreak arm32
original commit: 83221c32b4e8654f0f7d3b3857b7efab5be2bad4
2020-07-12 06:00:00 -06:00
Matthew Flatt
802daa10b1 add memory-order-acquire and memory-order-release
original commit: ea879863f2141ac30532586ff435f16dc4339a8b
2020-07-11 10:02:32 -06:00
Matthew Flatt
32c5af0442 arm64: fix unsafe bitwise shift by 0 and unsafe $fxu< on 0
original commit: 742fe456e3b20caf02156f0c2e0f906cb6fa579f
2020-07-09 22:37:09 +00:00
Matthew Flatt
763c7981a4 add a guide implementation
This first cut is heavy on describing how backends work, because
that's fresh in mind and relevant to ongoing effort.

original commit: 964ce95dc910e6c1825b341bf05492af5903cc82
2020-07-09 14:22:43 -06:00
Matthew Flatt
b2f74f014e add AArch64 (aka Arm64) support as tarm64le
original commit: 9964f27f64cc743fd1dbff7418fce940a4291b01
2020-07-09 06:32:41 -06:00
Matthew Flatt
57a2b8511d unbreak [t]i3nt
Commit 88d57da163 incorrectly merged, because the syntax of `mref` has
changed to support unboxed floating-point arithmetic.

original commit: a8eeb536aecc0e0a363aa68d43edafa7d6c9df52
2020-07-04 10:11:32 -06:00
Matthew Flatt
ac0b1f71ca add functions to traverse a continuation without splitting
original commit: 0f3ff69d4247ec695087953892839d680ed32fff
2020-07-02 06:46:42 -06:00
Matthew Flatt
42c4a90e7c repair for arm32 foreign callables
Especially fix problems with `__collect_safe`, but also deallocate
stack space for `&` returns.

original commit: b593b0f14e7a803d8e089f49e266194245504197
2020-06-29 16:46:53 -06:00
Matthew Flatt
6fc5157f94 arm32: fix sharing domain of fence
original commit: fa32a2919cb5550eabf59b188312f2ed32c57ccf
2020-06-29 07:16:55 -06:00
Matthew Flatt
bdd1eaa874 add tarm32le
Besides adding supportt for `__collect-safe` and other repairs,
introduce a write-write fence with the write barrier, which is
intended to avoid one thread using an object created in another thread
before the object's initializing writes are visible.

original commit: 543bd16739c08e5a8f88c470b52db0f23a27d260
2020-06-29 05:55:47 -06:00
dyb
a958dec07f 16-byte alignment on non-Windows x86
Maintain 16-byte stack alignment (if incoming frames are 16-byte
aligned), because newer versions of gcc count on 16-bit alignment for
some generated SSE instructions.

[This patch is extracted from cisco/ChezScheme#518.
 Merging the rest of that change will take longer.]

original commit: 88d57da163ca287ab37534fd858361a035ce7e4a
2020-06-24 18:54:06 -06:00
Matthew Flatt
9bdc112b4d ppc32: fix icache flush
original commit: d9bf4ebbc5fe32a1d3d35ba096a54e7b78d1f33c
2020-06-22 17:35:47 -06:00
Matthew Flatt
e0a60ac950 ppc32: add missing step in double->single floating-point conversion
original commit: 62a8fbe33a3fecdad1701e3ec196dcf032a777c4
2020-06-20 08:54:15 -06:00
Matthew Flatt
257a29216e update for ppc32
Besides updating for unboxed floating point, the ppc32 build uses a
return register, and the continuation-attachments implementation was
not right for that mode.

original commit: dd2d01fb26ace819c73f258b9b53739f9dda1d34
2020-06-20 07:36:02 -06:00
Matthew Flatt
e4d5ece617 improve local-variable unboxing
Generalize the `np-unbox-fp-vars!` pass to avoid a shallow "known
flonum?" guard.

original commit: d938bac6b720c56a2592dabccafe4954d695d1f7
2020-06-16 12:48:21 -06:00
Matthew Flatt
d9621ebedf better strategy for fp register allocation
original commit: 1648c6f1f160e72991c62778e87d59b188866095
2020-06-14 19:41:40 -06:00
Matthew Flatt
4f35f62a89 fp improvements for x86_64
Specializations for operands that are the same.

original commit: 9585613deebe83366845c4ab203d1d2a4b9cda00
2020-06-14 19:33:08 -06:00
Matthew Flatt
1bc51a7ba4 cp0 loop adjustment for letrec*
original commit: b89cf40dcfd25c382bdb3190f46916ccc63a841e
2020-06-14 19:30:14 -06:00
Matthew Flatt
af04af5aa3 keep single-argument unsafe fl+ and fl* as an unboxing hint
original commit: 054d6da58ceffcce2c5caa6eda5561a122658543
2020-06-14 10:32:30 -06:00
Matthew Flatt
d1f20019ae unbox more flonum operations
Flonum operations like `fltruncate` and `flsin` are implemented by
calling functions from the C library. Unboxing these involves a
generalazation the `foreign-call` intermediate form to handle unboxing
and to work in a non-tail position (especially by telling the register
allocator that caller-saved registers will be trashed). An internal
'atomic convention on a foreign call indicates that no callback into
Scheme is possible, so some setup/teardown (including stashing
callee-saved registers) can be skipped.

original commit: fd89919634d0d5272e046b47bb81bcc66e22a741
2020-06-13 14:25:52 -06:00
Matthew Flatt
4b322677fa flush instruction cache on vfasl load
original commit: 57a7c47dcf1f602d208d14f51f456edb3e2689ae
2020-06-12 14:41:00 -06:00
Matthew Flatt
d26b54dd52 refactor np-expand-primitives unboxing
Shift addition of boxing as needed into the main loop, infer unboxed
variables and `mref`s, and centralize lifting of the `unboxed-fp`
declaration.

original commit: ed8ca4b6c77bdd436b0dee467a8350a450a44fb3
2020-06-12 09:21:46 -06:00
Matthew Flatt
1ce6d97369 fix unboxing with single-argument fl+ and fl*
original commit: 366468c7149dbb59cdf2dce67078e6511b137e9b
2020-06-12 08:07:21 -06:00
Matthew Flatt
23e3597778 fix vfasl for library/C entry 0
original commit: ab36ca79585b69db135b9edeadbc26e9a071f813
2020-06-11 17:24:17 -06:00
Matthew Flatt
4e808d249a fix bounds checking in flonum->fixnum
The comparison was off for 32-bit plaforms, because it didn't allow
fractional increments, The comparison was off for 64-bit platforms,
bbecause it didn't account for round-trip failure when starting from
the largest fixnum.

original commit: 74eb0583ae1b6212fbde459d7486c3d4a0498401
2020-06-10 07:56:37 -06:00
Matthew Flatt
69b597e496 clean up backend API for floating point
Simplify and normalize backend elements for loading, storing, and
converting floating-point numbers, taking better advantage of
new support for floating-pointer registers.

original commit: 4066af9cf3799392ef785a77da69f7cfff74d2fe
2020-06-07 20:02:00 -06:00
Matthew Flatt
a5f877f95d repair a hashtable test
original commit: 021e4e59474034a45c46fe51f4cd6c7ba2305554
2020-06-07 06:25:14 -06:00
Matthew Flatt
6395bd92ff fix foreign-callable handling of bytevector arguments
This is a follow-up to 276f8da076, where `(%tc-ref cp)` was supposed
to be preserved by moving it into %cp, but intrinisics for bytevector
arguments can kill %cp. Use a temporary to expose things properly to
the register allocator.

original commit: 3a29db06a452e46e69ebcde524b3b9acb435dec3
2020-06-06 19:44:40 -06:00
Matthew Flatt
2f5d2ab05a Revert "fix callable handling of string and bytevector arguments"
This reverts commit aa230ac79bed1efa02779bb7bbcde5c009818b74, so it
can be replaced with a solution that is less clumsy and less fragile.

original commit: 533940fdc6905d810deabb457d7004a031a3ac05
2020-06-06 19:31:38 -06:00
Matthew Flatt
a1ddeade2c suppress time-stamp-counter test for arm32le
original commit: 990f051353979049415c29af503556c5b82296e9
2020-06-06 17:57:39 -06:00
Matthew Flatt
aa17bc5d5b make sure threads from thread tests finish
original commit: baf5f3b32940f8060c535428f92b573f46dff9d4
2020-06-06 15:11:17 -06:00
Matthew Flatt
e8a52e23a9 fix ftype-lock! for arm32le
original commit: 16af3430e0f677de8de4af6b8828b9fde7a60243
2020-06-06 15:02:58 -06:00
Matthew Flatt
bbbd5a76ac fix vfasl relocation for arm32
original commit: e15c51c2c29aea545fbb4790f36b15002b7a25a5
2020-06-06 14:29:32 -06:00
Matthew Flatt
0adffe2c19 fix psuedo-random state C view for arm32
original commit: 348c1798d88eea3504961effe7953103044e3ee4
2020-06-06 12:16:11 -06:00
Matthew Flatt
cb4c035a9e fix indirect unsigned return for arm32le
original commit: 158ffeb1db8f425391193f2a205594e3f1a60e99
2020-06-06 09:28:24 -06:00
Matthew Flatt
237f0e4fa4 add a __varargs FFI convention modifier
The varargs convention differs from the fixed-argument convention on
arm32le.

original commit: b2029432e66f188911194cdb8eea2cb3725f5cd3
2020-06-06 09:28:24 -06:00
Matthew Flatt
36aa0aad01 fix callable handling of string and bytevector arguments
This is a follow-up to 276f8da076, where `(%tc-ref cp)` was preserved
by moving into `%cp`, but I missed that intrinisics for string and
bytevector arguments kill `%cp`.

original commit: aa230ac79bed1efa02779bb7bbcde5c009818b74
2020-06-06 09:28:24 -06:00
Matthew Flatt
d2069742ee repairs for arm32le
Includes a repair by @cjfrisz at cisco/ChezScheme#510

original commit: e7ee15332bd8f0e5f0887cff9f6ee45b8b38a4f1
2020-06-05 07:28:37 -06:00
Matthew Flatt
c103184272 repairs for unboxing
Fix nested-loop handling with union find, and fix unboxing check
to properly account for a primitive's arity.

original commit: af2f8784d96f09624b97476fb7b674a77097f9d0
2020-06-04 09:18:53 -06:00
Matthew Flatt
c9f2d1e156 i3 repairs related to fp unboxing
original commit: 0f33056b6503013237b26c09c2e9baba4377a750
2020-06-03 16:29:26 -06:00
Matthew Flatt
a1def58a46 test corrections
original commit: df411ac716894d9354448d9b53ab96ec165b33dd
2020-06-03 15:27:07 -06:00
Matthew Flatt
6d65be6234 fix places where a lambda name was fumbled
original commit: 7fc5a6c5c6ce9f7979ca88e71c79521b5f5ad408
2020-06-03 11:08:58 -06:00
Matthew Flatt
b53e6a990c fix broken use of state in cp0 for single-value and names
Preinfo recoreds were mutated under the incorrect assumption that they
were specific to a `lambda` form, which is not true, especially after
some inlining.

original commit: 489b4c732d7359b1c7c4558d41d5e6ba3a9abafa
2020-06-03 06:12:29 -06:00
Matthew Flatt
f3209ca63c fix fl comparison with more than inline-args-limit arguments
original commit: 0efbfb50b372009d0974edc01e6194179d7300ef
2020-06-01 06:59:03 -06:00
Matthew Flatt
43e2bc0327 unbreak Windows build
original commit: 999d4e9fc8b9cbeedc58b625f814a1db8172a259
2020-05-31 19:10:13 -06:00
Matthew Flatt
58282cbb5f correct GC problem with mark mode
The problem especially affects `enable-object-counts`, where mark mode
can update an old rtd instead of a copy that is already made.

original commit: 31e2df63894d39b005c6b9984745b44409198d02
2020-05-31 17:09:07 -06:00
Matthew Flatt
7768b09118 unbox local floating-point arithmetic
Avoid allocating a flonum object for floating-opint calculations
that are consumed only by other floating-point caculations.

For this first cut, unboxing applies only to fl+, fl-, fl*, fl/,
flabs, fl<, fl<=, fl=, fl>, fl>=, bytevector-ieee-double-[native-]ref,
and bytevector-ieee-double-[native-]set!. Local variables can be
unboxed in the same way as implicit temporaries, and loop arguments
can be unboxed, but values in a closure and function-call arguments
are always boxed.

arm32 support is mostly in place, but not yet right. ppc32 support is
not yet implemented.

This commit includes a small change that is incompatible with previous
Chez Scheme versions: `(fl= +nan.0)` (and similar for other
comparisons) produces true instead of false.

original commit: 36459e43f10705aa3e383376ca7d54cf2998b7ee
2020-05-31 17:08:38 -06:00
Matthew Flatt
75f287befd cp0: repair move of non-tail into 'effect context
Kent noticed the bug, where `make-nontail` used `ignored` where it
should have used `effect`. Also, Kent points out that `make-nontail`
can skip the `$values` wrapped in `effect` contexts in unsafe mode.

original commit: edd9ba3d656f3bd712e5e235b77225f756397077
2020-05-23 06:30:02 -06:00
Matthew Flatt
c5ee80bf0d adjust flonum printing to be more like %g
Adjust the choice between exponential and not.

Closes racket/racket#3195

original commit: 3a71e6fb6240d1c9e206064a613835c6eea871aa
2020-05-20 06:21:39 -06:00