mips: Replace gtoh and htog with letoh and htole.
authorGabe Black <gabeblack@google.com>
Tue, 29 Oct 2019 23:23:45 +0000 (16:23 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 7 Nov 2019 11:02:46 +0000 (11:02 +0000)
We already know what endianness to use from within MIPS.

Change-Id: Ic4cd295a7a66c4c8ef55ebcf976fe6637567391f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22369
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/mips/linux/process.cc
src/arch/mips/process.cc

index 1d2709aa17f056a739eea50787daf87355d20e89..adfbfd3f649702d1e8d29d6538d20176c7971712 100644 (file)
@@ -146,7 +146,7 @@ sys_setsysinfoFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
             // I don't think this exactly matches the HW FPCR
             fpcr.copyIn(tc->getVirtProxy());
             DPRINTFR(SyscallVerbose, "sys_setsysinfo(SSI_IEEE_FP_CONTROL): "
-                   " setting FPCR to 0x%x\n", gtoh(*(uint64_t*)fpcr));
+                   " setting FPCR to 0x%x\n", letoh(*(uint64_t*)fpcr));
             return 0;
         }
       default:
index f5aae732cba8a8321ef6082b103964bf137de7b7..ca4f79afd8ec9ae71d8cbe8743ed5d8b1eaa62f6 100644 (file)
@@ -161,7 +161,7 @@ MipsProcess::argsInit(int pageSize)
     // write contents to stack
     IntType argc = argv.size();
 
-    argc = htog((IntType)argc);
+    argc = htole((IntType)argc);
 
     initVirtMem.writeBlob(memState->getStackMin(), &argc, intSize);