Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/cmd/asm/internal/asm/testdata/riscv64.s
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ start:
RDTIME X5 // f32210c0
RDINSTRET X5 // f32220c0

// 10.1: Zihintpause Extension for Pause Hint
PAUSE // 0f000001

// 12.3: Integer Conditional Operations (Zicond)
CZEROEQZ X5, X6, X7 // b353530e
CZEROEQZ X5, X7 // b3d3530e
Expand Down
1 change: 1 addition & 0 deletions src/cmd/internal/obj/riscv/anames.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/cmd/internal/obj/riscv/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ const (
ANEG
ANEGW
ANOT
APAUSE
ARDCYCLE
ARDINSTRET
ARDTIME
Expand Down
4 changes: 4 additions & 0 deletions src/cmd/internal/obj/riscv/obj.go
Original file line number Diff line number Diff line change
Expand Up @@ -3732,6 +3732,10 @@ func instructionsForProg(p *obj.Prog) []*instruction {
}
ins.imm = -1

case APAUSE:
ins.as, ins.rd, ins.rs1, ins.rs2 = AFENCE, REG_ZERO, REG_ZERO, obj.REG_NONE
ins.imm = 0x010

case ASEQZ:
// SEQZ rs, rd -> SLTIU $1, rs, rd
ins.as = ASLTIU
Expand Down