Skip to content

Commit

Permalink
Add a workaround for mes not zero-initializing the whole label.
Browse files Browse the repository at this point in the history
  • Loading branch information
stikonas authored and ekaitz-zarraga committed Aug 13, 2023
1 parent 4cf19b8 commit 29ac0f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions riscv64-gen.c
Expand Up @@ -299,6 +299,7 @@ static int load_symofs(int r, SValue *sv, int forstore)
int fc = sv->c.i, v = sv->r & VT_VALMASK;
if (sv->r & VT_SYM) {
Sym label = {0};
label.c = 0; // mescc fails to properly initialize the line above
assert(v == VT_CONST);
if (sv->sym->type.t & VT_STATIC) { // XXX do this per linker relax
greloca(cur_text_section, sv->sym, ind,
Expand Down

0 comments on commit 29ac0f4

Please sign in to comment.