frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•1y ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•1y ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).

Let Your AI Agent Manage Aweskill for You

https://aweskill.webioinfo.top/articles/let-your-ai-agent-manage-aweskill-for-you/
1•mugpeng•1m ago•0 comments

Colorado Rolls Back Landmark AI Governance Law

https://www.bankinfosecurity.com/colorado-rolls-back-landmark-ai-governance-law-a-31804
1•mooreds•5m ago•0 comments

Response to Cegłowski on Superintelligence (2017)

https://intelligence.org/2017/01/13/response-to-ceglowski-on-superintelligence/
1•Jach•6m ago•0 comments

Vegvisir – Agentic Harness Built for Software Developers

https://github.com/Honorbound-Innovation/Vegvisir-harness
2•unkn0wnable•10m ago•1 comments

Show HN: Ported Cerebras REAP to MLX – Prune MoE Experts on a MacBook

https://github.com/egesabanci/reap-mlx
1•egesabanci•11m ago•0 comments

Tiny Guyana poised for big Iran oil gains and growth strains

https://www.reuters.com/business/energy/tiny-guyana-poised-big-iran-oil-gains-growth-strains-2026...
1•JumpCrisscross•13m ago•0 comments

LLM and Clojure

https://tusshah.codeberg.page/
1•mmts•16m ago•0 comments

Anthropic files for blockbuster initial public offering

https://www.ft.com/content/4f82f41c-24e7-4323-899a-17a04badd29e
1•geoffbp•18m ago•0 comments

Opus 4.8 Part 2: Model Welfare

https://thezvi.substack.com/p/opus-48-part-2-model-welfare
1•paulpauper•19m ago•0 comments

How to Silence the Federal Workforce

https://www.theatlantic.com/ideas/2026/06/trumps-intimidation-whistleblowers-nda/687377/
1•paulpauper•19m ago•0 comments

How Efficient Was the Affordable Care Act at Reducing Uninsured Rates?

https://www.nber.org/papers/w35263
1•paulpauper•21m ago•0 comments

Book Dedications

https://walzr.com/dedications
2•walz•22m ago•0 comments

Venezuela's oil exports rose to 1.25M bpd in May, shipping data shows

https://www.reuters.com/business/energy/venezuelas-oil-exports-rose-125-million-bpd-may-shipping-...
1•JumpCrisscross•24m ago•0 comments

SpaceX sets aside 5% of IPO shares for selected buyers, waives lock-up

https://www.reuters.com/legal/government/spacex-sets-aside-5-ipo-shares-selected-buyers-waives-lo...
1•JumpCrisscross•26m ago•0 comments

CHSE – Rust LLM compressor: 1.15M lines/s, 69-91% token savings

1•humanethq•28m ago•0 comments

Faster Local engine built from scratch in Rust

https://www.conifer.build/
1•v11climbs•34m ago•2 comments

Bernie Sanders: A.I. Is a Public Resource. You Should Own Half of It

https://www.nytimes.com/2026/06/01/opinion/artificial-intelligence-bernie-sanders.html
5•Teever•37m ago•0 comments

What's gonna happen to software engineers?

https://yakko.dev/blog/whats-gonna-happen-to-software-developers
4•yakkomajuri•37m ago•0 comments

Vercel AI Gateway Appears to Block BYOK Requests When Account Balance Reaches $0

https://github.com/vercel/ai/issues/11280
2•kaicianflone•50m ago•1 comments

I Tried to Sell My House with a Chatbot

https://www.nytimes.com/2026/05/28/technology/sell-house-with-ai-no-realtor.html
2•garethsprice•51m ago•0 comments

Salmon Creek Farm

https://salmoncreekfarm-arts.org/
1•grantpitt•52m ago•0 comments

Bank Balance Is a Lie, and Fragmentation Is Why Nobody Can Prove It

https://heavenslive.com/credon/faq.html
2•bbenevolence•54m ago•1 comments

Fivetran and dbt are one company now

https://www.getdbt.com/blog/fivetran-and-dbt-are-one-company-now-here-s-what-that-means
1•thingsilearned•54m ago•0 comments

Ask HN: Do you give AI agent the specs and have it start building unattended?

4•bubbamack•55m ago•1 comments

Remember This

https://theamericanscholar.org/you-must-remember-this/
2•prismatic•55m ago•0 comments

How one founder's bet on 'the old school web' is paying off

https://www.theverge.com/tech/938245/past-maps-website-google-zero-ai
2•Soupy•56m ago•0 comments

The Shape of a Neuron – Weights, Bias and Activation Functions

https://www.youtube.com/watch?v=nbRu5disqiQ
1•0bytematt•58m ago•0 comments

Pretext, Pretext, Pretext: Building reasons to be together

https://www.seeingthesystem.com/p/pretext-pretext-pretext
1•TinyBig•1h ago•0 comments

Why the AI Revolution Hasn't Hit Game Development Yet – and Why It's Coming Next

https://rhulha.github.io/blog/ai-revolution-game-development.html
2•raymond_goo•1h ago•1 comments

Controlling VSCode from the Terminal

https://www.yesthatblog.com/post/0155-controlling-vscode-cli/
1•YesThatTom2•1h ago•0 comments