Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/internal/obj/riscv: rework instruction generation
Rework instruction generation so that multiple instructions are generated from a single obj.Prog, rather than the current approach where obj.Progs are rewritten. This allows the original obj.Prog to remain intact, before being converted into an architecture specific instruction form. This simplifies the code and removes a level of indirection that results from trying to manipulate obj.Prog.To/obj.Prog.From into forms that match the instruction encoding. Furthermore, the errors reported make more sense since it matches up with the actual assembly that was parsed. Note that the CALL/JMP/JALR type sequences have not yet been migrated to this framework and will likely be converted at a later time. Updates #27532 Change-Id: I9fd12562ed1db0a08cfdc32793897d2a1920ebaa Reviewed-on: https://go-review.googlesource.com/c/go/+/211917 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
- Loading branch information