aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lua/lua.ll15
-rwxr-xr-xtests/runner.py31
2 files changed, 21 insertions, 25 deletions
diff --git a/tests/lua/lua.ll b/tests/lua/lua.ll
index 81c7bc27..cffaa3a2 100644
--- a/tests/lua/lua.ll
+++ b/tests/lua/lua.ll
@@ -13914,7 +13914,7 @@ define hidden void @_Z10luaD_throwP9lua_Statei(%struct.lua_State* %L, i32 %errco
%10 = getelementptr inbounds %struct.lua_State* %9, i32 0, i32 25, !dbg !9995 ; [#uses=1]
%11 = load %struct.lua_longjmp** %10, align 4, !dbg !9995 ; [#uses=1]
%12 = getelementptr inbounds %struct.lua_longjmp* %11, i32 0, i32 2, !dbg !9995 ; [#uses=1]
- volatile store i32 %8, i32* %12, align 4, !dbg !9995
+ store i32 %8, i32* %12, align 4, !dbg !9995
%13 = call i8* @__cxa_allocate_exception(i32 4) nounwind, !dbg !9997 ; [#uses=2]
%14 = bitcast i8* %13 to %struct.lua_longjmp**, !dbg !9997 ; [#uses=1]
%15 = load %struct.lua_State** %1, align 4, !dbg !9997 ; [#uses=1]
@@ -14032,7 +14032,7 @@ define hidden i32 @_Z20luaD_rawrunprotectedP9lua_StatePFvS0_PvES1_(%struct.lua_S
call void @llvm.dbg.declare(metadata !743, metadata !10030), !dbg !10031
call void @llvm.dbg.declare(metadata !743, metadata !10032), !dbg !10034
%5 = getelementptr inbounds %struct.lua_longjmp* %lj, i32 0, i32 2, !dbg !10035 ; [#uses=1]
- volatile store i32 0, i32* %5, align 4, !dbg !10035
+ store i32 0, i32* %5, align 4, !dbg !10035
%6 = load %struct.lua_State** %1, align 4, !dbg !10036 ; [#uses=1]
%7 = getelementptr inbounds %struct.lua_State* %6, i32 0, i32 25, !dbg !10036 ; [#uses=1]
%8 = load %struct.lua_longjmp** %7, align 4, !dbg !10036 ; [#uses=1]
@@ -14044,8 +14044,9 @@ define hidden i32 @_Z20luaD_rawrunprotectedP9lua_StatePFvS0_PvES1_(%struct.lua_S
%12 = load void (%struct.lua_State*, i8*)** %2, align 4, !dbg !10038 ; [#uses=1]
%13 = load %struct.lua_State** %1, align 4, !dbg !10038 ; [#uses=1]
%14 = load i8** %3, align 4, !dbg !10038 ; [#uses=1]
- invoke void %12(%struct.lua_State* %13, i8* %14)
- to label %15 unwind label %24, !dbg !10038
+ call void %12(%struct.lua_State* %13, i8* %14)
+ ; to label %15 unwind label %24, !dbg !10038
+ %15 = load i8** %3
; <label>:15 ; preds = %0
br label %28, !dbg !10038
@@ -14054,13 +14055,13 @@ define hidden i32 @_Z20luaD_rawrunprotectedP9lua_StatePFvS0_PvES1_(%struct.lua_S
%17 = load i8** %4, !dbg !10038 ; [#uses=1]
%18 = call i8* @__cxa_begin_catch(i8* %17) nounwind, !dbg !10038 ; [#uses=0]
%19 = getelementptr inbounds %struct.lua_longjmp* %lj, i32 0, i32 2, !dbg !10038 ; [#uses=1]
- %20 = volatile load i32* %19, align 4, !dbg !10038 ; [#uses=1]
+ %20 = load i32* %19, align 4, !dbg !10038 ; [#uses=1]
%21 = icmp eq i32 %20, 0, !dbg !10038 ; [#uses=1]
br i1 %21, label %22, label %27, !dbg !10038
; <label>:22 ; preds = %16
%23 = getelementptr inbounds %struct.lua_longjmp* %lj, i32 0, i32 2, !dbg !10038 ; [#uses=1]
- volatile store i32 -1, i32* %23, align 4, !dbg !10038
+ store i32 -1, i32* %23, align 4, !dbg !10038
br label %27, !dbg !10038
; <label>:24 ; preds = %0
@@ -14080,7 +14081,7 @@ define hidden i32 @_Z20luaD_rawrunprotectedP9lua_StatePFvS0_PvES1_(%struct.lua_S
%32 = getelementptr inbounds %struct.lua_State* %31, i32 0, i32 25, !dbg !10039 ; [#uses=1]
store %struct.lua_longjmp* %30, %struct.lua_longjmp** %32, align 4, !dbg !10039
%33 = getelementptr inbounds %struct.lua_longjmp* %lj, i32 0, i32 2, !dbg !10040 ; [#uses=1]
- %34 = volatile load i32* %33, align 4, !dbg !10040 ; [#uses=1]
+ %34 = load i32* %33, align 4, !dbg !10040 ; [#uses=1]
ret i32 %34, !dbg !10040
}
diff --git a/tests/runner.py b/tests/runner.py
index 66100b8f..684047e7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6424,27 +6424,22 @@ void*:16
# print opt, "FAIL"
def test_lua(self):
- if self.emcc_args is None and Building.LLVM_OPTS: return self.skip('llvm 3.1 and safe llvm opts break lua')
+ if self.emcc_args is None: return self.skip('requires emcc')
- try:
- os.environ['EMCC_LEAVE_INPUTS_RAW'] = '1'
+ if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
- if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
+ # Overflows in luaS_newlstr hash loop
+ if self.emcc_args is None: Settings.SAFE_HEAP = 0 # Has various warnings, with copied HEAP_HISTORY values (fixed if we copy 'null' as the type)
+ Settings.CORRECT_OVERFLOWS = 1
+ Settings.CHECK_OVERFLOWS = 0
+ Settings.CORRECT_SIGNS = 1 # Not sure why, but needed
+ Settings.INIT_STACK = 1 # TODO: Investigate why this is necessary
- # Overflows in luaS_newlstr hash loop
- if self.emcc_args is None: Settings.SAFE_HEAP = 0 # Has various warnings, with copied HEAP_HISTORY values (fixed if we copy 'null' as the type)
- Settings.CORRECT_OVERFLOWS = 1
- Settings.CHECK_OVERFLOWS = 0
- Settings.CORRECT_SIGNS = 1 # Not sure why, but needed
- Settings.INIT_STACK = 1 # TODO: Investigate why this is necessary
-
- self.do_ll_run(path_from_root('tests', 'lua', 'lua.ll'),
- 'hello lua world!\n17\n1\n2\n3\n4\n7',
- args=['-e', '''print("hello lua world!");print(17);for x = 1,4 do print(x) end;print(10-3)'''],
- output_nicerizer=lambda string, err: (string + err).replace('\n\n', '\n').replace('\n\n', '\n'),
- extra_emscripten_args=['-H', 'libc/fcntl.h,libc/sys/unistd.h,poll.h,libc/math.h,libc/langinfo.h,libc/time.h'])
- finally:
- del os.environ['EMCC_LEAVE_INPUTS_RAW']
+ self.do_ll_run(path_from_root('tests', 'lua', 'lua.ll'),
+ 'hello lua world!\n17\n1\n2\n3\n4\n7',
+ args=['-e', '''print("hello lua world!");print(17);for x = 1,4 do print(x) end;print(10-3)'''],
+ output_nicerizer=lambda string, err: (string + err).replace('\n\n', '\n').replace('\n\n', '\n'),
+ extra_emscripten_args=['-H', 'libc/fcntl.h,libc/sys/unistd.h,poll.h,libc/math.h,libc/langinfo.h,libc/time.h'])
def get_freetype(self):
Settings.INIT_STACK = 1 # TODO: Investigate why this is necessary