// Code generated by make inst.go EXTENSIONS="rv64_a rv64_c rv64_d rv64_f rv64_i rv64_m rv64_q rv64_zba rv64_zbb rv64_zbs rv_a rv_c rv_c_d rv_d rv_f rv_i rv_m rv_q rv_s rv_system rv_v rv_zba rv_zbb rv_zbc rv_zbs rv_zicond rv_zicsr"; DO NOT EDIT.
package riscv

import "cmd/internal/obj"

type inst struct {
	opcode uint32
	funct3 uint32
	rs1    uint32
	rs2    uint32
	csr    int64
	funct7 uint32
}

func encode(a obj.As) *inst {
	switch a {
	case AADD:
		return &inst{0x33, 0x0, 0x0, 0x0, 0, 0x0}
	case AADDUW:
		return &inst{0x3b, 0x0, 0x0, 0x0, 128, 0x4}
	case AADDI:
		return &inst{0x13, 0x0, 0x0, 0x0, 0, 0x0}
	case AADDIW:
		return &inst{0x1b, 0x0, 0x0, 0x0, 0, 0x0}
	case AADDW:
		return &inst{0x3b, 0x0, 0x0, 0x0, 0, 0x0}
	case AAMOADDD:
		return &inst{0x2f, 0x3, 0x0, 0x0, 0, 0x0}
	case AAMOADDW:
		return &inst{0x2f, 0x2, 0x0, 0x0, 0, 0x0}
	case AAMOANDD:
		return &inst{0x2f, 0x3, 0x0, 0x0, 1536, 0x30}
	case AAMOANDW:
		return &inst{0x2f, 0x2, 0x0, 0x0, 1536, 0x30}
	case AAMOMAXD:
		return &inst{0x2f, 0x3, 0x0, 0x0, -1536, 0x50}
	case AAMOMAXW:
		return &inst{0x2f, 0x2, 0x0, 0x0, -1536, 0x50}
	case AAMOMAXUD:
		return &inst{0x2f, 0x3, 0x0, 0x0, -512, 0x70}
	case AAMOMAXUW:
		return &inst{0x2f, 0x2, 0x0, 0x0, -512, 0x70}
	case AAMOMIND:
		return &inst{0x2f, 0x3, 0x0, 0x0, -2048, 0x40}
	case AAMOMINW:
		return &inst{0x2f, 0x2, 0x0, 0x0, -2048, 0x40}
	case AAMOMINUD:
		return &inst{0x2f, 0x3, 0x0, 0x0, -1024, 0x60}
	case AAMOMINUW:
		return &inst{0x2f, 0x2, 0x0, 0x0, -1024, 0x60}
