[Git][ghc/ghc][wip/supersven/riscv64-ncg] 279 commits: configure: RELEASE=NO

Sven Tennie (@supersven) gitlab at gitlab.haskell.org
Sun May 26 14:28:42 UTC 2024



Sven Tennie pushed to branch wip/supersven/riscv64-ncg at Glasgow Haskell Compiler / GHC


Commits:
57ea249f by Bryan Richter at 2023-09-27T16:52:38+03:00
configure: RELEASE=NO

- - - - -
2b65bb7f by Teo Camarasu at 2023-12-13T12:06:12+05:30
rts: Ensure non-moving gc is not running when pausing

(cherry picked from commit aa84cff4f68e09cc33129ce3fe1bad5aff19e5d9)

- - - - -
b8d7a7b0 by Teo Camarasu at 2023-12-13T12:06:20+05:30
rts: Teach listAllBlocks about nonmoving heap

List all blocks on the non-moving heap.

Resolves #22627

(cherry picked from commit 5ad776abbb7c72d65d2ae27de5b2ec48b6e72cde)

- - - - -
b40bbcc0 by Profpatsch at 2023-12-13T12:10:19+05:30
base: Improve String & IsString documentation

(cherry picked from commit d751c583d29460f033fefb45e685fa40fb3487ad)

- - - - -
51d41567 by Finley McIlwaine at 2023-12-13T19:38:08+05:30
Ensure unconstrained instance dictionaries get IPE info

In the `StgRhsCon` case of `GHC.Stg.Debug.collectStgRhs`, we were not coming up
with an initial source span based on the span of the binder, which was causing
instance dictionaries without dynamic superclass constraints to not have source
locations in their IPE info. Now they do.

Resolves #24005

(cherry picked from commit 69abb1714ade3059593297f3a5faec4c07d1f984)

- - - - -
a9099ed0 by Simon Peyton Jones at 2023-12-13T19:38:08+05:30
Use correct FunTyFlag in adjustJoinPointType

As the Lint error in #23952 showed, the function adjustJoinPointType
was failing to adjust the FunTyFlag when adjusting the type.

I don't think this caused the seg-fault reported in the ticket,
but it is definitely.  This patch fixes it.

It is tricky to come up a small test case; Krzysztof came up with
this one, but it only triggers a failure in GHC 9.6.

(cherry picked from commit 8e05c54a8cb7e5ad2d584fad5b5ad878dd5488b6)

- - - - -
b71b053e by Andreas Klebinger at 2023-12-13T20:20:02+05:30
AArch64: Fix broken conditional jumps for offsets >= 1MB

Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps
to avoid overflowing the immediate.

Fixes #23746

(cherry picked from commit 2adc050857a9c1b992040fbfd55fbe65b2851b19)

- - - - -
fc6e4003 by Ben Gamari at 2023-12-13T20:20:02+05:30
configure: Fix #21712 again

This is a bit of a shot in the dark to fix #24033, which appears to be
another instance of #21712. For some reason the ld-override logic
*still* appears to be active on Darwin targets (or at least one).
Consequently, on misconfigured systems we may choose a non-`ld64`
linker.

It's a bit unclear exactly what happened in #24033 but ultimately the
check added for #21712 was not quite right, checking for the
`ghc_host_os` (the value of which depends upon the bootstrap compiler)
instead of the target platform. Fix this.

Fixes #24033.

(cherry picked from commit f6b2751f58df5f4f83caa7a7ca56e66659d02b09)

- - - - -
d1f94ba7 by Ben Gamari at 2023-12-13T20:20:02+05:30
rts/nonmoving: Fix on LLP64 platforms

Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL`
size suffix. However, this is wrong on LLP64 platforms like Windows,
where `long` is 32-bits.

Fixes #23003.
Fixes #24042.

(cherry picked from commit 8f6010b98f560200997a9d84a4e07bfd0ad6e496)

- - - - -
7a51125d by Sylvain Henry at 2023-12-13T20:20:02+05:30
Rts: expose rtsOutOfBoundsAccess symbol

(cherry picked from commit cbe4400d2690104053ec544cf7d0a9a13ee914ee)

- - - - -
9283b7d3 by Sylvain Henry at 2023-12-13T20:20:02+05:30
Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066)

bigNatIndex# in the `where` clause wasn't guarded by "bigNatIsZero a".

(cherry picked from commit fe0675770b66a9ed393884d96e276b8d116fa2a2)

- - - - -
c284a3e8 by Sylvain Henry at 2023-12-13T20:20:02+05:30
Bignum: fix right shift of negative BigNat with native backend

(cherry picked from commit cc1625b1ffbdf086b8380bacd35abc8d85861637)

- - - - -
d5de8a2a by Sylvain Henry at 2023-12-13T20:20:02+05:30
Hadrian: enable `-fcheck-prim-bounds` in validate flavour

This allows T24066 to fail when the bug is present.

Otherwise the out-of-bound access isn't detected as it happens in
ghc-bignum which wasn't compiled with the bounds check.

(cherry picked from commit 72c7380cb780933825bc84924908e01ce0495dc4)

- - - - -
83775ebb by Moritz Angermann at 2023-12-13T20:20:02+05:30
CgUtils.fixStgRegStmt respect register width

This change ensure that the reg + offset computation is always of the
same size.  Before this we could end up with a 64bit register, and then
add a 32bit offset (on 32bit platforms).  This not only would fail type
sanity checking, but also incorrectly truncate 64bit values into 32bit
values silently on 32bit architectures.

(cherry picked from commit dafc47091c9107dcf81e1e80a105f59211927c89)
(cherry picked from commit 8e7a2065e433aa56552b335d420b5bf925082078)

- - - - -
ab7bc679 by Moritz Angermann at 2023-12-13T20:20:02+05:30
[PEi386 linker] Bounds check and null-deref guard

We should resonably be able to expect that we won't exceed the number of
sections if we assume to be dealing with legal object files. We can however
not guarantee that we get some negative values, and while we try to
special case most, we should exclude negative indexing into the sections
array.

We also need to ensure that we do not try to derefences targetSection,
if it is NULL, due to the switch statement.

(cherry picked from commit df81536f2e53abf521a05eb1e482a076f5849c21)

- - - - -
d35f5d1a by Moritz Angermann at 2023-12-13T20:20:02+05:30
nativeGen: section flags for .text$foo only

Commit 3ece9856d157c85511d59f9f862ab351bbd9b38b, was supposed to fix
#22834 in !9810.

It does however add "xr" indiscriminatly to .text sections
even if splitSections is disabled. This leads to the assembler saying:

ghc_1.s:7849:0: error:
     Warning: Ignoring changed section attributes for .text
     |
7849 | .section .text,"xr"
     | ^

(cherry picked from commit e99cf237f84db34be0468a893b10394d6b364bce)

- - - - -
54617f3b by Ilias Tsitsimpis at 2023-12-13T20:20:02+05:30
hadrian: Pass -DNOSMP to C compiler when needed

Hadrian passes the -DNOSMP flag to GHC when the target doesn't support
SMP, but doesn't pass it to CC as well, leading to the following
compilation error on mips64el:

| Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d
Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0
===> Command failed with error code: 1
In file included from rts/include/Stg.h:348,
                 from rts/include/Rts.h:38,
                 from rts/hooks/FlagDefaults.c:8:
rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture
  416 | #error memory barriers unimplemented on this architecture
      |  ^~~~~
rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture
  440 | #error memory barriers unimplemented on this architecture
      |  ^~~~~
rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture
  464 | #error memory barriers unimplemented on this architecture
      |  ^~~~~

The old make system correctly passed this flag to both GHC and CC [1].

Fix this error by passing -DNOSMP to CC as well.

[1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407

Closes #24082

(cherry picked from commit 257c2807587624592813a42e06a05c5fc34cb38c)
(cherry picked from commit b2a03315f6336e2708ff54689f2241eb38198dd5)

- - - - -
f9ff2f06 by Moritz Angermann at 2023-12-13T20:20:02+05:30
[PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra

48e391952c17ff7eab10b0b1456e3f2a2af28a9b
introduced `SYM_TYPE_DUP_DISCARD` to the bitfield.

The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value.
Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us
relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions.

(cherry picked from commit 34f06334025521c2440ebedb0237697fbcc3c6de)

- - - - -
9397af86 by Claudio Bley at 2023-12-13T20:20:02+05:30
Only exit ghci in -e mode when :add command fails

Previously, when running `ghci -e ':add Sample.hs'` the process would
exit with exit code 1 if the file exists and could be loaded.

Fixes #24115

(cherry picked from commit d561073727186c7b456c9ef113ccb7fc0df4560e)

- - - - -
aee7728a by Zubin Duggal at 2023-12-13T20:20:02+05:30
driver: Don't lose track of nodes when we fail to resolve cycles

The nodes that take part in a cycle should include both hs-boot and hs files,
but when we fail to resolve a cycle, we were only counting the nodes from the
graph without boot files.

Fixes #24196

(cherry picked from commit 8db8d2fd1c881032b1b360c032b6d9d072c11723)

- - - - -
1ae57288 by Sylvain Henry at 2023-12-15T17:17:29+05:30
Fix unusable units and module reexport interaction (#21097)

This commit fixes an issue with ModUnusable introduced in df0f148feae.

In mkUnusableModuleNameProvidersMap we traverse the list of unusable
units and generate ModUnusable origin for all the modules they contain:
exposed modules, hidden modules, and also re-exported modules. To do
this we have a two-level map:

  ModuleName -> Unit:ModuleName (aka Module) -> ModuleOrigin

So for each module name "M" in broken unit "u" we have:
  "M" -> u:M -> ModUnusable reason

However in the case of module reexports we were using the *target*
module as a key. E.g. if "u:M" is a reexport for "X" from unit "o":
   "M" -> o:X -> ModUnusable reason

Case 1: suppose a reexport without module renaming (u:M -> o:M) from
unusable unit u:
   "M" -> o:M -> ModUnusable reason

Here it's claiming that the import of M is unusable because a reexport
from u is unusable. But if unit o isn't unusable we could also have in
the map:
   "M" -> o:M -> ModOrigin ...

Issue: the Semigroup instance of ModuleOrigin doesn't handle the case
(ModUnusable <> ModOrigin)

Case 2: similarly we could have 2 unusable units reexporting the same module
without renaming, say (u:M -> o:M) and (v:M -> o:M) with u and v
unusable. It gives:

  "M" -> o:M -> ModUnusable ... (for u)
  "M" -> o:M -> ModUnusable ... (for v)

Issue: the Semigroup instance of ModuleOrigin doesn't handle the case
(ModUnusable <> ModUnusable).

This led to #21097, #16996, #11050.

To fix this, in this commit we make ModUnusable track whether the module
used as key is a reexport or not (for better error messages) and we use
the re-export module as key. E.g. if "u:M" is a reexport for "o:X" and u
is unusable, we now record:

    "M" -> u:M -> ModUnusable reason reexported=True

So now, we have two cases for a reexport u:M -> o:X:
   - u unusable: "M" -> u:M -> ModUnusable ... reexported=True
   - u usable:   "M" -> o:X -> ModOrigin   ... reexportedFrom=u:M

The second case is indexed with o:X because in this case the Semigroup
instance of ModOrigin is used to combine valid expositions of a module
(directly or via reexports).

Note that module lookup functions select usable modules first (those who
have a ModOrigin value), so it doesn't matter if we add new ModUnusable
entries in the map like this:

  "M" -> {
    u:M -> ModUnusable ... reexported=True
    o:M -> ModOrigin ...
  }

The ModOrigin one will be used. Only if there is no ModOrigin or
ModHidden entry will the ModUnusable error be printed. See T21097 for an
example printing several reasons why an import is unusable.

(cherry picked from commit cee81370cd6ef256f66035e3116878d4cb82e28b)

- - - - -
cc1097f3 by Zubin Duggal at 2023-12-15T17:17:29+05:30
driver: Ensure we actually clear the interactive context before reloading

Previously we called discardIC, but immediately after set the session
back to an old HscEnv that still contained the IC

Partially addresses #24107
Fixes #23405

(cherry picked from commit fa148f6ed43f915f2ae40302dda1b8bae39512af)

- - - - -
cd61dd26 by Zubin Duggal at 2023-12-15T17:17:29+05:30
driver: Ensure we force the lookup of old build artifacts before returning the build plan

This prevents us from retaining all previous build artifacts in memory until a
recompile finishes, instead only retaining the exact artifacts we need.

Fixes #24118

(cherry picked from commit a62d4cb25b805dd7e12476db97a667fd542ea006)

- - - - -
33b3ff8a by Zubin Duggal at 2023-12-15T17:17:29+05:30
testsuite: add test for #24118 and #24107

MultiLayerModulesDefsGhci was not able to catch the leak because it uses
:l which discards the previous environment.

Using :r catches both of these leaks
(cherry picked from commit 244d3315352376eb7b946843fb0c512412842d7d)

- - - - -
27fec1c3 by Zubin Duggal at 2023-12-15T17:17:29+05:30
compiler: Add some strictness annotations to ImportSpec and related constructors
This prevents us from retaining entire HscEnvs.

Force these ImportSpecs when forcing the GlobalRdrEltX

Adds an NFData instance for Bag

Fixes #24107

(cherry picked from commit 306cb4e3e02e466f6c5a57c1a65fd2a5d13b3f89)

- - - - -
74fa25f0 by Zubin Duggal at 2023-12-15T17:17:30+05:30
compiler: Force IfGlobalRdrEnv in NFData instance.

(cherry picked from commit 77a3b580f561e62f5ac7ebf6588199575aafd3b4)

- - - - -
2e4b7832 by Pierre Le Marre at 2023-12-15T17:17:30+05:30
Update to Unicode 15.1.0

See: https://www.unicode.org/versions/Unicode15.1.0/
(cherry picked from commit 778c84b61679a8bb9dd83e2c41156abc0f39abd3)

- - - - -
b8eac3cf by Simon Peyton Jones at 2023-12-15T17:17:30+05:30
Add an extra check in kcCheckDeclHeader_sig

Fix #24083 by checking for a implicitly-scoped type variable that is not
actually bound.  See Note [Disconnected type variables] in GHC.Tc.Gen.HsType

For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler
allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures.

Metric Decrease:
    MultiLayerModulesTH_Make

(cherry picked from commit 6dbab1808bfbe484b3fb396aab1d105314f918d8)

- - - - -
110efc98 by Simon Peyton Jones at 2023-12-15T17:17:30+05:30
Second fix to #24083

My earlier fix turns out to be too aggressive for data/type families

See wrinkle (DTV1) in Note [Disconnected type variables]

(cherry picked from commit 2776920e642544477a38d0ed9205d4f0b48a782e)

- - - - -
01b8a66b by Alexis King at 2023-12-15T17:17:30+05:30
Don’t store the async exception masking state in CATCH frames

(cherry picked from commit 8b61dfd6dfc78bfa6bb9449dac9a336e5d668b5e)
(cherry picked from commit e538003c33251c5c843cac1e30b36f88bb859778)

- - - - -
cfbf9aa9 by Zubin Duggal at 2023-12-15T17:17:30+05:30
Bump array submodule to 0.5.6.0

- - - - -
bd31c2bb by Matthew Pickering at 2023-12-15T17:17:30+05:30
libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0

Updates filepath submodule
Updates unix submodule

Fixes #24240

(cherry picked from commit 36b9a38cc45a26865c4e45f4949e519a5dede76d)

- - - - -
207f897a by Matthew Pickering at 2023-12-15T17:17:30+05:30
Submodule linter: Allow references to tags

We modify the submodule linter so that if the bumped commit is a
specific tag then the commit is accepted.

Fixes #24241

(cherry picked from commit 91ff0971df64b04938d011fe1562320c5d90849a)

- - - - -
1fa23f43 by Zubin Duggal at 2023-12-15T17:17:30+05:30
hadrian: set -Wno-deprecations for directory and Win32

The filepath bump to 1.4.200.1 introduces a deprecation warning.

See https://gitlab.haskell.org/ghc/ghc/-/issues/24240
    https://github.com/haskell/filepath/pull/206

(cherry picked from commit 86f652dc9a649e59e643609c287a510a565f5408)

- - - - -
76bc5445 by Ben Gamari at 2023-12-15T17:17:30+05:30
Fix thunk update ordering

Previously we attempted to ensure soundness of concurrent thunk update
by synchronizing on the access of the thunk's info table pointer field.
This was believed to be sufficient since the indirectee (which may
expose a closure allocated by another core) would not be examined
until the info table pointer update is complete.

However, it turns out that this can result in data races in the presence
of multiple threads racing a update a single thunk. For instance,
consider this interleaving under the old scheme:

            Thread A                             Thread B
            ---------                            ---------
    t=0     Enter t
      1     Push update frame
      2     Begin evaluation

      4     Pause thread
      5     t.indirectee=tso
      6     Release t.info=BLACKHOLE

      7     ... (e.g. GC)

      8     Resume thread
      9     Finish evaluation
      10    Relaxed t.indirectee=x

      11                                         Load t.info
      12                                         Acquire fence
      13                                         Inspect t.indirectee

      14    Release t.info=BLACKHOLE

Here Thread A enters thunk `t` but is soon paused, resulting in `t`
being lazily blackholed at t=6. Then, at t=10 Thread A finishes
evaluation and updates `t.indirectee` with a relaxed store.

Meanwhile, Thread B enters the blackhole. Under the old scheme this
would introduce an acquire-fence but this would only synchronize with
Thread A at t=6. Consequently, the result of the evaluation, `x`, is not
visible to Thread B, introducing a data race.

We fix this by treating the `indirectee` field as we do all other
mutable fields. This means we must always access this field with
acquire-loads and release-stores.

See #23185.

(cherry picked from commit fa63b5902389aa929af5ec04b93b601fd456633f)
(cherry picked from commit fcfb0850d1960b677a2f6b9bdf45d8ccef169aeb)

- - - - -
2de05890 by Bryan Richter at 2023-12-15T17:17:30+05:30
Work around perf note fetch failure

Addresses #24055.

(cherry picked from commit 63afb701a1638d7bd32c34fb24a9fd3ff897b634)

- - - - -
592e41e2 by Zubin Duggal at 2023-12-15T17:17:30+05:30
Bump haddock submodule to 2.29.2

- - - - -
30d1b643 by Moritz Angermann at 2023-12-15T17:17:40+05:30
Drop hard Xcode dependency

XCODE_VERSION calls out to `xcodebuild`, which is only available
when having `Xcode` installed. The CommandLineTools are not
sufficient. To install Xcode, you must have an apple id to download
the Xcode.xip from apple.

We do not use xcodebuild anywhere in our build explicilty. At best
it appears to be a proxy for checking the linker or the compiler.
These should rather be done with
```
xcrun ld -version
```
or similar, and not by proxy through Xcode. The CLR should be
sufficient for building software on macOS.

(cherry picked from commit a3ee3b99e6889fd68da75c6ea7a14d101f71da56)

- - - - -
5a77075c by Matthew Craven at 2023-12-15T17:39:36+05:30
Make 'wWarningFlagsDeps' include every WarningFlag

Fixes #24071.

(cherry picked from commit a2c0fff61afdb14b5f2624374aa5767e7b238ff4)

- - - - -
31bc8575 by Ben Gamari at 2023-12-15T17:40:16+05:30
rts/eventlog: Fix off-by-one in assertion

Previously we failed to account for the NULL terminator `postString`
asserted that there is enough room in the buffer for the string.

(cherry picked from commit d0b17576148d336b67c7d65bcf742f83001413cb)

- - - - -
a62134f2 by Ben Gamari at 2023-12-15T17:40:25+05:30
rts/eventlog: Honor result of ensureRoomForVariableEvent is

Previously we would keep plugging along, even if isn't enough room for
the event.

(cherry picked from commit a10f9b9bc510051a5b47d31238aad1174f7a1966)

- - - - -
472582dc by Ben Gamari at 2023-12-15T17:40:34+05:30
rts/eventlog: Avoid truncating event sizes

Previously ensureRoomForVariableEvent would truncate the desired size to
16-bits, resulting in #24197.

Fixes #24197.

(cherry picked from commit 0e0f41c0e3d9c67fc669e975060e88bccdc7d823)

- - - - -
65699dd6 by Ben Gamari at 2023-12-15T17:41:37+05:30
rts/EventLog: Place eliminate duplicate strlens

Previously many of the `post*` implementations would first compute the
length of the event's strings in order to determine the event length.
Later we would then end up computing the length yet again in
`postString`. Now we instead pass the string length to `postStringLen`,
avoiding the repeated work.

(cherry picked from commit c350df3ce0e5c207b90eb3e74e04c77826c56283)

- - - - -
39236678 by Ben Gamari at 2023-12-15T17:41:45+05:30
rts/eventlog: Place upper bound on IPE string field lengths

The strings in IPE events may be of unbounded length. Limit the lengths
of these fields to 64k characters to ensure that we don't exceed the
maximum event length.

(cherry picked from commit 9340d9987abe2ebf7f66659ffc48a822586f6edd)

- - - - -
bc444199 by Zubin Duggal at 2023-12-15T17:41:51+05:30
rts: drop unused postString function

(cherry picked from commit 6e03bfdfdb74de2a8b51d3008233392a6f0a9965)

- - - - -
5ac485d2 by Zubin Duggal at 2023-12-15T19:04:19+05:30
Bump base to 4.18.2.0 and add changelog

- - - - -
1405682a by Sebastian Graf at 2023-12-15T19:51:47+05:30
Cpr: Turn an assertion into a check to deal with some dead code (#23862)

See the new `Note [Dead code may contain type confusions]`.

Fixes #23862.

(cherry picked from commit 57c391c463f26b7025df9b340ad98416cff1d2b2)

- - - - -
123b0cf7 by Matthew Pickering at 2023-12-18T14:56:22+05:30
ghcup-metadata: Use dynamically linked alpine bindists

In theory these will work much better on alpine to allow people to build
statically linked applications there. We don't need to distribute a
statically linked application ourselves in order to allow that.

Fixes #23602

(cherry picked from commit e524fa7f67259a093aeb21aada139137626c581c)

- - - - -
de70b89d by Rodrigo Mesquita at 2023-12-18T14:56:22+05:30
Suppress duplicate librares linker warning of new macOS linker

Fixes #24167

XCode 15 introduced a new linker which warns on duplicate libraries being
linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as
suggested by Brad King in CMake issue #25297.

This flag isn't necessarily available to other linkers on darwin, so we must
only configure it into the CC linker arguments if valid.

(cherry picked from commit e98051a5e7251390799f9fdead988c61d72e82e3)

- - - - -
273f5a3f by Rodrigo Mesquita at 2023-12-18T20:33:03+05:30
darwin: Fix single_module is obsolete warning

In XCode 15's linker, -single_module is the default and otherwise
passing it as a flag results in a warning being raised:

    ld: warning: -single_module is obsolete

This patch fixes this warning by, at configure time, determining whether
the linker supports -single_module (which is likely false for all
non-darwin linkers, and true for darwin linkers in previous versions of
macOS), and using that information at runtime to decide to pass or not
the flag in the invocation.

Fixes #24168

(cherry picked from commit e6c803f702e8b09dfd0073b973b8afcd7071db50)

- - - - -
000a6a8f by Josh Meredith at 2023-12-18T20:33:03+05:30
JS: fix bounds checking (Issue 23123)

* For ByteArray-based bounds-checking, the JavaScript backend must use the
`len` field, instead of the inbuild JavaScript `length` field.

* Range-based operations must also check both the start and end of the range
for bounds

* All indicies are valid for ranges of size zero, since they are essentially no-ops

* For cases of ByteArray accesses (e.g. read as Int), the end index is
(i * sizeof(type) + sizeof(type) - 1), while the previous implementation
uses (i + sizeof(type) - 1). In the Int32 example, this is (i * 4 + 3)

* IndexByteArrayOp_Word8As* primitives use byte array indicies (unlike
the previous point), but now check both start and end indicies

* Byte array copies now check if the arrays are the same by identity and
then if the ranges overlap.

(cherry picked from commit 116d7312ec4c76f75a26bd0ad2b2815710049e0e)

- - - - -
d86cd08b by Sylvain Henry at 2023-12-18T20:40:08+05:30
Fix remaining issues with bound checking (#23123)

While fixing these I've also changed the way we store addresses into
ByteArray#. Addr# are composed of two parts: a JavaScript array and an
offset (32-bit number).

Suppose we want to store an Addr# in a ByteArray# foo at offset i.
Before this patch, we were storing both fields as a tuple in the "arr"
array field:

  foo.arr[i] = [addr_arr, addr_offset];

Now we only store the array part in the "arr" field and the offset
directly in the array:

  foo.dv.setInt32(i, addr_offset):
  foo.arr[i] = addr_arr;

It avoids wasting space for the tuple.

(cherry picked from commit 2d5c1ddecf195da9a8ee4f7b38fbb79d3b680aeb)

- - - - -
34e8cf3c by Matthew Pickering at 2023-12-18T23:29:39+05:30
testsuite: Fix T21097b test with make 4.1 (deb9)

cee81370cd6ef256f66035e3116878d4cb82e28b recently added a test which
failed on deb9 because the version of make was emitting the recipe
failure to stdout rather than stderr.

One way to fix this is to be more precise in the test about which part
of the output we care about inspecting.

(cherry picked from commit bad3765668cc5badf5d0a19100fac95125985473)

- - - - -
908c485f by Zubin Duggal at 2023-12-18T23:29:42+05:30
Prepare release 9.6.4

Metric Decrease:
    T13701

- - - - -
c08f898a by Zubin Duggal at 2024-01-03T13:01:39+05:30
docs: document permissibility of -XOverloadedLabels (#24249)

Document the permissibility introduced by
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst

(cherry picked from commit c247b6befe6a599688bad0a3383424f7ea12d5f2)

- - - - -
a138877d by Stefan Schulze Frielinghaus at 2024-01-03T13:21:32+05:30
llvmGen: Align objects in the data section

Objects in the data section may be referenced via tagged pointers.
Thus, align those objects to a 4- or 8-byte boundary for 32- or 64-bit
platforms, respectively.  Note, this may need to be reconsidered if
objects with a greater natural alignment requirement are emitted as e.g.
128-bit atomics.

Fixes #24163.

(cherry picked from commit dfe1c3540e4b519b62b862b5966dfec5cae9ece1)

- - - - -
496fbe2e by Ben Gamari at 2024-01-03T13:21:32+05:30
distrib: Rediscover otool and install_name_tool on Darwin

In the bindist configure script we must rediscover the `otool` and
`install_name_tool`s since they may be different from the build
environment.

Fixes #24211.

(cherry picked from commit 292983c841b4facd5c48fcec9689448d66bcb90e)

- - - - -
b8544fe8 by Matthew Craven at 2024-01-03T13:21:32+05:30
Bump bytestring submodule to 0.11.5.3

(cherry picked from commit 97a187bfd713663fccb8bc4f4f0c92792547f9c2)

- - - - -
45c8117a by Zubin Duggal at 2024-01-03T13:21:32+05:30
ci: Ensure we use the correct bindist name for the test artifact when generating
release ghcup metadata

Fixes #24268

(cherry picked from commit 0c555b74f3d9fa92423aebc768c3626a632203a8)

- - - - -
615a63d3 by Zubin Duggal at 2024-01-03T23:40:38+05:30
Update release notes for 9.6.4

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
b3ddb687 by Zubin Duggal at 2024-01-04T21:30:21+05:30
ci: Allow release-hackage-lint to fail

Otherwise it blocks the ghcup metadata pipeline from running.

(cherry picked from commit e8960b0af7904f7646915e1ba847e18bfbf3067c)

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
6c38127e by Zubin Duggal at 2024-01-05T02:19:01+05:30
gitlab-ci: Use ghc 9.2.8 for generate_jobs

Nix can't find ghc 9.2.4 for some reason, resulting in the lint-ci-config job failing

- - - - -
f60d485c by Zubin Duggal at 2024-01-07T19:48:43+05:30
gitlab-ci: Use ghc 9.2.8 for generate_jobs_metadata

Nix can't find ghc 9.2.4 for some reason, resulting in the lint-ci-config job failing

Metric Decrease:
    MultiLayerModulesTH_Make

Metric Increase:
    MultiLayerModulesTH_Make

- - - - -
b3abeb84 by Zubin Duggal at 2024-01-08T13:15:07+05:30
ci: Fix typo in mk_ghcup_metadata.py

- - - - -
34f8c00d by Rodrigo Mesquita at 2024-01-08T17:34:54+05:30
testsuite: Update to LC_ALL=C no longer being ignored in darwin

MacOS seems to have fixed an issue where it used to ignore the variable
`LC_ALL` in program invocations and default to using Unicode.

Since the behaviour seems to be fixed to account for the locale
variable, we mark tests that were previously broken in spite of it as
fragile (since they now pass in recent macOS distributions)

See #24161

(cherry picked from commit ce7fe5a916d50f471812f4714615e13f557fe57a)

- - - - -
3187fc76 by Rodrigo Mesquita at 2024-01-08T17:36:12+05:30
testsuite: Encoding test witnesses recent iconv bug is fragile

A regression in the new iconv() distributed with XCode 15 and MacOS
Sonoma causes the test 'encoding004' to fail in the CP936 roundrip.

We mark this test as fragile until this is fixed upstream (rather than
broken, since previous versions of iconv pass the test)

See #24161

(cherry picked from commit c411c431e7ae1f0effbe9f9a624c7f9171d50f0a)

- - - - -
27bfad83 by Ben Gamari at 2024-03-26T14:09:03+05:30
rts: Various warnings fixes

(cherry picked from commit 1e48c43483693398001bfb0ae644a3558bf6a9f3)

- - - - -
04ca575c by Cheng Shao at 2024-04-02T15:06:39+05:30
compiler: fix eager blackhole symbol in wasm32 NCG

(cherry picked from commit fe50eb3510ca730c4d2fc57778d380fdc493abd8)

- - - - -
b89427db by Cheng Shao at 2024-04-02T15:07:17+05:30
testsuite: fix optasm tests for wasm32

(cherry picked from commit af77114815ad9052261898c830171e49fbed5160)

- - - - -
8bfaa7a4 by Matthew Pickering at 2024-04-02T15:08:07+05:30
testsuite: Add wasm32 to testsuite arches with NCG

The compiler --info reports that wasm32 compilers have a NCG, so we
should agree with that here.

(cherry picked from commit 1b90735c99f1179328f6dd67dbcc81f964901a19)

- - - - -
69b6dcb7 by PHO at 2024-04-02T15:09:07+05:30
Don't assume the current locale is *.UTF-8, set the encoding explicitly

primops.txt contains Unicode characters:
> LC_ALL=C ./genprimopcode --data-decl < ./primops.txt
> genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226)

Hadrian must also avoid using readFile' to read primops.txt because it
tries to decode the file with a locale-specific encoding.

(cherry picked from commit 52c0fc691e6501e99a96693ec1fc02e3c93a4fbc)

- - - - -
2fb2272b by mmzk1526 at 2024-04-02T15:09:26+05:30
Use "-V" for alex version check for better backward compatibility
Fixes #24302.
In recent versions of alex, "-v" is used for "--verbose" instead of "-version".

(cherry picked from commit c7be0c680d96ba6209c86e509ab2682e5041a53d)

- - - - -
db500aef by Matthew Craven at 2024-04-02T15:11:32+05:30
Fix loopification in the presence of void arguments

This also removes Note [Void arguments in self-recursive tail calls],
which was just misleading.  It's important to count void args both
in the function's arity and at the call site.

Fixes #24295.

(cherry picked from commit ae9cc1a84c9f470b77d98423400e6dfa95b2449b)

- - - - -
7a0b40b5 by Simon Peyton Jones at 2024-04-02T15:12:18+05:30
Make TYPE and CONSTRAINT not-apart

Issue #24279 showed up a bug in the logic in GHC.Core.Unify.unify_ty
which is supposed to make TYPE and CONSTRAINT be not-apart.

Easily fixed.

(cherry picked from commit af6932d6c068361c6ae300d52e72fbe13f8e1f18)

- - - - -
16243c32 by Matthew Pickering at 2024-04-02T15:12:33+05:30
eventlog: Fix off-by-one error in postIPE

We were missing the extra_comma from the calculation of the size of the
payload of postIPE. This was causing assertion failures when the event
would overflow the buffer by one byte, as ensureRoomForVariable event
would report there was enough space for `n` bytes but then we would
write `n + 1` bytes into the buffer.

Fixes #24287

(cherry picked from commit 5776008c7a5581193c3e72e59451ad49abac9d81)

- - - - -
dea31f2c by Jade at 2024-04-02T15:14:31+05:30
Improve documentation of hGetLine.

- Add explanation for whether a newline is returned
- Add examples

Fixes #14804

(cherry picked from commit ab47a43d64f6b7d4fc181645171c31ba2db1eebe)

- - - - -
0632a1f1 by Hécate Moonlight at 2024-04-02T15:15:10+05:30
Clarification for newtype constructors when using `coerce`

(cherry picked from commit 699da01bbbf3e42c7d38b9cfe443dd0e8e256342)

- - - - -
111d1613 by Patrick at 2024-04-02T15:16:13+05:30
Fix bug wrong span of nested_doc_comment #24378

close #24378
1. Update the start position of span in `nested_doc_comment` correctly.
and hence the spans of identifiers of haddoc can be computed correctly.
2. add test `HaddockSpanIssueT24378`.

(cherry picked from commit 8eeadfad3a0035f8c5b339782676ff23572e0e5e)

- - - - -
9f893fe9 by Teo Camarasu at 2024-04-02T15:16:46+05:30
doc: Add -Dn flag to user guide

Resolves #24394

(cherry picked from commit 94ce031ddc84ee702c12a11793028ef21e65fa00)

- - - - -
7a9555f5 by Rodrigo Mesquita at 2024-04-02T15:17:03+05:30
Work around autotools setting C11 standard in CC/CXX

In autoconf >=2.70, C11 is set by default for $CC and $CXX via the
-std=...11 flag. In this patch, we split the "-std" flag out of the $CC
and $CXX variables, which we traditionally assume to be just the
executable name/path, and move it to $CFLAGS/$CXXFLAGS instead.

Fixes #24324

(cherry picked from commit cdddeb0f1280b40cc194028bbaef36e127175c4c)

- - - - -
1ad632d2 by Zubin Duggal at 2024-04-02T15:17:15+05:30
driver: Really don't lose track of nodes when we fail to resolve cycles

This fixes a bug in 8db8d2fd1c881032b1b360c032b6d9d072c11723, where we could lose
track of acyclic components at the start of an unresolved cycle. We now ensure we
never loose track of any of these components.

As T24275 demonstrates, a "cyclic" SCC might not really be a true SCC:

When viewed without boot files, we have a single SCC

```
[REC main:T24275B [main:T24275B {-# SOURCE #-},
                   main:T24275A {-# SOURCE #-}]
     main:T24275A [main:T24275A {-# SOURCE #-}]]
```

But with boot files this turns into

```
[NONREC main:T24275B {-# SOURCE #-} [],
 REC main:T24275B [main:T24275B {-# SOURCE #-},
                   main:T24275A {-# SOURCE #-}]
    main:T24275A {-# SOURCE #-} [main:T24275B],
 NONREC main:T24275A [main:T24275A {-# SOURCE #-}]]
```

Note that this is truly not an SCC, as no nodes are reachable from T24275B.hs-boot.
However, we treat this entire group as a single "SCC" because it seems so when we
analyse the graph without taking boot files into account.

Indeed, we must return a single ResolvedCycle element in the BuildPlan for this
as described in Note [Upsweep].

However, since after resolving this is not a true SCC anymore, `findCycle` fails
to find a cycle and we have a sub-optimal error message as a result.

To handle this, I extended `findCycle` to not assume its input is an SCC, and to
try harder to find cycles in its input.

Fixes #24275

(cherry picked from commit 532993c8160d960f848e7abd401774b6879e3ee8)

- - - - -
c821fd7c by Matthew Pickering at 2024-04-02T15:17:30+05:30
distrib/configure: Fix typo in CONF_GCC_LINKER_OPTS_STAGE2 variable

Instead we were setting CONF_GCC_LINK_OPTS_STAGE2 which meant that we
were missing passing `--target` when invoking the linker.

Fixes #24414

(cherry picked from commit d309f4e7e37f3795c6d6b150c407d5a9b332854e)

- - - - -
7c78d930 by Matthew Craven at 2024-04-02T15:25:17+05:30
Add @since annotation to Data.Data.mkConstrTag

(cherry picked from commit 249caf0d2345ac2e6046847522bb8f2fff7f8835)

- - - - -
ae4e8004 by Jade at 2024-04-02T15:26:07+05:30
Enhance documentation of Data.Complex

(cherry picked from commit cdd939e77f2bb20f80310280400b3426598b4eca)

- - - - -
afabec98 by Rodrigo Mesquita at 2024-04-02T15:26:35+05:30
configure: Do not override existing linker flags in FP_LD_NO_FIXUP_CHAINS

(cherry picked from commit 9460d5044b8c7239fb7a6ce875d084617f159c7f)

- - - - -
2ca013d7 by Teo Camarasu at 2024-04-02T15:26:51+05:30
rts: only collect live words in nonmoving census when non-concurrent

This avoids segfaults when the mutator modifies closures as we examine
them.

Resolves #24393

(cherry picked from commit 84357d1143fe4f9076253160f78fac6c2acc8e5b)

- - - - -
622d76d6 by j at 2024-04-02T15:31:35+05:30
Disable several ignore-warning flags in genapply.

(cherry picked from commit faea4bcdf4e71120a5480530fb1879e4439ed512)

- - - - -
a1bf252e by Cheng Shao at 2024-04-02T15:33:24+05:30
Fix genapply for cross-compilation by nuking fragile CPP logic

This commit fixes incorrectly built genapply when cross compiling
(#24347) by nuking all fragile CPP logic in it from the orbit. All
target-specific info are now read from DerivedConstants.h at runtime,
see added note for details. Also removes a legacy Makefile and adds
haskell language server support for genapply.

(cherry picked from commit dd4af0e5a4a3af208bdf57e8237d85261eef24f7)

- - - - -
a4767444 by Ben Gamari at 2024-04-02T16:45:26+05:30
hadrian: Generate HSC2HS_EXTRAS variable in bindist installation

We must generate the hsc2hs wrapper at bindist installation time since
it must contain `--lflag` and `--cflag` arguments which depend upon the
installation path.

The solution here is to substitute these variables in the configure
script (see mk/hsc2hs.in). This is then copied over a dummy wrapper in
the install rules.

Fixes #24050.

(cherry picked from commit efcbad2dfd242d0bc2c91da5390fe8456a536cc3)
(cherry picked from commit 2eca9c7afedda0b08316b16b0bfd31c60c201ce6)

- - - - -
b3c2901c by Matthew Pickering at 2024-04-02T16:45:26+05:30
ci: Show --info for installed compiler

(cherry picked from commit c540559cf188625bec668fa6cd94d4f94413d730)
(cherry picked from commit d5246e19ebf9a9ddb8dcf04f513e3d365f9d453d)

- - - - -
f5eaaab5 by Hécate Moonlight at 2024-04-02T16:45:26+05:30
Improve the synopsis and description of base

(cherry picked from commit 0eb2265d816f733094506034ba6285a447ebd3a5)

- - - - -
7d95c980 by Vladislav Zavialov at 2024-04-02T16:45:26+05:30
Fix (~) and (@) infix operators in TH splices (#23748)

8168b42a "Whitespace-sensitive bang patterns" allows GHC to accept
the following infix operators:

	a ~ b = ()
	a @ b = ()

But not if TH is used to generate those declarations:

	$([d| a ~ b = ()
	      a @ b = ()
	    |])

	-- Test.hs:5:2: error: [GHC-55017]
	--    Illegal variable name: ‘~’
	--    When splicing a TH declaration: (~_0) a_1 b_2 = GHC.Tuple.Prim.()

This is easily fixed by modifying `reservedOps` in GHC.Utils.Lexeme

(cherry picked from commit 46fd8ced0cc031f2e50a1a4b348738fd39b4a741)

- - - - -
d74ffbbb by Fendor at 2024-04-15T12:31:20+05:30
Escape multiple arguments in the settings file

Uses responseFile syntax.

The issue arises when GHC is installed on windows into a location that
has a space, for example the user name is 'Fake User'.
The $topdir will also contain a space, consequentially.
When we resolve the top dir in the string `-I$topdir/mingw/include`,
then `words` will turn this single argument into `-I/C/Users/Fake` and
`User/.../mingw/include` which trips up the flag argument parser of
various tools such as gcc or clang.
We avoid this by escaping the $topdir before replacing it in
`initSettngs`.
Additionally, we allow to escape spaces and quotation marks for
arguments in `settings` file.

Add regression test case to count the number of options after variable
expansion and argument escaping took place.
Additionally, we check that escaped spaces and double quotation marks are
correctly parsed.

(cherry picked from commit 31bf85ee49fe2ca0b17eaee0774e395f017a9373)

- - - - -
a5a7a0ce by Florian Weimer at 2024-04-15T12:31:20+05:30
Fix C output for modern C initiative

GCC 14 on aarch64 rejects the C code written by GHC with this kind of
error:

   error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion]
         68 | *(ffi_arg*)resp = cret;
            |                 ^

Add the correct cast.

For more information on this see:
https://fedoraproject.org/wiki/Changes/PortingToModernC

Tested-by: Richard W.M. Jones <rjones at redhat.com>
(cherry picked from commit 1f534c2e7388273e70534680212c1357614c11ed)

- - - - -
af368514 by Rodrigo Mesquita at 2024-04-15T12:31:20+05:30
configure: Use LDFLAGS when trying linkers

A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
check for a working linker. If either of these fail, we try the next in
line.

However, we were not considering the `$LDFLAGS` when checking if these
linkers worked. So we would pick a linker that does not support the
current $LDFLAGS and fail further down the line when we used that linker
with those flags.

Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
supported by `ld.gold` but that was being picked still.

(cherry picked from commit 32a8103f3b3e22907fdd67b69c919c5251d8cc20)

- - - - -
7ca2ca58 by Cheng Shao at 2024-04-15T12:31:21+05:30
libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6

This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which
includes numerous upstream libffi fixes, especially
https://github.com/libffi/libffi/issues/760.

(cherry picked from commit 810660b780e1111b36c91326bcd0041e1f62706b)

- - - - -
291db356 by Cheng Shao at 2024-04-15T12:31:21+05:30
rts: fix clang compilation on aarch64

This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h
which causes "error: address argument to atomic operation must be a
pointer to _Atomic type" when compiling with clang on aarch64.

(cherry picked from commit 7db8c9927fae3369fc4ecff68f80c4cb32eea757)

- - - - -
014e9ad9 by Cheng Shao at 2024-04-15T12:31:21+05:30
testsuite: add the req_process predicate

This patch adds the req_process predicate to the testsuite to assert
the platform has a process model, also marking tests that involve
spawning processes as req_process. Also bumps hpc & process submodule.

(cherry picked from commit ce580426ce3052e3b3d2847d0312652ea9087994)

- - - - -
cd3a199f by Jade at 2024-04-15T12:31:21+05:30
Improve documentation of Semigroup & Monoid

This commit aims to improve the documentation of various symbols
exported from Data.Semigroup and Data.Monoid

(cherry picked from commit fa4e5913251786f2b535b31abd3fad39da8b3602)

- - - - -
b895d534 by Simon Peyton Jones at 2024-04-15T12:31:21+05:30
Make decomposeRuleLhs a bit more clever

This fixes #24370 by making decomposeRuleLhs undertand
dictionary /functions/ as well as plain /dictionaries/

(cherry picked from commit ca2e919ecca35db412e772d7eadd6a7c4fb20e4b)

- - - - -
49c2986e by Teo Camarasu at 2024-04-15T12:31:21+05:30
rts: avoid checking bdescr of value outside of Haskell heap

In nonmovingTidyWeaks we want to check if the key of a weak pointer
lives in the non-moving heap. We do this by checking the flags of the
block the key lives in. But we need to be careful with values that live
outside the Haskell heap, since they will lack a block descriptor and
looking for one may lead to a segfault. In this case we should just
accept that it isn't on the non-moving heap.

Resolves #24492

(cherry picked from commit 74b24a9b0084459b8aa426a502956bd332b4d0fb)

- - - - -
3a2dfe28 by Zubin Duggal at 2024-04-15T12:31:21+05:30
Bump filepath submodule to 1.4.300.1
Bump directory submodule to 1.3.8.4
Bump process submodule to 1.6.18.0

- - - - -
753131c5 by Zubin Duggal at 2024-04-15T12:31:21+05:30
Bump process submodule to 1.6.19.0

- - - - -
dd41d36f by Zubin Duggal at 2024-04-15T14:33:41+05:30
Disable `-fasm-shortcutting` on -O2 and warn about its usage.

This flag is known to result in unsound optimisations potentially resulting in
incorrect runtime behaviour (#24507).

(cherry picked from commit 4ae8d89e376d79b4188c61e6469c7f01d8445768)

- - - - -
ea08f128 by Zubin Duggal at 2024-04-15T14:33:41+05:30
Bump Cabal submodule to 3.10.3.0

- - - - -
252188bb by Zubin Duggal at 2024-04-15T14:33:41+05:30
Cherry pick

* Fix some primitives defined in GHC.JS.Prim

from

Base/JS: GHC.JS.Foreign.Callback module (issue 23126)

(cherry picked from commit 27d2978e5412f2bef4448e208182a03137dd5ee8)

- - - - -
650c34ab by Zubin Duggal at 2024-04-15T14:35:36+05:30
Prepare release 9.6.5

Metric Increase:
    MultiLayerModulesTH_Make

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
35693a18 by Moritz Angermann at 2024-05-25T13:39:05+02:00
Bring back old aarch64 test-suite

- - - - -
ae0ce091 by Moritz Angermann at 2024-05-25T13:39:05+02:00
Add RV64 backend

- - - - -
0e390997 by Moritz Angermann at 2024-05-25T13:39:05+02:00
Add RV64 notes

- - - - -
ec53f7af by Moritz Angermann at 2024-05-25T13:39:05+02:00
Fixup Rebase mistake

- - - - -
513a5c88 by Sven Tennie at 2024-05-25T13:39:05+02:00
Remove TAB character

The whitespace linter doesn't like it.

- - - - -
a9f9ba9c by Sven Tennie at 2024-05-25T13:39:05+02:00
Fix compiler warning about importing GHC.Utils.Panic.Plain in CodeGen.Platform.h

- - - - -
700517f6 by Sven Tennie at 2024-05-25T13:39:05+02:00
Pretty-print registers by their alias names

The alias name is easier to memorize and simplifies reasoning
about what's going on.

- - - - -
b92a9655 by Sven Tennie at 2024-05-25T13:39:05+02:00
Fix getAmode: Only signed 12bit immediates

The symptom to find this was a too big immediate in a LW instruction in
test arr020:
    Error: illegal operands `lw t0,4016(t0)'

- - - - -
df88fccc by Ben Gamari at 2024-05-25T13:39:06+02:00
hadrian: Pass CROSS_EMULATOR to runtests.py

- - - - -
b4ef1117 by Ben Gamari at 2024-05-25T13:39:06+02:00
testsuite/driver: Add basic support for testing cross-compilers

- - - - -
ff39dbd1 by Sven Tennie at 2024-05-25T13:39:06+02:00
Add OR and ORI instructions

ORR doesn't exist on RISCV. OR with register load is used when the
immediate is too big for ORI (i.e. >12bits.)

- - - - -
612b0235 by Sven Tennie at 2024-05-25T13:39:06+02:00
Refine TODO comment: Stack frame header size is 2 * 8 byte

The stack frame header should contain two registers: ra and previous fp

- - - - -
182c6d67 by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix MOV with immediate

There are three cases:
- Fits in a 12bit immediate slot -> ADDI
- Fits in 32bit -> %hi / %lo piecewise loading
- Else: Let the assembler solve this issue for now, LI

- - - - -
9a260c55 by Sven Tennie at 2024-05-25T13:39:06+02:00
Add DIV and REM

REM calculates the remainder and replaces the more complex logic copied
from AARCH64.

- - - - -
d8c48dda by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix: LDRB -> LB, LDRH -> LH

A simple translation of these instructions from ARM to RISCV.

Add panic-ing pattern matches to fetch the outstanding STR and LDR
cases.

- - - - -
bee30c7e by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MO_S_Shr and truncateReg

These store and load on the stack to move values in changed widths into
registers.

- - - - -
c9e7b7e5 by Sven Tennie at 2024-05-25T13:39:06+02:00
CmmInt 0 should refer to zero register

A constant 0 can always be taken from the zero register.

- - - - -
5ac45788 by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix signed shift right

This includes overhauling the sign extension and width truncation logic.

- - - - -
fb4f04e6 by Sven Tennie at 2024-05-25T13:39:06+02:00
Replace SXTH & SXTB

Both do not exist on RISCV64. While touching the sign extension code,
also fix the integer calling convention in this sense and update the
sign extension note.

- - - - -
4024dbc1 by Sven Tennie at 2024-05-25T13:39:06+02:00
Allow truncation to from smaller to larger Width

This is used as inverse of sign extension to 64bit at many places.

- - - - -
71e9c223 by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MO_NOT: Replace MVN

MVN does not exist in RV64. Replace it by pseudo-instr not's effective
assembly.

- - - - -
0950cd1b by Sven Tennie at 2024-05-25T13:39:06+02:00
Replace UXTB & UXTH, Fix UDIV

Replace UXTB and UXTB with truncateReg as these instructions do not
exist in RISCV64. UDIV is named DIVU in RISCV64.

- - - - -
7e12cd9a by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement XOR

Delete EOR which does not exist on RISCV64.

- - - - -
a5bf6229 by Sven Tennie at 2024-05-25T13:39:06+02:00
Rename UDIV -> DIVU

That's how unsigned div is called on RISCV64. This should avoid confusion.

- - - - -
4d5833a6 by Sven Tennie at 2024-05-25T13:39:06+02:00
Delete unused EON

It does not exist on RISCV64.

- - - - -
96c55753 by Sven Tennie at 2024-05-25T13:39:06+02:00
WIP: MO_S_MulMayOflo

- - - - -
754ab240 by Moritz Angermann at 2024-05-25T13:39:06+02:00
float: first stab at supporting float ins

- - - - -
55561e55 by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix & test MulMayOflo

- - - - -
ba6e4e7e by Sven Tennie at 2024-05-25T13:39:06+02:00
Cleanup the MulMayOflo story

- - - - -
766d5cd3 by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MO_ReadBarrier and MO_WriteBarrier

The levels are taken from SMP.h write_barrier() and load_load_barrier().

- - - - -
8c5c7369 by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MO_AtomicRead and MO_AtomicWrite

- - - - -
8c675cd9 by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement register -> stack spilling

- - - - -
bf31715f by Sven Tennie at 2024-05-25T13:39:06+02:00
Add free reg counts for trivColorable

- - - - -
58a4de56 by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix immediate operand related guards

For most operations, the immediate's boundaries are those of a 12bit
integer.

- - - - -
0d61c3ae by Sven Tennie at 2024-05-25T13:39:06+02:00
Assign x31 to be IP register

And, use it for register spilling.

- - - - -
158d1a19 by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MO_FS_Conv and MO_SF_Conv (integer <-> float conversion)

- - - - -
c69e35da by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix MO_U_Shr (UBFX does not exist in RISCV ISA)

- - - - -
abd92ef1 by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix (CmmLit (CmmInt w i)) where i doesn't fit in w

- - - - -
8805ad6e by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MOV for ImmInt immediates

These cases were likely just forgotten.

- - - - -
d3bf1c15 by Sven Tennie at 2024-05-25T13:39:06+02:00
Load integers in their positive representation and don't sign extend unsigned values in foreign C calls

Otherwise, the sign bits mess up everything!

- - - - -
253345a9 by Sven Tennie at 2024-05-25T13:39:06+02:00
Just narrow all CmmLit . CmmInt to the expected width

There may appear immediates that don't fit the size. Just truncate them
with narrowU. Otherwise, some bit operations fail for the highest bit.

- - - - -
319195fa by Sven Tennie at 2024-05-25T13:39:06+02:00
Implement MO_UU_Conv

Expect zero extended (!) register. If the source Width is smaller or
equal to the target Width just move (copy) the value. Otherwise (target
Width is smaller), truncate it.

We don't need to care about sign-extension, as this mach op is unsigned.

- - - - -
03541ef7 by Sven Tennie at 2024-05-25T13:39:06+02:00
CmmLoad: Load sub-words unsigned (no sign-extension)

The contract is that each operation should leave sub-words
zero-extended.

This fixes the test (test-primops):

//    Failed:
//    0::W64 - (~(zext[W32→W64](load[W32](0x8c::W64))))
//    ((0 :: bits64) - (~%zx64(bits32[buffer + (140 :: bits64)])))
//    0x8f8e8d8d /= 0xffffffff8f8e8d8d

test(bits64 buffer) {
    bits64 ret;
    ret = ((0 :: bits64) - (~%zx64(bits32[buffer + (140 :: bits64)])));
    return (ret);
}

- - - - -
20f2cf4a by Sven Tennie at 2024-05-25T13:39:06+02:00
Annotate more instructions

- - - - -
30321f06 by Sven Tennie at 2024-05-25T13:39:06+02:00
Truncate after left shift

Shifted values may exceed the target Width.

- - - - -
c446b815 by Sven Tennie at 2024-05-25T13:39:06+02:00
MO_SS_Conv: Don't give up the highest bit for sign

According to this test, reducing the value for the sign is not correct.

narrow[W32→W8](sext[W16→W32](load[W16](0x223972::W64)))
test ( bits64 buffer ) {
    bits64 ret;
    (ret) = prim %popcnt8(%lobits8(%sx32(bits16[buffer + (2242930 :: bits64)])));
    return (ret);
}

4 /= 5

- - - - -
98be1cdd by Sven Tennie at 2024-05-25T13:39:06+02:00
Unsigned remainder (modulo): REMU

- - - - -
1efb9809 by Sven Tennie at 2024-05-25T13:39:06+02:00
Fix loading 12bit < imm <= 32bit immediates

The prior version sign extended the immediate.

- - - - -
67cac656 by Sven Tennie at 2024-05-25T13:46:11+02:00
WIP: Check C calling convention

- - - - -
7576f506 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix & test C calling convention (parameters)

I think the gist is: Sub-word ints are sign-extended, sub-word words are
give as is, because they were truncated before.

- - - - -
a1635ef1 by Sven Tennie at 2024-05-25T13:46:14+02:00
Truncate C return values to their expected width

Otherwise, values that may be too big are floating around.

- - - - -
4ed716a7 by Sven Tennie at 2024-05-25T13:46:14+02:00
Single precision float comparisons

- - - - -
50ac3b9b by Sven Tennie at 2024-05-25T13:46:14+02:00
Float conditional jumps

- - - - -
c8abca30 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float absolute (fabs)

- - - - -
67762ad4 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float negation

- - - - -
b2fb8898 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix unsigned float loading

- - - - -
9a7a9e13 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float comparisions

- - - - -
e551b6c5 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float calling convention (a bit)

If fp regs are taken, use go regs instead.

- - - - -
3cb53438 by Sven Tennie at 2024-05-25T13:46:14+02:00
Add calling conv test for doubles

- - - - -
f1778ca6 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float -> int conversion (width)

- - - - -
cb691626 by Sven Tennie at 2024-05-25T13:46:14+02:00
MO_FS_Conv: Truncate register after conversion

Otherwise, sign-extension bits may stay around.

- - - - -
ba1c9d08 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float operation attributes

This is its own little hell...

- - - - -
a50bb290 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix MO_FF_CONV

The instruction needs precision suffixes to be valid.

- - - - -
43bee5b4 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix wrong fcvt widths

- - - - -
ae678e8f by Sven Tennie at 2024-05-25T13:46:14+02:00
Sign-extend branche conditionals W32 -> W64

Otherwise, negative ints are used as positive ints.

- - - - -
357b2ff2 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix float NE: Needed width

- - - - -
4c5b512f by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix TrivColorable register counts

- - - - -
b16bd840 by Sven Tennie at 2024-05-25T13:46:14+02:00
Fix MulMayOflo test

- - - - -
b3ee2857 by Sven Tennie at 2024-05-25T13:46:14+02:00
Adjust stackFrameHeaderSize

- - - - -
8a83d7f2 by Sven Tennie at 2024-05-25T13:46:14+02:00
Delete unnecessary Ppr cases

- - - - -
5f9b8fb6 by Sven Tennie at 2024-05-25T13:46:15+02:00
Suppress orphan instance warning

Similar to other archs, this seems to be the expected place.

- - - - -
2c85d39d by Sven Tennie at 2024-05-25T13:46:15+02:00
Delete commented-out code

- - - - -
7fd7c3eb by Sven Tennie at 2024-05-25T13:46:15+02:00
Adjust panix message

- - - - -
73d4cddc by Sven Tennie at 2024-05-25T13:46:15+02:00
Add TODOs

- - - - -
3725b14b by Sven Tennie at 2024-05-25T13:46:15+02:00
Formatting

- - - - -
c7bb2f60 by Sven Tennie at 2024-05-25T13:46:15+02:00
Eta reduction

- - - - -
b3ed9898 by Sven Tennie at 2024-05-25T13:46:15+02:00
Remove unused LANGUAGE pragma

- - - - -
743bf071 by Sven Tennie at 2024-05-25T13:46:15+02:00
Syntax cleanup

- - - - -
c858f635 by Sven Tennie at 2024-05-25T13:46:15+02:00
Update comments

- - - - -
5b5fc59f by Sven Tennie at 2024-05-25T13:46:15+02:00
Remove unused function: toImm

- - - - -
642385a4 by Sven Tennie at 2024-05-25T13:46:15+02:00
Remove unused function: withTempIntReg

- - - - -
bd859d08 by Sven Tennie at 2024-05-25T13:46:15+02:00
Remove doubled comment

- - - - -
b2fe50a6 by Sven Tennie at 2024-05-25T13:46:15+02:00
Refactor ss_conv to mute incomplete-pattern-match warning

- - - - -
e1ef9621 by Sven Tennie at 2024-05-25T13:47:16+02:00
Advertise code-gen capability in Hadrian

- - - - -
7a1e861e by Sven Tennie at 2024-05-25T13:47:19+02:00
Advertise riscv64 interpreter capability (Hadrian)

- - - - -
af5e1d22 by Sven Tennie at 2024-05-25T13:47:19+02:00
Define DWARF regs

- - - - -
37c1fb86 by Sven Tennie at 2024-05-25T13:47:19+02:00
Reduce duplication in conditionals

All non-W64 width had the same code.

- - - - -
1612ff8e by Sven Tennie at 2024-05-25T13:47:19+02:00
Add TODOS

- - - - -
2e3c116a by Sven Tennie at 2024-05-25T13:47:19+02:00
Far branches

- - - - -
915933a0 by Sven Tennie at 2024-05-25T13:47:19+02:00
Far unconditional jumps / branches

Introduce B_FAR.

- - - - -
dd091296 by Sven Tennie at 2024-05-25T13:47:19+02:00
Fix DWARF labels

Some were missing...

- - - - -
d98b7175 by Sven Tennie at 2024-05-25T13:47:19+02:00
Add TODOs

- - - - -
8373a3c4 by Sven Tennie at 2024-05-25T13:47:19+02:00
Cleanup makeFarBranches

- - - - -
86622cad by Sven Tennie at 2024-05-25T13:47:19+02:00
WIP: Add GHC Linker

This is likely not correct, yet.

- - - - -
78293f82 by Sven Tennie at 2024-05-25T13:47:19+02:00
Runtime  linker LLVM style

- - - - -
3de02c05 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Delete invalid check

- - - - -
ff292827 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Add missing cases

- - - - -
537f28ae by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Trace int size issue

- - - - -
b9188cf4 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: warnings

- - - - -
ae57a096 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Add missing relocation

- - - - -
c9071448 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Missing break statement

- - - - -
8af3957e by Sven Tennie at 2024-05-25T13:47:19+02:00
Add missing relocation

- - - - -
16a3672e by Sven Tennie at 2024-05-25T13:47:19+02:00
Add R_RISCV_JAL encoding

- - - - -
533dce98 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Cleanup relocations, Add missing

- - - - -
8df6f727 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Fix R_RISCV_SET8

- - - - -
c16cc981 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Fix U-Type assertion

Instructions are 32 bits wide in RISCV(64).

- - - - -
fe0f7da4 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Delete unused variable

- - - - -
8ce100d7 by Sven Tennie at 2024-05-25T13:47:19+02:00
Linker: Fix PLT jumps

- - - - -
d0a7b0e0 by Sven Tennie at 2024-05-25T13:47:20+02:00
Linker: Belch only when asked

- - - - -
f9172659 by Sven Tennie at 2024-05-25T13:47:20+02:00
linker: More fixing

- - - - -
ad2ad27e by Sven Tennie at 2024-05-25T13:47:20+02:00
Linker: Add local labels to the GOT

- - - - -
28b2bee4 by Sven Tennie at 2024-05-25T13:47:20+02:00
Linker: uint32_t addend

This seems to be a good representation:
- We're dealing with negative values as well (e.g. negative PC offset)
- We cannot deal with more than 20 + 12 = 32 bits

- - - - -
5fa04a0d by Sven Tennie at 2024-05-25T13:47:20+02:00
Linker: Rework debug traces

- - - - -
58e6a5dc by Sven Tennie at 2024-05-25T13:47:20+02:00
Ensure __clzdi2 builtin is around

- - - - -
2b532512 by Sven Tennie at 2024-05-25T13:47:20+02:00
Add symbol prototype for __ctzdi2

- - - - -
53651451 by Sven Tennie at 2024-05-25T13:47:20+02:00
Add comment

- - - - -
718d6ecb by Sven Tennie at 2024-05-25T13:47:20+02:00
Only trace message on flag

- - - - -
4e4dbab4 by Sven Tennie at 2024-05-25T13:47:20+02:00
Check int size on 32 bit width

We're handing around 32bit integers.

- - - - -
870ca6bd by Sven Tennie at 2024-05-25T13:47:20+02:00
Linker: Use SymbolExtras for GOT relative relocations to local symbols

This is (hopefully!) faster than emitting real GOT entries for all local
labels (which was implemented before.)

- - - - -
05673b59 by Sven Tennie at 2024-05-25T13:47:20+02:00
Linker: Optimize lookup of dependent relocation

Always iteration over everything was a real performance issue. Now,
start with the second relocation and go back to the first one. Expect it
in the same section.

- - - - -
da033840 by Sven Tennie at 2024-05-25T13:47:20+02:00
Beauify allMachRegNos

- - - - -
510ad0c3 by Sven Tennie at 2024-05-25T13:47:20+02:00
Delete unused function strImmLit

- - - - -
93367091 by Sven Tennie at 2024-05-25T13:47:20+02:00
Introduce constant firstFpRegNo

Makes usages more readable.

- - - - -
35b54ce9 by Sven Tennie at 2024-05-25T13:47:20+02:00
Add TODOs

- - - - -
caae2145 by Sven Tennie at 2024-05-25T13:47:20+02:00
Cleanup register constants

- - - - -
3b131fa4 by Sven Tennie at 2024-05-25T13:47:20+02:00
Make reg numbers less magic

- - - - -
821d5ecb by Sven Tennie at 2024-05-25T13:47:20+02:00
More on RegNo

- - - - -
bc4660cc by Sven Tennie at 2024-05-25T13:47:20+02:00
Improve comment

- - - - -
2e107bad by Sven Tennie at 2024-05-25T13:47:20+02:00
Remove unused / non-existent addressing mode

- - - - -
fd5de44c by Sven Tennie at 2024-05-25T13:47:20+02:00
Reformat / cleanup

- - - - -
40ea4fa5 by Sven Tennie at 2024-05-25T13:47:20+02:00
Add TODOs

- - - - -
87c8571d by Sven Tennie at 2024-05-25T13:47:20+02:00
More on RegNos

- - - - -
6a801a6d by Sven Tennie at 2024-05-25T13:47:20+02:00
Trim trailing whitespace

- - - - -
08cc0b5a by Sven Tennie at 2024-05-25T13:47:20+02:00
No sign extension attribute in RISCV instructions

RISCV takes the meaning of reduced instruction set much more serious:
One cannot sign extend an operant in the same instruction. Delete this
unused code - We're handling sign extension differently.

- - - - -
231b806c by Sven Tennie at 2024-05-25T13:47:20+02:00
There are no shifts in RISCV instructions

Remove this unused code. RISCV does everything in small steps...

- - - - -
a1ad6032 by Sven Tennie at 2024-05-25T13:47:20+02:00
pprReg: Remove unused parameter

- - - - -
c87710e0 by Sven Tennie at 2024-05-25T13:47:20+02:00
Cleanup Cond

- - - - -
2d631a0f by Sven Tennie at 2024-05-25T13:47:20+02:00
More cleanup

Mostly haddock, formatting, minor refactorings

- - - - -
da30752c by Sven Tennie at 2024-05-25T13:47:20+02:00
Implement takeRegRegMoveInstr

- - - - -
d96f1c54 by Sven Tennie at 2024-05-25T13:47:20+02:00
Cleanup mkStackAllocInstr & mkStackDeallocInstr

- - - - -
0ed4ddfc by Sven Tennie at 2024-05-25T13:47:20+02:00
Move Reg definitions to Regs module

- - - - -
86a34b2a by Sven Tennie at 2024-05-25T13:47:20+02:00
Typo

- - - - -
3646b312 by Sven Tennie at 2024-05-25T13:47:20+02:00
Circumvent "incomplete pattern match" warning

- - - - -
97738492 by Sven Tennie at 2024-05-25T13:47:20+02:00
Delete commented out / dead code

- - - - -
49d97a93 by Sven Tennie at 2024-05-25T13:47:20+02:00
Add TODOs

- - - - -
736e6f20 by Sven Tennie at 2024-05-25T13:47:20+02:00
Reduce duplication in stack alloc / free

- - - - -
3e95c227 by Sven Tennie at 2024-05-25T13:47:20+02:00
Delete unused instructions

As they are unused, we don't even know if using them would work at all.

- - - - -
b7691056 by Sven Tennie at 2024-05-25T13:47:20+02:00
Lint

- - - - -
bbd3029b by Sven Tennie at 2024-05-25T13:47:20+02:00
Fix odd register move reduction

Probably, there're OpRegs with wrong format around.

- - - - -
7fd3caa3 by Sven Tennie at 2024-05-25T13:47:20+02:00
Re-implement takeRegRegMoveInstr

- - - - -
61c8fa17 by Sven Tennie at 2024-05-25T13:47:20+02:00
Implement switch (case) jump tables

- - - - -
0011d16f by Sven Tennie at 2024-05-25T13:47:20+02:00
adjustor: Fence for generated code

- - - - -
15e79dde by Sven Tennie at 2024-05-25T13:47:20+02:00
Skip divbyzero test (like most archs)

- - - - -
b6558c75 by Sven Tennie at 2024-05-25T13:47:20+02:00
More instruction cache flushing

Flush in the Linker, which creates code in the PLT. And, cleanup the
link code by using built-ins instead of inline assembly.

- - - - -
c37bbe50 by Sven Tennie at 2024-05-25T13:47:20+02:00
Add todos

- - - - -
0860c7d0 by Sven Tennie at 2024-05-25T13:47:20+02:00
Cleanup

Delete dead code, useless/obsolete comments ...

- - - - -
2be01632 by Sven Tennie at 2024-05-25T13:47:20+02:00
Remove unused constructors

Aarch64 and RISCV64 are just too different...

- - - - -
1c5fdb7d by Sven Tennie at 2024-05-25T13:47:20+02:00
Remove more dead code

- - - - -
3b000288 by Sven Tennie at 2024-05-25T13:47:20+02:00
Replace duplicated source Note by reference

- - - - -
e9b29f9e by Sven Tennie at 2024-05-25T13:47:21+02:00
Delete commented out code

- - - - -
6045c54b by Sven Tennie at 2024-05-25T13:47:21+02:00
TLabel was unused / unsupported

- - - - -
b1250b9b by Sven Tennie at 2024-05-25T13:47:21+02:00
Cleanup immediate pretty printing

- - - - -
c253ad03 by Sven Tennie at 2024-05-25T13:47:21+02:00
Cleanup C calling conv code

- - - - -
bbc1e617 by Sven Tennie at 2024-05-25T13:47:21+02:00
Fix invalid Haddock

- - - - -
8a08ded3 by Sven Tennie at 2024-05-25T13:47:21+02:00
Fix linker issue

Local symbols don't get GOT entries. Fake them with extra symbols instead. Such that R_RISCV_CALL_PLT has an address to load and jump to.

- - - - -
fc1df7ad by Sven Tennie at 2024-05-25T13:47:21+02:00
Add missing relocation to name (string) mapping

- - - - -
e9aecaa6 by Sven Tennie at 2024-05-25T13:47:21+02:00
Increase Clang happiness

Otherwise, it newer versions refuse to build.

- - - - -
3b84d8d0 by Sven Tennie at 2024-05-25T13:47:21+02:00
Implement -falignment-sanitisation

- - - - -
e7577ad3 by Sven Tennie at 2024-05-25T13:47:21+02:00
Ensure there's always a well defined skip label (far branches)

Just th be sure, we don't accidentally land somewhere unexpected.

- - - - -
2dc731e8 by Sven Tennie at 2024-05-25T13:47:21+02:00
Move alignment check

- - - - -
3f3d6fb4 by Sven Tennie at 2024-05-26T16:23:41+02:00
Add TODO (reminder) about fences

- - - - -
ff1313d3 by Sven Tennie at 2024-05-26T16:26:52+02:00
Fix type of makeFarBranches

It changed during releases

- - - - -


27 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/generate_job_metadata
- .gitlab/generate_jobs
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- .gitlab/test-metrics.sh
- compiler/CodeGen.Platform.h
- compiler/GHC.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Cond.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Dwarf/Constants.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Ppr.hs
- + compiler/GHC/CmmToAsm/RV64-notes.md
- + compiler/GHC/CmmToAsm/RV64.hs
- + compiler/GHC/CmmToAsm/RV64/CodeGen.hs
- + compiler/GHC/CmmToAsm/RV64/Cond.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cf6c224dbd43d4eaf6d9c726214b275a9758f8d3...ff1313d38b73dafe706a5acd712765edb57478ff

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cf6c224dbd43d4eaf6d9c726214b275a9758f8d3...ff1313d38b73dafe706a5acd712765edb57478ff
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240526/deec9195/attachment-0001.html>


More information about the ghc-commits mailing list