Skip to content

Commit da4f8fc

Browse files
committed
Declare compile-time string '-' in x86 and wasm_x86
1 parent 79995d8 commit da4f8fc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/libasr/codegen/asr_to_x86.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ class ASRToX86Visitor : public ASR::BaseVisitor<ASRToX86Visitor>
141141
for (auto &s : m_global_strings) {
142142
emit_data_string(m_a, s.first, s.second);
143143
}
144+
emit_data_string(m_a, "string-", "-"); // - symbol for printing negative ints
144145

145146
}
146147

src/libasr/codegen/wasm_to_x86.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ class X86Visitor : public WASMDecoder<X86Visitor>,
351351
std::string label = "string" + std::to_string(s.first);
352352
emit_data_string(m_a, label, s.second);
353353
}
354+
emit_data_string(m_a, "string-", "-"); // - symbol for printing negative ints
354355

355356
emit_elf32_footer(m_a);
356357
}

0 commit comments

Comments
 (0)