From 43a836f70ae8a958c55591a942a0710ff6cbd180 Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Mon, 17 Feb 2014 08:10:02 +0000 Subject: [PATCH] ARM: build fix for r19380. This commit fixes the debug build on Linux with gcc 4.6.3 and 4.7.2. Port r19381 (5476e11b) BUG= R=dcarney@chromium.org, plind44@gmail.com Review URL: https://codereview.chromium.org/167523003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/a64/code-stubs-a64.cc | 8 ++++++-- src/arm/code-stubs-arm.cc | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/a64/code-stubs-a64.cc b/src/a64/code-stubs-a64.cc index 40aa0b617a..50b8bb2852 100644 --- a/src/a64/code-stubs-a64.cc +++ b/src/a64/code-stubs-a64.cc @@ -5655,8 +5655,12 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { MemOperand context_restore_operand( fp, (2 + FCA::kContextSaveIndex) * kPointerSize); // Stores return the first js argument - int return_value_offset = - 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset); + int return_value_offset = 0; + if (is_store) { + return_value_offset = 2 + FCA::kArgsLength; + } else { + return_value_offset = 2 + FCA::kReturnValueOffset; + } MemOperand return_value_operand(fp, return_value_offset * kPointerSize); const int spill_offset = 1 + kApiStackSpace; diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index 10818ce702..c9b479eaa1 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -5527,8 +5527,12 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { MemOperand context_restore_operand( fp, (2 + FCA::kContextSaveIndex) * kPointerSize); // Stores return the first js argument - int return_value_offset = - 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset); + int return_value_offset = 0; + if (is_store) { + return_value_offset = 2 + FCA::kArgsLength; + } else { + return_value_offset = 2 + FCA::kReturnValueOffset; + } MemOperand return_value_operand(fp, return_value_offset * kPointerSize); __ CallApiFunctionAndReturn(api_function_address,