Module: Crabstone::Arch

Defined in:
lib/crabstone/arch.rb

Class Method Summary collapse

Class Method Details

.module_of(arch) ⇒ Module

Examples:

Arch.module_of(Crabstone::ARCH_X86)
#=> Crabstone::X86

Parameters:

  • arch (Integer)

Returns:

  • (Module)


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/crabstone/arch.rb', line 20

def module_of(arch)
  case arch
  when ARCH_ARM then ARM
  when ARCH_ARM64 then ARM64
  when ARCH_X86 then X86
  when ARCH_MIPS then MIPS
  when ARCH_PPC then PPC
  when ARCH_SPARC then Sparc
  when ARCH_SYSZ then SysZ
  when ARCH_XCORE then XCore
  when ARCH_M68K then M68K
  when ARCH_TMS320C64X then TMS320C64X
  when ARCH_M680X then M680X
  when ARCH_EVM then EVM
  when ARCH_MOS65XX then MOS65XX
  when ARCH_WASM then WASM
  when ARCH_BPF then BPF
  when ARCH_RISCV then RISCV
  when ARCH_SH then SH
  when ARCH_TRICORE then TRICORE
  end
end