public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1899] [Ada] Add support for Aarch64 in System.Object_Reader
@ 2021-06-29 14:26 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-29 14:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:16a0b3b4abb10d0b03877f606f13863401bbd77f

commit r12-1899-g16a0b3b4abb10d0b03877f606f13863401bbd77f
Author: Aleksandra Pasek <pasek@adacore.com>
Date:   Wed Apr 14 10:44:04 2021 -0400

    [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.

Diff:
---
 gcc/ada/libgnat/s-objrea.adb | 7 ++++++-
 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 b5ca32fdbc9..9dd8c1f098e 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 28dabf53a76..a83ca53d257 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 --
    ------------------


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-29 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 14:26 [gcc r12-1899] [Ada] Add support for Aarch64 in System.Object_Reader Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).