aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2012-01-13 17:57:10 +0200
committerPekka Enberg <penberg@kernel.org>2012-01-13 17:59:09 +0200
commit10d321d7138f537d38cedf8aa6f00ad5a06778d8 (patch)
tree41d8ca203540502a1132403e45157ec6aa3f9c66
parente6550c2d844797ffeb08e90bf9f4606dd654a5a6 (diff)
downloadjato-10d321d7138f537d38cedf8aa6f00ad5a06778d8.tar.gz
x86: Fix frame_local_offset() on 64-bit
The ->args_count member of struct vm_method represents the total number of arguments. However, in frame_local_offset() we are interested in the number of arguments that are passed on the stack. Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--arch/x86/stack-frame.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/stack-frame.c b/arch/x86/stack-frame.c
index f691a4e4..f4cc375f 100644
--- a/arch/x86/stack-frame.c
+++ b/arch/x86/stack-frame.c
@@ -30,6 +30,7 @@
#include "jit/compilation-unit.h"
#include "jit/expression.h"
#include "jit/compiler.h"
+#include "jit/args.h"
#include "jit/text.h"
#include "vm/stack-trace.h"
@@ -83,7 +84,7 @@ unsigned long frame_local_offset(struct vm_method *method,
unsigned long idx, nr_args;
idx = local->local_index;
- nr_args = method->args_count;
+ nr_args = get_stack_args_count(method);
return index_to_offset(idx, vm_type_slot_size(local->vm_type), nr_args);
}