Tuan Ta has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/9627 )
Change subject: riscv: fixed syscall return value
......................................................................
riscv: fixed syscall return value
In case of failure, a syscall returns a negative value encoding the
error code. This patch makes the risc-v implementation returns the
encoded value instead of its absolute value upon a failure of a syscall.
Change-Id: I6032b0337fe1cff5b326dbc6bb3b87a415f03300
Reviewed-on: https://gem5-review.googlesource.com/c/9627
Reviewed-by: Alec Roelke <[email protected]>
Maintainer: Alec Roelke <[email protected]>
---
M src/arch/riscv/process.cc
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Alec Roelke: Looks good to me, approved; Looks good to me, approved
diff --git a/src/arch/riscv/process.cc b/src/arch/riscv/process.cc
index ed6de15..16d0dc7 100644
--- a/src/arch/riscv/process.cc
+++ b/src/arch/riscv/process.cc
@@ -279,6 +279,6 @@
tc->setIntReg(SyscallPseudoReturnReg, sysret.returnValue());
} else {
// got an error, return details
- tc->setIntReg(SyscallPseudoReturnReg, sysret.errnoValue());
+ tc->setIntReg(SyscallPseudoReturnReg, sysret.encodedValue());
}
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/9627
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: I6032b0337fe1cff5b326dbc6bb3b87a415f03300
Gerrit-Change-Number: 9627
Gerrit-PatchSet: 10
Gerrit-Owner: Tuan Ta <[email protected]>
Gerrit-Reviewer: Alec Roelke <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Tuan Ta <[email protected]>
Gerrit-CC: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev