From c16c9781939eb8cf175ae82b647c86ed7ea1d767 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Sat, 24 Mar 2012 12:28:43 -0700 Subject: Updated DynASM from upstream (Lua 5.2 support). --- dynasm/dasm_ppc.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'dynasm/dasm_ppc.lua') diff --git a/dynasm/dasm_ppc.lua b/dynasm/dasm_ppc.lua index 01376f7..dc2af69 100644 --- a/dynasm/dasm_ppc.lua +++ b/dynasm/dasm_ppc.lua @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- DynASM PPC module. -- --- Copyright (C) 2005-2011 Mike Pall. All rights reserved. +-- Copyright (C) 2005-2012 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ @@ -9,9 +9,9 @@ local _info = { arch = "ppc", description = "DynASM PPC module", - version = "1.2.2", - vernum = 10202, - release = "2011-01-09", + version = "1.3.0", + vernum = 10300, + release = "2011-05-05", author = "Mike Pall", license = "MIT", } @@ -339,7 +339,8 @@ local map_op = { iselgt_3 = "7c00005eRRR", iseleq_3 = "7c00009eRRR", mfcr_1 = "7c000026R", - -- NYI: mtcrf, mtocrf, mfocrf + mtcrf_2 = "7c000120GR", + -- NYI: mtocrf, mfocrf lwarx_3 = "7c000028RR0R", ldx_3 = "7c00002aRR0R", lwzx_3 = "7c00002eRR0R", @@ -525,7 +526,7 @@ local map_op = { frip_2 = "fc000390F-F.", frim_2 = "fc0003d0F-F.", mffs_1 = "fc00048eF.", - mtfsf_1 = "fc00058eF.", + -- NYI: mtfsf, mtfsb0, mtfsb1. fctid_2 = "fc00065cF-F.", fctidz_2 = "fc00065eF-F.", fcfid_2 = "fc00069cF-F.", @@ -831,8 +832,10 @@ for cond,c in pairs(map_cond) do local c1 = (c%4)*0x00010000 + (c < 4 and 0x01000000 or 0) -- bX[l] map_op[b1.."_1"] = tohex(0x40800000 + c1).."K" + map_op[b1.."y_1"] = tohex(0x40a00000 + c1).."K" map_op[b1.."l_1"] = tohex(0x40800001 + c1).."K" map_op[b1.."_2"] = tohex(0x40800000 + c1).."-XK" + map_op[b1.."y_2"] = tohex(0x40a00000 + c1).."-XK" map_op[b1.."l_2"] = tohex(0x40800001 + c1).."-XK" -- bXlr[l] map_op[b1.."lr_0"] = tohex(0x4c800020 + c1) @@ -1025,6 +1028,8 @@ map_op[".template__"] = function(params, template, nparams) rs = rs - 5; op = op + parse_cr(params[n]) * 2^(rs+2); n = n + 1 elseif p == "W" then op = op + parse_cr(params[n]); n = n + 1 + elseif p == "G" then + op = op + parse_imm(params[n], 8, 12, 0, false); n = n + 1 elseif p == "J" or p == "K" then local mode, n, s = parse_label(params[n], false) if p == "K" then n = n + 2048 end -- cgit v1.2.3