xen/arm32: head: Fix build when using GAS 2.25.0
authorJulien Grall <julien.grall@arm.com>
Mon, 30 Sep 2019 18:44:25 +0000 (19:44 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 1 Oct 2019 00:55:11 +0000 (17:55 -0700)
commit58197b685a4f61969c5903e7f079ba0ebf4fa59e
tree69fa8820020d03fe877bc40f3af12855b894f9b0
parentd7a9382866f2385a183af46677f4165d3a5ba7e9
xen/arm32: head: Fix build when using GAS 2.25.0

GAS 2.25.0 throws multiple errors when building arm32/head.S:

arm32/head.S: Assembler messages:
arm32/head.S:452: Error: invalid constant (f7f) after fixup
arm32/head.S:453: Error: invalid constant (f7f) after fixup
arm32/head.S:495: Error: invalid constant (f7f) after fixup
arm32/head.S:510: Error: invalid constant (f7f) after fixup
arm32/head.S:514: Error: invalid constant (f7f) after fixup
arm32/head.S:516: Error: invalid constant (f7f) after fixup
arm32/head.S:633: Error: invalid constant (f7f) after fixup

This makes sense because the instruction mov is only able to deal with a
specific set of immediate (see "modified immediate constants in ARM
instructions"). For any 16-bit immediate, the instruction movw should be
used.

It looks like newer version of GAS will seemly switch to movw if the
immediate does not fit in the immediate encoding for mov. But we should
not rely on this. So switch to movw.

Fixes: 23dfe48d10 ("xen/arm32: head: Introduce macros to create table and mapping entry")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm32/head.S