Richard Pennington via llvm-dev
2015-Sep-27 22:02 UTC
[llvm-dev] [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
The latest TOT of libunwind fails for me when I build UnwindRegistersSave.S for the Mips. My copy of clang uses a 2.25 binutils Mips assembler. This is the message I get: "/home/rich/ellcc/bin/mips-elf-as" -o /tmp/UnwindRegistersSave-a2c974.o -EL /tmp/UnwindRegistersSave-545450.s src/UnwindRegistersSave.S: Assembler messages: src/UnwindRegistersSave.S:99: Error: opcode not supported on this processor: mips1 (mips1) `teq $0,$0' If I compile with -integrated-as it assembles as expected. I was able to get it to work without the integrated assembler with this change: # # extern int unw_getcontext(unw_context_t* thread_state) # # Just trap for the time being. DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) .set mips32r2 teq $0, $0 #elif defined(__ppc__) telling the assembler to allow r2 instructions. Should the integrated assembler be enabled by default for the Mips? It looks as if the stock clang does not use the integrated assembler yet. -Rich
Vasileios Kalintiris via llvm-dev
2015-Sep-27 23:41 UTC
[llvm-dev] [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
Hi Richard, Clang doesn't have support for MIPS I. The trap-on-condition instructions were added in MIPS II and they should work fine. This is why it works with ".set mips32r2". Which version of the ISA did you specify when you used the integrated assembler? Thanks, Vasileios
Richard Pennington via llvm-dev
2015-Sep-27 23:52 UTC
[llvm-dev] [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
On 09/27/2015 06:41 PM, Vasileios Kalintiris wrote:> Hi Richard, > > Clang doesn't have support for MIPS I. The trap-on-condition instructions were added in MIPS II and they should work fine. This is why it works with ".set mips32r2". > > Which version of the ISA did you specify when you used the integrated assembler? > > Thanks, > Vasileios > >Hi Vasileios, The integrated assembler works great. It was gas that complained. Apparently gas must default to MIPS I -Rich
Maybe Matching Threads
- [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
- [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
- [RFC] Strategies for Bootstrapping Compiler-RT builtins
- [LLVMdev] Handling of KILL instructions.
- What is the correct way to cross-compile LLVM and run the (in-tree) tests on a target board?