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

Change subject: sim: Convert GuestABI example signatures to comments.
......................................................................

sim: Convert GuestABI example signatures to comments.

In the base Result and Argument templates, there were private static
functions which weren't meant to be used, but which would act as
documentation for what those functions should look like. They were
marked as private to prevent them from being accidentally used and
causing confusing, hard to debug errors.

Unfortunately, that also meant that those functions exist, and
apparently cause inconsistent problems with SFINAE. I assume if the
functions don't exist at all, then SFINAE will work properly. When
they're private, that seems to cause a substitution failure which
actually is an error which makes the build fail.

Change-Id: I326e9e1d05eafe1b00732ae10264354b07426e74
---
M src/sim/guest_abi/definition.hh
1 file changed, 12 insertions(+), 9 deletions(-)



diff --git a/src/sim/guest_abi/definition.hh b/src/sim/guest_abi/definition.hh
index becdb3c..4928b93 100644
--- a/src/sim/guest_abi/definition.hh
+++ b/src/sim/guest_abi/definition.hh
@@ -57,27 +57,28 @@
 template <typename ABI, typename Ret, typename Enabled=void>
 struct Result
 {
-  private:
     /*
      * Store result "ret" into the state accessible through tc. Optionally
      * accept "state" in case it holds some signature wide information.
      *
      * Note that the declaration below is only to document the expected
-     * signature and is private so it won't be used by accident.
+     * signature and is commented out so it won't be used by accident.
      * Specializations of this Result class should define their own version
-     * of this method which actually does something and is public.
+     * of this method which actually does something.
+     *
+     * static void store(ThreadContext *tc, const Ret &ret);
+     * static void store(ThreadContext *tc, const Ret &ret,
+     *                   typename ABI::State &state);
      */
-    static void store(ThreadContext *tc, const Ret &ret);
-    static void store(ThreadContext *tc, const Ret &ret,
-                      typename ABI::State &state);

     /*
      * Prepare for a result of type Ret. This might mean, for instance,
      * allocating an argument register for a result pointer.
      *
      * This method can be excluded if no preparation is necessary.
+     *
+     * static void prepare(ThreadContext *tc, typename ABI::State &state);
      */
-    static void prepare(ThreadContext *tc, typename ABI::State &state);
 };

 /*
@@ -98,16 +99,18 @@
      *
      * Like Result::store above, the declaration below is only to document
      * the expected method signature.
+     *
+     * static Arg get(ThreadContext *tc, typename ABI::State &state);
      */
-    static Arg get(ThreadContext *tc, typename ABI::State &state);

     /*
      * Prepare for an argument of type Arg. This might mean, for instance,
      * allocating an argument register for a result pointer.
      *
      * This method can be excluded if no preparation is necessary.
+     *
+     * static void allocate(ThreadContext *tc, typename ABI::State &state);
      */
-    static void allocate(ThreadContext *tc, typename ABI::State &state);
 };

 } // namespace GuestABI

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/28308
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: I326e9e1d05eafe1b00732ae10264354b07426e74
Gerrit-Change-Number: 28308
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.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