1472 Commits

Author SHA1 Message Date
Miguel A. Arroyo
0cb66a7bd5
[llvm-readobj][COFF] Consistent PDBGUID Formatting (#94256)
## Consistent PDB GUID in `llvm-readobj`

Currently, the PDB GUID is shown as a byte array:
`PDBGUID: (D8 4C 88 D9 26 15 1F 11 4C 4C 44 20 50 44 42 2E)`

This is inconsistent with `llvm-pdbutil` (e.g. `llvm-pdbutil dump
--summary`) which shows it as a hexadecimal string.
Additionally, `yaml2obj` uses the same hexadecimal string format.

In general, the hexadecimal string is the common representation for PDB
GUIDs on Windows.

This PR changes it to be consistent as shown below:
`PDBGUID: {D9884CD8-1526-111F-4C4C-44205044422E}`
2024-06-04 09:43:24 -07:00
Konstantin Zhuravlyov
775f1cd34d
AMDGPU: Add gfx12-generic target (#93875) 2024-05-31 12:46:44 -04:00
Fred Grim
942a6af6ad
[llvm-readobj] Fixes malformed json on JSON printed corefiles (#92835)
This patch fixes an issue where, when printing corefile notes with
llvm-readobj as json, the dumper generated llvm formatted output which
isn't valid json. This alters the dumper to, in the NT_FILE, note, dump
properly formatted json data.

Prior to this patch the JSON output was formatted like:
 ```
                "Mapping": [
                  "Start": 4096,
                  "End": 8192,
                  "Offset": 12288,
                  "Filename": "/path/to/a.out"
                ],
 ```
 Whereas now it is formatted as:
  ```
                "Mappings": [
                  {
                    "Start": 4096,
                    "End": 8192,
                    "Offset": 12288,
                    "Filename": "/path/to/a.out"
                  },
  ```
Which is valid. Additionally the LLVM output has changed to match the
structure of the JSON output (i.e. instead of lists of keys it is a list
of dictionaries)
2024-05-23 08:55:17 -07:00
Fangrui Song
89c95effe8
[llvm-readobj] Remove --raw-relr
https://reviews.llvm.org/D47919 dumped RELR relocations as
`R_*_RELATIVE` and added --raw-relr (not in GNU) for testing purposes
(more readable than `llvm-readelf -x .relr.dyn`). The option is obsolete
after `llvm-readelf -r` output gets improved (#89162).

Since --raw-relr never seems to get more adoption. Let's remove it to
avoid some complexity.

Pull Request: https://github.com/llvm/llvm-project/pull/89426
2024-04-22 12:35:04 -07:00
Fangrui Song
d86079f93c
[llvm-readelf] Print more information for RELR
llvm-readelf/llvm-readobj print RELR as REL relocations with a fixed
type (e.g. `R_*_RELATIVE`). GNU readelf printed only addresses and have
recently switched to a more descritive style that includes a symbolic
address column (symbolized using .symtab/.strtab) (milestone: binutils
2.43).

This patch implements the new GNU style, which seems superior to the
current REL style and essentially obsoletes LLVM-specific --raw-relr
(`printRelrReloc`).

Pull Request: https://github.com/llvm/llvm-project/pull/89162
2024-04-19 09:21:57 -07:00
Ramkumar Ramachandra
06714e1bfe
llvm-readobj/ARM: activate big-endian attribute printing (#87806)
Activate attribute printing for big-endian encoding for ARM. The
supporting code already exists, and the patch is trivial.

Fixes #62400.
2024-04-15 09:36:40 +01:00
Simon Pilgrim
1c7fda9f4c Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC. 2024-04-04 12:26:34 +01:00
Daniil Kovalev
4f19f15a60
[PAC][llvm-readobj][AArch64][ELF] Support GNU_PROPERTY_AARCH64_FEATURE_PAUTH (#87545)
Reland #85231 after fixing build failure
https://lab.llvm.org/buildbot/#/builders/186/builds/15631.
Use `PRIx64` for format output of `uint64_t` as hex.
Original PR description below.

This adds support for `GNU_PROPERTY_AARCH64_FEATURE_PAUTH` feature (as
defined in https://github.com/ARM-software/abi-aa/pull/240) handling in
llvm-readobj and llvm-readelf. The following constants for supported
platforms are also introduced:

- `AARCH64_PAUTH_PLATFORM_INVALID = 0x0`
- `AARCH64_PAUTH_PLATFORM_BAREMETAL = 0x1`
- `AARCH64_PAUTH_PLATFORM_LLVM_LINUX = 0x10000002`

For the llvm_linux platform, output of the tools contains descriptions
of PAuth features which are enabled/disabled depending on the version
value. Version value bits correspond to the following `LangOptions`
defined in #85232:

- bit 0: `PointerAuthIntrinsics`;
- bit 1: `PointerAuthCalls`;
- bit 2: `PointerAuthReturns`;
- bit 3: `PointerAuthAuthTraps`;
- bit 4: `PointerAuthVTPtrAddressDiscrimination`;
- bit 5: `PointerAuthVTPtrTypeDiscrimination`;
- bit 6: `PointerAuthInitFini`.

Support for `.note.AARCH64-PAUTH-ABI-tag` is dropped since it's deleted
from the spec in ARM-software/abi-aa#250.
2024-04-04 08:20:13 +03:00
Daniil Kovalev
c45861f437
Revert "[PAC][llvm-readobj][AArch64][ELF] Support GNU_PROPERTY_AARCH64_FEATURE_PAUTH" (#87434)
Reverts llvm/llvm-project#85231

See build failure
https://lab.llvm.org/buildbot/#/builders/186/builds/15631
2024-04-03 03:15:47 +03:00
Daniil Kovalev
5029949952
[PAC][llvm-readobj][AArch64][ELF] Support GNU_PROPERTY_AARCH64_FEATURE_PAUTH (#85231)
This adds support for `GNU_PROPERTY_AARCH64_FEATURE_PAUTH` feature (as
defined in https://github.com/ARM-software/abi-aa/pull/240) handling in
llvm-readobj and llvm-readelf. The following constants for supported
platforms are also introduced:

- `AARCH64_PAUTH_PLATFORM_INVALID = 0x0`
- `AARCH64_PAUTH_PLATFORM_BAREMETAL = 0x1`
- `AARCH64_PAUTH_PLATFORM_LLVM_LINUX = 0x10000002`

For the llvm_linux platform, output of the tools contains descriptions
of PAuth features which are enabled/disabled depending on the version
value. Version value bits correspond to the following `LangOptions`
defined in #85232:

- bit 0: `PointerAuthIntrinsics`;
- bit 1: `PointerAuthCalls`;
- bit 2: `PointerAuthReturns`;
- bit 3: `PointerAuthAuthTraps`;
- bit 4: `PointerAuthVTPtrAddressDiscrimination`;
- bit 5: `PointerAuthVTPtrTypeDiscrimination`;
- bit 6: `PointerAuthInitFini`.

Support for `.note.AARCH64-PAUTH-ABI-tag` is dropped since it's deleted
from the spec in ARM-software/abi-aa#250.
2024-04-03 00:28:47 +03:00
Fangrui Song
2763353891
[Object,ELFType] Rename TargetEndianness to Endianness (#86604)
`TargetEndianness` is long and unwieldy. "Target" in the name is confusing. Rename it to "Endianness".

I cannot find noticeable out-of-tree users of `TargetEndianness`, but
keep `TargetEndianness` to make this patch safer. `TargetEndianness`
will be removed by a subsequent change.
2024-03-28 09:10:34 -07:00
quic-areg
31f4b329c8
[Hexagon] ELF attributes for Hexagon (#85359)
Defines a subset of attributes and emits them to a section called
.hexagon.attributes.

The current attributes recorded are the attributes needed by
llvm-objdump to automatically determine target features and eliminate
the need to manually pass features.
2024-03-19 16:22:30 -05:00
Fangrui Song
24f22b3f93
[llvm-readelf] Print a blank line for the first hex/string dump
GNU readelf prints a blank line before the first hex/string dump, which
serves as a separator when there are other dump operations. Port the
behavior.

Pull Request: https://github.com/llvm/llvm-project/pull/85744
2024-03-19 09:38:55 -07:00
Igor Kudrin
fe84764724
[DWARF] Dump an updated location for DW_CFA_advance_loc* (#84274)
When dumping FDEs, `readelf` prints new location values after
`DW_CFA_advance_loc(*)` instructions, which looks quite convenient:

```
> readelf -wf test.o
...
... FDE ... pc=0000000000000030..0000000000000064
  DW_CFA_advance_loc: 4 to 0000000000000034
  ...
  DW_CFA_advance_loc: 4 to 0000000000000038
...
```

This patch makes `llvm-dwarfdump` and `llvm-readobj` do the same.
2024-03-08 07:34:36 +07:00
zhijian lin
3034632a27
[llvm-readobj] enable demangle option for the xcoff object file (#78455)
enable `--demangle` option for the xcoff object file for llvm-readobj
2024-03-01 09:21:11 -05:00
Micah Weston
9ca8db352d
[SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (#82292)
Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that prints block frequencies and branch
probabilities in the same manner as BFI and BPI respectively. This can
be helpful if you are manually inspecting the outputs from the tools.

In order to print, I moved the `printBlockFreqImpl` function from
Analysis to Support and renamed it to `printRelativeBlockFreq`.
2024-02-27 14:13:00 -05:00
Fangrui Song
26d71d9ed5
[llvm-readobj,ELF] Support --decompress/-z (#82594)
When a section has the SHF_COMPRESSED flag, -p/-x dump the compressed
content by default. In GNU readelf, if --decompress/-z is specified,
-p/-x will dump the decompressed content. This patch implements the
option.

Close #82507
2024-02-22 09:24:21 -08:00
Fangrui Song
2167881f51 [ARM,MC] Support FDPIC relocations
Linux kernel fs/binfmt_elf_fdpic.c supports FDPIC for MMU-less systems.
GCC/binutils/qemu support FDPIC ABI for ARM
(https://github.com/mickael-guene/fdpic_doc).
_ARM FDPIC Toolchain and ABI_ provides a summary.

This patch implements FDPIC relocations to the integrated assembler.
There are 6 static relocations and 2 dynamic relocations, with
R_ARM_FUNCDESC as both static and dynamic.

gas requires `--fdpic` to assemble data relocations like `.word f(FUNCDESC)`.
This patch adds `MCTargetOptions::FDPIC` and reports an error if FDPIC
is not set.

Pull Request: https://github.com/llvm/llvm-project/pull/82187
2024-02-21 10:13:26 -08:00
stephenpeckham
26db845536
[XCOFF] Support the subtype flag in DWARF section headers (#81667)
The section headers for XCOFF files have a subtype flag for Dwarf
sections. This PR updates obj2yaml, yaml2obj, and llvm-readobj so that
they recognize the subtype.
2024-02-20 08:42:12 -06:00
Frederic Cambus
a8d7511811
[llvm-readobj] Add support for the PT_OPENBSD_SYSCALLS segment type. (#82122)
Reference: https://github.com/openbsd/src/blob/master/sys/sys/exec_elf.h
2024-02-20 09:12:58 +01:00
Fangrui Song
cd20a7ff9a
[llvm-readelf] Print ARM specific OSABI values in GNU mode (#82186)
Similar to #75661. Currently, there is only ELFOSABI_ARM, but I plan to
add ELFOSABI_ARM_FDPIC in a subsequent patch #82187
2024-02-19 11:45:54 -08:00
Pierre van Houtryve
43c7eb5d7b
[AMDGPU] Replace '.' with '-' in generic target names (#81718)
The dot is too confusing for tools. Output temporaries would have
'10.3-generic' so tools could parse it as an extension, device libs &
the associated clang driver logic are also confused by the dot.

After discussions, we decided it's better to just remove the '.' from
the target name than fix each issue one by one.
2024-02-14 15:19:04 +01:00
Pierre van Houtryve
f93aa5157a
[AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (#76955)
These generic targets include multiple GPUs and will, in the future,
provide a way to build once and run on multiple GPU, at the cost of less
optimization opportunities.

Note that this is just doing the compiler side of things, device libs an
runtimes/loader/etc. don't know about these targets yet, so none of them
actually work in practice right now. This is just the initial commit to
make LLVM aware of them.

This contains the documentation changes for both this change and #76954
as well.
2024-02-12 10:18:20 +01:00
Jacek Caban
8f23464a5d
[llvm-lib][llvm-dlltool][Object] Add support for EXPORTAS name types. (#78772)
EXPORTAS is a new name type in import libraries. It's used by default on ARM64EC,
but it's allowed on other platforms as well.
2024-02-10 01:00:14 +01:00
Jacek Caban
a2e5287d5a
[llvm-readobj][Object][COFF] Print COFF import library symbol export name. (#78769)
getExportName implementation is based on lld-link. In its current form,
it's mostly about convenience, but it will be more useful for EXPORTAS
support, for which export name is not possible to deduce from other
printed properties.
2024-02-06 13:47:58 +01:00
Pierre van Houtryve
500846d2f5
[AMDGPU] Introduce Code Object V6 (#76954)
Introduce Code Object V6 in Clang, LLD, Flang and LLVM. This is the same
as V5 except a new "generic version" flag can be present in EFLAGS. This
is related to new generic targets that'll be added in a follow-up patch.
It's also likely V6 will have new changes (possibly new metadata
entries) added later.

Docs change are part of the follow-up patch #76955
2024-02-05 08:19:53 +01:00
Rahman Lavaee
acec6419e8
[SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (#74128)
Today `-split-machine-functions` and `-fbasic-block-sections={all,list}`
cannot be combined with `-basic-block-sections=labels` (the labels
option will be ignored).
The inconsistency comes from the way basic block address map -- the
underlying mechanism for basic block labels -- encodes basic block
addresses
(https://lists.llvm.org/pipermail/llvm-dev/2020-July/143512.html).
Specifically, basic block offsets are computed relative to the function
begin symbol. This relies on functions being contiguous which is not the
case for MFS and basic block section binaries. This means Propeller
cannot use binary profiles collected from these binaries, which limits
the applicability of Propeller for iterative optimization.
    
To make the `SHT_LLVM_BB_ADDR_MAP` feature work with basic block section
binaries, we propose modifying the encoding of this section as follows.

First let us review the current encoding which emits the address of each
function and its number of basic blocks, followed by basic block entries
for each basic block.

| | |
|--|--|
| Address of the function | Function Address |
|  Number of basic blocks in this function | NumBlocks |
|  BB entry 1
|  BB entry 2
|   ...
|  BB entry #NumBlocks
    
To make this work for basic block sections, we treat each basic block
section similar to a function, except that basic block sections of the
same function must be encapsulated in the same structure so we can map
all of them to their single function.
    
We modify the encoding to first emit the number of basic block sections
(BB ranges) in the function. Then we emit the address map of each basic
block section section as before: the base address of the section, its
number of blocks, and BB entries for its basic block. The first section
in the BB address map is always the function entry section.
| | |
|--|--|
|  Number of sections for this function   | NumBBRanges |
| Section 1 begin address                     | BaseAddress[1]  |
| Number of basic blocks in section 1 | NumBlocks[1]    |
| BB entries for Section 1
|..................|
| Section #NumBBRanges begin address | BaseAddress[NumBBRanges] |
| Number of basic blocks in section #NumBBRanges |
NumBlocks[NumBBRanges] |
| BB entries for Section #NumBBRanges
    
The encoding of basic block entries remains as before with the minor
change that each basic block offset is now computed relative to the
begin symbol of its containing BB section.
    
This patch adds a new boolean codegen option `-basic-block-address-map`.
Correspondingly, the front-end flag `-fbasic-block-address-map` and LLD
flag `--lto-basic-block-address-map` are introduced.
Analogously, we add a new TargetOption field `BBAddrMap`. This means BB
address maps are either generated for all functions in the compiling
unit, or for none (depending on `TargetOptions::BBAddrMap`).
    
This patch keeps the functionality of the old
`-fbasic-block-sections=labels` option but does not remove it. A
subsequent patch will remove the obsolete option.

We refactor the `BasicBlockSections` pass by separating the BB address
map and BB sections handing to their own functions (named
`handleBBAddrMap` and `handleBBSections`). `handleBBSections` renumbers
basic blocks and places them in their assigned sections.
`handleBBAddrMap` is invoked after `handleBBSections` (if requested) and
only renumbers the blocks.
  - New tests added:
- Two tests basic-block-address-map-with-basic-block-sections.ll and
basic-block-address-map-with-mfs.ll to exercise the combination of
`-basic-block-address-map` with `-basic-block-sections=list` and
'-split-machine-functions`.
- A driver sanity test for the `-fbasic-block-address-map` option
(basic-block-address-map.c).
- An LLD test for testing the `--lto-basic-block-address-map` option.
This reuses the LLVM IR from `lld/test/ELF/lto/basic-block-sections.ll`.
- Renamed and modified the two existing codegen tests for basic block
address map (`basic-block-sections-labels-functions-sections.ll` and
`basic-block-sections-labels.ll`)
- Removed `SHT_LLVM_BB_ADDR_MAP_V0` tests. Full deprecation of
`SHT_LLVM_BB_ADDR_MAP_V0` and `SHT_LLVM_BB_ADDR_MAP` version less than 2
will happen in a separate PR in a few months.
2024-02-01 17:50:46 -08:00
Micah Weston
aaaff74fd1
[SHT_LLVM_BB_ADDR_MAP][llvm-readobj] Implements llvm-readobj handling for PGOAnalysisMap. (#79520)
Adds raw printing of PGOAnalysisMap in llvm-readobj.

I'm leaving the fixme's for a later patch that will provide a 'pretty'
printing for BBFreq and BrProb (i.e. relative frequencies and
probabilities) that will apply to both llvm-readobj and llvm-objdump.
2024-02-01 16:02:14 -05:00
Jacek Caban
b26bfcc1ec
[llvm-readobj][Object][COFF] Include COFF import file machine type in format string. (#78366) 2024-01-17 22:47:18 +01:00
Alexandre Ganea
3c6f47d6b8
[llvm-driver] Fix usage of InitLLVM on Windows (#76306)
Previously, some tools such as `clang` or `lld` which require strict
order for certain command-line options, such as `clang -cc1` or `lld
-flavor`, would not longer work on Windows, when these tools were linked
as part of `llvm-driver`. This was caused by `InitLLVM` which was part
of the `*_main()` function of these tools, which in turn calls
`windows::GetCommandLineArguments`. That function completly replaces
argc/argv by new UTF-8 contents, so any ajustements to argc/argv made by
`llvm-driver` prior to calling these tools was reset.

`InitLLVM` is now called by the `llvm-driver`. Any tool that
participates in (or is part of) the `llvm-driver` doesn't call
`InitLLVM` anymore.
2024-01-11 19:08:28 -05:00
Joseph Huber
59567e711d [ELF][Obvious] Remove unused CUDA OS/ABI struct
Summary:
This did not need a separate struct because it is not past the
"architecture specific" ones in the identifier. This was accidentally
left when it was added somewhere else and caused unused variable
warnings.
2024-01-05 10:58:10 -06:00
Joseph Huber
3b337bbc81
[ELF] Attempt to set the OS when using 'makeTriple()' (#76992)
Summary:
This patch fixes up the `makeTriple()` interface to emit append the
operating system information when it is readily avaialble from the ELF.
The main motivation for this is so the GPU architectures can be easily
identified correctly when given and ELF. E.g. we want
`amdgpu-amd-amdhsa` as the output and not `amdgpu--`.

This required adding support for the CUDA OS/ABI, which is easily found
to be `0x33` when using `readelf`.
2024-01-05 10:24:30 -06:00
Joseph Huber
87b45f1ca6
[llvm-readobj] Print AMDGPU specific values in GNU mode (#75661)
Summary:
Currently, we don't emit any of the AMDGPU specific flags and options
when printing in GNU-mode (the default). This patch adds extra code to
handle outputting these values to match the output from GNU's `readelf`
when used on an AMDGPU image.
2023-12-18 09:22:22 -06:00
Joseph Huber
433498ce46
[llvm-readobj] Print the associated CUDA SM flags (#75664)
Summary:
The architecture that the CUDA application was compiled for is stored in
the ELF flags. This patch just adds some simple enum values to indicate
this to the user in a readable way.
2023-12-15 20:52:37 -06:00
Abhina Sree
ec41462d7a
[SystemZ][z/OS] Add missing strnlen function for z/OS to fix build failures (#75339)
This patch adds strnlen to the zOSSupport.h file to fix build failures in multiple files.
2023-12-13 13:13:53 -05:00
john-brawn-arm
d293a354d0
[AArch64][ELF][llvm-readobj] Support the GCS .note.gnu.property bit (#75065)
This bit was added to the AArch64 ABI by
https://github.com/ARM-software/abi-aa/pull/231.
2023-12-13 10:54:06 +00:00
Kazu Hirata
586ecdf205
[llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
2023-12-11 21:01:36 -08:00
Fangrui Song
54b4a0d688
[llvm-readobj] --needed-libs: support --elf-output-style=JSON (#75028)
Close #74529
2023-12-11 08:59:19 -08:00
Daniil Kovalev
3c6efe5fdb
[llvm-readobj][AArch64][ELF][PAC] Support ELF AUTH constants (#74874)
Reapply llvm/llvm-project#72713 after fixing formatted printing of
`uint64_t` values as hex (see failing build here
https://lab.llvm.org/buildbot/#/builders/186/builds/13604).

This patch adds llvm-readobj support for:

- Dynamic `R_AARCH64_AUTH_*` relocations (including RELR compressed AUTH
relocations) as described here:
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#auth-variant-dynamic-relocations

- `.note.AARCH64-PAUTH-ABI-tag` section as defined here
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#elf-marking
2023-12-09 00:31:40 +03:00
Daniil Kovalev
24f8bc5506
Revert "[llvm-readobj][AArch64][ELF][PAC] Support ELF AUTH constants" (#74816)
Reverts llvm/llvm-project#72713

Buildbot tests fail on clang-armv7-global-isel builder
https://lab.llvm.org/buildbot/#/builders/186/builds/13604
2023-12-08 12:10:27 +03:00
Daniil Kovalev
c8616c724f
[llvm-readobj][AArch64][ELF][PAC] Support ELF AUTH constants (#72713)
This patch adds llvm-readobj support for:

- Dynamic R_AARCH64_AUTH_* relocations (including RELR compressed AUTH
relocations) as described here:
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#auth-variant-dynamic-relocations

- .note.AARCH64-PAUTH-ABI-tag section as defined here
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#elf-marking
2023-12-08 09:31:16 +03:00
Kazu Hirata
57eb4826e5 [llvm] Stop including string (NFC)
Identified with clangd.
2023-12-03 16:24:43 -08:00
Adrian Prantl
2c07181424 [LEB128] Don't initialize error on success
This change removes an unnecessary branch from a hot path. It's also
questionable API to override any previous error unconditonally.
2023-11-29 12:47:27 -08:00
Adrian Prantl
69b0cb9c56 Revert "[LEB128] Don't initialize error on success"
This reverts commit 545c8e009e2b649ef38f7e432ffbc06ba8a9b813.
2023-11-29 12:40:37 -08:00
Adrian Prantl
545c8e009e [LEB128] Don't initialize error on success
This change removes an unnecessary branch from a hot path. It's also
questionable API to override any previous error unconditonally.
2023-11-29 12:16:32 -08:00
Jason Liu
623cd75105
[llvm-objdump] Fix lma display issue for non-bss sections (#72141)
llvm-readobj and llvm-objdump have inconsistent handling of display
lma for sections.
This patch tries to common code up and adapt the same approach for
both tools.
2023-11-27 12:24:39 -05:00
Jay Foad
cf1e0c0b07
[AMDGPU] Define new targets gfx1200 and gfx1201 (#73133)
Define target names and ELF numbers for new GFX12 targets gfx1200 and
gfx1201. For now they behave identically to GFX11.
2023-11-23 16:44:05 +00:00
Jay Foad
e0d93d5aaa [AMDGPU] Reindent some tables
This keeps clang-format happy on future patches.
2023-11-23 09:49:03 +00:00
Billy Laws
5edf586146
[AArch64][Windows] Add llvm-readobj support for ec_context unwind opcode (#69515)
ARM64EC uses the same CONTEXT structure as x86_64 as opposed to the
regular ARM64 context, a new unwind opcode MSFT_OP_EC_CONTEXT is
added to handle this.
2023-11-16 12:19:34 +01:00
Pierre van Houtryve
d3876c58a8
[ELFDumper] Always read AMD Code Object notes as little-endian (#70775)
Should avoid issues on big-endian hosts.

Note that we use aligned types because primitive integers are also
aligned. If we don't use aligned types, `HSAILProperties` ends up being
11 bytes instead of 12 (1 byte padding at the end of the struct added by
the compiler).
Technically only the first type needs to be aligned, but I just used
aligned types everywhere to be consistent.

Fixes #65280
2023-11-14 07:26:09 +01:00