diff options
author | Aleksandra Pasek <pasek@adacore.com> | 2021-04-14 10:44:04 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-29 14:23:49 +0000 |
commit | 16a0b3b4abb10d0b03877f606f13863401bbd77f (patch) | |
tree | 845d0bb556a3e3599cfa6001609d64a23d21cf27 /gcc/ada/libgnat | |
parent | bfe2554f052b11ecf07d93cb04137f3fca5c6e6d (diff) | |
download | gcc-16a0b3b4abb10d0b03877f606f13863401bbd77f.zip gcc-16a0b3b4abb10d0b03877f606f13863401bbd77f.tar.gz gcc-16a0b3b4abb10d0b03877f606f13863401bbd77f.tar.bz2 |
[Ada] Add support for Aarch64 in System.Object_Reader
gcc/ada/
* libgnat/s-objrea.adb (EM_AARCH64): New Constant.
(Initialize): Handle EM_AARCH64 case.
(Read_Address): Handle AARCH64 case.
* libgnat/s-objrea.ads (Object_Arch): Add AARCH64 record
component.
Diffstat (limited to 'gcc/ada/libgnat')
-rw-r--r-- | gcc/ada/libgnat/s-objrea.adb | 7 | ||||
-rw-r--r-- | gcc/ada/libgnat/s-objrea.ads | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/libgnat/s-objrea.adb b/gcc/ada/libgnat/s-objrea.adb index b5ca32f..9dd8c1f 100644 --- a/gcc/ada/libgnat/s-objrea.adb +++ b/gcc/ada/libgnat/s-objrea.adb @@ -78,6 +78,7 @@ package body System.Object_Reader is EM_SPARCV9 : constant := 43; -- SPARC v9 64-bit EM_IA_64 : constant := 50; -- Intel Merced EM_X86_64 : constant := 62; -- AMD x86-64 architecture + EM_AARCH64 : constant := 183; -- Aarch64 EN_NIDENT : constant := 16; @@ -648,6 +649,9 @@ package body System.Object_Reader is when EM_ARM => Res.Arch := ARM; + when EM_AARCH64 => + Res.Arch := AARCH64; + when others => raise Format_Error with "unrecognized architecture"; end case; @@ -2038,7 +2042,8 @@ package body System.Object_Reader is Address_32 := Read (S); return uint64 (Address_32); - when IA64 + when AARCH64 + | IA64 | PPC64 | SPARC64 | x86_64 diff --git a/gcc/ada/libgnat/s-objrea.ads b/gcc/ada/libgnat/s-objrea.ads index 28dabf5..a83ca53 100644 --- a/gcc/ada/libgnat/s-objrea.ads +++ b/gcc/ada/libgnat/s-objrea.ads @@ -120,9 +120,12 @@ package System.Object_Reader is PPC64, -- 64-bit PowerPC - ARM); + ARM, -- 32-bit ARM + AARCH64); + -- 64-bit ARM + ------------------ -- Target types -- ------------------ |