github.com/usbarmory/tamago@v0.0.0-20240508072735-8612bbe1e454/riscv/csr.h (about) 1 // RISC-V processor support 2 // https://github.com/usbarmory/tamago 3 // 4 // Copyright 2022 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in Go LICENSE file. 7 8 #define t0 5 9 10 #define CSRR(CSR,RD) WORD $(0x2073 + RD<<7 + CSR<<20) 11 #define CSRW(RS,CSR) WORD $(0x1073 + RS<<15 + CSR<<20)