World Congress 2024 • Aug 20, 2024 • Session details

Passive ARM Assembly Skills for Debugging, Optimization (and Hacking)

Sebastian Theophil

Compilers intentionally discard your programming logic to accelerate hardware cycle times. Master ARM assembly to debug these translation quirks, execute esoteric optimizations, and explore reverse-engineering.

Pause
Mute Enter Fullscreen
#1 about 2 min

Why learn ARM assembly and using Compiler Explorer

Discovering how reading assembly code assists with debugging compiler issues and tracking C++ translation.

#2 about 2 min

Basic ARM assembly syntax and instruction formats

Grasping the fundamental mapping of instructions, registers, and immediate values in assembly code.

#3 about 2 min

ARM CPU architecture and general purpose registers

Reviewing processor features like execution cores, 64-bit register availability, and cache memory delays.

#4 about 3 min

Writing the Fibonacci sequence using ARM instructions

Building a loop algorithm manually through move, branch, and compare assembly operations.

#5 about 3 min

Analyzing optimized C++ compiler output for loops

Identifying how compiler optimizations rewrite loops into more efficient decrement operations.

#6 about 4 min

Understanding stack memory allocation and pointer usage

Tracking local variables and fast memory operations using the dedicated stack pointer register.

#7 about 5 min

Calling ARM assembly functions and managing stack frames

Maintaining execution context and return addresses using the branch and link instruction alongside frame pointers.

#8 about 3 min

Following the ARM procedure call standard and ABI

Complying with system-specific rules for passing function arguments and preserving register state to guarantee binary compatibility.

#9 about 5 min

Loading 64-bit memory pointers with 32-bit instructions

Combining page selection and internal bit offsets to reconstruct pointers within the bounds of limited instruction lengths.

Matching moments

3:49 min

Leveraging WebAssembly SIMD and 64-bit memory architectures

Chris Heilmann Chris Heilmann +3 · LIVE

14:24 min

Executing raw native machine code directly from byte arrays

Adam Furmanek · LIVE

3:38 min

Decompiling binary modules into readable WebAssembly text

Rainer Stropek Rainer Stropek · LIVE

4:15 min

Enabling code reuse and inline assembly

Liu Xiaohui · LIVE

2:21 min

Transitioning to accelerated computing for application developers

Ankit Patel Ankit Patel · World Congress 2024

2:20 min

Understanding hardware performance advantages of WebAssembly code

Chris Heilmann Chris Heilmann +3 · LIVE