[llvm] r335057 - [mips] Mark microMIPS64 as being unsupported.
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 19 09:05:44 PDT 2018
Author: sdardis
Date: Tue Jun 19 09:05:44 2018
New Revision: 335057
URL: http://llvm.org/viewvc/llvm-project?rev=335057&view=rev
Log:
[mips] Mark microMIPS64 as being unsupported.
There are no provided instruction definitions for this architecture.
Reviewers: smaksimovic, atanasyan, abeserminji
Differential Revision: https://reviews.llvm.org/D48320
Added:
llvm/trunk/test/CodeGen/Mips/micromips64-unsupported.ll
llvm/trunk/test/MC/Mips/micromips64-unsupported.s
Removed:
llvm/trunk/test/CodeGen/Mips/micromips64r6-unsupported.ll
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
llvm/trunk/test/MC/Mips/expansion-j-sym-pic.s
llvm/trunk/test/MC/Mips/expansion-jal-sym-pic.s
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=335057&r1=335056&r2=335057&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Tue Jun 19 09:05:44 2018
@@ -521,6 +521,9 @@ public:
if (getSTI().getCPU() == "mips64r6" && inMicroMipsMode())
report_fatal_error("microMIPS64R6 is not supported", false);
+
+ if (!isABI_O32() && inMicroMipsMode())
+ report_fatal_error("microMIPS64 is not supported", false);
}
/// True if all of $fcc0 - $fcc7 exist for the current ISA.
Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp?rev=335057&r1=335056&r2=335057&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp Tue Jun 19 09:05:44 2018
@@ -116,6 +116,8 @@ MipsSubtarget::MipsSubtarget(const Tripl
if (hasMips64r6() && InMicroMipsMode)
report_fatal_error("microMIPS64R6 is not supported", false);
+ if (!isABI_O32() && InMicroMipsMode)
+ report_fatal_error("microMIPS64 is not supported.", false);
if (UseIndirectJumpsHazard) {
if (InMicroMipsMode)
Added: llvm/trunk/test/CodeGen/Mips/micromips64-unsupported.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/micromips64-unsupported.ll?rev=335057&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/micromips64-unsupported.ll (added)
+++ llvm/trunk/test/CodeGen/Mips/micromips64-unsupported.ll Tue Jun 19 09:05:44 2018
@@ -0,0 +1,7 @@
+; RUN: not llc -mtriple=mips64-unknown-linux -mcpu=mips64r6 -mattr=+micromips %s 2>&1 | FileCheck %s --check-prefix=MICROMIPS64R6
+; RUN: not llc -mtriple=mips64-unknown-linux -mcpu=mips64 -mattr=+micromips %s 2>&1 | FileCheck %s --check-prefix=MICROMIPS64
+
+; Test that microMIPS64(R6) is not supported.
+
+; MICROMIPS64R6: LLVM ERROR: microMIPS64R6 is not supported
+; MICROMIPS64: LLVM ERROR: microMIPS64 is not supported
Removed: llvm/trunk/test/CodeGen/Mips/micromips64r6-unsupported.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/micromips64r6-unsupported.ll?rev=335056&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/micromips64r6-unsupported.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/micromips64r6-unsupported.ll (removed)
@@ -1,5 +0,0 @@
-; RUN: not llc -mtriple=mips64-unknown-linux -mcpu=mips64r6 -mattr=+micromips %s 2>&1 | FileCheck %s
-
-; Test that microMIPS64R6 is not supported.
-
-; CHECK: LLVM ERROR: microMIPS64R6 is not supported
Modified: llvm/trunk/test/MC/Mips/expansion-j-sym-pic.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/expansion-j-sym-pic.s?rev=335057&r1=335056&r2=335057&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/expansion-j-sym-pic.s (original)
+++ llvm/trunk/test/MC/Mips/expansion-j-sym-pic.s Tue Jun 19 09:05:44 2018
@@ -10,12 +10,6 @@
# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=micromips -show-encoding |\
# RUN: FileCheck %s -check-prefix=MICRO
-# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -mattr=micromips -show-encoding |\
-# RUN: FileCheck %s -check-prefix=MICRO
-
-# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -mattr=micromips -show-encoding |\
-# RUN: FileCheck %s -check-prefix=MICRO
-
# Repeat the tests using ELF output.
# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -filetype=obj | \
Modified: llvm/trunk/test/MC/Mips/expansion-jal-sym-pic.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/expansion-jal-sym-pic.s?rev=335057&r1=335056&r2=335057&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/expansion-jal-sym-pic.s (original)
+++ llvm/trunk/test/MC/Mips/expansion-jal-sym-pic.s Tue Jun 19 09:05:44 2018
@@ -10,12 +10,6 @@
# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=micromips -show-encoding |\
# RUN: FileCheck %s -check-prefixes=ALL,MM,O32-MM
-# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -mattr=micromips -show-encoding |\
-# RUN: FileCheck %s -check-prefixes=ALL,MM,N32-MM
-
-# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -mattr=micromips -show-encoding |\
-# RUN: FileCheck %s -check-prefixes=ALL,MM,N64-MM
-
# Repeat the tests but using ELF output. An initial version of this patch did
# this as the output different depending on whether it went through
# MCAsmStreamer or MCELFStreamer. This ensures that the assembly expansion and
@@ -68,12 +62,6 @@ local_label:
# O32-MM: addiu $25, $25, %lo(local_label) # encoding: [0x33,0x39,A,A]
# O32-MM: # fixup A - offset: 0, value: %lo(local_label), kind: fixup_MICROMIPS_LO16
-# N32-MM: lw $25, %got_disp(local_label)($gp) # encoding: [0xff,0x3c,A,A]
-# N32-MM: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_MICROMIPS_GOT_DISP
-
-# N64-MM: ld $25, %got_disp(local_label)($gp) # encoding: [0xdf,0x99,A,A]
-# N64-MM: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_MICROMIPS_GOT_DISP
-
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
# ALL: nop # encoding: [0x00,0x00,0x00,0x00]
@@ -103,12 +91,6 @@ local_label:
# O32-MM: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
# O32-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
-# N32-MM: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
-# N32-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
-
-# N64-MM: ld $25, %call16(weak_label)($gp) # encoding: [0xdf,0x99,A,A]
-# N64-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
-
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
# ALL: nop # encoding: [0x00,0x00,0x00,0x00]
@@ -138,12 +120,6 @@ local_label:
# O32-MM: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
# O32-MM: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
-# N32-MM: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
-# N32-MM: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
-
-# N64-MM: ld $25, %call16(global_label)($gp) # encoding: [0xdf,0x99,A,A]
-# N64-MM: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
-
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
# ALL: nop # encoding: [0x00,0x00,0x00,0x00]
@@ -175,12 +151,6 @@ local_label:
# O32-MM-NEXT: addiu $25, $25, %lo(.text) # encoding: [0x33,0x39,A,A]
# O32-MM-NEXT: # fixup A - offset: 0, value: %lo(.text), kind: fixup_MICROMIPS_LO16
-# N32-MM: lw $25, %got_disp(.text)($gp) # encoding: [0xff,0x3c,A,A]
-# N32-MM-NEXT: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_MICROMIPS_GOT_DISP
-
-# N64-MM: ld $25, %got_disp(.text)($gp) # encoding: [0xdf,0x99,A,A]
-# N64-MM-NEXT: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_MICROMIPS_GOT_DISP
-
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
# ALL: nop # encoding: [0x00,0x00,0x00,0x00]
@@ -217,12 +187,6 @@ local_label:
# O32-MM: addiu $25, $25, %lo($tmp0) # encoding: [0x33,0x39,A,A]
# O32-MM: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_MICROMIPS_LO16
-# N32-MM: lw $25, %got_disp(.Ltmp0)($gp) # encoding: [0xff,0x3c,A,A]
-# N32-MM: # fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_MICROMIPS_GOT_DISP
-
-# N64-MM: ld $25, %got_disp(.Ltmp0)($gp) # encoding: [0xdf,0x99,A,A]
-# N64-MM: # fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_MICROMIPS_GOT_DISP
-
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
# ALL: nop # encoding: [0x00,0x00,0x00,0x00]
@@ -259,12 +223,6 @@ local_label:
# O32-MM-FIXME: addiu $25, $25, %lo(forward_local) # encoding: [0x33,0x39,A,A]
# O32-MM-FIXME: # fixup A - offset: 0, value: %lo(forward_local), kind: fixup_MICROMIPS_LO16
-# N32-MM-FIXME: lw $25, %got_disp(forward_local)($gp) # encoding: [0xff,0x3c,A,A]
-# N32-MM-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_MICROMIPS_GOT_DISP
-
-# N64-MM-FIXME: ld $25, %got_disp(forward_local)($gp) # encoding: [0xdf,0x99,A,A]
-# N64-MM-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_MICROMIPS_GOT_DISP
-
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
# ALL: nop # encoding: [0x00,0x00,0x00,0x00]
Added: llvm/trunk/test/MC/Mips/micromips64-unsupported.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/micromips64-unsupported.s?rev=335057&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/micromips64-unsupported.s (added)
+++ llvm/trunk/test/MC/Mips/micromips64-unsupported.s Tue Jun 19 09:05:44 2018
@@ -0,0 +1,8 @@
+# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64r6 -target-abi n64 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64R6
+# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64r6 -target-abi n32 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64R6
+
+# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64
+# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64
+
+# 64R6: microMIPS64R6 is not supported
+# 64: microMIPS64 is not supported
More information about the llvm-commits
mailing list