diff options
| author | sewardj <unknown> | 2000-01-28 18:07:56 +0000 |
|---|---|---|
| committer | sewardj <unknown> | 2000-01-28 18:07:56 +0000 |
| commit | c39373f1371fd1e46ea91be262f00c277b31f8e5 (patch) | |
| tree | 74dcc8e9b0060821c2dfa121580657d7d74432d9 /ghc/compiler/nativeGen/MachMisc.lhs | |
| parent | f1553c47e89e858cd4576732582e6230730adf53 (diff) | |
| download | haskell-c39373f1371fd1e46ea91be262f00c277b31f8e5.tar.gz | |
[project @ 2000-01-28 18:07:55 by sewardj]
Modifications to make x86 register spilling to work reasonably. It
should work ok most of the time, although there is still a remote
possibility that the allocator simply will be unable to complete
spilling, and will just give up.
-- Incrementally try with 0, 1, 2 and 3 spill regs, so as not to
unduly restrict the supply of regs in code which doesn't need spilling.
-- Remove the use of %ecx for shift values, so it is always available
as the first-choice spill temporary. For code which doesn't do
int division, make %edx and %eax available for spilling too.
Shifts by a non-constant amount (very rare) are now done by
a short test-and-jump sequence, so that %ecx is not tied up.
-- x86 FP: do sin, cos, tan in-line so we get the same answers as gcc.
-- Moved a little code around to remove recursive dependencies.
-- Fix a subtle bug in x86 regUsage, which could cause underestimation
of live ranges.
Diffstat (limited to 'ghc/compiler/nativeGen/MachMisc.lhs')
| -rw-r--r-- | ghc/compiler/nativeGen/MachMisc.lhs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ghc/compiler/nativeGen/MachMisc.lhs b/ghc/compiler/nativeGen/MachMisc.lhs index d31af20307..893bf873e4 100644 --- a/ghc/compiler/nativeGen/MachMisc.lhs +++ b/ghc/compiler/nativeGen/MachMisc.lhs @@ -507,6 +507,7 @@ current translation. | SAR Size Operand Operand -- 1st operand must be an Imm or CL | SHR Size Operand Operand -- 1st operand must be an Imm or CL | NOP + | BT Size Imm Operand -- Float Arithmetic. -- ToDo for 386 @@ -539,6 +540,9 @@ current translation. | GABS Size Reg Reg -- src, dst | GNEG Size Reg Reg -- src, dst | GSQRT Size Reg Reg -- src, dst + | GSIN Size Reg Reg -- src, dst + | GCOS Size Reg Reg -- src, dst + | GTAN Size Reg Reg -- src, dst | GFREE -- do ffree on all x86 regs; an ugly hack -- Comparison @@ -598,6 +602,7 @@ is_G_instr instr GSUB _ _ _ _ -> True; GMUL _ _ _ _ -> True GCMP _ _ _ -> True; GABS _ _ _ -> True GNEG _ _ _ -> True; GSQRT _ _ _ -> True + GSIN _ _ _ -> True; GCOS _ _ _ -> True; GTAN _ _ _ -> True; GFREE -> panic "is_G_instr: GFREE (!)" other -> False |
