-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1149 from netbsduser/m68k-port-new
- Loading branch information
Showing
38 changed files
with
1,267 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[binaries] | ||
c = 'm68k-linux-mlibc-gcc' | ||
cpp = 'm68k-linux-mlibc-g++' | ||
exe_wrapper = 'qemu-m68k' | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'm68k' | ||
cpu = 'm68k' | ||
endian = 'big' | ||
|
||
[properties] | ||
skip_sanity_check = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef MLIBC_ARCH_DEFS_HPP | ||
#define MLIBC_ARCH_DEFS_HPP | ||
|
||
#include <stddef.h> | ||
|
||
namespace mlibc { | ||
|
||
// not strictly true, can be 4 or 8k on 68040/68060, and many more on others | ||
inline constexpr size_t page_size = 0x1000; | ||
|
||
} // namespace mlibc | ||
|
||
#endif // MLIBC_ARCH_DEFS_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
#include <mlibc/internal-sysdeps.hpp> | ||
#include <mlibc/tcb.hpp> | ||
#include <bits/ensure.h> | ||
|
||
namespace mlibc { | ||
|
||
extern "C" void *__m68k_read_tp(); | ||
|
||
inline Tcb *get_current_tcb() { | ||
// On m68k, the end of the TCB is 0x7000 below the thread pointer. | ||
void *ptr = __m68k_read_tp(); | ||
return reinterpret_cast<Tcb *>((uintptr_t)ptr - 0x7000 - sizeof(Tcb)); | ||
} | ||
|
||
inline uintptr_t get_sp() { | ||
uintptr_t sp; | ||
asm ("move.l %%sp, %0" : "=r"(sp)); | ||
return sp; | ||
} | ||
|
||
} // namespace mlibc |
Oops, something went wrong.