Ghidra is a software reverse engineering (SRE) framework
GP-6007 minor fixes for mfusr, mtusr and csreg space as global in cspec
emteere2efa886f5ca0
diff --git a/Ghidra/Processors/NDS32/data/languages/nds32.cspec b/Ghidra/Processors/NDS32/data/languages/nds32.cspecindex 9d0e2bb3af..ed3a93b095 100644--- a/Ghidra/Processors/NDS32/data/languages/nds32.cspec+++ b/Ghidra/Processors/NDS32/data/languages/nds32.cspec@@ -24,6 +24,7 @@</data_organization><global><range space="ram"/>+ <range space="csreg"/></global><stackpointer register="sp" space="ram"/><returnaddress>diff --git a/Ghidra/Processors/NDS32/data/languages/nds32.sinc b/Ghidra/Processors/NDS32/data/languages/nds32.sincindex 02e2dd9929..141183a38d 100644--- a/Ghidra/Processors/NDS32/data/languages/nds32.sinc+++ b/Ghidra/Processors/NDS32/data/languages/nds32.sinc@@ -320,10 +320,10 @@ UsrName: "pfmc2" is Group=2 & Usr=2 { tmp:2 = 0x202; export *[csreg]:4 tmpUsrName: "pfm_ctl" is Group=2 & Usr=4 { tmp:2 = 0x208; export *[csreg]:4 tmp; }-:mfusr Rt, UsrName is $(I32) & $(ALU_2) & Rt & UsrName & $(ALU2Z) & Sub6=0b100000 { UsrName = Rt; }-:mfusr Rt, pc is $(I32) & $(ALU_2) & Rt & Group=0 & Usr=0b11111 & $(ALU2Z) & Sub6=0b100000 & pc { pc = Rt; goto[pc]; } # Not sure this works correctly-:mtusr Rt, UsrName is $(I32) & $(ALU_2) & Rt & UsrName & $(ALU2Z) & Sub6=0b100001 { Rt = UsrName; }-:mtusr Rt, pc is $(I32) & $(ALU_2) & Rt & Group=0 & Usr=0b11111 & $(ALU2Z) & Sub6=0b100001 & pc { Rt = inst_next; }+:mfusr Rt, UsrName is $(I32) & $(ALU_2) & Rt & UsrName & $(ALU2Z) & Sub6=0b100000 { Rt = UsrName; }+:mfusr Rt, pc is $(I32) & $(ALU_2) & Rt & Group=0 & Usr=0b11111 & $(ALU2Z) & Sub6=0b100000 & pc { Rt = inst_next; }+:mtusr Rt, UsrName is $(I32) & $(ALU_2) & Rt & UsrName & $(ALU2Z) & Sub6=0b100001 { UsrName = Rt; }+:mtusr Rt, pc is $(I32) & $(ALU_2) & Rt & Group=0 & Usr=0b11111 & $(ALU2Z) & Sub6=0b100001 & pc { pc = Rt; goto[pc]; } # Not sure this works correctly### Divide Instructions ###