Mercurial > hg > truffle
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java @ 1423:760213a60e8b
* rewrite of the code installation
* partial support for safepoints
* macro-based CiTargetMethod interface
* code stub support
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Mon, 16 Aug 2010 18:59:36 -0700 |
parents | 3483ec571caf |
children | 98fffb304868 |
comparison
equal
deleted
inserted
replaced
1422:3483ec571caf | 1423:760213a60e8b |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. | 2 * Copyright (c) 2009-2010 Sun Microsystems, Inc. All rights reserved. |
3 * | 3 * |
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is | 4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is |
5 * described in this document. In particular, and without limitation, these intellectual property rights may include one | 5 * described in this document. In particular, and without limitation, these intellectual property rights may include one |
6 * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent | 6 * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent |
7 * applications in the U.S. and in other countries. | 7 * applications in the U.S. and in other countries. |
136 return getAllocatableRegisters(); | 136 return getAllocatableRegisters(); |
137 } | 137 } |
138 | 138 |
139 @Override | 139 @Override |
140 public CiRegister getReturnRegister(CiKind kind) { | 140 public CiRegister getReturnRegister(CiKind kind) { |
141 return AMD64.rax; | 141 switch (kind) { |
142 case Boolean: | |
143 case Byte: | |
144 case Char: | |
145 case Short: | |
146 case Int: | |
147 case Long: | |
148 case Object: | |
149 return AMD64.rax; | |
150 case Float: | |
151 case Double: | |
152 return AMD64.xmm0; | |
153 case Void: | |
154 case Illegal: | |
155 return null; | |
156 default: | |
157 throw new UnsupportedOperationException("no return register for type " + kind); | |
158 } | |
142 } | 159 } |
143 | 160 |
144 @Override | 161 @Override |
145 public CiCallingConvention getRuntimeCallingConvention(CiKind[] parameters, CiTarget target) { | 162 public CiCallingConvention getRuntimeCallingConvention(CiKind[] parameters, CiTarget target) { |
146 return callingConvention(parameters, true, target); | 163 return callingConvention(parameters, true, target); |