aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-21 13:58:27 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-21 13:58:58 -0800
commit5aca98bc3c716bdff10aab915e190afe47e21379 (patch)
treebe7b5dbb81433ed1d9a766f2fdd1fdc8d4dede6f
parentcbb0b5920855b0d5353966cb2f87f797a37060e5 (diff)
update tests to allow exceptions and setjmp together in fastcomp
-rw-r--r--tests/cases/longjmp_tiny_invoke.ll4
-rw-r--r--tests/cases/longjmp_tiny_invoke_phi.ll4
-rw-r--r--tests/test_core.py12
3 files changed, 8 insertions, 12 deletions
diff --git a/tests/cases/longjmp_tiny_invoke.ll b/tests/cases/longjmp_tiny_invoke.ll
index 5fd35194..6f856d49 100644
--- a/tests/cases/longjmp_tiny_invoke.ll
+++ b/tests/cases/longjmp_tiny_invoke.ll
@@ -29,9 +29,13 @@ if.end: ; preds = %if.else, %if.then
ret i32 0, !dbg !28
awful:
+ %Z = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ cleanup
ret i32 1
}
+declare i32 @__gxx_personality_v0(...)
+
declare i32 @setjmp(i16*) returns_twice
declare i32 @printf(i8*, ...)
diff --git a/tests/cases/longjmp_tiny_invoke_phi.ll b/tests/cases/longjmp_tiny_invoke_phi.ll
index 30c43339..0df3f924 100644
--- a/tests/cases/longjmp_tiny_invoke_phi.ll
+++ b/tests/cases/longjmp_tiny_invoke_phi.ll
@@ -35,6 +35,8 @@ if.end: ; preds = %if.else, %if.then
ret i32 0
awful:
+ %Z = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ cleanup
ret i32 1
}
@@ -44,3 +46,5 @@ declare i32 @printf(i8*, ...)
declare void @longjmp(i16*, i32)
+declare i32 @__gxx_personality_v0(...)
+
diff --git a/tests/test_core.py b/tests/test_core.py
index 7c16f55e..493ab77b 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1117,50 +1117,42 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run_from_file(src, output)
def test_longjmp(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp2(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp2')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp3(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp3')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp4(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp4')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp_funcptr(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp_funcptr')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp_repeat(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
Settings.MAX_SETJMPS = 1
test_path = path_from_root('tests', 'core', 'test_longjmp_repeat')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp_stacked(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp_stacked')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
def test_longjmp_exc(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
test_path = path_from_root('tests', 'core', 'test_longjmp_exc')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
@@ -4665,7 +4657,6 @@ return malloc(size);
def test_lua(self):
if self.emcc_args is None: return self.skip('requires emcc')
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
for aggro in ([0, 1] if Settings.ASM_JS and '-O2' in self.emcc_args else [0]):
print aggro
@@ -4686,7 +4677,6 @@ return malloc(size);
def test_freetype(self):
if self.emcc_args is None: return self.skip('requires emcc')
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: Figure out and try to fix')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
assert 'asm2g' in test_modes
if self.run_name == 'asm2g':
@@ -4832,7 +4822,6 @@ def process(filename):
def test_poppler(self):
if self.emcc_args is None: return self.skip('very slow, we only do this in emcc runs')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
Settings.CORRECT_OVERFLOWS = 1
Settings.CORRECT_SIGNS = 1
@@ -5039,7 +5028,6 @@ def process(filename):
# to process.
def test_cases(self):
if Building.LLVM_OPTS: return self.skip("Our code is not exactly 'normal' llvm assembly")
- if os.environ.get('EMCC_FAST_COMPILER') == '1': Settings.DISABLE_EXCEPTION_CATCHING = 1
emcc_args = self.emcc_args