tools/perf/util/annotate-arch/annotate-sparc.c

Source file repositories/reference/linux-study-clean/tools/perf/util/annotate-arch/annotate-sparc.c

File Facts

System
Linux kernel
Corpus path
tools/perf/util/annotate-arch/annotate-sparc.c
Extension
.c
Size
3907 bytes
Lines
178
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (name[0] == 'b') {
			const char *cond = name + 1;

			if (cond[0] == 'r') {
				if (is_branch_reg_cond(cond + 1))
					ops = &jump_ops;
			} else if (is_branch_cond(cond)) {
				ops = &jump_ops;
			}
		} else if (name[0] == 'f' && name[1] == 'b') {
			if (is_branch_float_cond(name + 2))
				ops = &jump_ops;
		}
	}

	if (ops)
		arch__associate_ins_ops(arch, name, ops);

	return ops;
}

const struct arch *arch__new_sparc(const struct e_machine_and_e_flags *id,
				   const char *cpuid __maybe_unused)
{
	struct arch *arch = zalloc(sizeof(*arch));

	if (!arch)
		return NULL;

	arch->name = "sparc";
	arch->id = *id;
	arch->associate_instruction_ops = sparc__associate_instruction_ops;
	arch->objdump.comment_char = '#';
	return arch;
}

Annotation

Implementation Notes