You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PATCH] [ARM64] Use x29 and x30 instead of fp and lr to make GCC
happy
GCC will abort the compilation with errors:
"operand 1 should be an integer register ..."
See also https://bugs.webkit.org/show_bug.cgi?id=175512
---
crt/sel4_arch/aarch64/crt0.S | 4 ++--
crt/sel4_arch/aarch64/crti.S | 8 ++++----
crt/sel4_arch/aarch64/crtn.S | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/crt/sel4_arch/aarch64/crt0.S b/crt/sel4_arch/aarch64/crt0.S
index 3bd28b7..d265d06 100644
--- a/crt/sel4_arch/aarch64/crt0.S+++ b/crt/sel4_arch/aarch64/crt0.S@@ -12,8 +12,8 @@
.section .text
.global _start
_start:
- mov fp, #0- mov lr, #0+ mov x29, #0+ mov x30, #0
mov x0, sp
bl __sel4_start_c
diff --git a/crt/sel4_arch/aarch64/crti.S b/crt/sel4_arch/aarch64/crti.S
index 1119b90..3b85d67 100644
--- a/crt/sel4_arch/aarch64/crti.S+++ b/crt/sel4_arch/aarch64/crti.S@@ -12,11 +12,11 @@
.section .init
.global _init
_init:
- stp fp, lr, [sp, -16]!- mov fp, sp+ stp x29, x30, [sp, -16]!+ mov x29, sp
.section .fini
.global _fini
_fini:
- stp fp, lr, [sp, -16]!- mov fp, sp+ stp x29, x30, [sp, -16]!+ mov x29, spdiff --git a/crt/sel4_arch/aarch64/crtn.S b/crt/sel4_arch/aarch64/crtn.S
index 734ccdc..4af13dc 100644
--- a/crt/sel4_arch/aarch64/crtn.S+++ b/crt/sel4_arch/aarch64/crtn.S@@ -10,9 +10,9 @@
* @TAG(DATA61_BSD)
*/
.section .init
- ldp fp, lr, [sp], #16+ ldp x29, x30, [sp], #16
ret
.section .fini
- ldp fp, lr, [sp], #16+ ldp x29, x30, [sp], #16
ret
--
2.25.0
The text was updated successfully, but these errors were encountered:
cee1
changed the title
[ARM64] Failed to compile with error ""
[ARM64] Failed to compile with error "operand 1 should be an integer register"
Apr 16, 2020
I suspect that it's an issue in GCC7 that has been resolved in later versions.
The issues you linked suggested that the issue was only present in inline assembly, but you do not seem to have encountered any issues assembling the seL4 kernel itself which uses those register names in inline assembly.
The text was updated successfully, but these errors were encountered: