From d9fe562ccc2566291901679425b20dfe11a1ce6c Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 5 Sep 2011 18:28:03 +0200 Subject: [PATCH] PPC: Export register names from disassembler. --- lib/dis_ppc.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/dis_ppc.lua b/lib/dis_ppc.lua index b061a26e..57cd330d 100644 --- a/lib/dis_ppc.lua +++ b/lib/dis_ppc.lua @@ -559,10 +559,16 @@ local function disass_(code, addr, out) create_(code, addr, out):disass() end +-- Return register name for RID. +local function regname_(r) + if r < 32 then return map_gpr[r] end + return "f"..(r-32) +end -- Public module functions. module(...) create = create_ disass = disass_ +regname = regname_ -- 2.11.4.GIT