Skip to content

CPU and VM Instruction Set Comparison

zeitue edited this page Jul 13, 2015 · 16 revisions

types explanation:

  • c/uc - signed/unsigned 8-bit character
  • s/us - signed/unsigned 16-bit short int
  • i/ui - signed/unsigned 32-bit int
  • l/ul - signed/unsigned 64-bit long int
  • q/uq - signed/unsigned 128-bit quad int
  • f - 32-bit single-precision floating point number
  • d - 64-bit double-precision floating point number
  • v* - pointer type

values explanation:

  • exists - the architecture has some concept of this type
  • ld/sto - the architecture can load and store these types to/from memory
  • convert - the architecture can convert to/from this type
  • bitwise - the architecture can perform bitwise ops on this type
  • math - the architecture can perform simple math on this type
  • cmp - the architecture can perform comparisons between this type
  • ret - the architecture can use this type as a return value from a function call
  • call - the architecture can use this type as an argument to a function call
  • imm - this type can be used as an immediate value
  • ovfl - this type can be used in overflow-detecting math ops

(unfinished) x86 - https://en.wikipedia.org/wiki/X86_instruction_listings

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c x x x x x x
uc x
s x x x x x x
us x
i x x x x x x
ui x
l
ul
q
uq
f x x x x
d x x x x
void*

(unfinished) x86_64

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c
uc
s
us
i
ui
l
ul
q
uq
f
d
void*

(unfinished) ARM

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c
uc
s
us
i
ui
l
ul
q
uq
f
d
void*

(unfinished) MIPS - https://en.wikipedia.org/wiki/MIPS_architecture

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c
uc
s X
us
i X X X X
ui
l
ul
q
uq
f
d
void*

(finished) JVM - http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c x
uc
s x
us
i x x x x x
ui
l x x x x x x x
ul
q
uq
f x x x x x x
d x x x x x x
void* x x x

(finished) NanoJit - https://developer.mozilla.org/En/Nanojit/LIR

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c x x
uc x x
s x x
us x x
i x x x x x x x x x x
ui x x x x
q x x x x x x x x x x
uq x x x
f x x x
d x x x x x x x x
void*

(finished) GNU Lightning - http://www.gnu.org/software/lightning/manual/lightning.html#The-instruction-set

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c x x x x x
uc x x x x x
s x x x x x
us x x x x x
i x x x x x x x x
ui x x x x x x x x
l x x x x x x x x
ul x x x x x x x x
f x x x x x x x
d x x x x x x x
void* x x x x x x x

blank table

type exists ld/sto convert bitwise math cmp ret call imm ovfl
c
uc
s
us
i
ui
l
ul
q
uq
f
d
void*

todo:

  • hardware CPUs: x86 (done), x86_64, ARM, MIPS
  • VMs: CIL(?), JVM, NanoJit, GNU Lightning (these are done, just need to copy/paste from paper to wiki)