From d5520a24b6c356918c2f91bf91dae60f62e1d065 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Thu, 1 Aug 2013 21:51:55 +0400 Subject: [PATCH] Microoptimize (signed-byte 64) type test on x86-64. Similar to the (unsigned-byte 64) one: TEST CL, 3 MOV EAX, ECX => MOV EAX, ECX TEST AL, 3 Also add tests/run-tests-* to .gitignore. --- .gitignore | 1 + src/compiler/x86-64/type-vops.lisp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 69a1b3a..82898af 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ src/runtime/ppc-linux-mcontext.h src/runtime/sparc-funcdef.h tests/test-status.lisp-expr tests/*.so +tests/run-tests-* tools-for-build/determine-endianness tools-for-build/grovel-headers tools-for-build/grovel-headers.exe diff --git a/src/compiler/x86-64/type-vops.lisp b/src/compiler/x86-64/type-vops.lisp index 5f2e78f..0727ca6 100644 --- a/src/compiler/x86-64/type-vops.lisp +++ b/src/compiler/x86-64/type-vops.lisp @@ -264,9 +264,10 @@ (if not-p (values not-target target) (values target not-target)) - (generate-fixnum-test value) - (inst jmp :e yep) (move-qword-to-eax value) + (inst test al-tn fixnum-tag-mask) + (inst jmp :e yep) + (inst and al-tn lowtag-mask) (inst cmp al-tn other-pointer-lowtag) (inst jmp :ne nope) @@ -306,7 +307,6 @@ (values not-target target) (values target not-target)) ;; Is it a fixnum? - ;; Is it a fixnum? (move rax-tn value) (inst test al-tn fixnum-tag-mask) (inst jmp :e fixnum) -- 1.7.10.4