<commit_before>#include "stdio.h"

#include "ucc.h"

enum reg
{
	RAX,
	RBX,
	RCX,
	RDX,

	RDI,
	RSI,

#ifdef EIGHT_ONWARDS
	R8,
	R9,
	R10,
	R11,
#endif
};

static const char *regnames[] = {
	"rax",
	"rbx",
	"rcx",
	"rdx",

	"rdi",
	"rsi",

#ifdef EIGHT_ONWARDS
	"r8 ",
	"r9 ",
	"r10",
	"r11",
#endif
};

void __dump_regs()
{
#define get_reg(r)            \
	__asm__(                    \
			"\tmov rax, " r "\n"    \
			"\tpush rax\n"          \
	)

	unsigned int regs[10];
	unsigned int *rp; // arraysizes workaround
	int i;

	//__asm__("push rax\npush rbx\npush rcx\n");

	rp = regs;

	rp[RAX] = get_reg("rax");
	rp[RBX] = get_reg("rbx");
	rp[RCX] = get_reg("rcx");
#ifdef FULL<commit_msg>inline asm fixes from Intel -> AT&T<commit_after>#include "stdio.h"

#include "ucc.h"

enum reg
{
	RAX,
	RBX,
	RCX,
	RDX,

	RDI,
	RSI,

#ifdef EIGHT_ONWARDS
	R8,
	R9,
	R10,
	R11,
#endif
};

static const char *regnames[] = {
	"rax",
	"rbx",
	"rcx",
	"rdx",

	"rdi",
	"rsi",

#ifdef EIGHT_ONWARDS
	"r8 ",
	"r9 ",
	"r10",
	"r11",
#endif
};

void __dump_regs()
{
#define get_reg(r)            \
	__asm__(                    \
			"\tmovq %rax, %" r "\n"    \
			"\tpushq %rax\n"          \
	)

	unsigned int regs[10];
	unsigned int *rp; // arraysizes workaround
	int i;

	//__asm__("push rax\npush rbx\npush rcx\n");

	rp = regs;

	rp[RAX] = get_reg("rax");
	rp[RBX] = get_reg("rbx");
	rp[RCX] = get_reg("rcx");
#ifdef FULL
{'fraction_non_alphanumeric': 0.1930447125621008, 'fraction_numerical': 0.0198722498225692, 'mean_word_length': 2.525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2907708', 'n_tokens_mistral': 740, 'n_tokens_neox': 700, 'n_words': 146}