From: Daniel Cederman Date: Mon, 16 Jul 2018 12:28:26 +0000 (+0000) Subject: [Sparc] Use the correct encoding for ta 3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84ab5c258acf44e55634e7a970e90bfe664a55b0;p=llvm [Sparc] Use the correct encoding for ta 3 Summary: The old encoding generated a "tn %g1 + 3" instruction instead of the expected "ta 3". Reviewers: venkatra, jyknight Reviewed By: jyknight Subscribers: fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D49171 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337165 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index 7541e3e2c60..9dee18f2563 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -421,7 +421,7 @@ let hasSideEffects = 1, mayStore = 1 in { def FLUSHW : F3_1<0b10, 0b101011, (outs), (ins), "flushw", [(flushw)]>, Requires<[HasV9]>; - let rd = 0, rs1 = 1, simm13 = 3 in + let rd = 8, rs1 = 0, simm13 = 3 in def TA3 : F3_2<0b10, 0b111010, (outs), (ins), "ta 3", [(flushw)]>; diff --git a/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll b/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll index 1c8e7d8636f..0d0ce0e28cb 100644 --- a/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll +++ b/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll @@ -1,6 +1,6 @@ -;RUN: llc -march=sparc < %s | FileCheck %s -check-prefix=V8 +;RUN: llc -march=sparc -show-mc-encoding < %s | FileCheck %s -check-prefix=V8 ;RUN: llc -march=sparc -mattr=v9 < %s | FileCheck %s -check-prefix=V9 -;RUN: llc -march=sparc -regalloc=basic < %s | FileCheck %s -check-prefix=V8 +;RUN: llc -march=sparc -show-mc-encoding -regalloc=basic < %s | FileCheck %s -check-prefix=V8 ;RUN: llc -march=sparc -regalloc=basic -mattr=v9 < %s | FileCheck %s -check-prefix=V9 ;RUN: llc -march=sparcv9 < %s | FileCheck %s -check-prefix=SPARC64 @@ -31,7 +31,7 @@ entry: define i8* @frameaddr2() nounwind readnone { entry: ;V8-LABEL: frameaddr2: -;V8: ta 3 +;V8: ta 3 ! encoding: [0x91,0xd0,0x20,0x03] ;V8: ld [%fp+56], {{.+}} ;V8: ld [{{.+}}+56], {{.+}} ;V8: ld [{{.+}}+56], {{.+}}