Discussion:
[gem5-dev] Change in gem5/gem5[master]: base, arch-arm: clang compilation fixes
Giacomo Travaglini (Gerrit)
2018-11-28 10:45:48 UTC
Permalink
Hello Andreas Sandberg,

I'd like you to do a code review. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/14617

to review the following change.


Change subject: base, arch-arm: clang compilation fixes
......................................................................

base, arch-arm: clang compilation fixes

Fix 1: std::pair constructor is not a constexpr in clang implementation
Fix 2: static const templates need to be defined in their
translation unit

Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Reviewed-by: Andreas Sandberg <***@arm.com>
---
M src/arch/arm/semihosting.hh
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/src/arch/arm/semihosting.hh b/src/arch/arm/semihosting.hh
index 5816460..a9c1193 100644
--- a/src/arch/arm/semihosting.hh
+++ b/src/arch/arm/semihosting.hh
@@ -264,11 +264,11 @@

private:
typedef std::pair<uint64_t, SemiErrno> RetErrno;
- static constexpr RetErrno retError(SemiErrno e) {
+ static RetErrno retError(SemiErrno e) {
return RetErrno((uint64_t)-1, e);
}

- static constexpr RetErrno retOK(uint64_t r) {
+ static RetErrno retOK(uint64_t r) {
return RetErrno(r, 0);
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14617
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Gerrit-Change-Number: 14617
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <***@arm.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-MessageType: newchange
Giacomo Travaglini (Gerrit)
2018-11-28 10:48:04 UTC
Permalink
Hello Andreas Sandberg,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/14617

to look at the new patch set (#2).

Change subject: arch-arm: clang compilation fixes
......................................................................

arch-arm: clang compilation fixes

Fix 1: std::pair constructor is not a constexpr in clang implementation
Fix 2: static const templates need to be defined in their
translation unit

Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Reviewed-by: Andreas Sandberg <***@arm.com>
---
M src/arch/arm/semihosting.hh
1 file changed, 2 insertions(+), 2 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14617
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Gerrit-Change-Number: 14617
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <***@arm.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-MessageType: newpatchset
Giacomo Travaglini (Gerrit)
2018-11-28 11:45:55 UTC
Permalink
Giacomo Travaglini has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/14617 )

Change subject: arch-arm: clang compilation fixes
......................................................................

arch-arm: clang compilation fixes

Fix 1: std::pair constructor is not a constexpr in clang implementation
Fix 2: static const templates need to be defined in their
translation unit

Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Reviewed-by: Andreas Sandberg <***@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14617
Reviewed-by: Giacomo Travaglini <***@arm.com>
Reviewed-by: Nikos Nikoleris <***@arm.com>
Maintainer: Giacomo Travaglini <***@arm.com>
---
M src/arch/arm/semihosting.hh
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
Nikos Nikoleris: Looks good to me, approved
Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved



diff --git a/src/arch/arm/semihosting.hh b/src/arch/arm/semihosting.hh
index 5816460..a9c1193 100644
--- a/src/arch/arm/semihosting.hh
+++ b/src/arch/arm/semihosting.hh
@@ -264,11 +264,11 @@

private:
typedef std::pair<uint64_t, SemiErrno> RetErrno;
- static constexpr RetErrno retError(SemiErrno e) {
+ static RetErrno retError(SemiErrno e) {
return RetErrno((uint64_t)-1, e);
}

- static constexpr RetErrno retOK(uint64_t r) {
+ static RetErrno retOK(uint64_t r) {
return RetErrno(r, 0);
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14617
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Gerrit-Change-Number: 14617
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini <***@arm.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Giacomo Travaglini <***@arm.com>
Gerrit-Reviewer: Nikos Nikoleris <***@arm.com>
Gerrit-MessageType: merged
Loading...