aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-08-02 18:30:00 +0000
committerOwen Anderson <resistor@mac.com>2011-08-02 18:30:00 +0000
commit96279d0eff03f18eb5e21de285148be654171005 (patch)
tree13cefee690702e5ee6a15aeb85e2e1e1bfe0842f /lib
parentb93509d38274cc27425748070894c2971eb8842b (diff)
downloadexternal_llvm-96279d0eff03f18eb5e21de285148be654171005.zip
external_llvm-96279d0eff03f18eb5e21de285148be654171005.tar.gz
external_llvm-96279d0eff03f18eb5e21de285148be654171005.tar.bz2
Fix the broken encodings for the VFP vmov.f32 and vmov.f64 instructions, as well as the comments that explain them incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMInstrVFP.td14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMInstrVFP.td b/lib/Target/ARM/ARMInstrVFP.td
index f1f3cb9..6f0a18b 100644
--- a/lib/Target/ARM/ARMInstrVFP.td
+++ b/lib/Target/ARM/ARMInstrVFP.td
@@ -36,6 +36,7 @@ def vfp_f32imm : Operand<f32>,
return ARM::getVFPf32Imm(N->getValueAPF()) != -1;
}]> {
let PrintMethod = "printVFPf32ImmOperand";
+ let DecoderMethod = "DecodeVFPfpImm";
}
def vfp_f64imm : Operand<f64>,
@@ -43,6 +44,7 @@ def vfp_f64imm : Operand<f64>,
return ARM::getVFPf64Imm(N->getValueAPF()) != -1;
}]> {
let PrintMethod = "printVFPf64ImmOperand";
+ let DecoderMethod = "DecodeVFPfpImm";
}
@@ -1091,9 +1093,9 @@ def FCONSTD : VFPAI<(outs DPR:$Dd), (ins vfp_f64imm:$imm),
// Encode instruction operands.
let Inst{15-12} = Dd{3-0};
let Inst{22} = Dd{4};
- let Inst{19} = imm{31};
- let Inst{18-16} = imm{22-20};
- let Inst{3-0} = imm{19-16};
+ let Inst{19} = imm{31}; // The immediate is handled as a float.
+ let Inst{18-16} = imm{25-23};
+ let Inst{3-0} = imm{22-19};
// Encode remaining instruction bits.
let Inst{27-23} = 0b11101;
@@ -1114,9 +1116,9 @@ def FCONSTS : VFPAI<(outs SPR:$Sd), (ins vfp_f32imm:$imm),
// Encode instruction operands.
let Inst{15-12} = Sd{4-1};
let Inst{22} = Sd{0};
- let Inst{19} = imm{31}; // The immediate is handled as a double.
- let Inst{18-16} = imm{22-20};
- let Inst{3-0} = imm{19-16};
+ let Inst{19} = imm{31}; // The immediate is handled as a float.
+ let Inst{18-16} = imm{25-23};
+ let Inst{3-0} = imm{22-19};
// Encode remaining instruction bits.
let Inst{27-23} = 0b11101;