Ivan Krysak
b4e4d73d49
Layout: introduce usedRegisters helper
2024-03-18 12:24:21 +00:00
Ivan Krysak
80375de3cb
Layout: introduce finalStackOffset helper
2024-03-18 12:24:21 +00:00
Ivan Krysak
b46649de71
Layout: introduce calleeSavedRegisters helper
2024-03-18 12:24:21 +00:00
Ivan Krysak
c003a62212
Layout: rework dump
2024-03-18 12:24:21 +00:00
Ivan Krysak
bf11370fc5
Layout: clean ArgumentKind enum up
2024-03-18 12:24:21 +00:00
Ivan Krysak
e62d4f79ef
ABI: remove an obsolete definition parameter
...
Since pointer to copy system got straightenned up, the old way of
marking them (`abi::Definition::UsePointerToCopyForStackArguments`)
is no longer needed.
2024-02-09 15:09:37 +00:00
Ivan Krysak
27491410d6
ABI: introduce a way to disable vector registers
2024-02-09 15:09:37 +00:00
Ivan Krysak
fe025e37ef
ABI: short-circuit zero-offset to always be zero
2024-02-09 15:09:37 +00:00
Ivan Krysak
68301138c0
ABI: redesign register sorting from the ground up
2024-02-09 15:09:37 +00:00
Ivan Krysak
5bf4b3fa1e
ABI: improve robustness to duplicate registers
2024-02-09 15:09:37 +00:00
Ivan Krysak
9d815d79ec
ToRaw: take advantage of the updated distributor
...
This lets us drop the repeated alignment calculations at
the "leaves" of the conversion. Since new distributor already
provides the necessary information, we can just grab it from
there.
2024-02-09 15:09:37 +00:00
Ivan Krysak
3fdd7d8e8a
ABI: introduce a way to set stack argument offset
2024-02-09 15:09:37 +00:00
Ivan Krysak
d2fe578091
ABI: add getArchitecture helper
2024-02-09 15:09:37 +00:00
Ivan Krysak
f1f6fc5e12
ABI: assert on 0-sized stack arguments
2024-02-09 15:09:37 +00:00
Ivan Krysak
78510010f8
ABI: rename isIncompatibleWith
...
The new name is `isPreliminarilyCompatibleWith`.
2024-01-29 11:57:54 +02:00
Ivan Krysak
e7c456afd2
ABI: improve register state deduction docs
2024-01-29 11:57:54 +02:00
Ivan Krysak
4cb38a722c
ABI: disallow ABI flags to be optional
2024-01-29 11:57:54 +02:00
Ivan Krysak
4093cd30c4
ABI: provide alignment computation for model::Type
2024-01-29 11:57:54 +02:00
Ivan Krysak
386cb26f6d
ABI: introduce a new ABI configuration option
...
It's called `AllowUnnaturallyAlignedTypesInRegisters` and explicitly
allows weirdly aligned structs in registers.
2024-01-29 11:57:54 +02:00
Ivan Krysak
16dc85cb0f
ABI: improve unnatural alignment support
2024-01-29 11:57:54 +02:00
Ivan Krysak
54ffd723e6
ABI: decouple alignment from model::VerifyHelper
2024-01-29 11:57:54 +02:00
Ivan Krysak
a2ef041cb2
Move TypeBucket to the model
2024-01-29 11:57:54 +02:00
Ivan Krysak
77b1acaf00
Prefer uint64_t to size_t wherever relevant
2024-01-29 11:57:54 +02:00
Ivan Krysak
b25a32de2a
Stop using std:: prefix for std::size_t
2024-01-29 11:57:54 +02:00
Ivan Krysak
15be26f9fa
Minor Improvements
2024-01-29 11:57:54 +02:00
Alessandro Di Federico
3d3d3abfc3
Layout: add info about return values
...
This commit introduces two new methods that describe the return value of
a function:
* `returnMethod`: describes how the return value is passed to the
caller.
* `returnValueAggregateType`: the type of the aggregate that is being
returned, in case `returnMethod` is `LocalVariable`.
2023-12-12 12:04:34 +01:00
Alessandro Di Federico
d648f9b970
s/Layout::returnsAggregateType/Layout::hasSPTAR/
2023-12-12 12:04:34 +01:00
Ivan Krysak
775852c6c9
ABI: fix a problem with return value location
...
If the location was not also used a normal argument, it would get lost
when sorting argument registers.
2023-11-02 17:10:04 +01:00
Ivan Krysak
dbc99ff587
ABI: improve a register sorting error message
2023-11-02 17:10:03 +01:00
Ivan Krysak
cfe28d8e56
Stop using std:: prefix for u?int\d+_t types
2023-11-02 17:10:03 +01:00
Alessandro Di Federico
247879f7fc
model::Type::ID: switch to progressive IDs
...
This commit switches `model::Type::ID` from being a GUID to be a
progressive number, in order to make things easier for humans.
On top of this, this commit introduces the following changes:
* TypeCopier: import all the necessary PrimitiveTypes and improve
handling of CustomName.
* Move Kind as the last field of the key of each TupleTree type used in
an `UpcastablePointer`.
* Update the ground truth of tests to ignore the `CustomName` in favor
of focusing on `OriginalName`.
* Increase adoption of `model::Binary::makeType`, equivalent to
`Binary.recordNewType(makeType<model::*Type>())`.
2023-08-23 16:14:04 +02:00
Ivan Krysak
9f1d9fd5d0
Use Container::contains() where appropriate
2023-07-02 15:06:11 +00:00
Ivan Krysak
bc98e0079f
Formatting: change PenaltyReturnTypeOnItsOwnLine
...
The new value is 21.
2023-07-02 13:20:49 +02:00
Massimo Fioravanti
254dc99fcb
TupleTreeGenerator: emit tracking machinery
2023-04-21 17:50:16 +02:00
Alessandro Di Federico
52521f8cac
Adopt more standard library's features
2023-04-08 08:42:23 +02:00
Ivan Krysak
e84c76019a
ABI: introduce an additional definition option
...
The new option is `NoRegisterArgumentsCanComeAfterStackOnes`
If it's set to `true`, then no register argument can follow any stack
argument under the said abi, otherwise such "shuffling" of arguments
is allowed.
2023-03-15 10:19:03 +01:00
Ivan Krysak
fba30712cc
ABI: introduce abi::FunctionType::filterTypes
2023-03-15 10:19:03 +01:00
Ivan Krysak
a0adafeab0
ABI: take advantage of register state deductions
...
This makes the conversions more robust, since everything can rely on
the same tools for filling in missing registers and ordering them based
on the ABI requirements.
2023-03-15 10:19:03 +01:00
Ivan Krysak
1d1003b7e5
ABI: introduce TypeBucket helper
2023-03-15 10:19:02 +01:00
Ivan Krysak
8a1d62728d
ABI: remove constexpr abi trait
2023-03-15 10:19:02 +01:00
Ivan Krysak
30b9234a04
abi::Definition: introduce a padding helper
2023-03-15 10:19:02 +01:00
Ivan Krysak
89b3def533
ABI: move RegisterOrder onto the runtime trait
2023-03-15 10:19:02 +01:00
Ivan Krysak
9e393578c9
ABI: move state deduction onto the runtime trait
2023-03-15 10:19:02 +01:00
Ivan Krysak
769e5c1cbe
ABI: add a natural alignment calculation helper
2023-03-15 10:19:02 +01:00
Ivan Krysak
8b675e131e
ABI: introduce runtime abi definition
2023-03-15 10:19:02 +01:00
Ivan Krysak
395191cdf1
ABI: use replaceReferencesIf when updating types
2023-03-15 10:19:02 +01:00
Ivan Krysak
01a05e2037
ABI: separate convertions based on the direction
2023-03-15 10:19:02 +01:00
Ivan Krysak
2f3128cb43
ABI: separate reused helpers into Support.h
2023-03-15 10:19:02 +01:00
Ivan Krysak
0b1aaeaede
Minor improvements
2023-03-15 10:19:01 +01:00
Alessandro Di Federico
969b3c0cb7
SystemV_x86_64: ignore fs register
2023-02-23 08:30:22 +01:00