summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/offlineasm
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/offlineasm')
-rw-r--r--Source/JavaScriptCore/offlineasm/armv7.rb2
-rw-r--r--Source/JavaScriptCore/offlineasm/offsets.rb13
2 files changed, 9 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/offlineasm/armv7.rb b/Source/JavaScriptCore/offlineasm/armv7.rb
index d9f9bfa01..07543574e 100644
--- a/Source/JavaScriptCore/offlineasm/armv7.rb
+++ b/Source/JavaScriptCore/offlineasm/armv7.rb
@@ -52,7 +52,7 @@ def armV7MoveImmediate(value, register)
else
$asm.puts "movw #{register.armV7Operand}, \##{value & 0xffff}"
if (value & 0xffff0000) != 0
- $asm.puts "movt #{register.armV7Operand}, \##{value >> 16}"
+ $asm.puts "movt #{register.armV7Operand}, \##{(value >> 16) & 0xffff}"
end
end
end
diff --git a/Source/JavaScriptCore/offlineasm/offsets.rb b/Source/JavaScriptCore/offlineasm/offsets.rb
index d9266d9a3..cb09918cd 100644
--- a/Source/JavaScriptCore/offlineasm/offsets.rb
+++ b/Source/JavaScriptCore/offlineasm/offsets.rb
@@ -60,7 +60,7 @@ end
#
# offsetsAndConfigurationIndex(ast, file) ->
-# {[offsets, index], ...}
+# [[offsets, index], ...]
#
# Parses the offsets from a file and returns a list of offsets and the
# index of the configuration that is valid in this build target.
@@ -154,16 +154,19 @@ def offsetsAndConfigurationIndex(file)
| data |
offsets << readInt(endianness, data)
}
- if not result.has_key?(offsets)
- result[offsets] = index
- end
+ result[index] = offsets
}
end
}
raise MissingMagicValuesException unless result.length >= 1
- result
+ # result is {index1=>offsets1, index2=>offsets2} but we want to return
+ # [[offsets1, index1], [offsets2, index2]].
+ return result.map {
+ | pair |
+ pair.reverse
+ }
end
#