diff options
| author | Mike Pall <mike> | 2010-08-28 20:05:57 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2010-08-28 20:05:57 +0200 |
| commit | 9c16a9f705574d7e6a19fd06f9906038a7c1fcb8 (patch) | |
| tree | 31487cef9ca885fbaef879f198c38a7ff986e7d5 | |
| parent | 9cb5046c3fe8da1437ec8f3bb682930b3692ba0c (diff) | |
| download | luajit-9c16a9f705574d7e6a19fd06f9906038a7c1fcb8.tar.gz luajit-9c16a9f705574d7e6a19fd06f9906038a7c1fcb8.tar.bz2 luajit-9c16a9f705574d7e6a19fd06f9906038a7c1fcb8.zip | |
PPC: Amend DynASM PowerPC conditional branch instructions.
| -rw-r--r-- | dynasm/dasm_ppc.lua | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/dynasm/dasm_ppc.lua b/dynasm/dasm_ppc.lua index ca75271f..0de51157 100644 --- a/dynasm/dasm_ppc.lua +++ b/dynasm/dasm_ppc.lua | |||
| @@ -825,19 +825,21 @@ end | |||
| 825 | for cond,c in pairs(map_cond) do | 825 | for cond,c in pairs(map_cond) do |
| 826 | local b1 = "b"..cond | 826 | local b1 = "b"..cond |
| 827 | local c1 = (c%4)*0x00010000 + (c < 4 and 0x01000000 or 0) | 827 | local c1 = (c%4)*0x00010000 + (c < 4 and 0x01000000 or 0) |
| 828 | -- bX | 828 | -- bX[l] |
| 829 | map_op[b1.."_1"] = tohex(0x40800000 + c1).."K" | 829 | map_op[b1.."_1"] = tohex(0x40800000 + c1).."K" |
| 830 | map_op[b1.."l_1"] = tohex(0x40800001 + c1).."K" | ||
| 830 | map_op[b1.."_2"] = tohex(0x40800000 + c1).."-XK" | 831 | map_op[b1.."_2"] = tohex(0x40800000 + c1).."-XK" |
| 832 | map_op[b1.."l_2"] = tohex(0x40800001 + c1).."-XK" | ||
| 831 | -- bXlr[l] | 833 | -- bXlr[l] |
| 832 | map_op[b1.."lr".."_0"] = tohex(0x4c800020 + c1) | 834 | map_op[b1.."lr_0"] = tohex(0x4c800020 + c1) |
| 833 | map_op[b1.."lrl".."_0"] = tohex(0x4c800021 + c1) | 835 | map_op[b1.."lrl_0"] = tohex(0x4c800021 + c1) |
| 834 | map_op[b1.."ctr".."_0"] = tohex(0x4c800420 + c1) | 836 | map_op[b1.."ctr_0"] = tohex(0x4c800420 + c1) |
| 835 | map_op[b1.."ctrl".."_0"] = tohex(0x4c800421 + c1) | 837 | map_op[b1.."ctrl_0"] = tohex(0x4c800421 + c1) |
| 836 | -- bXctr[l] | 838 | -- bXctr[l] |
| 837 | map_op[b1.."lr".."_1"] = tohex(0x4c800020 + c1).."-X" | 839 | map_op[b1.."lr_1"] = tohex(0x4c800020 + c1).."-X" |
| 838 | map_op[b1.."lrl".."_1"] = tohex(0x4c800021 + c1).."-X" | 840 | map_op[b1.."lrl_1"] = tohex(0x4c800021 + c1).."-X" |
| 839 | map_op[b1.."ctr".."_1"] = tohex(0x4c800420 + c1).."-X" | 841 | map_op[b1.."ctr_1"] = tohex(0x4c800420 + c1).."-X" |
| 840 | map_op[b1.."ctrl".."_1"] = tohex(0x4c800421 + c1).."-X" | 842 | map_op[b1.."ctrl_1"] = tohex(0x4c800421 + c1).."-X" |
| 841 | end | 843 | end |
| 842 | 844 | ||
| 843 | ------------------------------------------------------------------------------ | 845 | ------------------------------------------------------------------------------ |
