diff options
Diffstat (limited to 'src/cmd/asm/internal/arch')
| -rw-r--r-- | src/cmd/asm/internal/arch/loong64.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/arch/loong64.go b/src/cmd/asm/internal/arch/loong64.go index ebf842c1f2..2958ee1a86 100644 --- a/src/cmd/asm/internal/arch/loong64.go +++ b/src/cmd/asm/internal/arch/loong64.go @@ -44,6 +44,17 @@ func IsLoong64MUL(op obj.As) bool { return false } +// IsLoong64RDTIME reports whether the op (as defined by an loong64.A* +// constant) is one of the RDTIMELW/RDTIMEHW/RDTIMED instructions that +// require special handling. +func IsLoong64RDTIME(op obj.As) bool { + switch op { + case loong64.ARDTIMELW, loong64.ARDTIMEHW, loong64.ARDTIMED: + return true + } + return false +} + func loong64RegisterNumber(name string, n int16) (int16, bool) { switch name { case "F": |
