mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
Some updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26292 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d20d39009
commit
755ee8f9aa
@ -39,6 +39,19 @@ http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00659.html
|
||||
This should use fiadd on chips where it is profitable:
|
||||
double foo(double P, int *I) { return P+*I; }
|
||||
|
||||
We have fiadd patterns now but the followings have the same cost and
|
||||
complexity. We need a way to specify the later is more profitable.
|
||||
|
||||
def FpADD32m : FpI<(ops RFP:$dst, RFP:$src1, f32mem:$src2), OneArgFPRW,
|
||||
[(set RFP:$dst, (fadd RFP:$src1,
|
||||
(extloadf64f32 addr:$src2)))]>;
|
||||
// ST(0) = ST(0) + [mem32]
|
||||
|
||||
def FpIADD32m : FpI<(ops RFP:$dst, RFP:$src1, i32mem:$src2), OneArgFPRW,
|
||||
[(set RFP:$dst, (fadd RFP:$src1,
|
||||
(X86fild addr:$src2, i32)))]>;
|
||||
// ST(0) = ST(0) + [mem32int]
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
The FP stackifier needs to be global. Also, it should handle simple permutates
|
||||
@ -386,11 +399,6 @@ LBB_X_2:
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
The x86 backend currently supports dynamic-no-pic. Need to add asm
|
||||
printer support for static and PIC.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
We should generate bts/btr/etc instructions on targets where they are cheap or
|
||||
when codesize is important. e.g., for:
|
||||
|
||||
@ -419,10 +427,6 @@ When: "movl $_dst, _ptr" is sufficient.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Use fisttp to do FP to integer conversion whenever it is available.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Instead of the following for memset char*, 1, 10:
|
||||
|
||||
movl $16843009, 4(%edx)
|
||||
@ -475,3 +479,21 @@ _test1:
|
||||
|
||||
which is probably slower, but it's interesting at least :)
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Currently the x86 codegen isn't very good at mixing SSE and FPStack
|
||||
code:
|
||||
|
||||
unsigned int foo(double x) { return x; }
|
||||
|
||||
foo:
|
||||
subl $20, %esp
|
||||
movsd 24(%esp), %xmm0
|
||||
movsd %xmm0, 8(%esp)
|
||||
fldl 8(%esp)
|
||||
fisttpll (%esp)
|
||||
movl (%esp), %eax
|
||||
addl $20, %esp
|
||||
ret
|
||||
|
||||
This will be solved when we go to a dynamic programming based isel.
|
||||
|
Loading…
x
Reference in New Issue
Block a user