diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-25 00:26:22 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-25 00:26:22 +0000 |
| commit | 4ae278a760410e7dddfa3c585dc1bb7b1a3cc851 (patch) | |
| tree | 1800b34c8e7adade31e5883ee26ff367603e9dfe /llvm/lib | |
| parent | 794eb6684d4fcc3cb96f86b73856be9bc6e42702 (diff) | |
| download | bcm5719-llvm-4ae278a760410e7dddfa3c585dc1bb7b1a3cc851.tar.gz bcm5719-llvm-4ae278a760410e7dddfa3c585dc1bb7b1a3cc851.zip | |
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.
llvm-svn: 23033
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCInstrInfo.td | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td b/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td index b0a8b3b9ee7..cfcc2fcac71 100644 --- a/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td @@ -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), "cmpldi $dst, $src1, $src2">, isPPC64; 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)">; -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)">; } 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)">; -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)">; } |

