From 085292adba8e6e7b3105b71abae82aff843f6708 Mon Sep 17 00:00:00 2001 From: Gabor Rapcsanyi Date: Thu, 21 Mar 2013 15:36:39 +0100 Subject: LLInt CLoop backend misses Double2Ints() on 32bit architectures https://bugs.webkit.org/show_bug.cgi?id=112141 Reviewed by Filip Pizlo. Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures. * llint/LowLevelInterpreter.cpp: (LLInt): (JSC::LLInt::Double2Ints): * offlineasm/cloop.rb: Change-Id: I0617d06eda59afec2f0ddc7268ac1531f275f9ec git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145551 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Andras Becsi --- Source/JavaScriptCore/llint/LowLevelInterpreter.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/JavaScriptCore/llint/LowLevelInterpreter.cpp') diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp index a9cb393b0..b2ce2483e 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp @@ -116,6 +116,17 @@ static double Ints2Double(uint32_t lo, uint32_t hi) u.ival64 = (static_cast(hi) << 32) | lo; return u.dval; } + +static void Double2Ints(double val, uint32_t& lo, uint32_t& hi) +{ + union { + double dval; + uint64_t ival64; + } u; + u.dval = val; + hi = static_cast(u.ival64 >> 32); + lo = static_cast(u.ival64); +} #endif // USE(JSVALUE32_64) } // namespace LLint -- cgit v1.2.1