changeset 1426:ed6bd46ad55e

small cleanup
author Lukas Stadler <lukas.stadler@oracle.com>
date Wed, 18 Aug 2010 11:44:04 -0700
parents 98fffb304868
children 149b1d2316de
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java
diffstat 1 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Tue Aug 17 17:34:25 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Wed Aug 18 11:44:04 2010 -0700
@@ -127,38 +127,6 @@
         return templates;
     }
 
-    private XirTemplate buildNewInstance() {
-        XirOperand result = asm.restart(CiKind.Word);
-        XirOperand type = asm.createInputParameter("type", CiKind.Object);
-        XirOperand instanceSize = asm.createConstantInputParameter("instance size", CiKind.Word);
-
-        XirOperand thread = asm.createRegister("thread", CiKind.Word, AMD64.r15);
-        XirOperand temp1 = asm.createTemp("temp1", CiKind.Word);
-        XirOperand temp2 = asm.createTemp("temp2", CiKind.Word);
-        XirLabel tlabFull = asm.createOutOfLineLabel("tlab full");
-        XirLabel resume = asm.createInlineLabel("resume");
-
-        asm.pload(CiKind.Word, result, thread, asm.i(config.threadTlabTopOffset), false);
-        asm.add(temp1, result, instanceSize);
-        asm.pload(CiKind.Word, temp2, thread, asm.i(config.threadTlabEndOffset), false);
-
-        asm.jgt(tlabFull, temp1, temp2);
-        asm.pstore(CiKind.Word, thread, asm.i(config.threadTlabTopOffset), temp1, false);
-        asm.bindInline(resume);
-
-        asm.pload(CiKind.Word, temp1, type, asm.i(config.instanceHeaderPrototypeOffset), false);
-        asm.pstore(CiKind.Word, result, temp1, false);
-        asm.pstore(CiKind.Object, result, asm.i(config.hubOffset), type, false);
-
-        asm.bindOutOfLine(tlabFull);
-        XirOperand arg = asm.createRegister("runtime call argument", CiKind.Object, AMD64.rdx);
-        asm.mov(arg, type);
-        asm.callRuntime(config.newInstanceStub, result);
-        asm.jmp(resume);
-
-        return asm.finishTemplate("new instance");
-    }
-
     private XirTemplate buildPrologue(boolean staticMethod) {
         asm.restart(CiKind.Void);
         XirOperand temp = asm.createRegister("temp (rax)", CiKind.Int, AMD64.rax);
@@ -430,6 +398,38 @@
         return asm.finishTemplate(addr, "invokespecial");
     }
 
+    private XirTemplate buildNewInstance() {
+        XirOperand result = asm.restart(CiKind.Word);
+        XirOperand type = asm.createInputParameter("type", CiKind.Object);
+        XirOperand instanceSize = asm.createConstantInputParameter("instance size", CiKind.Word);
+
+        XirOperand thread = asm.createRegister("thread", CiKind.Word, AMD64.r15);
+        XirOperand temp1 = asm.createTemp("temp1", CiKind.Word);
+        XirOperand temp2 = asm.createTemp("temp2", CiKind.Word);
+        XirLabel tlabFull = asm.createOutOfLineLabel("tlab full");
+        XirLabel resume = asm.createInlineLabel("resume");
+
+        asm.pload(CiKind.Word, result, thread, asm.i(config.threadTlabTopOffset), false);
+        asm.add(temp1, result, instanceSize);
+        asm.pload(CiKind.Word, temp2, thread, asm.i(config.threadTlabEndOffset), false);
+
+        asm.jgt(tlabFull, temp1, temp2);
+        asm.pstore(CiKind.Word, thread, asm.i(config.threadTlabTopOffset), temp1, false);
+        asm.bindInline(resume);
+
+        asm.pload(CiKind.Word, temp1, type, asm.i(config.instanceHeaderPrototypeOffset), false);
+        asm.pstore(CiKind.Word, result, temp1, false);
+        asm.pstore(CiKind.Object, result, asm.i(config.hubOffset), type, false);
+
+        asm.bindOutOfLine(tlabFull);
+        XirOperand arg = asm.createRegister("runtime call argument", CiKind.Object, AMD64.rdx);
+        asm.mov(arg, type);
+        asm.callRuntime(config.newInstanceStub, result);
+        asm.jmp(resume);
+
+        return asm.finishTemplate("new instance");
+    }
+
     @Override
     public XirSnippet genArrayLength(XirSite site, XirArgument array) {
         return new XirSnippet(arrayLengthTemplate, array);