Boekle, Yannick via llvm-dev
2019-Jan-21 15:03 UTC
[llvm-dev] Question regarding ARM ADDri instruction
Hi all, I noticed that for the ARM instruction "ADDri" (which I assume to be "add register immediate") the 3rd operand which should intuitively have operand type MCOI::OPERAND_IMMEDIATE actually has MCOI::OPERAND_UNKNOWN (you can see this in ARMGenInstrInfo.inc inside the build folder). I fixed this by adding the line "let OperandType = OPERAND_IMMEDIATE;" in lib/Target/ARM/ARMInstrInfo.td in the definition of mod_imm (line 692). Is this an actual bug? And if so, what could be a proper fix? I'm not familiar with the intricacies of the ARM tablegen structure. I'm working on https://github.com/llvm-mirror/llvm branch: release_80 commit: 8779077dde876ddfb6dfbe7f1da338f820a8fa13 Regards, Yannick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190121/5f7b2078/attachment.html>
Eli Friedman via llvm-dev
2019-Jan-21 21:17 UTC
[llvm-dev] Question regarding ARM ADDri instruction
The fix you're describing is probably correct. That said, as far as I can tell, basically nothing in the ARM backend actually cares about the OperandType of an instruction, so I don't think it has any practical impact. -Eli On 1/21/2019 7:03 AM, Boekle, Yannick via llvm-dev wrote:> > Hi all, > > > I noticed that for the ARM instruction "ADDri" (which I assume to be > "add register immediate") the 3rd operand which should intuitively > have operand type MCOI::OPERAND_IMMEDIATE actually has > MCOI::OPERAND_UNKNOWN (you can see this in ARMGenInstrInfo.inc inside > the build folder). > > > I fixed this by adding the line "let OperandType = OPERAND_IMMEDIATE;" > in lib/Target/ARM/ARMInstrInfo.td in the definition of mod_imm (line 692). > > > Is this an actual bug? And if so, what could be a proper fix? I'm not > familiar with the intricacies of the ARM tablegen structure. > > > I'm working on > > https://github.com/llvm-mirror/llvm > > branch: release_80 > > commit: 8779077dde876ddfb6dfbe7f1da338f820a8fa13 > > > Regards, > > Yannick > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190121/d564147a/attachment.html>