SLOF/SOURCES/slof-Fix-bad-assembler-statements-for-compiling-with-gcc-.patch

73 lines
2.3 KiB
Diff

From 864e689e887cd2fd00cc36e5d905238b18eb39bb Mon Sep 17 00:00:00 2001
From: Laurent Vivier <lvivier@redhat.com>
Date: Wed, 8 Aug 2018 15:10:58 +0100
Subject: [PATCH 2/6] Fix bad assembler statements for compiling with gcc 8.1 /
as 2.30
RH-Author: Laurent Vivier <lvivier@redhat.com>
Message-id: <20180808151102.11232-3-lvivier@redhat.com>
Patchwork-id: 81678
O-Subject: [RHEL-8.0 SLOF PATCH 2/6] Fix bad assembler statements for compiling with gcc 8.1 / as 2.30
Bugzilla: 1613619
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: David Gibson <dgibson@redhat.com>
From: Thomas Huth <thuth@redhat.com>
When compiling with a very recent toolchain, I get these warnings:
../../llfw/boot_abort.S: Assembler messages:
../../llfw/boot_abort.S:76: Warning: invalid register expression
and:
stage2_head.S: Assembler messages:
stage2_head.S:57: Warning: invalid register expression
The first one is using the wrong opcode, we should use "and" instead of
"andi" here. The second one is using a register instead of a constant
for load-immediate, which is non-sense, too. Fix it to use the right
constant instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
(cherry picked from commit 203f6686dc3953a7248abb4f3e895a68c65d9b10)
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
board-qemu/llfw/stage2_head.S | 2 +-
llfw/boot_abort.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board-qemu/llfw/stage2_head.S b/board-qemu/llfw/stage2_head.S
index adf7554..1568f27 100644
--- a/board-qemu/llfw/stage2_head.S
+++ b/board-qemu/llfw/stage2_head.S
@@ -54,7 +54,7 @@ bsscdone:
/* jump to c-code */
/* r31 = fdt - r5 */
/* ------------------------------------ */
- li r3, r0
+ li r3, 0
mr r4, r31
bl .early_c_entry
diff --git a/llfw/boot_abort.S b/llfw/boot_abort.S
index 996bdd7..47a9178 100644
--- a/llfw/boot_abort.S
+++ b/llfw/boot_abort.S
@@ -73,7 +73,7 @@ ASM_ENTRY(boot_abort)
/* check if i/o is possible, if yes then print message */
li r10, ABORT_CANIO
- andi. r3, r31, r10
+ and. r3, r31, r10
bne abort_noio
/* use i/o ..., first print reference message */
--
1.8.3.1