aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2024-01-18 17:50:58 +0100
committerHelge Deller <deller@gmx.de>2024-01-18 17:50:58 +0100
commitff9fd38c8dc1ba3b58550435ffc43858054d7f81 (patch)
tree155e210daa6adfa7febc8d16089068e93df6d67f /src
parent156124bf2e92f261ac5f96ae35c3e233c8fcf97f (diff)
downloadseabios-hppa-ff9fd38c8dc1ba3b58550435ffc43858054d7f81.zip
seabios-hppa-ff9fd38c8dc1ba3b58550435ffc43858054d7f81.tar.gz
seabios-hppa-ff9fd38c8dc1ba3b58550435ffc43858054d7f81.tar.bz2
head: Add load32_sign_extend() and load32_firmware() macros
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/parisc/head.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/parisc/head.S b/src/parisc/head.S
index 6bad420..ff59680 100644
--- a/src/parisc/head.S
+++ b/src/parisc/head.S
@@ -9,6 +9,13 @@
#include "autoconf.h"
#include "autoversion.h"
+ /* load 32-bit 'value' into 'reg' with
+ sign-extension when running in wide mode. */
+ .macro load32_sign_extend value, reg
+ ldil L%\value, \reg
+ ldo R%\value(\reg), \reg
+ .endm
+
/* load 32-bit 'value' into 'reg' compensating for the ldil
* sign-extension when running in wide mode. */
.macro load32 value, reg
@@ -26,6 +33,14 @@
#endif
.endm
+ .macro load32_firmware value, reg
+ ldil L%\value, \reg
+ ldo R%\value(\reg), \reg
+#ifdef CONFIG_64BIT
+ depdi FIRMWARE_HIGH, 31, 32, \reg
+#endif
+ .endm
+
;! set the W bit
#define set_PSW_W .level 2.0 ! ssm PSW_W_SM, %r0 ! .level LEVEL