RISC-V port

Luís Marques luis at luismarques.eu
Tue May 22 12:42:47 UTC 2018


On Monday, 21 May 2018 at 13:48:36 UTC, Luís Marques wrote:
>> From there, it's a matter of setting the ExceptionType 
>> correctly in your MCAsmInfo subclass, and fixing up various 
>> other bits and pieces as required. (For example, the code 
>> generator might need some tweaks to make sure the frame offset 
>> information is up to date, etc.) Grepping lib/Backend for 
>> `DwarfCFI` should provide you with some inspiration.
>
> Cool, I'll look into that.

After setting the ExceptionType the exceptions weren't working 
correctly even with clang++. After diving into the details I 
found out that the use of .uleb128 in .gcc_except_table was 
preventing relocations of symbols referenced in that table from 
being generated. I changed  LLVM's backend configuration in 
MCObjectFileInfo.cpp to use the correct types and with clang++ 
exceptions now seem to be working, at least the minimal case I 
tested. LDC even after rebuilding is still using .uleb128 in 
.gcc_except_table, which is surprising, since it would seem that 
that configuration only depends on the chosen triple. So now I'm 
solving that part of the puzzle.


More information about the digitalmars-d-ldc mailing list