Skip to content

mips instructions needed for executing mini-starcoin-vm #14

@templexxx

Description

@templexxx
  • lw
  • sw
  • addiu
  • sll
  • or
  • addu
  • beq
  • jalr
  • sltu
  • bne
  • xor
  • srl
  • lbu
  • lwr
  • lwl
  • sb
  • swr
  • swl
  • mfhi
  • bgezal
  • lui
  • break
  • mflo
  • subu
  • and
  • andi
  • sltiu
  • multu
  • jr
  • lhu
  • ori
  • movz
  • mtlo
  • mthi
  • sh
  • movn
  • nor
  • bltz
  • xori
  • sync
  • bgez
  • clz
  • sra
  • sc
  • ll
  • lb
  • sllv
  • mul
  • srlv
  • slti
  • slt
  • maddu
  • blez
  • syscall
  • lh
  • divu
  • mult
  • teq
  • bgtz
  • srav
  • div

how to get the result:

  1. using this profile.release in Cargo.toml:
[profile.release]
strip=true
lto=true
panic = "abort"
  1. release the min-starcoin-vm with changes in this commit
  2. using objdump inside this toolchain to disassembler executable sections:
mips-linux-musl-objdump -d mini-starcoin-vm > exec.obj
  1. using this mips disassembler tool to get instructions:
cat exec.obj | awk '{print $1, $2}' | mipsdis - > exec.dis
  1. get pure instructions: cat exec.dis | awk '{print $3}' > ins
  2. combine instructions and sort them: perl -0777 -lape's/\s+/\n/g' ins | sort | uniq -c | sort -nr > ins_sort
  3. cat ins_sort | awk '{print $2}' > used_ins
  4. remove meaningless illegal

Close #13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions