comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 2245:638119ce7cfd

7009309: JSR 292: compiler/6991596/Test6991596.java crashes on fastdebug JDK7/b122 Reviewed-by: kvn, never
author twisti
date Tue, 01 Feb 2011 03:38:44 -0800
parents 3582bf76420e
children 2ab52cda08e5 3d58a4983660
comparison
equal deleted inserted replaced
2244:4f26f535a225 2245:638119ce7cfd
1 /* 1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
608 int total_args_passed, 608 int total_args_passed,
609 int comp_args_on_stack, 609 int comp_args_on_stack,
610 const BasicType *sig_bt, 610 const BasicType *sig_bt,
611 const VMRegPair *regs) { 611 const VMRegPair *regs) {
612 612
613 //
614 // We will only enter here from an interpreted frame and never from after
615 // passing thru a c2i. Azul allowed this but we do not. If we lose the
616 // race and use a c2i we will remain interpreted for the race loser(s).
617 // This removes all sorts of headaches on the x86 side and also eliminates
618 // the possibility of having c2i -> i2c -> c2i -> ... endless transitions.
619
620
621 // Note: r13 contains the senderSP on entry. We must preserve it since 613 // Note: r13 contains the senderSP on entry. We must preserve it since
622 // we may do a i2c -> c2i transition if we lose a race where compiled 614 // we may do a i2c -> c2i transition if we lose a race where compiled
623 // code goes non-entrant while we get args ready. 615 // code goes non-entrant while we get args ready.
624 // In addition we use r13 to locate all the interpreter args as 616 // In addition we use r13 to locate all the interpreter args as
625 // we must align the stack to 16 bytes on an i2c entry else we 617 // we must align the stack to 16 bytes on an i2c entry else we
626 // lose alignment we expect in all compiled code and register 618 // lose alignment we expect in all compiled code and register
627 // save code can segv when fxsave instructions find improperly 619 // save code can segv when fxsave instructions find improperly
628 // aligned stack pointer. 620 // aligned stack pointer.
629 621
622 // Pick up the return address
630 __ movptr(rax, Address(rsp, 0)); 623 __ movptr(rax, Address(rsp, 0));
631 624
632 // Must preserve original SP for loading incoming arguments because 625 // Must preserve original SP for loading incoming arguments because
633 // we need to align the outgoing SP for compiled code. 626 // we need to align the outgoing SP for compiled code.
634 __ movptr(r11, rsp); 627 __ movptr(r11, rsp);