diff options
author | Gabe Black <gabeblack@google.com> | 2019-05-01 20:14:13 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-05-29 04:23:46 +0000 |
commit | 8666440499ef5b175b16efcf9d3a53f0583f0c45 (patch) | |
tree | 8fa4310dcd56908d5c8efbca3854c7444770c8e7 /src/arch/arm | |
parent | d7c4cad240fd4f378d7362da5e9e44b9f0dd80d3 (diff) | |
download | gem5-8666440499ef5b175b16efcf9d3a53f0583f0c45.tar.xz |
arch, base, dev, sim: Remove now unnecessary casts from PortProxy methods.
Change-Id: Ia73b2d86a10d02fa09c924a4571477bb5f200eb7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18572
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/arch/arm')
-rw-r--r-- | src/arch/arm/linux/process.cc | 2 | ||||
-rw-r--r-- | src/arch/arm/process.cc | 5 | ||||
-rw-r--r-- | src/arch/arm/semihosting.cc | 9 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc index 1bb754870..25bccb6b6 100644 --- a/src/arch/arm/linux/process.cc +++ b/src/arch/arm/linux/process.cc @@ -148,7 +148,7 @@ setTLSFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc) uint32_t tlsPtr = process->getSyscallArg(tc, index); tc->getMemProxy().writeBlob(ArmLinuxProcess32::commPage + 0x0ff0, - (uint8_t *)&tlsPtr, sizeof(tlsPtr)); + &tlsPtr, sizeof(tlsPtr)); tc->setMiscReg(MISCREG_TPIDRURO,tlsPtr); return 0; } diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc index baa861fc8..8e3cfd91d 100644 --- a/src/arch/arm/process.cc +++ b/src/arch/arm/process.cc @@ -415,8 +415,7 @@ ArmProcess::argsInit(int pageSize, IntRegIndex spIndex) //Write out the sentry void * IntType sentry_NULL = 0; - initVirtMem.writeBlob(sentry_base, - (uint8_t*)&sentry_NULL, sentry_size); + initVirtMem.writeBlob(sentry_base, &sentry_NULL, sentry_size); //Fix up the aux vectors which point to other data for (int i = auxv.size() - 1; i >= 0; i--) { @@ -446,7 +445,7 @@ ArmProcess::argsInit(int pageSize, IntRegIndex spIndex) copyStringArray(envp, envp_array_base, env_data_base, initVirtMem); copyStringArray(argv, argv_array_base, arg_data_base, initVirtMem); - initVirtMem.writeBlob(argc_base, (uint8_t*)&guestArgc, intSize); + initVirtMem.writeBlob(argc_base, &guestArgc, intSize); ThreadContext *tc = system->getThreadContext(contextIds[0]); //Set the stack pointer register diff --git a/src/arch/arm/semihosting.cc b/src/arch/arm/semihosting.cc index 2b769ef2d..e04f4199d 100644 --- a/src/arch/arm/semihosting.cc +++ b/src/arch/arm/semihosting.cc @@ -272,7 +272,7 @@ ArmSemihosting::readString(ThreadContext *tc, Addr ptr, size_t len) std::vector<char> buf(len + 1); buf[len] = '\0'; - physProxy(tc).readBlob(ptr, (uint8_t *)buf.data(), len); + physProxy(tc).readBlob(ptr, buf.data(), len); return std::string(buf.data()); } @@ -479,8 +479,7 @@ ArmSemihosting::callTmpNam(ThreadContext *tc, bool aarch64, if (path_len >= max_len) return retError(ENOSPC); - physProxy(tc).writeBlob( - guest_buf, (const uint8_t *)path, path_len + 1); + physProxy(tc).writeBlob(guest_buf, path, path_len + 1); return retOK(0); } @@ -551,9 +550,7 @@ ArmSemihosting::callGetCmdLine(ThreadContext *tc, bool aarch64, if (cmdLine.size() + 1 < argv[2]) { PortProxy &proxy = physProxy(tc); ByteOrder endian = ArmISA::byteOrder(tc); - proxy.writeBlob( - (Addr)argv[1], - (const uint8_t *)cmdLine.c_str(), cmdLine.size() + 1); + proxy.writeBlob((Addr)argv[1], cmdLine.c_str(), cmdLine.size() + 1); if (aarch64) proxy.write<uint64_t>(argv[0] + 1 * 8, cmdLine.size(), endian); |