Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Do other assemblers/disassembler handle this instruction? Its not officially documented and I wasn't able to determine for sure what other tools do. For ffreep I at least stumbled onto postings about gcc emitting it and AMD has or had it in the optimization manual.
I also noticed sandpile.org says salc doesn't work in 64-bit mode.
I know we have seen it in production code, but I can't remember what generated it currently. I just tested it with fasm and it assembled correctly. I was able to then disassemble it with IDA, and capstone.
Here is some good documentation on the instruction.
http://www.rcollins.org/secrets/opcodes/SALC.html
lib/Target/X86/X86InstrCMovSetCC.td | ||
---|---|---|
113 ↗ | (On Diff #85978) | I think we need a Requires<[Not64BitMode]> here. sandpile.org and http://www.agner.org/optimize/instruction_tables.pdf both indicate its not available in 64-bit mode. Can you also add a comment that's it undocumented just so its obvious why you can't find it in Intel or AMD official docs. |
Added Requires<[Not64BitMode]> to the SALC instruction, and added a comment saying that it is an undocumented instruction.