summaryrefslogtreecommitdiff
path: root/dynasm/dasm_ppc.lua
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2012-03-24 12:28:43 -0700
committerJosh Haberman <jhaberman@gmail.com>2012-03-24 12:28:43 -0700
commitc16c9781939eb8cf175ae82b647c86ed7ea1d767 (patch)
treece7e61052636b388d629590af0dde8d5dd018215 /dynasm/dasm_ppc.lua
parent86bad61b76a260ffc442acffbe58feee67df45e5 (diff)
Updated DynASM from upstream (Lua 5.2 support).
Diffstat (limited to 'dynasm/dasm_ppc.lua')
-rw-r--r--dynasm/dasm_ppc.lua17
1 files changed, 11 insertions, 6 deletions
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback