mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Various minor style changes.
This commit is contained in:
parent
09017733b8
commit
72ba386d14
@ -1272,12 +1272,12 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
local p = sub(template, 13)
|
local p = sub(template, 13)
|
||||||
if p == "I" then
|
if p == "I" then
|
||||||
local imm_val, a = parse_imm8(params[1])
|
local imm_val, a = parse_imm8(params[1])
|
||||||
op2 = op2 + imm_val;
|
op2 = op2 + imm_val
|
||||||
wputhw(op2);
|
wputhw(op2)
|
||||||
if a then a() end
|
if a then a() end
|
||||||
elseif p == "RI-a" then
|
elseif p == "RI-a" then
|
||||||
op1 = op1 + shl(parse_reg(params[1]), 4)
|
op1 = op1 + shl(parse_reg(params[1]), 4)
|
||||||
wputhw(op1);
|
wputhw(op1)
|
||||||
parse_imm16(params[2])
|
parse_imm16(params[2])
|
||||||
elseif p == "RI-b" then
|
elseif p == "RI-b" then
|
||||||
op1 = op1 + shl(parse_reg(params[1]), 4)
|
op1 = op1 + shl(parse_reg(params[1]), 4)
|
||||||
@ -1303,7 +1303,7 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
parse_imm32(params[2])
|
parse_imm32(params[2])
|
||||||
elseif p == "RIL-b" then
|
elseif p == "RIL-b" then
|
||||||
op0 = op0 + shl(parse_reg(params[1]), 4)
|
op0 = op0 + shl(parse_reg(params[1]), 4)
|
||||||
wputhw(op0);
|
wputhw(op0)
|
||||||
local mode, n, s = parse_label(params[2])
|
local mode, n, s = parse_label(params[2])
|
||||||
waction("REL_"..mode, n, s)
|
waction("REL_"..mode, n, s)
|
||||||
elseif p == "RIL-c" then
|
elseif p == "RIL-c" then
|
||||||
@ -1327,7 +1327,7 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
op2 = op2 + shl(parse_reg(params[1]), 4) + parse_reg(params[2])
|
op2 = op2 + shl(parse_reg(params[1]), 4) + parse_reg(params[2])
|
||||||
wputhw(op1); wputhw(op2)
|
wputhw(op1); wputhw(op2)
|
||||||
elseif p == "RRF-b" then
|
elseif p == "RRF-b" then
|
||||||
wputhw(op1);
|
wputhw(op1)
|
||||||
op2 = op2 + shl(parse_reg(params[1]), 4) + shl(parse_reg(params[2]), 12) + parse_reg(params[3]) + shl(parse_mask(params[4]), 8)
|
op2 = op2 + shl(parse_reg(params[1]), 4) + shl(parse_reg(params[2]), 12) + parse_reg(params[3]) + shl(parse_mask(params[4]), 8)
|
||||||
wputhw(op2)
|
wputhw(op2)
|
||||||
elseif p == "RRF-e" then
|
elseif p == "RRF-e" then
|
||||||
@ -1372,7 +1372,7 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
local d, x, b, a = parse_mem_bx(params[2])
|
local d, x, b, a = parse_mem_bx(params[2])
|
||||||
op1 = op1 + shl(parse_reg(params[1]), 4) + x
|
op1 = op1 + shl(parse_reg(params[1]), 4) + x
|
||||||
op2 = op2 + shl(b, 12) + d
|
op2 = op2 + shl(b, 12) + d
|
||||||
wputhw(op1); wputhw(op2);
|
wputhw(op1); wputhw(op2)
|
||||||
if a then a() end
|
if a then a() end
|
||||||
elseif p == "RX-b" then
|
elseif p == "RX-b" then
|
||||||
local d, x, b, a = parse_mem_bx(params[#params])
|
local d, x, b, a = parse_mem_bx(params[#params])
|
||||||
@ -1381,21 +1381,20 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
end
|
end
|
||||||
op1 = op1 + x
|
op1 = op1 + x
|
||||||
op2 = op2 + shl(b, 12) + d
|
op2 = op2 + shl(b, 12) + d
|
||||||
wputhw(op1);wputhw(op2);
|
wputhw(op1); wputhw(op2)
|
||||||
if a then a() end
|
if a then a() end
|
||||||
elseif p == "RXE" then
|
elseif p == "RXE" then
|
||||||
local d, x, b, a = parse_mem_bx(params[2])
|
local d, x, b, a = parse_mem_bx(params[2])
|
||||||
op0 = op0 + shl(parse_reg(params[1]), 4) + x
|
op0 = op0 + shl(parse_reg(params[1]), 4) + x
|
||||||
op1 = op1 + shl(b, 12) + d
|
op1 = op1 + shl(b, 12) + d
|
||||||
wputhw(op0);
|
wputhw(op0); wputhw(op1)
|
||||||
wputhw(op1);
|
|
||||||
if a then a() end
|
if a then a() end
|
||||||
wputhw(op2);
|
wputhw(op2);
|
||||||
elseif p == "RXF" then
|
elseif p == "RXF" then
|
||||||
local d, x, b, a = parse_mem_bx(params[3])
|
local d, x, b, a = parse_mem_bx(params[3])
|
||||||
op0 = op0 + shl(parse_reg(params[2]), 4) + x
|
op0 = op0 + shl(parse_reg(params[2]), 4) + x
|
||||||
op1 = op1 + shl(b, 12) + d
|
op1 = op1 + shl(b, 12) + d
|
||||||
wputhw(op0); wputhw(op1);
|
wputhw(op0); wputhw(op1)
|
||||||
if a then a() end
|
if a then a() end
|
||||||
op2 = op2 + shl(parse_reg(params[1]), 12)
|
op2 = op2 + shl(parse_reg(params[1]), 12)
|
||||||
wputhw(op2)
|
wputhw(op2)
|
||||||
@ -1409,7 +1408,7 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
elseif p == "S" then
|
elseif p == "S" then
|
||||||
wputhw(op1);
|
wputhw(op1);
|
||||||
local d, b, a = parse_mem_b(params[1])
|
local d, b, a = parse_mem_b(params[1])
|
||||||
op2 = op2 + shl(b,12) + d;
|
op2 = op2 + shl(b, 12) + d
|
||||||
wputhw(op2)
|
wputhw(op2)
|
||||||
if a then a() end
|
if a then a() end
|
||||||
elseif p == "SI" then
|
elseif p == "SI" then
|
||||||
@ -1431,7 +1430,7 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
elseif p == "SIY" then
|
elseif p == "SIY" then
|
||||||
local imm8, iact = parse_imm8(params[2])
|
local imm8, iact = parse_imm8(params[2])
|
||||||
op0 = op0 + shl(imm8, 8)
|
op0 = op0 + shl(imm8, 8)
|
||||||
wputhw(op0);
|
wputhw(op0)
|
||||||
if iact then iact() end
|
if iact then iact() end
|
||||||
local d, b, a = parse_mem_by(params[1])
|
local d, b, a = parse_mem_by(params[1])
|
||||||
op1 = op1 + shl(b, 12) + band(d, 0xfff)
|
op1 = op1 + shl(b, 12) + band(d, 0xfff)
|
||||||
@ -1451,9 +1450,9 @@ local function parse_template(params, template, nparams, pos)
|
|||||||
wputhw(op2)
|
wputhw(op2)
|
||||||
if d2a then d2a() end
|
if d2a then d2a() end
|
||||||
elseif p == "SS-b" then
|
elseif p == "SS-b" then
|
||||||
local high_l=true;
|
local high_l = true
|
||||||
local d1, l1, b1, d1a, l1a = parse_mem_l2b(params[1], high_l)
|
local d1, l1, b1, d1a, l1a = parse_mem_l2b(params[1], high_l)
|
||||||
high_l=false;
|
high_l = false
|
||||||
local d2, l2, b2, d2a, l2a = parse_mem_l2b(params[2], high_l)
|
local d2, l2, b2, d2a, l2a = parse_mem_l2b(params[2], high_l)
|
||||||
op0 = op0 + shl(l1, 4) + l2
|
op0 = op0 + shl(l1, 4) + l2
|
||||||
op1 = op1 + shl(b1, 12) + d1
|
op1 = op1 + shl(b1, 12) + d1
|
||||||
|
Loading…
Reference in New Issue
Block a user