[Crosstoolchain-logs] [device-tree-compiler] 40/357: Use .long on high and low halfs of u64s to avoid .quad as it appears .quad isn't available in some assemblers.

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:05:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit 05ae3d8eebdad2b8da6e02eeca3baa3cc54fe5f3
Author: Jon Loeliger <jdl at freescale.com>
Date:   Wed Apr 19 11:58:45 2006 -0500

    Use .long on high and low halfs of u64s to avoid .quad
    as it appears .quad isn't available in some assemblers.
---
 flattree.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/flattree.c b/flattree.c
index 19d886e..439fbbb 100644
--- a/flattree.c
+++ b/flattree.c
@@ -450,13 +450,21 @@ void dt_to_asm(FILE *f, struct boot_info *bi, int version)
 	emit_label(f, symprefix, "reserve_map");
 
 	fprintf(f, "/* Memory reserve map from source file */\n");
+
+	/*
+	 * Use .long on high and low halfs of u64s to avoid .quad
+	 * as it appears .quad isn't available in some assemblers.
+	 */
 	for (re = bi->reservelist; re; re = re->next) {
-		fprintf(f, "\t.quad\t0x%016llx\n\t.quad\t0x%016llx\n",
-			(unsigned long long)re->re.address,
-			(unsigned long long)re->re.size);
+		fprintf(f, "\t.long\t0x%08x\n\t.long\t0x%08x\n",
+			(unsigned int)(re->re.address >> 32),
+			(unsigned int)(re->re.address & 0xffffffff));
+		fprintf(f, "\t.long\t0x%08x\n\t.long\t0x%08x\n",
+			(unsigned int)(re->re.size >> 32),
+			(unsigned int)(re->re.size & 0xffffffff));
 	}
 
-	fprintf(f, "\t.quad\t0\n\t.quad\t0\n");
+	fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
 
 	emit_label(f, symprefix, "struct_start");
 	flatten_tree(bi->dt, &asm_emitter, f, &strbuf, vi);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list