Fix ucore user app compiling on x86_64

Signed-off-by: Harry Chen <i@harrychen.xyz>
master
Harry Chen 6 years ago
parent 1829ca47d4
commit a1d9dcc78c

@ -37,13 +37,11 @@ rust:
@cp $(rust_bins) $(out_dir)/rust @cp $(rust_bins) $(out_dir)/rust
ucore: ucore:
ifneq ($(arch), x86_64)
@echo Building ucore programs @echo Building ucore programs
@mkdir -p ucore/build @mkdir -p ucore/build
@cd ucore/build && cmake $(cmake_build_args) .. && make @cd ucore/build && cmake $(cmake_build_args) .. && make
@rm -rf $(out_dir)/ucore && mkdir -p $(out_dir)/ucore @rm -rf $(out_dir)/ucore && mkdir -p $(out_dir)/ucore
@cp $(ucore_bin_path)/* $(out_dir)/ucore @cp $(ucore_bin_path)/* $(out_dir)/ucore
endif
biscuit: biscuit:
ifneq ($(shell uname)-$(arch), Darwin-riscv64) ifneq ($(shell uname)-$(arch), Darwin-riscv64)

@ -53,7 +53,7 @@ A rootfs is created at `build/$(arch)` and converted to `qcow2`.
| | x86_64 | aarch64 | riscv32 | riscv64 | mipsel | | | x86_64 | aarch64 | riscv32 | riscv64 | mipsel |
| ------------------ | ------ | ------- | ------- | ------- | ------ | | ------------------ | ------ | ------- | ------- | ------- | ------ |
| ucore | | ✅ | ✅ | ✅ | ✅ | | ucore | | ✅ | ✅ | ✅ | ✅ |
| rust | ✅ | ✅ | ✅ | ✅ | ✅ | | rust | ✅ | ✅ | ✅ | ✅ | ✅ |
| biscuit | ✅ | ✅ | ✅ | ✅ | ✅ | | biscuit | ✅ | ✅ | ✅ | ✅ | ✅ |
| nginx (linux only) | ✅ | ✅ | ✅ | ✅ | ✅ | | nginx (linux only) | ✅ | ✅ | ✅ | ✅ | ✅ |

@ -4,21 +4,13 @@ _start:
# set ebp for backtrace # set ebp for backtrace
movl $0x0, %ebp movl $0x0, %ebp
# load argc and argv
movl (%esp), %ebx
lea 0x4(%esp), %ecx
# move down the esp register # move down the esp register
# since it may cause page fault in backtrace # since it may cause page fault in backtrace
subl $0x20, %esp subl $0x20, %esp
# save argc and argv on stack
pushl %ecx
pushl %ebx
# call user-program function # call user-program function
# according to fastcall ABI, the first 6 parameters are in registes
# so we do not need to copy (argc, argv) as on i386
call umain call umain
1: jmp 1b
Loading…
Cancel
Save