This patch enables assembler support for .set arch=octeon.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
A few questions about the overall direction this core-specific support is going. I'm coming from the perspective of getting overall behavior of LLVM and GCC/binutils to be similar. I don't have a good understanding of current LLVM support though so please excuse any simplistic questions:
- Is there any code to tell the assembler that octeon is a 64-bit arch and that it should switch to gp=64 automatically when seeing the .set octeon directive?
- Are you planning to support .module arch=octeon?
- Are you planning to support clang with -march=octeon?
- Are you planning to support the octeon arch e_flags in the object writer?
- Are octeon+, octeon2, octeon3 also going to be included
- Are the octeon specific branch-on-bit instructions already supported? Either way if/when these are supported are they only enabled with the octeon arch. When these instructions are supported then (3) is quite important.
Thanks,
Matthew
I'm not planning to add more support for octeon. I just want to fix this issue while using -march=octeon and -fintegrated-as. The -march=octeon worked fine for me while using gnu assembler (without -fintegrated-as).
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
5299 ↗ | (On Diff #51882) | Since the goal of this change is only to support ".set arch=octeon" in inline assembly, I am fine with it. |
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
5299 ↗ | (On Diff #51882) | In case it was not clear I was not objecting to this patch. I'm merely concerned that the support for octeon may end up inconsistent if nobody finishes the other parts of LLVM that would be affected. The most important part would be to sort out the integrated assembler to set E_MIPS_MACH_OCTEON if someone uses -march=octeon or .module=octeon otherwise an octeon elf will masquerade as a simple mips64r2. |
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
5299 ↗ | (On Diff #51882) | I agree, that's another/related issue with the integrated assembler that should be resolved. |
Any more comments ? It seems to me that cnmips case is not used here. Maybe I should remove it ?
LGTM with the test change
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
5299 ↗ | (On Diff #51882) |
I agree with removing the cnmips->cnmips mapping. I don't mind whether it's in this patch or separate.
D18899 will fix this. |
test/MC/Mips/set-arch.s | ||
40 ↗ | (On Diff #51882) | Could you add an Octeon specific instruction after this line and add a check for it below? It doesn't matter which one since we're just testing that the feature bits were updated correctly |