Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
読みやすいアセンブリ言語
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Cybozu
PRO
March 14, 2025
Technology
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
読みやすいアセンブリ言語
第14期サイボウズ・ラボユース成果発表会
https://cybozu.connpass.com/event/347931/
川崎 正真
Cybozu
PRO
March 14, 2025
More Decks by Cybozu
See All by Cybozu
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
12
91k
新卒1年目QAが リリース基準の"なぜ"をたどってみた
cybozuinsideout
PRO
1
880
kintone リサーチ副部/UXリサーチャー 業務紹介
cybozuinsideout
PRO
0
190
私たちが『JaSST協賛』から『外部コネクト』チームになった理由
cybozuinsideout
PRO
0
590
LLMでもいつものテスト技術〜意外と半分はこれまでのテストでした〜
cybozuinsideout
PRO
1
1.1k
kintone開発のプラットフォームエンジニアの紹介
cybozuinsideout
PRO
1
1.7k
LLMアプリの品質保証
cybozuinsideout
PRO
1
840
技術広報チームに丸投げしない!「一緒につくる」スポンサー活動
cybozuinsideout
PRO
0
310
テクニカルライター (グループウェア) について
cybozuinsideout
PRO
0
300
Other Decks in Technology
See All in Technology
PQC移行の今 -- IETF からみた現在地
satokan
4
710
高負荷プロダクション環境におけるAWS Lambdaのリアル 〜スケールとコストを左右する実行ライフサイクルの技術仕様〜
maimyyym
2
840
Azure Copilot Resiliency Agentをいろいろ試してみる
tomokusaba
0
140
Harness Engineering on Rails
joelq
0
770
1人アドミンな私はAWSアカウント申請をSlackで完結したい!
ysuzuki
0
110
AI感のないAWS構成図をAIエージェントに描かせたい!
sagochiko
2
480
セルフサービスのオブザーバビリティ基盤をOpenTelemetryで作る / Building a Self-Service Observability Platform with OpenTelemetry
ymotongpoo
3
500
可視化から始めたAI駆動開発_ochi_ver1.01 / AI-Driven Development Starting with Visualization_ver1.01
yayoi_dd
0
110
形式手法を使って仕様をコーディングしよう
mikanichinose
0
160
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
160
AI Made Us Faster at Solving the Wrong Problems
marceloancelmo
0
110
20260929_AmazonGuardDutyの検出通知メールにAWS DevOpsAgentの調査結果を追加する
yhana
1
390
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Balancing Empowerment & Direction
lara
6
1.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
450
BBQ
matthewcrist
89
10k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
ラッコキーワード サービス紹介資料
rakko
1
5.1M
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
310
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
How to build a perfect <img>
jonoalderson
1
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Transcript
読みやすいアセンブリ言語 14期ラボユース生 (言語処理系開発コース、メンター:川合さん) 川崎正真
概要 ・作品:sentasm、mnasm(仮) ・目的:読みやすいアセンブリ言語の作成 ・動機:自作cコンパイラのデバッグが大変だった ・開発の途中目標: 自作cコンパイラ(開発途中)で出力して、アセンブルできる
なぜ、デバッグが大変だったか ・スタックマシン方式だった ・アセンブリ言語に慣れてい無かった 1) 命令に慣れていなかった 2) 読み方に慣れていなかった
アセンブリ言語1 ・名前:sentasm(sentence + asm) ・開発期間:24年6月ー11月 ・特徴:英語に寄せた文法
アセンブリ言語1 ・fizzbuzzのcコードを コンパイルした結果の一部 gasだと、movsxd
アセンブリ言語1 ・読みづらい 1) 実際の命令との対応を覚えるのが大変 2) コードブロック単位の意味の把握が大変 ・全ての命令に前置詞などを意味を考えて、当てはめるのは困難
アセンブリ言語2 ・名前:mnasm(仮)(名前募集中です) ・現在開発中 ・特徴:ブロック、2種類のマクロ
アセンブリ言語2 ・fizzbuzzのcコードを コンパイルした結果の一部
アセンブリ言語2 ・マクロ1 ・cのdefineマクロと同様のもの ・呼び出し:@label{...}(...) ・マクロ2 ・rustのproc_macroのドメイン特化言語(DSL)版のようなもの ・DSL をアセンブル時に評価して、入力を加工し、展開 ・呼び出し:@[input]
アセンブリ言語2 マクロ定義の部分は 140行
アセンブリ言語2 ・ブロックの導入で比較的読みやすくなった ・マクロの定義の部分が大きくなる
比較 gas sentasm mnasm
今後 ・DSLの強化 ・自作cコンパイラにmnasmのインラインアセンブリの追加 ・自作cコンパイラのセルフホスト ・mnasmのDSLをsentasmや簡易cコンパイラを実装できるようにしたい ・機械語の出力 ・型の勉強
まとめ・感想 ・「読みやすさ」は、観点による ・「読みやすさ」だけではないので、そこも考えていきたい ・川合さんをはじめ、サポートしていただいた方々、 本当にありがとうございました!
ありがとうございました