[deploy]测试MEMSET修改是否生效

This commit is contained in:
Lixuanwang
2025-08-19 17:44:05 +08:00
parent d0321b7a88
commit 71d08850df

View File

@ -108,14 +108,15 @@ 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 段的代码 ---
if (!bss_globals.empty()) { if (!bss_globals.empty()) {
@ -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();
} }