diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:16 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:16 -0500 |
commit | 237c0617a0c095e35169c3f4e48e93eaf4ada527 (patch) | |
tree | b4b3c805611a04dc8bcdc923e0133c071374a4b2 /src/arch/arm/isa/formats | |
parent | 04e196f4223b5dfd61782edaaac27166a2bfcf3c (diff) | |
download | gem5-237c0617a0c095e35169c3f4e48e93eaf4ada527.tar.xz |
ARM: Implement conversion to/from half precision.
Diffstat (limited to 'src/arch/arm/isa/formats')
-rw-r--r-- | src/arch/arm/isa/formats/fp.isa | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/arch/arm/isa/formats/fp.isa b/src/arch/arm/isa/formats/fp.isa index d509fc28a..03e574648 100644 --- a/src/arch/arm/isa/formats/fp.isa +++ b/src/arch/arm/isa/formats/fp.isa @@ -655,8 +655,23 @@ let {{ } case 0x2: case 0x3: - // Between half and single precision. - return new WarnUnimplemented("vcvtb, vcvtt", machInst); + { + const bool toHalf = bits(machInst, 16); + const bool top = bits(machInst, 7); + if (top) { + if (toHalf) { + return new VcvtFpSFpHT(machInst, vd, vm); + } else { + return new VcvtFpHTFpS(machInst, vd, vm); + } + } else { + if (toHalf) { + return new VcvtFpSFpHB(machInst, vd, vm); + } else { + return new VcvtFpHBFpS(machInst, vd, vm); + } + } + } case 0x4: if (single) { if (e) { |