Implement MC support for the Armv8-R 'Data Full Barrier' instruction.
Details
Diff Detail
Event Timeline
This is the only new instruction added in Armv8-r, right? I assume this is the reason you added a very specific target feature for it (rather than something like armv8-r)? I think this also the reason you had to add 4 separate tiny test files? This is slightly unfortunate, but matches with the way things are done currently.
lib/Target/ARM/ARMInstrInfo.td | ||
---|---|---|
4813 | The instruction is marked as having (unmodelled) side effects. That should tell the scheduler to not move instructions past this instruction, so I think there is no need to add scheduling info. | |
test/MC/Disassembler/ARM/dfb-arm.txt | ||
1 | Please remove SDCOMP-27699. | |
test/MC/Disassembler/ARM/dfb-thumb.txt | ||
1 | Please remove SDCOMP-27699. |
lib/Target/ARM/ARMInstrInfo.td | ||
---|---|---|
4813 | As this is memory relate WriteLd may be a better option (and probably more realistic in terms of timing generally). |
lib/Target/ARM/ARMInstrInfo.td | ||
---|---|---|
4813 | Having an InstAlias to DSB instead of a new instruction allows you to reuse the original instruction definition (and not have to worry about scheduling models). |
@sdesmalen The architecture manual states that DFB is always the preferred disassembly output. So do you know if its possible to do an InstAlias which would produce the 'dfb' string when a dsb #12 is disassembled? Seems cleaner to me to remove the instruction definition, but I'm not sure thats its trivial.
You can set the EmitPriority to 1 (or higher) so that it is always printed when 'dsb #12' is disassembled. (See the comments in include/llvm/Target/Target.td for EmitPriority).
Removed whitespace changes and SDCOMP messages and also removed the instruction definitions in favour of using aliases.
lib/Target/ARM/ARMInstrThumb2.td | ||
---|---|---|
4512 | Thanks for making this change. Also, if you change the last parameter of InstAlias to '1', you don't need to set EmitPriority=1. IntAlias<"dfb${p}", (t2DSB 0xc, pred:$p), 1>, Requires<[HasDFB]>; |
lib/Target/ARM/ARMInstrThumb2.td | ||
---|---|---|
4512 | Ah! Will do |
Thanks for the review. Would either of you mind committing this for me? My computer has just been taken for a rebuild.
I could commit it for your, but I think it's fine to commit this in a couple of days.
I would just use a single new line here.