hotspot/src/cpu/x86/vm/c1_FpuStackSim_x86.cpp
changeset 38031 e0b822facc03
parent 7397 5b173b4ca846
child 46448 b5350a83520b
equal deleted inserted replaced
38030:93f24e7b3c43 38031:e0b822facc03
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2016, 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.
   167 }
   167 }
   168 
   168 
   169 
   169 
   170 intArray* FpuStackSim::write_state() {
   170 intArray* FpuStackSim::write_state() {
   171   intArray* res = new intArray(1 + FrameMap::nof_fpu_regs);
   171   intArray* res = new intArray(1 + FrameMap::nof_fpu_regs);
   172   (*res)[0] = stack_size();
   172   res->append(stack_size());
   173   for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
   173   for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
   174     (*res)[1 + i] = regs_at(i);
   174     res->append(regs_at(i));
   175   }
   175   }
   176   return res;
   176   return res;
   177 }
   177 }
   178 
   178 
   179 
   179 
   180 void FpuStackSim::read_state(intArray* fpu_stack_state) {
   180 void FpuStackSim::read_state(intArray* fpu_stack_state) {
   181   _stack_size = (*fpu_stack_state)[0];
   181   _stack_size = fpu_stack_state->at(0);
   182   for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
   182   for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
   183     set_regs_at(i, (*fpu_stack_state)[1 + i]);
   183     set_regs_at(i, fpu_stack_state->at(1 + i));
   184   }
   184   }
   185 }
   185 }
   186 
   186 
   187 
   187 
   188 #ifndef PRODUCT
   188 #ifndef PRODUCT