mirror of
https://github.com/pmret/papermario.git
synced 2024-11-13 22:43:00 +01:00
f12e57b7c4
* progz * fixies * git subrepo pull --force tools/splat subrepo: subdir: "tools/splat" merged: "6c228fc53a" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "6c228fc53a" git-subrepo: version: "0.4.5" origin: "https://github.com/ingydotnet/git-subrepo" commit: "aa416e4" * 3 * func_80238000_703AF0 * Force upgrades of requirements in Jenkinsfile * --amend * main_loop finished * PR comments
39 lines
842 B
Python
39 lines
842 B
Python
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass
|
|
class Compiler:
|
|
name: str
|
|
asm_function_macro: str = "glabel"
|
|
asm_data_macro: str = "glabel"
|
|
asm_end_label: str = ""
|
|
c_newline: str = "\n"
|
|
asm_inc_header: str = ""
|
|
include_macro_inc: bool = True
|
|
|
|
|
|
GCC = Compiler(
|
|
"GCC",
|
|
asm_inc_header=".set noat /* allow manual use of $at */\n.set noreorder /* don't insert nops after branches */\n\n",
|
|
)
|
|
|
|
SN64 = Compiler(
|
|
"SN64",
|
|
asm_function_macro=".globl",
|
|
asm_data_macro=".globl",
|
|
asm_end_label=".end",
|
|
c_newline="\r\n",
|
|
include_macro_inc=False,
|
|
)
|
|
|
|
IDO = Compiler("IDO")
|
|
|
|
compiler_for_name = {"GCC": GCC, "SN64": SN64, "IDO": IDO}
|
|
|
|
|
|
def for_name(name: str) -> Compiler:
|
|
name = name.upper()
|
|
if name in compiler_for_name:
|
|
return compiler_for_name[name]
|
|
return Compiler(name)
|