mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +00:00
Add IRCONV_NONE for pass-through INT to I64/U64 type change.
This commit is contained in:
parent
76fbf0397c
commit
71db0cf043
@ -278,7 +278,9 @@ local litname = {
|
||||
s = irtype[band(shr(mode, 5), 31)].."."..s
|
||||
if band(mode, 0x800) ~= 0 then s = s.." sext" end
|
||||
local c = shr(mode, 12)
|
||||
if c == 2 then s = s.." index" elseif c == 3 then s = s.." check" end
|
||||
if c == 1 then s = s.." none"
|
||||
elseif c == 2 then s = s.." index"
|
||||
elseif c == 3 then s = s.." check" end
|
||||
t[mode] = s
|
||||
return s
|
||||
end}),
|
||||
|
@ -602,7 +602,7 @@ static void asm_conv(ASMState *as, IRIns *ir)
|
||||
emit_dn(as, A64I_SXTW, dest, left);
|
||||
}
|
||||
} else {
|
||||
if (st64) {
|
||||
if (st64 && !(ir->op2 & IRCONV_NONE)) {
|
||||
/* This is either a 32 bit reg/reg mov which zeroes the hiword
|
||||
** or a load of the loword from a 64 bit address.
|
||||
*/
|
||||
|
@ -751,7 +751,7 @@ static void asm_conv(ASMState *as, IRIns *ir)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (st64) {
|
||||
if (st64 && !(ir->op2 & IRCONV_NONE)) {
|
||||
/* This is either a 32 bit reg/reg mov which zeroes the hiword
|
||||
** or a load of the loword from a 64 bit address.
|
||||
*/
|
||||
|
@ -924,7 +924,7 @@ static void asm_conv(ASMState *as, IRIns *ir)
|
||||
}
|
||||
} else {
|
||||
Reg dest = ra_dest(as, ir, RSET_GPR);
|
||||
if (st64) {
|
||||
if (st64 && !(ir->op2 & IRCONV_NONE)) {
|
||||
Reg left = asm_fuseload(as, lref, RSET_GPR);
|
||||
/* This is either a 32 bit reg/reg mov which zeroes the hiword
|
||||
** or a load of the loword from a 64 bit address.
|
||||
|
@ -250,6 +250,7 @@ IRFLDEF(FLENUM)
|
||||
#define IRCONV_ANY (1<<IRCONV_CSH) /* Any FP number is ok. */
|
||||
#define IRCONV_INDEX (2<<IRCONV_CSH) /* Check + special backprop rules. */
|
||||
#define IRCONV_CHECK (3<<IRCONV_CSH) /* Number checked for integerness. */
|
||||
#define IRCONV_NONE IRCONV_ANY /* INT|*64 no conv, but change type. */
|
||||
|
||||
/* TOSTR mode, stored in op2. */
|
||||
#define IRTOSTR_INT 0 /* Convert integer to string. */
|
||||
|
Loading…
Reference in New Issue
Block a user