mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
ppc: Introduce LOAD_REG_IMMEDIATE() macro for ppc64
When loading the fw_cfg address with just lis, addi sequence, we get the high address bits as 0xffffffff on ppc64. Use the full double word immediate load sequence on ppc64. v2: * Rename from load() to LOAD_REG_IMMEDIATE() to match Linux. Suggested by Alex. * Move to ppc/asmdefs.h for future use elsewhere. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Acked-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@944 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Andreas Färber
parent
cb897515cc
commit
814bcd10cd
@@ -75,6 +75,19 @@
|
||||
/* MISC */
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define LOAD_REG_IMMEDIATE(D, x) \
|
||||
lis (D), (x)@highest ; \
|
||||
ori (D), (D), (x)@higher ; \
|
||||
sldi (D), (D), 32 ; \
|
||||
oris (D), (D), (x)@h ; \
|
||||
ori (D), (D), (x)@l
|
||||
#else
|
||||
#define LOAD_REG_IMMEDIATE(D, x) \
|
||||
lis (D), HA(x) ; \
|
||||
addi (D), (D), LO(x)
|
||||
#endif
|
||||
|
||||
#ifndef __darwin__
|
||||
#define GLOBL( name ) .globl name ; name
|
||||
#define EXTERN( name ) name
|
||||
|
||||
Reference in New Issue
Block a user