<commit_before>######################################################################
##
## Copyright (C) 2006,  <NAME>
##
## Filename:	  register.py
## Author:		<NAME> <<EMAIL>>
## Description:   Cibyl register handling
##
## $Id: register.py 13453 2007-02-05 16:28:37Z ska $
##
######################################################################
from Cibyl.BinaryTranslation.Mips import mips
from Cibyl import config
from sets import Set

reg2local = {
	mips.namesToRegisters["sp"] :  0,
	mips.namesToRegisters["a0"] :  1,
	mips.namesToRegisters["a1"] :  2,
	mips.namesToRegisters["a2"] :  3,
	mips.namesToRegisters["a3"] :  4,
	mips.namesToRegisters["v0"] :  5,
	mips.namesToRegisters["v1"] :  6,
	mips.namesToRegisters["t0"] :  7,
	mips.namesToRegisters["t1"] :  8,
	mips.namesToRegisters["t2"] :  9,
	mips.namesToRegisters["t3"] : 10,
	mips.namesToRegisters["t4"] : 11,
	mips.namesToRegisters["t5"] : 12,
	mips.namesToRegisters["t6"] : 13,
	mips.namesToRegisters["t7"] : 14,
	mips.namesToRegisters["t8"] : 15,
	mips.namesToRegisters["t9"] : 16,
	mips.namesToRegisters["s0"] : 17,
	mips.namesToRegisters["s1"] : 18,
	mips.namesToRegisters["s2"] : 19,
	mips.namesToRegisters["s3"] : 20,
	mips.namesToRegisters["s4"] : 21,
	mips.namesToRegisters["s5"] : 22,
	mips.namesToRegisters["s6"] : 23,
	mips.namesToRegisters["s7"] : 24,
	mips.namesToRegisters["s8"] : 25,
	mips.namesToRegisters["at"] : 26,
	mips.namesToRegisters["ra"] : 27,
	mips.namesToRegisters["cpc"]: 28,
	mips.namesToRegisters["cm0"]: 29,
	mips.namesToRegisters["cm1"]: 30,
	mips.namesToRegisters["cm2"]: 31,
	mips.namesToRegisters["cm3"]: 32,
	mips.namesToRegisters["cm4"]: 33,
	mips.namesToRegisters["cm5"]: 34,
	mips.namesToRegisters["cm6"]: 35,
	mips.namesToRegisters["cm7"]: 36,
	mips.namesToRegisters["cm8"]: 37,
	mips.namesToRegisters["gp"] : 38,
	mips.namesToRegisters["hi"] : 39,
	mips.namesToRegisters["lo"] : 40,
	mips.namesToRegisters["ecb"] : 41,
	mips.namesToRegisters["ear"] : 42,
}

staticRegs = {
	mips.namesToRegisters["ra"] : "CRunTime/ra I", # For the debug target
}

def regIsStatic(reg):
	# Special-case for multi-function-methods (need to store RA for<commit_msg>Fix compilation without -O (define all used registers...)<commit_after>######################################################################
##
## Copyright (C) 2006,  <NAME>
##
## Filename:	  register.py
## Author:		<NAME> <<EMAIL>>
## Description:   Cibyl register handling
##
## $Id: register.py 13453 2007-02-05 16:28:37Z ska $
##
######################################################################
from Cibyl.BinaryTranslation.Mips import mips
from Cibyl import config
from sets import Set

reg2local = {
	mips.namesToRegisters["sp"] :  0,
	mips.namesToRegisters["a0"] :  1,
	mips.namesToRegisters["a1"] :  2,
	mips.namesToRegisters["a2"] :  3,
	mips.namesToRegisters["a3"] :  4,
	mips.namesToRegisters["v0"] :  5,
	mips.namesToRegisters["v1"] :  6,
	mips.namesToRegisters["t0"] :  7,
	mips.namesToRegisters["t1"] :  8,
	mips.namesToRegisters["t2"] :  9,
	mips.namesToRegisters["t3"] : 10,
	mips.namesToRegisters["t4"] : 11,
	mips.namesToRegisters["t5"] : 12,
	mips.namesToRegisters["t6"] : 13,
	mips.namesToRegisters["t7"] : 14,
	mips.namesToRegisters["t8"] : 15,
	mips.namesToRegisters["t9"] : 16,
	mips.namesToRegisters["s0"] : 17,
	mips.namesToRegisters["s1"] : 18,
	mips.namesToRegisters["s2"] : 19,
	mips.namesToRegisters["s3"] : 20,
	mips.namesToRegisters["s4"] : 21,
	mips.namesToRegisters["s5"] : 22,
	mips.namesToRegisters["s6"] : 23,
	mips.namesToRegisters["s7"] : 24,
	mips.namesToRegisters["s8"] : 25,
	mips.namesToRegisters["at"] : 26,
	mips.namesToRegisters["ra"] : 27,
	mips.namesToRegisters["cpc"]: 28,
	mips.namesToRegisters["cm0"]: 29,
	mips.namesToRegisters["cm1"]: 30,
	mips.namesToRegisters["cm2"]: 31,
	mips.namesToRegisters["cm3"]: 32,
	mips.namesToRegisters["cm4"]: 33,
	mips.namesToRegisters["cm5"]: 34,
	mips.namesToRegisters["cm6"]: 35,
	mips.namesToRegisters["cm7"]: 36,
	mips.namesToRegisters["cm8"]: 37,
	mips.namesToRegisters["gp"] : 38,
	mips.namesToRegisters["hi"] : 39,
	mips.namesToRegisters["lo"] : 40,
	mips.namesToRegisters["ecb"] : 41,
	mips.namesToRegisters["ear"] : 42,
	mips.namesToRegisters["fna"] : 43,
	mips.namesToRegisters["mem"] : 44,
}

staticRegs = {
	mips.namesToRegisters["ra"] : "CRunTime/ra I", # For the debug target
}

def regIsStatic(reg):
	# Special-case for multi-function-methods (need to store RA for
{'fraction_non_alphanumeric': 0.2358788974243109, 'fraction_numerical': 0.061455038409399004, 'mean_word_length': 5.960691823899371, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3624818', 'n_tokens_mistral': 1988, 'n_tokens_neox': 1799, 'n_words': 284}