Mercurial > hg > graal-compiler
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java @ 1465:2c754f3a2722
Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Thu, 18 Nov 2010 17:27:43 +0100 |
parents | d603bdbec024 |
children | 5571b97fc1ec |
comparison
equal
deleted
inserted
replaced
1463:7bc14f75a077 | 1465:2c754f3a2722 |
---|---|
258 } | 258 } |
259 asm.mark(MARK_INVOKESPECIAL); | 259 asm.mark(MARK_INVOKESPECIAL); |
260 | 260 |
261 // -- out of line ------------------------------------------------------- | 261 // -- out of line ------------------------------------------------------- |
262 asm.bindOutOfLine(stub); | 262 asm.bindOutOfLine(stub); |
263 XirOperand method = asm.createRegisterTemp("method", CiKind.Object, AMD64.rbx); | 263 XirOperand method = asm.createRegisterTemp("method", CiKind.Word, AMD64.rbx); |
264 asm.mark(MARK_STATIC_CALL_STUB, XirMark.CALLSITE); | 264 asm.mark(MARK_STATIC_CALL_STUB, XirMark.CALLSITE); |
265 asm.mov(method, asm.w(0L)); | 265 asm.mov(method, asm.w(0L)); |
266 XirLabel dummy = asm.createOutOfLineLabel("dummy"); | 266 XirLabel dummy = asm.createOutOfLineLabel("dummy"); |
267 asm.jmp(dummy); | 267 asm.jmp(dummy); |
268 asm.bindOutOfLine(dummy); | 268 asm.bindOutOfLine(dummy); |
281 XirLabel stub = asm.createOutOfLineLabel("call stub"); | 281 XirLabel stub = asm.createOutOfLineLabel("call stub"); |
282 asm.mark(MARK_INVOKESTATIC); | 282 asm.mark(MARK_INVOKESTATIC); |
283 | 283 |
284 // -- out of line ------------------------------------------------------- | 284 // -- out of line ------------------------------------------------------- |
285 asm.bindOutOfLine(stub); | 285 asm.bindOutOfLine(stub); |
286 XirOperand method = asm.createRegisterTemp("method", CiKind.Object, AMD64.rbx); | 286 XirOperand method = asm.createRegisterTemp("method", CiKind.Word, AMD64.rbx); |
287 asm.mark(MARK_STATIC_CALL_STUB, XirMark.CALLSITE); | 287 asm.mark(MARK_STATIC_CALL_STUB, XirMark.CALLSITE); |
288 asm.mov(method, asm.w(0L)); | 288 asm.mov(method, asm.w(0L)); |
289 XirLabel dummy = asm.createOutOfLineLabel("dummy"); | 289 XirLabel dummy = asm.createOutOfLineLabel("dummy"); |
290 asm.jmp(dummy); | 290 asm.jmp(dummy); |
291 asm.bindOutOfLine(dummy); | 291 asm.bindOutOfLine(dummy); |
1006 public void emitOutOfLine() { | 1006 public void emitOutOfLine() { |
1007 assert state == State.Inline; | 1007 assert state == State.Inline; |
1008 | 1008 |
1009 asm.bindOutOfLine(replacement); | 1009 asm.bindOutOfLine(replacement); |
1010 XirMark begin = asm.mark(null); | 1010 XirMark begin = asm.mark(null); |
1011 asm.mov(arg, asm.createConstant(CiConstant.forObject(null))); | 1011 asm.mov(arg, asm.createConstant(CiConstant.NULL_OBJECT)); |
1012 XirMark end = asm.mark(null); | 1012 XirMark end = asm.mark(null); |
1013 // make this piece of data look like an instruction | 1013 // make this piece of data look like an instruction |
1014 asm.rawBytes(new byte[] {(byte) 0xb8, 0, 0, 0x05, 0}); | 1014 asm.rawBytes(new byte[] {(byte) 0xb8, 0, 0, 0x05, 0}); |
1015 asm.mark(MARK_KLASS_PATCHING, begin, end); | 1015 asm.mark(MARK_KLASS_PATCHING, begin, end); |
1016 asm.bindOutOfLine(patchStub); | 1016 asm.bindOutOfLine(patchStub); |