return a Hash containing a random value to each of the preserved registers, except $ra
Zachary Kurmas
Copyright © 2013
# File lib/mipsunit/mspec/util/util.rb, line 8 def self.randomize_preserved s_regs = (0..7).map { |i| "s#{i}".to_sym } (s_regs + [:gp, :sp, :fp]).inject({}) { |h, reg| h[reg] = rand(16383); h } end