Fix IcSlot

Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/IA8ONB

Signed-off-by: shixiaowei4 <shixiaowei4@huawei.com>
Change-Id: Ifb93f571fe22c4056c1fa3993da61d502862b7f5
This commit is contained in:
shixiaowei4 2024-07-30 17:33:10 +08:00
parent f3f0491c3b
commit 5ffdc8a832
4 changed files with 17 additions and 11 deletions

View File

@ -62,15 +62,18 @@ def emitter_signature(group, is_jump)
group.each do |insn|
insn.operands.each_with_index do |o, i|
sig[i].width = [o.width, sig[i].width].max
if o.is_signed_imm? || o.is_float_imm?
if is_jump
sig[i].type, sig[i].name = ['const Label &', 'label']
else
sig[i].type = "int#{sig[i].width}_t"
end
else
sig[i].type = "uint#{sig[i].width}_t"
end
end
end
sig.each do |o|
if o.name.start_with?('imm')
o.type, o.name = is_jump ? ['const Label &', 'label'] : ["int#{o.width}_t", o.name]
else
o.type = "uint#{o.width}_t"
end
end
return sig
end
def insns_uniq_sort_fmts

View File

@ -83,10 +83,10 @@ void BytecodeEmitter::<%= emitter_name %>(<%= signature_str %>) {
% signature.each do |arg|
% v = '%s_bitlen' % arg.name
% bitlen_vars.push(v)
% if arg.name.start_with?('imm')
auto <%= v %> = GetBitLengthSigned(<%= arg.name %>);
% else
% if arg.type.start_with?('u')
auto <%= v %> = GetBitLengthUnsigned(<%= arg.name %>);
% else
auto <%= v %> = GetBitLengthSigned(<%= arg.name %>);
% end
% end
%

View File

@ -292,7 +292,7 @@ HWTEST(BytecodeEmitter, <%= emitter_name %>_<%= i.format.pretty.upcase %>_AUTO,
% vals = []
% p.each_with_index do |v, index|
% op = ops[index]
% is_signed = op.name.start_with?('imm')
% is_signed = i.operands[index].is_signed_imm? || i.operands[index].is_float_imm?
% arg = v == 'min' ? get_min(op.width, is_signed) : get_max(op.width, is_signed)
% args.push(arg)
% if op.width <= 8

View File

@ -19,6 +19,7 @@ import os
import shutil
import subprocess
import zipfile
import shutil
def parse_args():
@ -127,6 +128,8 @@ def main():
for failed_abc in failed_abc_list:
print(f" - {failed_abc}")
shutil.rmtree(out_folder)
if __name__ == "__main__":
main()