An arm64 assembler for linux that can assemble itself. Written by Claude Opus 4.6
¯\_(ツ)_/¯
| // asm.s — self-hosting aarch64 assembler | |
| // | |
| // reads an aarch64 assembly source file (GAS-compatible subset), | |
| // emits a static PIE ELF binary directly. no linker required. | |
| // | |
| // usage: asm <input.s> <output> | |
| // | |
| // this file was created solely by Claude (Opus 4.6 and Sonnet 4.6) and is | |
| // in the public domain (or CC0 1.0, if you prefer). | |
| // |
An arm64 assembler for linux that can assemble itself. Written by Claude Opus 4.6
¯\_(ツ)_/¯
| #!/usr/bin/env python3 | |
| import argparse | |
| import glob | |
| import os | |
| import struct | |
| import sys | |
| from sentencepiece import SentencePieceProcessor | |
| HPARAMS = keys = ["vocab_size", "dim", "multiple_of", "n_heads", "n_layers"] |
| 2019-01-01 08:58:12 - [sway/server.c:34] Preparing Wayland server initialization | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:186] Creating wayland backend | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: wl_shm v1 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: zwp_linux_dmabuf_v1 v3 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: wl_drm v2 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: wl_compositor v4 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: wl_subcompositor v1 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: wl_data_device_manager v3 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: gamma_control_manager v1 | |
| 2019-01-01 08:58:12 - [backend/wayland/backend.c:65] Remote wayland global: zwlr_gamma_control_manager_v1 v1 |
| # Default config for sway | |
| # | |
| # Copy this to ~/.config/sway/config and edit it to your liking. | |
| # | |
| # Read `man 5 sway` for a complete reference. | |
| ### Variables | |
| # | |
| # Logo key. Use Mod1 for Alt. | |
| set $mod Mod1 |
| Core was generated by `sway -c dev.config -d'. | |
| Program terminated with signal SIGSEGV, Segmentation fault. | |
| #0 0x0000564f86b209a3 in output_surface_for_each_surface (output=0x564f8732dfc0, surface=0x0, ox=0, oy=0, | |
| iterator=0x564f86b22128 <render_surface_iterator>, user_data=0x7ffd9daf10f0) at ../sway/desktop/output.c:137 | |
| 137 .width = surface->current.width, | |
| [Current thread is 1 (Thread 0x7f4419392e40 (LWP 11965))] | |
| (gdb) bt full | |
| #0 0x0000564f86b209a3 in output_surface_for_each_surface | |
| (output=0x564f8732dfc0, surface=0x0, ox=0, oy=0, iterator=0x564f86b22128 <render_surface_iterator>, user_data=0x7ffd9daf10f0) | |
| at ../sway/desktop/output.c:137 |
| 2019-01-01 08:20:32 - [sway/server.c:34] Preparing Wayland server initialization | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:186] Creating wayland backend | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: wl_shm v1 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: zwp_linux_dmabuf_v1 v3 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: wl_drm v2 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: wl_compositor v4 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: wl_subcompositor v1 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: wl_data_device_manager v3 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: gamma_control_manager v1 | |
| 2019-01-01 08:20:32 - [backend/wayland/backend.c:65] Remote wayland global: zwlr_gamma_control_manager_v1 v1 |
| 2019-01-01 02:11:46 - [sway/server.c:34] Preparing Wayland server initialization | |
| 2019-01-01 02:11:46 - [backend/session/logind.c:542] Successfully loaded logind session | |
| 2019-01-01 02:11:46 - [backend/backend.c:142] Found 1 GPUs | |
| 2019-01-01 02:11:46 - [backend/drm/backend.c:151] Initializing DRM backend for /dev/dri/card0 (amdgpu) | |
| 2019-01-01 02:11:46 - [backend/drm/drm.c:63] Using atomic DRM interface | |
| 2019-01-01 02:11:46 - [backend/drm/drm.c:156] Found 6 DRM CRTCs | |
| 2019-01-01 02:11:46 - [backend/drm/drm.c:87] Found 12 DRM planes | |
| 2019-01-01 02:11:46 - [backend/drm/drm.c:129] (0 overlay, 6 primary, 6 cursor) | |
| 2019-01-01 02:11:47 - [render/egl.c:149] Using EGL 1.5 | |
| 2019-01-01 02:11:47 - [render/egl.c:150] Supported EGL extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_ |