<commit_before>// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file encapsulates some of the odd characteristics of the SPARC64
// instruction set, to minimize its interaction with the core of the
// assembler.

package arch

import (
	"cmd/internal/obj/sparc64"
)

var sparc64Jump = map[string]bool{
	"ABN":    true,
	"ABNE":   true,
	"ABE":    true,
	"ABG":    true,
	"ABLE":   true,
	"ABGE":   true,
	"ABL":    true,
	"ABGU":   true,
	"ABLEU":  true,
	"ABCC":   true,
	"ABCS":   true,
	"ABPOS":  true,
	"ABNEG":  true,
	"ABVC":   true,
	"ABVS":   true,
	"ABRZ":   true,
	"ABRLEZ": true,
	"ABRLZ":  true,
	"ABRNZ":  true,
	"ABRGZ":  true,
	"ABRGEZ": true,
	"AFBA":   true,
	"AFBN":   true,
	"AFBU":   true,
	"AFBG":   true,
	"AFBUG":  true,
	"AFBL":   true,
	"AFBUL":  true,
	"AFBLG":  true,
	"AFBNE":  true,
	"AFBE":   true,
	"AFBUE":  true,
	"AFBGE":  true,
	"AFBUGE": true,
	"AFBLE":  true,
	"AFBULE": true,
	"AFBO":   true,
	"AJMPL":  true,
}

// IsSPARC64CMP reports whether the op (as defined by an arm.A* constant) is
// one of the comparison instructions that require special handling.
func IsSPARC64CMP(op int) bool {
	switch op {
	case sparc64.AFCMPD, sparc64.AFCMPS:
		return true
	}
	return false
}

func jumpSparc64(word string) bool {
	return sparc64Jump[word]
}

func sparc64RegisterNumber(name string, n int16) (int16, bool) {
	switch name {
	case "D":
		if 0 <= n && n <= 30 && n%2 == 0 {
			return sparc64.REG_D0 + n, true<commit_msg>cmd/internal/obj/sparc64: sparc64Jump takes instruction name, not ANAME<commit_after>// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file encapsulates some of the odd characteristics of the SPARC64
// instruction set, to minimize its interaction with the core of the
// assembler.

package arch

import (
	"cmd/internal/obj/sparc64"
)

var sparc64Jump = map[string]bool{
	"BN":    true,
	"BNE":   true,
	"BE":    true,
	"BG":    true,
	"BLE":   true,
	"BGE":   true,
	"BL":    true,
	"BGU":   true,
	"BLEU":  true,
	"BCC":   true,
	"BCS":   true,
	"BPOS":  true,
	"BNEG":  true,
	"BVC":   true,
	"BVS":   true,
	"BRZ":   true,
	"BRLEZ": true,
	"BRLZ":  true,
	"BRNZ":  true,
	"BRGZ":  true,
	"BRGEZ": true,
	"FBA":   true,
	"FBN":   true,
	"FBU":   true,
	"FBG":   true,
	"FBUG":  true,
	"FBL":   true,
	"FBUL":  true,
	"FBLG":  true,
	"FBNE":  true,
	"FBE":   true,
	"FBUE":  true,
	"FBGE":  true,
	"FBUGE": true,
	"FBLE":  true,
	"FBULE": true,
	"FBO":   true,
	"JMPL":  true,
}

// IsSPARC64CMP reports whether the op (as defined by an arm.A* constant) is
// one of the comparison instructions that require special handling.
func IsSPARC64CMP(op int) bool {
	switch op {
	case sparc64.AFCMPD, sparc64.AFCMPS:
		return true
	}
	return false
}

func jumpSparc64(word string) bool {
	return sparc64Jump[word]
}

func sparc64RegisterNumber(name string, n int16) (int16, bool) {
	switch name {
	case "D":
		if 0 <= n && n <= 30 && n%2 == 0 {
			return sparc64.REG_D0 + n, true
{'fraction_non_alphanumeric': 0.15056818181818182, 'fraction_numerical': 0.023989898989898988, 'mean_word_length': 3.24798927613941, 'pattern_counts': {'":': 78, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '804867', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1322, 'n_words': 397}