Skip to content

Take AArch64 instructions, execute them, and display the final CPU state right away

Notifications You must be signed in to change notification settings

kawadakk/qrun-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qrun

Take AArch64 instructions, execute them, and display the final CPU state right away

$ cargo +nightly-2021-07-27 install --git https://github.com/kawadakk/qrun-rs.git

$ qrun --print-encoding -
mov x0, #1
mov x1, #2
add x2, x0, x1
^D
----- Instruction Encoding -----
default_main:
  0000000010000000: d2800020 mov x0, #0x1
  0000000010000004: d2800041 mov x1, #0x2
  0000000010000008: 8b010002 add x2, x0, x1
  000000001000000c: d65f03c0 ret
  0000000010000010: 00000000 udf #0x0
  [  repeated for 1020 times  ]
----- Final CPU State -----
x0  = 0x00000000000001 x1  = 0x00000000000002 x2  = 0x00000000000003 x3  = 0x00000000000000
x4  = 0x00000000000000 x5  = 0x00000000000000 x6  = 0x00000000000000 x7  = 0x00000000000000
x8  = 0x00000000000000 x9  = 0x00000000000000 x10 = 0x00000000000000 x11 = 0x00000000000000
x12 = 0x00000000000000 x13 = 0x00000000000000 x14 = 0x00000000000000 x15 = 0x00000000000000
x16 = 0x00000000000000 x17 = 0x00000000000000 x18 = 0x00000000000000 x19 = 0x00000000000000
x20 = 0x00000000000000 x21 = 0x00000000000000 x22 = 0x00000000000000 x23 = 0x00000000000000
x24 = 0x00000000000000 x25 = 0x00000000000000 x26 = 0x00000000000000 x27 = 0x00000000000000
x28 = 0x00000000000000 x29 = 0x00000000000000 lr  = 0x000000e0000000 sp  = 0x00000010011000
pc  = 0x000000e0000000

Prerequisites

  • rustup (at compile time and runtime)
  • (On Windows) Visual C++ 2017 Windows XP toolchain

About

Take AArch64 instructions, execute them, and display the final CPU state right away

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published