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

Change subject: mips: Explicitly truncate the syscall return value down to 32 bits.
......................................................................

mips: Explicitly truncate the syscall return value down to 32 bits.

The IntReg type is 32 bits, and using it to cast the syscall return
value is appropriate, but we're attempting to get rid of the ISA
specific register types.

Change-Id: I42496dd2cc086a6b718e1ce087fef81bb897d02f
---
M src/arch/mips/process.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc
index 3f65691..6bae083 100644
--- a/src/arch/mips/process.cc
+++ b/src/arch/mips/process.cc
@@ -224,7 +224,7 @@
         tc->setIntReg(ReturnValueReg, sysret.returnValue());
     } else {
         // got an error, return details
-        tc->setIntReg(SyscallSuccessReg, (IntReg) -1);
+        tc->setIntReg(SyscallSuccessReg, (uint32_t)(-1));
         tc->setIntReg(ReturnValueReg, sysret.errnoValue());
     }
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13619
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: I42496dd2cc086a6b718e1ce087fef81bb897d02f
Gerrit-Change-Number: 13619
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to