]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: add support of PCALIGN directive
authorMeng Zhuo <mzh@golangcn.org>
Sun, 12 Nov 2023 09:05:57 +0000 (17:05 +0800)
committerM Zhuo <mzh@golangcn.org>
Wed, 22 Nov 2023 01:50:18 +0000 (01:50 +0000)
commit9840d38cdb2cc550b437b3c34b6b2e9f107bdc91
treeb8b57e5c5a7a10e1b0e74572b24419aba29afd7f
parentdc5a0d276bbcd6120325c9e0f9c8fd099fa2b8d6
cmd/internal/obj/riscv: add support of PCALIGN directive

Add support for PCALIGN directive on riscv.
This directive can be used within Go asm to align instruction
by padding NOP directives.

This patch also adds a test to verify the correctness of the PCALIGN
directive.

Original credit by Cooper Qu (Alibaba)
https://gitee.com/xuantie_riscv/xuantie-patch

Change-Id: I8b6524a2bf81a1baf7c9d04b7da2db6c1a7b428f
Reviewed-on: https://go-review.googlesource.com/c/go/+/541740
Run-TryBot: M Zhuo <mzh@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Wang Yaduo <wangyaduo@linux.alibaba.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/internal/obj/riscv/asm_test.go
src/cmd/internal/obj/riscv/obj.go