summaryrefslogtreecommitdiff
path: root/arch/mips/arch_mips.cpp
diff options
context:
space:
mode:
authornoone <you@example.com>2024-07-31 20:47:28 -0500
committerAlexander Taylor <alex@vector35.com>2024-08-12 15:50:54 -0400
commitbdc1c7134e14fc18182e33dfa3fe98ba10c38acf (patch)
tree51394bf04591f1b3335997b3595365cc75cdeeca /arch/mips/arch_mips.cpp
parent0bf72f94c49f34fc550c2d5c2fbab7a95ac72628 (diff)
Add IL, intrinsics for TLB-related instructions
Diffstat (limited to 'arch/mips/arch_mips.cpp')
-rw-r--r--arch/mips/arch_mips.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/mips/arch_mips.cpp b/arch/mips/arch_mips.cpp
index fd90daf0..8d0c70ec 100644
--- a/arch/mips/arch_mips.cpp
+++ b/arch/mips/arch_mips.cpp
@@ -973,6 +973,12 @@ public:
return "_setLeftPart64";
case MIPS_INTRIN_SET_RIGHT_PART64:
return "_setRightPart64";
+ case MIPS_INTRIN_TLBSET:
+ return "_writeTLB";
+ case MIPS_INTRIN_TLBGET:
+ return "_readTLB";
+ case MIPS_INTRIN_TLBSEARCH:
+ return "_probeTLB";
case CNMIPS_INTRIN_SYNCIOBDMA:
return "_synciobdma";
@@ -1034,6 +1040,9 @@ public:
MIPS_INTRIN_GET_RIGHT_PART64,
MIPS_INTRIN_SET_LEFT_PART64,
MIPS_INTRIN_SET_RIGHT_PART64,
+ MIPS_INTRIN_TLBSET,
+ MIPS_INTRIN_TLBGET,
+ MIPS_INTRIN_TLBSEARCH,
CNMIPS_INTRIN_SYNCIOBDMA,
CNMIPS_INTRIN_SYNCS,
@@ -1173,6 +1182,24 @@ public:
return {
NameAndType("rightpart", Type::IntegerType(8, false))
};
+ case MIPS_INTRIN_TLBSET:
+ return {
+ // we use the same order as the pseudocode
+ // in the documentation
+ NameAndType("index", Type::IntegerType(8, false)),
+ NameAndType("PageMask", Type::IntegerType(8, false)),
+ NameAndType("EntryHi", Type::IntegerType(8, false)),
+ NameAndType("EntryLo1", Type::IntegerType(8, false)),
+ NameAndType("EntryLo0", Type::IntegerType(8, false))
+ };
+ case MIPS_INTRIN_TLBGET:
+ return {
+ NameAndType("index", Type::IntegerType(8, false)),
+ };
+ case MIPS_INTRIN_TLBSEARCH:
+ return {
+ NameAndType("match", Type::IntegerType(8, false)),
+ };
default:
return vector<NameAndType>();
}
@@ -1216,6 +1243,19 @@ public:
case MIPS_INTRIN_SET_LEFT_PART64:
case MIPS_INTRIN_SET_RIGHT_PART64:
return {Type::IntegerType(8, false)};
+ case MIPS_INTRIN_TLBGET:
+ return {
+ // we use the same order as the pseudocode
+ // in the documentation:
+
+ // PageMask, EntryHi, EntryLo1, EntryLo0
+ Type::IntegerType(8, false),
+ Type::IntegerType(8, false),
+ Type::IntegerType(8, false),
+ Type::IntegerType(8, false),
+ };
+ case MIPS_INTRIN_TLBSEARCH:
+ return { Type::IntegerType(8, false) };
default:
return vector<Confidence<Ref<Type>>>();
}