Thumb2 add immediate alias for SP
authorMihai Popa <mihail.popa@gmail.com>
Mon, 19 Aug 2013 15:02:25 +0000 (15:02 +0000)
committerMihai Popa <mihail.popa@gmail.com>
Mon, 19 Aug 2013 15:02:25 +0000 (15:02 +0000)
commit4a9df8a768823ba74279596da0fabdada25f6de6
tree89ffa9b5a856360a81b74b329824fbf8b113bd47
parent0c127d7c71703a8a6494a0d3882ba94e51195d40
Thumb2 add immediate alias for SP

The Thumb2 add immediate is in fact defined for SP. The manual is misleading as it points to a different section for add immediate with SP, however the encoding is the same as for add immediate with register only with the SP operand hard coded. As such add immediate with SP and add immediate with register can safely be treated as the same instruction.

All the patch does is adjust a register constraint on an instruction alias.

llvm-svn: 188676
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/MC/ARM/basic-thumb2-instructions.s