Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45242 )

Change subject: sim: Deprecate M5_AT_* constants.
......................................................................

sim: Deprecate M5_AT_* constants.

These are formatted as #defines, but they are actually enum constants.
If they were actually macros, they should use a GEM5_ prefix, but
because they aren't, they should use Gem5, and also be camel case.

Change-Id: Ie0dc34a683b113a4ed4bc76054eb822676f6e802
---
M src/sim/aux_vector.hh
1 file changed, 59 insertions(+), 24 deletions(-)



diff --git a/src/sim/aux_vector.hh b/src/sim/aux_vector.hh
index 79f45c9..293ca10 100644
--- a/src/sim/aux_vector.hh
+++ b/src/sim/aux_vector.hh
@@ -34,6 +34,8 @@
 #ifndef __AUX_VECTOR_HH__
 #define __AUX_VECTOR_HH__

+#include "base/compiler.hh"
+
 template<class IntType>
 class AuxVector
 {
@@ -54,32 +56,65 @@
     return av;
 }

+#define GEM5_DEPRECATE_AT(NAME, name) M5_AT_##NAME \
+    GEM5_DEPRECATED("Replace with GEM5_AT_" #NAME " with Gem5At" #name) = \
+    Gem5At##name
+#define GEM5_DEPRECATE_BASE(NAME, name) M5_BASE_##NAME \
+ GEM5_DEPRECATED("Replace with GEM5_BASE_" #NAME " with Gem5Base" #name) = \
+    Gem5Base##name
+
 enum AuxiliaryVectorType
 {
-    M5_AT_NULL = 0,        // End of vector.
-    M5_AT_IGNORE = 1,      // Ignored.
- M5_AT_EXECFD = 2, // File descriptor of program if interpreter used.
-    M5_AT_PHDR = 3,        // Address of program header tables in memory.
-    M5_AT_PHENT = 4,       // Size in bytes of one program header entry.
-    M5_AT_PHNUM = 5,       // Number of entries in program header table.
-    M5_AT_PAGESZ = 6,      // System page size.
- M5_AT_BASE = 7, // Base address of interpreter program in memory.
-    M5_AT_FLAGS = 8,       // Unused.
- M5_AT_ENTRY = 9, // Entry point of program after interpreter setup.
-    M5_AT_NOTELF = 10,     // Non-zero if format is different than ELF.
-    M5_AT_UID = 11,        // Address of real user ID of thread.
-    M5_AT_EUID = 12,       // Address of effective user ID of thread.
-    M5_AT_GID = 13,        // Address of real group ID of thread.
-    M5_AT_EGID = 14,       // Address of effective group ID of thread.
-    M5_AT_PLATFORM = 15,   // Platform string for the architecture.
- M5_AT_HWCAP = 16, // Bits which describe the hardware capabilities. - M5_AT_CLKTCK = 17, // Frequency at which times() syscall increments. - M5_AT_SECURE = 23, // Whether to enable "secure mode" in executable.
-    M5_BASE_PLATFORM = 24, // Platform string (differs on PowerPC only).
-    M5_AT_RANDOM = 25,     // Pointer to 16 bytes of random data.
-    M5_AT_HWCAP2 = 26,     // Extension of AT_HWCAP.
-    M5_AT_EXECFN = 31,     // Filename of the program.
-    M5_AT_VECTOR_SIZE = 44
+    Gem5AtNull = 0,          // End of vector.
+    GEM5_DEPRECATE_AT(NULL, Null),
+    Gem5AtIgnore = 1,        // Ignored.
+    GEM5_DEPRECATE_AT(IGNORE, Ignore),
+ Gem5AtExecfd = 2, // File descriptor of program if interpreter used.
+    GEM5_DEPRECATE_AT(EXECFD, Execfd),
+    Gem5AtPhdr = 3,          // Address of program header tables in memory.
+    GEM5_DEPRECATE_AT(PHDR, Phdr),
+    Gem5AtPhent = 4,         // Size in bytes of one program header entry.
+    GEM5_DEPRECATE_AT(PHENT, Phent),
+    Gem5AtPhnum = 5,         // Number of entries in program header table.
+    GEM5_DEPRECATE_AT(PHNUM, Phnum),
+    Gem5AtPagesz = 6,        // System page size.
+    GEM5_DEPRECATE_AT(PAGESZ, Pagesz),
+ Gem5AtBase = 7, // Base address of interpreter program in memory.
+    GEM5_DEPRECATE_AT(BASE, Base),
+    Gem5AtFlags = 8,         // Unused.
+    GEM5_DEPRECATE_AT(FLAGS, Flags),
+ Gem5AtEntry = 9, // Entry point of program after interpreter setup.
+    GEM5_DEPRECATE_AT(ENTRY, Entry),
+    Gem5AtNotelf = 10,       // Non-zero if format is different than ELF.
+    GEM5_DEPRECATE_AT(NOTELF, Notelf),
+    Gem5AtUid = 11,          // Address of real user ID of thread.
+    GEM5_DEPRECATE_AT(UID, Uid),
+    Gem5AtEuid = 12,         // Address of effective user ID of thread.
+    GEM5_DEPRECATE_AT(EUID, Euid),
+    Gem5AtGid = 13,          // Address of real group ID of thread.
+    GEM5_DEPRECATE_AT(GID, Gid),
+    Gem5AtEgid = 14,         // Address of effective group ID of thread.
+    GEM5_DEPRECATE_AT(EGID, Egid),
+    Gem5AtPlatform = 15,     // Platform string for the architecture.
+    GEM5_DEPRECATE_AT(PLATFORM, Platform),
+ Gem5AtHwcap = 16, // Bits which describe the hardware capabilities.
+    GEM5_DEPRECATE_AT(HWCAP, Hwcap),
+ Gem5AtClktck = 17, // Frequency at which times() syscall increments.
+    GEM5_DEPRECATE_AT(CLKTCK, Clktck),
+ Gem5AtSecure = 23, // Whether to enable "secure mode" in executable.
+    GEM5_DEPRECATE_AT(SECURE, Secure),
+    Gem5BasePlatform = 24,   // Platform string (differs on PowerPC only).
+    GEM5_DEPRECATE_BASE(PLATFORM, Platform),
+    Gem5AtRandom = 25,       // Pointer to 16 bytes of random data.
+    GEM5_DEPRECATE_AT(RANDOM, Random),
+    Gem5AtHwcap2 = 26,       // Extension of AT_HWCAP.
+    GEM5_DEPRECATE_AT(HWCAP2, Hwcap2),
+    Gem5AtExecfn = 31,       // Filename of the program.
+    GEM5_DEPRECATE_AT(EXECFN, Execfn),
+    Gem5AtVectorSize = 44,
+    GEM5_DEPRECATE_AT(VECTOR_SIZE, VectorSize)
 };

+#undef GEM5_DEPRECATE_AT
+
 #endif // __AUX_VECTOR_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45242
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie0dc34a683b113a4ed4bc76054eb822676f6e802
Gerrit-Change-Number: 45242
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to