deploy-20250820-3 #1

Merged
gh0s7 merged 352 commits from deploy-20250820-3 into master 2025-08-20 21:20:33 +08:00
Showing only changes of commit 71d08850df - Show all commits

View File

@@ -108,13 +108,14 @@ std::string RISCv64CodeGen::module_gen() {
Type* allocated_type = global->getType()->as<PointerType>()->getBaseType(); Type* allocated_type = global->getType()->as<PointerType>()->getBaseType();
unsigned total_size = getTypeSizeInBytes(allocated_type); unsigned total_size = getTypeSizeInBytes(allocated_type);
bool is_large_zero_array = is_all_zeros && (total_size > 64); // bool is_large_zero_array = is_all_zeros && (total_size > 64);
if (is_large_zero_array) { // if (is_large_zero_array) {
bss_globals.push_back(global); // bss_globals.push_back(global);
} else { // } else {
data_globals.push_back(global); // data_globals.push_back(global);
} // }
data_globals.push_back(global);
} }
// --- 步骤2生成 .bss 段的代码 --- // --- 步骤2生成 .bss 段的代码 ---
@@ -213,16 +214,16 @@ std::string RISCv64CodeGen::module_gen() {
} }
} }
// if (foo2 || foo3 || foo4) { std::cerr << ss.str(); exit(-1);} // if (foo2 || foo3 || foo4) { std::cerr << ss.str(); exit(-1);}
if (foo2) { // if (foo2) {
std::cerr << "foo2 triggered!\n"; // std::cerr << "foo2 triggered!\n";
return std::string(AC::rss84); // return std::string(AC::rss84);
} else if (foo3) { // } else if (foo3) {
std::cerr << "foo3 triggered!\n"; // std::cerr << "foo3 triggered!\n";
return std::string(AC::rss88); // return std::string(AC::rss88);
} else if (foo4) { // } else if (foo4) {
std::cerr << "foo4 triggered!\n"; // std::cerr << "foo4 triggered!\n";
return std::string(AC::rss54); // return std::string(AC::rss54);
} // }
return ss.str(); return ss.str();
} }