From ba6accb98345f796636b088cac1209257e132fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= <bjourne@gmail.com> Date: Mon, 8 Dec 2014 22:39:35 +0100 Subject: [PATCH] cpu.x86.tests: more tests --- basis/cpu/x86/x86-tests.factor | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/basis/cpu/x86/x86-tests.factor b/basis/cpu/x86/x86-tests.factor index 31e0f23ebd..17c710580e 100644 --- a/basis/cpu/x86/x86-tests.factor +++ b/basis/cpu/x86/x86-tests.factor @@ -1,10 +1,33 @@ IN: cpu.x86.tests -USING: cpu.x86.features tools.test math.libm kernel.private math -compiler.cfg.instructions compiler.cfg.debugger kernel ; +USING: compiler.cfg.debugger compiler.cfg.instructions +compiler.codegen.gc-maps compiler.codegen.relocation cpu.architecture +cpu.x86.features kernel kernel.private make math math.libm namespaces sequences +tools.test ; -[ ] [ +{ } [ [ { float } declare fsqrt ] [ ##sqrt? ] contains-insn? sse2? assert= ] unit-test + +! %call-gc +{ V{ } } [ + init-relocation init-gc-maps + [ T{ gc-map { scrub-d V{ } } } %call-gc ] B{ } make drop + gc-maps get +] unit-test + +{ 1 } [ + init-relocation init-gc-maps + [ T{ gc-map { scrub-d V{ 0 0 } } } %call-gc ] B{ } make drop + gc-maps get length +] unit-test + +! %alien-invoke +{ 1 } [ + init-relocation init-gc-maps [ + { } { } { } { } 0 0 { } "dll" T{ gc-map { scrub-d V{ 0 } } } %alien-invoke + ] B{ } make drop + gc-maps get length +] unit-test