Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/fdt XXX: make this assemble with gas, but I ...



details:   https://anonhg.NetBSD.org/src/rev/c345ab0eecf0
branches:  trunk
changeset: 833914:c345ab0eecf0
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jul 17 00:37:42 2018 +0000

description:
XXX: make this assemble with gas, but I should remove the ifdefs...

diffstat:

 sys/arch/evbarm/fdt/fdt_start.S |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r 22170258ac9f -r c345ab0eecf0 sys/arch/evbarm/fdt/fdt_start.S
--- a/sys/arch/evbarm/fdt/fdt_start.S   Tue Jul 17 00:36:30 2018 +0000
+++ b/sys/arch/evbarm/fdt/fdt_start.S   Tue Jul 17 00:37:42 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdt_start.S,v 1.1 2018/04/01 04:35:04 ryo Exp $        */
+/*     $NetBSD: fdt_start.S,v 1.2 2018/07/17 00:37:42 christos Exp $   */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -32,7 +32,7 @@
 
 #include <aarch64/asm.h>
 
-RCSID("$NetBSD: fdt_start.S,v 1.1 2018/04/01 04:35:04 ryo Exp $")
+RCSID("$NetBSD: fdt_start.S,v 1.2 2018/07/17 00:37:42 christos Exp $")
 
 #define PRINT(string)  \
        bl xprint;.asciz string;.align 2
@@ -47,7 +47,13 @@
 
        sub     x10, x10, x9
 
+#ifdef __clang__
        ldr     x8, =(kern_vtopdiff - start)
+#else
+       ldr     x7, =start
+       ldr     x8, =kern_vtopdiff
+       sub     x8, x8, x7
+#endif
        add     x8, x8, x9
        str     x10, [x8]
 
@@ -56,7 +62,12 @@
         */
 
        /* offset of uboot_args from start */
+#ifdef __clang__
        ldr     x8, =(uboot_args - start)
+#else
+       ldr     x8, =uboot_args
+       sub     x8, x8, x7
+#endif
        add     x8, x8, x9              /* add load address to offset */
 
        str     x0, [x8, #(8*0)]
@@ -67,7 +78,12 @@
        /*
         * ARM64 boot protocol has FDT address in x0 *
         */
+#ifdef __clang__
        ldr     x8, =(fdt_addr_r - start)
+#else
+       ldr     x8, =fdt_addr_r
+       sub     x8, x8, x7
+#endif
        add     x8, x8, x9
        str     x0, [x8]
 



Home | Main Index | Thread Index | Old Index