Skip to content

Commit

Permalink
Add tricore support (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed May 4, 2024
1 parent 071198a commit 733ad00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/ArchMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ static const std::map<std::string, ArchMapper> arch_map = {
CUSTOM_BITS((RzCore *core) {
return 32;
})}},

{ "tricore", { "tricore" } },
};

static const std::map<std::string, std::string> compiler_map = {
Expand Down Expand Up @@ -185,7 +187,7 @@ RZ_API std::string SleighIdFromSleighAsmConfig(const char *cpu, int bits, bool b
auto proc = lang.getProcessor();
if(StrToLower(proc) == low_cpu)
{
return proc
return proc
+ ":" + (bigendian ? "BE" : "LE")
+ ":" + to_string(bits)
+ ":" + "default";
Expand Down
4 changes: 3 additions & 1 deletion src/RizinTypeFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ Datatype *RizinTypeFactory::fromRzTypeInternal(const RzType *ctype, string *erro
{
RzCoreLock core(arch->getCore());
char *tstr = rz_type_as_string(core->analysis->typedb, ctype);
*error = std::string("Failed to get any calling convention for callable ") + tstr;
if (error) {
*error = std::string("Failed to get any calling convention for callable ") + tstr;
}
rz_mem_free(tstr);
return nullptr;
}
Expand Down

0 comments on commit 733ad00

Please sign in to comment.