functions. Not convinced that semantic types are actually working --- there are
still problems with earlier statements leaving things in the wrong registers.
I copied the definitions from linux386 and linux68k.
This change also moves _errno and the other common symbols in boot.s
from .text to .bss. Common symbols belong in .bss, but the assembler
seems dumb enough to put them in any section.
In our powerpc table, sdl fails to kill the old value of the local.
This is a bug, because a later ldl can load the old value instead of
the newly stored value. By rewriting "sdl 0" "ldl 0" as "dup 8" "sdl
0", the newly added rule works around the bug, but only when the ldl
is immediately after the sdl.
This rule improves code that uses double-precision floating point.
The output of printf("%f", 6.0) in C changes from all zero digits to
"6000000" but still doesn't print the decimal point. The result of
atof("-123.456") becomes correct. In startrek, I can now move the
Enterprise, but I still can't fire phasers without crashing the game.
We already have a rule for stl lol $1==$2. We had two copies of the
rule, so I am deleting the second copy.
In EM, fef splits a float into exponent and fraction. The old C code,
given an infinite float, got stuck in an infinite loop. The new
assembly code doesn't loop; it extracts the IEEE exponent.
This fixes code that tried to "addi SP, SP, 4" to drop a value that
was in a register, not on the real stack.
Add a rule to optimize "asp 4" (which becomes "loc 4" "ass") when
the value being dropped is already in a GPR.
When ncg fell back on this rule, it did emit the string "invalid" in
the assembly code and caused a syntax error in the assembler.
Adjust the stacking rules so we can stack LOCAL, CONST, and LABEL
without falling back on the "invalid" rule, and so we can stack them
when we have no free register except the scratch register.
jumps to blocks which contain only a jump). Don't bother storing the bb graph
in the ir nodes; we can find it on demand by walking the tree instead ---
slower, but much easier to understand and more robust. Added a terrible map
library.
Don't define __POWERPC. I don't know any other compiler that defines
__POWERPC and don't want to invent a new macro. Apple's gcc 4.0.1
from Xcode 2.5 defines __ppc__, _ARCH_PPC, __POWERPC__. Debian's gcc
4.9.2-10 defines _ARCH_PPC, __PPC__, __powerpc__, __PPC, __powerpc,
PPC, powerpc.
Move the base vm address from 0x80000000 down to 0x10000000, as this
is where Debian loads /bin/true. This is still higher than the base
addresses for linux386 and linux68k.
Sync led's arguments with linux386.