Browse Source

flattree: Use '\n', not ';' to separate asm pseudo-ops

The output of -Oasm is peculiar for assembler in that we want its output
to be portable across targets (it consists entirely of pseudo-ops and
labels, no actual instructions).

It turns out that while ';' is a valid instruction/pseudo-op separator
on most targets, it's not correct for all of them - e.g. HP PA-RISC.  So,
switch to using an actual \n instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 3 years ago
parent
commit
e33ce1d6a8
  1. 3
      flattree.c

3
flattree.c

@ -124,7 +124,8 @@ static void asm_emit_cell(void *e, cell_t val) @@ -124,7 +124,8 @@ static void asm_emit_cell(void *e, cell_t val)
{
FILE *f = e;

fprintf(f, "\t.byte 0x%02x; .byte 0x%02x; .byte 0x%02x; .byte 0x%02x\n",
fprintf(f, "\t.byte\t0x%02x\n" "\t.byte\t0x%02x\n"
"\t.byte\t0x%02x\n" "\t.byte\t0x%02x\n",
(val >> 24) & 0xff, (val >> 16) & 0xff,
(val >> 8) & 0xff, val & 0xff);
}

Loading…
Cancel
Save