-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[Xtensa] Implement Xtensa MAC16 Option. #130004
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 1 commit
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -73,8 +73,50 @@ static DecodeStatus DecodeARRegisterClass(MCInst &Inst, uint64_t RegNo, | |||||
| return MCDisassembler::Success; | ||||||
| } | ||||||
|
|
||||||
| static const unsigned MRDecoderTable[] = {Xtensa::M0, Xtensa::M1, Xtensa::M2, | ||||||
| Xtensa::M3}; | ||||||
|
|
||||||
| static DecodeStatus DecodeMRRegisterClass(MCInst &Inst, uint64_t RegNo, | ||||||
|
Contributor
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. Start with lowercase
Contributor
Author
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. Sorry, am I understand correctly that DecodeMRRegisterStatus function name should start with lowercase? It seems that this name is generated by tablegen.
Contributor
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. oh, ok |
||||||
| uint64_t Address, | ||||||
| const void *Decoder) { | ||||||
| if (RegNo >= std::size(MRDecoderTable)) | ||||||
| return MCDisassembler::Fail; | ||||||
|
|
||||||
| unsigned Reg = MRDecoderTable[RegNo]; | ||||||
| Inst.addOperand(MCOperand::createReg(Reg)); | ||||||
| return MCDisassembler::Success; | ||||||
| } | ||||||
|
|
||||||
| static const unsigned MR01DecoderTable[] = {Xtensa::M0, Xtensa::M1}; | ||||||
|
|
||||||
| static DecodeStatus DecodeMR01RegisterClass(MCInst &Inst, uint64_t RegNo, | ||||||
| uint64_t Address, | ||||||
| const void *Decoder) { | ||||||
| if (RegNo > 2) | ||||||
| return MCDisassembler::Fail; | ||||||
|
|
||||||
| unsigned Reg = MR01DecoderTable[RegNo]; | ||||||
|
||||||
| Inst.addOperand(MCOperand::createReg(Reg)); | ||||||
| return MCDisassembler::Success; | ||||||
| } | ||||||
|
|
||||||
| static const unsigned MR23DecoderTable[] = {Xtensa::M2, Xtensa::M3}; | ||||||
|
||||||
|
|
||||||
| static DecodeStatus DecodeMR23RegisterClass(MCInst &Inst, uint64_t RegNo, | ||||||
| uint64_t Address, | ||||||
| const void *Decoder) { | ||||||
| if ((RegNo < 2) || (RegNo > 3)) | ||||||
|
||||||
| if ((RegNo < 2) || (RegNo > 3)) | |
| if (RegNo != 2 && RegNo != 3) |
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.
Fixed
Outdated
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.
MCRegister
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.
Fixed
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.
MCPhysReg
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.
Thank you very much for comments. Fixed