voodoo 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -360,9 +360,14 @@ module Voodoo
360
360
  # Set the word at _base_ + _offset_ * +@WORDSIZE+ to _value_
361
361
  def set_word base, offset, value
362
362
  emit "; set-word #{base} #{offset} #{value}\n"
363
- value_ref = load_value value, @RETURN_REG
363
+ if immediate_operand?(value)
364
+ value_ref = value
365
+ else
366
+ load_value_into_register value, @RETURN_REG
367
+ value_ref = @RETURN_REG
368
+ end
364
369
  addr_ref = load_address base, offset, @WORDSIZE
365
- emit "mov dword #{addr_ref}, #{value_ref}\n"
370
+ emit "mov #{@WORD_NAME} #{addr_ref}, #{value_ref}\n"
366
371
  end
367
372
 
368
373
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voodoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robbert Haarman
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-15 00:00:00 +02:00
12
+ date: 2010-05-05 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15