src/cpu/ppc/vm/ppc.ad

changeset 6723
0bf37f737702
parent 6660
63c5920a038d
child 6876
710a3c8b516e
child 7222
f6bde7889409
     1.1 --- a/src/cpu/ppc/vm/ppc.ad	Mon Jun 09 15:42:31 2014 -0700
     1.2 +++ b/src/cpu/ppc/vm/ppc.ad	Tue Apr 01 09:36:49 2014 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  //
     1.5 -// Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 -// Copyright 2012, 2013 SAP AG. All rights reserved.
     1.7 +// Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
     1.8 +// Copyright 2012, 2014 SAP AG. All rights reserved.
     1.9  // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    1.10  //
    1.11  // This code is free software; you can redistribute it and/or modify it
    1.12 @@ -1363,8 +1363,8 @@
    1.13    Compile* C = ra_->C;
    1.14    MacroAssembler _masm(&cbuf);
    1.15  
    1.16 -  const long framesize = ((long)C->frame_slots()) << LogBytesPerInt;
    1.17 -  assert(framesize%(2*wordSize) == 0, "must preserve 2*wordSize alignment");
    1.18 +  const long framesize = C->frame_size_in_bytes();
    1.19 +  assert(framesize % (2 * wordSize) == 0, "must preserve 2*wordSize alignment");
    1.20  
    1.21    const bool method_is_frameless      = false /* TODO: PPC port C->is_frameless_method()*/;
    1.22  
    1.23 @@ -1389,19 +1389,22 @@
    1.24    // careful, because some VM calls (such as call site linkage) can
    1.25    // use several kilobytes of stack. But the stack safety zone should
    1.26    // account for that. See bugs 4446381, 4468289, 4497237.
    1.27 -  if (C->need_stack_bang(framesize) && UseStackBanging) {
    1.28 +
    1.29 +  int bangsize = C->bang_size_in_bytes();
    1.30 +  assert(bangsize >= framesize || bangsize <= 0, "stack bang size incorrect");
    1.31 +  if (C->need_stack_bang(bangsize) && UseStackBanging) {
    1.32      // Unfortunately we cannot use the function provided in
    1.33      // assembler.cpp as we have to emulate the pipes. So I had to
    1.34      // insert the code of generate_stack_overflow_check(), see
    1.35      // assembler.cpp for some illuminative comments.
    1.36      const int page_size = os::vm_page_size();
    1.37 -    int bang_end = StackShadowPages*page_size;
    1.38 +    int bang_end = StackShadowPages * page_size;
    1.39  
    1.40      // This is how far the previous frame's stack banging extended.
    1.41      const int bang_end_safe = bang_end;
    1.42  
    1.43 -    if (framesize > page_size) {
    1.44 -      bang_end += framesize;
    1.45 +    if (bangsize > page_size) {
    1.46 +      bang_end += bangsize;
    1.47      }
    1.48  
    1.49      int bang_offset = bang_end_safe;
    1.50 @@ -1447,7 +1450,7 @@
    1.51  
    1.52    unsigned int bytes = (unsigned int)framesize;
    1.53    long offset = Assembler::align_addr(bytes, frame::alignment_in_bytes);
    1.54 -  ciMethod *currMethod = C -> method();
    1.55 +  ciMethod *currMethod = C->method();
    1.56  
    1.57    // Optimized version for most common case.
    1.58    if (UsePower6SchedulerPPC64 &&

mercurial