8 Commits

Author SHA1 Message Date
Stefan Gränitz
f32509b2ca
[JITLink][AArch32] Test out-of-range and interworking errors for Thumb (#73397) 2023-11-29 21:24:39 +01:00
Stefan Gränitz
2bdf6231da [JITLink][AArch32] Split out error test for invalid edge in applyFixup()
Also rename the fixture class since these tests are not ELF-specific.
2023-11-28 17:37:17 +01:00
Stefan Gränitz
fa23d2b9d9 [JITLink][AArch32] Add test fixture with helper functions in error tests 2023-11-25 17:13:16 +01:00
Stefan Gränitz
0fea00d48b [JITLink][AArch32] Split invalid edge kind test out into readAddendDataErrors
This test actually exercises the readAddendData() function.
2023-11-25 14:08:17 +01:00
Stefan Gränitz
9020026b88 [JITLink][AArch32] Fix GetEdgeKindName function in error tests
The `getGenericEdgeKindName()` function returned "<Unrecognized edge kind>" for all our relocations.
We must use `aarch32::getEdgeKindName()` instead.
2023-11-25 13:24:25 +01:00
Stefan Gränitz
e970652776 [JITLink][AArch32] Reflow code structure after llvm::endianness refactor (NFC) 2023-11-25 12:37:29 +01:00
Stefan Gränitz
808caa9d46
[JITLink][AArch32] Run all error unittests throug main entrypoints (#72091)
Reading implicit addend from a relocation site doesn't require a complete
`LinkGraph` edge. The operation is independent from `TargetSymbol`,
but constructing an `Edge` instance required one. This patch fixes the
inconsistency and simplifies some setup code from the error unittests.

Furthermore this patch prepares for the `Arm`/`Thumb`/`Data` helper
functions to be turned into implementation details. Exposing them in the
API causes unfortunate inconsistencies that we don't want to error-check
all the time, e.g. passing `Thumb_Call` to `readAddendArm()`.
2023-11-15 11:18:23 +01:00
Eymen Ünay
f6d525f8d8
[JITLink][AArch32] Unittest for error paths of readAddend and applyFixup functionality (#69636)
This test checks for error paths in relocation dependent functions of readAddend and applyFixup. It is useful to check these to avoid unexpected assert errors. Currently opcode errors are triggered in most of the cases in AArch32 but there might be further checks to look for in the future. Different backends can also implement a similar test.
2023-11-09 12:22:36 +03:00