[llvm-dev] How to implement lowerReturn for poring GlobalISel to RISCV?

Leslie Zhai via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 21 16:02:53 PST 2017



在 2017年12月22日 02:53, Friedman, Eli 写道:
> On 12/20/2017 9:03 PM, Leslie Zhai via llvm-dev wrote:
>> Because there are separate trap return instructions[2] per privilege 
>> level: MRET, SRET, and URET. MRET is always provided, while SRET must 
>> be provided if supervisor mode is supported. URET is only provided if 
>> user-mode traps are supported. and David added RISCV privileged 
>> instructionsit[3], then merged into upstream, it might be more 
>> complex than ARM[4] please give me some hint, thanks a lot!
>>
>
> lowerReturn corresponds to the LLVM IR "ret" instruction, which is 
> always a normal function return (JALR), not a return from an interrupt.
Already fixed 
https://github.com/xiangzhai/llvm/commit/0adf9aa558dd452f8e5bffa3f5b127c58f9d3a43 
but thank you to point out my fault!

>
> -Eli
>

-- 
Regards,
Leslie Zhai - https://reviews.llvm.org/p/xiangzhai/





More information about the llvm-dev mailing list