Commit d40b09d2 authored by qinsoon's avatar qinsoon

[wip] fix list_addr_check_all100 test, list_iter is broken

parent 9b9627bf
......@@ -1098,16 +1098,16 @@ impl <'a> InstructionSelection {
match is_power_of_two(var_ty_size) {
Some(shift) => {
// use tmp_actual_size as result - we do not want to change tmp_var_len
self.backend.emit_mov_r_r(&tmp_actual_size, &tmp_var_len);
if shift != 0 {
// a shift-left will get the total size of var part
self.backend.emit_shl_r_imm8(&tmp_var_len, shift);
self.backend.emit_shl_r_imm8(&tmp_actual_size, shift);
}
// add with fix-part size
self.backend.emit_add_r_imm(&tmp_var_len, fix_part_size as i32);
// mov result to tmp_actual_size
self.backend.emit_mov_r_r(&tmp_actual_size, &tmp_var_len);
self.backend.emit_add_r_imm(&tmp_actual_size, fix_part_size as i32);
}
None => {
// we need to do a multiply
......
......@@ -989,11 +989,13 @@ def test_exception_stack_unwind():
def run_boot_image(entry, output, has_c_main_sig = False, args = [], impl=os.getenv('MU_IMPL', 'zebu')):
from rpython.translator.interactive import Translation
vmargs = ""
if has_c_main_sig:
t = Translation(entry, [rffi.INT, rffi.CCHARPP], backend='mu', impl=impl, codegen='api')
t = Translation(entry, [rffi.INT, rffi.CCHARPP], backend='mu', impl=impl, codegen='api', vmargs=vmargs)
t.driver.disable(['entrypoint_mu'])
else:
t = Translation(entry, None, backend='mu', impl=impl, codegen='api')
t = Translation(entry, None, backend='mu', impl=impl, codegen='api', vmargs=vmargs)
t.driver.standalone = True # force standalone
t.driver.exe_name = output
......
......@@ -43,7 +43,7 @@ def test_rpython_list_append():
res = run_boot_image(main, '/tmp/test_rpython_list_append')
assert res.returncode == 10, res.err
assert res.returncode == 10, 'returncode = %d\n%s' % (res.returncode, res.err)
@may_spawn_proc
def test_rpython_list_iter():
......@@ -61,7 +61,7 @@ def test_rpython_list_iter():
res = run_boot_image(main, '/tmp/test_rpython_list_iter')
assert res.returncode == 45, res.err
assert res.returncode == 45, 'returncode = %d\n%s' % (res.returncode, res.err)
@may_spawn_proc
def test_rpython_list_addr_check_length1():
......@@ -183,7 +183,6 @@ def test_rpython_list_addr_check_all10():
assert res.returncode == 0, 'returncode = %d\n%s' % (res.returncode, res.err)
@pytest.mark.xfail(reason='unknown')
@may_spawn_proc
def test_rpython_list_addr_check_all100():
Int64Ptr = lltype.Ptr(lltype.Array(rffi.LONGLONG, hints={'nolength': True}))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment