src/cpu/sparc/vm/c1_FrameMap_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6930772 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/c1_FrameMap_sparc.cpp

Print this page


   1 /*
   2  * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


 328     _caller_save_fpu_regs[i] = LIR_OprFact::single_fpu(i);
 329   }
 330 }
 331 
 332 
 333 Address FrameMap::make_new_address(ByteSize sp_offset) const {
 334   return Address(SP, STACK_BIAS + in_bytes(sp_offset));
 335 }
 336 
 337 
 338 VMReg FrameMap::fpu_regname (int n) {
 339   return as_FloatRegister(n)->as_VMReg();
 340 }
 341 
 342 
 343 LIR_Opr FrameMap::stack_pointer() {
 344   return SP_opr;
 345 }
 346 
 347 







 348 bool FrameMap::validate_frame() {
 349   int max_offset = in_bytes(framesize_in_bytes());
 350   int java_index = 0;
 351   for (int i = 0; i < _incoming_arguments->length(); i++) {
 352     LIR_Opr opr = _incoming_arguments->at(i);
 353     if (opr->is_stack()) {
 354       max_offset = MAX2(_argument_locations->at(java_index), max_offset);
 355     }
 356     java_index += type2size[opr->type()];
 357   }
 358   return Assembler::is_simm13(max_offset + STACK_BIAS);
 359 }
   1 /*
   2  * Copyright 1999-2010 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


 328     _caller_save_fpu_regs[i] = LIR_OprFact::single_fpu(i);
 329   }
 330 }
 331 
 332 
 333 Address FrameMap::make_new_address(ByteSize sp_offset) const {
 334   return Address(SP, STACK_BIAS + in_bytes(sp_offset));
 335 }
 336 
 337 
 338 VMReg FrameMap::fpu_regname (int n) {
 339   return as_FloatRegister(n)->as_VMReg();
 340 }
 341 
 342 
 343 LIR_Opr FrameMap::stack_pointer() {
 344   return SP_opr;
 345 }
 346 
 347 
 348 // JSR 292
 349 LIR_Opr FrameMap::method_handle_invoke_SP_save_opr() {
 350   assert(L7 == L7_mh_SP_save, "must be same register");
 351   return L7_opr;
 352 }
 353 
 354 
 355 bool FrameMap::validate_frame() {
 356   int max_offset = in_bytes(framesize_in_bytes());
 357   int java_index = 0;
 358   for (int i = 0; i < _incoming_arguments->length(); i++) {
 359     LIR_Opr opr = _incoming_arguments->at(i);
 360     if (opr->is_stack()) {
 361       max_offset = MAX2(_argument_locations->at(java_index), max_offset);
 362     }
 363     java_index += type2size[opr->type()];
 364   }
 365   return Assembler::is_simm13(max_offset + STACK_BIAS);
 366 }
src/cpu/sparc/vm/c1_FrameMap_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File