Commit Graph

3 Commits

Author SHA1 Message Date
Andrius Štikonas 267a132ca9 riscv64: Fix arguments of main function in tcc.
* lib/linux/riscv64-mes-tcc/crt1.c
2023-10-06 23:49:56 +02:00
Andrius Štikonas b5eb0e34c6 riscv64: simplify assembly constructs not supported by tcc.
At the moment tcc does not support assembler instructions
with C expression operands. As a workaround read values
directly from stack.

* lib/linux/riscv64-mes-tcc/_exit.c
* lib/linux/riscv64-mes-tcc/_write.c
* lib/linux/riscv64-mes-tcc/syscall.c
2023-10-06 23:49:56 +02:00
Ekaitz a04b558074 riscv64: add support for tcc
* lib/linux/riscv64-mes-tcc/_exit.c,
lib/linux/riscv64-mes-tcc/_write.c,
lib/linux/riscv64-mes-tcc/crt1.c,
lib/linux/riscv64-mes-tcc/exit-42.S,
lib/linux/riscv64-mes-tcc/hello-mes.S,
lib/linux/riscv64-mes-tcc/syscall-internal.c,
lib/linux/riscv64-mes-tcc/syscall.c: New files. Adapted from -gcc but
make assembly match tcc style assembly where the offsets are received as
an extra input argument:
  sw a0, 9(t0)
Becomes:
  sw a0, t0, 9
2023-09-21 15:51:20 +02:00