-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[AMDGPU] Remove implicit conversions of MCRegister to unsigned. NFC #167284
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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1199,8 +1199,8 @@ void AMDGPUDisassembler::convertVOP3DPPInst(MCInst &MI) const { | |||||||||
|
|
||||||||||
| // Given a wide tuple \p Reg check if it will overflow 256 registers. | ||||||||||
| // \returns \p Reg on success or NoRegister otherwise. | ||||||||||
| static unsigned CheckVGPROverflow(unsigned Reg, const MCRegisterClass &RC, | ||||||||||
| const MCRegisterInfo &MRI) { | ||||||||||
| static MCRegister CheckVGPROverflow(MCRegister Reg, const MCRegisterClass &RC, | ||||||||||
| const MCRegisterInfo &MRI) { | ||||||||||
| unsigned NumRegs = RC.getSizeInBits() / 32; | ||||||||||
| MCRegister Sub0 = MRI.getSubReg(Reg, AMDGPU::sub0); | ||||||||||
| if (!Sub0) | ||||||||||
|
|
@@ -1214,7 +1214,7 @@ static unsigned CheckVGPROverflow(unsigned Reg, const MCRegisterClass &RC, | |||||||||
|
|
||||||||||
| assert(BaseReg && "Only vector registers expected"); | ||||||||||
|
|
||||||||||
| return (Sub0 - BaseReg + NumRegs <= 256) ? Reg : AMDGPU::NoRegister; | ||||||||||
| return (Sub0 - BaseReg + NumRegs <= 256) ? Reg : MCRegister(); | ||||||||||
|
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. Sub0/BaseReg are implicitly converted to unsigned?
Collaborator
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. I currently have a
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. If you're inclined to leaving the operator out, |
||||||||||
| } | ||||||||||
|
|
||||||||||
| // Note that before gfx10, the MIMG encoding provided no information about | ||||||||||
|
|
@@ -1456,8 +1456,7 @@ MCOperand AMDGPUDisassembler::errOperand(unsigned V, | |||||||||
| return MCOperand(); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| inline | ||||||||||
| MCOperand AMDGPUDisassembler::createRegOperand(unsigned int RegId) const { | ||||||||||
| inline MCOperand AMDGPUDisassembler::createRegOperand(MCRegister RegId) const { | ||||||||||
| return MCOperand::createReg(AMDGPU::getMCReg(RegId, STI)); | ||||||||||
|
||||||||||
| inline MCOperand AMDGPUDisassembler::createRegOperand(MCRegister RegId) const { | |
| return MCOperand::createReg(AMDGPU::getMCReg(RegId, STI)); | |
| inline MCOperand AMDGPUDisassembler::createRegOperand(MCRegister Reg) const { | |
| return MCOperand::createReg(AMDGPU::getMCReg(Reg, STI)); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,7 +69,7 @@ class AMDGPUDisassembler : public MCDisassembler { | |||||
|
|
||||||
| const char* getRegClassName(unsigned RegClassID) const; | ||||||
|
|
||||||
| MCOperand createRegOperand(unsigned int RegId) const; | ||||||
| MCOperand createRegOperand(MCRegister RegId) const; | ||||||
|
||||||
| MCOperand createRegOperand(MCRegister RegId) const; | |
| MCOperand createRegOperand(MCRegister Reg) const; |
Uh oh!
There was an error while loading. Please reload this page.