Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks for the review!
There is 'add sp, sp, #4' in basic-thumb-instructions.s and 'add sp, sp, #0x1fe0000' in basic-thumb2-instructions.s
I'm also going to make thumb_rewrites.s pass for Thumb2, too; but it requires an additional fix.
[By the way, I considered writing the 'TryTransform' logic as just one 'if':
if (Mnemonic != "add" || !(Op3Reg == ARM::PC || Op4Reg == ARM::PC || (Op5.isReg() && Op5.getReg() == ARM::PC) || ((Op3Reg == ARM::SP || Op4Reg == ARM::SP || (Op5.isReg() && Op5.getReg() == ARM::SP)) && !(Op3Reg == ARM::SP && Op4Reg == ARM::SP && Op5.isImm() && !Op5.isImm0_1020s4())))) return;
but I thought it was a bit easier to follow with the intermediate steps.]
Comment Actions
Just about the transformation, in this test-file, if you had the allowed imm for SP transformed and the not-allowed not transformed, that'd be enough, I think.
but I thought it was a bit easier to follow with the intermediate steps.
It is. :)