Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit b39c3c3

Browse files
author
Simon Dardis
committed
[mips] Correct the definition of cvt.d.w
An upcoming patch D41434, changes the ordering of the matcher table for assembly. This patch corrects the definition of the normal MIPS cvt.d.w not to be available in microMIPS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325589 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 1968836 commit b39c3c3

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

lib/Target/Mips/MipsInstrFPU.td

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,9 @@ let AdditionalPredicates = [NotInMicroMips] in {
425425
ABSS_FM<0x20, 17>, FGR_32;
426426
def CVT_D32_S : MMRel, ABSS_FT<"cvt.d.s", AFGR64Opnd, FGR32Opnd, II_CVT>,
427427
ABSS_FM<0x21, 16>, FGR_32;
428+
def CVT_D32_W : MMRel, ABSS_FT<"cvt.d.w", AFGR64Opnd, FGR32Opnd, II_CVT>,
429+
ABSS_FM<0x21, 20>, FGR_32;
428430
}
429-
def CVT_D32_W : MMRel, ABSS_FT<"cvt.d.w", AFGR64Opnd, FGR32Opnd, II_CVT>,
430-
ABSS_FM<0x21, 20>, FGR_32;
431-
432431
let DecoderNamespace = "MipsFP64" in {
433432
let AdditionalPredicates = [NotInMicroMips] in {
434433
def CVT_S_L : ABSS_FT<"cvt.s.l", FGR32Opnd, FGR64Opnd, II_CVT>,

test/MC/Mips/micromips-fpu-instructions.s

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips \
1+
# RUN: llvm-mc %s -triple=mipsel -show-encoding -show-inst -mattr=micromips \
22
# RUN: -mcpu=mips32r2 | FileCheck -check-prefix=CHECK-EL %s
3-
# RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips \
3+
# RUN: llvm-mc %s -triple=mips -show-encoding -show-inst -mattr=micromips \
44
# RUN: -mcpu=mips32r2 | FileCheck -check-prefix=CHECK-EB %s
55
# Check that the assembler can handle the documented syntax
66
# for fpu instructions
@@ -47,6 +47,7 @@
4747
# CHECK-EL: neg.d $f6, $f8 # encoding: [0xc8,0x54,0x7b,0x2b]
4848
# CHECK-EL: cvt.d.s $f6, $f8 # encoding: [0xc8,0x54,0x7b,0x13]
4949
# CHECK-EL: cvt.d.w $f6, $f8 # encoding: [0xc8,0x54,0x7b,0x33]
50+
# CHECK-EL: # <MCInst #{{.*}} CVT_D32_W_MM
5051
# CHECK-EL: cvt.s.d $f6, $f8 # encoding: [0xc8,0x54,0x7b,0x1b]
5152
# CHECK-EL: cvt.s.w $f6, $f8 # encoding: [0xc8,0x54,0x7b,0x3b]
5253
# CHECK-EL: cfc1 $6, $0 # encoding: [0xc0,0x54,0x3b,0x10]
@@ -112,6 +113,7 @@
112113
# CHECK-EB: neg.d $f6, $f8 # encoding: [0x54,0xc8,0x2b,0x7b]
113114
# CHECK-EB: cvt.d.s $f6, $f8 # encoding: [0x54,0xc8,0x13,0x7b]
114115
# CHECK-EB: cvt.d.w $f6, $f8 # encoding: [0x54,0xc8,0x33,0x7b]
116+
# CHECK-EB: # <MCInst #{{.*}} CVT_D32_W_MM
115117
# CHECK-EB: cvt.s.d $f6, $f8 # encoding: [0x54,0xc8,0x1b,0x7b]
116118
# CHECK-EB: cvt.s.w $f6, $f8 # encoding: [0x54,0xc8,0x3b,0x7b]
117119
# CHECK-EB: cfc1 $6, $0 # encoding: [0x54,0xc0,0x10,0x3b]

test/MC/Mips/mips-fpu-instructions.s

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
2-
# RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64r2 | FileCheck %s
1+
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -show-inst -mcpu=mips32r2 | FileCheck %s --check-prefixes=CHECK,CHECK-32
2+
# RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -show-inst -mcpu=mips64r2 | FileCheck %s --check-prefixes=CHECK,CHECK-64
33
# Check that the assembler can handle the documented syntax
44
# for FPU instructions.
55
#------------------------------------------------------------------------------
@@ -123,6 +123,8 @@
123123
#------------------------------------------------------------------------------
124124
# CHECK: cvt.d.s $f6, $f7 # encoding: [0xa1,0x39,0x00,0x46]
125125
# CHECK: cvt.d.w $f12, $f14 # encoding: [0x21,0x73,0x80,0x46]
126+
# CHECK-32: # <MCInst #{{.*}} CVT_D32_W
127+
# CHECK-64: # <MCInst #{{.*}} CVT_D64_W
126128
# CHECK: cvt.s.d $f12, $f14 # encoding: [0x20,0x73,0x20,0x46]
127129
# CHECK: cvt.s.w $f6, $f7 # encoding: [0xa0,0x39,0x80,0x46]
128130
# CHECK: cvt.w.d $f12, $f14 # encoding: [0x24,0x73,0x20,0x46]

0 commit comments

Comments
 (0)