Microoptimize type-tests on x86oids.

On x86-64 in %test-lowtag instead of doing:

MOV EAX, ECX
AND AL, 15
CMP AL, 15
do
LEA EAX, [RCX-15]
TEST AL, 15

Which allows to save one byte.

On x86 this optimization is already applied, but since LEA loads a
32-bit integer, EAX can be later used as an already untagged pointer
in %test-headers: MOV EAX, [ECX-7] => MOV EAX, [EAX], which takes one
byte less to encode.
Optimize (unsigned-byte 32/64) type tests on x86oids.

Instead of doing
TEST CL, 3
MOV EAX, ECX

do
MOV EAX, ECX
TEST AL, 3

AL has shorter encoding and can save 1 byte with ECX or 4 bytes with
ESI, which doesn't have SIL on x86.

Also revert a part of the previous commit which used untagged
pointers, which can cause problems with the GC.
Microoptimize comparisons with 0 on x86oids.

Implement the common idiom of using TEST REG, REG in place of CMP REG,
0, saving 1 byte, for fast-if->/< VOPs.
fix manual build under texinfo 5

Texinfo 5 is more assertive about its syntax: macros with
non-alphanumerics have never actually been allowed, but we used to be
able to get away with @& to escape an ampersand under @iftex, and
defining @&key macros under @iffnottex.  Nuh-uh, not any more.  (fixes
lp#1189146)

The details of the indexes, particularly in html format, differ slightly
under texinfo 4 and 5 (related to the trickery around hiding package
prefixes for decent alphabetization).  It might be nice to sort this out
Once And For All, eventually.
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.
Fix undefined function errors on PPC and MIPS.

undefined_tramp hardcodes the register in which FDEFN resides, but the
format was recently changed (f69e89d..).

Other platforms can be susceptible to this.
A proper fix would avoid hardcoding this by exporting
sc-offset-scn-byte/sc-offset-offset-byte, and register offsets.

Thanks to the GCC Compile Farm project for providing machines for
testing and uncovering this.
Optimize calling asm routines and static foreign functions on x86-64.

Instead of loading the address using
LEA REG, [#xADDRESS]
use
MOV REG, #xADDRESS

Which saves 2 bytes.
Throw errors on malformed FUNCTION.

(funcall (function X junk)) didn't throw an error in the presence of a
compiler-macro for X.

Patch by Douglas Katzman.
Warn when defining a setf-function together with a setf-expander.

Patch by Douglas Katzman.
create_os_thread: put pthread stack inside alien-stack.

On !LISP_FEATURE_C_STACK_IS_CONTROL_STACK set pthread stack to
alien_stack, not control_stack.
Set up alien stack correctly on non-x86oids.

It's assumed that the C stack grows upward everywhere but X86oids,
which is not true. Define two new conditions,
ALIEN_STACK_GROWS_DOWNWARD and ALIEN_STACK_GROWS_UPWARD.

This fixes FFI issues on PPC.
Add a memory barrier inside pseudo-atomic on PPC.

Solves problems with allocation and multiple threads.
Apply a recent optimization more widely.

FOREIGN-SYMBOL-SAP was missing changing
LEA REG, [#xADDRESS]
to
MOV REG, #xADDRESS
Clean up listify-rest-args VOP on x86-64.

It's no longer using loop instructions, remove STD and CLD.
Micro-optimize copy-more-arg on x86-64.

Instead of copying RCX into RBX, then modifying RCX and later
restoring RCX from RBX, modify RBX instead.
Clean up and micro-optimize list checking in some x86-64 VOPs.

In length/list and values-list, instead of manually checking for LIST,
call %test-lowtag, which produces more compact code.
Clean up %more-arg-values.

The second argument to %more-arg-values is always 0. Remove it.
Fix ROOM on Windows.

A bit-field inside the page struct is defined as "unsigned fields", on
Linux it's packed into 8 bits, but on 32-bit Windows into 32-bits. The
code in room expects the former. Defining it as "unsigned char fields"
solves the problem.
Fix thread-alloca test on Windows.

Invoke gcc in a more portable fashion.
Flush streams more precisely.

The test for the space left in the stream buffer was too conservative,
leaving 1 byte unused.
Patch by Ken Olum.
Fixes lp#910213.