From 2bef1ec4af205acc0e001f089a198cd93412d541 Mon Sep 17 00:00:00 2001 From: SangGyu Lee Date: Fri, 12 Apr 2013 13:51:12 +0900 Subject: [PATCH] LLInt should not use d8 register as scratch register MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit [Issue#] N_SE-29275 [Problem] WebApp exits if javascript alert popup shows while softkeyboard is shown [Cause] LLInt (Low Level Interpreter) overwrite d8 register, which was allocated to other variable. [Solution] LLInt should use d8 as scratch. d8 register must be preserved according to ARM Procedure Call Standard §5.1.2.1 VFP register usage conventions. Instead, use d6 register, it is defined as scratch register in APCS. Change-Id: I257dc891975d9e1df0dd896417150de57cde9a12 --- Source/JavaScriptCore/offlineasm/armv7.rb | 2 +- Source/JavaScriptCore/offlineasm/cloop.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/JavaScriptCore/offlineasm/armv7.rb b/Source/JavaScriptCore/offlineasm/armv7.rb index 81f359f..ca564ac 100644 --- a/Source/JavaScriptCore/offlineasm/armv7.rb +++ b/Source/JavaScriptCore/offlineasm/armv7.rb @@ -41,7 +41,7 @@ end ARMv7_EXTRA_GPRS = [SpecialRegister.new("r9"), SpecialRegister.new("r8"), SpecialRegister.new("r3")] ARMv7_EXTRA_FPRS = [SpecialRegister.new("d7")] -ARMv7_SCRATCH_FPR = SpecialRegister.new("d8") +ARMv7_SCRATCH_FPR = SpecialRegister.new("d6") def armV7MoveImmediate(value, register) # Currently we only handle the simple cases, and fall back to mov/movt for the complex ones. diff --git a/Source/JavaScriptCore/offlineasm/cloop.rb b/Source/JavaScriptCore/offlineasm/cloop.rb index 8469ed4..89daa72 100644 --- a/Source/JavaScriptCore/offlineasm/cloop.rb +++ b/Source/JavaScriptCore/offlineasm/cloop.rb @@ -61,7 +61,7 @@ class SpecialRegister < NoChildren end end -C_LOOP_SCRATCH_FPR = SpecialRegister.new("d8") +C_LOOP_SCRATCH_FPR = SpecialRegister.new("d6") class RegisterID def dump -- 2.7.4