提交 ed1210e5 编辑于 作者: Tao Liu's avatar Tao Liu
浏览文件

Add section for each data region

上级 3f584ade
......@@ -347,6 +347,9 @@ class riscv_asm_program_gen extends uvm_object;
if (cfg.use_push_data_section) begin
instr_stream.push_back($sformatf(".pushsection .%0suser_stack,\"aw\",@progbits;",
hart_prefix(hart)));
end else begin
instr_stream.push_back($sformatf(".section .%0suser_stack,\"aw\",@progbits;",
hart_prefix(hart)));
end
instr_stream.push_back(".align 12");
instr_stream.push_back(get_label("user_stack_start:", hart));
......@@ -365,6 +368,9 @@ class riscv_asm_program_gen extends uvm_object;
if (cfg.use_push_data_section) begin
instr_stream.push_back($sformatf(".pushsection .%0skernel_stack,\"aw\",@progbits;",
hart_prefix(hart)));
end else begin
instr_stream.push_back($sformatf(".section .%0skernel_stack,\"aw\",@progbits;",
hart_prefix(hart)));
end
instr_stream.push_back(".align 12");
instr_stream.push_back(get_label("kernel_stack_start:", hart));
......@@ -1059,6 +1065,9 @@ class riscv_asm_program_gen extends uvm_object;
if (cfg.use_push_data_section) begin
instr_stream.push_back($sformatf(".pushsection .%0spage_table,\"aw\",@progbits;",
hart_prefix(hart)));
end else begin
instr_stream.push_back($sformatf(".section .%0spage_table,\"aw\",@progbits;",
hart_prefix(hart)));
end
foreach(page_table_list.page_table[i]) begin
page_table_list.page_table[i].gen_page_table_section(page_table_section);
......
......@@ -75,12 +75,18 @@ class riscv_data_page_gen extends uvm_object;
if (cfg.use_push_data_section) begin
data_page_str.push_back($sformatf(".pushsection .%0s,\"aw\",@progbits;",
mem_region_setting[i].name));
end else begin
data_page_str.push_back($sformatf(".section .%0s,\"aw\",@progbits;",
mem_region_setting[i].name));
end
data_page_str.push_back($sformatf("%0s:", mem_region_setting[i].name));
end else begin
if (cfg.use_push_data_section) begin
data_page_str.push_back($sformatf(".pushsection .%0s,\"aw\",@progbits;",
{hart_prefix(hart_id), mem_region_setting[i].name}));
end else begin
data_page_str.push_back($sformatf(".section .%0s,\"aw\",@progbits;",
{hart_prefix(hart_id), mem_region_setting[i].name}));
end
data_page_str.push_back($sformatf("%0s:",
{hart_prefix(hart_id), mem_region_setting[i].name}));
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册