https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93202

--- Comment #2 from Jim Wilson <wilson at gcc dot gnu.org> ---
%h is used for the gcc internal implementation of emitting auipc.  I'm
skeptical that it is useful for asms.  Stripping the HIGH rtx is an internal
implementation detail, and does not apply to asms, as you can't get a HIGH
there.  Is there a reason why you are trying to use it?  There may be a better
solution for what you need.  If we really need %h to work in asms then it
probably needs some inconvenient work.  I'd rather document that %h shouldn't
be used in asms, or leave it undocumented as an internal gcc implementation
detail.  I'm assuming that you are just working on llvm support, and don't
actually need %h to work in asms, you just need llvm and gcc compatibility.

riscv_print_operand does use output_operand_lossage as it should.  But it calls
a function riscv_print_operand_reloc which calls gcc_unreachable in a switch
statement.  That is an oversight.  It can be fixed to use
output_operand_lossage too.

Reply via email to