diff src/share/vm/c1/c1_LIRGenerator.cpp @ 2166:403dc4c1d7f5

6809483: hotspot:::method_entry are not correctly generated for "method()V" Reviewed-by: iveresov, twisti
author never
date Fri, 21 Jan 2011 13:01:02 -0800
parents 037c727f35fb
children aa4b04b68652
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIRGenerator.cpp	Thu Dec 30 23:44:45 2010 -0800
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Jan 21 13:01:02 2011 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2741,6 +2741,31 @@
   }
 }
 
+void LIRGenerator::do_RuntimeCall(RuntimeCall* x) {
+  LIR_OprList* args = new LIR_OprList(x->number_of_arguments());
+  BasicTypeList* signature = new BasicTypeList(x->number_of_arguments());
+
+  if (x->pass_thread()) {
+    signature->append(T_ADDRESS);
+    args->append(getThreadPointer());
+  }
+
+  for (int i = 0; i < x->number_of_arguments(); i++) {
+    Value a = x->argument_at(i);
+    LIRItem* item = new LIRItem(a, this);
+    item->load_item();
+    args->append(item->result());
+    signature->append(as_BasicType(a->type()));
+  }
+
+  LIR_Opr result = call_runtime(signature, args, x->entry(), x->type(), NULL);
+  if (x->type() == voidType) {
+    set_no_result(x);
+  } else {
+    __ move(result, rlock_result(x));
+  }
+}
+
 LIR_Opr LIRGenerator::call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info) {
   LIRItemList args(1);
   LIRItem value(arg1, this);