mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Add x86_64-linux-gnu emulator
I wanted a tiny scriptable meltdown proof way to run userspace programs and visualize how program execution impacts memory. It helps to explain how things like Actually Portable Executable works. It can show you how the GCC generated code is going about manipulating matrices and more. I didn't feel fully comfortable with Qemu and Bochs because I'm not smart enough to understand them. I wanted something like gVisor but with much stronger levels of assurances. I wanted a single binary that'll run, on all major operating systems with an embedded GPL barrier ZIP filesystem that is tiny enough to transpile to JavaScript and run in browsers too. https://justine.storage.googleapis.com/emulator625.mp4
This commit is contained in:
parent
467504308a
commit
f4f4caab0e
1052 changed files with 65667 additions and 7825 deletions
|
@ -5,12 +5,14 @@ PKGS += TEST_LIBC_UNICODE
|
|||
|
||||
TEST_LIBC_UNICODE_SRCS := $(wildcard test/libc/unicode/*.c)
|
||||
TEST_LIBC_UNICODE_SRCS_TEST = $(filter %_test.c,$(TEST_LIBC_UNICODE_SRCS))
|
||||
TEST_LIBC_UNICODE_COMS = $(TEST_LIBC_UNICODE_OBJS:%.o=%.com)
|
||||
|
||||
TEST_LIBC_UNICODE_OBJS = \
|
||||
$(TEST_LIBC_UNICODE_SRCS:%=o/$(MODE)/%.zip.o) \
|
||||
$(TEST_LIBC_UNICODE_SRCS:%.c=o/$(MODE)/%.o)
|
||||
|
||||
TEST_LIBC_UNICODE_COMS = \
|
||||
$(TEST_LIBC_UNICODE_SRCS:%.c=o/$(MODE)/%.com)
|
||||
|
||||
TEST_LIBC_UNICODE_BINS = \
|
||||
$(TEST_LIBC_UNICODE_COMS) \
|
||||
$(TEST_LIBC_UNICODE_COMS:%=%.dbg)
|
||||
|
|
|
@ -61,21 +61,6 @@ TEST(wcwidth, testCjkWidesAndCombiningLowLines_widthIsNotLength) {
|
|||
/*────────────────────────────────────────────────────┴─*/
|
||||
}
|
||||
|
||||
TEST(strwidth, testEmoji_cosmoHelpsYouBuildInclusiveProductsEasily) {
|
||||
/* ┌─If this line is solid your terminal
|
||||
│ is respectful and inclusive towards
|
||||
│ our friends w/ rich and interesting
|
||||
│ backgrounds that aren't Anglo-Saxon
|
||||
│
|
||||
│ ┌─This line being solid, means your
|
||||
│ │ terminal needs a patch to address
|
||||
│ │ issues concerning racism
|
||||
│ │
|
||||
──────────────────────────────────────┼─┼─*/
|
||||
EXPECT_EQ(02, wcswidth(/**/ L"👦🏿" /*- │ - */));
|
||||
/*────────────────────────────────────┼─┼─*/
|
||||
}
|
||||
|
||||
TEST(strwidth, tab) {
|
||||
EXPECT_EQ(32, strwidth("mov 0x0(%rip),%rcx \t"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue