--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri Jan 21 01:16:13 2011 -0800
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri Jan 21 13:03:13 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);