[PATCH] D50496: [RISCV] Implment pseudo instructions for load/store from a symbol address.

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 12:01:52 PST 2019


jrtc27 added a comment.

In D50496#1358355 <https://reviews.llvm.org/D50496#1358355>, @apazos wrote:

> Just noted that  this is failing:
>
>   "sw zero, (a0)"   
>   <stdin>:1:15: error: operand must be a symbol with %lo/%pcrel_lo modifier or an integer in the range [-2048, 2047]
>   sw      zero, (a0)
>                 ^
>
>
> We should also accept it as `sw  zero, 0(a0)`.
>  I verified GNU accepts it.


[To clarify, we only accept `0(a0)`, whereas GNU as will also accept `(a0)` as having an implicit zero immediate.]

Yes; I have a local patch to add aliases with a missing immediate offset for all the IFDC loads/stores. I have a bunch of patch tidying, updating and submitting to do but it's on my list. However, such support is unrelated to this revision, which is all about expanding pseudo-instructions that use symbols.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D50496/new/

https://reviews.llvm.org/D50496





More information about the llvm-commits mailing list