mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
LFS/STFS load and store FP values, not integer ones. This change allows us
to codegen this: float foo() { return 1.245; } into this: _foo: lis r2, ha16(.CPI_foo_0) lfs f1, lo16(.CPI_foo_0)(r2) blr instead of this: _foo: lis r2, ha16(.CPI_foo_0) lfs r2, lo16(.CPI_foo_0)(r2) <-- ouch or f1, r2, r2 <-- ouch blr with the dag isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23033 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed7956bfe4
commit
fdf8366ecc
@ -179,15 +179,15 @@ def CMPLWI : DForm_6_ext<10, (ops CRRC:$dst, GPRC:$src1, u16imm:$src2),
|
|||||||
def CMPLDI : DForm_6_ext<10, (ops CRRC:$dst, GPRC:$src1, u16imm:$src2),
|
def CMPLDI : DForm_6_ext<10, (ops CRRC:$dst, GPRC:$src1, u16imm:$src2),
|
||||||
"cmpldi $dst, $src1, $src2">, isPPC64;
|
"cmpldi $dst, $src1, $src2">, isPPC64;
|
||||||
let isLoad = 1 in {
|
let isLoad = 1 in {
|
||||||
def LFS : DForm_8<48, (ops GPRC:$rD, symbolLo:$disp, GPRC:$rA),
|
def LFS : DForm_8<48, (ops FPRC:$rD, symbolLo:$disp, GPRC:$rA),
|
||||||
"lfs $rD, $disp($rA)">;
|
"lfs $rD, $disp($rA)">;
|
||||||
def LFD : DForm_8<50, (ops GPRC:$rD, symbolLo:$disp, GPRC:$rA),
|
def LFD : DForm_8<50, (ops FPRC:$rD, symbolLo:$disp, GPRC:$rA),
|
||||||
"lfd $rD, $disp($rA)">;
|
"lfd $rD, $disp($rA)">;
|
||||||
}
|
}
|
||||||
let isStore = 1 in {
|
let isStore = 1 in {
|
||||||
def STFS : DForm_9<52, (ops GPRC:$rS, symbolLo:$disp, GPRC:$rA),
|
def STFS : DForm_9<52, (ops FPRC:$rS, symbolLo:$disp, GPRC:$rA),
|
||||||
"stfs $rS, $disp($rA)">;
|
"stfs $rS, $disp($rA)">;
|
||||||
def STFD : DForm_9<54, (ops GPRC:$rS, symbolLo:$disp, GPRC:$rA),
|
def STFD : DForm_9<54, (ops FPRC:$rS, symbolLo:$disp, GPRC:$rA),
|
||||||
"stfd $rS, $disp($rA)">;
|
"stfd $rS, $disp($rA)">;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user