1// Copyright 2016 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package riscv64
6
7import (
8	"cmd/compile/internal/objw"
9	"cmd/internal/obj"
10	"cmd/internal/obj/riscv"
11)
12
13func ginsnop(pp *objw.Progs) *obj.Prog {
14	// Hardware nop is ADD $0, ZERO
15	p := pp.Prog(riscv.AADD)
16	p.From.Type = obj.TYPE_CONST
17	p.Reg = riscv.REG_ZERO
18	p.To = obj.Addr{Type: obj.TYPE_REG, Reg: riscv.REG_ZERO}
19	return p
20}
21