summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2021-09-24 23:39:56 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2021-09-27 11:54:56 +1000
commite33ce1d6a8c7e54e3ad12cff33690b6da0aee1dc (patch)
treeb6076fe90ddcd2e39349c17a1195766fca2fdca2
parentd24cc189dca6148eedf9dc9e2d45144b3851dae0 (diff)
downloaddevice-tree-compiler-e33ce1d6a8c7e54e3ad12cff33690b6da0aee1dc.tar.gz
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>
-rw-r--r--flattree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/flattree.c b/flattree.c
index 5254aeb..95e43d3 100644
--- a/flattree.c
+++ b/flattree.c
@@ -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);
}