30 Commits

Author SHA1 Message Date
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Alessandro Di Federico 1429b526ab Introduce libtcg
This commit drops libptc in favor of its new form libtcg.

It brings several improvements, among which:

* The QEMU version we work on has been upgraded.
* CPUStateAccessAnalysis has been reimplemented in a way that makes it
  easier to debug and solves some limitations (e.g., tracking leaking
  pointers).
* Identification of pieces of the CPU state that are read by each helper
  and fixing access to the CPU state is now performed at build-time.
* We no longer mmap the code we need to translate, dropping all the
  issues related to code that needed to be mapped where something is
  already present.
* We now have two distinct flavors of helper modules: the full one and
  the "slim" one. The latter contains the definition only of functions
  we intend to inline. It is used in most of the pipeline, a good thing
  since we spend less time optimizing code we don't really care about.
  The full module is only used on the re-compilation branch of the
  pipeline.
* We no longer split the `cpu_loop` function.
* We change MetaAddress to rely on architectures from `model::` as
  opposed to the LLVM ones.
* We no longer attach debug info to LLVM IR containing the original
  assembly.
* We now verify that the lifted code only contains code we expect.
2025-10-31 17:25:03 +01:00
Ivan Krysak 6b32faaeb9 Yield: drop obsolete default value handling 2025-10-13 18:33:10 +03:00
Ivan Krysak 97aa3c8247 std::string: use implicit default constructor 2025-07-23 11:38:53 +02:00
Khaled Ismaeel 9d80594ddc Bump model version to v3 2025-04-30 15:08:45 +02:00
Ivan Krysak 79964eac74 Avoid ' misuse in error messages and comments 2025-04-17 16:41:21 +02:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Ivan Krysak e5328290c6 Yield: reorder disassembly processing
This commit moves stuff around to enforce complete information being
present by the time the "Internal" assembly output is ready.

Because of that, the "Internal" format needed to change, now it uses
tag representation close to PTML as opposed to the one close to LLVM's
used before now.
2024-03-18 10:58:52 +00:00
Ivan Krysak 67c4a65122 Minor improvements 2024-03-18 11:58:11 +01:00
Ivan Krysak 2bffccaaf6 Move ImmediateStyle configuration to the model 2024-03-18 11:58:11 +01:00
Ivan Krysak 2827c9d7f7 Move UseATTSyntax configuration to the model 2024-03-18 11:58:11 +01:00
Ivan Krysak d781f3ae79 Yield: make disassembler config-aware 2024-03-18 07:20:41 +00:00
Ivan Krysak 7d235f4fd0 Enforce licence header consistency
Also do some basic cleanup: capitalize first letters, add `.`
at the end of the sentences, and so on.
2023-07-03 15:23:10 +00:00
Ivan Krysak bc98e0079f Formatting: change PenaltyReturnTypeOnItsOwnLine
The new value is 21.
2023-07-02 13:20:49 +02:00
Ivan Krysak 01b4ec36c9 Formatting: set AllowShortEnumsOnASingleLine
The new value is `false`.
2023-07-02 13:15:08 +02:00
Ivan Krysak c21f2649c9 Assembly: introduce new tags
This also reorders the enum, because when two tags collide (they have
the same `from` and `to` points, they are sorted based on the enum
values.

The new order ensures that the values we are more likely to choose
to preserve are closer to the bottom. Since each token can only have one
type associated with it, we choose the lowest one by default.
2023-05-25 06:36:02 +00:00
Ivan Krysak 560bf16d1f Disassembler: support arbitrarily sized tags 2023-05-25 06:25:07 +00:00
Ivan Krysak 4699c2da72 Assembly: remove ShouldSymbolizeOperands option 2023-05-25 06:25:07 +00:00
Ivan Krysak f9a72125d3 Aseembly: accept relative jump targets
Drops the comment about an attempt to switch to the absolute targets
and sets `setPrintBranchImmAsAddress` to `false` no matter what
immediate style is selected.
2023-05-25 06:25:07 +00:00
Ivan Krysak 83e48bbc3a LLVMDisassemblerInterface: remove unused argument 2023-05-25 06:25:07 +00:00
Alessandro Di Federico 348ccec09b Adopt new llvm::MCContext constructor 2023-04-08 08:42:24 +02:00
Alessandro Di Federico 171ba353e5 Adopt llvm/{Support,MC}/TargetRegistry.h 2023-04-08 08:42:24 +02:00
Alessandro Di Federico dbcdad0a4d Switch from llvm::Optional to std::optional 2023-04-08 08:42:24 +02:00
Giacomo Vercesi 0e9431737f YieldAssembly: fix jump addresses
Change the way the jump instructions are outputted in the assembly
output to be PC-relative. This fixes an issue where the addresses in the
output where shifted forward.
2023-02-07 16:54:35 +01:00
Massimo Fioravanti 742e1a0c56 TupleTree: switch from public fields to accessors 2022-12-12 18:36:57 +01:00
Alessandro Di Federico e9db913291 Disassembler: fix iterator invalidation issue
The index of an element of a `SortedVector<yield::Tag>` was saved, but
`SortedVector` behaves like a set.
The issue has been fixed by creating a temporary `Tag` instead of trying
to keep a reference to an existing one.
2022-12-09 09:00:20 +01:00
Ivan Krysak 5b49873523 Move delay slot control down to basic block level 2022-06-15 16:04:43 +03:00
Ivan Krysak 74764f9729 Switch to TTG-based assembly description 2022-06-15 15:52:00 +03:00
Ivan Krysak 569d677157 Disable default instruction operand symbolization
It was causing issues on some architectures (like i386)
2022-06-15 15:51:23 +03:00
Ivan Krysak 36c63c1bb9 Implement the disassembler interface 2022-05-06 18:51:47 +02:00