From 37f858aafd72b763dda96298fd37175ebe9b6fbb Mon Sep 17 00:00:00 2001 From: ghidorahrex Date: Mon, 27 Sep 2021 09:37:43 -0400 Subject: [PATCH] Fixed issue with MIPS64 DINS and related instructions. --- .../MIPS/data/languages/mips64Instructions.sinc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Ghidra/Processors/MIPS/data/languages/mips64Instructions.sinc b/Ghidra/Processors/MIPS/data/languages/mips64Instructions.sinc index d4b0de07a6..3c09b0b428 100644 --- a/Ghidra/Processors/MIPS/data/languages/mips64Instructions.sinc +++ b/Ghidra/Processors/MIPS/data/languages/mips64Instructions.sinc @@ -37,7 +37,7 @@ # 0111 11ss ssst tttt mmmm mLLL LL00 0111 :dins RT, RSsrc, lsb, InsSize is $(AMODE) & prime=0x1F & fct=0x07 & RT & RTsrc & RSsrc & lsb & msbd & InsSize { tmpa:$(REGSIZE) = -1; - tmpa = tmpa >> ($(REGSIZE) - InsSize); + tmpa = tmpa >> ($(REGSIZE)*8 - InsSize); tmpb:$(REGSIZE) = RSsrc & tmpa; tmpa = tmpa << lsb; tmpa = ~tmpa; @@ -48,7 +48,7 @@ # 0111 11ss ssst tttt mmmm mLLL LL00 0101 :dinsm RT, RSsrc, lsb, DinsXSize is $(AMODE) & prime=0x1F & fct=0x05 & RT & RTsrc & RSsrc & lsb & msbd & DinsXSize { tmpa:$(REGSIZE) = -1; - tmpa = tmpa >> ($(REGSIZE) - DinsXSize); + tmpa = tmpa >> ($(REGSIZE)*8 - DinsXSize); tmpb:$(REGSIZE) = RSsrc & tmpa; tmpa = tmpa << lsb; tmpa = ~tmpa; @@ -57,9 +57,9 @@ } # 0111 11ss ssst tttt mmmm mLLL LL00 0110 -:dinsu RT, RSsrc, DXuPos, DinsXSize is $(AMODE) & prime=0x1F & fct=0x06 & RT & RTsrc & RSsrc & lsb & msbd & DXuPos & DinsXSize { +:dinsu RT, RSsrc, DXuPos, InsSize is $(AMODE) & prime=0x1F & fct=0x06 & RT & RTsrc & RSsrc & lsb & msbd & DXuPos & InsSize { tmpa:$(REGSIZE) = -1; - tmpa = tmpa >> ($(REGSIZE) - DinsXSize); + tmpa = tmpa >> ($(REGSIZE)*8 - InsSize); tmpb:$(REGSIZE) = RSsrc & tmpa; tmpa = tmpa << DXuPos; tmpa = ~tmpa;