-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[SPARC][IAS] Add definitions for UA 2005 instructions #138400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
055fe7c
79ab4d1
b2e8de5
017dfac
0261c9c
a2c49c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| //===---- SparcInstrVIS.td - Visual Instruction Set extensions (VIS) -----===// | ||
|
||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| // | ||
| // This file contains instruction formats, definitions and patterns needed for | ||
| // UA 2005 instructions on SPARC. | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| // UltraSPARC Architecture 2005 Instructions | ||
| let Predicates = [HasUA2005] in { | ||
| let hasSideEffects = 1 in | ||
| def ALLCLEAN : InstSP<(outs), (ins), "allclean", []> { | ||
|
||
| let op = 2; | ||
| let Inst{29-19} = 0b00010110001; | ||
| let Inst{18-0} = 0; | ||
| } | ||
| } // Predicates = [HasUA2005] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=sparcv9-unknown-linux -mattr=+ua2005 | FileCheck %s | ||
|
|
||
| ## UA 2005 instructions. | ||
|
|
||
| # CHECK: allclean | ||
| 0x85,0x88,0x00,0x00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ! RUN: not llvm-mc %s -triple=sparcv9 -show-encoding 2>&1 | FileCheck %s --check-prefixes=NO-UA2005 --implicit-check-not=error: | ||
| ! RUN: llvm-mc %s -triple=sparcv9 -mattr=+ua2005 -show-encoding | FileCheck %s --check-prefixes=UA2005 | ||
|
|
||
| !! UA 2005 instructions. | ||
|
|
||
| ! NO-UA2005: error: instruction requires a CPU feature not currently enabled | ||
| ! UA2005: allclean ! encoding: [0x85,0x88,0x00,0x00] | ||
| allclean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point me to the documentation or other resources where I can make sure these processors support these instructions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually refer to the supplement documents (T1 T2 T3 T4 are the most relevant, there also exist M5 and M7 ones if we do get around to implement optimization/ISA extension support for those processors).