genode/repos/base-hw
Piotr Tworek 5db2971903 base-hw/arm_v7a: Mark r1 as out in Kernel::call64
In case of arm_v7a Kernel::call64 the syscall will use both r0 and r1 as
output registers. Unfortunately the inline asm does not reflect this and
only r0 is explicitly specified as output. GCC manages to produce output
which we'd like to see. Clang on the other hand takes adventage of the fact
r1 should not be touched by swi and produces fewer instructions which do
what the code describes, but not what we actually want.

Basically the code which we want and is generated by GCC is:
  svc     0
  mov     r2, r0
  mov     r0, r1
  mov     r1, r2
  bx      lr

Clang on the other hand generates correct assembly given the code, but
incorrect given what the function is supposed to do:
  svc     0
  mov     r1, r0
  mov     r0, #0
  bx      lr

Both GCC and clang generate the same, expected assembly output when r1
is marked as output register from the inline asm swi call.

Fixes #3951
2020-11-27 09:19:08 +01:00
..
doc Retire OMAP4 support 2020-04-17 12:39:32 +02:00
etc kernel: differentiate board-specific components 2019-05-27 14:46:52 +02:00
include base-hw: make ARMv7/v8 hypervisor smp ready 2020-11-23 12:02:58 +01:00
lib/mk base: remove alarm library from base 2020-10-09 13:33:36 +02:00
patches muen: update to Community 2019 toolchain version 2020-10-09 13:35:55 +02:00
ports muen: update to Community 2019 toolchain version 2020-10-09 13:35:55 +02:00
recipes depot: update recipe hashes 2020-10-23 14:16:38 +02:00
run base-hw: fix run scripts 2020-02-20 12:11:21 +01:00
src base-hw/arm_v7a: Mark r1 as out in Kernel::call64 2020-11-27 09:19:08 +01:00