Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sparc][LEON] Add UMAC and SMAC instruction support for Sparc LEON su…
…btargets This change adds SMAC (signed multiply-accumulate) and UMAC (unsigned multiply-accumulate) for LEON subtargets of the Sparc processor. The new files LeonFeatures.td and leon-instructions.ll will both be expanded in future, so I want to leave them separate as small files for this review, to be expanded in future check-ins. Note: The functions are provided only for inline-assembly provision. No DAG selection is provided. Differential Revision: http://reviews.llvm.org/D19911 llvm-svn: 268908
- Loading branch information
Chris Dewhurst
committed
May 9, 2016
1 parent
f60be28
commit e3b8645
Showing
7 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//===-- LeonFeatures.td - Describe the Leon Features -------*- tablegen -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
|
||
//===----------------------------------------------------------------------===// | ||
// UMAC and SMAC support for LEON3 and LEON4 processors. | ||
//===----------------------------------------------------------------------===// | ||
|
||
//support to casa instruction; for leon3 subtarget only | ||
def UMACSMACSupport : SubtargetFeature< | ||
"hasumacsmac", | ||
"HasUmacSmac", | ||
"true", | ||
"Enable UMAC and SMAC for LEON3 and LEON4 processors" | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
! RUN: llvm-mc %s -arch=sparc -mcpu=leon3 -show-encoding | FileCheck %s | ||
! RUN: llvm-mc %s -arch=sparc -mcpu=ut699 -show-encoding | FileCheck %s | ||
! RUN: llvm-mc %s -arch=sparc -mcpu=gr712rc -show-encoding | FileCheck %s | ||
! RUN: llvm-mc %s -arch=sparc -mcpu=leon4 -show-encoding | FileCheck %s | ||
! RUN: llvm-mc %s -arch=sparc -mcpu=gr740 -show-encoding | FileCheck %s | ||
|
||
|
||
! CHECK: umac %i0, %l6, %o2 ! encoding: [0x95,0xf6,0x00,0x16] | ||
umac %i0, %l6, %o2 | ||
|
||
! CHECK: smac %i0, %l6, %o2 ! encoding: [0x95,0xfe,0x00,0x16] | ||
smac %i0, %l6, %o2 |