Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime MIPS code as external resource in CMake. #361

Conversation

georgiy-belyanin
Copy link
Contributor

Код для рантайма перенесен в отдельные .s файлы, к ним добавлен небольшой python скрипт для того, чтобы убрать лишние комментарии.

Файлы рантайма добавлены как ресурс к CMakeLists, устанавливаются в директорию ruc/runtime-mips, mipsgen ищет эти файлы либо в директории установки, либо в локальной директории.

@@ -53,6 +53,10 @@ static const bool FROM_LVALUE = 1; /**< Получен ли rvalue из lval
static const size_t FUNC_DISPL_PRESEREVED = /* за $sp */ 4 + /* за $ra */ 4 +
/* fs0-fs10 (одинарная точность): */ 5 * 4 + /* s0-s7: */ 8 * 4;

static const char* const RUNTIME_HEAD_FILENAME = "runtime-mips/head.min.s";
static const char* const RUNTIME_FOOT_FILENAME = "runtime-mips/foot.min.s";
static const char* const INSTALL_PATH = "/usr/local/ruc/";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Странный путь

@IvanArkhipov1999 IvanArkhipov1999 requested review from bugdea1er and Victor-Y-Fadeev and removed request for bugdea1er February 28, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants