001 /* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013 package org.jikesrvm.osr.bytecodes; 014 015 016 /** 017 * BC_FloatStore: {@code fstore}, {@code fstore_<i>} 018 */ 019 public class FloatStore extends PseudoBytecode { 020 private int bsize; 021 private byte[] codes; 022 private int lnum; 023 024 public FloatStore(int local) { 025 this.lnum = local; 026 if (local <= 255) { 027 bsize = 2; 028 codes = makeOUcode(JBC_fstore, local); 029 } else { 030 bsize = 4; 031 codes = makeWOUUcode(JBC_fstore, local); 032 } 033 } 034 035 @Override 036 public byte[] getBytes() { 037 return codes; 038 } 039 040 @Override 041 public int getSize() { 042 return bsize; 043 } 044 045 @Override 046 public int stackChanges() { 047 return -1; 048 } 049 050 @Override 051 public String toString() { 052 return "FloatStore " + lnum; 053 } 054 }