-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[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, | ||||||
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 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. 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]; | ||||||
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. MCRegister 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. Fixed |
||||||
Inst.addOperand(MCOperand::createReg(Reg)); | ||||||
return MCDisassembler::Success; | ||||||
} | ||||||
|
||||||
static const unsigned MR23DecoderTable[] = {Xtensa::M2, Xtensa::M3}; | ||||||
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. MCPhysReg 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. Fixed |
||||||
|
||||||
static DecodeStatus DecodeMR23RegisterClass(MCInst &Inst, uint64_t RegNo, | ||||||
uint64_t Address, | ||||||
const void *Decoder) { | ||||||
if ((RegNo < 2) || (RegNo > 3)) | ||||||
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.
Suggested change
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. Fixed |
||||||
return MCDisassembler::Fail; | ||||||
|
||||||
unsigned Reg = MR23DecoderTable[RegNo - 2]; | ||||||
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. MCRegister 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. Fixed |
||||||
Inst.addOperand(MCOperand::createReg(Reg)); | ||||||
return MCDisassembler::Success; | ||||||
} | ||||||
|
||||||
const MCPhysReg SRDecoderTable[] = { | ||||||
Xtensa::SAR, 3, Xtensa::WINDOWBASE, 72, Xtensa::WINDOWSTART, 73}; | ||||||
Xtensa::SAR, 3, Xtensa::ACCLO, 16, Xtensa::ACCHI, 17, | ||||||
Xtensa::M0, 32, Xtensa::M1, 33, Xtensa::M2, 34, | ||||||
Xtensa::M3, 35, Xtensa::WINDOWBASE, 72, Xtensa::WINDOWSTART, 73}; | ||||||
|
||||||
static DecodeStatus DecodeSRRegisterClass(MCInst &Inst, uint64_t RegNo, | ||||||
uint64_t Address, | ||||||
|
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