-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[Xtensa] Implement Xtensa Region Protection Option and several other small Options. #137135
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -986,6 +986,64 @@ let Predicates = [HasDiv32] in { | |
def REMU : ArithLogic_RRR<0x0E, 0x02, "remu", urem>; | ||
} | ||
|
||
//===----------------------------------------------------------------------===// | ||
// Region Protection feature instructions | ||
//===----------------------------------------------------------------------===// | ||
|
||
let Predicates = [HasRegionProtection] in { | ||
def IDTLB : RRR_Inst<0x00, 0x00, 0x05, (outs), (ins AR:$s), | ||
"idtlb\t$s", []> { | ||
let r = 0xC; | ||
let t = 0x0; | ||
} | ||
|
||
def IITLB : RRR_Inst<0x00, 0x00, 0x05, (outs), (ins AR:$s), | ||
"iitlb\t$s", []> { | ||
let r = 0x4; | ||
let t = 0x0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Weird indent |
||
} | ||
|
||
def PDTLB : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"pdtlb\t$t, $s", []> { | ||
let r = 0xD; | ||
} | ||
|
||
def PITLB : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"pitlb\t$t, $s", []> { | ||
let r = 0x5; | ||
} | ||
|
||
def RDTLB0 : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"rdtlb0\t$t, $s", []> { | ||
let r = 0xB; | ||
} | ||
|
||
def RDTLB1 : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"rdtlb1\t$t, $s", []> { | ||
let r = 0xF; | ||
} | ||
|
||
def RITLB0 : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"ritlb0\t$t, $s", []> { | ||
let r = 0x3; | ||
} | ||
|
||
def RITLB1 : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"ritlb1\t$t, $s", []> { | ||
let r = 0x7; | ||
} | ||
|
||
def WDTLB : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"wdtlb\t$t, $s", []> { | ||
let r = 0xE; | ||
} | ||
|
||
def WITLB : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s), | ||
"witlb\t$t, $s", []> { | ||
let r = 0x6; | ||
} | ||
} | ||
|
||
//===----------------------------------------------------------------------===// | ||
// DSP Instructions | ||
//===----------------------------------------------------------------------===// | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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,10 @@ | ||
# RUN: llvm-mc -triple=xtensa -mattr=+clamps -disassemble %s | FileCheck -check-prefixes=CHECK-CLAMPS %s | ||
# RUN: not llvm-mc -triple=xtensa -disassemble %s 2>&1 | FileCheck --implicit-check-not=warning: -check-prefixes=CHECK-CORE %s | ||
|
||
## Verify that binary code is correctly disassembled with | ||
## clamps option enabled. Also verify that dissasembling without | ||
## clamps option generates warnings. | ||
|
||
[0x00,0x34,0x33] | ||
# CHECK-CLAMPS: clamps a3, a4, 7 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding |
This file contains hidden or 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 hidden or 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,10 @@ | ||
# RUN: llvm-mc -triple=xtensa -mattr=+dcache -disassemble %s | FileCheck -check-prefixes=CHECK-DCACHE %s | ||
# RUN: not llvm-mc -triple=xtensa -disassemble %s 2>&1 | FileCheck --implicit-check-not=warning: -check-prefixes=CHECK-CORE %s | ||
|
||
## Verify that binary code is correctly disassembled with | ||
## dcache option enabled. Also verify that dissasembling without | ||
## dcache option generates warnings. | ||
|
||
[0x30,0x61,0x61] | ||
# CHECK-DCACHE: xsr a3, memctl | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding |
This file contains hidden or 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,22 @@ | ||
# RUN: llvm-mc -triple=xtensa -mattr=+div32 -disassemble %s | FileCheck -check-prefixes=CHECK-DIV32 %s | ||
# RUN: not llvm-mc -triple=xtensa -disassemble %s 2>&1 | FileCheck --implicit-check-not=warning: -check-prefixes=CHECK-CORE %s | ||
|
||
## Verify that binary code is correctly disassembled with | ||
## div32 option enabled. Also verify that dissasembling without | ||
## div32 option generates warnings. | ||
|
||
[0x50,0x34,0xd2] | ||
# CHECK-DIV32: quos a3, a4, a5 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x50,0x34,0xc2] | ||
# CHECK-DIV32: quou a3, a4, a5 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x50,0x34,0xf2] | ||
# CHECK-DIV32: rems a3, a4, a5 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x50,0x34,0xe2] | ||
# CHECK-DIV32: remu a3, a4, a5 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding |
This file contains hidden or 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,10 @@ | ||
# RUN: llvm-mc -triple=xtensa -mattr=+extendedl32r -disassemble %s | FileCheck -check-prefixes=CHECK-EXTENDEDL32R %s | ||
# RUN: not llvm-mc -triple=xtensa -disassemble %s 2>&1 | FileCheck --implicit-check-not=warning: -check-prefixes=CHECK-CORE %s | ||
|
||
## Verify that binary code is correctly disassembled with | ||
## extendedl32r option enabled. Also verify that dissasembling without | ||
## extendedl32r option generates warnings. | ||
|
||
[0x30,0x05,0x61] | ||
# CHECK-EXTENDEDL32R: xsr a3, litbase | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding |
This file contains hidden or 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,30 @@ | ||
# RUN: llvm-mc -triple=xtensa -mattr=+loop -disassemble %s | FileCheck -check-prefixes=CHECK-LOOP %s | ||
# RUN: not llvm-mc -triple=xtensa -disassemble %s 2>&1 | FileCheck --implicit-check-not=warning: -check-prefixes=CHECK-CORE %s | ||
|
||
## Verify that binary code is correctly disassembled with | ||
## loop option enabled. Also verify that dissasembling without | ||
## loop option generates warnings. | ||
|
||
[0x76,0x83,0x40] | ||
# CHECK-LOOP: loop a3, . +68 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x76,0x93,0x40] | ||
# CHECK-LOOP: loopnez a3, . +68 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x76,0xa3,0x40] | ||
# CHECK-LOOP: loopgtz a3, . +68 | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x30,0x00,0x61] | ||
# CHECK-LOOP: xsr a3, lbeg | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x30,0x01,0x61] | ||
# CHECK-LOOP: xsr a3, lend | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding | ||
|
||
[0x30,0x02,0x61] | ||
# CHECK-LOOP: xsr a3, lcount | ||
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Weird indent